A battery pack box weld surface defect detection method based on machine vision

By employing a dual-domain feature cross-layer anchoring mechanism and a multi-dimensional collaborative attention mechanism based on machine vision technology, the problem of sub-pixel-level precise measurement of microscopic defects on the surface of the weld seam in the battery pack enclosure was solved. This enabled precise online evaluation of weld seam quality and full-process digital traceability, thereby improving the quantitative evaluation capability of weld seam quality.

CN121810678BActive Publication Date: 2026-06-02SUZHOU LILAI AUTO PARTS
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU LILAI AUTO PARTS
Filing Date
2026-03-09
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies cannot achieve sub-pixel-level precise measurement of microscopic defects on the surface of the weld seam of the battery pack housing, and have weak image feature mapping capabilities, making it impossible to quantitatively evaluate the weld seam quality.

Method used

A machine vision-based method for detecting surface defects in battery pack enclosure welds is adopted. By fusing and reconstructing the defect topology dataset through a dual-domain feature cross-layer anchoring mechanism, a regression mapping process is used to diagnose the sealing mechanism and quantify the characterization set. Combined with a multi-dimensional collaborative attention mechanism and a digital image correlation algorithm, the method achieves accurate extraction and quantification of defect features and thermally affected zone structural features.

Benefits of technology

It enables precise online assessment of weld quality and full-process digital traceability, and can perform sub-pixel-level topological reconstruction of micro-defects and quantitative prediction of physical airtightness, reducing the risk of false detection and missed detection, and improving the anti-interference ability of image feature extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121810678B_ABST
    Figure CN121810678B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image analysis technology, specifically to a machine vision-based method for detecting surface defects in weld seams of battery pack enclosures. The method includes: performing adaptive contrast enhancement and noise suppression preprocessing on original images of weld seams of battery pack enclosures of different specifications; extracting defect and heat-affected zone features using a contour reconstruction network and enhancing these features through a multi-dimensional collaborative attention mechanism; reconstructing a defect topology dataset and constructing a quantitative characterization set of sealing mechanisms using a dual-domain feature cross-layer anchoring fusion mechanism; and finally outputting an airtightness index through a regression mapping process to generate a quantitatively correlated judgment result. This invention utilizes image features to quantitatively correlate the airtightness index, reducing reliance on manual visual inspection and high-cost physical leak testing. Furthermore, the online diagnosis of failure mechanisms provides real-time closed-loop guidance for optimizing welding process parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image analysis technology, specifically to a method for detecting surface defects in the weld seams of battery pack housings based on machine vision. Background Technology

[0002] With the rapid development of the new energy vehicle industry, the digital morphology features of the weld surfaces of the battery pack housing, as a core safety component, have become a key dimension for assessing welding quality and structural integrity. Against the backdrop of intelligent upgrades to production lines, the use of machine vision technology to extract weld features and perform qualitative quality analysis has been initially applied.

[0003] However, in the current field of image analysis, the indirect evaluation of digital morphological features of weld surfaces mainly relies on general image processing algorithms, which requires costly physical leak testing. Existing methods cannot achieve sub-pixel-level accurate measurement of micro-defects, and the quantitative evaluation of weld quality suffers from weak image feature mapping capabilities.

[0004] To address this, a machine vision-based method for detecting surface defects in the weld seams of battery pack housings is proposed. Summary of the Invention

[0005] The purpose of this invention is to provide a machine vision-based method for detecting surface defects in the weld seams of battery pack enclosures. This invention utilizes a dual-domain feature cross-layer anchoring mechanism to fuse and reconstruct a defect topology dataset, and employs a regression mapping process to diagnose the sealing mechanism quantification set, thus overcoming the deficiency in existing technologies where image features lack quantitative correlation with the airtightness index.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A machine vision-based method for detecting surface defects in weld seams of battery pack housings includes:

[0008] Original images of the weld seams of battery pack housings of different specifications are acquired, and adaptive contrast enhancement and noise suppression preprocessing are performed to obtain preprocessed images.

[0009] The preprocessed image is input into a contour reconstruction network for feature extraction to obtain defect features and heat-affected zone structural features.

[0010] In the feature encoding and feature decoding layers of the contour reconstruction network, a multi-dimensional collaborative attention mechanism is activated to enhance the defect features and the structural features of the heat-affected zone;

[0011] The dual-domain feature cross-layer anchoring fusion mechanism of the contour reconstruction network is used to fuse the enhanced defect features and heat-affected zone structural features, reconstruct the defect contour and heat-affected zone boundary, and encapsulate them according to the XML specification to generate a defect topology dataset.

[0012] Based on the aforementioned defect topology dataset, a quantitative characterization set of sealing mechanism is automatically extracted and constructed using a digital image correlation algorithm;

[0013] The quantitative characterization set of the sealing mechanism is input into the performance index mapping diagnostic tool, and a regression mapping between image features and measured physical air tightness index is performed to obtain the judgment result.

[0014] The judgment results, the quantitative characterization set of sealing mechanism, and the defect topology dataset are bound together to generate full-process quality traceability data.

[0015] Preferably, the process of acquiring original images of weld seams adapted to different specifications of battery pack housings and obtaining preprocessed images includes: acquiring the welding path coordinates of the original images of weld seams adapted to different specifications of battery pack housings; synchronously acquiring the welding path coordinates using an industrial camera with a 405 nm blue light source at a preset grazing angle; stitching together a fused image containing the fusion nugget area, laser weld bead, and friction stir weld bead based on the pixel coordinate system; performing adaptive histogram equalization on the fused image; using median filtering to suppress isolated noise points generated by welding spatter; and outputting a preprocessed image that meets the contrast threshold.

[0016] Preferably, the contour reconstruction network performs feature extraction, specifically including: constructing a symmetric convolutional neural network containing a feature encoding layer and a feature decoding layer; in the feature encoding layer, using residual blocks to extract deep semantic features of the original image to generate defect features; in the feature decoding layer, transposed convolution upsampling the deep semantic feature map output by the feature encoding layer to generate heat-affected zone structural features; a dual-domain feature cross-layer anchoring fusion mechanism introduces low-level positional information, and through multi-scale feature decoupling, maps defect features to feature channels that represent geometric morphological changes after high-pass filtering and convolution processing, and maps heat-affected zone structural features to feature channels that represent tissue deformation trends after low-pass filtering and gradient calculation processing.

[0017] Preferably, the dual-domain feature cross-layer anchoring fusion mechanism specifically includes: extracting deep semantic feature maps from the feature encoding layer of the contour reconstruction network, and statistically analyzing the mean and standard deviation of the global activation response intensity of the deep semantic feature maps; based on the mean and standard deviation, determining a preset threshold using the adaptive maximum inter-class variance method, identifying salient regions in the deep semantic feature maps where the activation response intensity is greater than the preset threshold, and calculating the geometric centroid of the salient regions; setting the geometric centroid as a spatial semantic anchor point, and projecting it onto the spatial feature map corresponding to the feature decoding layer through coordinate mapping logic to obtain the projected coordinates; using the projected coordinate points as the center, delineating based on prior knowledge of defect size... A fixed-step local interest neighborhood is defined. In the spatial domain, bilinear interpolation is used to align defect features with heat-affected zone structural features in the pixel coordinate system. In the frequency domain, discrete cosine transform is used to extract texture information. The texture information is introduced into the local interest neighborhood as a boundary constraint signal to correct edge position offsets. Centered on the spatial semantic anchor point, the boundary constraint signal is used to perform weighted fusion of the category attributes of deep semantic features and the geometric structure of the spatial feature map. The edge signal in the frequency domain is used as an anchor point to constrain the contour generation in the spatial domain. The resulting defect contour and heat-affected zone boundary with consistent spatial topology and aligned edge pixels are output and encapsulated according to XML specifications to generate a defect topology dataset.

[0018] Preferably, the activation of the multi-dimensional collaborative attention mechanism specifically includes: calculating the non-local response values ​​between pixels using a spatial dimension sliding window to generate a spatial attention mask; extracting physical risk correlation terms from historical airtightness test data of failed components, wherein the physical risk correlation terms include a defect depth continuity factor and a width abrupt change slope characterizing the probability of airtightness failure; inputting the initial feature map generated by the contour reconstruction network during feature extraction into the global statistical branch, and generating a channel description vector through pooling operations; using the physical risk correlation terms as bias factors, fusing and mapping the channel description vector and the physical risk correlation terms using a multilayer perceptron to calculate a dynamic weight distribution, and performing normalization processing through an activation function to generate channel weights; performing element-wise multiplication of the spatial attention mask and the channel weights to obtain a weight distribution matrix; and generating enhanced defect features and heat-affected zone structural features by performing element-wise multiplication of the weight distribution matrix with defect features and heat-affected zone structural features.

[0019] Preferably, the construction of the sealing mechanism quantitative characterization set specifically includes: extracting the Euclidean distance between the defect contour and the boundary of the heat-affected zone from the defect topology dataset; extracting the geometric features of the indentation edge and the evolution pattern of the oxidation region of the weld nugget region from the preprocessed image to obtain the indentation oxidation features; comparing the image displacement fields before and after welding using a digital image correlation algorithm to calculate the morphological distortion tensor caused by the welding thermal cycle; and aligning the Euclidean distance, the morphological distortion tensor, and the indentation oxidation features in terms of spatiotemporal dimensions, and then concatenating them into vectors according to a preset topological order to generate the sealing mechanism quantitative characterization set.

[0020] Preferably, the process by which the performance index mapping diagnostic tool performs a regression mapping between image features and the airtightness index to obtain a quantitatively correlated judgment result includes: using a multilayer perceptron as a regression engine, using regularization constraints to process the quantitative representation set of sealing mechanisms, generating a predicted leakage rate value, and generating a quantitative correlation between image features and the airtightness index; when the leakage rate is determined to be excessive, calculating the gradient of the predicted value relative to the convolutional feature map to generate an interpretive heatmap; using the high-brightness energy distribution of the interpretive heatmap to distinguish the failure mechanism and generate a judgment result; when the high-brightness area covers the heat-affected zone, it is determined to be a microstructure failure caused by excessive heat input.

[0021] Preferably, the generation of full-process quality traceability data specifically includes: constructing a unified data structure containing box ID, timestamp, welding current and voltage parameters, and visual inspection results; using multi-scale feature decomposition based on Laplacian pyramid and downsampling algorithm based on signed distance field to perform lossy compression processing on the reconstructed defect topology dataset while preserving geometric feature gradients, and storing it as a core traceability attachment; binding the predicted airtightness index of the box with the actual welding process parameter execution data to generate full-process quality traceability data.

[0022] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0023] 1. This invention introduces discrete cosine transform texture information in the frequency domain as a boundary constraint signal on the basis of spatial domain pixel alignment through a dual-domain feature cross-layer anchoring fusion mechanism. This mechanism solves the problem of edge position offset and detail loss caused by feature downsampling in traditional convolutional neural networks, and can correct defect contours and thermally affected area boundaries, thus overcoming the limitation of existing technologies that can only perform qualitative or rough geometric descriptions.

[0024] 2. This invention breaks through the traditional visual inspection stage, which only focuses on identifying the shape of defects. By extracting key parameters such as depth continuity factor, width abrupt change slope and morphological distortion tensor, a quantitative characterization set of sealing mechanism is constructed. Combined with the regression mapping process of the performance index mapping diagnostic tool, the prediction of the measured physical air tightness index from multi-dimensional image features is realized, filling the technical gap in the industry where the sealing level of welds cannot be directly quantitatively evaluated through image features.

[0025] 3. This invention innovatively introduces a risk correlation term containing physical mechanisms as a bias factor in the attention mechanism; this design enables the algorithm not only to learn image statistical features, but also to understand the logic of welding physical failure, and can guide the model to prioritize enhancing the feature response of airtightness sensitive areas; combined with adaptive contrast enhancement preprocessing, it reduces the risk of false detection and false detection caused by complex working conditions such as welding spatter and metal reflection.

[0026] 4. This invention effectively optimizes the precision online evaluation and full-process digital traceability system for the quality of weld seams in power battery boxes. By achieving sub-pixel-level topological reconstruction of weld seam micro-defects and quantitative prediction of physical airtightness through dual-domain collaboration, it significantly enhances the anti-interference capability and physical interpretability of image feature extraction under complex industrial conditions, providing solid technical support for ensuring the safety and integrity of core components of new energy vehicles and improving the production efficiency of large-scale manufacturing. Attached Figure Description

[0027] Fig. 1 This is a schematic flowchart of a method for detecting surface defects in the weld seams of a battery pack housing based on machine vision, according to the present invention.

[0028] Fig. 2 This is a schematic diagram of the cross-layer anchoring and fusion mechanism for dual-domain features of the present invention;

[0029] Fig. 3 This is a schematic diagram of the performance index mapping diagnostic tool of the present invention. Detailed Implementation

[0030] The technical solution of the present invention will be further described below with reference to the accompanying drawings. It should be noted that the embodiments listed in the text are only typical examples of the concept of the present invention and should not be regarded as an exhaustive list of the scope of the present invention. All equivalent transformation schemes deduced by those skilled in the art based on the disclosed content without departing from the essential concept of the present invention should be covered within the protection scope of the present invention.

[0031] Please see Figs. 1 to 3 This invention provides a machine vision-based method for detecting surface defects in weld seams of battery pack housings, the technical solution of which is as follows:

[0032] A machine vision-based method for detecting surface defects in weld seams of battery pack housings, the specific process of which is as follows: Fig. 1 As shown, it includes:

[0033] Original images of the weld seams of battery pack housings of different specifications are acquired, and adaptive contrast enhancement and noise suppression preprocessing are performed to obtain preprocessed images.

[0034] The preprocessed image is input into a contour reconstruction network for feature extraction to obtain defect features and heat-affected zone structural features.

[0035] In the feature encoding and feature decoding layers of the contour reconstruction network, a multi-dimensional collaborative attention mechanism is activated to enhance the defect features and the structural features of the heat-affected zone;

[0036] The dual-domain feature cross-layer anchoring fusion mechanism of the contour reconstruction network is used to fuse the enhanced defect features and heat-affected zone structural features, reconstruct the defect contour and heat-affected zone boundary, and encapsulate them according to the XML specification to generate a defect topology dataset.

[0037] Based on the aforementioned defect topology dataset, a quantitative characterization set of sealing mechanism is automatically extracted and constructed using a digital image correlation algorithm;

[0038] The quantitative characterization set of the sealing mechanism is input into the performance index mapping diagnostic tool, and a regression mapping between image features and measured physical air tightness index is performed to obtain the judgment result.

[0039] The judgment results, the quantitative characterization set of sealing mechanism, and the defect topology dataset are bound together to generate full-process quality traceability data.

[0040] Example 1:

[0041] This embodiment uses the automated inspection of aluminum alloy housing production lines for new energy vehicle power battery packs as an application scenario. Addressing the industrial demands of high reflectivity, complex weld morphology, and the co-production of multiple product specifications on the same line, this embodiment integrates high-resolution imaging into the end effector of a six-axis robot, combined with an industrial computing platform to perform automated feature extraction, quantitative airtightness assessment, and encrypted traceability of quality data throughout the entire process.

[0042] First, the process of acquiring original images of weld seams adapted to different specifications of battery pack housings and obtaining preprocessed images includes: acquiring the welding path coordinates of the original images of weld seams adapted to different specifications of battery pack housings; using an industrial camera with a 405 nm blue light source to synchronously acquire the welding path coordinates at a preset grazing angle; stitching together a fused image containing the fusion nugget area, laser weld bead, and friction stir weld bead based on the pixel coordinate system; performing adaptive histogram equalization on the fused image; using median filtering to suppress isolated noise points generated by welding spatter; and outputting a preprocessed image that meets the contrast threshold.

[0043] Specifically, the industrial computing platform establishes real-time communication with the production line control unit via an industrial Ethernet interface; after the battery pack enclosure enters the inspection station, the industrial computing platform pre-acquires the welding path coordinates adapted to the original image of the enclosure of the current specification; when the motion module equipped with a line scan camera or a six-axis robot moves along the welding path coordinates, the industrial computing platform triggers a fixed pulse frequency based on the feedback welding path coordinate signal. A high-resolution line-scan camera and a 405nm blue light pulse source are used. The 405nm blue light source forms a preset grazing angle of 30° to 60° with the camera's optical axis. The camera's preset object-space resolution can be configured to 15 micrometers / pixel, where the object-space resolution is the actual field of view minus the camera's pixel resolution. The fixed pulse frequency is determined based on the ratio between the motion module's feed speed and the preset object-space resolution; a specific value range is recommended. to This allows the acquired fused images to have The aspect ratio is adjusted; a line scan camera is used to synchronously acquire fused images containing the weld nugget area, laser weld bead, and friction stir weld bead according to the welding path coordinates; after acquiring the fused image, the industrial computing platform uses an adaptive histogram equalization algorithm to divide the image into multiple 16×16 local blocks, and calculates the grayscale histogram of each local block; to prevent overfitting noise, a clipping threshold of 0.02 is set, and histogram components exceeding the clipping threshold are redistributed to other grayscale levels; the processed local blocks are re-stitched using bilinear interpolation to achieve adaptive contrast enhancement; subsequently, a median filter with a 5×5 window is used to perform noise suppression on the image, replacing the center point by taking the median of the pixel grayscale values ​​within the 5×5 window to remove isolated bright noise points caused by welding spatter; this process outputs a pre-processed image that meets the preset contrast threshold; the pre-processing method adopts a combination strategy of welding path linkage trigger acquisition and adaptive block enhancement, which is different from the traditional fixed parameter acquisition and global enhancement mode. It obtains dynamic matching trigger parameters of the welding path through linkage with the production line to ensure the quality of multi-specification box weld images. The combination of proportional and high pixel accuracy, along with block equalization (16×16 local blocks + threshold constraint) and targeted median filtering, avoids noise amplification and removes splash noise; effectively solves the problems of poor adaptability, image proportional distortion, insufficient weld contrast and severe noise interference of traditional methods.

[0044] Furthermore, the contour reconstruction network performs feature extraction, specifically including: constructing a symmetric convolutional neural network containing a feature encoding layer and a feature decoding layer; in the feature encoding layer, using residual blocks to extract deep semantic features of the original image to generate defect features; in the feature decoding layer, transposed convolution upsampling the deep semantic feature map output by the feature encoding layer to generate heat-affected zone structural features; a dual-domain feature cross-layer anchoring fusion mechanism introduces low-level positional information, and through multi-scale feature decoupling, maps defect features to feature channels that represent geometric morphological changes after high-pass filtering and convolution processing, and maps heat-affected zone structural features to feature channels that represent tissue deformation trends after low-pass filtering and gradient calculation processing.

[0045] Specifically, the industrial computing platform constructs a symmetric convolutional neural network comprising a feature encoding layer and a feature decoding layer. The feature encoding layer contains five cascaded residual groups, each containing two residual blocks, with the number of channels increasing sequentially to 64, 128, 256, 512, and 1024. The convolutional kernel size is 3×3, and the stride is 2. The feature decoding layer and the feature encoding layer are mirror images of each other. Within the feature encoding layer, multiple cascaded residual blocks are used to perform convolution and downsampling. Each residual block performs an identity mapping, forcing the network to learn... The residual features in the deep semantic features are used to output a deep semantic feature map and preliminary defect features. In the feature decoding layer, the deep semantic feature map is upsampled through transposed convolution, and the feature map is restored to the original image size step by step to generate heat-affected zone structural features. The dual-domain feature cross-layer anchoring fusion mechanism uses cross-layer connections to introduce low-level positional information from the early stage of the coding layer. After the transposed convolutional layer, a 1×1 convolutional layer is used to complete the channel recombination of the upsampled mixed features, and a parallel defect feature extraction branch and heat-affected zone feature extraction branch are constructed. The feature extraction branch introduces multiple sets of dilated convolutions with adjustable dilation rates (e.g., dilation rates of 1, 2, 4) in each branch, cascades sampling points with different spacings, extracts features without downsampling, and maintains a high spatial resolution of 15 micrometers / pixel; the defect feature extraction branch uses a high-pass filter convolution kernel as a high-frequency signal amplifier for the image, eliminates low-frequency interference from the aluminum alloy background, enhances the contrast of discontinuous gray-level abrupt changes such as pinholes and cracks, and maps the defect features to the feature channels after high-pass filter convolution processing that characterize geometric morphological abrupt changes; the heat-affected zone feature extraction branch uses a low-pass smoothing convolution kernel to filter out isolated noise points and sharp texture edges, preserves the overall gray-level evolution trend of the image, calculates the boundary line where the second derivative of the gray level after low-pass processing crosses zero, locks the physical critical point where the metal phase transformation and color gradient change caused by welding thermal cycling are most drastic, delineates the physical boundary line between the heat-affected zone and the base material, and maps the structural features of the heat-affected zone to the feature channels after low-pass filtering and gradient calculation processing that characterize the trend of microstructure deformation.

[0046] This decoupling process provides target guidance for subsequent cross-layer anchoring fusion of dual-domain anchored features, eliminates the interference of complex textures in the heat-affected zone on centroid recognition, and provides pure feature input for the quantitative characterization of sealing mechanisms. It avoids distance calculation deviations caused by feature adhesion in traditional algorithms and improves the reliability of airtightness risk quantification indicators.

[0047] Furthermore, the activation of the multi-dimensional collaborative attention mechanism specifically includes: calculating the non-local response values ​​between pixels using a spatial dimension sliding window to generate a spatial attention mask; extracting physical risk correlation terms from historical airtightness test data of failed components, wherein the physical risk correlation terms include a defect depth continuity factor and a width abrupt change slope characterizing the probability of airtightness failure; inputting the initial feature map generated by the contour reconstruction network during feature extraction into the global statistical branch, and generating a channel description vector through pooling operations; using the physical risk correlation terms as bias factors, fusing and mapping the channel description vectors and physical risk correlation terms using a multilayer perceptron to calculate a dynamic weight distribution, and performing normalization processing through an activation function to generate channel weights; performing element-wise multiplication of the spatial attention mask and the channel weights to obtain a weight distribution matrix; and generating enhanced defect features and heat-affected zone structural features by performing element-wise multiplication of the weight distribution matrix with defect features and heat-affected zone structural features.

[0048] Specifically, the industrial computing platform defines a dimension of [size missing] on the feature map. The search window calculates the dot product similarity between the current center pixel and all neighboring pixels within the window; the feature values ​​of each pixel in the neighborhood are multiplied by their corresponding similarity weights and then summed to generate spatial attention masks by creating spatial association responses between discrete pixels with similar geometric properties; physical risk correlation terms are extracted from historical airtightness test data of failed components; in this embodiment, the physical risk correlation terms include the defect depth continuity factor and width abrupt change slope characterizing the probability of airtightness failure. The acquisition process is as follows: using the principle of shadow shape recovery, based on the preset grazing angle of a 405 nm blue light source, and using a von Neumann reflection model modified for highly reflective metal surfaces, pixel grayscale values ​​are established. With surface normal vector The mapping relationship is used to reconstruct the relative depth field by solving the surface normal vector using the integral formula.

[0049] The specific formula for calculating the mapping relationship is as follows:

[0050] ;

[0051] in The direction vector of the light source. The line-of-sight vector. For the ideal reflection vector, The diffuse reflectance coefficient is... The specular reflection coefficient, This is the gloss factor.

[0052] The defect region is scanned in layers using a geometric feature algorithm, a depth variation curve is fitted, and the ratio of the length of a continuous depth segment to the total depth of the defect is calculated to obtain the depth continuity factor. Curve fitting is performed on the defect edge contour to construct a smooth edge curve equation and solve its first derivative. The maximum abrupt change in slope value is statistically analyzed and determined as the width abrupt change slope. The deep semantic feature map generated by the contour reconstruction network during feature extraction is used as the initial feature map and input into the global statistics branch. In the global statistics branch, the industrial computing platform performs a global average pooling operation on the initial feature map along the channel dimension to generate a channel description vector representing the global information of the feature map.

[0053] Before inputting into the multilayer perceptron, the industrial computing platform processes the physical risk term using standardized scores to align it with the magnitude of the channel vector. The industrial computing platform concatenates the channel description vector with the physical risk associated term and inputs it as a joint feature vector into the input layer of the multilayer perceptron. Using the three hidden layers of the multilayer perceptron (with 128, 64, and 32 neurons respectively), a dynamic optimization process of nonlinear mapping is performed on the joint feature vector, generating a set of dynamic weight distribution vectors consistent with the dimension of the feature channels through the output layer. The dynamic weight distribution vector is normalized using an activation function, and the preset physical prior logic of "high failure risk corresponds to high local contrast and high grayscale deviation" is used as a bias constraint to map and generate channel weights. In this process, the channel weights carrying high airtightness risk features (such as potential penetration defects with continuous low grayscale gradients) are increased to above 0.9. The spatial attention mask is multiplied element-wise with the calculated dynamic channel weights to generate a weight distribution matrix. The weight distribution matrix is ​​then multiplied element-wise with the defect features and the thermally affected zone structural features to generate enhanced defect features and thermally affected zone structural features.

[0054] Activate a multi-dimensional collaborative attention mechanism to classify, extract, and target the features of subtle weld defects and macroscopic heat-affected zones.

[0055] The multi-dimensional collaborative attention mechanism is as follows: In the spatial dimension, the nonlocal response of the sliding window is used to establish a long-range association between defects and structures; in the channel dimension, physical risk association terms are used as prior logic, and weights are assigned to channels carrying high airtightness risk characteristics through dynamic optimization of multilayer perceptrons; through the superposition and mapping of spatial attention mask and dynamic weights, enhanced features filtered by physical mechanisms are output, and enhanced defect features and thermally affected zone structural features are generated.

[0056] The introduction of physical risk correlation terms allows the algorithm to prioritize small but continuous defects that are highly likely to cause leaks, deeply coupling experience with data; the spatial attention mask automatically filters out metal reflections or tooling scratches unrelated to the weld based on similarity, reducing the false alarm rate of defect detection.

[0057] Furthermore, the dual-domain feature cross-layer anchoring fusion mechanism specifically includes: extracting deep semantic feature maps from the feature encoding layer of the contour reconstruction network, and statistically analyzing the mean and standard deviation of the global activation response intensity of the deep semantic feature maps; based on the mean and standard deviation, determining a preset threshold using the adaptive maximum inter-class variance method, identifying salient regions in the deep semantic feature maps where the activation response intensity is greater than the preset threshold, and calculating the geometric centroid of the salient regions; setting the geometric centroid as a spatial semantic anchor point, and projecting it onto the spatial feature map corresponding to the feature decoding layer through coordinate mapping logic to obtain the projected coordinates; using the projected coordinate points as the center, delineating a fixed... The process involves defining a local interest neighborhood with a step size; aligning defect features and heat-affected zone structural features in the pixel coordinate system using bilinear interpolation in the spatial domain; extracting texture information using discrete cosine transform in the frequency domain; introducing this texture information as a boundary constraint signal into the local interest neighborhood to correct edge position offsets; using the spatial semantic anchor point as the center, weighted fusion of the category attributes of deep semantic features and the geometric structure of the spatial feature map using the boundary constraint signal; using the edge signal in the frequency domain as an anchor point to constrain the contour generation in the spatial domain; outputting a defect contour and heat-affected zone boundary with consistent spatial topology and aligned edge pixels, and encapsulating it according to XML specifications to generate a defect topology dataset; the specific process is as follows... Fig. 2 As shown.

[0058] Specifically, deep semantic feature maps are extracted from the feature encoding layer. Because the feature encoding layer reduces image resolution during downsampling, the size of the deep semantic feature map is much smaller than the original preprocessed image. The industrial computing platform performs feature reconstruction and alignment in the spatial and frequency domains. In the spatial domain, a bilinear interpolation algorithm is used to find the four nearest neighbor known pixels around the pixel to be sampled in the feature map. A weighted average is calculated based on the horizontal and vertical distances between the current point and these four points. This results in a smooth enlargement of the image size in the feature decoding layer, aligning the defect features with the thermally affected area structural features in the pixel coordinate system. Finally, saliency analysis is used to statistically analyze the entire deep semantic feature map. The mean and standard deviation of the local activation response intensity are calculated. Based on these mean and standard deviation, the adaptive maximum inter-class variance method is used to find the gray level that maximizes the inter-class variance between the salient region and the background region as the segmentation threshold, and a preset threshold is determined. Salient regions with activation response intensity greater than this threshold are identified in the deep semantic feature map. The geometric centroid of the salient region is calculated using the Gaussian weighted centroid method, and this geometric centroid is set as the spatial semantic anchor point. The spatial semantic anchor point is projected onto the spatial feature map corresponding to the feature decoding layer through coordinate mapping logic, and a fixed area is defined centered on the projected coordinate point based on prior knowledge of defect size (e.g., the diameter of laser welding pinholes is usually ≤2mm). A local interest neighborhood with a step size (e.g., a 64×64 pixel neighborhood) is defined. Texture information is extracted in the frequency domain using discrete cosine transform (DCT). This texture information is then introduced into the neighborhood as a boundary constraint signal to correct edge position drift caused by convolutional downsampling. An industrial computing platform extracts feature sub-images corresponding to the local interest neighborhood, divides them into blocks of a preset size (or blocks after zero-padding), and for each block's pixel grayscale matrix, calculates the weighted product of cosine basis functions at different frequencies and pixel grayscale distributions to obtain a two-dimensional discrete cosine transform coefficient matrix containing a DC component representing the average grayscale level and an AC component representing grayscale changes. Finally, a preset frequency threshold is used to filter the two-dimensional discrete cosine transform coefficients. The cosine transform coefficient matrix retains the high-order AC components representing texture abrupt changes, i.e., the high-frequency coefficient matrix. Finally, an inverse discrete cosine transform is performed on the retained high-frequency coefficient matrix to map it back to the spatial domain, obtaining the high-frequency texture signal. The industrial computing platform uses this high-frequency texture signal as a reference skeleton and compares it with the blurred boundary reconstructed in the spatial domain. Because feature downsampling causes a "smoothing effect" on edges (i.e., originally sharp boundaries become blurred and the center shifts), the algorithm performs edge search within the local interest neighborhood: starting from the spatial semantic anchor point, it performs an extremum search along the local gradient normal direction, determining the pixel with the largest gradient magnitude as the spatial domain edge point, thus obtaining the coordinates of the spatial domain edge point. Extract the point where the high-frequency texture signal intersects the normal direction and has the strongest energy response as the corresponding frequency domain texture abrupt change point, and obtain the coordinates of the frequency domain texture abrupt change point, i.e. Subtract the coordinates of the spatial domain edge points from the coordinates of the frequency domain texture abrupt change points, i.e. This yields a positional deviation vector. Using this vector as a compensation parameter, reverse translation and sharpening corrections are performed on the contour pixel coordinates, forcibly fitting the reconstructed boundary to the physical edge reflected by the frequency domain signal, thus obtaining the corrected feature map. The corrected feature map is then passed through the output layer (typically...). A 1×1 convolutional layer with a type activation function maps the probability value of each pixel belonging to a "defect" or "heat-affected zone" to a binary mask of 0 or 1. The region with a pixel value of 1 corresponds to the target region of the defect contour or the boundary of the heat-affected zone, and the region with a pixel value of 0 corresponds to the non-target background region. After generating the binary mask, the connected component constraint logic ensures that the spatial distribution of the defect contour and the boundary of the heat-affected zone conforms to the inherent properties of the real physical form. That is, the defect contour must maintain a closed, continuous and unbroken, discrete geometric structure, and the boundary of the heat-affected zone must maintain a smooth and continuous distribution around both sides of the weld, without misalignment or isolated breaks. The two do not overlap in spatial position, the boundary is clearly defined, and their spatial connection relationship and relative position relationship are consistent with the actual physical structure of the weld. The output shows the defect contour and the boundary of the heat-affected zone with consistent spatial topology and aligned edge pixels.

[0059] The connected component constraint logic refers to the algorithm logic for performing connectivity analysis and rule constraints on target regions (defect regions, heat-affected zones) with a pixel value of 1 in the binarized mask. Its core is to filter out connected regions that meet the conditions of "continuous without breaks, no isolated discrete pixels, and overall domain" by determining the connectivity relationship between adjacent pixels (usually using 4-neighborhood or 8-neighborhood determination rules. 4-neighborhood means judging the adjacent pixels in the four directions of up, down, left, and right of the target pixel, and 8-neighborhood means additionally including adjacent pixels in the four diagonal directions). At the same time, isolated noise pixel clusters and broken fragmented pixel blocks with an area smaller than a preset threshold are removed. Morphological processing (such as dilation and erosion) is also used to repair the small breaks in the target region. Finally, it is ensured that the defect region forms a closed and continuous single or multiple independent connected components, and the heat-affected zone forms a continuous connected component around the weld bead. The connection form of the two is consistent with the topological relationship of the actual physical structure of the weld, avoiding topological anomalies that contradict the real welding scenario (such as fragmentation of the defect contour, breakage or misalignment of the heat-affected zone boundary, etc.).

[0060] The industrial computing platform automatically extracts standardized data fields (including field names, data types, and precision formats) corresponding to the geometric parameters (including the centroid coordinates of defects, the maximum major axis of defects, the diameter of the envelope circle of defects, and the average width of the heat-affected zone boundary) from the binarized mask. Then, it maps and fills in each extracted geometric parameter according to the preset data fields, performs format verification on the data to ensure that the coordinates are numerical and the dimensional parameters conform to the physical range, and then proceeds according to... Standardize the generation of nodes containing root nodes, parameter child nodes, and attribute identifiers. The parameter data can be written to the database table in a file or according to a structured database table structure (with a one-to-one correspondence between preset fields and table fields), while adding a unique identifier (associated box) to the file / data table. (Detection timestamp), complete the transformation and encapsulation of geometric parameters into standardized data carriers, and finally form a defect topology dataset.

[0061] We introduce a feature collaborative correction logic with spatial and frequency domain dimensions, and utilize sub-pixel level connected component morphological constraints to solve the edge offset and topological distortion caused by spatial information loss during the downsampling process of deep learning models.

[0062] The dual-domain feature cross-layer anchoring fusion mechanism utilizes bilinear interpolation to align deep semantics with high-resolution location features at the pixel level. It uses the Gaussian weighted centroid method to identify the geometric centroid of defects as spatial semantic anchor points, introducing high-frequency texture signals extracted via discrete cosine transform as physical boundary skeletons within the local interest neighborhood. By comparing the deviation between the spatially blurred boundary and the frequency domain texture abrupt change points, the algorithm performs reverse translation and sharpening corrections to ensure the reconstructed boundary conforms to the real physical edge. It uses connected component constraint logic to perform morphological processing on the binarized mask, removing discrete noise and repairing minor fractures. The industrial computing platform extracts the geometric parameters from the binarized mask, maps them according to standardized fields, and encapsulates them according to XML specifications to generate a defect topology dataset.

[0063] By introducing high-frequency signals in the frequency domain as physical hard constraints, the edge blurring and position drift caused by the loss of spatial information during deep learning downsampling are corrected, and the boundary positioning error is compressed to the sub-pixel level, providing a high-precision geometric benchmark for subsequent airtightness quantification. By utilizing connected component constraint logic, metal reflective noise in industrial environments is automatically removed and minor fractures are repaired, ensuring that the reconstructed defect topology dataset strictly conforms to the true physical properties of continuity, closure, and non-overlapping, reducing false alarms in the algorithm. The XML specification encapsulation mechanism transforms unstructured complex image topology information into digital indicators in a unified format, realizing a lossless mapping from pixel layers to structured data, providing a high-quality and interpretable data source for subsequent airtightness index regression.

[0064] Further, the construction of the sealing mechanism quantitative characterization set specifically includes: extracting the Euclidean distance between the defect contour and the heat-affected zone boundary from the defect topology dataset; extracting the geometric features of the indentation edge and the evolution pattern of the oxidation region of the weld nugget region from the preprocessed image to obtain the indentation oxidation features; comparing the image displacement fields before and after welding using a digital image correlation algorithm to calculate the morphological distortion tensor caused by the welding thermal cycle; aligning the Euclidean distance, morphological distortion tensor, and indentation oxidation features in terms of spatiotemporal dimensions, and then concatenating them into vectors according to a preset topological order to generate the sealing mechanism quantitative characterization set; the performance indicators The process by which the mapping diagnostic tool performs a regression mapping between image features and the airtightness index to obtain a quantitatively correlated judgment result includes: using a multilayer perceptron as the regression engine, processing the quantified representation set of sealing mechanisms using regularization constraints, generating a predicted leakage rate value, and establishing a quantitative correlation between image features and the airtightness index; when the leakage rate is determined to be excessive, calculating the gradient of the predicted value relative to the convolutional feature map to generate an interpretive heatmap; using the high-brightness energy distribution of the interpretive heatmap to distinguish failure mechanisms and generate a judgment result; when the high-brightness area covers the heat-affected zone, it is determined to be a microstructural failure caused by excessive heat input, as detailed in the following steps. Fig. 3 As shown.

[0065] Specifically, based on obtaining the defect depth continuity factor and width abrupt change slope, the industrial computing platform first locks the connected domain range of the defect region from the binary mask corresponding to the defect topology dataset; using the principle of shadow shape recovery, based on the preset grazing angle of the 405 nm blue light source, it establishes a mapping relationship between pixel grayscale values ​​and surface normal vectors based on the Von Leigh reflection model; by performing spatial integration on the calculated surface normal vectors, the grayscale field is discretized into a relative depth field; the defect region is scanned layer by layer using a geometric feature algorithm to obtain pixel grayscale distribution information at different depth levels, and a depth change curve is fitted based on this distribution information. The continuity parameter of the curve is calculated (continuity = length of continuous depth segment / total defect depth). This parameter is defined as a depth continuity factor characterizing whether a defect is continuous (a continuity ≥ 0.8 indicates a high-risk continuous defect, while a continuity < 0.8 indicates a discontinuous defect). For the defect edge contour, a polynomial fitting algorithm is used to fit the contour pixel coordinates to obtain a smooth curve equation for the defect edge. The slope value at each point of the curve is obtained by solving the first derivative of this equation, and the abrupt change in slope value is statistically analyzed. The maximum abrupt change amplitude is defined as the width abrupt change slope, reflecting the degree of abrupt change in defect width. Simultaneously, all pixels on the defect boundary are traversed, and the straight-line distance between each pixel on the defect boundary and each pixel on the heat-affected zone boundary is calculated. The minimum value is selected from all calculated distance values ​​and determined as the minimum distance between the defect and the heat-affected zone boundary. The Euclidean distance of the heat-affected zone boundary; simultaneously, in the pre-processed image, the industrial computing platform performs threshold filtering based on the grayscale characteristics of the melt core region (the grayscale value of the melt core region is higher than that of the base material and the heat-affected zone) to locate the spatial range of the melt core region; the Cannibal edge detection algorithm is used to extract the edges of the melt core region, and by setting high and low thresholds (high threshold is used to locate strong edges, and low threshold is used to connect weak edges), the complete contour curve of the indentation edge is obtained. The actual length of the contour curve is further calculated using the arc length integral algorithm, and the curvature of each point on the curve is calculated using the curvature formula to obtain the curvature distribution. Based on the aforementioned Von's reflection model, the physical properties of the indentation are inferred by calculating the attenuation amplitude of the pixel grayscale value relative to the reference grayscale value and the compensation of the specular highlight component. The indentation depth is calculated, and the root mean square value of the deviation between the contour curve and the fitted straight line is used to characterize the edge smoothness. Integrating the above parameters, the geometric features of the indentation edge in the molten core region are obtained. At the same time, the preprocessed image is converted from the RGB color space to the HSV color space. Using the difference between the hue and saturation features of the oxidized region and the non-oxidized region in the HSV space, an adaptive threshold is set to perform threshold segmentation of the molten core region to identify the oxidized region. The number of pixels in the oxidized region is calculated through connected component analysis and converted into the actual area. The minimum bounding rectangle is fitted to obtain the geometry of the oxidized region. The spatial distribution range of the oxidized region is determined by coordinate statistics. The gray-level gradient change law of the oxidized region is calculated by gray-level gradient operators (such as the Sobel operator), and the evolution pattern of the oxidized region is summarized.The industrial computing platform performs image registration preprocessing on the pre-acquired original image of the corresponding area of ​​the battery pack casing weld before welding and the target image after welding: using the original image as a reference, feature points of the two images are extracted using a scale-invariant feature transformation algorithm, feature point matching is performed using a fast nearest neighbor search packet matcher, mismatched points are eliminated using a random sampling consensus algorithm, the transformation matrix is ​​solved, and geometric correction is performed on the target image to ensure that the spatial coordinate systems of the two images are completely aligned; subsequently, pixel-level matching is performed on the registered two images using a digital image correlation algorithm: the original image and the target image are divided into several non-overlapping square sub-regions (the size of the sub-region is set to 15×15 pixels), and each sub-region... Using the grayscale distribution as a feature template, within the corresponding search window of the target image, the correlation between the template and each sub-region within the search window is calculated using zero-mean normalized cross-correlation coefficients. The sub-region corresponding to the maximum correlation value is found as the matching result, thus obtaining the three-dimensional displacement field of pixels in the base material region surrounding the weld. By calculating the spatial coordinate difference of corresponding feature points before and after welding, a displacement vector describing the material flow trend is established. Using an interpolation algorithm combined with the material continuity of the base material and the weld, the equivalent strain distribution in the weld center region is calculated. Furthermore, based on this displacement field data, a Jacobian matrix of the displacement vector to spatial coordinates is established to construct the Cauchy strain tensor, thereby obtaining the degree and trend of material deformation during welding.

[0066] Using the displacement field and strain distribution obtained from digital image correlation algorithm analysis as the core input, the industrial computing platform combines the material property parameters of the weld area (such as the elastic modulus of aluminum alloy) Poisson's ratio Based on the finite element theory, a geometric deformation model of the weld region is established, the weld region is discretized into several unit cells, and the pixel-level displacement field extracted by the digital image correlation algorithm is used as a forced displacement boundary condition to be applied to the nodes of each unit cell. Through tensor decomposition algorithms (such as spectral decomposition), the strain tensor corresponding to the overall morphological distortion in three-dimensional space is decomposed into principal strain components, and then independent deformation components such as tensile deformation components (normal strain greater than 0), compressive deformation components (normal strain less than 0), and shear deformation components (shear strain non-zero) are identified. A second-order tensor capable of comprehensively characterizing the overall deformation degree and direction is constructed, generating a morphological distortion tensor. Following the order of depth continuity factor, width abrupt change slope, Euclidean distance, indentation edge geometric parameters, oxidation region evolution parameters, and morphological distortion tensor components, a quantitative characterization set of the sealing mechanism is obtained. The industrial computing platform, through a standardized transmission control protocol / Internet Protocol data interface, transmits the structured data (in words) of the quantitative characterization set of the sealing mechanism. The format encapsulation) is passed to the performance index mapping diagnostic tool; the input multi-dimensional physical index data is preprocessed by normalization, and the deviation standardization method is used to map each index to a preset uniform numerical range (e.g., After normalization preprocessing, the multidimensional physical indicators are processed by a multilayer perceptron with L2 regularization constraints (penalty coefficient set to 0.001) built into the performance indicator mapping diagnostic tool: the input layer neurons receive the standardized multidimensional physical indicator data, and perform layer-by-layer nonlinear transformation through the activation function of the hidden layer (using a linear rectified function), while simultaneously... Regularization suppresses model overfitting, and the weight parameters of each layer of neurons are optimized through backpropagation algorithm (such as adaptive moment estimation optimizer). Finally, the output layer (1 neuron) outputs the one-dimensional physical leakage rate prediction value corresponding to the weld sealing state, and completes the regression mapping from multi-dimensional image features to one-dimensional physical leakage rate, so as to obtain the judgment result of whether the weld airtightness meets the standard (if the leakage rate ≤ preset threshold, it is judged as qualified, otherwise it is unqualified).

[0067] Specifically, the preset threshold for the final determination is set based on the industry standard for power battery pack housings and offline pressure decay calibration experiments; a sample set with known leakage rates is collected, the leakage rates being measured using a helium leak detector or pressure decay meter; the measured leakage rates are fitted with the visual regression output values ​​using the least squares method to establish the mapping deviation compensation coefficient; and the maximum allowable leakage rate required by the battery pack design manual is used, for example: Permissible leakage rate under pressure or pressure drop A preset threshold is set; if the leakage rate is within the preset threshold, it is considered qualified; if the leakage rate is greater than the preset threshold, it is considered excessive; when the leakage rate output by the multilayer sensor exceeds the standard, the gradient weights are backpropagated and mapped to the last convolutional layer of the preceding contour reconstruction network to generate a corresponding interpretive heatmap; if the high-brightness energy of the interpretive heatmap is concentrated in the heat-affected zone, the judgment result is output to the display.

[0068] By constructing a regression mapping between a quantitative representation set of sealing mechanisms and regularization constraints, the problem of the lack of quantitative correlation between image features and physical airtightness index is solved.

[0069] The steps for constructing and regressing the quantitative characterization set of the sealing mechanism are as follows: By integrating core features such as the continuity of defect depth and abrupt changes in width, geometric features of the indentation edge in the melt core region, oxidation evolution mode, and digital image correlation algorithm analysis, combined with multi-dimensional physical indicators such as the welding thermal cycle morphology distortion tensor quantified by finite element theory, a quantitative characterization set that comprehensively reflects the sealing mechanism is constructed; the difference in dimensions of multiple indicators is eliminated by the deviation standardization method, and a multilayer perceptron with L2 regularization constraint is used to complete the regression mapping from multi-dimensional features to one-dimensional leakage rate, quantitatively predicting the weld airtightness; a fault mechanism source tracing mechanism is introduced, and when the leakage rate exceeds the standard, an interpretive heat map is generated by the gradient of the convolutional feature map, and the root cause of failure is located based on the high-brightness energy distribution; the extraction, calculation, and quantitative integration of all physical indicators are fully automated.

[0070] The proposed sealing mechanism quantitative characterization set construction and regression mapping diagnostic scheme breaks through the limitations of traditional defect detection, which only extracts a single geometric feature and cannot correlate it with the airtightness index. It avoids the measurement error caused by manual intervention and the inconsistency with the standard. It solves the drawbacks of traditional manual or semi-automatic detection, such as low efficiency, strong subjectivity and poor data reliability, and is suitable for the high-efficiency detection needs of industrial-scale production.

[0071] Furthermore, the judgment results, the quantitative characterization set of sealing mechanisms, and the defect topology dataset are data-bound to generate full-process quality traceability data. The specific process includes:

[0072] The industrial computing platform first performs a multi-scale feature decomposition operation based on the Laplacian pyramid on the binarized mask feature map corresponding to the defect topology dataset: Gaussian filtering is then applied to the binarized mask feature map corresponding to the defect topology dataset (using a 5×5 Gaussian kernel, standard deviation...). Set to 1.0), the first-level Gaussian blur map is obtained; the original feature map is subtracted from the Gaussian blur map to obtain the first-level high-frequency detail residual (representing key detail information such as defect edges and boundary gradients); then, using the first-level Gaussian blur map as input, the above Gaussian filtering and interpolation operation are repeated to generate the second to fourth levels of Gaussian blur maps and high-frequency detail residuals in sequence, where the fourth-level Gaussian blur map is the low-frequency global map (representing the overall spatial distribution trend of defects), completing the multi-scale feature decomposition; for the high-fidelity geometric information that needs to be retained after decomposition (focusing on the gradient features of defect contour boundaries and heat-affected zone boundaries), a signed distance field downsampling algorithm is introduced: first, a signed distance field model of the defect topology dataset is constructed, taking the boundary of the target area (defect, heat-affected zone) with a pixel value of 1 in the binarized mask as the reference, the shortest Euclidean distance from each pixel in the image space to the reference boundary is calculated, if the pixel is inside the target area, the distance value is positive, and if it is outside, it is negative, forming a signed distance field matrix; then, the downsampling is performed on this matrix. During the sampling process, the inherent gradient constraint of the signed distance field, where "gradient magnitude is always equal to 1" (i.e., the gradient vector magnitude of any pixel in the distance field is 1), is utilized to filter key pixels in the boundary gradient direction using a gradient projection algorithm. Priority is given to preserving the gradient components of the defect contour and the heat-affected zone boundary. Simultaneously, pixels in non-critical areas are compressed using mean sampling, achieving data reduction while ensuring no loss of core geometric features. Through this compression strategy, a lossy compression ratio of approximately 20:1 is achieved, while still fully preserving key geometric features such as the centroid coordinates, maximum major axis, envelope circle diameter, and average width of the heat-affected zone boundary, with boundary position errors controlled within one pixel. After compression, the industrial computing platform constructs a unified data packet structure: core fields include a unique box ID, a millisecond-level timestamp (based on the clock of the industrial camera trigger acquisition time, accurate to 1ms, formatted as "YYYY-MM-DDHH:MM:SS.XXX"), and real-time welding current data (via the communication interface with the welding power source). The sampling rate is used for acquisition, with each frame of the image corresponding to one set of current values, in units of... (Accuracy is retained to one decimal place), welding voltage data (synchronized with welding current acquisition, unit is...) (Precision retained to one decimal place) and visual diagnostic results (including predicted leakage rate, airtightness pass / fail judgment conclusion, and fault mechanism analysis results); then this unified data package and the compressed defect topology dataset attachment (stored in binary file format, file name "box") are used together. Topology data timestamp. The data is associated and bound together, and the complete bound data is transmitted to the factory computer via the industrial Ethernet interface according to the Transmission Control Protocol / Internet Protocol. After receiving the data, the computer processes it according to the preset database table structure (fields include data). , box The core data packet information (such as timestamps, welding current sequences, welding voltage sequences, diagnostic results, and topology data storage paths) is written into the database; the compressed topology data attachments are stored in the designated server directory, and an index association is established between the database records and the topology data attachment files. Finally, a quality closed-loop traceability data flow with full-link traceability of acquisition, detection, judgment, and storage is generated to ensure that the weld quality data of each battery pack box is queryable, traceable, and retrospectively analyzeable.

[0073] The proposed end-to-end quality traceability data generation scheme employs a combination strategy of Laplace pyramid multi-scale decomposition and signed distance field constraint downsampling. Unlike traditional lossless compression, which suffers from high storage costs and feature loss due to lossy compression, this scheme leverages the inherent property that the magnitude of the signed distance field gradient is always 1. Even at a high compression ratio of 20:1, it retains key geometric features related to airtightness, such as defect boundary gradients, achieving a balance between data simplification and core feature fidelity. Simultaneously, it innovatively constructs a full-dimensional binding mechanism. Unlike the fragmented approach of traditional traceability, which only links basic production information and qualitative judgment results, this mechanism deeply binds and uploads the enclosure ID, millisecond-level timestamps, high-frequency welding current and voltage, and compressed defect topology data to the computer, forming a closed-loop quality data flow with end-to-end traceability. This not only solves the industry pain point of high storage and transmission costs for massive topology data but also fills the technical gap of untraceable quality anomalies and lack of data support for process optimization.

[0074] This embodiment constructs a fully closed-loop inspection architecture for aluminum alloy enclosure welds. Compared to traditional methods that rely solely on geometric judgment or manual sampling, the differentiated approach of this embodiment lies in: firstly, using an adaptive preprocessing unit to dynamically normalize multi-specification images; then, deeply coupling a multi-dimensional collaborative attention mechanism with a dual-domain anchoring fusion mechanism to shift the focus of feature extraction from simple defect classification to boundary sub-pixel reconstruction; this invention does not analyze images in isolation, but obtains morphological distortion tensors through digital image correlation algorithms, and inputs these parameter sets reflecting the sealing mechanism into a regression mapper, thereby transforming traditional visual descriptors into quantifiable airtightness prediction values; furthermore, addressing the difficulty of storing massive topological data in industrial settings, this embodiment achieves lossless feature traceability under high compression ratios through a combination of Laplacian pyramid and signed distance field algorithms. This logic, combining mechanism guidance and data-driven approaches, fills the technical gap in online quantitative analysis of battery pack weld airtightness indices, providing physically interpretable quality evaluation support for battery system production.

[0075] Example 2:

[0076] This embodiment targets battery pack enclosures (such as the side welds of new energy vehicle power battery packs) made of highly reflective aluminum alloy with welds containing complex paths such as arcs / folds. Based on the technical framework of Embodiment 1, it improves the detection accuracy and stability in complex scenarios by optimizing the image acquisition scheme, enhancing the feature anti-interference capability, and adjusting the fusion strategy. Specifically:

[0077] Industrial computing platforms utilize Industrial Ethernet+ The dual bus interface establishes real-time synchronous communication with the production line control unit and the six-axis robot, with communication latency controlled within [specific parameters]. Within; after the battery pack enclosure enters the inspection station, the industrial computing platform obtains the 3D weld path file (including parameters such as the radius of curvature of the arc segment and the included angle of the polyline segment) of the enclosure of the current specification through the production line control unit, and synchronizes the path parameters to the six-axis robot; when equipped with When a six-axis robot equipped with a high-resolution linear scan camera and a dual-light source module (405nm blue pulse light source + 532nm green pulse light source) moves along a three-dimensional weld seam path, the industrial computing platform dynamically adjusts the pulse trigger frequency (with the value range optimized) based on the robot's real-time pose signal (including position coordinates and attitude angle). to The brightness ratio of the dual light sources is 60%-80% blue light and 20%-40% green light. The pulse trigger frequency is dynamically corrected according to the robot's real-time feed speed, preset object resolution (optimized to 12 micrometers / pixel), and path curvature (the trigger frequency of the arc segment is increased by 10%-20%) to ensure that the acquired fused image maintains a 1:1 aspect ratio and uniform pixel accuracy under complex paths. The linear array camera synchronously acquires fused images including the weld nugget area, laser weld bead, friction stir weld bead, and weld transition zone based on the robot's real-time pose signal.

[0078] After acquiring the fused image, the industrial computing platform employs an adaptive multi-scale histogram equalization algorithm: the image is divided into local blocks of two scales, 16×16 and 32×32. High-reflectivity areas (grayscale value ≥ 220) are processed using 16×16 small-scale blocks, while low-grayscale transition areas are processed using 32×32 large-scale blocks. The grayscale histogram of each local block is calculated, and dynamic cropping thresholds are set (0.015 for high-reflectivity areas and 0.025 for transition areas). Histogram components exceeding the thresholds are redistributed to other grayscale levels. The processed local blocks are then processed... The image is re-stitched using bicubic interpolation to achieve adaptive multi-scale contrast enhancement. Subsequently, a directional median filtering algorithm is used to suppress noise in the image: a 5×5 window median filter is used for isolated bright noise points caused by welding spatter; a 3×7 directional window (along the weld path) median filter is used for strip noise caused by high reflectivity. By replacing the center point with the median of the pixel grayscale value in the corresponding window, different types of noise are eliminated. The final output is a pre-processed image that meets the preset contrast threshold (contrast threshold ≥ 0.35) and has a noise suppression rate ≥ 92%.

[0079] Furthermore, the preprocessed image is input into an improved contour reconstruction network for feature extraction to obtain defect features and heat-affected zone structural features with enhanced anti-interference capabilities. The specific process includes:

[0080] The industrial computing platform constructs a symmetric convolutional neural network comprising an improved feature encoding layer and an improved feature decoding layer. In the improved feature encoding layer, concatenated residual blocks with attention mechanisms are used to perform convolution and downsampling, and the identity mapping formula for these attention-based residual blocks is improved. The residual features are then processed by calculating the variance weights of each channel within a 3×3 local region. Weighted adjustments are made to enhance defect feature responses and suppress highly reflective interference features; specifically, input features The residual features are obtained by nonlinear transformation through two 3×3 convolutional layers. Calculated through local channel attention function The weighting coefficients for each channel (weighting coefficient = channel variance / sum of all channel variances) will be used to determine the weighting coefficients for each channel. After multiplying each channel by the weighting coefficients, the result is then connected to the original input via a shortcut. Perform element-wise summation to obtain the output features. This effectively avoids gradient collapse in deep networks while improving the feature's resistance to interference.

[0081] Specifically, the identity mapping formula for the residual block with attention mechanism is improved as follows:

[0082]

[0083] in For local channel attention functions; The input features of the current residual block, The output features are fused through skip connections. These are the deep features obtained by convolution transformation of the residual branches.

[0084] In the improved feature decoding layer, resolution restoration is achieved by transposed convolution on the upsampled feature map. A new multi-scale feature fusion branch is added: the upsampled feature map is fused across layers with feature maps at scales of 1 / 2, 1 / 4, and 1 / 8 in the feature coding layer, respectively. After adjusting the number of channels through a 1×1 convolutional layer, element-wise addition is performed to enhance the correlation of multi-scale defect features. Simultaneously, parallel defect feature extraction and heat-affected zone feature extraction branches are constructed: the defect feature extraction branch uses an improved high-pass filter convolution kernel (introducing a Gaussian weight factor) to strengthen non-continuous gray-scale abrupt features such as pinholes and cracks; the heat-affected zone feature extraction branch uses a Gaussian low-pass filter convolution kernel (standard deviation...). Noise is filtered out, and the grayscale second derivative zero-point localization technology is combined with weld path constraints (searching for the second derivative zero point along the path direction) to delineate the physical boundary between the heat-affected zone and the base material, avoiding boundary misjudgment under complex paths. In addition, dilated convolutions with adjustable expansion rates (expansion rate values ​​of 1, 2, 4, 6) are introduced in each branch. By cascading sampling points with different spacings, while maintaining a high spatial resolution of 12 micrometers / pixel, the capture of microscopic small defects and the localization of macroscopic heat-affected zones are taken into account. Finally, the defect features and heat-affected zone structural features with enhanced anti-interference are output.

[0085] Furthermore, a multi-dimensional collaborative attention mechanism integrating physical priors is activated to enhance defect features and thermally affected zone structural features. The specific execution logic includes:

[0086] In the spatial dimension, a nonlocal response calculation based on the weld path is employed: defining the direction along the weld path on the feature map. In the search window, R is positively correlated with the curvature of the path: when the weld path is an arc segment, R takes a first preset value of 10; when the weld path is a straight segment, R takes a second preset value of 8. The dot product similarity between the current center pixel and the neighboring pixels along the path direction in the window is calculated. Based on the similarity score, the neighborhood features are weighted and aggregated to generate a spatial attention mask, which strengthens the structural correlation between defects and heat-affected zones along the weld path and shields irrelevant interference perpendicular to the path direction (such as tooling scratches).

[0087] In the channel dimension, physical risk correlation terms (including defect depth continuity factor, defect edge sensitivity in high-reflectivity areas, and material thermal conductivity correlation coefficient) adapted to high-reflectivity materials are extracted from the airtightness test data of historical failed components. The channel description vector after global average pooling in the channel dimension is concatenated with the physical risk correlation terms and input as a joint feature vector into a multilayer perceptron with 4 hidden layers. The multilayer perceptron uses the preset physical prior logic that "low gray-level gradient in high-reflectivity areas corresponds to high airtightness risk" as a bias constraint to increase the channel weights carrying high airtightness risk features to above 0.92. Finally, the spatial attention mask is multiplied element-wise with the dynamic channel weights to generate a weight distribution matrix, which is applied to the initial features to output the enhanced features. This attention enhancement mechanism enables the algorithm to prioritize small continuous defects in high-reflectivity backgrounds, reducing the false alarm rate to below 3%.

[0088] Furthermore, by fusing the enhanced features using an improved dual-domain feature cross-layer anchoring fusion mechanism, the defect contours and heat-affected zone boundaries under complex paths are reconstructed, generating a high-precision defect topology dataset. The specific process includes:

[0089] The industrial computing platform uses improved bilinear interpolation in the spatial domain to align defect features with heat-affected zone structural features in the pixel coordinate system. For feature alignment under complex paths, after finding four nearest known pixels around the pixel to be sampled, the weighting coefficients are corrected by combining the curvature parameters of the weld path (the edge pixel weight is increased for arc segments) to ensure alignment accuracy. In the frequency domain, a two-dimensional discrete wavelet transform is used to extract high-frequency signals reflecting weld edge texture (compared to discrete cosine transform, it is more suitable for texture feature extraction under complex paths). The feature sub-images corresponding to the local interest neighborhood are divided into blocks of a preset size. A two-dimensional discrete wavelet transform is performed on each block sub-image to decompose it into low-frequency components and high-frequency components in the horizontal, vertical, and diagonal directions. The high-frequency components in the horizontal and vertical directions (corresponding to weld edge texture) are filtered out by a preset frequency threshold and mapped back to the spatial domain by inverse discrete wavelet transform to obtain high-frequency texture signals.

[0090] In practice, the dual-domain feature cross-layer anchoring fusion mechanism extracts deep semantic feature maps from the improved feature coding layer, identifies the geometric centroid of high-probability defect response regions as spatial semantic anchor points, and projects these anchor points onto the corresponding spatial feature map of the improved feature decoding layer, combining weld path parameters. Using the projected coordinate points as centers, an adaptive local interest neighborhood is defined based on prior knowledge of defect size and path curvature (80×80 pixels for arc segments and 64×64 pixels for straight segments). High-frequency texture signals extracted from the frequency domain are introduced into this neighborhood as boundary constraint signals to correct edge offsets caused by convolutional downsampling. Edge searching and matching along the weld path direction (starting from the spatial semantic anchor point, searching for pixels with the most drastic grayscale gradient changes along the path tangent) improves edge matching accuracy under complex paths. The corrected feature map is then processed... A 1×1 convolutional layer with a type-active function is used to generate a 0-1 binary mask. Then, improved connected component constraint logic (adding weld path consistency verification and removing discrete connected components with an angle >45° to the path direction) optimizes the mask quality, ensuring that the defect contour and heat-affected zone boundary conform to the actual physical shape. Geometric parameters (including the centroid coordinates of the defect, maximum major axis, envelope circle diameter, average width of the heat-affected zone boundary, and offset between the defect and the weld centerline) are extracted from the binary mask, standardized, mapped, and formatted before being processed according to... Standardize packaging and add unique identification (enclosure). (+path segment number+time stamp) to form a defective topology dataset.

[0091] Furthermore, an enhanced sealing mechanism quantitative characterization set is constructed based on the defect topology dataset and input into the optimized performance index mapping diagnostic tool to obtain a judgment result. The specific process includes:

[0092] The industrial computing platform extracts the depth continuity factor, width abrupt change slope, Euclidean distance between the defect and the heat-affected zone boundary, and offset between the defect and the weld centerline from the binary mask corresponding to the defect topology dataset. Simultaneously, in the pre-processed image, the molten core region is located based on its grayscale features and path constraints. The Canney edge detection algorithm (dynamic high and low thresholds, high threshold of 180 for highly reflective areas, and high threshold of 160 for transition areas) is used to extract the indentation edge contour, calculating the contour's curvature distribution, actual length, indentation depth, and edge smoothness. Multi-color space conversion is used to identify oxidized regions, analyze their area, shape, distribution range, and grayscale gradient change patterns, and summarize the oxidation evolution mode; combined with digital image correlation algorithm analysis before and after welding (adding a material elastic modulus temperature correction coefficient, i.e.) The displacement field and strain distribution were calculated, a geometric deformation model of the weld area was established, and the morphological distortion tensor components were obtained through tensor decomposition algorithm. Material property parameters (thermal conductivity and yield strength of aluminum alloy) were added, and all the above parameters were integrated to construct a quantitative characterization set of enhanced sealing mechanism.

[0093] Structured data of the enhanced sealing mechanism quantification characterization set ( (Format encapsulation) The optimized performance index mapping diagnostic tool is passed through the encrypted transmission control protocol / Internet Protocol data interface. The diagnostic tool first uses an improved deviation normalization method.

[0094] Map each indicator to Range, eliminating dimensional differences and extreme value interference; then by the built-in band An improved multilayer perceptron with regularization constraints (penalty coefficient 0.0008) is used. This improved multilayer perceptron adds an attention-based fully connected layer. It calculates the correlation weights between each physical index and the airtightness index (trained based on historical measured data), weights the multidimensional physical indices, and then performs a nonlinear transformation. An adaptive moment estimation optimizer optimizes the weight parameters of each neuron to suppress model overfitting. Finally, the output layer outputs a one-dimensional physical leakage rate prediction, completing the weighted regression mapping. If the leakage rate is greater than... The system automatically generates segmented interpretive thermal maps along the weld path based on the gradient of the convolutional feature map. If the bright energy is concentrated in the arc weld segment, combined with the thermal conductivity parameters of the material, the fault mechanism is determined to be "microstructure failure caused by uneven welding heat input in the arc segment", and the operator is informed through the display.

[0095] Specifically, the improved deviation standardization method is as follows:

[0096] ;

[0097] in The input is the original physical index feature value; This is the minimum value of the physical index within the preset sample set. This represents the maximum value of the physical index within the preset sample set; To map to Standardized feature values ​​after the logical interval.

[0098] Furthermore, the judgment results, the enhanced sealing mechanism quantitative characterization set, and the compressed defect topology dataset are encrypted and bound together to generate full-process quality traceability data with a process traceability chain. The specific process includes:

[0099] The industrial computing platform performs improved Laplacian pyramid multi-scale feature decomposition on the binarized mask feature map corresponding to the defect topology dataset: a dynamic Gaussian kernel is used (the high-frequency detail residual layer uses a 3×3 Gaussian kernel, with a standard deviation of [missing information]). The low-frequency global layer uses a 7×7 Gaussian kernel with a standard deviation of [missing information]. The process involves filtering to generate a four-level Gaussian blur map and high-frequency detail residuals. The fourth-level Gaussian blur map serves as the low-frequency global map. An adaptive downsampling algorithm with a signed distance field is introduced, and the sampling step size is adjusted according to the complexity of the weld path (step size of 2 for straight segments and step size of 1 for arc segments). The constraint that the gradient magnitude of the signed distance field is always equal to 1 is used to filter key pixels of the boundary gradient. Under the premise of achieving a lossy compression ratio of 25:1, the core geometric feature retention rate is ≥98%, and the boundary position error is ≤1 pixel.

[0100] After compression, a unified data package containing a process traceability chain is constructed. Core fields include the enclosure ID, millisecond-level timestamp, segmented welding current / voltage data (divided by weld path segment), robot pose data, material parameters, diagnostic results, and fault mechanism analysis. This data package, along with the compressed defect topology dataset attachment, is encrypted using an advanced encryption standard (128-bit key) (encrypted binary format, filename "..."). The data is encrypted and bound together; the bound complete data is transmitted to the factory computer via industrial Ethernet. The computer writes the core data packet information into the encrypted database, stores the topology data attachments in the designated encrypted server directory, establishes an encrypted index association between the database records and the attachment files, and generates a closed-loop traceability data flow with full-link encryption quality, including "collection-detection-judgment-storage-traceability", to ensure data security and traceability.

[0101] This embodiment addresses the challenges of low detection accuracy and weak anti-interference capabilities in existing technologies under conditions of high reflectivity interference and complex weld paths by dynamically adjusting image acquisition parameters, employing adaptive multi-scale enhancement and directional noise suppression, optimizing residual block structure and attention mechanism, and adding a dual-domain fusion strategy of scale adaptation and path constraint. Furthermore, it improves the accuracy of quantitative prediction of the airtightness index by constructing an enhanced quantitative characterization set of sealing mechanisms and an improved regression mapping model. Finally, it enhances the security and integrity of quality traceability data through encrypted binding and the construction of a process traceability chain, thus meeting the high-efficiency detection requirements of battery pack enclosure welds under complex operating conditions.

[0102] Although embodiments of the present invention have been shown and described, those skilled in the art should understand that different forms of changes, revisions, substitutions and modifications can be made to these embodiments without departing from the core principles and spirit of the present invention; the scope of protection of the present invention will be defined by the appended claims and their equivalents.

Claims

1. A method for detecting surface defects in weld seams of battery pack housings based on machine vision, characterized in that, include: Original images of the weld seams of battery pack housings of different specifications are acquired, and adaptive contrast enhancement and noise suppression preprocessing are performed to obtain preprocessed images. The preprocessed image is input into a contour reconstruction network for feature extraction to obtain defect features and heat-affected zone structural features. The contour reconstruction network includes a feature encoding layer and a feature decoding layer. A multi-dimensional collaborative attention mechanism is activated in the feature encoding layer and the feature decoding layer to enhance the defect features and the structural features of the heat-affected zone. The dual-domain feature cross-layer anchoring fusion mechanism of the contour reconstruction network is used to fuse the enhanced defect features and heat-affected zone structural features, reconstruct the defect contour and heat-affected zone boundary, and encapsulate them according to the XML specification to generate a defect topology dataset. Based on the aforementioned defect topology dataset, a quantitative characterization set of sealing mechanism is constructed using a digital image correlation algorithm; The quantitative characterization set of the sealing mechanism is input into the performance index mapping diagnostic tool, and a regression mapping between image features and air tightness index is performed to obtain a judgment result with quantitative correlation. The judgment results, the quantitative characterization set of sealing mechanism, and the defect topology dataset are bound together to generate full-process quality traceability data.

2. The method for detecting surface defects in the weld seam of a battery pack casing based on machine vision according to claim 1, characterized in that, The process of obtaining original images of weld seams adapted to different specifications of battery pack housings and obtaining preprocessed images includes: obtaining the welding path coordinates of the original images of weld seams adapted to different specifications of battery pack housings; using an industrial camera with a 405 nm blue light source to synchronously acquire the welding path coordinates at a preset grazing angle; stitching together a fused image containing the fusion nugget area, laser weld bead, and friction stir weld bead based on the pixel coordinate system; performing adaptive histogram equalization on the fused image; using median filtering to suppress isolated noise points generated by welding spatter; and outputting a preprocessed image that meets the contrast threshold.

3. The method for detecting surface defects in the weld seam of a battery pack casing based on machine vision according to claim 1, characterized in that, The contour reconstruction network performs feature extraction, specifically including: constructing a symmetric convolutional neural network containing a feature encoding layer and a feature decoding layer; in the feature encoding layer, using residual blocks to extract deep semantic features of the original image to generate defect features; in the feature decoding layer, transposed convolution upsamples the deep semantic feature map output by the feature encoding layer to generate heat-affected zone structural features; a dual-domain feature cross-layer anchoring fusion mechanism introduces low-level positional information, and through multi-scale feature decoupling, maps defect features to feature channels that represent geometric morphological changes after high-pass filtering and convolution processing, and maps heat-affected zone structural features to feature channels that represent tissue deformation trends after low-pass filtering and gradient calculation processing.

4. The method for detecting surface defects in the weld seam of a battery pack casing based on machine vision according to claim 3, characterized in that, The dual-domain feature cross-layer anchoring fusion mechanism specifically includes: extracting deep semantic feature maps from the feature encoding layer of the contour reconstruction network, and statistically analyzing the mean and standard deviation of the global activation response intensity of the deep semantic feature maps; based on the mean and standard deviation, determining a preset threshold using the adaptive maximum inter-class variance method, identifying salient regions in the deep semantic feature maps where the activation response intensity is greater than the preset threshold, and calculating the geometric centroid of the salient regions; setting the geometric centroid as a spatial semantic anchor point, and projecting it onto the spatial feature map corresponding to the feature decoding layer through coordinate mapping logic to obtain the projected coordinates; using the projected coordinate points as the center, delineating a fixed... The system defines a local interest neighborhood with a step size; in the spatial domain, bilinear interpolation is used to align defect features with heat-affected zone structural features in the pixel coordinate system; in the frequency domain, discrete cosine transform is used to extract texture information; this texture information is introduced into the local interest neighborhood as a boundary constraint signal to correct edge position offsets; centered on the spatial semantic anchor point, the boundary constraint signal is used to weightedly fuse the category attributes of deep semantic features with the geometric structure of the spatial feature map; the edge signal in the frequency domain is used as an anchor point to constrain the contour generation in the spatial domain, outputting a defect contour and heat-affected zone boundary with consistent spatial topology and aligned edge pixels, and encapsulated according to XML specifications to generate a defect topology dataset.

5. The method for detecting surface defects in the weld seam of a battery pack casing based on machine vision according to claim 1, characterized in that, The activation of the multi-dimensional collaborative attention mechanism specifically includes: calculating the non-local response values ​​between pixels using a spatial dimension sliding window to generate a spatial attention mask; extracting physical risk correlation terms from historical airtightness test data of failed components, wherein the physical risk correlation terms include a defect depth continuity factor and a width abrupt change slope characterizing the probability of airtightness failure; inputting the initial feature map generated by the contour reconstruction network during feature extraction into the global statistical branch, and generating a channel description vector through pooling operations; using the physical risk correlation terms as bias factors, fusing and mapping the channel description vectors and physical risk correlation terms using a multilayer perceptron to calculate a dynamic weight distribution, and performing normalization processing through an activation function to generate channel weights; performing element-wise multiplication of the spatial attention mask and the channel weights to obtain a weight distribution matrix; and generating enhanced defect features and heat-affected zone structural features by performing element-wise multiplication of the weight distribution matrix with defect features and heat-affected zone structural features.

6. The method for detecting surface defects in the weld seam of a battery pack casing based on machine vision according to claim 5, characterized in that, The construction of the sealing mechanism quantitative characterization set specifically includes: extracting the Euclidean distance between the defect contour and the boundary of the heat-affected zone from the defect topology dataset; extracting the geometric features of the indentation edge and the evolution pattern of the oxidation region of the weld nugget region from the preprocessed image to obtain the indentation oxidation features; comparing the image displacement fields before and after welding using a digital image correlation algorithm to calculate the morphological distortion tensor caused by the welding thermal cycle; aligning the Euclidean distance, morphological distortion tensor, and indentation oxidation features in the spatiotemporal dimensions, and then concatenating them into vectors according to a preset topological order to generate the sealing mechanism quantitative characterization set.

7. The method for detecting surface defects in the weld seam of a battery pack casing based on machine vision according to claim 1, characterized in that, The process by which the performance index mapping diagnostic tool performs a regression mapping between image features and the airtightness index to obtain a quantitatively correlated judgment result includes: using a multilayer perceptron as a regression engine, processing the quantitative representation set of sealing mechanisms using regularization constraints, generating a predicted leakage rate value, and producing a quantitative correlation between image features and the airtightness index; when the leakage rate is determined to be excessive, calculating the gradient of the predicted value relative to the convolutional feature map to generate an interpretive heatmap; using the high-brightness energy distribution of the interpretive heatmap to distinguish failure mechanisms and generate a judgment result; when the high-brightness area covers the heat-affected zone, it is determined to be a microstructure failure caused by excessive heat input.

8. The method for detecting surface defects in the weld seam of a battery pack casing based on machine vision according to claim 1, characterized in that, The generation of full-process quality traceability data specifically includes: constructing a unified data structure containing enclosure ID, timestamp, welding current and voltage parameters, and visual inspection results; using multi-scale feature decomposition based on Laplacian pyramid and downsampling algorithm based on signed distance field to perform lossy compression processing on the reconstructed defect topology dataset while preserving geometric feature gradients, and storing it as a core traceability attachment; binding the predicted airtightness index of the enclosure with the actual welding process parameter execution data to generate full-process quality traceability data.

Citation Information

Patent Citations

  • Training method and system of image pre-training model and storage medium

    CN120913029A

  • Bicycle lifting seat production defect detection method and system based on machine vision

    CN121164300A