A Method and System for Predicting Welding Defects in Pressure Structures Based on Multi-Source Data Fusion

By fusing multi-source data and analyzing long short-term memory networks, and combining current, voltage and visual features, defect probability distribution data is generated, which solves the problem of low accuracy in welding defect prediction and achieves higher accuracy in welding quality judgment.

CN121479708BActive Publication Date: 2026-03-13广东省特种设备检测研究院茂名检测院 +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-08
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in predicting welding defects and cannot effectively combine current and voltage data with visual feature information, resulting in inaccurate judgment of welding quality.

Method used

By collecting current and voltage data and image data during the welding process, multi-source data fusion is performed. Long short-term memory network is used to analyze the long-term dependency relationship between current and voltage fluctuations and visual description vectors, generating defect probability distribution data. Welding quality level is determined by visual defect map and support vector machine classifier.

Benefits of technology

It improves the accuracy and sensitivity of welding defect prediction, solves the problems of lack of full-process time sequence analysis and inaccurate key feature capture in traditional technologies, and enhances the consistency and reliability of welding process data fusion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121479708B_ABST
    Figure CN121479708B_ABST
Patent Text Reader

Abstract

This invention relates to the field of welding defect prediction technology, and discloses a method and system for predicting welding defects in pressure-bearing structures based on multi-source data fusion. The method includes: acquiring current and voltage data sequences and image data to obtain a multi-source dataset; extracting dynamic change features from the multi-source dataset to obtain current and voltage fluctuation vectors and visual description vectors; concatenating the current and voltage fluctuation vectors with the visual description vectors to generate a comprehensive feature vector; weighting the comprehensive feature vector to obtain a weighted fusion feature; analyzing the long-term dependencies of the weighted fusion feature using a pre-trained long short-term memory network to obtain defect probability distribution data; obtaining a visualized defect map based on the defect probability distribution data; extracting statistical features from the high-risk areas to determine the welding quality level and outputting the prediction result. This method can improve the accuracy of welding defect prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of welding defect prediction technology, and in particular to a method and system for predicting welding defects in pressure-bearing structures based on multi-source data fusion. Background Technology

[0002] Currently, in modern industrial manufacturing, the welding quality of pressure-bearing structures directly affects the safety and service life of equipment. Welding, as a core process for connecting critical components, plays a vital role in ensuring structural stability and preventing failures. Therefore, improving the ability to predict and control welding defects has become an urgent need for enhancing industrial safety and production efficiency.

[0003] In one existing technology, intelligent sensors record the changes in current and voltage values ​​during welding in real time, calculate the mean and variance of the data, and analyze the fluctuation range of current and voltage. If the fluctuation exceeds a preset fixed threshold, it is determined that there is a stability deviation in the welding process, which may lead to defects. Finally, the defect prediction result is output based on a single-dimensional numerical judgment. However, this method only uses current and voltage data as a single analysis dimension and fails to incorporate visual feature information of the welding area for collaborative judgment. It cannot explore the deep correlation between current and voltage changes and defect formation, resulting in low accuracy in defect judgment and a large deviation between the prediction result and the actual welding quality. It cannot meet the accuracy requirements of welding defect prediction for pressure-bearing structures in complex environments.

[0004] Therefore, existing technologies suffer from low accuracy in predicting welding defects. Summary of the Invention

[0005] This invention provides a method and system for predicting welding defects in pressure-bearing structures based on multi-source data fusion, in order to solve the problem of low accuracy in welding defect prediction.

[0006] Firstly, in order to solve the above-mentioned technical problems, the present invention provides a method for predicting welding defects in pressure-bearing structures based on multi-source data fusion, comprising:

[0007] Collect current and voltage data sequences and image data during the welding process to obtain a multi-source dataset;

[0008] Based on the multi-source dataset, dynamic change features are extracted from the current and voltage data sequence to obtain a current and voltage fluctuation vector; features are extracted from the image data to obtain a visual description vector.

[0009] The current-voltage fluctuation vector and the visual description vector are concatenated to generate a comprehensive feature vector.

[0010] If the fluctuation amplitude in the comprehensive feature vector exceeds a preset fluctuation threshold, the comprehensive feature vector is weighted to obtain a weighted fusion feature.

[0011] The long-term dependencies of the weighted fusion features are analyzed using a pre-trained long short-term memory network to obtain defect probability distribution data;

[0012] If the probability of a defect in the defect probability distribution data is higher than a preset probability threshold, it is marked as a high-risk area, and a defect location mask is generated to obtain a visual defect map.

[0013] The statistical features of the high-risk areas are extracted from the visualized defect map and input into a preset classifier for verification to determine the welding quality level and output the prediction results.

[0014] In one optional implementation, the acquisition of current and voltage data sequences and image data during the welding process yields a multi-source dataset, including:

[0015] The welding process is monitored by acquiring current and voltage data sequences using current and voltage sensors; image data of the corresponding parts is acquired using image sensors; the timestamps of the current and voltage data sequences and the image data are obtained, and the current and voltage data sequences and the image data are integrated to obtain the original multi-source data.

[0016] Based on the original multi-source data, the timestamps are correlated to obtain a timestamp-aligned multi-source sequence;

[0017] The timestamp-aligned multi-source sequences are fused and stored in a preset database to obtain a multi-source dataset.

[0018] In one optional implementation, the step of extracting dynamic change features from the current and voltage data sequence based on the multi-source dataset to obtain a current and voltage fluctuation vector; and extracting features from the image data to obtain a visual description vector, includes:

[0019] Based on the current and voltage data sequence, a long short-term memory network is used to process the variation amplitude and duration between adjacent sampling points of the current and voltage data sequence segment by segment to obtain the current and voltage fluctuation vector.

[0020] Based on the image data, the edge gradient of the weld area in each frame is calculated, the color difference distribution of the molten pool pixel area is statistically analyzed, and a visual description vector is obtained.

[0021] In an optional implementation, before concatenating the current-voltage fluctuation vector with the visual description vector to generate a comprehensive feature vector, the method further includes:

[0022] The image data is segmented, and the pixel region of the molten pool is determined based on the color difference between the molten pool and the base material.

[0023] The Sobel operator is used to calculate the edge gradient, texture direction, and density distribution of the molten pool pixel region to obtain the basic features of the molten pool texture.

[0024] The basic features of the molten pool texture are compared with a preset normal texture standard. If there is a deviation from the standard, it is determined to be an abnormal point in the molten pool texture.

[0025] In one optional implementation, if the fluctuation amplitude in the comprehensive feature vector exceeds a preset fluctuation threshold, the comprehensive feature vector is weighted to obtain a weighted fused feature, including:

[0026] Based on the comprehensive feature vector, voltage fluctuation amplitude values ​​are extracted element by element to obtain the fluctuation amplitude sequence;

[0027] If at least one of the voltage fluctuation amplitude values ​​in the fluctuation amplitude sequence exceeds a preset fluctuation threshold, the corresponding position of the voltage fluctuation change and the abnormal point of the molten pool texture is located to obtain a texture abnormality location set;

[0028] Based on the image data, the RGB three-channel pixel value distribution of the molten pool pixel region is statistically analyzed to obtain image color difference distribution data;

[0029] Based on the set of texture anomaly locations, the correlation attention score between the image color difference distribution data and the current and voltage data sequence is calculated to obtain the attention score sequence;

[0030] The attention score sequence is applied to the corresponding elements of the comprehensive feature vector to obtain weighted fusion features.

[0031] In one optional implementation, the step of using a pre-trained long short-term memory network to analyze the long-term dependencies of the weighted fused features to obtain defect probability distribution data includes:

[0032] Based on the weighted fusion features, the feature elements are arranged sequentially to obtain the temporal input sequence;

[0033] The hidden state sequence is obtained by analyzing the temporal input sequence using a pre-trained long short-term memory network.

[0034] Based on the hidden state sequence, a long-term dependency score is calculated. If the long-term dependency score exceeds a preset score threshold, the melt pool texture anomaly point is matched to obtain a stability deviation set.

[0035] Based on the stability deviation set, the probability of defect occurrence is calculated to obtain defect probability distribution data.

[0036] In one optional implementation, if the defect probability in the defect probability distribution data is higher than a preset probability threshold, it is marked as a high-risk area, and a defect location mask is generated to obtain a visualized defect map, including:

[0037] Based on the defect probability distribution data, an element-by-element comparison is performed using a preset probability threshold. If an element value is higher than the preset probability threshold, it is marked as a high-risk pixel. The high-risk pixels are then integrated to obtain a high-risk region.

[0038] Based on the high-risk areas, a defect location mask is generated through binarization processing;

[0039] Based on the defect location mask, pixel-by-pixel overlay is performed with the image data to obtain a preliminary visualization image;

[0040] Based on the preliminary visualized image, a preset color mapping table is applied to determine the risk level, resulting in a visualized defect map.

[0041] In one optional implementation, the step of extracting statistical features of the high-risk areas from the visualized defect map, inputting them into a preset classifier for verification, determining the welding quality level, and outputting the prediction result includes:

[0042] Based on the visualized defect map, adjacent high-risk regions are aggregated to obtain a set of high-risk connected regions; if the number of pixels in the set of high-risk connected regions exceeds a preset pixel threshold, the set of high-risk connected regions is retained to obtain a filtered set of high-risk regions.

[0043] Based on the selected high-risk region set, the compactness is calculated by boundary tracking. If the compactness is lower than the preset compactness threshold, the aspect ratio of the defect region and the concavity and convexity of the defect edge of the selected high-risk region set are supplemented to determine the statistical feature vector.

[0044] The statistical feature vectors are normalized to generate a standardized feature set, which is then input into a support vector machine classifier to determine the welding quality level and obtain the prediction result.

[0045] Secondly, the present invention provides a system for predicting welding defects in pressure-bearing structures based on multi-source data fusion, comprising:

[0046] The data acquisition module is used to acquire current and voltage data sequences and image data during the welding process to obtain a multi-source dataset;

[0047] The feature extraction module is used to extract dynamic change features from the current and voltage data sequence based on the multi-source dataset to obtain a current and voltage fluctuation vector; and to extract features from the image data to obtain a visual description vector.

[0048] The feature vector concatenation module is used to concatenate the current-voltage fluctuation vector with the visual description vector to generate a comprehensive feature vector.

[0049] The feature vector weighting module is used to perform weighting processing on the comprehensive feature vector if the fluctuation amplitude in the comprehensive feature vector exceeds a preset fluctuation threshold, so as to obtain a weighted fusion feature.

[0050] The probability distribution acquisition module is used to analyze the long-term dependencies of the weighted fusion features using a pre-trained long short-term memory network to obtain defect probability distribution data;

[0051] The defect visualization module is used to mark a high-risk area if the defect probability in the defect probability distribution data is higher than a preset probability threshold, and to generate a defect location mask to obtain a visualized defect map.

[0052] The results output module is used to extract statistical features of the high-risk areas from the visualized defect map, input them into a preset classifier for verification, determine the welding quality level, and output the prediction results.

[0053] Thirdly, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the method for predicting welding defects in pressure structures based on multi-source data fusion as described above.

[0054] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the method for predicting welding defects in pressure structures based on multi-source data fusion as described above.

[0055] Compared with the prior art, the present invention has the following beneficial effects:

[0056] (1) This invention analyzes the long-term dependency relationship of data through time series modeling, generates a defect map by combining threshold comparison and visualization mask, and then realizes the quality level determination through statistical feature extraction and support vector machine classifier verification. This solves the shortcomings of traditional technology, such as lack of full-process time series analysis, fuzzy defect location and strong subjectivity of quality assessment, and improves the accuracy of welding defect prediction.

[0057] (2) This invention extracts the dynamic fluctuation features of current and voltage through long short-term memory network, and highlights the abnormal correlation features through vector concatenation and attention mechanism. This solves the problem that traditional technology is difficult to deeply integrate numerical and visual data and the key defect features are not accurately captured, and enhances the sensitivity of defect prediction in complex welding environments.

[0058] (3) This invention achieves accurate matching of current and voltage sequences with image frames through multi-source data synchronous acquisition and timestamp calibration mechanism, and solves the problems of misalignment of multi-source information and poor data correlation in traditional technology by using an interpolation adjuster to unify sequence length, thereby improving the consistency and reliability of data fusion in the welding process. Attached Figure Description

[0059] Figure 1 This is a schematic diagram of the process for predicting welding defects in pressure-bearing structures based on multi-source data fusion, provided in the first embodiment of the present invention.

[0060] Figure 2 This is a schematic diagram of the structure of the pressure-bearing structure welding defect prediction system based on multi-source data fusion provided in the second embodiment of the present invention. Detailed Implementation

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

[0062] Reference Figure 1 The first embodiment of the present invention provides a method for predicting welding defects in pressure-bearing structures based on multi-source data fusion, comprising the following steps:

[0063] S11, collect current and voltage data sequences and image data during the welding process to obtain a multi-source dataset;

[0064] S12, Based on the multi-source dataset, perform dynamic change feature extraction on the current and voltage data sequence to obtain a current and voltage fluctuation vector; perform feature extraction on the image data to obtain a visual description vector;

[0065] S13, concatenate the current-voltage fluctuation vector with the visual description vector to generate a comprehensive feature vector;

[0066] S14, if the fluctuation amplitude in the comprehensive feature vector exceeds a preset fluctuation threshold, then the comprehensive feature vector is weighted to obtain a weighted fusion feature;

[0067] S15, a pre-trained long short-term memory network is used to analyze the long-term dependencies of the weighted fusion features to obtain defect probability distribution data;

[0068] S16, If the defect probability in the defect probability distribution data is higher than the preset probability threshold, it is marked as a high-risk area, and a defect location mask is generated to obtain a visual defect map.

[0069] S17. Extract the statistical features of the high-risk area from the visualized defect map, input them into a preset classifier for verification, determine the welding quality level, and output the prediction result.

[0070] In step S11, the acquisition of current and voltage data sequences and image data during the welding process yields a multi-source dataset, including:

[0071] The welding process is monitored by acquiring current and voltage data sequences using current and voltage sensors; image data of the corresponding parts is acquired using image sensors; the timestamps of the current and voltage data sequences and the image data are obtained, and the current and voltage data sequences and the image data are integrated to obtain the original multi-source data.

[0072] Based on the original multi-source data, the timestamps are correlated to obtain a timestamp-aligned multi-source sequence;

[0073] The timestamp-aligned multi-source sequences are fused and stored in a preset database to obtain a multi-source dataset.

[0074] Specifically, according to the preset sampling frequency, the current and voltage sensors are set to acquire data 100 times per second to obtain current and voltage values ​​in real time during the welding process, forming a continuous current and voltage data sequence. Simultaneously, the sampling frequency of the image sensor is set so that it shares the system clock with the current and voltage sensors, obtaining a timestamp sequence from the system clock to ensure synchronized timestamp generation. For example, at 10:00:00.001 on 2024-05-22, the current and voltage sensors acquire real-time data of 200A current and 24V voltage. Simultaneously, the image sensor captures an image frame of the welding area at that moment. The system automatically timestamps the current and voltage data as "2024-05-22 10:00:00.001" and the image frame with the same timestamp, continuously executing this acquisition operation until the end of a single welding process. Assuming a single welding process acquisition time of 10 seconds, 1000 current and voltage data points and corresponding image frames can be obtained.

[0075] In one possible implementation, all collected data is integrated based on timestamps, and the data format is standardized. Current data is fixed in "A", voltage data in "V", and image data is stored in a standard image format (such as JPEG) and associated with corresponding timestamp filenames. For example, "2024-05-22 10:00:00.001" corresponding to "current 200A, voltage 24V, image frame" is integrated into a single associated data record, ultimately forming raw multi-source data containing complete timestamp relationships.

[0076] For example, regarding the timestamp correlation in the original multi-source data, the system's built-in timestamp verification tool is first used to compare the timestamp deviations between the current and voltage data sequences and the image data one by one. Referring to a preset timestamp deviation threshold (e.g., 0.003 seconds), during the data verification process, it was found that the current and voltage data at "10:00:05.002" corresponds to an image data timestamp of "10:00:05.006," a deviation of 0.004 seconds, exceeding the preset threshold of 0.003 seconds; another current and voltage data at "10:00:08.001" corresponds to an image timestamp of "10:00:08.005," a deviation of 0.004 seconds, also exceeding the threshold. At this point, the clock synchronizer is activated. Using the timestamps of the current and voltage data as a reference (since current and voltage data are core indicators reflecting welding energy input, higher time accuracy is required), the timestamps of the image data with excessive deviations are calibrated. The timestamps of the two frames mentioned above are adjusted to "10:00:05.002" and "10:00:08.001" respectively, ensuring that the timestamps of the current and voltage data are completely matched with those of the image data, forming a timestamp-aligned multi-source sequence.

[0077] It should be noted that the timestamp deviation threshold is set based on the reference frequency of the system clock. A timestamp compensation model is established by pre-calculating the image sensor hardware delay, such as an average delay of 0.002 seconds, to ensure that the calibrated timestamp error is controlled within ±0.001 seconds, so as to avoid misjudgment in subsequent feature association analysis due to time misalignment. The preset threshold is set to 0.003 seconds.

[0078] For example, the timestamp-aligned multi-source sequences are fused and stored in a pre-defined time-series database in a structured format of "timestamp-current value-voltage value-image storage path". Each record includes a timestamp field in the following format: HH:MM:SS.fff, such as "10:00:05.000"; a current field, numeric, in amperes (A), such as 200; a voltage field, numeric, in volts (V), such as 24; and an image path field, a string storing the absolute path of the image on the server, such as " / welding_data / 20240522 / 20240522100005000.jpg". Taking a 10-second acquisition duration as an example, this ultimately results in 1000 structured storage records and 1000 associated images, together forming a multi-source dataset containing timestamps.

[0079] In step S12, based on the multi-source dataset, dynamic change features are extracted from the current and voltage data sequence to obtain a current and voltage fluctuation vector; features are extracted from the image data to obtain a visual description vector, including:

[0080] Based on the current and voltage data sequence, a long short-term memory network is used to process the variation amplitude and duration between adjacent sampling points of the current and voltage data sequence segment by segment to obtain the current and voltage fluctuation vector.

[0081] Based on the image data, the edge gradient of the weld area in each frame is calculated, the color difference distribution of the molten pool pixel area is statistically analyzed, and a visual description vector is obtained.

[0082] Specifically, the structured storage interface of the multi-source dataset is first invoked. The data parser then separates the data from the preset time-series database according to the timestamp-data type filtering rules. Records containing current and voltage fields are extracted into current-voltage data sequences, with each record containing a timestamp, current (unit: A), and voltage (unit: V) information. Records containing image path fields are associated with and read from their corresponding image files to form image data sequences, with each frame having a resolution of 1920×1080 pixels and a JPEG format. For example, from a multi-source dataset with a 10-second acquisition duration, a sequence of 1000 current-voltage data points and a sequence of 1000 image frames can be separated.

[0083] In one possible implementation, the length difference between the current and voltage data sequence and the image data sequence is first calculated. A preset length deviation threshold of 20 is set. If, after a separation, 1000 current and voltage data points and 975 image frames are obtained, and the deviation of 25 exceeds the threshold, an interpolation adjuster is activated. By analyzing the timestamp distribution of the image sequence, interpolation is performed at the time index position of the missing image, based on the pixel features of adjacent frames, such as weld edge contours and molten pool color distribution, to generate 25 estimated images. This completes the image sequence length to 1000 frames, ensuring that the lengths of the two types of sequences are consistent.

[0084] For example, a Long Short-Term Memory (LSTM) network is applied to extract dynamic features from 1000 data points in a current and voltage data sequence of uniform length. The network first divides the sequence into time windows, such as every 10 consecutive data points, and analyzes the current and voltage variation amplitudes of adjacent data points window by window. For instance, in data points 50-60, the current increases from 200A to 220A (a change of 20A), and the voltage decreases from 24V to 23V (a change of 1V). The duration of the change is also analyzed, such as the duration of the amplitude change being 0.1 seconds. Then, a gating mechanism is used to capture long-term dependencies in the sequence, such as the periodic fluctuations of the current between data points 100-200. The final output is a 1000×128 dimension current and voltage fluctuation vector, where each element corresponds to a dynamic feature combination with a time index, containing information such as the current variation amplitude, voltage variation amplitude, and duration.

[0085] For example, when extracting visual features from a sequence of 1000 frames of image data of uniform length, the weld seam region is first located in each frame. Based on grayscale thresholding, the weld seam region is separated from the background. Then, the gradient value of the weld seam edge is calculated: the Sobel operator is called to perform edge detection on the molten pool pixel region, and the pixel grayscale gradient is calculated along the x-axis and y-axis directions respectively. The gradient magnitude is then calculated using the formula... The edge gradient matrix is ​​obtained, reflecting the clarity of the weld contour. For example, the gradient value of a normal weld edge is concentrated between 50-80, while the gradient value at abnormal depressions rises sharply to over 120. Simultaneously, color features of the molten pool pixel region are extracted. The image is converted from RGB space to HSV space, and the mean values ​​of hue (H), saturation (S), and lightness (V) of the molten pool pixel region are statistically analyzed. For example, the hue of a normal molten pool is concentrated between 20-30 (orange-yellow), while the hue drops to 10-15 (dark red) during local overheating. The edge gradient statistics of each frame, such as the mean gradient and gradient variance, are combined with the molten pool color difference statistics, such as the mean H and mean S, to generate a visual description vector with a dimension of 1000×64. Each element corresponds to a set of visual features for one frame of the image.

[0086] It should be noted that the vector aligner achieves temporal consistency between the two types of vectors through timestamp matching. It reads the time index corresponding to each element in the current and voltage fluctuation vectors and the visual description vectors. For example, the 500th fluctuation vector element corresponds to the timestamp 10:00:05.000, and the 500th visual description vector element also corresponds to the same timestamp, ensuring that the temporal order of the two types of vectors is completely consistent.

[0087] It is worth noting that the parameter settings of the Long Short-Term Memory (LSTM) network need to be adapted to the changing characteristics of welding current and voltage. For example, the number of hidden layer units in the network should be set to 128, the time step to 10, and the forget gate threshold to 0.6, in order to accurately capture the instantaneous fluctuations of current and voltage during welding, such as the current spikes during short-circuit transitions and the long-term trends, such as the voltage drift during continuous welding. The texture filtering and color difference analysis parameters in image feature extraction need to be calibrated using historical defect samples. For example, the threshold for judging abnormal color difference in the molten pool should be set to H<15 or H>35 to ensure that the visual description vector can effectively distinguish between normal and abnormal image features.

[0088] In step S13, the current-voltage fluctuation vector and the visual description vector are concatenated to generate a comprehensive feature vector.

[0089] First, a vector concatenation operation is performed, with the fluctuation vector preceding the visual vector, concatenating the features of each time index. For example, each time index of the current and voltage fluctuation vector contains 128 features, including dynamic indicators such as current change amplitude, voltage change amplitude, fluctuation duration, and periodic fluctuation frequency. Each time index of the visual description vector contains 64 features, including visual indicators such as the mean H, S, and V values ​​of the molten pool, the mean gradient of the weld edge, texture density, and the area of ​​the suspected defect region. After concatenation, each time index forms a 192-dimensional feature, and 1000 time indices together constitute an initial fusion sequence of 1000×192 dimensions.

[0090] This splicing method fully preserves the original feature information of the two types of vectors. For example, in the initial fusion sequence of the 500th time index 10:00:05.000, the first 128 dimensions record dynamic features such as the current change amplitude of 22A and the voltage change amplitude of 1.5V, while the last 64 dimensions record visual features such as the mean H value of the molten pool of 14 and the mean edge gradient of 98, thus obtaining the initial fusion sequence.

[0091] Generate a relevant weight sequence, and based on the initial fusion sequence, calculate the Pearson correlation coefficient between the current fluctuation amplitude and the molten pool color difference distribution by time indexing. The calculation formula is as follows: , where r represents the Pearson correlation coefficient, xi represents the current fluctuation amplitude in the i-th time period, and yi represents the H value of the molten pool in the i-th time period. This represents the average value of the current fluctuation amplitude. This represents the average value of the molten pool H. Substituting this value into the calculation yields a Pearson correlation coefficient of 0.91. The Pearson correlation coefficient ranges from -1 to 1; the closer the coefficient is to 1, the stronger the positive correlation between the two. For example, at the 300th time index, the current fluctuation is 25A (significantly higher than the normal range of 15-20A), and the average molten pool H is 12 (reddish, within the normal range of 20-30), resulting in a correlation coefficient of 0.91. This indicates that the large current fluctuation at this moment is highly correlated with the abnormal molten pool color difference. At the 800th time index, the current fluctuation is 8A (within the normal range), and the average molten pool H is 24 (normal), resulting in a correlation coefficient of 0.13, indicating a weaker correlation between the two. Finally, a correlation weight sequence of 1000 elements is generated, with each element corresponding to the correlation strength of a time index, providing a basis for subsequent weighted calculations.

[0092] The influence of highly correlated features is enhanced by multiplying the relevant weight sequence with the corresponding elements of the initial fusion sequence. For example, the weight value of the 300th time index is 0.91, and the corresponding element value of the initial fusion sequence is [25, 1.5, ..., 12, 98] (192 dimensions). After weighting, the element value is adjusted to [22.75, 1.365, ..., 10.92, 89.18]. The weight value of the 800th time index is 0.13, and the element value is reduced proportionally after weighting. This highlights the feature that current fluctuations are highly correlated with visual anomalies and weakens features with weak correlations, ultimately generating a comprehensive feature vector of 1000×192 dimensions.

[0093] In one possible implementation, before concatenating the current-voltage fluctuation vector with the visual description vector to generate a comprehensive feature vector, the method further includes:

[0094] The image data is segmented, and the pixel region of the molten pool is determined based on the color difference between the molten pool and the base material.

[0095] The Sobel operator is used to calculate the edge gradient, texture direction, and density distribution of the molten pool pixel region to obtain the basic features of the molten pool texture.

[0096] The basic features of the molten pool texture are compared with a preset normal texture standard. If there is a deviation from the standard, it is determined to be an abnormal point in the molten pool texture.

[0097] The HSV color space thresholding method is used to segment the molten pool pixel region. The threshold setting needs to be determined through calibration experiments. The specific method includes: acquiring multiple sets of image samples containing normal molten pools under the target welding material (such as carbon steel), welding method (such as arc welding), and typical image acquisition scenarios (such as a workshop with strong light); manually or using other high-precision methods to annotate the pixels in the molten pool region of the samples; statistically analyzing the numerical distribution of these annotated pixels in each component of HSV, and using the main range of its distribution range (such as the numerical range covering more than 90% of the pixels) as the initial threshold range (H0, S0, V0); then, based on the integrity of the molten pool segmentation and the boundary sharpness index, the initial threshold is fine-tuned to finally determine the threshold set (H, S, V) suitable for this scenario.

[0098] For example, in an embodiment targeting carbon steel material, arc welding process, and a strong light environment in the workshop, the HSV threshold range for the molten pool pixel region determined by the above calibration method is: H value 22-33 (corresponding to orange-yellow to dark red tones), S value 60%-85%, and V value 50%-80%. Applying this threshold to welding image processing allows pixels that meet these conditions to be defined as molten pool pixel regions. For example, in a certain frame of welding image, the molten pool pixel region presents an irregular circle, resulting in 2800 pixels being segmented accordingly.

[0099] It is worth noting that the above threshold ranges (H: 22-33, S: 60-85%, V: 50-80%) are for a specific embodiment. When the welding materials, processes, or imaging environment change, the thresholds should be re-determined according to the aforementioned calibration method. For example, due to differences in thermophysical properties during aluminum alloy welding, the calibrated S value range may shift downward to 55%-80%; in low-light environments, the calibrated H value range may shift to 28-38.

[0100] Using the method in step S12, edge detection is performed on the molten pool pixel region. Texture direction is analyzed using gradient direction histograms, revealing that normal molten pool textures are predominantly radial, with directions concentrated between 0° and 60°, while the texture direction in this region is dispersed between 0° and 180°. Simultaneously, the texture density distribution is calculated, yielding a density value of 0.32 pixels per square unit in this region.

[0101] For example, calculating texture density distribution requires combining the selection of effective texture pixels in the molten pool pixel region with gridded statistics. Taking a frame of molten pool image with a pixel region of 2800 pixels, divided into 44 grid units of 8×8 pixels as an example, firstly, based on the edge gradient matrix extracted by the Sobel operator in step S12, a texture pixel judgment threshold is set: the edge gradient value > 60 and the texture direction is not a scattered noise direction. After traversing the 2800 molten pool pixels, 1680 effective texture pixels are selected. The 2800 pixels are then divided into 44 grid units of 8×8 pixels. Some edge grids have less than 64 pixels, such as the last grid containing only 48 pixels. For each pixel, the number of effective texture pixels is counted grid by grid. For example, the 10th grid contains 64 pixels, of which 48 are effective texture pixels, and the 44th edge grid contains 48 pixels, of which 12 are effective texture pixels. The effective texture pixels of each grid are divided by the total number of pixels in the grid. The texture density of the 10th grid is 48÷64=0.75, and the texture density of the 44th grid is 12÷48=0.25. The texture density of all grids together constitutes the texture density distribution of the melt pool.

[0102] It's worth noting that the threshold setting for edge gradient values ​​> 60 and texture directions not aligned with scattered noise is determined based on the physical characteristics of the weld pool and the requirements for defect identification. An edge gradient value > 60 indicates a significant temperature gradient between the weld pool (temperature 1500-2500℃) and the base material (temperature < 500℃) during welding, resulting in a marked difference in surface thermal radiation intensity. This is reflected in the image as a sudden change in pixel grayscale at the edge of the weld pool. A normal weld pool edge grayscale change rate corresponds to a gradient value of approximately 60-85. Values ​​below 60 indicate a smooth grayscale transition, potentially due to insufficient heat input or image noise masking the true edge. When the weld pool edge gradient value exceeds 85, it means the grayscale change rate between the weld pool edge and the surrounding area exceeds the normal range, essentially reflecting an abnormal temperature change or morphological abrupt change at the weld pool edge during the welding process. From the perspective of texture direction, non-dispersive noise is observed. During normal welding, the molten pool is affected by the arc blowing force and welding speed, and the molten metal flows in an orderly manner along the welding direction. The texture direction is concentrated between 0° and 60°, and has the characteristics of a single-peak concentrated gradient direction histogram. In contrast, the direction of dispersed noise is generated by interference such as arc flash and electronic noise. The gradient direction is randomly distributed between 0° and 180° without obvious peaks. It can be distinguished by statistically analyzing the pixel ratio of each direction interval (the effective direction ratio exceeds 30%, and the noise direction ratio is less than 10%). This condition can ensure that the selected texture pixels truly reflect the flow and solidification process of the molten pool metal.

[0103] The region density value is a quantification of the overall texture density distribution. Taking the texture density of the above 44 grids as an example, the arithmetic mean of the texture density of all grids is taken, that is, (0.75+0.68+0.72+…+0.25)÷44=0.32 pixels / square unit. This result is the density value of the melt pool region.

[0104] The aforementioned edge gradients, texture direction, and density distribution are integrated into a basic feature set for melt pool texture.

[0105] A preset normal texture standard library was retrieved, where the standard range for normal melt pool edge gradient is 60-85, texture direction is concentrated between 0°-60°, and density distribution is 0.45-0.6 pixels / square unit. Comparison revealed that the melt pool edge gradient of this frame (98) exceeded the upper limit, the texture direction was scattered, and the density (0.32) was below the lower limit; all three features deviated from the standard. This area was determined to be an abnormal melt pool texture point, and its pixel coordinates and corresponding timestamp were recorded to provide a basis for subsequent defect localization.

[0106] It is worth noting that the core parameter settings for the normal molten pool texture standard are primarily based on theoretical analysis of the physical morphology and heat conduction laws of the molten pool during welding. The standard range for the normal molten pool edge gradient has already been explained in the aforementioned setting of texture pixel judgment thresholds. Regarding the texture direction standard, during normal welding, the molten pool is affected by the arc blowing force and welding speed, causing the molten metal to flow in an orderly manner along the welding direction, resulting in texture directions concentrated between 0° and 60° (with the welding direction as the 0° reference). This angle range is consistent with the flow trajectory of the molten pool metal. If the texture direction exceeds this range, such as 90° vertical textures or 180° reverse textures, it indicates turbulent molten pool flow, possibly caused by factors such as current fluctuations or poor gas protection. The density distribution standard is related to the stable solidification process of the molten pool. During normal molten pool solidification, grain growth is uniform, resulting in a moderate texture density. A density below 0.45 indicates sparse texture, possibly due to overheating of the molten pool leading to coarse grains; a density above 0.6 indicates dense texture, which is prone to brittle structures due to rapid cooling. Therefore, this density range is locked in from a physical mechanism perspective.

[0107] For example, taking 1000 frames of images from a 10-second welding process as an example, after segmentation and texture analysis, a total of 12 abnormal points in the molten pool texture were detected. Among them, 8 abnormal points corresponded to highly correlated time indices with "correlation weight > 0.7" in the comprehensive feature vector, indicating that there is a significant correlation between current fluctuations and texture abnormalities. These time indices can be marked as potential high-incidence periods of defects, providing key analysis objects for subsequent attention mechanism weighting and temporal modeling.

[0108] In step S14, if the fluctuation amplitude in the comprehensive feature vector exceeds a preset fluctuation threshold, the comprehensive feature vector is weighted to obtain a weighted fusion feature, including:

[0109] Based on the comprehensive feature vector, voltage fluctuation amplitude values ​​are extracted element by element to obtain the fluctuation amplitude sequence;

[0110] If at least one of the voltage fluctuation amplitude values ​​in the fluctuation amplitude sequence exceeds a preset fluctuation threshold, the corresponding position of the voltage fluctuation change and the abnormal point of the molten pool texture is located to obtain a texture abnormality location set;

[0111] Based on the image data, the RGB three-channel pixel value distribution of the molten pool pixel region is statistically analyzed to obtain image color difference distribution data;

[0112] Based on the set of texture anomaly locations, the correlation attention score between the image color difference distribution data and the current and voltage data sequence is calculated to obtain the attention score sequence;

[0113] The attention score sequence is applied to the corresponding elements of the comprehensive feature vector to obtain weighted fusion features.

[0114] First, based on the generated comprehensive feature vector, voltage fluctuation amplitude values ​​are extracted element by element to construct a fluctuation amplitude sequence. The comprehensive feature vector contains fusion information of current and voltage dynamic features and image visual features. The voltage fluctuation amplitude value corresponds to the voltage change amplitude feature term within the vector, which needs to be extracted one by one in time index order. For example, from the 1000×192-dimensional comprehensive feature vector of 10 seconds of welding data, one voltage fluctuation amplitude value is extracted every 192 dimensions. For example, the 2nd dimension, the 201st dimension, etc., correspond to the voltage fluctuation information of each time index, ultimately forming a fluctuation amplitude sequence containing 1000 elements, where each element directly reflects the fluctuation intensity of the welding voltage at the corresponding timestamp.

[0115] Specifically, the fluctuation amplitude sequence is compared element by element with a preset fluctuation threshold to determine whether abnormal fluctuations exist. If a certain element value is found in the fluctuation amplitude sequence, such as reaching 4.2V at the 300th time index, exceeding the preset threshold of 3V, the abnormal correlation position is located. By tracing back through the timestamp, the image data corresponding to the time of the voltage fluctuation is found. Combined with the previously identified abnormal points in the molten pool texture, the spatial correspondence between the voltage fluctuation change and the abnormal molten pool texture is matched. For example, the voltage fluctuation at the 300th time index corresponds to the abnormal molten pool texture area in the middle section of the weld in the image. The time index and pixel coordinates of this position are recorded as a texture abnormality location set, forming abnormal information with dual temporal and spatial localization.

[0116] It is worth noting that the preset 3V threshold is based on the process and matches the 22-28V voltage range commonly used in welding pressure-bearing structures. The 3V fluctuation corresponds to an energy input change rate of about 12%, which can avoid arc instability and weld pool formation defects. According to the experimental statistics of multiple materials such as carbon steel and stainless steel with multiple process parameters, 98.3% of qualified welding voltage fluctuations are ≤2.8V, and 89.5% of defects occur when the fluctuation exceeds 3V. Considering the interference of the power grid on site, which is usually ≤2V, the 3V threshold can balance anti-interference and defect detection accuracy, with a false positive rate of only 2.3% and a false negative rate of 1.8%, which is suitable for the needs of actual welding scenarios.

[0117] In one feasible approach, based on the original image data, the RGB three-channel pixel value distribution of the molten pool pixel region is statistically analyzed to obtain image color difference distribution data. First, using the previously determined molten pool pixel region and the pixel set filtered by the HSV threshold, the R (red), G (green), and B (blue) channel values ​​of all pixels within that region are extracted, and the mean, variance, and extreme values ​​of each channel are calculated. For example, in a certain molten pool pixel region, the mean R channel value is 210, the mean G channel value is 150, and the mean B channel value is 80, with variances of 12, 15, and 10 respectively. These data directly reflect the color distribution characteristics of the molten pool. For regions with concentrated texture anomalies, their RGB three-channel distribution needs to be statistically analyzed separately. For instance, in anomaly regions, the mean R channel value rises to 230, and the mean G channel value drops to 120, showing a significant difference from normal regions, providing visual data support for subsequent correlation analysis.

[0118] Based on the set of texture anomaly locations, an attention score is generated that correlates the image color difference distribution with the current and voltage data sequences, thus constructing an attention score sequence. Specifically, in the attention score quantization calculation, the texture anomaly location is the core; for each detected texture anomaly location, its corresponding timestamp is obtained. At this timestamp, two types of features are extracted simultaneously: image color difference features and electrical signal features. The image color difference feature, taking the R-channel mean deviation ΔR as an example, is calculated as the difference between the R-channel mean of the pixel region at the anomaly location and the pre-statistically calculated R-channel mean of the normal melt pool region. The electrical signal feature, taking voltage fluctuation amplitude as an example, is the absolute value of the difference between the instantaneous voltage value near the timestamp and the reference voltage.

[0119] To calculate the correlation attention score, feature data from multiple consecutive timestamps, including the current anomaly location, needs to be selected to form a feature sequence. For example, selecting an anomaly location and its five adjacent timestamps (t-2, t-1, t, t+1, t+2), the corresponding ΔR value sequence is [21.2, 23.8, 25.1, 22.7, 20.8], and the voltage fluctuation amplitude sequence is [4.2, 4.5, 4.8, 4.6, 4.3] (unit: V). Substituting these two sequences into the Pearson correlation coefficient formula, their linear correlation strength is calculated.

[0120]

[0121] Where r represents the Pearson correlation coefficient, xi represents the ΔR value of the i-th time period, and yi represents the voltage fluctuation amplitude of the i-th time period. This represents the average value of ΔR. The average value of the voltage fluctuation amplitude is calculated to be r=0.91. This coefficient reflects the degree of linear correlation between features, and its value ranges from [-1,1]. The closer it is to 1, the stronger the correlation. Here, 0.91 indicates that ΔR is highly positively correlated with voltage fluctuation, and it serves as the basic weight for the attention score.

[0122] The calculated Pearson correlation coefficient r is used as the input to the Sigmoid function, and its value is mapped to the interval (0,1). The result is used as the final attention score. The Sigmoid function is defined as f(x) = 1 / (1+e^{-x}).

[0123] Substituting the aforementioned correlation coefficient r=0.91, the attention score f(0.91)=1 / (1+e^{-0.91})≈0.71 is calculated. This score of 0.71 is the associated attention score generated based on the five consecutive timestamp feature sequences, corresponding to the central anomalous timestamp t.

[0124] All calculated attention scores are organized into an attention score sequence in chronological order. The length of this sequence is consistent with the total number of time indices. For example, if there are 1000 time indices, the length of the attention score sequence is 1000. Specifically, each score in the attention score sequence is scalar multiplied by the 192-dimensional feature vector of the comprehensive feature vector at the corresponding time index. For example, the attention score of the 300th time index is 0.85, and the feature vector of the comprehensive feature vector at that index is [240, 4.2, ..., 230, 120] (where the first 128 dimensions are current and voltage features, and the last 64 dimensions are visual features). After weighting, this feature vector is adjusted to [204, 3.57, ..., 195.5, 102]. After performing this operation on all 1000 time indices, a weighted fusion feature matrix with dimensions still being 1000×192 is obtained.

[0125] In step S15, the pre-trained long short-term memory network is used to analyze the long-term dependencies of the weighted fused features to obtain defect probability distribution data, including:

[0126] Based on the weighted fusion features, the feature elements are arranged sequentially to obtain the temporal input sequence;

[0127] The hidden state sequence is obtained by analyzing the temporal input sequence using a pre-trained long short-term memory network.

[0128] Based on the hidden state sequence, a long-term dependency score is calculated. If the long-term dependency score exceeds a preset score threshold, the melt pool texture anomaly point is matched to obtain a stability deviation set.

[0129] Based on the stability deviation set, the probability of defect occurrence is calculated to obtain defect probability distribution data.

[0130] Specifically, each element in the weighted fusion feature contains weighted information of dynamic current and voltage features and visual image features, and carries a clear timestamp. Based on the timestamp, all feature elements are rearranged according to the chronological order of the welding process. For example, from the 1000×192-dimensional weighted fusion feature of 10 seconds of welding data, the 192-dimensional feature elements corresponding to each index are arranged sequentially according to time indices 1 to 1000, forming a 1000×192-dimensional time-series input sequence, providing an ordered data analysis foundation for subsequent time-series modeling.

[0131] Long Short-Term Memory (LSTM) networks, through the synergistic action of input gates, forget gates, and output gates, can effectively capture long-term dependencies in temporal data. During frame-by-frame processing, the input gate filters key features of the current frame from the temporal input sequence, such as the anomalous combination of a voltage fluctuation weighted value of 3.57V and a weld pool R-channel weighted value of 195.5 in a given frame. The forget gate discards irrelevant or redundant historical features, such as routine features without anomalies in previous frames. The output gate integrates the current key features with the historical features that need to be retained, generating the hidden state corresponding to each frame. For example, when processing frame 300 (corresponding to the moment of voltage fluctuation anomaly), the network strengthens the feature association between this frame and the 10 frames before and after it through a gating mechanism, recording the long-term trends of continuous voltage anomalies and weld pool texture anomalies. Ultimately, it generates a hidden state sequence with the same length as the temporal input sequence (1000 elements), where each element contains deep feature association information about the welding state at that time point.

[0132] The long-term dependency score is calculated by the Long Short-Term Memory (LSTM) network based on the strength of feature associations in the hidden states, reflecting the persistent correlation of welding state anomalies within a certain time period. For example, the cosine similarity of adjacent hidden state vectors is calculated frame by frame; for instance, the cosine similarity between the hidden states in frames 290 and 291 is calculated and then substituted into the formula. ,in =[a1,a2,...,a192], =[b1,b2,...,b192], where ai and bi are the feature values ​​of the corresponding dimensions of the two frames. The cosine similarity is calculated to be 0.85, and the similarity between the 291st and 292nd frames is 0.83. The similarity of all adjacent frames within the 290th to 310th frames is calculated sequentially, resulting in 20 similarity values. The average correlation of these similarity values ​​is then taken to obtain the average correlation of the time period, such as (0.85+0.83+0.84+0.82+0.81+0.83+0.82+0.84+0.83+0.81+0.82+0.83+0.84+0.82+0.81+0.83+0.82+0.84+0.83+0.81) / 20=0.8265. The long-term dependency score for frames 290-310 is 0.82, which exceeds the threshold of 0.75. Therefore, by backtracking through timestamps, the image data corresponding to this time period is found. The stability anomaly reflected in the hidden state is matched with the previously identified molten pool texture anomaly points, such as the edge gradient of 98 in the middle section of the weld and areas with messy texture direction. The coordinates of the welding part corresponding to the anomaly are confirmed. Finally, the "time interval (frames 290-310) and spatial coordinates (pixels x100-y200 to x150-y250 in the middle section of the weld)" are recorded as the stability deviation set.

[0133] It should be noted that 20 frames were chosen because welding defects require about 0.2 seconds of abnormal accumulation to form, and at a sampling frequency of 100 times per second, 20 frames just cover this duration; at the same time, 20 frames allow LSTM to effectively capture the inter-frame feature correlation, which avoids missing short-term anomalies due to too few frames, and also prevents irrelevant data from being introduced due to too many frames.

[0134] It should be noted that the 0.75 score threshold must match the critical correlation strength for the formation of welding defects. During the welding process, if the correlation between current and voltage fluctuations and abnormal molten pool texture is less than 0.75, it usually manifests as a brief, isolated anomaly, such as a voltage jump caused by transient power grid interference, which does not trigger a continuous change in the molten pool morphology. These anomalies are mostly non-defect disturbances. When the correlation exceeds 0.75, it indicates that the anomaly has formed a lasting impact, such as voltage fluctuations exceeding the threshold lasting for more than 0.2 seconds, and the molten pool texture simultaneously showing abnormal edge gradients and chaotic trends. At this point, the energy input imbalance has led to a deviation in molten pool stability.

[0135] In an implementable manner, key parameters at each abnormal position in the statistical stability deviation are counted, including the abnormal duration, such as 0.2 seconds corresponding to frames 290 - 310, the degree of feature abnormality, such as the voltage fluctuation exceeding the threshold by 1.2V, and the deviation of the molten pool texture from the standard by 30%. Then, combined with the mapping relationship between abnormal parameters and the probability of defect occurrence in the historical defect database, the probability of defect occurrence at each abnormal position is calculated; for positions without abnormalities, the default probability is below 0.1. For example, for the position corresponding to frame 300 in the stability deviation, the calculated defect probability is 0.65, and for frame 800 without abnormalities, the corresponding probability is 0.08. Finally, defect probability distribution data covering the time and space dimensions of the entire welding process is generated, and each time index and spatial position corresponds to a unique defect probability value.

[0136] It should be noted that the specific form of the mapping relationship is a quantization comparison table of abnormal parameter combinations - defect probability constructed based on historical welding defect samples, supplemented with linear interpolation for edge scenarios. The input end of the comparison table is the key abnormal parameters in the statistical stability deviation, including the abnormal duration, such as 0.2 seconds corresponding to frames 290 - 310, the amplitude of voltage fluctuation exceeding the threshold, such as 1.2V exceeding the threshold at frame 300, and the deviation degree of the molten pool texture, such as the comprehensive deviation value of the edge gradient 98 and density 0.32; the output end is the defect probability under the corresponding parameter combination. For example, "abnormal duration of 0.2 seconds + voltage exceeding the threshold by 1.2V + texture deviation of 0.6" corresponds to a defect probability of 0.65, "abnormal duration of 0.1 second + voltage exceeding the threshold by 0.5V + texture deviation of 0.3" corresponds to a probability of 0.35, and the default probability for positions without abnormal parameters is below 0.1.

[0137] For parameter combinations that do not exactly match the comparison table, their defect probabilities are calculated by linear interpolation between adjacent known combinations. This method adopts a linear interpolation strategy based on a selected key parameter. First, find the two groups of known parameter combinations A and B and their corresponding defect probabilities P_A and P_B that are closest to the parameter combination X to be calculated in the comparison table. Usually, the "abnormal duration" can be selected as the interpolation reference parameter because it is directly related to the persistence of the defect. First, find such two groups of known parameter combinations A and B in the comparison table, and their interpolation reference parameter values should be less than and greater than the reference parameter value of X (i.e., satisfying A_key < X_key < B_key) to determine the interpolation interval. Under this condition, it is preferable to select a combination pair that is also relatively close to X in other parameters.

[0138] Subsequently, the weight w is calculated based on the interpolation reference parameter, using the following formula: w = (X_key - A_key) / (B_key - A_key). Where X_key, A_key, and B_key represent the values ​​of the parameter combinations X, A, and B on the interpolation reference parameter, respectively. Next, the defect probability P_X is calculated using the following formula: P_X = P_A*(1-w) + P_B*w.

[0139] For example, suppose the reference table contains known data: Group A (abnormality duration 0.1 seconds, voltage exceeding threshold 0.8V, texture deviation 0.5, defect probability 0.55) and Group B (abnormality duration 0.2 seconds, voltage exceeding threshold 1.2V, texture deviation 0.6, defect probability 0.65). The parameter combination X to be calculated is (abnormality duration 0.15 seconds, voltage exceeding threshold 1.0V, texture deviation 0.55).

[0140] The "abnormal duration" is selected as the interpolation baseline parameter. The weight w is calculated as (0.15-0.1) / (0.2-0.1)=0.5. Substituting this into the formula, we get P_X=0.55*(1-0.5)+0.65*0.5=0.6. Therefore, the defect probability corresponding to parameter combination X is 0.6. This method achieves the estimation mapping of defect probabilities for non-standard parameter combinations.

[0141] In step S16, if the defect probability in the defect probability distribution data is higher than a preset probability threshold, it is marked as a high-risk area, and a defect location mask is generated to obtain a visualized defect map, including:

[0142] Based on the defect probability distribution data, an element-by-element comparison is performed using a preset probability threshold. If an element value is higher than the preset probability threshold, it is marked as a high-risk pixel. The high-risk pixels are then integrated to obtain a high-risk region.

[0143] Based on the high-risk areas, a defect location mask is generated through binarization processing;

[0144] Based on the defect location mask, pixel-by-pixel overlay is performed with the image data to obtain a preliminary visualization image;

[0145] Based on the preliminary visualized image, a preset color mapping table is applied to determine the risk level, resulting in a visualized defect map.

[0146] Specifically, the defect probability distribution data covers the time and space dimensions of the welding process. Each element corresponds to the probability of defect occurrence at a specific pixel location. The defect probability value is compared with a preset threshold pixel by pixel. For example, if the defect probability at a certain pixel location is 0.72, which is higher than the threshold of 0.6, then the pixel is included in the high-risk pixel set. If the probability of a certain pixel is 0.45, which is lower than the threshold, then it is excluded. Finally, a set containing the coordinates of all high-risk pixels is formed.

[0147] It is worth noting that, based on extensive experimental statistics, 97.3% of verified welding defects occurred with a probability exceeding 0.6, while 96.8% of qualified areas had a probability below 0.6. The threshold of 0.6 can accurately distinguish between defects and normal areas.

[0148] Based on the high-risk pixel set, binarization is performed to generate a defect location mask. Pixel values ​​within the high-risk pixel set are set to 1 (indicating suspected defect areas), while non-high-risk pixel values ​​are set to 0 (indicating normal areas), forming a binary image containing only 0s and 1s, i.e., the defect location mask. For example, if 100 pixels in a certain area of ​​the weld seam in a welding image belong to the high-risk pixel set, these 100 pixels will be marked as 1 in the defect location mask, appearing as white blocks, while the remaining pixels will be marked as 0, appearing as a black background.

[0149] The defect location mask is superimposed on the original welding image with the corresponding timestamp according to the pixel coordinates. For example, if the pixel coordinate system of the original image is determined, with the horizontal axis as the x-axis, the vertical axis as the y-axis, and the upper left corner as the origin (0,0), the defect location mask will be generated according to the same coordinate rules. That is, the pixel with coordinates (x1,y1) in the mask corresponds to the same welding area position as the pixel with coordinates (x1,y1) in the original image. During overlay, the complete visual information of the original image is first preserved, such as the outline shape of the weld, the orange-yellow tone of the molten pool, and the metallic background color of the base material. For high-risk pixel areas with a value of 1 in the defect location mask, edge detection is used to extract the outer pixels of the high-risk area in the mask as the outline drawing range. Then, red lines in BGR format (0,0,255) with a line width of 2-3 pixels are drawn on an independent outline layer using OpenCV, and the Alpha value of this layer is set to 0.4-0.6. Finally, the image blending algorithm addWeighted is used to blend the images at a ratio of 0.6 for the original image and 0.4 for the outline layer, which not only preserves the weld shape and molten pool tone of the original image, but also clearly marks the suspected defect area with a semi-transparent red outline.

[0150] For example, if there is a texture anomaly in the pixel segment from (x200, y150) to (x250, y180) at the edge of the molten pool in the original image, and the pixel values ​​in this coordinate range in the mask are all 1, a semi-transparent red outline will be generated at the position from (x200, y150) to (x250, y180) in the original image after overlay, clearly marking it as a suspected defect area, and a preliminary visualization image will be obtained.

[0151] The preset color map categorizes risk levels based on defect probability values, typically using a progressive color gradient to distinguish different risk levels. For example, a probability of 0.6-0.7 corresponds to yellow, representing moderate risk; 0.7-0.8 corresponds to orange, representing higher risk; and above 0.8 corresponds to red, representing extremely high risk. The raw defect probability values ​​of high-risk areas in the initial visualization image are read pixel by pixel, and each area is assigned a corresponding color according to the preset color map. For instance, a high-risk area with a defect probability of 0.85 corresponds to red in the preset color map and will be displayed as a red block in the visualized defect map; another area with a probability of 0.65 corresponds to yellow and will be displayed in yellow. The final visualized defect map is then generated.

[0152] In step S17, extracting statistical features of the high-risk areas from the visualized defect map and inputting them into a preset classifier for verification, determining the welding quality level, and outputting the prediction result includes:

[0153] Based on the visualized defect map, adjacent high-risk regions are aggregated to obtain a set of high-risk connected regions; if the number of pixels in the set of high-risk connected regions exceeds a preset pixel threshold, the set of high-risk connected regions is retained to obtain a filtered set of high-risk regions.

[0154] Based on the selected high-risk region set, the compactness is calculated by boundary tracking. If the compactness is lower than the preset compactness threshold, the aspect ratio of the defect region and the concavity and convexity of the defect edge of the selected high-risk region set are supplemented to determine the statistical feature vector.

[0155] The statistical feature vectors are normalized to generate a standardized feature set, which is then input into a support vector machine classifier to determine the welding quality level and obtain the prediction result.

[0156] Specifically, the visualized defect map marks areas with different risk levels. If two high-risk pixels satisfy |x1-x0|+|y1-y0|=1, where (x0, y0) and (x1, y1) are the coordinates of the two high-risk pixels, meaning they are adjacent only in the four directions (up, down, left, right), such as (200, 150) and (200, 151), (199, 150), then these high-risk pixels are aggregated into independent connected regions using a connected component labeling algorithm, forming a high-risk connected region set. For example, in a defect map, the middle section and the end of the weld each form a connected region, containing 60 and 35 pixels respectively. If the number of pixels in a region exceeds a pixel threshold of 50, the region is retained; if it is below the threshold, it is discarded. This process ultimately yields a filtered high-risk region set, ensuring that subsequent analysis focuses on defect areas with practical significance.

[0157] It should be noted that the pixel threshold of 50 is based on statistical analysis of historical defect samples. Statistical analysis of the pixel area of ​​more than 600 samples of welding defects in pressure-bearing structures (such as lack of fusion and small slag inclusions) shows that more than 95% of the actual defect areas are not less than 50 pixels. Therefore, using this as a screening threshold can effectively eliminate noise interference.

[0158] For example, the boundary coordinates of the high-risk areas are obtained by tracking the edge contour pixel by pixel to obtain the boundary coordinates of the areas, and then the key geometric parameters are calculated. The area S and perimeter L of the edge contour are calculated, and the compactness is calculated based on the area and perimeter using the formula m=4π×S / L², where m is the compactness. The closer the m value is to 1, the more regular the shape of the area. The preset compactness threshold can be set to 0.5. If the compactness of a selected area is 0.55, which is higher than the threshold, the shape factor is directly set to 1. If the compactness of a selected area is 0.35, which is lower than the threshold, geometric features such as the aspect ratio and edge concavity and convexity of the area need to be added and converted into a normalized shape factor.

[0159] For example, regarding aspect ratio, first obtain the boundary coordinates of the high-risk area. Then, calculate the minimum bounding rectangle of this point set (i.e., the rectangle with the smallest area enclosing all points), and use the ratio of the long side length to the short side length of the rectangle as the original aspect ratio. Next, determine the normalization parameters based on the statistical range of historical defect samples. For example, for carbon steel arc welding, statistics from the historical defect sample database show that the aspect ratio is mainly distributed between 1.5 and 8.0. Based on this, the lower limit (min_value) of the Min-Max normalization is set to 1.5, and the upper limit (max_value) is set to 8.0. Then, substitute the original aspect ratio calculated for the current area into the normalization formula, mapping it to the 0-1 interval.

[0160] For example, the effective aspect ratio of defects in carbon steel arc welding is mostly distributed between 1.5 and 8.0, so the min_value is set to 1.5 and the max_value is set to 8.0. For aluminum alloy laser welding, since the defects are flatter, the effective data is mostly distributed between 2.0 and 9.5, so the extreme values ​​are adjusted accordingly. The edge concavity and convexity are calculated by dividing the difference between the area of ​​the minimum circumscribed polygon and the actual area of ​​the region by the area of ​​the minimum circumscribed polygon, directly obtaining a dimensionless value in the range of 0-1, which reflects the degree of irregularity of the contour.

[0161] The shape factor is calculated by merging normalized parameters using a weighted average method, such as an aspect ratio weight of 0.4 and an edge convexity weight of 0.6. For example, if a region has a normalized aspect ratio of 0.5 and an edge convexity weight of 0.6, its shape factor is 0.5 × 0.4 + 0.6 × 0.6 = 0.56. The closer the shape factor is to 1, the more regular the geometry of the high-risk region; the further the shape factor deviates from 1, the more irregular the region's shape.

[0162] The area, perimeter, compactness, and shape factor are combined to form a statistical feature vector. For example, the feature vector of a certain region is "area 80 pixels², perimeter 30 pixels, compactness 0.35, shape factor 0.48", which comprehensively reflects the geometric attributes of the region and provides rich basis for subsequent classification.

[0163] It should be noted that the edge concavity directly reflects the irregularity of the defect contour and has a greater impact on the structural strength, so its weight is set to 0.6; the aspect ratio focuses on the tensile characteristics of the defect and has a relatively weaker impact, so its weight is set to 0.4.

[0164] It is worth noting that irregular defects that require special attention during welding, such as cracks and lack of fusion, usually have a compactness of less than 0.5 due to their irregular edges. For example, the compactness of cracks is mostly between 0.2 and 0.4. On the other hand, non-hazardous spots that are round or nearly round, such as tiny spatter marks, usually have a compactness of more than 0.5 (0.6-0.8). A compactness threshold of 0.5 can be used as a morphological boundary to distinguish between potentially harmful irregular defects and harmless regular spots.

[0165] It should be noted that the preset classifier used for welding quality grade determination in this invention is constructed using a support vector machine (SVM). The structure of this support vector machine is as follows: taking the 4-dimensional statistical feature data of high-risk areas extracted from the visualized defect map, namely area, perimeter, compactness, and shape factor, as input, a multi-class SVM model is constructed to establish the mapping relationship between the 4-dimensional feature data and the welding quality grade, namely qualified, minor defect, moderate defect, and severe defect, and the corresponding determination probability of the quality grade is output.

[0166] In this invention, the training process of the support vector machine is as follows: First, synchronous samples of 4-dimensional features and quality grades from the welding quality history database are obtained. The 4-dimensional feature data is standardized, such as area and perimeter being converted into dimensionless values ​​in the 0-1 range using Min-Max normalization. Compactness and shape factor are already in the 0-1 range and do not require additional processing. The training set and validation set are divided in a 7:3 ratio for model training. Using the 4-dimensional feature data in the training set as input and the probability labels corresponding to the welding quality grades as output, the nonlinear relationship between features and quality grades is handled by the RBF kernel function, such as the nonlinear increase in defect severity when compactness is below 0.5. A multi-classification hyperplane is constructed to learn the probability of different quality grades corresponding to different feature combinations. The mapping relationship is established by using Platt scaling to convert decision function values ​​into probability values, obtaining the judgment probability of each quality level as the output label. Validation and optimization are then performed. The model's classification performance is verified using a validation set. If the requirements are not met, extreme condition samples (such as samples of ultra-large area defects or irregularly shaped defects) are added, or the model penalty parameter C (to control overfitting, with a value range of 0.1-10) and kernel function parameter γ (to optimize high-dimensional mapping, with a value range of 0.01-1) are adjusted. Iterative training continues until the model achieves a quality level judgment accuracy ≥92%, recall ≥90%, and a new scene judgment error ≤8% on the validation set, and outputs the association result of 4-dimensional feature data and quality level probability after three consecutive iterations of these indicators fluctuating within ±1%. For example, if the probability of "severe defect" calculated by the support vector machine model is 75%, exceeding the preset probability threshold of 60%, then the welded area is judged to be substandard and requires repair. Finally, a prediction result report is generated.

[0167] It should be noted that the kernel function parameter γ is determined based on the standardized 4-dimensional feature data in the welding quality history database. An initial candidate range for γ is set, such as 0.01-1. This range covers the empirical value of the reciprocal of the feature dimension, adapting to the non-linear correlation scale of the 4-dimensional features. Then, through 5-fold cross-validation, different γ values ​​are substituted into the support vector machine model. The model's accuracy and recall in judging welding quality levels are used as evaluation indicators to select the γ value that optimizes accuracy and recall. For example, when γ=0.3, the model achieves a 94% accuracy in judging severe defects such as "compactness below 0.5 and shape factor > 0.6". Finally, fine-tuning is performed using small sample tests in new welding scenarios. If new defects are found, such as a large deviation in judging incomplete fusion in aluminum alloy laser welding, the candidate range for γ is narrowed, such as 0.2-0.4, and the validation is repeated to ensure that the parameter adapts to the non-linear correlation between features and quality levels, and that the model's generalization error is ≤8%.

[0168] It is worth noting that, according to historical data, 96.5% of verified serious defects have a probability of over 60% in the support vector machine model, while 97.1% of qualified areas or minor defect areas have a probability of less than 60%. The 60% probability threshold can accurately distinguish between serious defects that need to be addressed and tolerable minor deviations.

[0169] In summary, this invention discloses a method for predicting welding defects in pressure-bearing structures based on multi-source data fusion, which solves the problem of low accuracy in predicting welding defects.

[0170] Reference Figure 2 The second embodiment of the present invention provides a prediction system for welding defects in pressure-bearing structures based on multi-source data fusion, comprising:

[0171] The data acquisition module is used to acquire current and voltage data sequences and image data during the welding process to obtain a multi-source dataset;

[0172] The feature extraction module is used to extract dynamic change features from the current and voltage data sequence based on the multi-source dataset to obtain a current and voltage fluctuation vector; and to extract features from the image data to obtain a visual description vector.

[0173] The feature vector concatenation module is used to concatenate the current-voltage fluctuation vector with the visual description vector to generate a comprehensive feature vector.

[0174] The feature vector weighting module is used to perform weighting processing on the comprehensive feature vector if the fluctuation amplitude in the comprehensive feature vector exceeds a preset fluctuation threshold, so as to obtain a weighted fusion feature.

[0175] The probability distribution acquisition module is used to analyze the long-term dependencies of the weighted fusion features using a pre-trained long short-term memory network to obtain defect probability distribution data;

[0176] The defect visualization module is used to mark a high-risk area if the defect probability in the defect probability distribution data is higher than a preset probability threshold, and to generate a defect location mask to obtain a visualized defect map.

[0177] The results output module is used to extract statistical features of the high-risk areas from the visualized defect map, input them into a preset classifier for verification, determine the welding quality level, and output the prediction results.

[0178] It should be noted that the pressure-bearing structure welding defect prediction system based on multi-source data fusion provided in this embodiment of the invention is used to execute all the process steps of the pressure-bearing structure welding defect prediction method based on multi-source data fusion in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0179] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a program for predicting welding defects in pressure-bearing structures based on multi-source data fusion. When the processor executes the computer program, it implements the steps in the various embodiments of the method for predicting welding defects in pressure-bearing structures based on multi-source data fusion described above, for example... Figure 1 The step S11 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, such as the data acquisition module.

[0180] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.

[0181] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0182] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.

[0183] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0184] Wherein, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0185] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0186] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A method for predicting welding defects in pressure-bearing structures based on multi-source data fusion, characterized in that, include: Collect current and voltage data sequences and image data during the welding process to obtain a multi-source dataset; Based on the multi-source dataset, dynamic change features are extracted from the current and voltage data sequence to obtain a current and voltage fluctuation vector; features are extracted from the image data to obtain a visual description vector. The current-voltage fluctuation vector and the visual description vector are concatenated to generate a comprehensive feature vector. If the fluctuation amplitude in the comprehensive feature vector exceeds a preset fluctuation threshold, the comprehensive feature vector is weighted to obtain a weighted fusion feature. The long-term dependencies of the weighted fusion features are analyzed using a pre-trained long short-term memory network to obtain defect probability distribution data; If the probability of a defect in the defect probability distribution data is higher than a preset probability threshold, it is marked as a high-risk area, and a defect location mask is generated to obtain a visual defect map. The statistical features of the high-risk areas are extracted from the visualized defect map and input into a preset classifier for verification to determine the welding quality level and output the prediction results. Before concatenating the current-voltage fluctuation vector with the visual description vector to generate a comprehensive feature vector, the method further includes: The image data is segmented, and the pixel region of the molten pool is determined based on the color difference between the molten pool and the base material. The Sobel operator is used to calculate the edge gradient, texture direction, and density distribution of the molten pool pixel region to obtain the basic features of the molten pool texture. The basic features of the molten pool texture are compared with a preset normal texture standard. If there is a deviation from the standard, it is determined to be an abnormal point in the molten pool texture. Wherein, if the fluctuation amplitude in the comprehensive feature vector exceeds a preset fluctuation threshold, the comprehensive feature vector is weighted to obtain a weighted fusion feature, including: Based on the comprehensive feature vector, voltage fluctuation amplitude values ​​are extracted element by element to obtain the fluctuation amplitude sequence; If at least one of the voltage fluctuation amplitude values ​​in the fluctuation amplitude sequence exceeds a preset fluctuation threshold, the corresponding position of the voltage fluctuation change and the abnormal point of the molten pool texture is located to obtain a texture abnormality location set; Based on the image data, the RGB three-channel pixel value distribution of the molten pool pixel region is statistically analyzed to obtain image color difference distribution data; Based on the set of texture anomaly locations, the correlation attention score between the image color difference distribution data and the current and voltage data sequence is calculated to obtain the attention score sequence; The attention score sequence is applied to the corresponding elements of the comprehensive feature vector to obtain the weighted fusion feature; The method of using a pre-trained long short-term memory network to analyze the long-term dependencies of the weighted fusion features to obtain defect probability distribution data includes: Based on the weighted fusion features, the feature elements are arranged sequentially to obtain the temporal input sequence; The hidden state sequence is obtained by analyzing the temporal input sequence using a pre-trained long short-term memory network. Based on the hidden state sequence, a long-term dependency score is calculated. If the long-term dependency score exceeds a preset score threshold, the melt pool texture anomaly point is matched to obtain a stability deviation set. Based on the stability deviation set, the probability of defect occurrence is calculated to obtain defect probability distribution data.

2. The method for predicting welding defects in pressure-bearing structures based on multi-source data fusion according to claim 1, characterized in that, The acquisition of current and voltage data sequences and image data during the welding process yields a multi-source dataset, including: The welding process is monitored by acquiring current and voltage data sequences using current and voltage sensors; image data of the corresponding parts is acquired using image sensors; the timestamps of the current and voltage data sequences and the image data are obtained, and the current and voltage data sequences and the image data are integrated to obtain the original multi-source data. Based on the original multi-source data, the timestamps are correlated to obtain a timestamp-aligned multi-source sequence; The timestamp-aligned multi-source sequences are fused and stored in a preset database to obtain a multi-source dataset.

3. The method for predicting welding defects in pressure-bearing structures based on multi-source data fusion according to claim 1, characterized in that, The current and voltage data sequences are dynamically modified based on the multi-source dataset to obtain a current and voltage fluctuation vector. Feature extraction is performed on the image data to obtain a visual description vector, including: Based on the current and voltage data sequence, a long short-term memory network is used to process the variation amplitude and duration between adjacent sampling points of the current and voltage data sequence segment by segment to obtain the current and voltage fluctuation vector. Based on the image data, the edge gradient of the weld area in each frame is calculated, the color difference distribution of the molten pool pixel area is statistically analyzed, and a visual description vector is obtained.

4. The method for predicting welding defects in pressure-bearing structures based on multi-source data fusion according to claim 1, characterized in that, If the defect probability in the defect probability distribution data is higher than a preset probability threshold, it is marked as a high-risk area, and a defect location mask is generated to obtain a visualized defect map, including: Based on the defect probability distribution data, an element-by-element comparison is performed using a preset probability threshold. If an element value is higher than the preset probability threshold, it is marked as a high-risk pixel. The high-risk pixels are then integrated to obtain a high-risk region. Based on the high-risk areas, a defect location mask is generated through binarization processing; Based on the defect location mask, pixel-by-pixel overlay is performed with the image data to obtain a preliminary visualization image; Based on the preliminary visualized image, a preset color mapping table is applied to determine the risk level, resulting in a visualized defect map.

5. The method for predicting welding defects in pressure-bearing structures based on multi-source data fusion according to claim 1, characterized in that, The process of extracting statistical features of high-risk areas from the visualized defect map, inputting them into a preset classifier for verification, determining the welding quality level, and outputting prediction results includes: Based on the visualized defect map, adjacent high-risk regions are aggregated to obtain a set of high-risk connected regions; if the number of pixels in the set of high-risk connected regions exceeds a preset pixel threshold, the set of high-risk connected regions is retained to obtain a filtered set of high-risk regions. Based on the selected high-risk region set, the compactness is calculated by boundary tracking. If the compactness is lower than the preset compactness threshold, the aspect ratio of the defect region and the concavity and convexity of the defect edge of the selected high-risk region set are supplemented to determine the statistical feature vector. The statistical feature vectors are normalized to generate a standardized feature set, which is then input into a support vector machine classifier to determine the welding quality level and obtain the prediction result.

6. A system for predicting welding defects in pressure-bearing structures based on multi-source data fusion, used to implement the method for predicting welding defects in pressure-bearing structures based on multi-source data fusion as described in any one of claims 1-5, characterized in that, include: The data acquisition module is used to acquire current and voltage data sequences and image data during the welding process to obtain a multi-source dataset; The feature extraction module is used to extract dynamic change features from the current and voltage data sequence based on the multi-source dataset to obtain a current and voltage fluctuation vector; and to extract features from the image data to obtain a visual description vector. The feature vector concatenation module is used to concatenate the current-voltage fluctuation vector with the visual description vector to generate a comprehensive feature vector. The feature vector weighting module is used to perform weighting processing on the comprehensive feature vector if the fluctuation amplitude in the comprehensive feature vector exceeds a preset fluctuation threshold, so as to obtain a weighted fusion feature. The probability distribution acquisition module is used to analyze the long-term dependencies of the weighted fusion features using a pre-trained long short-term memory network to obtain defect probability distribution data; The defect visualization module is used to mark a high-risk area if the defect probability in the defect probability distribution data is higher than a preset probability threshold, and to generate a defect location mask to obtain a visualized defect map. The results output module is used to extract statistical features of the high-risk areas from the visualized defect map, input them into a preset classifier for verification, determine the welding quality level, and output the prediction results.

Citation Information

Patent Citations

  • Electric vehicle shock absorber defect detection method and system based on machine vision

    CN120668682A

  • Vision-based welding quality intelligent evaluation method and system

    CN120894376A