Testing methods, apparatus, equipment, storage media and procedures

By introducing symmetry detection into weld stamp inspection and combining the prior symmetry axis and pixel pair attribute information of the weld stamp, the problem of insufficient welding quality inspection accuracy in the existing technology is solved, and high-precision welding quality assessment and process optimization are achieved.

CN122306824APending Publication Date: 2026-06-30CONTEMPORARY AMPEREX RUNZHI SOFTWARE TECH LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CONTEMPORARY AMPEREX RUNZHI SOFTWARE TECH LTD
Filing Date
2026-05-29
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In the existing technology, area-based weld mark detection methods cannot accurately characterize battery welding quality, especially when the cell tabs lack adapter support structures, resulting in deformation problems and insufficient welding quality detection accuracy.

Method used

By adding symmetry detection of solder marks to the area judgment, multiple symmetry axes to be measured are determined using the prior symmetry axis of the solder marks, the symmetry of the solder marks is calculated, and the structural integrity is evaluated by combining the attribute information of pixel pairs.

Benefits of technology

It improves the accuracy of welding quality inspection, reduces the false judgment rate, can detect hidden defects such as one-sided cold welding and electrode misalignment, optimizes welding process parameters, and enhances the intelligent manufacturing level of battery production lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122306824A_ABST
    Figure CN122306824A_ABST
Patent Text Reader

Abstract

This application provides a detection method, apparatus, device, storage medium, and program product. The method includes: segmenting a solder mark in a battery image to be processed to obtain a foreground image including the solder mark; in response to the solder mark area being greater than or equal to a preset area threshold, determining multiple test symmetry axes of the solder mark within the solder mark area in the foreground image based on the prior symmetry axis direction of the solder mark; the prior symmetry axis is determined based on the solder mark being structurally intact, and the angle between each test symmetry axis and the prior symmetry axis is less than a preset angle; determining the symmetry degree of the solder mark on each test symmetry axis based on symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each test symmetry axis; in response to the existence of at least one test symmetry axis having a symmetry degree greater than a symmetry degree threshold, determining that the structural integrity of the solder mark meets the integrity condition. By adding solder mark symmetry detection to the area-based judgment, the false judgment rate is effectively reduced, and product quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery testing technology, and includes, but is not limited to, a testing method, apparatus, device, storage medium, and program product. Background Technology

[0002] With the development of new energy technologies, batteries have been widely used. Ultrasonic welding is an indispensable process in battery production, and this process requires the inspection of weld integrity.

[0003] The relevant technology usually uses a semantic segmentation model to extract the outline of the solder stamp, and then calculates the number of foreground points as the area of ​​the solder stamp, so as to determine whether the solder stamp is complete.

[0004] However, in current battery manufacturing processes, the cell tabs commonly exhibit deformation after welding due to the lack of an adapter support structure, resulting in tab sagging or warping. This structural defect causes variations in the height of the tabs at different locations, leading to fluctuations in imaging distance. Current area-based weld inspection methods cannot accurately characterize the integrity and welding quality of the weld marks, failing to meet the high-precision requirements of modern battery production lines for weld quality inspection. Summary of the Invention

[0005] To address the problems existing in the related technologies, this application provides a detection method, apparatus, device, storage medium, and program product. In addition to judging by area, the symmetry detection of the solder mark is added. The dual detection mechanism can effectively reduce the false judgment rate and improve product quality.

[0006] In a first aspect, this application provides a detection method, which includes: performing image segmentation on a battery image to be processed to obtain a foreground image including the solder; in response to the area of ​​the solder being greater than or equal to a preset area threshold, determining multiple test symmetry axes of the solder within the solder area of ​​the solder in the foreground image based on the prior symmetry axis direction of the solder; the prior symmetry axis is determined based on the solder being structurally intact; the angle between each test symmetry axis and the prior symmetry axis is less than a preset angle; determining the symmetry degree of the solder on each test symmetry axis based on symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each test symmetry axis; wherein, a foreground pixel pair represents a pixel pair including a foreground pixel, a symmetrical foreground pixel pair represents a pixel pair consisting entirely of foreground pixels, and the foreground pixel is the pixel corresponding to the solder; in response to the existence of at least one test symmetry axis having a symmetry degree greater than or equal to a symmetry degree threshold, determining that the structural integrity of the solder satisfies the integrity condition.

[0007] In the above embodiments, when performing structural integrity testing on weld marks, in addition to judging by area, symmetry testing of weld marks is added. This not only detects the size of the weld marks but also captures defects that cannot be characterized by area, such as unilateral cold welds and welding misalignment. The dual detection mechanism can effectively reduce the false judgment rate and improve product quality. Furthermore, by measuring the symmetry of multiple axes of symmetry, the rationality of welding parameters, such as the weld head trajectory and pressure distribution, can be inferred, enabling closed-loop optimization of process parameters and achieving welding process optimization, thus contributing to the intelligent manufacturing upgrade of battery production lines.

[0008] In some embodiments, the detection method further includes: determining attribute information of each pixel pair on both sides of each axis of symmetry to be tested based on each axis of symmetry to be tested in the foreground image; the attribute information includes at least the pixel value and pixel type of the pixel in the pixel pair, and the pixel type includes at least the foreground pixel; and determining symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested based on the attribute information.

[0009] In the above embodiments, by determining the attribute information of each pixel pair on both sides of each axis of symmetry to be tested, the interference of background pixels on the symmetry judgment can be eliminated, and the symmetry analysis is performed only on the foreground pixels directly related to the solder stamp. This improves the pertinence and accuracy of the symmetry judgment, and provides a more accurate and reliable data foundation for subsequent determination of image symmetry based on the attribute information of pixel pairs, thereby improving the accuracy of solder stamp symmetry detection.

[0010] In some embodiments, based on attribute information, determining symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested includes: determining pixel pairs in the foreground image that satisfy validity conditions and symmetry conditions on both sides of each axis of symmetry to be tested as symmetrical foreground pixel pairs; wherein, the validity condition indicates that any pixel in the pixel pair is a foreground pixel; the symmetry condition indicates that the pixel values ​​of the pixels in the pixel pair are the same; and determining pixel pairs in the foreground image that satisfy validity conditions on both sides of each axis of symmetry to be tested as foreground pixel pairs.

[0011] In the above embodiments, the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested can be quickly determined by the validity condition and symmetry condition. This allows for rapid focus on truly valid candidate pixel pairs, significantly reducing invalid calculations. This not only improves production line efficiency but also achieves high-quality extraction of symmetrical regions on both sides of the axis of symmetry to be tested, reducing the false detection rate.

[0012] In some embodiments, determining the symmetry of the soldering on each axis of symmetry based on the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested includes: determining a first number of symmetrical foreground pixel pairs and a second number of symmetrical foreground pixel pairs on both sides of each axis of symmetry to be tested; and determining the ratio of the first number to the second number corresponding to each axis of symmetry to be tested as the symmetry of the soldering on each axis of symmetry to be tested.

[0013] In the above embodiments, by using symmetrical foreground pixel pairs and foreground pixel pairs, symmetry calculation can be quickly completed after obtaining pixel pair information, generating a normalized symmetry score for each symmetry axis to be tested. This low computational complexity makes the method suitable for scenarios with high processing speed requirements, such as battery manufacturing production lines, thus improving processing efficiency.

[0014] In some embodiments, determining the symmetry of the soldering on each axis of symmetry based on the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested includes: determining a third number of asymmetrical foreground pixel pairs and asymmetrical foreground pixel pairs in the foreground pixel pairs based on the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested; determining the ratio of the first number corresponding to each axis of symmetry to be tested to the target number as the symmetry of the soldering on each axis of symmetry to be tested; wherein the target number is the sum of the product of the third number and the preset weight and the first number.

[0015] In the above embodiments, asymmetric foreground pixel pairs and preset weights are introduced to amplify the negative impact of asymmetric pixel pairs on symmetry, so that the symmetry calculation results can more accurately reflect the actual degree of symmetry of the image. Furthermore, by adjusting the value of the preset weight α, it can flexibly adapt to the requirements of different application scenarios for the strictness of symmetry evaluation.

[0016] In some embodiments, determining that the structural integrity of a solder mark satisfies an integrity condition in response to the existence of at least one symmetry axis to be tested having a symmetry degree greater than or equal to a symmetry degree threshold includes: determining a target symmetry axis to be tested and a target symmetry degree corresponding to the target symmetry axis among a plurality of symmetry axes to be tested based on the symmetry degree of each symmetry axis to be tested; wherein the maximum symmetry degree among the symmetry degrees of each symmetry axis to be tested is determined as the target symmetry degree; and determining that the structural integrity of a solder mark satisfies an integrity condition in response to the target symmetry degree being greater than or equal to the symmetry degree threshold. Correspondingly, the detection method further includes: determining that the structural integrity of a solder mark does not satisfy an integrity condition in response to the target symmetry degree being less than the symmetry degree threshold.

[0017] In the above embodiments, the symmetry threshold can capture defects that have qualified area but asymmetrical shape and contour distribution, introducing a stable and measurable evaluation dimension and constructing a reliable production line quality control process.

[0018] In some embodiments, determining multiple test axes of symmetry of a solder stamp within a solder stamp region in a foreground image based on the a priori axis of symmetry of the solder stamp includes: adjusting the size of the foreground image to obtain a target image including the solder stamp; the size of the target image is smaller than that of the foreground image; determining multiple test axes of symmetry of the solder stamp within a target region in the solder stamp region of the target image; the target region is a region formed by extending a predetermined distance to both sides with the a priori axis of symmetry as the center line.

[0019] In the above embodiments, adjusting the size of the foreground image can significantly reduce the total number of pixels that need to be processed. For scenarios that require real-time processing, such as battery production lines, this can greatly improve processing speed and reduce latency.

[0020] In some embodiments, adjusting the size of the foreground image to obtain a target image including the solder mark includes: extracting connected components from the foreground image to obtain at least one connected component; performing region union processing on connected components with areas greater than a connected component threshold in the at least one connected component to obtain the circumscribed region of the solder mark; and expanding the circumscribed region in a direction perpendicular to the prior axis of symmetry of the solder mark to obtain the target image.

[0021] In the above embodiments, by combining connected component analysis with area thresholding, the influence of random noise and small interfering objects is effectively eliminated. The outer region is used to not only locate the solder stamp, but also significantly reduce the background pixels. The target image generated by expanding the outer region of the solder stamp has symmetrical and sufficient space on both sides of the axis of symmetry to be tested, which provides a basis for subsequent accurate calculation of the axis of symmetry to be tested and pixel-level symmetry matching. It can effectively prevent evaluation errors caused by cutting off the symmetrical edge due to excessively tight cropping.

[0022] In some embodiments, determining multiple axes of symmetry of the solder joint within a target area in the solder joint region of the target image includes: performing a pixel-by-pixel traversal within the target area to obtain multiple axes of symmetry of the solder joint.

[0023] In the above embodiments, by using a preset standard shape, the search for the axis of symmetry to be tested is compressed from a global search to a local interval, which greatly reduces the number of axes of symmetry to be tested. The preset shape provides an accurate initial estimate, ensuring that the search starting point is close to the actual axis of symmetry to be tested, reducing the amount of computation and improving the detection efficiency.

[0024] Secondly, embodiments of this application provide a detection device, comprising: an image segmentation module for segmenting a solder mark in a battery image to be processed to obtain a foreground image including the solder mark; a first determination module for determining multiple test symmetry axes of the solder mark within the solder mark area in the foreground image based on the prior symmetry axis direction of the solder mark, in response to the area of ​​the solder mark being greater than or equal to a preset area threshold; the prior symmetry axis is determined based on the solder mark being structurally intact; the angle between each test symmetry axis and the prior symmetry axis is less than a preset angle; a second determination module for determining the symmetry degree of the solder mark on each test symmetry axis based on symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each test symmetry axis; wherein, a foreground pixel pair represents a pixel pair including a foreground pixel, a symmetrical foreground pixel pair represents a pixel pair consisting entirely of foreground pixels, and the foreground pixel is the pixel corresponding to the solder mark; and a third determination module for determining that the structural integrity of the solder mark satisfies the integrity condition in response to the existence of at least one test symmetry axis having a symmetry degree greater than or equal to a symmetry degree threshold.

[0025] Thirdly, embodiments of this application provide a detection device, which includes: a memory for storing executable instructions; and a processor for executing the executable instructions stored in the memory to implement the above-described detection method.

[0026] Fourthly, embodiments of this application provide a computer-readable storage medium storing executable instructions, which, when a processor executes the executable instructions, implement the above-described detection method.

[0027] Fifthly, embodiments of this application provide a computer program product, which includes executable instructions stored in a computer-readable storage medium; when the processor of the detection method reads the executable instructions from the computer-readable storage medium and executes the executable instructions, the above-described detection method is implemented.

[0028] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the structure of the detection device provided in the embodiments of this application; Figure 2 This is an optional flowchart illustrating the detection method provided in the embodiments of this application. Figure 1 ; Figure 3 This is a schematic diagram of the battery image to be processed provided in an embodiment of this application; Figure 4This is a schematic diagram of the foreground image provided in an embodiment of this application; Figure 5 The symmetry histogram provided in the embodiments of this application Figure 1 ; Figure 6 The symmetry histogram corresponding to the solder mark provided in the embodiments of this application is... Figure 2 ; Figure 7 This is a schematic flowchart of the solder mark determination method provided in the embodiments of this application.

[0030] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0032] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this application pertain. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit the application.

[0033] Currently, ultrasonic welding is a solid-state joining technology that utilizes high-frequency vibration waves transmitted to two closely fitting working surfaces. Under continuous pressure, high-frequency micro-amplitude relative friction occurs at the contact interface. This friction effectively removes oxide layers and contaminants from metal surfaces, and under the combined action of frictional heat and pressure, it promotes plastic flow, diffusion, and metallurgical bonding of metal atoms or molecules at the interface, thereby achieving a reliable connection of the workpieces in a solid state. For example, in the manufacturing of new energy batteries, ultrasonic welding is used to bond battery tabs to current collectors (such as copper / aluminum foil). This process forms a geometrically regular symmetrical weld mark on the tab surface, created by the serrated imprint of the welding head. The symmetry and structural integrity of this weld mark are key visual indicators for evaluating the uniformity of welding energy distribution, alignment accuracy, and the quality of the final joint.

[0034] In battery manufacturing, ultrasonic welding requires precise inspection of weld integrity to ensure that the welding quality meets process requirements. Current technologies employ semantic segmentation deep learning models to segment the weld area at the pixel level and extract the weld outline; then, the weld area is calculated by counting the number of foreground points in the segmentation results, and this is used as the primary basis for judging weld integrity.

[0035] However, this type of detection method based on two-dimensional area cannot fully reflect the three-dimensional morphological characteristics of the solder mark by relying solely on the area parameter. It cannot accurately characterize the shape and structural integrity of the solder mark, cannot accommodate slight upturns or dips that cause fluctuations in the solder mark area, and cannot fully reflect the symmetrical distribution characteristics of the solder mark along the length direction. This results in insufficient sensitivity for detecting quality problems such as solder mark edge defects and uneven solder mark width, and a high false judgment rate for cells without adapter pieces.

[0036] To alleviate the problems existing in the relevant technologies, the applicant believes that, based on the area judgment, logic for finding the optimal axis of symmetry to be measured and calculating the symmetry of the solder mark can be added, which is more in line with the production line inspection needs, can accommodate the situation where the solder mark area fluctuates due to the tab sagging or tilting, and enhances the accuracy of the judgment.

[0037] Based on the above considerations, the inventors, through in-depth research, have provided a detection method that can segment the solder marks in a battery image to be processed, obtaining a foreground image including the solder marks; in response to the area of ​​the solder marks being greater than or equal to a preset area threshold, based on the prior axis of symmetry of the solder marks, multiple test axes of symmetry of the solder marks are determined within the solder mark area of ​​the solder marks in the foreground image; the prior axis of symmetry is determined based on the condition that the solder marks are structurally intact; the angle between each test axis of symmetry and the prior axis of symmetry is less than a preset angle; based on the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each test axis of symmetry, the symmetry of the solder marks on each test axis of symmetry is determined; wherein, a foreground pixel pair represents a pixel pair including a foreground pixel, a symmetrical foreground pixel pair represents a pixel pair consisting entirely of foreground pixels, and the foreground pixel is the pixel corresponding to the solder mark; in response to the existence of at least one test axis of symmetry having a symmetry greater than or equal to a symmetry threshold, the structural integrity of the solder marks is determined to meet the integrity condition.

[0038] Thus, in this embodiment of the application, when performing structural integrity testing on weld marks, in addition to judging by area, symmetry testing of the weld marks is added. This not only detects the size of the weld marks but also captures hidden defects that cannot be characterized by area, such as unilateral cold solder joints and electrode misalignment. The dual detection mechanism can effectively reduce the false judgment rate and improve product quality. Furthermore, by measuring the symmetry of multiple axes of symmetry, the rationality of welding parameters, such as the weld head trajectory and pressure distribution, can be inferred, enabling closed-loop optimization of process parameters and achieving welding process optimization, thus contributing to the intelligent manufacturing upgrade of battery production lines.

[0039] The application of new energy batteries in daily life and industry is becoming increasingly widespread. New energy batteries are not only used in energy storage power systems such as hydropower, thermal power, wind power, and solar power plants, but also widely used in electric vehicles such as electric bicycles, electric motorcycles, and electric cars, as well as in aerospace and other fields. With the continuous expansion of the application fields of power batteries, the market demand is also constantly increasing. In the embodiments of this application, the battery involved can be a battery cell, also known as a battery unit. A battery cell refers to a basic unit that can realize the mutual conversion of chemical energy and electrical energy, and can be used to make battery modules or battery packs to supply power to electrical devices. A battery cell can be a rechargeable battery, which refers to a battery cell that can be recharged after discharge to activate the active materials and continue to be used. Battery cells can be lithium-ion batteries, sodium-ion batteries, sodium-lithium-ion batteries, lithium metal batteries, sodium metal batteries, lithium-sulfur batteries, magnesium-ion batteries, nickel-metal hydride batteries, nickel-cadmium batteries, lead-acid batteries, etc., and the embodiments of this application are not limited to these.

[0040] In this application embodiment, a battery cell can refer to any shape, such as a square cell or a round cell. A battery cell typically refers to a battery cell, which is one of the basic units constituting a battery. The battery cell is the core component of a battery, responsible for storing and releasing electrical energy. A battery cell can be a lithium-ion battery cell (Li-ion Cell), a lithium-polymer battery cell (Li-polymer Cell), a nickel-metal hydride battery cell (NiMH Cell), etc. This application embodiment does not limit the type of battery cell; it can be selected according to the actual application scenario. In this application embodiment, the battery cell is the core component of a battery pack. A battery pack typically includes multiple battery cells, which are combined together to provide the required electrical capacity and voltage. The components of a battery pack include at least: individual battery cells, a battery management system (BMS), a casing, connecting harnesses, connectors, and interfaces. These components work together to combine the individual battery cells into a fully functional battery pack for various application scenarios. For example, battery packs can be used in electric vehicles, energy storage devices, portable electronic devices, solar power systems, wind power systems, emergency backup power supplies, power tools, or electric bicycles, etc. This application does not impose any limitations on these applications; specific applications can be selected based on actual usage scenarios.

[0041] It should be noted that the battery pack can use different types of battery cells, such as lithium-ion batteries, nickel-metal hydride batteries, lithium polymer batteries, and metal-air batteries (such as aluminum-air batteries), depending on the specific application requirements and performance specifications.

[0042] The following describes an exemplary application of the detection method according to the embodiments of this application. The detection method provided in the embodiments of this application can be executed by a detection device. Figure 1 This is a schematic diagram of the structure of the detection device provided in the embodiments of this application. Figure 1 The illustrated detection device 10 includes at least one processor 110, a memory 150, at least one network interface 120, and a user interface 130. The various components within the detection device are coupled together via a bus system 140. It is understood that the bus system 140 is used to enable communication between these components. In addition to a data bus, the bus system 140 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 1 The general labeled all buses as Bus System 140.

[0043] The processor 110 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), 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, etc.

[0044] User interface 130 includes one or more output devices 131 that enable the presentation of media content, and one or more input devices 132.

[0045] Memory 150 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. Memory 150 may optionally include one or more storage devices physically located away from processor 110. Memory 150 may include volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM), and volatile memory may be random access memory (RAM). The memory 150 described in this application embodiment is intended to include any suitable type of memory. In some embodiments, memory 150 is capable of storing battery data to support various operations, examples of which include agents, programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0046] Operating system 151 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks; The network communication module 152 is used to reach other computing devices via one or more (wired or wireless) network interfaces 120, exemplary network interfaces 120 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc. The input processing module 153 is used to detect one or more inputs or interactions from one or more input devices 132.

[0047] In some embodiments, the detection device provided in this application can be implemented in software. Figure 1 A detection device 154 stored in memory 150 is shown. The detection device 154 can be software in the form of programs and plug-ins, including the following software modules: an image segmentation module 1541, a first determination module 1542, a second determination module 1543, and a third determination module 1544. These modules can be logically linked and therefore can be arbitrarily combined or further split according to their implemented functions. The functions of each module will be described below.

[0048] In other embodiments, the apparatus provided in this application can also be implemented in hardware. As an example, the apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the detection method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0049] In some embodiments, the detection method provided in this application can be executed by a detection device. The detection device can be any terminal with data processing capabilities, such as a programmable logic controller (PLC), a mid-level computer, a host computer, etc., or it can be a server, a cloud server, etc. This application does not impose any restrictions.

[0050] The technical solution of this application will now be described in detail with reference to the accompanying drawings.

[0051] Based on the foregoing embodiments, Figure 2This is an optional flowchart illustrating the detection method provided in the embodiments of this application. Figure 1 ,like Figure 2 As shown, the detection method provided in this application embodiment can be implemented through steps S201 to S204: S201, perform image segmentation on the solder marks in the battery image to be processed to obtain a foreground image including the solder marks.

[0052] In this embodiment, the battery image to be processed can be a battery image obtained by an image acquisition device on the battery manufacturing production line through ultrasonic welding, and the battery image is transmitted to the detection device in real time for weld integrity detection.

[0053] Figure 3 This is a schematic diagram of the battery image to be processed provided in the embodiments of this application, such as... Figure 3 As shown, the battery image to be processed can be a local image of the solder area 301 only, that is, the battery image to be processed can be the solder area obtained by extracting the region of interest from the battery image.

[0054] Here, image segmentation can be foreground extraction from the image to be processed, that is, separating the target region of interest, i.e., the foreground, such as solder marks, from the battery image to be processed, and representing the foreground and background with different pixel values. Figure 4 This is a schematic diagram of the foreground image provided in the embodiments of this application, such as... Figure 4 As shown, for example, the pixel value of the pixel in the foreground 401 is 255, and the pixel value of the pixel in the background 402 is 0.

[0055] The detection method provided in this application is applicable to detecting the integrity of theoretically symmetrical weld marks, such as symmetrical weld marks left by ultrasonic welding. It can also be applied to any scenario where the integrity of symmetrical targets needs to be detected, such as detecting whether a horseshoe is intact.

[0056] In some embodiments, image segmentation can be performed using a semantic segmentation model. After obtaining the foreground image, the area of ​​the solder joint can be determined based on the number of non-zero pixels in the foreground image. The area is then compared with a preset area threshold, and solder joints smaller than the preset area threshold are determined to not meet the area requirements for solder joints.

[0057] Here, the preset area threshold can be 1.2 times the area of ​​half of a standard complete solder mark.

[0058] S202, in response to the area of ​​the solder mark being greater than or equal to a preset area threshold, based on the prior symmetry axis direction of the solder mark, determine multiple test symmetry axes of the solder mark within the solder mark area in the foreground image; the prior symmetry axis is determined based on the solder mark being structurally intact; the angle between each test symmetry axis and the prior symmetry axis is less than a preset angle.

[0059] In this embodiment, the comparison result may further include the area of ​​the solder mark being greater than or equal to a preset area threshold. In this case, the area of ​​the solder mark meets the area requirements for ultrasonic welding solder marks on the production line. To reduce the problem of incomplete solder marks caused by tab lifting or sagging, the symmetry of the solder mark can be calculated to determine whether the solder mark meets the integrity condition, thereby determining whether it meets the welding quality requirements of the battery production line. This is because if one side of the solder mark is complete while the other side is mostly missing, the total area of ​​the solder mark may be greater than the preset area threshold, but in reality, a solder mark that is mostly missing on one side does not meet the welding quality requirements.

[0060] In some embodiments, the weld bead can be the result of a known welding process (e.g., ultrasonic welding), and therefore has a preset standard shape, i.e., the theoretical a priori shape of the weld bead during ultrasonic welding (i.e., the weld bead structure is intact). Based on the preset standard shape, the known a priori axis of symmetry of the weld bead can be determined. In the foreground image, in the direction perpendicular to the a priori axis of symmetry of the weld bead, multiple axes of symmetry to be measured can be determined at different positions. The symmetry of the weld bead at each position of the axis of symmetry to be measured can be calculated in parallel, thereby determining whether the weld bead meets the structural integrity requirements.

[0061] In some embodiments, determining multiple test axes of symmetry of a solder joint within the solder joint area in the foreground image can be done in a direction perpendicular to the prior axis of symmetry of the solder joint. As long as there is a pixel corresponding to the solder joint, a test axis of symmetry can be determined based on the position of that pixel in a direction parallel to the prior axis of symmetry of the solder joint. Alternatively, it can be based on a preset standard shape of the solder joint to determine the range of the solder joint's symmetry axis on the solder joint. For example, the angle between the solder joint's symmetry axis and the prior axis of symmetry of the solder joint is less than a preset angle, and multiple test axes of symmetry are determined within this range in a direction perpendicular to the prior axis of symmetry of the solder joint.

[0062] Here, after determining the range of the axis of symmetry to be tested in the direction perpendicular to the axis of symmetry, multiple detection windows can be defined, with one or more axes of symmetry to be tested defined within each detection window. The detection windows can be divided at equal intervals, or the window size and position can be dynamically adjusted based on the pixel distribution density printed on the extension direction of the axis of symmetry to be tested, ensuring that each window contains a similar number of foreground pixels; alternatively, multiple detection windows can be obtained by prediction based on a deep learning model.

[0063] In some embodiments, the axis of symmetry to be tested within each detection window can be determined by first identifying the center point of each detection window, using the known prior axis of symmetry as the central axis, and pre-setting a small angular offset range (e.g., ±θ, where θ can be 1°) to form a fan-shaped range. Within this fan-shaped range, multiple axes of symmetry to be tested are determined according to a set angular resolution (e.g., 0.1°). This can reduce the problem of inaccurate detection results caused by slight rotation during image acquisition.

[0064] S203, based on the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested, determine the symmetry of the soldering on each axis of symmetry to be tested; wherein, the foreground pixel pair represents a pixel pair including the foreground pixel, the symmetrical foreground pixel pair represents a pixel pair that is entirely composed of the foreground pixel, and the foreground pixel is the pixel corresponding to the soldering.

[0065] In this embodiment, a symmetrical foreground pixel pair can refer to two symmetrical pixels on both sides of the axis of symmetry being tested, both of which are foreground pixels, i.e., both are symmetrical and both are pixels in the solder joint; a foreground pixel pair can refer to at least one of two symmetrical pixels on both sides of the axis of symmetry being tested, where at least one pixel is a foreground pixel, and the foreground pixel can refer to the pixel corresponding to the solder joint. Thus, based on the number of symmetrical foreground pixel pairs and the number of symmetrical pixel pairs, the symmetry of the solder joint on each axis of symmetry being tested can be calculated.

[0066] Here, the pixel pairs participating in the symmetry calculation must at least meet the validity condition, that is, at least one pixel in the pixel pair is a foreground pixel. In this way, the participation of background pixel pairs (that is, both symmetrical pixels are background pixels) is reduced, and the calculated symmetry is more accurate.

[0067] S204, in response to the existence of at least one axis of symmetry to be measured having a symmetry degree greater than or equal to the symmetry degree threshold, determine that the structural integrity of the solder mark satisfies the integrity condition.

[0068] In some embodiments, during ultrasonic welding quality inspection, the weld mark, as a structural integrity indicator, directly affects the conductivity and mechanical strength of the battery tab. Symmetry can refer to the similarity of the geometric shape and pixel distribution of the weld mark on both sides of the axis of symmetry to be tested. The higher the symmetry, the better the symmetry of the weld mark at that location, and the more complete the structure. Structural integrity can refer to a comprehensive index of the continuity, uniformity, and symmetry of the overall structure of the weld mark, reflecting whether there are problems such as local defects, abnormal shapes, or insufficient welding. The lower the symmetry, the lower the uniformity and symmetry on both sides of the weld mark, and the less complete the structure.

[0069] In some embodiments, the maximum symmetry can be determined among the symmetry degrees corresponding to multiple test symmetry axes. By setting multi-level symmetry thresholds, the symmetry of the solder mark is quantitatively evaluated, thereby determining the overall structural integrity of the solder mark. For example, a maximum symmetry degree greater than or equal to 0.8 indicates a complete solder mark structure and excellent quality; a maximum symmetry degree between 0.7 and 0.8 indicates a basically complete solder mark structure and good quality; a maximum symmetry degree between 0.6 and 0.7 indicates a complete solder mark structure but with local defects requiring attention; and a maximum symmetry degree below 0.6 indicates an incomplete solder mark structure with obvious defects. The yield of batteries with different structural integrity levels can be judged according to their different applications.

[0070] In some embodiments, a symmetry threshold can be set based on welding quality requirements. As long as there is at least one axis of symmetry with a symmetry degree greater than or equal to the symmetry threshold, the structural integrity of the weld is considered to meet the requirements, i.e., the integrity condition is met.

[0071] In some embodiments, if the symmetry of any axis of symmetry to be tested in the battery image to be processed is less than the symmetry threshold, it indicates that the solder mark does not meet the integrity condition.

[0072] In some embodiments, based on the symmetry of each axis of symmetry to be measured, a symmetry histogram along the direction perpendicular to the prior axis of symmetry of the solder print (which can be considered the x-axis direction) can be obtained. Figure 5 The symmetry histogram corresponding to the solder mark provided in the embodiments of this application is... Figure 1 This image is... Figure 4 The symmetry histogram obtained by calculating the solder joints shows that the horizontal axis represents the position of the measured symmetry axis along the direction perpendicular to the prior symmetry axis of the solder joint, and the vertical axis represents the symmetry degree. The main peak A (at X≈215) with the maximum symmetry degree has a symmetry degree as high as 0.87, which is greater than 0.8, indicating that the solder joint is centrally symmetrical and the structural integrity meets the production line requirements. The symmetry degrees of the two secondary peaks are around 0.35. Since the symmetry degree calculation in this application uses the foreground pixel pairs as the denominator and the symmetrical foreground pixel pairs as the numerator, the symmetry degree of the two secondary peaks is around 0.35, indicating that the structural integrity of each side of the symmetrical solder joint is also good.

[0073] Figure 6 The symmetry histogram corresponding to the solder mark provided in the embodiments of this application is... Figure 2 , Figure 6Figure a shows another battery image to be processed, figure b is the foreground image after image segmentation of the battery image to be processed, and figure c is the symmetry histogram of the foreground image after processing. The main peak B (at X≈210) with the maximum symmetry has a symmetry of 0.59, which is lower than 0.6, indicating that the symmetry of the center of the solder mark is low and the structural integrity does not meet the production line requirements. The symmetry of the secondary peak C on the left is around 0.19, indicating that the symmetry of the left side of the solder mark is low. This indicates that there is a large area of ​​missing parts in the left solder mark, resulting in severe asymmetry, such as broken edges, voids, lack of fusion, or severe distortion of the left tab shape, or misalignment of the tab during welding, or failure to form an effective molten pool during welding. Therefore, this solder mark does not meet the production line requirements.

[0074] Symmetry histograms can be used to locate solder joint defects, identify the causes of defects, and improve production line process parameters to increase battery product yield.

[0075] In this application embodiment, when performing structural integrity testing on weld marks, in addition to judging by area, a symmetry test of the weld marks is added. This not only detects the size of the weld marks but also captures hidden defects that cannot be characterized by area, such as unilateral cold welds and electrode misalignment. The dual detection mechanism can effectively reduce the false judgment rate and improve product quality. Furthermore, by measuring the symmetry of multiple axes of symmetry, the rationality of welding parameters, such as the rationality of welding head trajectory and pressure distribution, can be inferred, achieving closed-loop optimization of process parameters and realizing welding process optimization, thus contributing to the intelligent manufacturing upgrade of battery production lines.

[0076] In some embodiments, symmetrical foreground pixel pairs and foreground pixel pairs can be implemented through steps S1 to S2: S1. Based on each axis of symmetry to be tested in the foreground image, determine the attribute information of each pixel pair on both sides of each axis of symmetry to be tested; the attribute information includes at least the pixel value and pixel type of the pixel in the pixel pair, and the pixel type includes at least the foreground pixel.

[0077] Here, a pixel pair may include any pixel on one side of the axis of symmetry and a pixel on the other side of the axis of symmetry that is mirror-symmetric to that pixel about the axis of symmetry.

[0078] In some embodiments, after determining multiple pixel pairs, attribute information for each pixel pair can be determined, including the pixel value and pixel type of the pixels in the pixel pair.

[0079] Here, the foreground image can be a binary image, where the pixel value of a pixel in a pixel pair can be 0 or 255, with 255 representing a foreground pixel. The foreground image can also be a color (RGB) image, where pixels with values ​​within a preset range (representing the range of solder marks) are foreground pixels.

[0080] Pixel type can be used to characterize whether a pixel is a foreground pixel, i.e., the pixel corresponding to the solder paste.

[0081] S2, based on attribute information, determine symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested.

[0082] In the embodiments of this application, a symmetrical foreground pixel pair can refer to two pixels that are symmetrical on both sides of the axis of symmetry to be measured, both of which are foreground pixels; a foreground pixel pair can refer to at least one of two pixels that are symmetrical on both sides of the axis of symmetry to be measured, which is a foreground pixel.

[0083] This application embodiment, by determining the attribute information of each pixel pair on both sides of each axis of symmetry to be tested, can eliminate the interference of background pixels in the symmetry judgment, and only perform symmetry analysis on the foreground pixels directly related to the solder stamp, thereby improving the pertinence and accuracy of the symmetry judgment. This provides a more accurate and reliable data foundation for subsequent determination of image symmetry based on the attribute information of pixel pairs, and thus improves the accuracy of solder stamp symmetry detection.

[0084] In some embodiments, step S2 can be implemented by steps S21 and S22: S21, the pixel pairs on both sides of each axis of symmetry to be tested in the foreground image that satisfy the validity condition and the symmetry condition are determined as symmetrical foreground pixel pairs; wherein, the validity condition indicates that any pixel in the pixel pair is a foreground pixel, and the foreground pixel is the pixel corresponding to the solder mark; the symmetry condition indicates that the pixel values ​​of the pixels in the pixel pair are the same.

[0085] In some embodiments, a symmetrical foreground pixel pair can refer to a pixel pair in the foreground image that satisfies the validity condition and the symmetry condition on both sides of each axis of symmetry to be tested. A pixel pair refers to two pixels that are symmetrical on both sides of the axis of symmetry to be tested.

[0086] The validity condition indicates that any pixel in a pixel pair is a foreground pixel, which is used to determine whether the pixels in the pixel pair belong to the solder body and can eliminate the influence of background pixels on symmetry; the symmetry condition indicates that the pixel values ​​of the pixels in the pixel pair are the same, which is used to determine whether the pixels in the pixel pair are symmetrical.

[0087] This application embodiment can traverse pixel pairs on both sides of the axis of symmetry to be tested in the image, apply validity and symmetry conditions to determine whether any pixel in the pixel pair belongs to the foreground and whether the pixel values ​​of the pixel pair are the same, thereby obtaining symmetrical foreground pixel pairs on both sides of each axis of symmetry to be tested. Here, the validity condition can be applied first to remove a large number of irrelevant background pixels, narrowing the calculation range and improving calculation efficiency, and then the symmetry condition can be applied to determine the pixel pairs with the same pixel values ​​among the removed pixel pairs.

[0088] S22, the pixel pairs that satisfy the validity condition on both sides of each axis of symmetry to be tested in the foreground image are determined as foreground pixel pairs.

[0089] In this embodiment, a foreground pixel pair refers to a pixel pair on either side of the measured axis of symmetry where any pixel is a foreground pixel. After determining the foreground pixel pairs and symmetrical foreground pixel pairs on either side of the measured axis of symmetry, the symmetry of each measured axis of symmetry can be calculated.

[0090] The embodiments of this application can quickly determine the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested by using validity and symmetry conditions. This can quickly focus on truly valid candidate pixel pairs, greatly reduce invalid calculations, improve production line efficiency, achieve high-quality extraction of symmetrical regions on both sides of the axis of symmetry to be tested, and reduce the false detection rate.

[0091] In some embodiments, step S203 can be implemented by steps S2031 to S2032: S2031, determine the first number of symmetrical foreground pixel pairs and the second number of foreground pixel pairs on both sides of each axis of symmetry to be tested.

[0092] In some embodiments, the first number A of symmetrical foreground pixel pairs can be expressed by formula (1): (1); Where offset is the offset from each axis of symmetry along the x-axis to both sides, ranging from 1 to d(x); I(x, y) is the pixel value at position (x, y); [] represents Iverson brackets, which take the value 1 when the internal condition is true, and 0 otherwise; d(x) = min(x, width) x) represents the maximum feasible offset in the x-direction, width is the width of the foreground image, i.e., the width of the x-axis; sample is the set of sampling points along the extension direction of the axis of symmetry to be measured, which can be obtained through... Controlling density, here It can be 2; ∨ is the OR operation; * is the multiplication operation.

[0093] When calculating the first quantity, for each value of offset from 1 to d(x), for each y value in the sample, only the symmetric condition applies. and validity conditions If all conditions are met, the first quantity is incremented by 1.

[0094] In some embodiments, the second number B of foreground pixel pairs can be represented by formula (2): (2); When calculating the second quantity, for each value of offset from 1 to d(x), for each y value in the sample, the validity condition is... When the condition is met, the second quantity is increased by 1.

[0095] S2032, the ratio of the first quantity to the second quantity corresponding to each axis of symmetry to be tested is determined as the degree of symmetry printed on each axis of symmetry to be tested.

[0096] In some embodiments, the symmetry of each axis of symmetry to be measured This can be achieved using formula (3): (3); This application embodiment utilizes symmetrical foreground pixel pairs and foreground pixel pairs to quickly calculate symmetry after obtaining pixel pair information, generating a normalized symmetry score for each symmetry axis to be tested. This low computational complexity makes the method suitable for scenarios with high processing speed requirements, such as battery manufacturing production lines, thus improving processing efficiency.

[0097] In some embodiments, to improve sensitivity to asymmetry, the negative impact of asymmetrical pixel pairs can be amplified, so that the symmetry calculation results can more accurately reflect the actual degree of symmetry of the image. Therefore, step S203 can also be implemented through steps S2033 to S2034: S2033, based on the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each test axis of symmetry, determine the asymmetrical foreground pixel pairs and the third number of asymmetrical foreground pixel pairs in the foreground pixel pairs.

[0098] In some embodiments, an asymmetric foreground pixel pair is a foreground pixel pair that is not a symmetric foreground pixel pair. Correspondingly, the third quantity C is the difference between the second quantity B and the first quantity A.

[0099] S2034, the ratio of the first quantity to the target quantity corresponding to each axis of symmetry to be tested is determined as the degree of symmetry printed on each axis of symmetry to be tested; wherein, the target quantity is the sum of the product of the third quantity and the preset weight and the first quantity.

[0100] In some embodiments, the symmetry of each axis of symmetry to be measured It can also be achieved using formula (4): (4); in, For preset weights, the value range can be adjusted according to the strictness and symmetry requirements of the application scenario, for example, =1, suitable for scenarios where symmetry requirements are not high or only a rough evaluation is needed; A score between 1 and 3 is suitable for scenarios with high requirements for symmetry, such as industrial quality inspection and product appearance inspection. A value between 3 and 5 is suitable for special scenarios such as aerospace and nuclear industries where symmetry requirements are extremely strict and no deviation is allowed.

[0101] This application introduces asymmetric foreground pixel pairs and preset weights, which amplifies the negative impact of asymmetric pixel pairs on symmetry, making the symmetry calculation results more accurately reflect the actual degree of symmetry of the image. Furthermore, by adjusting the value of the preset weight α, it can flexibly adapt to the requirements of different application scenarios for the strictness of symmetry evaluation.

[0102] In some embodiments, step S204 can be implemented by steps S2041 to S2042: S2041, based on the symmetry of each axis of symmetry to be measured, determine the target axis of symmetry to be measured and the target symmetry corresponding to the target axis of symmetry to be measured among multiple axes of symmetry to be measured; wherein, the maximum symmetry among the symmetry of each axis of symmetry to be measured is determined as the target symmetry.

[0103] In some embodiments, the target axis of symmetry to be measured may refer to the symmetry degree with the largest value among the symmetry degrees corresponding to each axis of symmetry to be measured.

[0104] S2042, in response to the target symmetry being greater than or equal to the symmetry threshold, determines that the structural integrity of the solder mark meets the integrity condition.

[0105] In this embodiment, the symmetry threshold can be determined based on the manufacturing requirements of the production line, for example, 0.8. When the target symmetry is greater than or equal to 0.8, the structural integrity of the solder mark is determined to meet the integrity condition. Figure 3 The solder mark.

[0106] In some embodiments, the detection method provided in this application may further include step S31: S31, in response to the target symmetry being less than the symmetry threshold, it is determined that the structural integrity of the solder mark does not meet the integrity condition.

[0107] In some embodiments, if the target symmetry is less than 0.8, even if the area of ​​the solder joint meets the requirements, the structural integrity of the solder joint does not meet the integrity condition. Figure 6 The solder marks in the middle.

[0108] This application embodiment uses a symmetry threshold to capture defects that have acceptable area but asymmetrical shape and contour distribution, introducing a stable and measurable evaluation dimension and constructing a reliable production line quality control process.

[0109] In some embodiments, step S202 can be implemented by steps S2021 to S2022: S2021, in response to the comparison result indicating that the area of ​​the solder mark is greater than or equal to a preset area threshold, the size of the foreground image is adjusted to obtain a target image including the solder mark; the size of the target image is smaller than that of the foreground image.

[0110] Here, the calculated actual area of ​​the solder mark is compared with the preset area threshold. If the area is less than the preset area threshold, it means that the area of ​​the solder mark does not meet the solder mark area requirements of the production line. There is no need to perform subsequent solder mark symmetry judgment, thus reducing the amount of calculation.

[0111] In the embodiments of this application, only solder marks that meet both the area requirement and the structural integrity requirement are considered to meet the production line requirements, i.e., qualified solder marks.

[0112] In some embodiments, if the area is greater than or equal to a preset area threshold, it indicates that the area of ​​the solder mark meets the solder mark area requirements of the production line, and further determination of the solder mark symmetry is needed. However, the foreground image may contain a large number of background pixels, and directly performing symmetry determination on the panoramic image would result in a large computational load.

[0113] To reduce computational load, the size of the foreground image can be adjusted, such as reducing its size, to decrease the computational cost of traversing the background pixels. This adjustment can be achieved by cropping the foreground image, allowing the target image to include the solder joints while minimizing the background pixels; in other words, the target image size is smaller than the foreground pixel size.

[0114] In some embodiments, size adjustment can also be performed using a deep learning model.

[0115] S2022, within the target area of ​​the solder area on the target image, determine multiple axes of symmetry of the solder to be tested; the target area is the area formed by extending a preset distance to both sides with the a priori axis of symmetry as the center line.

[0116] In some embodiments, the target region can be the area in the solder area where the axis of symmetry to be tested may appear, in a direction perpendicular to the prior axis of symmetry within the target image. The target region can be the area formed by extending a preset distance (which can be 10 pixels, and the preset distance can be adjusted based on the area of ​​the solder) to both sides of the prior axis of symmetry as the center line. For example, if the solder is symmetrical (i.e., the axis of symmetry is vertical), the target region can be obtained by extending 10 pixels to the left and right sides of the prior axis of symmetry of the solder area in the x-direction (i.e., the horizontal direction).

[0117] In some embodiments, the region containing the axis of symmetry to be measured can also be determined in the target image in a direction perpendicular to the prior axis of symmetry of the solder stamp, based on a preset standard shape of the solder stamp. Here, the preset standard shape is known prior knowledge that describes the theoretically desirable shape template of the solder stamp, which defines the ideal position of the axis of symmetry to be measured.

[0118] Alignment can be achieved between a preset standard shape and the solder marks in the target image through contour matching, key point alignment, etc. The axis of symmetry of the preset standard shape to be measured is projected onto the target image. Since the solder marks in the target image are images taken from the actual production line, there will be shooting errors. The area where the projected axis of symmetry to be measured is located can be used to determine the target area where the axis of symmetry to be measured should be located in the target image.

[0119] In some embodiments, the target region can be defined as the area from 1 / 4 to 3 / 4 of the solder area on the x-axis, starting from the first column on the target image where solder pixels are present.

[0120] In some embodiments, the position range of the axis of symmetry to be measured can be determined in a preset standard shape, and the preset standard shape can be projected onto the target image to determine the area where the projected position range on the target image is located as the target area.

[0121] After determining the region where the axis of symmetry to be measured may appear, multiple axes of symmetry to be measured can be determined within this region, and the interval between adjacent axes of symmetry can be the same.

[0122] The embodiment of this application can significantly reduce the total number of pixels that need to be processed by adjusting the size of the foreground image. For scenarios that require real-time processing, such as battery production lines, this can greatly improve processing speed and reduce latency.

[0123] In some embodiments, S2021 can be implemented by steps S41 to S43: S41, perform connected component extraction on the foreground image to obtain at least one connected component.

[0124] In this embodiment of the application, the foreground image is a binary image. The set of pixels that are connected to each other (e.g., 4-neighbor or 8-neighbor connections) in all foreground pixels of the foreground image can be determined by the connected component algorithm. Each set of pixels is called a connected component, thereby obtaining at least one connected component on the foreground pixels. The at least one connected component can be stored in the connected component data storage array.

[0125] In some embodiments, connected component extraction can be performed using formula (4): (4); Here, binaryMask is the foreground image, and connectedComponents is the function for extracting connected components.

[0126] S42, in at least one connected component, perform region union processing on connected components with an area greater than the connected component threshold to obtain the outer region of the solder mark.

[0127] In some embodiments, in order to reduce computational load, at least one connected component with smaller pixels can be removed, that is, only connected components with an area greater than the connected component threshold (min Area, which can be 50) are placed in the connected component data storage array as valid connected components.

[0128] After filtering, the filtered connected components are subjected to region union processing, that is, the overall coverage of all filtered connected components in the target image space is calculated, that is, the outer region of all connected components. The outer region can be the smallest bounding rectangle of the solder, that is, the smallest rectangle containing all pixels within the range with edges parallel or perpendicular to the coordinate axes, or it can be an irregular bounding rectangle, without any restrictions here.

[0129] Here, the extraction of connected components significantly reduces the number of background pixels, thus reducing the workload of symmetry calculation.

[0130] S43, in the direction perpendicular to the a priori axis of symmetry of the solder print, expand the circumscribed region to obtain the target image.

[0131] In this embodiment, the expansion can be along the direction of the vertical axis of symmetry, extending outwards to both sides, that is, extending a certain pixel distance outwards from the boundary of the outer region. This avoids information loss or calculation errors caused by the solder stamp being close to the image boundary when accurately calculating the axis of symmetry or degree of symmetry to be measured, thus ensuring the integrity and accuracy of the symmetry analysis.

[0132] After expansion, a new region is obtained. This rectangular region is cropped from the original foreground image to obtain the target image. This image not only contains the target subject, but also includes more background or contextual information in the direction perpendicular to the axis of symmetry.

[0133] This application embodiment effectively eliminates the influence of random noise and small interfering objects by combining connected component analysis with area thresholding. It not only realizes the positioning of the solder stamp by utilizing the outer region, but also significantly reduces the background pixels. The target image generated by expanding the outer region of the solder stamp has symmetrical and sufficient space on both sides of the axis of symmetry to be measured, which provides a basis for subsequent accurate calculation of the axis of symmetry to be measured and pixel-level symmetry matching. It can effectively prevent evaluation errors caused by cutting off the symmetrical edge due to excessively tight cropping.

[0134] In some embodiments, in the detection method provided by this application, step S2022 can be implemented by step S51: S51, perform pixel-by-pixel traversal within the target area to obtain multiple test symmetry axes of the solder print.

[0135] Within the target area, the algorithm moves pixel by pixel along the extension direction of the interval. With each movement, a position of the axis of symmetry to be measured is set. For each assumed axis position, the symmetry of the foreground pixels on both sides of the image is calculated using that axis as the axis of symmetry to be measured.

[0136] The step size for pixel-by-pixel traversal can be set according to the calculation requirements of the production line. When a large step size is needed to quickly obtain the symmetry, the step size can be set to 1. When a very accurate symmetry is needed, the step size can be 1.

[0137] This application embodiment compresses the search for the axis of symmetry to be tested from a global search to a local interval by using a preset standard shape, which greatly reduces the number of axes of symmetry to be tested. The preset shape provides an accurate initial estimate, ensuring that the search starting point is close to the actual axis of symmetry to be tested, reducing the amount of computation and improving the detection efficiency.

[0138] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.

[0139] To address the issue that related technologies only use segmentation models to extract solder marks and calculate the pixel area of ​​the solder mark for result judgment, without measuring shape integrity, and cannot accommodate slight upward or downward tilting of the solder mark area fluctuations, resulting in a high false judgment rate when quality inspecting cells without adapter tabs, this application provides a rapid solder mark judgment method based on symmetry calculation. The solder mark portion is extracted from the image, the area is calculated for initial screening, and then the symmetry of images with acceptable areas is calculated. The integrity of the solder mark is judged based on the symmetry, thus accommodating solder mark area fluctuations caused by tab tilting or tilting.

[0140] Figure 7 This is a schematic flowchart of the solder mark determination method provided in the embodiments of this application, as shown below. Figure 7 As shown, the solder mark determination method can be implemented through steps S701 to S706: S701, perform semantic segmentation on the original solder stamp image to obtain the solder stamp mask image.

[0141] Here, semantic segmentation can refer to a computer vision task that uses deep learning algorithms to assign class labels to pixels, thereby dividing an image into regions with different semantic meanings; the solder mask (i.e., the foreground image) can be a matrix with the same size as the original image of the solder mask, but which stores category labels or object attribution information at each pixel position instead of color information.

[0142] In this embodiment, the solder area image (i.e. the battery image to be processed) can be extracted to obtain a solder mask image through a semantic segmentation model, such as any model that can perform semantic segmentation, such as segformer. The solder area has the same pixel value, and the background area other than the solder area has the same solder area value.

[0143] S702, calculate the solder area based on the solder mask image.

[0144] The solder area (area) can be obtained based on the number of pixels in the solder mask image. The solder area (area) can be calculated using formula (5): (5); Where binaryMask is the solder mask image, and countNonZero is a function to calculate the number of non-zero pixels in the mask image.

[0145] S703 determines whether the solder area is greater than the area threshold.

[0146] The area threshold (i.e., the preset area threshold) can be set based on experience, such as 1.2 times the area of ​​a standard complete solder joint on one side. Solder joints with an area below the area threshold are directly judged as unqualified (NG, Not good), while those with an area above the area threshold are further calculated for symmetry.

[0147] S704, determine the symmetry calculation area in the solder mask diagram.

[0148] The symmetry calculation region can refer to the target image after expanding the minimum bounding rectangle (i.e., the bounding region) of the solder paste. First, connected components can be extracted from the solder paste mask image. Based on these connected components, the minimum bounding rectangle of the solder paste can be determined. Then, the minimum bounding rectangle can be expanded to obtain the symmetry calculation region.

[0149] In this embodiment, connected component extraction can be performed using the aforementioned formula (4), which will not be elaborated further here. Connected components with an area greater than the minimum pixel area (minArea, i.e., the connected component threshold) are placed into the foreground rectangular data storage array ( In formula (6), as shown: (6); Where minArea can be 50; Stats[i].area is the area of ​​the i-th connected component; Stats[i].rect is the minimum bounding rectangle of the i-th connected component; This means adding the minimum bounding rectangle of the i-th connected component to the foreground rectangle data storage array.

[0150] Extract the union of all connected components of the foreground rectangular data storage array. (i.e., the outer region), as shown in formula (7): (7); Here, unionRects is a function that obtains the union of rectangular arrays.

[0151] Union By expanding left and right, the symmetry calculation area is obtained, which can be achieved using formulas (8) and (9): (8); (9); Where inset=100, The x-coordinate of the top left corner of the rectangle. Given the width of the rectangle, formulas (8) and (9) are essentially the union of the left and right sides. Each pixel is expanded by 100 pixels; the value of inset can be set according to requirements.

[0152] S705, calculates the highest symmetry score in the symmetry calculation area.

[0153] Parallel horizontal traversal of the symmetry calculation region and vertical interval sampling are performed to calculate the maximum symmetry score among multiple symmetry axes to be tested, which can be achieved by formula (3).

[0154] Pixel pairs with equal pixel values ​​on both sides of the axis of symmetry to be tested and at least one side being the foreground are defined as fully symmetrical valid pixel pairs. Pixel pairs with at least one side being the foreground and symmetry not being considered are defined as valid pixel pairs. The number of fully symmetrical valid pixel pairs and the number of valid pixel pairs on both sides of each axis of symmetry to be tested are calculated, and the ratio is defined as the degree of symmetry of the axis of symmetry to be tested.

[0155] The symmetry of different axes of symmetry to be tested is calculated in parallel and stored in an array.

[0156] S706, determine whether the highest symmetry score is greater than the symmetry threshold.

[0157] Find the position and symmetry of the maximum symmetry in the array. If it is greater than the threshold of 0.8, it is considered OK; otherwise, it is NG.

[0158] Based on area judgment, this application adds logic for finding the optimal axis of symmetry to be measured and calculating the symmetry of the solder mark, which is more in line with the production line inspection requirements and is compatible with the situation where the solder mark area fluctuates due to tab sagging or tilting, greatly enhancing the accuracy of judgment. First, find the smallest bounding rectangle of the main area of ​​the solder mark, and traverse and calculate the axis of symmetry to be measured within this area to reduce the traversal range. When calculating the symmetry, perform interval sampling in the extension direction of the axis of symmetry to be measured, thereby reducing the overall calculation time.

[0159] Please continue to refer to Figure 1 The detection device 154 may include an image segmentation module 1541, a first determination module 1542, a second determination module 1543, and a third determination module 1544. The image segmentation module 1541 is used to segment the solder marks in the battery image to be processed, obtaining a foreground image including the solder marks. The first determination module 1542 is used to determine multiple test symmetry axes of the solder mark within the solder mark region of the foreground image based on the prior symmetry axis direction of the solder mark, in response to the solder mark area being greater than or equal to a preset area threshold. The prior symmetry axis is based on the solder mark's structural integrity. The following are determined: the angle between each test axis of symmetry and the prior axis of symmetry is less than a preset angle; the second determining module 1543 is used to determine the symmetry of the solder on each test axis of symmetry based on the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each test axis of symmetry; wherein, the foreground pixel pair represents a pixel pair including a foreground pixel, the symmetrical foreground pixel pair represents a pixel pair consisting entirely of foreground pixels, and the foreground pixel is the pixel corresponding to the solder; the third determining module 1544 is used to determine that the structural integrity of the solder meets the integrity condition in response to the existence of at least one test axis of symmetry having a symmetry greater than the symmetry threshold.

[0160] In some embodiments, the detection device further includes: a fourth determining module, configured to determine attribute information of each pixel pair on both sides of each axis of symmetry to be tested based on each axis of symmetry to be tested in the foreground image; the attribute information includes at least the pixel value and pixel type of the pixel in the pixel pair, and the pixel type includes at least the foreground pixel; and a fifth determining module, configured to determine symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested based on the attribute information.

[0161] In some embodiments, the fifth determining module is further configured to determine the pixel pairs on both sides of each axis of symmetry to be tested in the foreground image that satisfy the validity condition and the symmetry condition as symmetrical foreground pixel pairs; wherein, the validity condition indicates that any pixel in the pixel pair is a foreground pixel; the symmetry condition indicates that the pixel values ​​of the pixels in the pixel pair are the same; and the pixel pairs on both sides of each axis of symmetry to be tested in the foreground image that satisfy the validity condition are determined as foreground pixel pairs.

[0162] In some embodiments, the second determining module 1543 is further configured to determine a first number of symmetrical foreground pixel pairs and a second number of foreground pixel pairs on both sides of each axis of symmetry to be tested; and to determine the ratio of the first number to the second number corresponding to each axis of symmetry to be tested as the degree of symmetry printed on each axis of symmetry to be tested.

[0163] In some embodiments, the second determining module 1543 is further configured to determine the third number of asymmetric foreground pixel pairs and asymmetric foreground pixel pairs in the foreground pixel pairs based on the symmetric foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested; and to determine the ratio of the first number corresponding to each axis of symmetry to be tested to the target number as the degree of symmetry printed on each axis of symmetry to be tested; wherein the target number is the sum of the product of the third number and the preset weight and the first number.

[0164] In some embodiments, the third determining module 1544 is further configured to detect the structural integrity of the solder mark based on the comparison result between the symmetry degree of each axis of symmetry to be tested and the symmetry degree threshold, including: determining a target axis of symmetry to be tested and a target symmetry degree corresponding to the target axis of symmetry to be tested among a plurality of axes of symmetry to be tested; wherein, the maximum symmetry degree among the symmetry degrees of each axis of symmetry to be tested is determined as the target symmetry degree; in response to the target symmetry degree being greater than or equal to the symmetry degree threshold, determining that the structural integrity of the solder mark meets the integrity condition; in response to the target symmetry degree being less than the symmetry degree threshold, determining that the structural integrity of the solder mark does not meet the integrity condition.

[0165] In some embodiments, the first determining module 1542 is further configured to adjust the size of the foreground image to obtain a target image including the solder joint; the size of the target image is smaller than the size of the foreground image; within the target area of ​​the solder joint area on the target image, a plurality of test symmetry axes of the solder joint are determined; the target area is an area formed by extending a preset distance to both sides with the a priori symmetry axis as the center line.

[0166] In some embodiments, the first determining module 1542 is further configured to extract connected components from the foreground image to obtain at least one connected component; in the at least one connected component, perform region union processing on the connected components with an area greater than the connected component threshold to obtain the outer region of the solder stamp; and expand the outer region in a direction perpendicular to the prior axis of symmetry of the solder stamp to obtain the target image.

[0167] In some embodiments, the first determining module 1542 is further configured to perform pixel-by-pixel traversal within the target area to obtain multiple test symmetry axes of the solder print.

[0168] It should be noted that the description of the device embodiments in this application is similar to the description of the method embodiments described above, and has similar beneficial effects as the method embodiments; therefore, it will not be repeated. For technical details not disclosed in the device embodiments, please refer to the description of the method embodiments in this application for understanding.

[0169] It should be noted that, in the embodiments of this application, if the above-described detection method is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the related technology, can be embodied in the form of a software product. This 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 methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware, software, or firmware, or any combination of hardware, software, and firmware.

[0170] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements some or all of the steps in the above-described method. The computer-readable storage medium can be transient or non-transient.

[0171] This application provides a computer program including computer-readable code. When the computer-readable code is run in a computer device, the processor in the computer device performs some or all of the steps in the above-described method.

[0172] This application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, it implements some or all of the steps in the above-described method. This computer program product can be implemented specifically through hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium; in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.

[0173] It should be noted that the descriptions of the various embodiments above tend to emphasize the differences between them, while their similarities or commonalities can be referred to interchangeably. The descriptions of the above embodiments of the device, storage medium, computer program, and computer program product are similar to the descriptions of the above method embodiments and have similar beneficial effects. For technical details not disclosed in the embodiments of the device, storage medium, computer program, and computer program product of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0174] The processor in the testing equipment can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), controller, microcontroller, and microprocessor. It is understood that other electronic devices can also implement the above-mentioned processor functions, and this application does not specifically limit the specific implementation.

[0175] The aforementioned computer storage media / memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; or it can be various terminals that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0176] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above steps / processes do not imply a sequential order of execution; the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above embodiments of this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0177] This application uses terms such as "upper," "lower," "top," "bottom," "front," "back," "inner," and "outer" to indicate orientation or positional relationships. This is only for the convenience of describing this application and is not intended to indicate or imply that the device referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation on the scope of protection of this application.

[0178] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "joining" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this application depending on the specific circumstances.

[0179] It should be noted that, in this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

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

[0181] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, the functional units in the embodiments of this application may all be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the integrated unit may be implemented in hardware or in a combination of hardware and software functional units.

[0182] The above are merely embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A detection method, characterized in that, The detection method includes: Image segmentation is performed on the solder marks in the battery image to be processed to obtain a foreground image including the solder marks; In response to the area of ​​the solder mark being greater than or equal to a preset area threshold, multiple test symmetry axes of the solder mark are determined within the solder mark area in the foreground image based on the prior symmetry axis direction of the solder mark; the prior symmetry axis is determined based on the solder mark being structurally intact; the angle between each test symmetry axis and the prior symmetry axis is less than a preset angle. Based on the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested, the symmetry of the solder mark on each axis of symmetry to be tested is determined; wherein, the foreground pixel pair represents a pixel pair including a foreground pixel, the symmetrical foreground pixel pair represents a pixel pair consisting entirely of foreground pixels, and the foreground pixel is the pixel corresponding to the solder mark. In response to the existence of at least one axis of symmetry to be tested whose symmetry degree is greater than or equal to the symmetry degree threshold, the structural integrity of the solder mark is determined to meet the integrity condition.

2. The detection method according to claim 1, characterized in that, The detection method further includes: Based on each axis of symmetry to be tested in the foreground image, the attribute information of each pixel pair on both sides of each axis of symmetry to be tested is determined; the attribute information includes at least the pixel value and pixel type of the pixel in the pixel pair, and the pixel type includes at least the foreground pixel; Based on the attribute information, the symmetrical foreground pixel pair and the foreground pixel pair are determined on both sides of each axis of symmetry to be tested.

3. The detection method according to claim 2, characterized in that, The step of determining the symmetrical foreground pixel pair and the foreground pixel pair on both sides of each axis of symmetry to be measured based on the attribute information includes: The pixel pairs in the foreground image that satisfy both the validity condition and the symmetry condition on both sides of each axis of symmetry to be tested are determined as the symmetrical foreground pixel pairs; wherein, the validity condition indicates that any pixel in the pixel pair is a foreground pixel; the symmetry condition indicates that the pixel values ​​of the pixels in the pixel pair are the same; The pixel pairs in the foreground image that satisfy the validity condition on both sides of each axis of symmetry to be tested are determined as the foreground pixel pairs.

4. The detection method according to claim 3, characterized in that, The determination of the symmetry of the soldered image on each axis of symmetry, based on the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be measured, includes: Determine the first number of symmetrical foreground pixel pairs on both sides of each axis of symmetry to be tested and the second number of foreground pixel pairs; The ratio of the first quantity to the second quantity corresponding to each axis of symmetry to be tested is determined as the degree of symmetry of the soldering on each axis of symmetry to be tested.

5. The detection method according to claim 4, characterized in that, The determination of the symmetry of the soldered image on each axis of symmetry, based on the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be measured, includes: Based on the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested, determine the asymmetrical foreground pixel pairs and the third number of the asymmetrical foreground pixel pairs. The ratio of the first quantity corresponding to each axis of symmetry to be tested to the target quantity is determined as the degree of symmetry of the soldering on each axis of symmetry to be tested; wherein, the target quantity is the sum of the product of the third quantity and the preset weight and the first quantity.

6. The detection method according to any one of claims 1 to 5, characterized in that, The step of determining that the structural integrity of the solder mark satisfies the integrity condition in response to the existence of at least one axis of symmetry being tested having a symmetry degree greater than or equal to a symmetry degree threshold includes: Based on the symmetry of each axis of symmetry to be tested, a target axis of symmetry to be tested and a target symmetry degree corresponding to the target axis of symmetry to be tested are determined among the plurality of axes of symmetry to be tested; wherein, the maximum symmetry degree among the symmetry degrees of each axis of symmetry to be tested is determined as the target symmetry degree; In response to the target symmetry being greater than or equal to the symmetry threshold, it is determined that the structural integrity of the solder mark meets the integrity condition. Correspondingly, the detection method further includes: In response to the target symmetry being less than the symmetry threshold, it is determined that the structural integrity of the solder mark does not meet the integrity condition.

7. The detection method according to any one of claims 1 to 5, characterized in that, The determination of multiple test symmetry axes of the solder stamp within the solder stamp region in the foreground image based on the prior symmetry axis direction of the solder stamp includes: The size of the foreground image is adjusted to obtain a target image including the solder mark; the size of the target image is smaller than the size of the foreground image. Within the target area of ​​the solder mark region on the target image, multiple axes of symmetry of the solder mark are determined; the target area is the region formed by extending a preset distance to both sides with the a priori axis of symmetry as the center line.

8. The detection method according to claim 7, characterized in that, The step of adjusting the size of the foreground image to obtain a target image including the solder stamp includes: Connected component extraction is performed on the foreground image to obtain at least one connected component; In the at least one connected component, the connected components with an area greater than the connected component threshold are subjected to region union processing to obtain the outer region of the solder mark. The circumscribed region is expanded in a direction perpendicular to the a priori axis of symmetry of the solder mark to obtain the target image.

9. The detection method according to claim 7, characterized in that, Within the target area of ​​the solder mark region on the target image, determining multiple axes of symmetry of the solder mark to be measured includes: A pixel-by-pixel traversal is performed within the target area to obtain multiple axes of symmetry to be measured for the solder print.

10. A detection device, characterized in that, The detection device includes: The image segmentation module is used to segment the solder marks in the battery image to be processed to obtain a foreground image including the solder marks. The first determining module is used to determine multiple test symmetry axes of the solder mark within the solder mark area in the foreground image based on the a priori symmetry axis direction of the solder mark when the area of ​​the solder mark is greater than or equal to a preset area threshold. The a priori symmetry axis is determined based on the solder mark being structurally intact. The angle between each test symmetry axis and the a priori symmetry axis is less than a preset angle. The second determining module is used to determine the symmetry of the solder mark on each axis of symmetry to be tested based on the symmetrical foreground pixel pairs and foreground pixel pairs on both sides of each axis of symmetry to be tested; wherein, the foreground pixel pair represents a pixel pair including a foreground pixel, the symmetrical foreground pixel pair represents a pixel pair consisting entirely of foreground pixels, and the foreground pixel is the pixel corresponding to the solder mark. The third determining module is used to determine that the structural integrity of the solder mark meets the integrity condition in response to the existence of at least one axis of symmetry to be tested having a symmetry degree greater than or equal to a symmetry degree threshold.

11. A testing device, characterized in that, The detection equipment includes: A memory for storing executable instructions; a processor for executing the executable instructions stored in the memory to implement the detection method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The device stores executable instructions for causing a processor to execute the executable instructions to implement the detection method according to any one of claims 1 to 9.

13. A computer program product, characterized in that, The computer program product includes executable instructions stored in a computer-readable storage medium; When the processor of the detection device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, it implements the detection method according to any one of claims 1 to 9.