A method for on-line detection of laser welding molten pool defects of a power battery liquid cooling plate

CN122928860APending Publication Date: 2026-10-16SUZHOU RUITAIKE COOLING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611337431.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]本发明旨在至少在一定程度上解决现有技术中的技术问题之一,通过依据动力电池液冷板激光焊接熔池区域的图像获取实时检测区域灰度图,依据实时检测区域灰度图获取实时检测区域灰度值;依据实时检测区域灰度值获取实时分割阈值,依据实时分割阈值获取实时熔池区域;依据实时熔池区域初步判断熔池是否缺陷,若初步判断熔池无缺陷获取实时熔池轮廓;依据实时熔池轮廓获取实时轮廓坐标点、第一参照中点以及实时拟合轮廓;依据实时轮廓坐标点、第一参照中点以及实时拟合轮廓获取实时偏移均值;依据动力电池液冷板激光焊接熔池无缺陷的图像获取历史偏移均值;依据历史偏移均值获取历史偏移阈值;依据实时偏移均值与历史偏移阈值判断熔池是否有缺陷,以解决现有的技术缺少一种基于图像快速并准确的熔池缺陷检测方法,导致熔池缺陷检测不够准确和及时的问题

Benefits of technology

[0015]本发明的有益效果:本发明通过依据动力电池液冷板激光焊接熔池区域的图像获取实时检测区域灰度图,依据实时检测区域灰度图获取实时检测区域灰度值;依据实时检测区域灰度值获取实时分割阈值,依据实时分割阈值获取实时熔池区域;依据实时熔池区域初步判断熔池是否缺陷,若初步判断熔池无缺陷获取实时熔池轮廓;依据实时熔池轮廓获取实时轮廓坐标点、第一参照中点以及实时拟合轮廓;依据实时轮廓坐标点、第一参照中点以及实时拟合轮廓获取实时偏移均值;依据动力电池液冷板激光焊接熔池无缺陷的图像获取历史偏移均值;依据历史偏移均值获取历史偏移阈值;依据实时偏移均值与历史偏移阈值判断熔池是否有缺陷,优势在于,基于熔池圆形和椭圆形的轮廓特征拟合实时拟合轮廓,通过实时熔池轮廓与实时拟合轮廓构建可以评判拟合轮廓接近程度的实时偏移均值,可以实时偏移均值判断实时熔池轮廓与实时拟合轮廓的接近程度,进而可以通过实时偏移均值能够快速并准确地判断熔池是否有缺陷;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122928860A_ABST
    Figure CN122928860A_ABST
Patent Text Reader

Abstract

The application discloses a kind of power battery liquid cooling plate laser welding molten pool defect on-line detection method, it is related to molten pool defect detection technical field, comprising the following steps: according to real-time detection area gray value obtains real-time segmentation threshold, according to real-time segmentation threshold obtains real-time molten pool area;According to real-time molten pool area, molten pool is preliminary judged whether defect, if preliminary judgment molten pool is defectless, obtain real-time molten pool contour;According to real-time molten pool contour, first reference midpoint and real-time fitting contour are obtained;According to real-time contour coordinate point, first reference midpoint and real-time fitting contour, obtain real-time offset mean value;According to the image of power battery liquid cooling plate laser welding molten pool without defect, obtain historical offset mean value;The application is used to solve the problem that the existing technology lacks a kind of based on image fast and accurate molten pool defect detection method, leading to molten pool defect detection is not accurate and timely enough.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of molten pool defect detection technology, specifically to an online detection method for molten pool defects in laser welding of power battery liquid cooling plates. Background Technology

[0002] Aluminum alloy liquid cooling plates are responsible for the heat dissipation function of batteries. The sealing reliability of the liquid cooling plates directly determines the safety and service life of the power battery system. If the laser power setting is not appropriate during the laser welding process, defects such as root incomplete fusion, insufficient penetration, and weld penetration are very likely to occur. Melt pool defects are welding defects, so laser welding of molten pool defects of power battery liquid cooling plates is required.

[0003] Existing methods for detecting molten pool defects mostly rely on human experience, which is subjective and leads to insufficient accuracy. A small portion of existing methods use image-based detection, which relies on model training. However, image defect feature extraction only extracts data such as the length and width of the molten pool, which is insufficient for comprehensive defect detection and results in excessive comparison data. Currently, there is a lack of a fast and accurate image-based method for molten pool defect detection, leading to inaccurate and untimely detection. Summary of the Invention

[0004] This invention aims to at least partially solve one of the technical problems in the prior art. It obtains a real-time detection area grayscale image based on an image of the molten pool region during laser welding of a power battery liquid cooling plate; obtains real-time detection area grayscale values ​​based on the grayscale image; obtains a real-time segmentation threshold based on the grayscale values; obtains a real-time molten pool region based on the real-time segmentation threshold; preliminarily determines whether the molten pool has defects based on the real-time molten pool region; if the preliminary determination indicates no defects, obtains a real-time molten pool outline; obtains real-time outline coordinate points, a first reference midpoint, and a real-time fitted outline based on the real-time molten pool outline; obtains a real-time average offset based on the real-time outline coordinate points, the first reference midpoint, and the real-time fitted outline; obtains a historical average offset based on an image of a defect-free molten pool from laser welding of a power battery liquid cooling plate; obtains a historical offset threshold based on the historical average offset; and determines whether the molten pool has defects based on the real-time average offset and the historical offset threshold. This addresses the problem that existing technologies lack a fast and accurate image-based method for detecting molten pool defects, leading to inaccurate and untimely defect detection.

[0005] To achieve the above objectives, this application provides an online detection method for defects in the molten pool of laser welding of liquid-cooled plates for power batteries, comprising the following steps: Step S100: Obtain a grayscale image of the real-time detection area based on the image of the laser welding molten pool area of ​​the power battery liquid cooling plate; obtain the grayscale value of the real-time detection area based on the grayscale image of the real-time detection area; obtain a real-time segmentation threshold based on the grayscale value of the real-time detection area; obtain the real-time molten pool area based on the real-time segmentation threshold; preliminarily determine whether the molten pool is defective based on the real-time molten pool area; if it is preliminarily determined that the molten pool is not defective, obtain the real-time molten pool outline. Step S200: Obtain the real-time contour coordinates, the first reference midpoint, and the real-time fitted contour based on the real-time molten pool contour; obtain the real-time offset mean based on the real-time contour coordinates, the first reference midpoint, and the real-time fitted contour. Step S300: Obtain the historical offset average value based on the image of the defect-free molten pool of the laser welding of the power battery liquid cooling plate; obtain the historical offset threshold value based on the historical offset average value. Step S400: Determine whether the molten pool has defects based on the real-time average offset and the historical offset threshold.

[0006] Further, step S100 includes the following sub-steps: Acquire images of the laser welding molten pool area of ​​the liquid cooling plate of the power battery and mark it as the real-time detection area map; Mark the RGB value of each pixel in the real-time detection area map as the real-time detection RGB value; Convert all real-time detection RGB values ​​in the real-time detection area image to grayscale values ​​to obtain a grayscale image, and mark it as the real-time detection area grayscale image; The grayscale value of each pixel in the grayscale image of the real-time detection area is marked as the grayscale value of the real-time detection area.

[0007] Furthermore, step S100 also includes the following sub-steps: Within the grayscale value range of 0 to 255, a number of grayscale range divisions is set and marked as the first division number; Divide the grayscale value range from 0 to 255 into a number of equal-length ranges, and mark them as the first ranges; sort the first ranges from left to right according to the size of the data within each range. The number of grayscale values ​​in the real-time detection area within each first division range is obtained and marked as the first distribution number; Obtain the first partition range with the largest number of first distributions, and mark it as the first target range; Obtain the first division range to the right of the first target range and mark it as the second division range; The second target range is defined as the range where the number of the first distribution is greater than the number of the second divisions on the left and right sides. Obtain the second division range between the second target range and the first target range, and mark it as the third division range; Find the third partition range with the smallest number of first distributions and mark it as the third target range; Obtain the average value of the third target range and mark it as the real-time segmentation threshold.

[0008] Furthermore, step S100 also includes the following sub-steps: The gray values ​​of the real-time detection area that are greater than the real-time segmentation threshold are marked as the real-time melt pool gray values. Obtain the continuous region composed of pixels corresponding to the real-time melt pool grayscale value, and mark it as the real-time melt pool region; Determine whether all real-time molten pool regions are a single, unified area. If not, a defect exists in the weld pool. Otherwise, obtain the outline of the real-time molten pool region and mark it as the real-time molten pool outline.

[0009] Further, step S200 includes the following sub-steps: Establish a Cartesian coordinate system and label it as the first reference coordinate system; Place the real-time molten pool profile in the first quadrant of the first reference coordinate system; Obtain a first number of uniformly distributed coordinate points on the real-time molten pool profile and mark them as real-time profile coordinate points; The real-time fitting equation is set as: a1×X 2 +a2×X×Y+a3×Y 2 +a4×X+a5×Y+a6=0; where X is the horizontal axis value of the first reference coordinate system, Y is the vertical axis value of the first reference coordinate system, and a1, a2, a3, a4, a5 and a6 are the fitting constants in the real-time fitting equation. All real-time contour coordinate points are fitted with a function using a real-time fitting equation to obtain the specific values ​​of a1, a2, a3, a4, a5, and a6, which are then labeled as b1, b2, b3, b4, b5, and b6, respectively.

[0010] Furthermore, step S200 also includes the following sub-steps: The horizontal value of the first midpoint is obtained as follows: D1 = [(b2 × b5) - (2 × b3 × b4)] / [(4 × b1 × b3) - (b2)] 2 [); where D1 is the x-value of the first midpoint; The first midpoint ordinate is obtained as: D2 = [(b2 × b4) - (2 × b1 × b5)] / [(4 × b1 × b3) - (b2)] 2 [); where D2 is the ordinate of the first midpoint; Obtain point (D1, D2) and mark it as the first reference midpoint; The real-time fitted contour is obtained as: b1×X 2 +b2×X×Y+b3×Y 2+b4×X+b4×Y+b5=0.

[0011] Furthermore, step S200 also includes the following sub-steps: The straight line passing through the real-time contour coordinate point and the first reference midpoint is marked as the first connecting line; Obtain the intersection point of the first connecting line and the function of the real-time fitted contour, and mark it as the first function intersection point; On the same first connecting straight line, obtain the distance between the intersection point of the first function and the real-time contour coordinate point, and mark it as the real-time offset distance; Real-time offset distances corresponding to all real-time contour coordinate points; Obtain the average real-time offset distance and mark it as the real-time offset average.

[0012] Further, step S300 includes the following sub-steps: Obtain defect-free images of the laser-welded molten pool of the liquid-cooled plate for power batteries and mark them as historical inspection areas. The historical detection area map is treated as the real-time detection area map to obtain the real-time average offset, which is then marked as the historical average offset.

[0013] Furthermore, step S300 also includes the following sub-steps: Obtain the average of the second set number of historical offsets; Sort the historical offsets from left to right in ascending order; The average historical offset value at one-quarter of the second set value is obtained from left to right and marked as the first historical offset value. Obtain the historical offset average at three-quarters of the second set value from left to right, and mark it as the second historical offset value; The historical offset threshold is obtained as follows: F1 = Q2 + 1.5 × (Q2 - Q1); where F1 is the historical offset threshold; Q1 is the first historical offset value, and Q2 is the second historical offset value.

[0014] Further, step S400 includes the following sub-steps: The real-time average offset is compared with the historical offset threshold. If the real-time average offset is less than or equal to the historical offset threshold, the laser welding pool of the power battery liquid cooling plate is considered to be without defects. If the real-time average offset is greater than the historical offset threshold, the laser welding pool of the power battery liquid cooling plate is considered to have defects.

[0015] The beneficial effects of this invention are as follows: This invention obtains a real-time detection area grayscale image based on the image of the laser welding molten pool area of ​​the power battery liquid cooling plate, and obtains the real-time detection area grayscale value based on the real-time detection area grayscale image; obtains a real-time segmentation threshold based on the real-time detection area grayscale value, and obtains the real-time molten pool area based on the real-time segmentation threshold; preliminarily determines whether the molten pool has defects based on the real-time molten pool area, and if the preliminary determination is that the molten pool has no defects, obtains the real-time molten pool outline; obtains the real-time outline coordinate points, the first reference midpoint, and the real-time fitted outline based on the real-time molten pool outline; and obtains the real-time outline coordinate points, the first reference midpoint, and the real-time fitted outline based on the real-time outline coordinate points, the first reference midpoint, and the real-time fitted outline. Real-time offset mean; historical offset mean is obtained based on defect-free images of laser-welded molten pools of power battery liquid cooling plates; historical offset threshold is obtained based on historical offset mean; whether there are defects in the molten pool is determined based on real-time offset mean and historical offset threshold. The advantage is that a real-time fitted contour is fitted based on the circular and elliptical contour features of the molten pool. A real-time offset mean is constructed by comparing the real-time molten pool contour with the real-time fitted contour to evaluate the closeness of the fitted contour. The real-time offset mean can be used to determine the closeness between the real-time molten pool contour and the real-time fitted contour, and thus the real-time offset mean can be used to quickly and accurately determine whether there are defects in the molten pool. The present invention obtains the historical offset threshold based on the historical offset mean. Its advantage lies in that the quartile screening method makes the maximum value of the real-time offset mean of the defect-free molten pool the historical offset threshold, thereby improving the accuracy of the threshold obtained by the real-time offset mean and thus improving the accuracy of the molten pool defect judgment. Attached Figure Description

[0016] Figure 1 This is a flowchart of the steps of the method of the present invention; Figure 2 This is a schematic diagram of the real-time molten pool profile and real-time profile coordinate points of the present invention. Figure 3 This is a schematic diagram of the real-time fitting contour, the first reference midpoint, the first connecting line, and the intersection point of the first function according to the present invention. Detailed Implementation

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

[0018] Example 1, please refer to Figure 1 As shown, this application provides an online detection method for defects in the molten pool of laser welding of liquid-cooled plates for power batteries, including the following steps: Step S100: Obtain a real-time detection area grayscale image based on the image of the laser welding molten pool area of ​​the power battery liquid cooling plate; obtain the real-time detection area grayscale value based on the real-time detection area grayscale image; obtain a real-time segmentation threshold based on the real-time detection area grayscale value; obtain the real-time molten pool area based on the real-time segmentation threshold; preliminarily determine whether the molten pool has defects based on the real-time molten pool area; if it is preliminarily determined that the molten pool has no defects, obtain the real-time molten pool outline; Step S100 includes the following sub-steps: Step S101: Obtain an image of the laser welding molten pool area of ​​the power battery liquid cooling plate and mark it as a real-time detection area map; Step S102: Mark the RGB value of each pixel in the real-time detection area map as the real-time detection RGB value; Step S103: Convert all real-time detection RGB values ​​in the real-time detection area image into grayscale values ​​to obtain a grayscale image, and mark it as the real-time detection area grayscale image; Step S104: Mark the gray value of each pixel in the grayscale image of the real-time detection area as the grayscale value of the real-time detection area.

[0019] Step S105: Within the grayscale value range of 0 to 255, set a number of grayscale range divisions, marked as the first division number; for example, the first division number is 8. Step S106: Divide the grayscale value range from 0 to 255 into a first number of equal ranges, and mark them as the first division ranges; sort the first division ranges from left to right according to the size of the data within the first division ranges. In practical applications, the grayscale value range from 0 to 255 is divided into 8 equal ranges, which are marked as the first division range; for example, a first division range is from 0 to 31, and the length of the equal range is 32.

[0020] Step S107: Obtain the number of gray values ​​in the real-time detection area within each first division range, and mark them as the first distribution number; Step S108: Obtain the first division range with the largest number of first distributions and mark it as the first target range; Step S109: Obtain the first division range to the right of the first target range and mark it as the second division range; Step S110: Mark the second target range as the range where the number of the first distribution is greater than the number of the second division range on the left and right sides; Step S111: Obtain the second division range between the second target range and the first target range, and mark it as the third division range; Step S112: Obtain the third division range with the smallest number of first distributions and mark it as the third target range; Step S113: Obtain the average value of the third target range and mark it as the real-time segmentation threshold; because the background is the welding area and the molten pool is the bright area, the grayscale value will be divided into two areas for analysis, and the real-time segmentation threshold is the segmentation threshold. In practical applications, the range of the third target obtained is 96 to 127, and the average value of the range of the third target is 111.5. The real-time segmentation threshold is kept to be an integer, so the real-time segmentation threshold is 111.

[0021] Step S114: Mark the gray values ​​of the real-time detection area that are greater than the real-time segmentation threshold as the real-time melt pool gray values; because the melt pool area is a bright area, the gray value distribution is larger than the background, so the gray values ​​of the real-time detection area that are greater than the real-time segmentation threshold are marked as the real-time melt pool gray values; the real-time melt pool gray values ​​are the gray values ​​of the melt pool area. In practical applications, for example, gray values ​​of the real-time detection area greater than 111 are marked as real-time melt pool gray values.

[0022] Step S115: Obtain the continuous region composed of pixels corresponding to the real-time melt pool grayscale value, and mark it as the real-time melt pool region; For practical applications, please refer to Figure 2 The diagram shown illustrates the acquisition of the real-time molten pool profile.

[0023] Step S116: Determine whether all real-time molten pool areas are a single, unified area. If not, a defect has occurred in the weld pool. If not, obtain the outline of the real-time molten pool area and mark it as the real-time molten pool outline. If the power is too high, it will be impossible to form a single, unified molten pool, resulting in a real-time molten pool area, which indicates a defect. The remaining areas require further judgment.

[0024] Step S200: Obtain the real-time contour coordinates, the first reference midpoint, and the real-time fitted contour based on the real-time molten pool contour; obtain the real-time offset mean based on the real-time contour coordinates, the first reference midpoint, and the real-time fitted contour; Step S200 includes the following sub-steps: Step S201: Establish a plane rectangular coordinate system and mark it as the first reference coordinate system; Step S202: Place the real-time molten pool profile in the first quadrant of the first reference coordinate system; Step S203: Obtain a first number of uniformly distributed coordinate points on the real-time molten pool profile and mark them as real-time profile coordinate points; Step S205, set the real-time fitting equation as: a1×X 2 +a2×X×Y+a3×Y 2+a4×X+a5×Y+a6=0; where X is the horizontal axis value of the first reference coordinate system, Y is the vertical axis value of the first reference coordinate system, and a1, a2, a3, a4, a5, and a6 are the fitting constants in the real-time fitting equation; the normal molten pool shape is close to a circle and an ellipse; the faster the welding speed, the closer it is to an ellipse, and the slower the welding speed, the closer it is to a circle; therefore, it can be fitted with the general equation of an ellipse. Step S206: Perform function fitting on all real-time contour coordinate points using the real-time fitting equation to obtain the specific values ​​of a1, a2, a3, a4, a5 and a6, which are labeled as b1, b2, b3, b4, b5 and b6 respectively.

[0025] Step S207, obtain the horizontal value of the first midpoint: D1=[(b2×b5)-(2×b3×b4)] / [(4×b1×b3)-(b2 2 [); where D1 is the x-value of the first midpoint; Step S208, obtain the first midpoint ordinate value as: D2=[(b2×b4)-(2×b1×b5)] / [(4×b1×b3)-(b2...]] 2 [); where D2 is the ordinate of the first midpoint; Step S209: Obtain point (D1, D2) and mark it as the first reference midpoint; fit the center of the contour in real time, i.e., the center of the ellipse; Step S210, obtain the real-time fitted contour as: b1×X 2 +b2×X×Y+b3×Y 2 +b4×X+b4×Y+b5=0; For practical applications, please refer to Figure 3 As shown, this is a schematic diagram of obtaining the real-time fitted contour, with the first reference midpoint being the point (0.8, 0.8).

[0026] Step S211: Obtain the straight line passing through the real-time contour coordinate point and the first reference midpoint, and mark it as the first connecting straight line; Step S212: Obtain the intersection point of the first connecting line and the function of the real-time fitted contour, and mark it as the first function intersection point; Step S213: On the same first connecting straight line, obtain the distance between the intersection point of the first function and the real-time contour coordinate point, and mark it as the real-time offset distance; Step S214: Real-time offset distances corresponding to all real-time contour coordinate points; Step S215: Obtain the average value of the real-time offset distance and mark it as the real-time offset average value. Therefore, if the molten pool is free of defects, the molten pool is closer to a circle or ellipse, so the real-time offset average value is smaller. If defects are present, the real-time offset average value will increase. Therefore, the real-time offset average value can be used to determine whether the molten pool contains defects. For practical applications, please refer to Figure 3 As shown, a schematic diagram of a first connecting line is obtained. The intersection point of this first connecting line and the function of the real-time fitted contour is marked as the first function intersection point; the real-time offset distance is 0.04mm; similarly, the real-time offset distances corresponding to all real-time contour coordinate points are obtained, and then the average real-time offset value is obtained as 0.01mm.

[0027] Step S300: Obtain the historical offset average value based on the defect-free image of the laser welding molten pool of the power battery liquid cooling plate; obtain the historical offset threshold value based on the historical offset average value; Step S300 includes the following sub-steps: Step S301: Obtain an image of the defect-free molten pool from the laser welding of the power battery liquid cooling plate and mark it as a historical inspection area map; Step S302: Treat the historical detection area map as the real-time detection area map to obtain the real-time offset average value, and mark it as the historical offset average value; this facilitates obtaining the real-time offset average value of the normal molten pool contour.

[0028] Step S303: Obtain the average of the second set value of historical offsets; for example, the second set value is 100. Step S304: Sort the historical offset averages from left to right in ascending order; Step S305: Obtain the historical offset average value at one-quarter of the second set value from left to right, and mark it as the first historical offset value; Step S306: Obtain the historical offset average value at three-quarters of the second set value from left to right, and mark it as the second historical offset value; Step S307: Obtain the historical offset threshold as: F1 = Q2 + 1.5 × (Q2 - Q1); where F1 is the historical offset threshold; Q1 is the first historical offset value, and Q2 is the second historical offset value; referring to the quartile screening method, filter out abnormally large historical offset average values; and then obtain the accurate historical offset average maximum value; in practical applications, for example, if the historical offset threshold is obtained as 0.02mm; then the real-time average maximum value of the normal molten pool is 0.02mm; if it exceeds this, a defect appears in the molten pool profile; Step S400: Determine whether the molten pool has defects based on the real-time average offset and the historical offset threshold; Step S400 includes the following sub-steps: Step S401: Determine the magnitude of the real-time offset mean and the historical offset threshold. If the real-time offset mean is less than or equal to the historical offset threshold, it is considered that the laser welding molten pool of the power battery liquid cooling plate is defect-free; if the real-time offset mean is greater than the historical offset threshold, it is considered that the laser welding molten pool of the power battery liquid cooling plate has defects; Determination of molten pool contour defects. In practical applications, if the real-time average offset of 0.01mm is less than the historical offset threshold of 0.02mm, the laser welding molten pool of the power battery liquid cooling plate is considered to be without defects.

[0029] Example 2: This application also provides an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps of an online detection method for defects in the molten pool of a power battery liquid-cooled plate laser welding are performed to achieve the following functions: obtaining a real-time detection area grayscale image based on an image of the molten pool area of ​​the power battery liquid-cooled plate laser welding; obtaining the real-time detection area grayscale value based on the real-time detection area grayscale image; obtaining a real-time segmentation threshold based on the real-time detection area grayscale value; obtaining the real-time molten pool area based on the real-time segmentation threshold; making a preliminary judgment on whether the molten pool is defective based on the real-time molten pool area; if the preliminary judgment is that the molten pool is defect-free, obtaining the real-time molten pool outline; obtaining the real-time outline coordinate points, the first reference midpoint, and the real-time fitted outline based on the real-time molten pool outline; obtaining the real-time offset mean based on the real-time outline coordinate points, the first reference midpoint, and the real-time fitted outline; obtaining the historical offset mean based on an image of a defect-free molten pool of the power battery liquid-cooled plate laser welding; obtaining the historical offset threshold based on the historical offset mean; and determining whether the molten pool is defective based on the real-time offset mean and the historical offset threshold.

[0030] Furthermore, when the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0031] Example 3: This application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the online detection method for defects in the molten pool of laser welding of a power battery liquid-cooled plate provided by the above methods. The method includes: obtaining a real-time detection area grayscale image based on an image of the molten pool area of ​​the laser welding of the power battery liquid-cooled plate; obtaining a real-time detection area grayscale value based on the real-time detection area grayscale image; obtaining a real-time segmentation threshold based on the real-time detection area grayscale value; obtaining a real-time molten pool area based on the real-time segmentation threshold; preliminarily determining whether the molten pool is defective based on the real-time molten pool area; if the molten pool is preliminarily determined to be defect-free, obtaining a real-time molten pool contour; obtaining real-time contour coordinate points, a first reference midpoint, and a real-time fitted contour based on the real-time molten pool contour; obtaining a real-time offset mean based on the real-time contour coordinate points, the first reference midpoint, and the real-time fitted contour; obtaining a historical offset mean based on an image of a defect-free molten pool of the laser welding of the power battery liquid-cooled plate; obtaining a historical offset threshold based on the historical offset mean; and determining whether the molten pool is defective based on the real-time offset mean and the historical offset threshold.

[0032] Example 4: This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it performs the steps of the above-described online detection method for defects in the laser welding molten pool of a power battery liquid-cooled plate, to achieve the following functions: obtaining a real-time detection area grayscale image based on an image of the laser welding molten pool area of ​​the power battery liquid-cooled plate; obtaining a real-time detection area grayscale value based on the real-time detection area grayscale image; obtaining a real-time segmentation threshold based on the real-time detection area grayscale value; obtaining a real-time molten pool area based on the real-time segmentation threshold; preliminarily determining whether the molten pool is defective based on the real-time molten pool area; if the molten pool is preliminarily determined to be defect-free, obtaining a real-time molten pool contour; obtaining real-time contour coordinate points, a first reference midpoint, and a real-time fitted contour based on the real-time molten pool contour; obtaining a real-time offset mean based on the real-time contour coordinate points, the first reference midpoint, and the real-time fitted contour; obtaining a historical offset mean based on an image of a defect-free laser welding molten pool of the power battery liquid-cooled plate; obtaining a historical offset threshold based on the historical offset mean; and determining whether the molten pool is defective based on the real-time offset mean and the historical offset threshold.

[0033] Based on the above description of the embodiments, the embodiments of the present invention can be provided as methods, systems, or computer program products. Based on this understanding, the above technical solutions, in essence or in terms of their contribution to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or certain parts of the embodiments.

[0034] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces. The indirect coupling or communication connection between systems, modules, and units may be electrical, mechanical, or other forms.

[0035] Finally, it should be noted that the above 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.

Claims

1. A method for online detection of defects in the molten pool of laser welding for liquid-cooled plates of power batteries, characterized in that, Includes the following steps: Step S100: Obtain a grayscale image of the real-time detection area based on the image of the laser welding molten pool area of ​​the power battery liquid cooling plate; obtain the grayscale value of the real-time detection area based on the grayscale image of the real-time detection area; obtain a real-time segmentation threshold based on the grayscale value of the real-time detection area; obtain the real-time molten pool area based on the real-time segmentation threshold; preliminarily determine whether the molten pool is defective based on the real-time molten pool area; if it is preliminarily determined that the molten pool is not defective, obtain the real-time molten pool outline. Step S200: Obtain the real-time contour coordinates, the first reference midpoint, and the real-time fitted contour based on the real-time molten pool contour; obtain the real-time offset mean based on the real-time contour coordinates, the first reference midpoint, and the real-time fitted contour. Step S300: Obtain the historical offset average value based on the image of the defect-free molten pool of the laser welding of the power battery liquid cooling plate; obtain the historical offset threshold value based on the historical offset average value. Step S400: Determine whether the molten pool has defects based on the real-time average offset and the historical offset threshold.

2. The method for online detection of defects in the molten pool of laser welding for liquid-cooled plates of power batteries according to claim 1, characterized in that, Step S100 includes the following sub-steps: Acquire images of the laser welding molten pool area of ​​the liquid cooling plate for power batteries and mark it as a real-time detection area map; Mark the RGB value of each pixel in the real-time detection area map as the real-time detection RGB value; Convert all real-time detection RGB values ​​in the real-time detection area image to grayscale values ​​to obtain a grayscale image, and mark it as the real-time detection area grayscale image; The grayscale value of each pixel in the grayscale image of the real-time detection area is marked as the grayscale value of the real-time detection area.

3. The method for online detection of defects in the molten pool of laser welding for liquid-cooled plates of power batteries according to claim 2, characterized in that, Step S100 also includes the following sub-steps: Within the grayscale value range of 0 to 255, a number of grayscale range divisions is set and marked as the first division number; Divide the grayscale value range from 0 to 255 into a number of equal-length ranges, and mark them as the first ranges; sort the first ranges from left to right according to the size of the data within each range. The number of grayscale values ​​in the real-time detection area within each first division range is obtained and marked as the first distribution number; Obtain the first partition range with the largest number of first distributions, and mark it as the first target range; Obtain the first division range to the right of the first target range and mark it as the second division range; The second target range is defined as the range where the number of the first distribution is greater than the number of the second divisions on the left and right sides. Obtain the second division range between the second target range and the first target range, and mark it as the third division range; Find the third partition range with the smallest number of first distributions and mark it as the third target range; Obtain the average value of the third target range and mark it as the real-time segmentation threshold.

4. The method for online detection of defects in the molten pool of laser welding for liquid-cooled plates of power batteries according to claim 3, characterized in that, Step S100 also includes the following sub-steps: The gray values ​​of the real-time detection area that are greater than the real-time segmentation threshold are marked as the real-time melt pool gray values. Obtain the continuous region composed of pixels corresponding to the real-time melt pool grayscale value, and mark it as the real-time melt pool region; Determine whether all real-time molten pool regions are a single, unified area. If not, a defect exists in the weld pool. Otherwise, obtain the outline of the real-time molten pool region and mark it as the real-time molten pool outline.

5. The method for online detection of defects in the molten pool of laser welding for liquid-cooled plates of power batteries according to claim 4, characterized in that, Step S200 includes the following sub-steps: Establish a Cartesian coordinate system and label it as the first reference coordinate system; Place the real-time molten pool profile in the first quadrant of the first reference coordinate system; Obtain a first number of uniformly distributed coordinate points on the real-time molten pool profile and mark them as real-time profile coordinate points; The real-time fitting equation is set as: a1×X 2 +a2×X×Y+a3×Y 2 +a4×X+a5×Y+a6=0; where X is the horizontal axis value of the first reference coordinate system, Y is the vertical axis value of the first reference coordinate system, and a1, a2, a3, a4, a5 and a6 are the fitting constants in the real-time fitting equation. All real-time contour coordinate points are fitted with a function using a real-time fitting equation to obtain the specific values ​​of a1, a2, a3, a4, a5, and a6, which are then labeled as b1, b2, b3, b4, b5, and b6, respectively.

6. The method for online detection of defects in the molten pool of laser welding for liquid-cooled plates of power batteries according to claim 5, characterized in that, Step S200 also includes the following sub-steps: The horizontal value of the first midpoint is obtained as follows: D1 = [(b2 × b5) - (2 × b3 × b4)] / [(4 × b1 × b3) - (b2)] 2 )]; Where D1 is the horizontal value of the first midpoint; The first midpoint ordinate is obtained as follows: D2 = [(b2 × b4) - (2 × b1 × b5)] / [(4 × b1 × b3) - (b2)] 2 [); where D2 is the ordinate of the first midpoint; Obtain point (D1, D2) and mark it as the first reference midpoint; The real-time fitted contour is obtained as: b1×X 2 +b2×X×Y+b3×Y 2 +b4×X+b4×Y+b5=0.

7. The method for online detection of defects in the molten pool of laser welding for liquid-cooled plates of power batteries according to claim 6, characterized in that, Step S200 also includes the following sub-steps: The straight line passing through the real-time contour coordinate point and the first reference midpoint is marked as the first connecting line; Obtain the intersection point of the first connecting line and the function of the real-time fitted contour, and mark it as the first function intersection point; On the same first connecting straight line, obtain the distance between the intersection point of the first function and the real-time contour coordinate point, and mark it as the real-time offset distance; Real-time offset distances corresponding to all real-time contour coordinate points; Obtain the average real-time offset distance and mark it as the real-time offset average.

8. The method for online detection of defects in the molten pool of laser welding for liquid-cooled plates of power batteries according to claim 7, characterized in that, Step S300 includes the following sub-steps: Obtain defect-free images of the laser-welded molten pool of the liquid-cooled plate for power batteries and mark them as historical inspection areas. The historical detection area map is treated as the real-time detection area map to obtain the real-time average offset, which is then marked as the historical average offset.

9. The method for online detection of defects in the molten pool of laser welding for liquid-cooled plates of power batteries according to claim 8, characterized in that, Step S300 also includes the following sub-steps: Obtain the average of the second set number of historical offsets; Sort the historical offsets from left to right in ascending order; The average historical offset value at one-quarter of the second set value is obtained from left to right and marked as the first historical offset value. Obtain the historical offset average at three-quarters of the second set value from left to right, and mark it as the second historical offset value; The historical offset threshold is obtained as follows: F1 = Q2 + 1.5 × (Q2 - Q1); Where F1 is the historical offset threshold; Q1 is the first historical offset value; and Q2 is the second historical offset value.

10. The method for online detection of defects in the molten pool of laser welding for liquid-cooled plates of power batteries according to claim 9, characterized in that, Step S400 includes the following sub-steps: The real-time average offset is compared with the historical offset threshold. If the real-time average offset is less than or equal to the historical offset threshold, the laser welding pool of the power battery liquid cooling plate is considered to be without defects. If the real-time average offset is greater than the historical offset threshold, the laser welding pool of the power battery liquid cooling plate is considered to have defects.