Method for detecting the quality of hollow profile extrusion welding for new energy battery

By acquiring local grayscale images from hollow profiles used in new energy batteries and setting sampling paths, the grayscale distribution curve is extracted, and the bimodal characteristics caused by air gaps are detected. This solves the shortcomings of existing welding quality inspection technologies and achieves efficient and accurate welding quality assessment.

CN122492703APending Publication Date: 2026-07-31JIANGXI HUAYU ALUMINIUM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGXI HUAYU ALUMINIUM CO LTD
Filing Date
2026-07-02
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies are insufficient to accurately detect the extrusion welding quality of hollow profiles used in new energy batteries, especially the difficulty in extracting the contours of fine weld lines, which makes it easy to miss micro-gap defects.

Method used

By acquiring local grayscale images of the weld line area on the hollow profile to be inspected, several sampling paths are set along the direction perpendicular to the extension of the weld line. Each grayscale distribution curve is extracted, and it is detected whether there are bimodal features caused by air gaps in the grayscale distribution curve. The weld quality level is determined based on the proportion of bimodal features.

Benefits of technology

It enables precise judgment of weld quality, effectively solving the problems of difficulty in extracting fine weld line contours and easy omission of micro-gap defects in existing technologies, and provides high-resolution local morphology data of weld lines and multi-level quality grade output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492703A_ABST
    Figure CN122492703A_ABST
Patent Text Reader

Abstract

This application relates to the field of aluminum profile inspection technology, and particularly to a method for inspecting the extrusion welding quality of hollow profiles used in new energy batteries. The method includes: acquiring a local grayscale image of the weld line area on the hollow profile to be inspected, providing a reliable image basis for subsequent refined analysis; setting several sampling paths along the direction perpendicular to the weld line extension within the weld line area based on the local grayscale image, extracting the grayscale distribution curve on each sampling path to achieve accurate sampling along the normal direction of the weld line; detecting whether a bimodal feature caused by an air gap exists in each grayscale distribution curve, and determining the welding quality level based on the ratio of the number of sampling paths with detected bimodal features to the total number of sampling paths. This method directly characterizes welding defects using the bimodal optical phenomenon caused by air gaps, thereby effectively solving the problems of existing technologies in extracting fine weld line contours and easily missing micro-gap defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of aluminum profile testing technology, and in particular relates to a method for testing the extrusion welding quality of hollow profiles used in new energy batteries. Background Technology

[0002] Hollow profiles for new energy batteries are typically made by extruding aluminum alloys, and have a single-cavity or multi-cavity structure. During the extrusion process, the metal enters the welding chamber through diversion holes and is re-welded under high temperature and pressure to form a closed hollow cross-section. The welding quality directly determines the load-bearing capacity and sealing performance of components such as battery trays and battery casings. Poor welding (such as false welding, oxide inclusions, micro-gaps, etc.) can easily lead to cracking during subsequent bending, welding, or vehicle vibration, resulting in serious quality problems such as battery pack fixation failure or coolant leakage.

[0003] Currently, the inspection of extrusion weld quality mainly relies on destructive metallographic sampling, which is inefficient and cannot achieve online full inspection. In recent years, image processing-based non-destructive testing methods have emerged. For example, some existing technologies disclose the acquisition of weld images by camera, the extraction of weld areas using edge detection algorithms, and the comparison of the overlap rate between the real-time weld area and the reference weld area. The weld quality is then judged based on the relationship between the overlap rate and a threshold. This method improves efficiency and consistency compared to manual inspection. However, existing technologies are mainly applicable to welds with clearly defined surface contours. They have shortcomings for weld lines formed by extrusion welding: the weld lines are extremely fine and it is difficult to extract a complete contour; relying solely on geometric shape for judgment can easily lead to missed detection of internal defects such as micro-gap. Summary of the Invention

[0004] This application provides a method for detecting the quality of extrusion welding of hollow profiles for new energy batteries, which can solve the problem that the prior art cannot accurately detect micro-gap welding defects due to unclear weld line contours.

[0005] In a first aspect, embodiments of this application provide a method for detecting the quality of extrusion welding of hollow profiles for new energy batteries, including: Acquire a local grayscale image of the weld line area on the hollow profile to be inspected; Based on the local grayscale image, several sampling paths are set in the weld line area along the direction perpendicular to the extension of the weld line, and the grayscale distribution curve on each sampling path is extracted respectively. The welding quality level is determined by detecting whether there is a bimodal feature caused by air gap in each grayscale distribution curve, and by the ratio of the number of sampling paths that detect the bimodal feature to the total number of sampling paths.

[0006] The technical solutions described in this application embodiment have at least the following technical effects: The method for detecting the extrusion welding quality of hollow profiles for new energy batteries provided in this application acquires a local grayscale image of the weld line area on the hollow profile to be inspected, obtaining high-resolution local morphological data of the weld line, providing a reliable image basis for subsequent refined analysis; based on the local grayscale image, several sampling paths are set in the weld line area along the direction perpendicular to the extension of the weld line, and the grayscale distribution curve on each sampling path is extracted to achieve accurate sampling along the normal direction of the weld line, obtaining a profile curve that can intuitively reflect the microscopic grayscale changes of the weld interface; the method detects whether there is a bimodal feature caused by air gap in each grayscale distribution curve, and determines the welding quality level according to the ratio of the number of sampling paths that detect the bimodal feature to the total number of sampling paths. The method directly characterizes welding defects by utilizing the bimodal optical phenomenon caused by air gap, without relying on complete contour extraction, and outputs multiple quality levels through proportional quantization, thereby effectively solving the problems of existing technologies that are difficult to extract the contour of fine weld lines and are prone to missing micro-gap defects.

[0007] Secondly, embodiments of this application provide a quality inspection system for extrusion welding of hollow profiles for new energy batteries, comprising: The acquisition unit is used to acquire a local grayscale image of the weld line area on the hollow profile to be inspected; The extraction unit is used to set several sampling paths in the weld line area according to the local grayscale image, along the direction perpendicular to the extension of the weld line, and extract the grayscale distribution curve on each sampling path respectively. The detection unit is used to detect whether there is a bimodal feature caused by air gap in each grayscale distribution curve, and to determine the welding quality level based on the ratio of the number of sampling paths that detect the bimodal feature to the total number of sampling paths.

[0008] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in any of the foregoing aspects.

[0009] Fourthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to perform the method described in any of the above aspects.

[0010] It is understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant descriptions in the above aspects, and will not be repeated here. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a flowchart illustrating a method for detecting the quality of extrusion welding of hollow profiles for new energy batteries according to an embodiment of this application. Figure 2 This is a schematic diagram illustrating the principle of a method for detecting the quality of extrusion welding of hollow profiles for new energy batteries provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a hollow profile extrusion welding quality inspection system for new energy batteries provided in one embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0013] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0014] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0015] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0016] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determination" or "if the described condition or event is detected" may be interpreted, depending on the context, as "once determination," "in response to determination," "once the described condition or event is detected," or "in response to the detection of the described condition or event."

[0017] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0018] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0019] Currently, the inspection of extrusion weld quality mainly relies on two methods. The first is destructive metallographic sampling, which involves cutting samples from the end of the profile, polishing and etching them, and then observing the microscopic morphology of the weld interface under a microscope to determine whether the weld is qualified. This method is intuitive and reliable, but it can only cover the beginning and end of the profile, and cannot inspect the continuous production line several meters long in the middle. Moreover, the sampling, sample preparation, and interpretation cycle takes several hours, making online feedback impossible. The second method is a non-destructive testing method based on machine vision. An industrial camera is installed on the extrusion exit side to continuously acquire surface images of the weld area. Edge detection operators such as Canny and Sobel are used to extract the contour boundary of the weld line. The spatial overlap rate of the extracted real-time weld area is calculated with the pre-acquired qualified sample reference area. When the overlap rate is lower than a preset threshold, it is judged as a weld abnormality.

[0020] The aforementioned visual inspection scheme is inherently flawed in its application to extruded weld lines. This is because its core criterion is the geometric boundary of the weld area, which itself is an unreliable signal. The weld line width is only about 0.1 to 0.5 mm, and the grayscale transition from the weld area to the substrate is limited to only a few gray levels, placing it at the same noise level as the inherent extrusion lines and oxide marks on the profile surface. At this signal-to-noise ratio, the edge detection operator often extracts contours with breaks, offsets, or false edges, making the calculation of the overlap rate inherently incomplete and inaccurate. A deeper problem is that the physical essence of weld quality—whether the oxide film is broken or whether the fresh metal has completed atomic diffusion bonding—is not necessarily reflected in the surface geometry. When weld defects exist in the form of subsurface micro-cracks or dispersed oxide particles, the surface morphology does not exhibit any visually or camera-detectable abnormalities, and the overlap rate remains within the normal range, completely bypassing the criterion.

[0021] To address the aforementioned issues, this application provides a method for inspecting the welding quality of hollow profiles used in new energy batteries. This method acquires measurable process parameters such as extrusion speed, extrusion pressure, extrusion cylinder inner wall temperature, and billet inlet temperature. Based on a pre-constructed dual-state lumped parameter thermal model and a Kalman filter, the billet core temperature is determined in real-time through recursion. This solves the problem of existing technologies being unable to dynamically estimate the core temperature online. It requires no modification to the extruder hardware, has low computational complexity, strong real-time performance, and maintains high estimation accuracy under non-steady-state conditions such as dynamic fluctuations in extrusion speed. Furthermore, it possesses physical interpretability, facilitating engineering debugging and maintenance, and effectively meets the real-time soft measurement requirements of isothermal extrusion closed-loop control for billet core temperature.

[0022] The method for detecting the quality of extrusion welding of hollow profiles for new energy batteries provided in this application embodiment can be applied to electronic devices. In this case, the electronic device is the executing subject of the method for detecting the quality of extrusion welding of hollow profiles for new energy batteries provided in this application embodiment. This application embodiment does not impose any restrictions on the specific type of electronic device.

[0023] For example, electronic devices can be ultra-mobile personal computers (UMPCs), netbooks, desktop computers, computers, laptops, communication equipment, computing devices, satellite wireless equipment, etc.

[0024] To better understand the method for detecting the quality of extrusion welding of hollow profiles for new energy batteries provided in this application, the specific implementation process of the method for detecting the quality of extrusion welding of hollow profiles for new energy batteries provided in this application will be described below by way of example.

[0025] Figure 1 This paper presents a schematic flowchart of a method for detecting the quality of extrusion welding of hollow profiles for new energy batteries, provided in an embodiment of this application. Figure 2 This illustration shows a schematic diagram of the principle of the method for detecting the extrusion welding quality of hollow profiles for new energy batteries provided in an embodiment of this application. The method for detecting the extrusion welding quality of hollow profiles for new energy batteries includes: S100: Acquire a local grayscale image of the weld line area on the hollow profile to be inspected.

[0026] It is understood that hollow profiles requiring extrusion welding quality inspection are designated as hollow profiles to be inspected. These hollow profiles can include, but are not limited to, battery tray frame profiles, battery casing profiles, water-cooled plate flow channel profiles, or other aluminum alloy extruded profiles with single or multi-cavity structures used in new energy batteries. When online welding quality inspection is required on the extrusion production line, an inspection command can be sent to the inspection system. The inspection system receives and responds to the inspection command, acquires a local grayscale image of the welding line area on the hollow profile to be inspected, and performs subsequent analysis.

[0027] The inspection system can be equipped with an industrial camera and light source, with an inspection station installed at the extruder exit. When the hollow profile to be inspected passes through the inspection station, the camera automatically captures images of the weld line area. The camera can be a line scan camera or an area scan camera, paired with a telecentric lens and a coaxial light source to obtain high-resolution, low-distortion grayscale images.

[0028] The detection system can be equipped with an encoder, which is mounted on the main drive shaft of the extruder for real-time detection of the extrusion speed. The detection system synchronously triggers the camera to acquire images based on the encoder pulse signals, ensuring that the resolution of the acquired images remains consistent along the extrusion direction and preventing image stretching or compression due to speed fluctuations.

[0029] Users can also send inspection commands using a remote client. The client connects to the inspection system via a network and interacts with the system for data exchange. When a user needs to inspect the weld quality, they can send an inspection command to the client. The client receives and responds to the command, then forwards it to the inspection system via the network. The inspection system receives the forwarded command and begins acquiring images.

[0030] S200: Based on the local grayscale image within the weld line area, several sampling paths are set along the direction perpendicular to the extension of the weld line, and the grayscale distribution curve on each sampling path is extracted respectively.

[0031] It is understandable that after obtaining a local grayscale image, it is necessary to locate the approximate position of the weld line in the image and arrange multiple sampling lines along the normal direction of the weld line (i.e., perpendicular to the extension direction). The pixel grayscale values ​​on each sampling line constitute a grayscale distribution curve. When there is a micro-gap (air gap) at the weld interface, the two sides of the gap will form two obvious grayscale extreme peaks (double peaks) on the grayscale curve in the normal direction. By analyzing these curves, the weld quality can be judged.

[0032] Most existing technologies directly perform edge detection and region extraction on the entire weld area. When the weld line is extremely fine and the outline is unclear, edge detection cannot obtain the closed area, leading to detection failure. This application extracts the grayscale distribution curve through sampling path, which does not depend on the complete outline, fundamentally solving the problem of the inability to extract fine signals.

[0033] First, the local normal direction of the weld line can be determined statistically using gradient direction. Then, the weld line is moved at equal steps along its extension direction, and a pixel line is intercepted along the normal direction at each step position. The grayscale values ​​of all pixels on this line are recorded sequentially as a grayscale distribution curve. The step size can be adaptively set according to the weld line length, for example, setting a sampling path every 0.1 mm. Alternatively, a simpler method can be used: the start and end points of the weld line are manually calibrated, and the detection system automatically interpolates and generates multiple sampling points uniformly between the two points. At each sampling point, a grayscale curve is extracted along the vertical direction. This method is suitable for cases where the weld line direction is relatively straight.

[0034] S200, based on the local grayscale image within the weld line region, sets several sampling paths along the direction perpendicular to the weld line extension, and extracts the grayscale distribution curve on each sampling path, including: S210, perform gradient direction statistics on the weld line region based on the local grayscale image to determine the local normal direction of the weld line.

[0035] It is understandable that the weld line appears as a thin, elongated dark or bright line in the image, and its local normal direction is perpendicular to the line. Since the profile may have slight bending or twisting during the extrusion process, the direction of the weld line is not perfectly straight. Therefore, it is necessary to determine the local normal direction point by point to ensure that each sampling path is truly perpendicular to the weld line.

[0036] Existing technologies typically assume the weld direction is known or directly use fixed-direction sampling. When the weld line is curved, fixed-direction sampling results in the sampling path not being perpendicular to the weld line, and the grayscale curve cannot accurately reflect the true grayscale changes at the weld interface. This application improves sampling accuracy by calculating the gradient direction of each pixel in a local area of ​​the image through gradient direction statistics, thereby statistically determining the actual direction of the weld line.

[0037] The Sobel operator can be used to calculate the horizontal and vertical gradients of each pixel in the image, and then the gradient direction angle (0°~180°) of each pixel can be calculated to generate a gradient direction histogram.

[0038] Optionally, S210, gradient direction statistics are performed on the weld line region based on the local grayscale image to determine the local normal direction of the weld line, including: S211, calculate the gradient direction of each pixel within the weld line region based on the local grayscale image, and generate a gradient direction histogram.

[0039] It's understandable that the gradient direction reflects the direction of the fastest gray-level change in an image. For a weld line, there's a difference in gray-level on both sides, and the gradient direction is roughly perpendicular to the weld line's direction. By statistically analyzing the gradient directions of all pixels within the weld line region, a histogram can be obtained. The peak direction in the histogram represents the main normal direction of the weld line.

[0040] The Sobel operator can be used to calculate the gradients Gx and Gy in the x and y directions of the image, respectively. Then, the gradient direction angle for each pixel is θ = arctan(Gy / Gx). Divide the image from 0° to 180° into several intervals (e.g., every 10°), and calculate the cumulative sum of gradient magnitudes within each interval to form a gradient direction histogram. The direction angle corresponding to the interval with the largest cumulative sum of magnitudes is the dominant gradient direction. The direction perpendicular to this gradient direction is the extension direction of the weld line, and this direction itself is the normal direction of the weld line.

[0041] To reduce noise interference, only pixels with gradient magnitudes greater than a preset threshold can be counted, while pixels in flat areas can be ignored.

[0042] S212, the direction with the largest cumulative magnitude in the gradient direction histogram is taken as the local normal direction of the weld line.

[0043] It can be understood that after generating the gradient direction histogram, the peak value in the histogram represents the most significant gradient change direction within the weld line region, which is the local normal direction of the weld line. Using this direction as the reference for the sampling path ensures that the sampling path is perpendicular to the weld line.

[0044] If the gradient direction histogram has multiple obvious peaks (e.g., there are other textures interfering near the weld line), the direction of the peak with the largest cumulative amplitude can be taken as the normal direction, or multiple peaks can be weighted and averaged.

[0045] To accommodate local bending of the weld line, the weld line region can be divided into multiple segments along the extension direction. The gradient direction histogram of each segment is calculated to obtain the local normal direction of each segment, thereby achieving variable direction sampling.

[0046] S220 moves along the extension direction of the weld line with a fixed step size, sets a sampling path along the local normal direction at each step size position, and extracts the grayscale distribution curve on the sampling path.

[0047] It is understandable that after determining the local normal direction of the weld line, multiple sampling paths need to be arranged at equal intervals along the extension direction of the weld line. Each sampling path extends from one side of the substrate to the other side of the substrate along the local normal direction at that location, and the pixel grayscale values ​​on the path are recorded sequentially to form a grayscale distribution curve. These curves will serve as the basis for subsequent bimodal detection.

[0048] A fixed step size can be set according to the required detection resolution, such as setting a sampling path every 0.05 mm or every 0.1 mm. The smaller the step size, the higher the detection accuracy, but the greater the computational load.

[0049] The sampling path should be long enough to cover the weld line and the substrate area on both sides. For example, the path length should be set to three times the expected width of the weld line to ensure that complete grayscale change information can be collected.

[0050] In one possible implementation, before detecting whether a bimodal feature caused by an air gap exists in each grayscale distribution curve, the method further includes: S231, calculate the Fourier transform of each gray-level distribution curve to obtain the phase spectrum of each gray-level distribution curve.

[0051] It is understandable that the Fourier transform can convert the grayscale distribution curve from the spatial domain to the frequency domain, obtaining the amplitude spectrum and phase spectrum. The phase spectrum contains the phase information of each frequency component in the curve. Due to factors such as camera tilt and unevenness of the profile surface that may occur during image acquisition, the grayscale distribution curve may experience an overall phase shift. This shift can affect the accuracy of bimodal feature detection. Analyzing the phase spectrum can provide a basis for subsequent phase correction.

[0052] A Fast Fourier Transform (FFT) can be performed on each grayscale distribution curve to obtain complex results, from which the phase spectrum (i.e., the phase angle of each frequency component) can be extracted.

[0053] S232 removes the linear component from the phase spectrum and obtains the phase-corrected grayscale distribution curve through inverse transformation.

[0054] It can be understood that the linear components in the bit spectrum correspond to the overall translation or tilt of the curve in the spatial domain. During image acquisition, if the camera's optical axis is not strictly perpendicular to the surface being measured, or if the weld line itself has a slight tilt, a linear phase component will be introduced into the grayscale curve, causing a shift in the peak position. Removing this linear component and then performing an inverse Fourier transform yields a phase-corrected grayscale curve, aligning the characteristic peaks in the curve with their true positions, thereby improving the accuracy of bimodal detection.

[0055] First, the phase spectrum is linearly fitted to extract the linear component. Then, the linear component is subtracted from the original phase spectrum to obtain the corrected phase spectrum. Finally, the original amplitude spectrum is combined with the original amplitude spectrum to perform an inverse Fourier transform to obtain the corrected grayscale curve.

[0056] S300 detects whether there is a bimodal feature caused by air gap in each grayscale distribution curve, and determines the welding quality level based on the ratio of the number of sampling paths with detected bimodal features to the total number of sampling paths.

[0057] Understandably, after phase correction, each grayscale distribution curve needs to be analyzed to determine if it exhibits a typical bimodal characteristic (two significant local maxima peaks with a distinct valley between them). The bimodal characteristic arises from micrometer-level air gaps at the weld interface, causing abnormal light reflection at the edges of these gaps. A fully welded area has no air gaps, and its grayscale curve displays a smooth single peak or a monotonous transition. Therefore, the bimodal characteristic is a clear indicator of poor weld quality. The proportion of bimodal characteristics appearing in all sampling paths quantifies the weld quality: a higher proportion indicates poorer weld quality.

[0058] Existing technologies judge quality solely by comparing the geometric overlap rate of weld areas, failing to detect micro-gap defects that do not alter the overall appearance. This application, through waveform morphology analysis of grayscale curves, directly detects the bimodal optical phenomenon generated by air gaps, exhibiting extremely high sensitivity to micro-gap defects. This effectively solves the problems of existing technologies, such as difficulty in extracting fine weld line contours and the tendency to miss micro-gap defects.

[0059] In one possible implementation, S300 detects whether a bimodal feature caused by an air gap exists in each grayscale distribution curve, and determines the weld quality level based on the ratio of the number of sampling paths with detected bimodal features to the total number of sampling paths, including: S310 detects whether there is a bimodal feature caused by the air gap in each phase-corrected grayscale distribution curve, and determines the welding quality level based on the ratio of the number of sampling paths with detected bimodal features to the total number of sampling paths.

[0060] It is understandable that the phase-corrected grayscale curve eliminates the linear phase distortion during the acquisition process, making the bimodal features clearer and more identifiable, and the detection results more reliable.

[0061] Optionally, S310, detects whether there is a bimodal feature caused by the air gap in each phase-corrected grayscale distribution curve, and determines the welding quality level based on the ratio of the number of sampling paths with detected bimodal features to the total number of sampling paths, including: S311 performs waveform morphology analysis on each phase-corrected grayscale distribution curve to identify the bimodal characteristics caused by the air gap in the grayscale distribution curve.

[0062] Waveform morphology analysis can be understood as extracting characteristic parameters from the geometry of a grayscale curve, such as the location, amplitude, peak spacing, and peak-to-valley ratio of extreme points. For bimodal waveforms caused by air gaps, the waveform exhibits specific patterns: two distinct peaks with a valley between them, and the amplitudes of the two peaks are similar or slightly different, but the valley is deeper. These characteristics can be automatically identified using mathematical methods (such as derivatives and extreme value detection).

[0063] Existing edge detection or threshold segmentation technologies cannot directly handle the bimodal shape in one-dimensional curves. This application introduces a one-dimensional waveform analysis method specifically designed for grayscale profile curves, using the first and second derivative methods to locate extreme points and calculate the asymmetry coefficient.

[0064] For example, S311, waveform morphology analysis is performed on each phase-corrected grayscale distribution curve to identify the bimodal characteristics caused by the air gap in the grayscale distribution curve, including: S3111, calculate the first and second derivatives of each phase-corrected grayscale distribution curve, and use the zero-crossing points of the second derivative to locate the extreme points in the curve.

[0065] It can be understood that the first derivative reflects the slope of a curve, and points where the first derivative is zero are candidate extreme points of the curve; the second derivative reflects the concavity or convexity of the curve, and points where the second derivative is zero and the sign of the first derivative changes are extreme points. Specifically, local maxima correspond to points where the first derivative changes from positive to negative and the second derivative is negative; local minima correspond to points where the first derivative changes from negative to positive and the second derivative is positive. Using the zero-crossing points of the second derivative, the positions of all extreme points in the curve can be accurately located.

[0066] The grayscale curve can be smoothed and denoised (e.g., Gaussian filtering), then the first and second differences can be calculated, the zero-crossing points of the second difference can be found, and the sign change of the first difference can be checked, thereby determining the location of the maximum and minimum points.

[0067] S3112, sort the extreme points in descending order of gray value, select the first two extreme points as candidate peaks, and calculate the waveform asymmetry coefficient between the candidate peaks.

[0068] It is understandable that among all detected maxima, the two points with the highest grayscale values ​​are most likely the two main peaks corresponding to the bimodal characteristic of the air gap. These two points are used as candidate peaks, and the waveform asymmetry coefficient between them is calculated to determine whether these two peaks possess the symmetry (or a specific asymmetry range) expected of the bimodal characteristic. Peaks that are excessively asymmetric (e.g., one maxima is much higher than the other) may not be caused by the air gap.

[0069] The waveform asymmetry coefficient α is defined as the absolute value of the difference between the grayscale amplitudes of the two peaks divided by the sum of the grayscale amplitudes of the two peaks. The value of α ranges from 0 to 1. The closer α is to 0, the more symmetrical the two peaks are; the closer α is to 1, the more asymmetrical the two peaks are. Based on the optical characteristics of the air gap, the heights of the two peaks are usually similar (α is small), but there are also some differences. Therefore, a reasonable threshold range (such as 0~0.2) can be set to determine whether it is a valid double peak.

[0070] For example, in step S3112, calculating the waveform asymmetry coefficient between candidate peaks includes: S31121, the grayscale amplitudes of the two candidate peaks are recorded as the first amplitude and the second amplitude, respectively. The absolute value of the difference between the first amplitude and the second amplitude is calculated, and then the absolute value is divided by the sum of the first amplitude and the second amplitude. The quotient is used as the waveform asymmetry coefficient.

[0071] It's understandable that the specific formula for calculating the asymmetry coefficient can be set as follows: if the first amplitude is h1 and the second amplitude is h2, then the asymmetry coefficient α = |h1 - h2| / (h1 + h2). This formula normalizes the asymmetry to the range of 0 to 1, making it easier to compare with a preset threshold. α is only calculated if both h1 and h2 are greater than twice the average background grayscale value (ensuring they are significant peaks); otherwise, it is skipped.

[0072] S3113, when the waveform asymmetry coefficient is within the preset asymmetry threshold range, it is determined that the sampling path has a bimodal characteristic.

[0073] It is understandable that the preset asymmetry threshold range is an empirical value obtained from a large number of experimental samples. When α is less than or equal to a certain upper limit (e.g., 0.2), the two candidate peaks are considered to have reasonable symmetry and conform to the optical characteristics of air gap double peaks. Therefore, it is determined that there is a double peak feature on the sampling path, that is, there is poor welding (micro-gap) at this position. The upper limit of the preset asymmetry threshold range can be set to 0.2, that is, when α≤0.2, it is judged as a valid double peak. For different types of hollow profiles or different extrusion processes, the preset asymmetry threshold can be calibrated online.

[0074] S312, count the number of all sampling paths that exhibit bimodal characteristics and determine it as the first sampling number, calculate the ratio of the first sampling number to the total number of sampling paths, and determine the corresponding welding quality level based on the preset value range in which the ratio is located.

[0075] It can be understood that after the bimodal detection of all sampling paths is completed, the number of paths with detected bimodality is counted and denoted as the first sampling quantity. Let the total number of sampling paths be N, then the ratio R = the first sampling quantity / N. The R value reflects the proportion of the poor welding area in the entire welding line. According to the actual situation, several numerical intervals are preset, and each interval corresponds to a quality grade, such as excellent, good, medium, and poor. In this way, the output is a quantified grade result instead of a simple pass / fail, which is convenient for process personnel to fine-tune the extrusion parameters according to the grade trend. The quality grade is divided as follows: R = 0% is excellent, 0% < R ≤ 5% is good, 5% < R ≤ 15% is medium, and R > 15% is poor.

[0076] The preset numerical interval maps the bimodal detection rate (the number of sampling paths with detected bimodality / the total number of sampling paths) to four quality grades of excellent, good, medium, and poor. For example, by collecting at least 500 samples and simultaneously performing metallographic analysis to obtain the quantitative welding rate (the percentage of the welding interface length in the total interface length). Establish a regression model of the welding rate and RR (such as exponential decay or power function). Set the welding rate thresholds corresponding to the quality grades according to industrial standards: excellent ≥ 99%, good 95% - 99%, medium 85% - 95%, and poor < 85%. By inversely calculating through the regression model, the corresponding R thresholds are obtained: the welding rate of 99% corresponds to R ≈ 0%, 95% corresponds to R ≈ 5%, and 85% corresponds to R ≈ 15%. Therefore, the intervals are obtained: R = 0% is excellent, 0% < R ≤ 5% is good, 5% < R ≤ 15% is medium, and R > 15% is poor.

[0077] S3124, the preset asymmetric threshold range is proportional to the square root of the extrusion speed. The faster the extrusion speed, the larger the preset asymmetric threshold range; the slower the extrusion speed, the smaller the preset asymmetric threshold range.

[0078] It can be understood that the extrusion speed affects the shape of the air gap at the welding interface. The faster the speed, the shorter the residence time of the metal in the welding chamber, and the air gap tends to be narrower and deeper, resulting in an increase in the asymmetry of the bimodality; the slower the speed, the more fully welded, and the bimodality is more symmetric. Therefore, the preset asymmetric threshold range needs to be dynamically adjusted according to the real-time extrusion speed to ensure the robustness of the detection. The preset asymmetric threshold is used to judge whether the gray-scale amplitudes of two candidate peaks meet the optical characteristics of the air-gap bimodality (the two peaks should not be too asymmetric). For example, by collecting 200 metallographic samples confirmed to have air-gap defects, calculate the waveform asymmetry coefficient of each sample , plot the cumulative distribution function (CDF), and take the 90% quantile as , that is, 90% of the true defects are below this threshold. The typical value at the calibration speed (1 m / s) Because faster extrusion speeds result in narrower air gaps and increased asymmetry in reflections on both sides, the threshold needs to be dynamically adjusted. .when The sampling path is then determined to have a valid double peak.

[0079] A calibration speed v0 and a corresponding basic threshold range [0, α0] can be set, and the upper limit of the threshold at the real-time speed v is α = α0. sqrt(v / v0). For example, when the calibrated speed is 1 m / s, α0 = 0.2; when v = 2 m / s, α = 0.2. sqrt(2)≈0.283; when v=0.5m / s, α=0.2 sqrt(0.5)≈0.141.

[0080] In one possible implementation, S400, before setting several sampling paths perpendicular to the extension direction of the weld line, the method further includes: S410: Divide the local grayscale image into multiple image sub-blocks of the same size, calculate the local entropy of each image sub-block, and construct an entropy map using the local entropy of each sub-block.

[0081] Understandably, to reduce computational load, the entire image can be pre-screened, with only potentially defective areas subjected to refined bimodal detection. Local entropy is a metric in information theory used to measure the local texture complexity of an image. For perfectly welded normal regions, the texture on both sides of the weld line is relatively uniform, resulting in low local entropy values; for regions with micro-gaps, the grayscale changes drastically at the gap edges, leading to higher local entropy values. By calculating the local entropy of each sub-block, it's possible to quickly identify which areas require focused attention.

[0082] The image can be divided into m×n equal-sized sub-blocks (e.g., 32×32 pixels). For each sub-block, its gray-level histogram (levels 0-255) is plotted, and the probability p_i of each gray level is calculated. Then, the local entropy of the sub-block is calculated using the Shannon entropy formula H=-Σp_ilog2(p_i). The entropy values ​​of all sub-blocks constitute an entropy map (a low-resolution heatmap).

[0083] S420 performs pre-screening of local grayscale images based on entropy maps.

[0084] It's understandable that, based on the entropy distribution in the entropy map, image regions can be divided into two categories: regions with low entropy (simple texture, uniform grayscale) are likely normal welded areas and can be directly identified as normal; regions with high entropy (complex texture, drastic grayscale changes) may be defective areas, requiring further sampling path setting and bimodal feature detection. This allows computational resources to be concentrated on suspicious areas, significantly improving detection efficiency.

[0085] A preset entropy threshold can be set (e.g., 4.5, for an 8-bit grayscale image, the maximum entropy is 8). Areas with entropy values ​​lower than this threshold are marked as "normal" and will not be subject to subsequent bimodal detection; areas with entropy values ​​not lower than the threshold are marked as "needs detection" and proceed to step S200 and subsequent steps.

[0086] For example, the preset entropy threshold can be achieved by determining the sub-block size to be 2-3 times the weld line width (typically 32×32 pixels). Twenty fully welded regions and twenty defective regions are selected respectively. For each region, 100 sub-blocks are randomly selected to calculate the local entropy (8-bit grayscale, Shannon entropy H = −∑p). i log2p i The maximum entropy value H in the normal region is statistically analyzed. max (Typical 3.5) and the minimum value H of the entropy of the defect region. min (Typical 4.0)

[0087] Optionally, S420, pre-screening of the local grayscale image based on the entropy map includes: S421, mark the image sub-blocks in the entropy map whose local entropy is not lower than the preset threshold as valid detection areas, and mark the image sub-blocks in the entropy map whose local entropy is lower than the preset threshold as invalid detection areas, and directly determine that the welding quality corresponding to the invalid detection areas is normal.

[0088] It is understandable that the preset threshold is an empirical value obtained from experimental statistics, used to distinguish the complexity of image texture. Local entropy reflects the uniformity of gray-level distribution within an image sub-block: the higher the entropy value, the more dispersed the gray-level distribution and the more complex and varied the texture within the sub-block; the lower the entropy value, the more concentrated the gray-level distribution and the simpler and more uniform the texture. For a fully welded normal area, the metal flow lines on both sides of the weld line are continuous and smooth, and the gray-level changes are gradual, so the local entropy is low; for a poorly welded area with micro-gap (air gap), the edge of the gap will cause drastic fluctuations in gray-level, forming complex textures, so the local entropy is high.

[0089] Based on this physical principle, this application marks sub-blocks with high local entropy values ​​as valid detection areas, i.e., areas that may contain defects and require further sampling path setting and bimodal feature detection; and marks sub-blocks with low local entropy values ​​as invalid detection areas, i.e., areas with a high probability of normal welding, directly determining them as having normal welding quality without further calculation. This allows computational resources to be concentrated on suspicious areas, significantly improving detection efficiency while reducing false alarm rates.

[0090] The preset threshold can be set to 3.5 (for an 8-bit grayscale image, the sub-block size is 32×32 pixels). All sub-blocks are traversed, and those with a local entropy ≥ 3.5 are added to the detection queue for subsequent sampling path setting and bimodal feature detection; sub-blocks with a local entropy < 3.5 are directly output as "normal" and not further calculated. The sub-block size can be adaptively adjusted according to the image resolution and weld line width, for example, set to 2-3 times the weld line width to ensure that each sub-block contains complete local weld line features.

[0091] Corresponding to the above embodiment of the method for detecting the quality of extrusion welding of hollow profiles for new energy batteries, this application embodiment also provides a system for detecting the quality of extrusion welding of hollow profiles for new energy batteries. Each unit of the system can realize each step of the method for detecting the quality of extrusion welding of hollow profiles for new energy batteries. Figure 3 The diagram shows a structural block diagram of the extrusion welding quality inspection system for hollow profiles used in new energy batteries provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiment of this application are shown.

[0092] Reference Figure 3 The quality inspection system for extrusion welding of hollow profiles for new energy batteries includes: The acquisition unit is used to acquire a local grayscale image of the weld line area on the hollow profile to be inspected; The extraction unit is used to set several sampling paths in the weld line area according to the local grayscale image, along the direction perpendicular to the extension of the weld line, and extract the grayscale distribution curve on each sampling path respectively. The detection unit is used to detect whether there is a bimodal feature caused by air gap in each grayscale distribution curve, and to determine the welding quality level based on the ratio of the number of sampling paths that detect the bimodal feature to the total number of sampling paths.

[0093] It should be noted that the information interaction and execution process between the above systems / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0094] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit module can exist physically separately, or two or more unit modules can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0095] This application also provides an electronic device. Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 6 of this embodiment includes: at least one processor 60 ( Figure 4 Only one is shown in the image), at least one memory 61 ( Figure 4 (Only one is shown in the image) and a computer program 62 stored in the at least one memory 61 and executable on the at least one processor 60. When the processor 60 executes the computer program 62, it causes the electronic device 6 to perform the steps in any of the above embodiments of the method for detecting the extrusion welding quality of hollow profiles for new energy batteries, or to perform the functions of each unit in the above system embodiments.

[0096] For example, the computer program 62 may be divided into one or more units, which are stored in the memory 61 and executed by the processor 60 to complete this application. The one or more units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 62 in the electronic device 6.

[0097] Electronic device 6 can be a computing device or terminal device such as a desktop computer, laptop, handheld computer, or cloud server. This electronic device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that... Figure 4 This is merely an example of electronic device 6 and does not constitute a limitation on electronic device 6. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, buses, etc.

[0098] The processor 60 can be a Central Processing Unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0099] In some embodiments, the memory 61 may be an internal storage unit of the electronic device 6, such as a hard disk or memory of the electronic device 6. In other embodiments, the memory 61 may be an external storage device of the electronic device 6, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 6. Furthermore, the memory 61 may include both internal and external storage units of the electronic device 6. The memory 61 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 61 can also be used to temporarily store data that has been output or will be output.

[0100] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0101] This application provides a computer program product that, when run on an electronic device, causes the electronic device to perform the steps in any of the above method embodiments.

[0102] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to an electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0103] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0104] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0105] In the embodiments provided in this application, it should be understood that the disclosed quality inspection system / electronic device and method for extrusion welding of hollow profiles for new energy batteries can be implemented in other ways. For example, the embodiments of the quality inspection system / electronic device for extrusion welding of hollow profiles for new energy batteries described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0106] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0107] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A hollow profile extrusion bonding quality detection method for new energy batteries, characterized in that, include: Acquire a local grayscale image of the weld line area on the hollow profile to be inspected; Based on the local grayscale image, several sampling paths are set in the weld line area along the direction perpendicular to the extension of the weld line, and the grayscale distribution curve on each sampling path is extracted respectively. The welding quality level is determined by detecting whether there is a bimodal feature caused by air gap in each grayscale distribution curve, and by the ratio of the number of sampling paths that detect the bimodal feature to the total number of sampling paths.

2. The method of claim 1, wherein, The step of setting several sampling paths along the direction perpendicular to the extension of the weld line within the weld line area based on the local grayscale image, and extracting the grayscale distribution curve on each sampling path, includes: Based on the local grayscale image, gradient direction statistics are performed on the weld line region to determine the local normal direction of the weld line; Move along the extension direction of the weld line with a fixed step size, set a sampling path along the local normal direction at each step size position, and extract the grayscale distribution curve on the sampling path.

3. The method of claim 1, wherein, The step of performing gradient direction statistics on the weld line region based on the local grayscale image to determine the local normal direction of the weld line includes: The gradient direction of each pixel within the weld line region is calculated based on the local grayscale image, and a gradient direction histogram is generated. The direction with the largest cumulative magnitude in the gradient direction histogram is taken as the local normal direction of the weld line.

4. The method of claim 1, wherein, Before detecting whether a bimodal feature caused by an air gap exists in each grayscale distribution curve, the method further includes: Calculate the Fourier transform of each gray-level distribution curve to obtain the phase spectrum of each gray-level distribution curve; The linear component in the phase spectrum is removed, and the phase-corrected grayscale distribution curve is obtained by inverse transformation. The process of detecting whether a bimodal feature caused by an air gap exists in each grayscale distribution curve, and determining the welding quality level based on the ratio of the number of sampling paths that detect the bimodal feature to the total number of sampling paths, includes: The welding quality level is determined by detecting whether there is a bimodal feature caused by the air gap in each phase-corrected grayscale distribution curve, and by the ratio of the number of sampling paths that detect the bimodal feature to the total number of sampling paths.

5. The method of claim 4, wherein, The detection of whether a bimodal feature caused by an air gap exists in each phase-corrected grayscale distribution curve, and the determination of the welding quality level based on the ratio of the number of sampling paths that detect the bimodal feature to the total number of sampling paths, includes: Waveform morphology analysis is performed on each phase-corrected grayscale distribution curve to identify the bimodal characteristics caused by the air gap in the grayscale distribution curve; The number of all sampling paths exhibiting the bimodal characteristic is determined as the first sampling number. The ratio of the first sampling number to the total number of sampling paths is calculated, and the corresponding welding quality level is determined based on the preset numerical range in which the ratio falls.

6. The method of claim 5, wherein, The waveform morphology analysis of each phase-corrected grayscale distribution curve to identify the bimodal characteristics caused by the air gap in the grayscale distribution curve includes: Calculate the first and second derivatives of each phase-corrected grayscale distribution curve, and use the zero-crossing points of the second derivative to locate the extreme points in the curve; Arrange the extreme points in descending order of gray value, select the first two extreme points as candidate peaks, and calculate the waveform asymmetry coefficient between the candidate peaks. When the waveform asymmetry coefficient is within the preset asymmetry threshold range, it is determined that the sampling path has the bimodal characteristic.

7. The method of claim 6, wherein, Calculate the waveform asymmetry coefficient between candidate peaks, including: The grayscale amplitudes of the two candidate peaks are denoted as the first amplitude and the second amplitude, respectively. The absolute value of the difference between the first amplitude and the second amplitude is calculated, and then the absolute value is divided by the sum of the first amplitude and the second amplitude. The quotient is used as the waveform asymmetry coefficient.

8. The method as described in claim 6, characterized in that, The preset asymmetry threshold range is proportional to the square root of the extrusion speed. The faster the extrusion speed, the larger the preset asymmetry threshold range; the slower the extrusion speed, the smaller the preset asymmetry threshold range.

9. The method as described in claim 1, characterized in that, Before setting several sampling paths along the direction perpendicular to the extension of the weld line, the method further includes: The local grayscale image is divided into multiple image sub-blocks of the same size, and the local entropy of each image sub-block is calculated. An entropy map is constructed using the local entropy of each sub-block. The local grayscale image is pre-screened based on the entropy map.

10. The method as described in claim 9, characterized in that, The pre-screening of the local grayscale image based on the entropy map includes: Image sub-blocks in the entropy map whose local entropy is not lower than a preset threshold are marked as valid detection areas, and image sub-blocks in the entropy map whose local entropy is lower than the preset threshold are marked as invalid detection areas. The welding quality corresponding to the invalid detection areas is directly determined to be normal.