Welding defect detection method, device and system and computer equipment
Through the processing of three-dimensional scanning data, including surface wave alignment and binarization, weld position of multi-layer welds is determined, which solves the problem of inaccurate positioning of welds and improves the accuracy and efficiency of welding defect detection. .
Patent Information
- Application Number
- CN202411538473.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-01-10
AI Technical Summary
In the prior art, the positioning of the weld seams of multi-layer welded parts is inaccurate, resulting in low detection efficiency of welding defects.
By acquiring the three-dimensional scan data, the B-scan image of the XZ dimension is cut, the surface wave alignment and binarization process is performed, the weld position is determined using the peak detection algorithm, and the C-scan data of the XY dimension is extracted from the three-dimensional scan data for defect detection.
It improves the accuracy of weld position and the accuracy of defect detection, and enhances the efficiency of welding defect detection.
Smart Images

Figure CN119291034A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of ultrasonic testing technology, and in particular to a welding defect detection method, device, system, and computer equipment. Background Art
[0002] In modern manufacturing, multi-layer welded parts play an important role in many key areas, such as automobiles and power electronics. Multi-layer welded parts are usually welded by multiple layers of metal plates to increase structural strength and thermal conductivity. However, during the welding process, various defects may be introduced, such as pores, cracks, and lack of fusion. These defects may lead to the risk of failure of multi-layer welded parts, so it is necessary to detect the welding quality of the welds of multi-layer welded parts.
[0003] The prior art generally involves manually determining the weld position, and then analyzing the C-scan image at the weld position to determine whether there is a welding defect. However, this method has the problems of low efficiency and inaccurate weld position positioning. Summary of the invention
[0004] The embodiments of the present application provide a welding defect detection method, device, system, and computer equipment, which aim to solve the problems of low efficiency and inaccurate weld position positioning in the prior art.
[0005] In a first aspect, an embodiment of the present application proposes a welding defect detection method, the method comprising: obtaining three-dimensional scanning data corresponding to a multi-layer welded part; cutting a B-scan image of an XZ dimension from the three-dimensional scanning data, processing the B-scan image to obtain one-dimensional data of a Z dimension, the one-dimensional data of the Z dimension comprising a plurality of discrete data values, the plurality of discrete data values reflecting the echo signal intensity of an ultrasonic scan, wherein the echo signal intensity of the weld layer is higher than the echo signal intensity of the non-weld layer; determining the weld position of each weld layer of the multi-layer welded part according to the peak value in the one-dimensional data of the Z dimension; obtaining C-scan data of the XY dimension corresponding to each weld layer from the three-dimensional scanning data according to the weld position of each weld layer, and detecting whether each weld layer has a welding defect according to the C-scan data corresponding to each weld layer.
[0006] Optionally, before extracting the B-scan image in the XZ dimension from the three-dimensional scanning data, the method further comprises: performing surface wave alignment processing on the three-dimensional scanning data, wherein the surface wave alignment processing comprises: for each A-scan data in the three-dimensional scanning data, obtaining an index number e of a data value with the largest absolute value among the data values included in the A-scan data, wherein the position of the index number e in the A-scan data represents the starting position of the surface wave of the multi-layer welded part; The first e data values in the A-scan data are removed, and e preset data values are added to the end of the A-scan data to obtain the three-dimensional scanning data after surface wave alignment.
[0007] Optionally, processing the B-scan image to obtain one-dimensional data of the Z dimension includes: binarizing the B-scan image to obtain a binarized B-scan image; and superimposing the binarized B-scan image along the X dimension to obtain one-dimensional data of the Z dimension corresponding to the B-scan image.
[0008] Optionally, the weld position of each weld layer refers to the position interval corresponding to each weld layer, and the weld position of each weld layer of the multi-layer welded part is determined according to the peak value in the one-dimensional data in the Z dimension, including: taking the position of the peak value in the one-dimensional data in the Z dimension on the Z axis as the center and using a preset weld position threshold as the step size to determine the position interval corresponding to each weld layer.
[0009] Optionally, a B-scan image of an XZ dimension is cut from the three-dimensional scanning data, and the B-scan image is processed to obtain one-dimensional data of the Z dimension, including: cutting multiple B-scan images from the three-dimensional scanning data along the Y dimension at a preset step; processing each B-scan image to obtain one-dimensional data of the Z dimension corresponding to each B-scan image; determining the weld position of each weld layer of a multi-layer welded part according to a peak value in the one-dimensional data of the Z dimension, including: obtaining multiple first weld positions of each weld layer from the one-dimensional data of the Z dimension corresponding to multiple B-scan images; for each weld layer, taking the union of the multiple first weld positions of the weld layer to obtain the weld position of the weld layer.
[0010] Optionally, C-scan data of XY dimensions corresponding to each weld layer is obtained from the three-dimensional scanning data according to the weld position of each weld layer, and each weld layer is detected whether there is a welding defect based on the C-scan data corresponding to the weld layer, including: for each weld layer, obtaining a C-scan data block corresponding to the weld layer from the three-dimensional scanning data according to the width of the position interval corresponding to the weld layer; the dimension of the C-scan data block is XYW, wherein W is the width of the position interval corresponding to the weld layer; and detecting whether the weld layer has a welding defect based on the C-scan data block corresponding to the weld layer.
[0011] Optionally, detecting whether there are welding defects in the weld layer according to the C-scan data block corresponding to the weld layer includes: inputting the C-scan data block corresponding to the weld layer into a preset defect detection model to obtain a detection result output by the defect detection model, and the detection result indicates whether there are welding defects in the weld layer; wherein the defect detection model includes a signal superposition module based on an attention mechanism, and the signal superposition module is used to superimpose the C-scan data block from three-dimensional data to two-dimensional data.
[0012] Alternatively, the mathematical model of the signal superposition module based on the attention mechanism can be expressed as:
[0013]
[0014] in, , is the weight of the network, , is the bias of the network, is the activation function, is the function for calculating the weight score, Scan the data block for C, It is the two-dimensional data after the C-scan data blocks are superimposed. Represents a weighted sum operation.
[0015] Optionally, the method further includes: identifying the type of each weld layer according to C-scan data corresponding to each weld layer.
[0016] In a second aspect, a welding defect detection device is provided, which includes: an acquisition module for acquiring three-dimensional scanning data corresponding to a multi-layer welded part; a processing module for cutting a B-scan image in an XZ dimension from the three-dimensional scanning data, and processing the B-scan image to obtain one-dimensional data in the Z dimension, wherein the one-dimensional data in the Z dimension reflects the intensity of the echo signal of the ultrasonic scanning, wherein the intensity of the echo signal corresponding to the weld layer is higher than the intensity of the echo signal corresponding to the non-weld layer; a weld position determination module for determining the weld position of each weld layer of the multi-layer welded part according to the peak value of the echo signal in the one-dimensional data in the Z dimension; a detection module for acquiring C-scan data in the XY dimension corresponding to each weld layer from the three-dimensional scanning data according to the weld position of each weld layer, and detecting whether each weld layer has a welding defect according to the C-scan data corresponding to each weld layer.
[0017] In a third aspect, an ultrasonic detection system is provided, comprising a scanning component and a processing component, wherein the scanning component is used to scan a multi-layer welded part to obtain three-dimensional scanning data; the processing component is used to cut a B-scan image in the XZ dimension from the three-dimensional scanning data, and process the B-scan image to obtain one-dimensional data in the Z dimension, wherein the one-dimensional data in the Z dimension reflects the intensity of the echo signal of the ultrasonic scanning, wherein the intensity of the echo signal corresponding to the weld layer is higher than the intensity of the echo signal corresponding to the non-weld layer; the weld position of each weld layer of the multi-layer welded part is determined according to the peak value of the echo signal in the one-dimensional data in the Z dimension; the C-scan data of the XY dimension corresponding to each weld layer is obtained from the three-dimensional scanning data according to the weld position of each weld layer, and whether each weld layer has a welding defect is detected according to the C-scan data corresponding to each weld layer.
[0018] In a fourth aspect, a computer device is provided, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the welding defect detection method as described in any one of the first aspects above.
[0019] In a fifth aspect, a computer-readable storage medium is provided, in which a computer program or instruction is stored. When the computer program or instruction is executed, a welding defect detection method as described in any one of the first aspects above is implemented.
[0020] In a sixth aspect, a computer program product is provided, comprising a computer program, which, when executed, enables a computer to execute a welding defect detection method as described in any one of the first aspects above.
[0021] The welding defect detection method provided in the embodiment of the present application introduces surface wave alignment, binarization processing and peak detection algorithms, and can automatically determine the weld positions of each weld layer in a multi-layer welded part. In this process, the information of all collected data in the three-dimensional scanning data is fully utilized, so that the accuracy of the determined weld position is higher. In this way, the C-scan data extracted based on the weld position can more accurately reflect the welding quality of the weld. Therefore, when detecting whether there are defects in the weld based on the C-scan data, the detection result obtained is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A schematic structural diagram of a multi-layer welded part is shown.
[0023] Figure 2 A structural block diagram of a computer device is shown.
[0024] Figure 3 A flow chart of a welding defect detection method provided in an embodiment of the present application is shown.
[0025] Figure 4 A schematic diagram of three-dimensional scanning data is shown.
[0026] Figure 5 B-scan images before and after the surface wave alignment process are shown.
[0027] Figure 6 B-scan images before and after binarization are shown.
[0028] Figure 7 A schematic diagram showing the distribution of one-dimensional data in the Z dimension.
[0029] Figure 8 A flow chart of another welding defect detection method provided in an embodiment of the present application is shown.
[0030] Fig. 9 A logic diagram of a welding defect detection method is shown.
[0031] Fig.10 A module schematic diagram of a defect detection model is shown.
[0032] Fig.11 A structural block diagram of a welding defect detection device provided in an embodiment of the present application.
[0033] Fig.12 A schematic diagram of an ultrasonic detection system is shown. DETAILED DESCRIPTION
[0034] The technical solutions in the embodiments of the present application are described below in conjunction with the accompanying drawings.
[0035] In modern manufacturing, multi-layer welded parts play an important role in many key fields, such as automobiles and power electronics. Among them, multi-layer welded parts are usually welded by multiple layers of metal plates to increase structural strength and thermal conductivity. Figure 1 As shown, Figure 1 A schematic diagram of the structure of a multi-layer welded component is shown. The multi-layer welded component includes a substrate and lower copper plate welding layer, a lower copper plate and ceramic welding layer, a ceramic and upper copper plate welding layer, a ceramic and chip welding layer, and a chip and silicone gel bonding layer. However, various defects may be introduced during the welding process, such as pores, cracks, unfused, inclusions, etc. These defects may lead to the risk of failure of the multi-layer welded component, so it is necessary to detect the quality of the weld of the multi-layer welded component.
[0036] At present, ultrasonic nondestructive testing technology has become one of the key means to evaluate welding quality due to its unique non-destructive and high-resolution characteristics. In recent years, with the development of ultrasonic phased array (PAUT) technology, the quality detection of welds of multi-layer welded parts has become more efficient and accurate. Among them, PAUT technology uses the principle of phased array to control the excitation sequence and phase difference of each chip in the array to achieve electronically controlled ultrasonic beam deflection and focusing, thereby obtaining higher resolution and detection speed. In addition, by physically moving the probe, a series of continuous two-dimensional data is collected, so that the detection area covers the entire workpiece, ensuring that all potential defect areas are inspected, and these two-dimensional data can be combined into three-dimensional data.
[0037] Although PAUT technology has shown advantages in the detection of multi-layer welded parts, there are still some areas that need to be improved. At present, when imaging the welds of multi-layer welded parts, most of them obtain C-scan images by slicing layer by layer, or manually determine the weld position at each weld, and then extract the C-scan image within the weld position. This method is time-consuming and inefficient.
[0038] Among them, the process of manually determining the weld position at each weld is generally to manually select one or several A-scan data in the Z dimension from the three-dimensional data, wherein the A-scan data includes multiple discrete data values, which can reflect the signal strength of the ultrasonic echo of each weld layer. The staff can determine the position of the peak of the echo signal corresponding to the A-scan data on the Z axis, and determine the weld position corresponding to each weld layer.
[0039] Since this solution determines the weld position based on a small amount of A-scan data, the accuracy of the weld position is not high. Therefore, the C-scan image extracted based on the weld position may not accurately reflect the welding quality of the weld, which is not conducive to defect detection.
[0040] In order to solve this technical problem, the present application provides a welding defect detection method, in which a B-scan image of XZ dimension is obtained from three-dimensional scanning data, the B-scan image is binarized, and the binarized B-scan image is superimposed along the X dimension to obtain one-dimensional data of Z dimension, and the one-dimensional data of Z dimension includes multiple discrete data values, and these discrete data values can reflect the echo signal intensity of ultrasonic scanning, wherein the echo signal intensity of the weld layer is higher than the echo signal intensity of the non-weld layer, and then the weld position corresponding to each weld layer is determined according to the position of the wave crest of the echo signal corresponding to one bit of data in Z dimension on Z axis. In this process, the information of all collected data in the three-dimensional scanning data is fully utilized, so that the accuracy of the determined weld position is higher, so that the C-scan data of XY dimension extracted based on the weld position can more accurately reflect the welding quality of the weld, thereby improving the detection result of welding defects.
[0041] The welding defect detection method provided in the embodiment of the present application can be applied to computer equipment. Figure 2 , Figure 2 A block diagram of a computer device is shown. The computer device includes a processor, a memory and a network interface connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The processor may include one or more processing units. The processor may be a CPU (Central Processing Unit) or a DSP (Digital Signal Processing), etc. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a welding defect detection method is implemented.
[0042] It should be noted that the implementation of each module in the computer device provided in the embodiment of the present application may be in the form of a computer program. The computer program can be run on the computer device. The program module constituted by the computer program can be stored in the memory of the computer device. When the computer program is executed by the processor, the steps of the method described in the embodiment of the present application are implemented.
[0043] Those skilled in the art will understand that Figure 2 The structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine some components, or arrange the components differently.
[0044] The implementation process of the welding defect detection method provided in the embodiment of the present application is described below with reference to the accompanying drawings.
[0045] Please refer to Figure 3 , Figure 3 A flow chart of a welding defect detection method provided in an embodiment of the present application is shown, and the method includes the following steps.
[0046] Step 301, obtaining three-dimensional scanning data corresponding to the multi-layer welded part.
[0047] In the embodiment of the present application, an ultrasonic phased array can be used to perform ultrasonic scanning on a multi-layer welded part to obtain three-dimensional scanning data. .in, for The size of the dimension, for The size of the dimension, for The size of the dimension.
[0048] like Figure 4 As shown, Figure 4 FIG. 1 shows a schematic diagram of three-dimensional scanning data. Figure 4 As shown, in the three-dimensional scanning data, the A-scan data is one-dimensional data in the Z dimension, the B-scan image is in the XZ dimension, and the C-scan image is in the XY dimension.
[0049] For example, the 3D scan data , which means that there are 100×100 A-scan data in the three-dimensional scanning data, and each A-scan data includes 200 data values.
[0050] It is also indicated that in the three-dimensional scanning data, by cutting the B-scan image along the Y axis with a step of 1, 100 B-scan images can be obtained, and the size of each B-scan image can be expressed as 100×200.
[0051] It is also indicated that in the three-dimensional scanning data, by cutting the C-scan image along the Z axis with a step of 1, 200 C-scan images can be obtained, and the size of each C-scan image can be expressed as 100×100.
[0052] Step 302 , extracting a B-scan image in the XZ dimension from the three-dimensional scanning data, and processing the B-scan image to obtain one-dimensional data in the Z dimension.
[0053] The one-dimensional data in the Z dimension includes a plurality of discrete data values, and the plurality of discrete data values reflect the echo signal strength of the ultrasonic scanning, wherein the echo signal strength of the weld layer is higher than the echo signal strength of the non-weld layer.
[0054] In an optional implementation, before cutting the B-scan image, the three-dimensional scanning data may be subjected to surface wave alignment processing, wherein the surface wave alignment processing may correct errors caused by uneven surfaces of multi-layer welded parts or tilted ultrasonic probes.
[0055] In the embodiment of the present application, the collected three-dimensional scanning data , the process of surface wave alignment includes: (1) Obtaining 3D scanning data Each A-scan data in ,in,( ).
[0056] (2) For A-scan data , determine the A-scan data The index number corresponding to the data value with the largest absolute value among the Z data values included .
[0057] Among them, the index number It can be expressed by the following formula:
[0058] in, Indicates A-scan data The index number corresponding to the maximum absolute value in , Indicates taking the maximum value, Indicates taking the absolute value.
[0059] (3) Remove the A-scan data Before data values, and in this A scan data Add at the end Preset data values.
[0060] Optionally, the preset data value may be 0.
[0061] (4) After processing all A-scan data, the three-dimensional scanning data V' after surface wave alignment is obtained.
[0062] In the embodiment of the present application, for each A scan data , by removing the previous data values, and fill in A preset data value is used to align the surface waves of all A-scan data to the starting position, and the dimension of each A-scan data is maintained as Z.
[0063] like Figure 5 As shown, Figure 5 The B-scan images before and after the surface wave alignment process are shown. Figure 5 (a) in the figure is the original B-scan image cut out from the 3D scanning data before the surface wave alignment. It can be seen that there is an unevenness on the original B-scan image. Figure 5 (b) is the B-scan image cut out from the 3D scan data after surface wave alignment. It can be seen that compared with Figure 5 In (a), after surface wave alignment, the B-scan image is flatter.
[0064] In the embodiment of the present application, the B-scan image of the XZ dimension can be directly cut from the three-dimensional scanning data, or the B-scan image of the XZ dimension can be cut from the three-dimensional scanning data after surface wave alignment. The latter is taken as an example for description.
[0065] In the embodiment of the present application, the computer device can obtain a B-scan image from the three-dimensional scanning data V' after surface wave alignment, and then process the B-scan image to obtain one-dimensional data of the Z dimension corresponding to the B-scan image. The processing process includes: B scan image For example, where j=1,2,…,y. Scan the B image Perform binarization operation to obtain a binary B-scan image
[0066] The binarization threshold is set to , then the data value of each pixel in the B-scan image is greater than When it is less than When , set to 0.
[0067] like Figure 6 As shown, Figure 6 The B-scan images before and after binarization are shown. Figure 6 (a) in the figure is the B-scan image before binarization. Figure 6 (b) is the B-scan image after binarization. Figure 6As can be seen from (b) in the figure, the contrast of the binarized B-scan image is more obvious.
[0068] On this basis, in the embodiment of the present application, the binarized B-scan image can be Superimpose along the X dimension to obtain one-dimensional data in the Z dimension ,in,
[0069] Please refer to Figure 7 , Figure 7 The diagram shows the distribution of one-dimensional data in the Z dimension. The horizontal axis is the Z axis, and the vertical axis reflects the echo signal intensity of the ultrasound scan. Figure 7 The value corresponding to the mid-wave peak position is the superposition result in the X dimension.
[0070] It can be seen that the one-dimensional data of the Z dimension includes multiple discrete data values. Among them, the echo signal intensity of the weld layer is higher than the echo signal intensity of the non-weld layer. Therefore, it can be considered that the position of the peak on the Z axis in these discrete data values is the position of the weld layer in the Z dimension. Figure 7 One wave peak in corresponds to one weld layer.
[0071] Step 303: determining the weld positions of each weld layer of the multi-layer welded part according to the peak values in the one-dimensional data of the Z dimension.
[0072] In the embodiment of the present application, the peak detection algorithm can be used to determine Figure 7 The position of each wave peak on the Z axis.
[0073] In one implementation, the position of the wave crest on the Z axis can be determined as the weld position of the weld layer. Figure 7 It can be seen that there are multiple wave peaks, and the position of each wave peak on the Z axis represents the weld position of the weld layer corresponding to the wave peak.
[0074] In another implementation, the weld position of each weld layer refers to the position interval corresponding to each weld layer. In other words, the weld position of each weld layer is not a position point, but a position range. In this case, the embodiment of the present application can determine the position interval corresponding to each weld layer with the position of the peak value in the one-dimensional data of the Z dimension on the Z axis as the center and the preset weld position threshold as the step size.
[0075] Taking a weld layer A as an example, the position of the wave peak corresponding to the weld layer A in the Z dimension is represented by Z0, and the preset weld position threshold is represented by t. Then, the position interval corresponding to the weld layer A can be expressed as [Z0-t, Z0+t].
[0076] It should be noted that in the embodiment of the present application, the three-dimensional scanning data V' after surface wave alignment can be cut into multiple B-scan images of XZ dimensions with a preset step in the Y dimension. Then, each B-scan image is processed according to the above-mentioned public scheme to obtain one-dimensional data of the Z dimension corresponding to each B-scan image.
[0077] Then, the computer device can obtain multiple first weld positions of each weld layer from the one-dimensional data of the Z dimension corresponding to the multiple B-scan images; for each weld layer, the multiple first weld positions of the weld layer are taken as a union to obtain the weld position of the weld layer.
[0078] Continuing with the above example, when the preset step is 1, 100 B-scan images can be cut out, and accordingly, 100 one-dimensional data in the Z dimension can be obtained. Accordingly, since each one-dimensional data in the Z dimension can obtain the weld position corresponding to each weld layer, 100 one-dimensional data in the Z dimension means that 100 first weld positions can be obtained for each weld layer.
[0079] In this case, for each weld layer, the 100 first weld positions may be combined to obtain a more accurate weld position.
[0080] When the weld position of a weld layer refers to the position interval corresponding to the weld layer, it can be understood that each weld layer corresponds to 100 position intervals, and a more accurate position interval of the weld layer can be obtained by taking the union of the 100 position intervals.
[0081] Step 304 , obtaining C-scan data of XY dimensions corresponding to each weld layer from the three-dimensional scanning data according to the weld position of each weld layer, and detecting whether each weld layer has welding defects according to the C-scan data corresponding to each weld layer.
[0082] In one implementation, for each weld layer, multiple C-scan data can be cut from the three-dimensional scan data according to the position interval of the weld layer, and then the maximum value is selected from the multiple C-scan data as the final C-scan data of the weld layer, and imaging is performed. Image analysis processing is performed based on the C-scan image corresponding to the final C-scan data to obtain defect detection results.
[0083] In another implementation, for each weld layer, a C-scan data block can be cut from the 3D scan data according to the position interval of the weld layer, and then the C-scan data block is used as a whole for defect detection to obtain a detection result. Compared with the method of defect detection based on a single C-scan image, this method retains more phase and channel information during defect detection, thereby improving the accuracy of defect detection.
[0084] The welding defect detection method provided in the embodiment of the present application, through the aforementioned surface wave alignment processing, binarization processing and superposition processing, makes the position interval of each weld layer of the multi-layer welded part determined to be relatively accurate. Based on this, the C-scan data obtained from the position interval of the weld layer can more accurately reflect the welding quality of the weld layer. Defect detection is performed on this basis, which helps to obtain more accurate detection results.
[0085] According to the above embodiments, although it is possible to determine whether multiple weld layers of a multi-layer welded part have defects, for example, it is possible to determine whether a certain weld layer has defects, other information of the defective weld layer, such as the type of weld layer, is not clear. Based on this, the embodiments of the present application propose a solution for identifying the type of weld layer.
[0086] In the embodiment of the present application, the computer device can detect the type of each weld layer based on the C-scan data corresponding to each weld layer.
[0087] Exemplarily, in an embodiment of the present application, the C-scan data corresponding to each weld layer can be respectively input into a preset type recognition model, and the type recognition model can be used to identify the type of the weld layer based on the characteristics of the C-scan data.
[0088] The type recognition model may be, for example, a trained ResNet50 convolutional neural network.
[0089] The classification of weld layers can be classified according to the number of layers, for example, from top to bottom, such as the first layer, the second layer, the third layer, ... The classification of weld layers can be classified according to the welding materials in the multi-layer welded parts, for example, substrate-copper plate classification, copper plate-ceramic classification, ceramic chip classification, etc. By adopting different training strategies for the type recognition model, the type recognition model can be enabled to classify weld layers according to materials, or according to the number of layers, etc.
[0090] In the embodiment of the present application, by identifying the type of weld layer, it helps the staff to determine the location of the defective weld layer in the multi-layer welded part, the welding material corresponding to the defective weld layer, and other information, laying the foundation for subsequent improvement processing.
[0091] Based on the above embodiments, another welding defect detection method is proposed in the present application embodiment. Figure 8 and Fig. 9 ,in, Figure 8 A flow chart of another welding defect detection method provided in an embodiment of the present application is shown. Fig. 9 A logic diagram of a welding defect detection method is shown. The method comprises the following steps: Step 801, obtaining three-dimensional scanning data corresponding to the multi-layer welded part.
[0092] Step 802: Perform surface wave alignment processing on the three-dimensional scanning data.
[0093] Step 803 , cutting out multiple B-scan images from the three-dimensional scan data after surface wave alignment, processing each B-scan image, and obtaining one-dimensional data of the Z dimension corresponding to the multiple B-scan images.
[0094] refer to Fig. 9 As shown, for example, y B-scan images can be obtained, and each B-scan image is binarized to obtain y binary B-scan images, and then each binary B-scan image is superimposed along the X dimension to obtain one-dimensional data of the Z dimension corresponding to the y B-scan images.
[0095] Step 804 , determining a set of position intervals corresponding to each weld layer based on the one-dimensional data of the Z dimension corresponding to the plurality of B-scan images.
[0096] For each weld layer, the position interval set corresponding to the weld layer includes the position intervals corresponding to the weld layer from each B-scan image.
[0097] In the embodiment of the present application, a peak detection algorithm is used to determine the weld positions corresponding to multiple weld layers in each Z-dimensional one-dimensional data. Fig. 9 As shown, for example, if there are weld layers 1 to N, then the position interval set of weld layer 1, ..., the position interval set of weld layer N can be obtained.
[0098] Step 805: for each weld layer, determine the precise position interval of the weld layer according to the position interval set corresponding to the weld layer.
[0099] In the present application embodiment, Fig. 9 As shown, for each weld layer, the position interval set of the weld layer is taken as the union, that is, the precise position interval of the weld layer is obtained.
[0100] Step 806, for each weld layer, obtain a C-scan data block corresponding to the weld layer from the three-dimensional scanning data according to the width of the position interval corresponding to the weld layer, and detect whether there is a welding defect in the weld layer according to the C-scan data block corresponding to the weld layer.
[0101] The dimension of the C-scan data block is XYW, where W is the width of the position interval corresponding to the weld layer.
[0102] In the embodiment of the present application, for each weld layer, the signal data (C-scan data block) within the position interval of the weld layer can be expressed as That is to say, what is obtained from the three-dimensional scanning data is no longer a single C-scan image, but three-dimensional signal data, which contains more phase and channel information than a single C-scan image.
[0103] Based on this, an embodiment of the present application also provides a defect detection model, which includes a signal superposition module based on an attention mechanism and can support three-dimensional signal data as input.
[0104] Please refer to Fig.10 , Fig.10 FIG. 1 shows a module diagram of a defect detection model. Fig.10 As shown, the defect detection model includes a signal superposition module, an encoding module, a decoding module and a prediction module based on an attention mechanism. The input of the defect detection model is the three-dimensional signal data in the position interval corresponding to the weld layer, and the output of the defect detection model is the defect detection result of the weld layer, and the detection result indicates whether there is a welding defect in the weld layer.
[0105] The various parts of the defect detection model are described below.
[0106] The signal superposition module based on the attention mechanism can superimpose the C-scan data block from three-dimensional data to two-dimensional data. As input, after passing through the signal superposition module of the attention mechanism, the superimposed two-dimensional data can be obtained .
[0107] Among them, the mathematical model of the signal superposition module based on the attention mechanism can be expressed as:
[0108]
[0109] in, , is the weight of the network, , is the bias of the network, is the activation function, is the function for calculating the weight score, For the C-scan data block, is the two-dimensional data after the C-scan data blocks are superimposed, Represents a weighted sum operation.
[0110] Encoding module: The two-dimensional data processed by the signal superposition module through the above attention mechanism Then it is passed to the encoding module. In the embodiment of the present application, ResNet50 can be used as the network model of the encoding module. The main purpose of the encoding module is to extract deep features and strengthen the connection between adjacent elements. The module can extract intermediate features containing different semantic information, for example, four intermediate features, which can be represented as , , , .
[0111] Decoding module: The four intermediate features extracted by the encoding module are then passed to the decoding module. In the embodiment of the present application, a convolutional layer and an upsampling layer are cascaded as a decoding module, the main purpose of which is to restore the spatial size of the feature. This module can output the decoded features. .
[0112] Prediction module: The features output by the above decoding module After passing through the 1×1 convolution layer and then the softmax function, the score matrix can be obtained , each element of the score matrix represents the predicted score of whether there is a defect at that location. When the score is greater than the preset threshold, it means that there is a defect at that location, otherwise there is no defect at that location. The results of defect detection are used by the system to display the location of defects in each weld layer.
[0113] In an embodiment of the present application, a three-dimensional C-scan data block is acquired from a position interval corresponding to the weld layer, and then defect detection is performed based on the three-dimensional signal data, thereby making full use of the phase and channel information of the original signal and improving the accuracy of the detection result.
[0114] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0115] Based on the same inventive concept, the embodiment of the present application also provides a welding defect detection device, and the implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the welding defect detection device embodiment provided below can refer to the limitations of the welding defect detection method above, and will not be repeated here. Fig.11 As shown, Fig.11A structural block diagram of a welding defect detection device provided in an embodiment of the present application, the device includes: an acquisition module 1101, a processing module 1102, a weld position determination module 1103, and a detection module 1104, wherein the acquisition module 1101 is used to obtain three-dimensional scanning data corresponding to a multi-layer weldment; the processing module 1102 is used to cut a B-scan image of an XZ dimension from the three-dimensional scanning data, and process the B-scan image to obtain one-dimensional data of the Z dimension, wherein the one-dimensional data of the Z dimension includes a plurality of discrete data values, and the plurality of discrete data values reflect the echo signal intensity of the ultrasonic scanning, wherein the echo signal intensity of the weld layer is higher than the echo signal intensity of the non-weld layer; the weld position determination module 1102 is used to determine the weld position of each weld layer of the multi-layer weldment according to the peak value in the one-dimensional data of the Z dimension; the detection module 1104 is used to obtain the C-scan data of the XY dimension corresponding to each weld layer from the three-dimensional scanning data according to the weld position of each weld layer, and detect whether each weld layer has a welding defect according to the C-scan data corresponding to each weld layer.
[0116] In one embodiment, the processing module 1102 is also used to perform surface wave alignment processing on the three-dimensional scanning data, wherein the surface wave alignment processing includes: for each A-scan data in the three-dimensional scanning data, obtaining the index number e of the data value with the largest absolute value among the data values included in the A-scan data, removing the first e data values in the A-scan data, and adding e preset data values at the end of the A-scan data to obtain the three-dimensional scanning data after surface wave alignment.
[0117] In one embodiment, the processing module 1102 is further configured to perform binarization processing on the B-scan image to obtain a binarized B-scan image; and to superimpose the binarized B-scan image along the X dimension to obtain one-dimensional data of the Z dimension corresponding to the B-scan image.
[0118] In one of the embodiments, the weld position of a weld layer refers to a position interval corresponding to the weld layer, and the weld position determination module 1103 is also used to determine the position interval corresponding to each weld layer with the position of the peak value in the one-dimensional data of the Z dimension on the Z axis as the center and a preset weld position threshold as the step size.
[0119] In one of the embodiments, the processing module 1102 is also used to cut multiple B-scan images from the three-dimensional scanning data along the Y dimension at a preset step; each B-scan image is processed to obtain one-dimensional data of the Z dimension corresponding to each B-scan image; the weld position determination module 1103 is also used to obtain multiple first weld positions of each weld layer from the one-dimensional data of the Z dimension corresponding to the multiple B-scan images; for each weld layer, the multiple first weld positions of the weld layer are unioned to obtain the weld position of the weld layer.
[0120] In one of the embodiments, the detection module 1104 is also used to obtain, for each weld layer, a C-scan data block corresponding to the weld layer from the three-dimensional scanning data according to the width of the position interval corresponding to the weld layer; the dimension of the C-scan data block is XYW, where W is the width of the position interval corresponding to the weld layer; and detect whether there are welding defects in the weld layer according to the C-scan data block corresponding to the weld layer.
[0121] In one embodiment, the detection module 1104 is also used to input the C-scan data block corresponding to the weld layer into a preset defect detection model to obtain a detection result output by the defect detection model, and the detection result indicates whether a welding defect exists in the weld layer; wherein the defect detection model includes a signal superposition module based on an attention mechanism, and the signal superposition module is used to superimpose the C-scan data block from three-dimensional data to two-dimensional data.
[0122] In one embodiment, the mathematical model of the signal superposition module based on the attention mechanism can be expressed as:
[0123]
[0124] in, , is the weight of the network, , is the bias of the network, is the activation function, is the function for calculating the weight score, Scan the data block for C, It is the two-dimensional data after the C-scan data blocks are superimposed. Represents a weighted sum operation.
[0125] In one embodiment, the processing module 1102 is further configured to detect the type of each weld layer according to the C-scan data corresponding to each weld layer.
[0126] Each module in the above welding defect detection device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0127] Based on the above embodiments, the present application also provides an ultrasonic detection system, such as Fig.12 As shown, Fig.12A schematic diagram of an ultrasonic detection system is shown, which includes a scanning component 1201 and a processing component 1202, wherein the scanning component 1201 is used to scan a multi-layer welded part to obtain three-dimensional scanning data; the processing component 1202 is used to execute the steps of the above-mentioned welding defect detection method.
[0128] Based on the above embodiments, the embodiments of the present application also provide a computer-readable storage medium, which stores a computer program (or computer-executable instructions). When the computer program is executed by one or more processors, the processor executes the steps of the welding defect detection method in the above embodiments.
[0129] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the steps of the welding defect detection method.
[0130] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0131] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above are only specific implementation methods of the present application and are not used to limit the protection scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the protection scope of the present application.
Claims
1. A welding defect detection method, characterized in that: The method comprises: Obtaining 3D scanning data corresponding to multi-layer welded parts; A B-scan image of an XZ dimension is cut from the three-dimensional scanning data, and the B-scan image is processed to obtain one-dimensional data of a Z dimension, wherein the one-dimensional data of the Z dimension reflects the intensity of the echo signal of the ultrasonic scanning, wherein the intensity of the echo signal corresponding to the weld layer is higher than the intensity of the echo signal corresponding to the non-weld layer; Determine the weld position of each weld layer of the multi-layer welded part according to the peak value of the echo signal in the one-dimensional data of the Z dimension; According to the weld position of each weld layer, C-scan data of XY dimensions corresponding to each weld layer is obtained from the three-dimensional scanning data, and according to the C-scan data corresponding to each weld layer, it is detected whether each weld layer has welding defects.
2. The method according to claim 1, characterized in that Before extracting the B-scan image in the XZ dimension from the three-dimensional scanning data, the method further includes: For each A-scan data in the three-dimensional scan data, obtaining an index number e of a data value with the largest absolute value among the data values included in the A-scan data, wherein the position of the index number e in the A-scan data represents the starting position of the surface wave of the multi-layer welded part; The first e data values in the A-scan data are removed, and e preset data values are added to the end of the A-scan data to obtain three-dimensional scanning data after surface wave alignment.
3. The method according to claim 1 or 2, characterized in that: The step of processing the B-scan image to obtain one-dimensional data of the Z dimension includes: Binarizing the B-scan image to obtain a binarized B-scan image; The binarized B-scan images are superimposed along the X dimension to obtain one-dimensional data of the Z dimension corresponding to the B-scan images.
4. The method according to claim 1, characterized in that The weld position of the weld layer refers to the position interval corresponding to the weld layer, and determining the weld position of each weld layer of the multi-layer welded part according to the peak value in the one-dimensional data of the Z dimension includes: The position interval corresponding to each weld layer is determined by taking the position of the peak value in the one-dimensional data of the Z dimension on the Z axis as the center and taking the preset weld position threshold as the step length.
5. The method according to claim 1, characterized in that The step of cutting a B-scan image of an XZ dimension from the three-dimensional scanning data and processing the B-scan image to obtain one-dimensional data of a Z dimension includes: Slicing a plurality of B-scan images from the three-dimensional scan data at a preset step along the Y dimension; Processing each of the B-scan images to obtain one-dimensional data of the Z dimension corresponding to each of the B-scan images; The step of determining the weld positions of each weld layer of the multi-layer welded part according to the peak value in the one-dimensional data of the Z dimension comprises: Acquire a plurality of first weld positions of each weld layer from one-dimensional data of the Z dimension corresponding to a plurality of the B-scan images; For each of the weld layers, a union of a plurality of first weld positions of the weld layer is taken to obtain the weld position of the weld layer.
6. The method according to claim 1, characterized in that The method of acquiring C-scan data of XY dimensions corresponding to each weld layer from the three-dimensional scanning data according to the weld position of each weld layer, and detecting whether each weld layer has a welding defect according to the C-scan data corresponding to each weld layer, comprises: For each weld layer, a C-scan data block corresponding to the weld layer is obtained from the three-dimensional scanning data according to a width W of a position interval corresponding to the weld layer, wherein the dimensions of the C-scan data block are XYW; The C-scan data block corresponding to the weld layer is used to detect whether the weld layer has welding defects.
7. The method according to claim 6, characterized in that The detecting whether the weld layer has welding defects according to the C-scan data block corresponding to the weld layer includes: Inputting the C-scan data block corresponding to the weld layer into a preset defect detection model to obtain a detection result output by the defect detection model, wherein the detection result indicates whether a welding defect exists in the weld layer; Among them, the defect detection model includes a signal superposition module based on an attention mechanism, and the signal superposition module is used to superimpose the C-scan data block from three-dimensional data to two-dimensional data.
8. The method according to claim 7, characterized in that The mathematical model of the signal superposition module based on the attention mechanism can be expressed as: in, , is the weight of the network, , is the bias of the network, is the activation function, is the function for calculating the weight score, For the C-scan data block, is the two-dimensional data after the C-scan data blocks are superimposed, Represents a weighted sum operation.
9. The method according to claim 1, characterized in that: The method further comprises: The type of each weld layer is identified according to the C-scan data corresponding to each weld layer.
10. A welding defect detection device, characterized in that: The device comprises: An acquisition module, used to acquire three-dimensional scanning data corresponding to the multi-layer welded part; A processing module, used for cutting a B-scan image of an XZ dimension from the three-dimensional scanning data, and processing the B-scan image to obtain one-dimensional data of a Z dimension, wherein the one-dimensional data of the Z dimension reflects the intensity of the echo signal of the ultrasonic scanning, wherein the intensity of the echo signal corresponding to the weld layer is higher than the intensity of the echo signal corresponding to the non-weld layer; A weld position determination module, used to determine the weld positions of each weld layer of the multi-layer welded part according to the peak value of the echo signal in the one-dimensional data of the Z dimension; The detection module is used to obtain C-scan data of XY dimensions corresponding to each weld layer from the three-dimensional scanning data according to the weld position of each weld layer, and detect whether each weld layer has welding defects according to the C-scan data corresponding to each weld layer.
11. An ultrasonic detection system, characterized in that: It includes a scanning component and a processing component, wherein: The scanning component is used to scan the multi-layer welded part to obtain three-dimensional scanning data; The processing component is used to cut a B-scan image of XZ dimensions from the three-dimensional scanning data, process the B-scan image to obtain one-dimensional data of Z dimension, wherein the one-dimensional data of Z dimension reflects the intensity of the echo signal of ultrasonic scanning, wherein the intensity of the echo signal corresponding to the weld layer is higher than the intensity of the echo signal corresponding to the non-weld layer; determine the weld position of each weld layer of the multi-layer welded part according to the peak value of the echo signal in the one-dimensional data of Z dimension; obtain the C-scan data of XY dimensions corresponding to each weld layer from the three-dimensional scanning data according to the weld position of each weld layer, and detect whether each weld layer has a welding defect according to the C-scan data corresponding to each weld layer.
12. A computer device, characterized in that: The device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the welding defect detection method according to any one of claims 1 to 9.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction, and when the computer program or instruction is executed, the welding defect detection method according to any one of claims 1 to 9 is implemented.
14. A computer program product, characterized in that The invention comprises a computer program, which, when being executed, enables a computer to execute the welding defect detection method according to any one of claims 1 to 9.