A welding quality detection method fusing time and space characteristics of multiple stud welding

By combining the GCN-Automask model with the spatiotemporal characteristics of multiple stud welds, the problem of not considering the spatiotemporal correlation in the existing technology is solved, and higher precision welding quality inspection is achieved, improving the accuracy and automation of the inspection.

CN120744409BActive Publication Date: 2025-11-18SHANGHAI BALLSNOW INTELLIGENT TECH CO LDT +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511254030.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2025-11-18
Estimated Expiration
2045-09-04

AI Technical Summary

Technical Problem

Existing welding quality inspection methods fail to effectively consider the temporal and spatial correlation between multiple stud welds, resulting in low inspection accuracy, a high rate of missed or false alarms, and a lack of full utilization of process knowledge and experience.

Method used

By employing the GCN-Automask model and combining the spatiotemporal characteristics of multiple stud welding processes, the model dynamically calculates node similarity, filters strong correlations, and mines process information through the construction of topological structures and feature masks, thereby achieving accurate prediction of welding quality.

Benefits of technology

It improves the accuracy and robustness of welding quality inspection, can accurately identify welding defects, and enhances the level of automation in inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744409B_ABST
    Figure CN120744409B_ABST
Patent Text Reader

Abstract

The application discloses a welding quality detection method fusing time-space features of multiple stud welding, and belongs to the field of welding quality detection. First, a plurality of stud welding topological structures are constructed. A GCN-AutoMask model is proposed, a local similarity adaptive mask module is added to the GCN model, and the GCN-AutoMask model is used for encoding and decoding to predict the welding quality of all nodes. The scheme fuses time-space information, combines time series analysis and spatial topological modeling, dynamically captures the time-space dependence relationship between studs, and thus more accurately predicts potential quality risks. In addition, a graph data is constructed based on process information, static process information is fully mined, and dynamic changing features are constructed, so that the robustness and migration of the model are enhanced, and the model recognition accuracy and robustness are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of welding quality inspection, specifically relating to a welding quality inspection method that integrates the spatiotemporal characteristics of multiple stud welding. Background Technology

[0002] Stud welding is a welding method that welds metal studs or other similar metal fasteners to metal sheets. It features a hole-free connection and is widely used in industries such as automotive, home appliances, instrumentation, and medical devices. The quality of stud welding has a significant impact on product quality. The timing electrical signals (current, voltage, etc.) collected by the stud welding controller can reflect the welding quality, but traditional threshold methods struggle to capture complex features.

[0003] Currently, the main methods for inspecting stud weld quality in industrial production are destructive experiments, such as bending tests and tensile tests. With the development of deep learning / machine learning, its application in welding quality inspection is widespread. For example, patent application number [CN 114240896 A] discloses a method for inspecting stud weld quality based on convolutional neural networks. Through pre-training of the convolutional neural network system, it achieves higher efficiency in inspecting stud weld quality for specific specifications, accurately classifying different types of welding defects. Patent application number [CN 119884936 A] discloses a method and system for detecting weld defects based on deep learning. It collects ultrasonic information through sensors and develops a multi-branch deep fusion network model. By integrating one-dimensional and two-dimensional convolutional neural networks, it simultaneously captures the temporal and spatial characteristics of the weld, models the quality of a single point, and predicts the welding quality by extracting sensor signal features from a single welding operation.

[0004] In automobile production, stud welding involves multiple stud welds at different locations on a single vehicle. These multiple stud welds exhibit temporal and spatial relationships. Temporal relationships include equipment failure leading to abnormal stud weld quality in consecutive welds; spatial relationships include sheet metal deformation causing localized stud weld quality abnormalities, batch material defects causing localized or complete stud quality abnormalities, and thermal deformation of the sheet metal during production causing localized stud weld quality abnormalities. Traditional welding quality inspection methods primarily rely on sensor data from the welding process to determine weld quality. These methods often use convolutional layers to automatically extract local signal features for quality classification, neglecting the spatiotemporal correlation between weld points and failing to consider the impact of the welding / assembly sequence on overall quality (e.g., cumulative thermal deformation) or model the mutual influence between adjacent studs (e.g., stress distribution, spacing deviation). Furthermore, insufficient use of process knowledge and experience, directly processing raw sensor data without integrating process parameters, material information, and process design, results in poor model robustness and transferability.

[0005] It is evident that the existing methods do not utilize process knowledge and experience, nor do they consider the temporal and spatial correlations between multiple welding operations. This results in the model having a good ability to identify severe defects, but a poor ability to identify abnormal quality, leading to a high rate of false negatives or false negatives and low detection accuracy. Summary of the Invention

[0006] To address the problems of poor detection quality and low accuracy caused by traditional welding quality inspection methods that do not consider the spatiotemporal correlation between weld points, this invention proposes a welding quality inspection method that integrates the spatiotemporal characteristics of multiple stud welds. Based on the GCN-Automask model, it combines the spatiotemporal characteristics between multiple stud welds and fully explores relevant process information, effectively improving welding quality and inspection accuracy.

[0007] This invention is achieved using the following technical solution: a welding quality inspection method that integrates the spatiotemporal characteristics of multiple stud welding processes, comprising the following steps:

[0008] Step A: Acquire sensor signals for all welds on the product to be inspected, and perform signal processing on the sensor signals to obtain a feature representation of a single weld;

[0009] Step B: Based on process information and the spatiotemporal characteristics of multiple stud welding, combined with the feature representation of a single welding in Step A, construct graph data;

[0010] Step B1: Construct the topology: Based on the temporal and spatial relationships of the studs in the process instruction, construct the topological connection relationships between the studs;

[0011] Step B2, Feature Mounting: The single feature representation obtained in Step A is used as the feature of the topology node; the spatial relationship features with the same board material, the spatial relationship features with the same equipment, and the temporal relationship features are encoded as the features of the topology edge.

[0012] Step C: Dynamically calculate node similarity based on the GCN-Automask model, filter strong correlations, and perform feature masking to obtain the masked features. Specifically, this includes:

[0013] Step C1: Combine the graph data obtained in step B to obtain multiple node features, and dynamically calculate the similarity between any two node feature matrices.

[0014] First, calculate the cosine similarity S1 of the feature matrices of the two nodes and the DTW similarity S2 of the original sensor signals of the two nodes. Then, construct the spatial distance similarity kernel function parameters and perform kernel function transformation on the node features to extract fluctuation similarity features. Based on the data fluctuation similarity features extracted by the kernel function, repeat the above calculation to obtain the cosine similarity S1 after kernel function optimization. kernelSimilarity S2 between DTW and kernel function optimized kernel The final similarity is taken as S1, S2, and S3. kernel S2 kernel The mean;

[0015] Step C2: Based on the final similarity obtained above, select the node relationships with the highest relevance ratio α, where α is the mask ratio, and participate in the model gradient descent optimization.

[0016] Here, a model gradient descent co-optimization mechanism is designed, with the cross-entropy loss function as the optimization objective for the model parameters: ;in This is a true label, indicating the actual welding quality of a particular welding operation. To predict the probability, i.e. the model prediction result for a certain welding operation, L represents the error between the model prediction result and the actual welding quality result of the stud weld, N represents the amount of data involved in training or iteration, i.e., the number of welding operations, and i represents a certain welding operation. The update paths for each parameter are as follows:

[0017] (1) Kernel function parameter update:

[0018] Kernel function parameters σ, γ, c, d The gradient is determined by the final similarity. S final Obtained through backpropagation; via the chain rule, S final The partial derivatives of the kernel function parameters affect the node correlation screening, which in turn affects the adjacency matrix construction of the GCN-Automask model. During gradient descent, the parameters are dynamically adjusted by the Adam optimizer to adapt the kernel function to the feature distribution under different working conditions.

[0019] (2) Adjacency matrix optimization:

[0020] The adjacency matrix of the GCN-Automask model is constructed based on the strong correlation of the top α proportions. During backpropagation, the gradient of the adjacency matrix is ​​passed through the feature aggregation layer of the GCN model: the partial derivative of L with respect to the adjacency matrix is ​​positively correlated with the node feature aggregation error, which prompts the adjacency matrix to preferentially retain node relationships that contribute significantly to the prediction results.

[0021] (3) Dynamic adjustment of mask ratio:

[0022] The mask ratio α is initially adaptively adjusted based on the sample size and participates in gradient descent as a trainable parameter. The gradient of α is defined as the partial derivative of L with respect to α. When the prediction error increases, α is updated in the direction of increasing to incorporate more potential correlations. When the risk of overfitting increases, α is adjusted in the direction of decreasing to strengthen the core relationships. Finally, the learning rate decay strategy is used to achieve stable convergence.

[0023] Step C3: For each pair of strongly correlated relationships selected, randomly cover all features of one of the nodes, forcing the model to predict the features of the covered node through the spatiotemporal relationship of the remaining nodes, thereby obtaining the feature representation of all stud welding nodes.

[0024] Step D: Based on graph data and masked features, the spatiotemporal relationships between multiple nodes are mined. The node features are mapped to the probabilities of OK / NOK through a fully connected network. The category corresponding to the highest probability is taken as the quality result of the welding, thus completing the prediction of the stud welding quality.

[0025] Compared with the prior art, the advantages and positive effects of the present invention are as follows:

[0026] This solution incorporates spatiotemporal feature information and proposes a spatiotemporal joint modeling algorithm. By constructing the topology of multiple stud welds, the original sensor signals are encoded using CNN to obtain low-dimensional node features, with each node representing a weld. Based on the GCN-AutoMask model with an adaptive masking mechanism incorporating local similarity, combined with temporal analysis and spatial topology modeling, the spatiotemporal dependencies between studs are dynamically captured, predicting the welding quality of all nodes. This solution constructs graph data based on process information, fully mining static process information while constructing dynamically changing features, thereby more accurately predicting potential quality risks, improving detection robustness, and achieving automated full inspection. Simultaneously, the learning from big data enables accurate identification of welding defects. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of the welding quality inspection method according to an embodiment of the present invention;

[0028] Figure 2 This is a schematic diagram of the data construction process in an embodiment of the present invention;

[0029] Figure 3 This is a schematic diagram of the CNN model structure according to an embodiment of the present invention;

[0030] Figure 4 This is a schematic diagram illustrating the temporal and spatial relationships of defects in multiple stud welds according to an embodiment of the present invention. Detailed Implementation

[0031] To better understand the above-described objects, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. Many specific details are set forth in the following description to provide a thorough understanding of the present invention; however, the present invention may be practiced in other ways than those described herein, and therefore, the present invention is not limited to the specific embodiments disclosed below.

[0032] For stud welding, existing methods primarily consider process sensor data to determine welding quality. However, in actual production, process parameters, material information, process design, and the potential lifespan degradation of equipment also affect welding quality to varying degrees. Often, because this information is relatively constant, models cannot fully capture its impact. Furthermore, stud defects exhibit spatial and temporal correlations. When sheet metal in the same group undergoes dimensional deformation, studs in adjacent areas will show varying degrees of anomalies or defects. When the same piece of equipment malfunctions, all studs welded on that equipment will exhibit varying degrees of anomalies or defects. As equipment lifespan gradually decreases over time, the quality of welded studs also becomes time-dependent.

[0033] This embodiment analyzes the temporal and spatial distribution of defective studs during automobile production, such as... Figure 4 As shown, by analyzing the defect distribution of each vehicle, the horizontal axis represents each vehicle (vehicles are continuously welded, sorted chronologically from vehicle 0 to 300), and the vertical axis represents the welding sequence number of multiple stud welds on the current vehicle (the sequence number represents studs 0-646, sorted chronologically; adjacent points often have spatial relationships, such as being welded by the same welding gun or on the same set of plates). The red dots in each column represent the defective stud distribution of the current vehicle. Horizontally, we can observe the temporal correlation or continuity of defective studs (temporal correlation); vertically, we can observe the characteristics of regional clustering (spatial correlation). The defective stud distribution demonstrates the existence of temporal and spatial relationships and the necessity of model mining in the temporal and spatial context.

[0034] To address the aforementioned problems, this embodiment proposes a welding quality inspection method that integrates the spatiotemporal characteristics of multiple stud welding processes, such as... Figure 1 As shown, it includes the following steps:

[0035] Step A: Acquire sensor signals for all welds on the product to be inspected, and process the sensor signals to obtain a feature representation of a single weld;

[0036] Step B: Based on process information and the spatiotemporal characteristics of multiple stud welding, combined with the feature representation of a single welding in Step A, construct graph data;

[0037] Step B1: Construct the topology: Based on the temporal and spatial relationships of the studs in the process instruction, construct the topological connection relationships between the studs;

[0038] Step B2, Feature Mounting: The single feature representation obtained in Step A is used as the feature of the topology node; the spatial relationship with the same board material, the spatial relationship with the same equipment, and the temporal relationship are encoded as the feature of the topology edge;

[0039] Step C: Dynamically calculate node similarity based on the GCN-Automask model, filter strong correlations, and perform feature masking to obtain the masked features; the GCN-Automask model includes an adaptive masking module for local similarity and a GCN module;

[0040] Step D: Based on graph data and masked features, the spatiotemporal relationships between multiple nodes are mined. The node features are mapped to the probabilities of OK / NOK through a fully connected network. The category corresponding to the highest probability is taken as the quality result of the welding, thus completing the prediction of the stud welding quality.

[0041] Specifically, to better understand the solution of this invention, the following detailed description is provided in conjunction with specific implementation steps:

[0042] In step A, a CNN autoencoder is designed and trained based on the original sensor signals. After training, the model is saved as a pre-trained CNN encoder module. The acquired sensor signals are encoded by this module to obtain a low-dimensional feature representation of the welding, which is used as the node feature (Node Embedding) in the subsequent topology. The stud welding process is mainly divided into four stages: short circuit stage, pre-conduction current stage, welding current stage, and upsetting current stage. In each stage, the sensor will collect electrical and position signals of the process, mainly including welding voltage signal, welding current signal, stud movement position and speed signal. The length of each welding signal is usually about 5000.

[0043] like Figure 3 As shown, the CNN autoencoder consists of an Encoder and a Decoder. The original sensor signal is processed through convolutional layers and sampling pooling layers to extract low-dimensional features, mainly including signal anomalies, peaks and troughs, and glitches. The Decoder, through a fully connected network, restores the original sensor signal. Through feature compression and restoration, the CNN model gains the ability to extract core low-dimensional features of the curve. After training, the Encoder part of the model is saved for subsequent secondary training. During the formal training phase after CNN pre-training, the pre-trained CNN Encoder is loaded to extract features from the original sensor signal, obtaining a low-dimensional feature representation of the weld, which is then used as node features in the subsequent graph structure.

[0044] In actual production, the abnormal characteristics of sensor signals from some defective stud welds are often not obvious, and traditional deep learning models cannot predict the quality results of this type of defect. Data analysis revealed that the quality results of multiple stud welds on the same vehicle exhibit temporal and spatial correlations: stud defects show spatial correlation; for example, when the same group of plates undergoes dimensional deformation, the stud quality in adjacent areas will show varying degrees of abnormality or defect; when the same equipment malfunctions, all studs welded by that equipment will show varying degrees of abnormality or defect; stud defects also exhibit temporal correlation; for example, as equipment lifespan gradually decreases over time, the quality of welded studs will also show a temporal correlation.

[0045] In step B, a topology is constructed based on process information and the spatiotemporal relationships between multiple stud welds. Combining the feature representations obtained in step A, these representations are then mounted onto the topology to obtain graph data. This process includes the following steps:

[0046] Step B1: Constructing the Topology: In actual production, vehicles undergo multiple stud welding processes. First, based on the temporal and spatial relationships of the multiple studs in the process specification, a topology is constructed. The topology construction method is as follows:

[0047] The process instruction manual includes temporal and spatial information about the studs, such as which studs belong to the same welding equipment, which studs are welded to the same plate, and the welding sequence of the studs. Based on these relationships of shared equipment, shared plate, and welding sequence, the studs are connected to construct the topology.

[0048] like Figure 2 As shown, the topology includes edges and nodes, where each stud weld is a node; the spatiotemporal relationship between stud welds is an edge, and the edges include three types of relationships: the spatial relationship between the stud and the plate, the spatial relationship between the stud and the equipment, and the temporal relationship of the stud welding sequence.

[0049] Step B2: Feature attachment is performed on the nodes and edges in the topology;

[0050] (1) Feature mounting of the edge;

[0051] This embodiment, in conjunction with the process instruction manual, constructs three types of edges in the topology based on the temporal and spatial relationships between studs: spatial relationships with the same sheet material, spatial relationships with the same equipment, and temporal relationships. The characteristics of these three types of relationships are as follows:

[0052] Spatial relationship characteristics of sheet metal: Conventional numerical coding is used for process information such as sheet metal thickness, coating type, material type, part type, and thermoforming type. The sheet thickness uses the original value, while other coating and material types are represented by 0, 1, 2, ... n.

[0053] Features of spatial relationships with equipment: Process information such as robot type, welding torch type, electrode rod type, controller type, and number of electrode cap dots are numerically encoded, using 0, 1, 2, ... n to represent robot, welding torch, and other types;

[0054] Temporal Relationship Characteristics: Based on historical equipment maintenance data, the maintenance cycle of each stud corresponding to the equipment is statistically analyzed. Combining the current usage frequency of the equipment with the average number of usable times of the equipment obtained from historical equipment maintenance records, the remaining lifespan of the current equipment is calculated. The remaining lifespan is the ratio of the current usage frequency to the average number of usable times, and this ratio is used as the temporal relationship characteristic between studs.

[0055] (2) Node feature mounting;

[0056] The bicycle undergoes multiple stud welding processes. Each welding process collects corresponding sensor signals. These sensor signals are processed through step A to obtain multiple node features. Each node feature is then attached to or used as a feature of the corresponding node in the topology, thereby constructing graph data.

[0057] This embodiment integrates process information into the topology. During subsequent GCN mining of feature transfer between studs (nodes), the process information features of the edges guide the feature transfer. Addressing the issue of insufficient modeling of process coupling effects, the spatiotemporal joint modeling system explicitly encodes the physical interactions between weld points by constructing a heterogeneous topology network that includes welding sequence (time graph) and spatial relationships (spatial graph). This architecture ensures that the accuracy of error identification during continuous welding processes is further improved, effectively solving the misjudgment problem caused by neglecting spatiotemporal relationships in traditional isolated detection methods.

[0058] This embodiment adds an adaptive masking module for local similarity to improve the GCN model. The model design incorporates the temporal and spatial relationships of multiple stud welds through a graph neural network, enhancing the model's ability to model the temporal and spatial relationships between multiple stud welds. The GCN-Automask model mainly adds an adaptive masking module for local similarity before the GCN model to enhance the graph neural network's ability to discover the temporal and spatial relationships between multiple stud welds.

[0059] In step C, node similarity is dynamically calculated based on the GCN-Automask model, strong correlations are filtered, and feature masks are applied. This includes the following steps:

[0060] Step C1: Combine the graph data obtained in step B to obtain multiple node features, and dynamically calculate the similarity between any two node feature matrices.

[0061] Calculate the cosine similarity S1 of the feature matrices of the two nodes and the DTW similarity S2 of the original sensor signals of the two nodes; construct the spatial distance similarity kernel function parameters, perform kernel function transformation on the node features to extract fluctuation similarity features, and repeat the above calculation based on the data fluctuation features extracted by the kernel function to obtain the kernel-optimized cosine similarity S1. kernel Similarity S2 between DTW and kernel function optimized kernel The final similarity is taken as S1, S2, and S3. kernel S2 kernel The mean;

[0062] Step C2: Based on the above similarity, select the node relationships with the highest relevance ratio α, where α is the mask ratio, and participate in the model gradient descent optimization.

[0063] Step C3: For each pair of strongly correlated relationships selected, randomly mask all features of one of the nodes, forcing the model to predict the features of the masked node through the spatiotemporal relationships of the remaining nodes, thereby obtaining the feature representation of all stud welding nodes.

[0064] In step C1, trainable kernel function parameters are introduced. These parameters include kernel function type parameters and kernel function morphological parameters, which are defined as follows:

[0065] The kernel function type is a combination of Gaussian kernel function and polynomial kernel function:

[0066] The Gaussian kernel function expression is: ;

[0067] The polynomial kernel function expression is: ;

[0068] Where x and y both represent node feature vectors (x is usually the feature vector of the node to be processed, while y is another node feature vector to be compared or to calculate similarity), and trainable parameters include the bandwidth parameter of the Gaussian kernel. σ coefficients of the polynomial kernel γ constant term c (Initial value set to 0) and order d ;

[0069] The kernel transformation process involves applying Gaussian and polynomial kernel transformations to the node features x, respectively, to obtain... , (in The mean vector of all node features in the training set is concatenated with the mean vector of the node features after kernel transformation; the transformation is repeated based on the transformed features to obtain... S 1 kernel (Cosine similarity after kernel function optimization) andS 2 kernel (DTW similarity after kernel function optimization), final similarity .

[0070] This embodiment effectively enhances the nonlinear representation capability of features by introducing a trainable kernel function. The Gaussian kernel function maps low-dimensional features to a high-dimensional space through radial basis mapping, capturing the implicit nonlinear correlations in sensor signals (such as the implicit relationship between current mutations and welding defects). The polynomial kernel function adjusts the feature interaction complexity through the order parameter d, adapting to different stud welding processes (such as the welding feature differences of studs with different diameters). The cosine similarity and DTW similarity of the original features are easily affected by noise interference; the kernel function transformation, through trainable parameters... σ , γ Dynamically adjusting feature weights, for example, the bandwidth of a Gaussian kernel can suppress the impact of high-frequency noise on similarity calculation, and the coefficients of a polynomial kernel... γ It can enhance the contribution of key features (such as voltage peaks). In addition, the kernel function parameters learn an adaptation strategy through gradient descent. When welding materials are switched, the kernel function automatically adjusts the feature mapping method to ensure consistency of similarity calculation across different working conditions.

[0071] In step C2, a model gradient descent co-optimization mechanism is designed, with the cross-entropy loss function as the optimization objective for the model parameters: ;in, This is a true label, indicating the actual welding quality of a specific welding operation. To predict the probability, i.e. the model prediction result for a certain welding operation, L represents the error between the model prediction result and the actual welding quality result of the stud weld, N represents the amount of data involved in training or iteration, i.e., the number of welding operations, and i represents a certain welding operation. The update paths for each parameter are as follows:

[0072] (1) Kernel function parameter update:

[0073] Kernel function parameters (σ, γ, c, d) The gradient is determined by the final similarity. S final Obtained through backpropagation. Through the chain rule, S final The partial derivatives of the kernel function parameters affect the node correlation screening, which in turn affects the adjacency matrix construction of the GCN model. During gradient descent, the parameters are dynamically adjusted by the Adam optimizer to adapt the kernel function to the feature distribution under different operating conditions.

[0074] (2) Adjacency matrix optimization:

[0075] The adjacency matrix A of GCN is constructed based on the top α proportion of strong correlations selected. Aij =1 if node i, j (If the correlation is strong, then it is 0 otherwise). During backpropagation, the gradient of A is passed through the feature aggregation layer of GCN: the partial derivative of L with respect to A is positively correlated with the node feature aggregation error, which prompts the adjacency matrix to preferentially retain the node relationships that contribute significantly to the prediction results.

[0076] (3) Dynamic adjustment of mask ratio:

[0077] The initial mask ratio α can be adaptively adjusted based on the sample size and participates in gradient descent as a trainable parameter. The gradient of α is defined as the partial derivative of L with respect to α. When the prediction error increases, α is updated in the direction of increase to incorporate more potential correlations; when the risk of overfitting increases, α is adjusted in the direction of decrease to strengthen the core relationships. Finally, it converges stably through a learning rate decay strategy (initial learning rate 1e-3, decaying by 10% every 10 rounds).

[0078] In this embodiment, the kernel function parameters, adjacency matrix, and mask ratio α are updated collaboratively using the same loss function L, avoiding parameter conflicts caused by independent optimization. The dynamic adaptation of the adjacency matrix and α achieves a closed-loop optimization of "relationship filtering - feature aggregation": when α decreases due to gradient descent, the adjacency matrix prioritizes retaining node relationships strongly correlated with defect prediction, thereby improving the accuracy of multi-node spatiotemporal relationship mining. The mask ratio α participates in training and has a maximum value of 20%.

[0079] The proposed adaptive masking mechanism based on local similarity hides the features of some studs through masking. In step C3, studs with completely hidden features are denoted as Mask-Studs, and studs with unhidden features are denoted as UNMask-Studs. A temporal-spatial relationship exists between Mask-Studs and UNMask-Studs. The GCN-Automask model mines and generates feature representations for all studs based on the features of the UNMask-Studs studs and the temporal-spatial relationship between the studs.

[0080] Furthermore, based on the feature representations of all nodes obtained in step C, the probability of binary classification (OK / NOK) is mapped through a fully connected network, and the category with the highest probability is taken as the result to predict the welding quality of stud welds. This enables a full exploration of the temporal and spatial relationships between multiple stud welds, significantly improving the performance of the model.

[0081] In this embodiment, a joint training module is used when training the model, and the implementation method is as follows:

[0082] (1) Before formal training, train the CNN autoencoder and save the trained CNN autoencoder model;

[0083] (2) During the formal training phase, the Encoder in the CNN model is loaded as the extractor of the original sensor signals, and the CNN Encoder and the GCN-AutoMask model are trained as a whole.

[0084] (3) The CNN Encoder and GCN-Automask are used as a whole as the final model.

[0085] This approach enables synergistic optimization of local features and global relationships, enhancing the model's generalization ability. By using a pre-trained CNN as the extractor: first, the CNN parameters are fixed to train the GCN, then joint fine-tuning is performed to avoid premature overfitting of the feature extractor; combined with a two-stage transfer learning framework, the strategy of freezing the underlying feature extractor during CNN pre-training and dynamically unfreezing the edge weights during the GCN fine-tuning stage achieves a technological leap from "single-point judgment" to "global optimization" in welding quality detection.

[0086] The objective loss function is designed as follows: Focal Loss addresses class imbalance (α=0.8, γ=2), and updates the model weights by comparing the true and predicted values ​​using gradient descent, thereby improving model performance.

[0087] Combination Figure 4 As shown, by analyzing the defect distribution of each vehicle, with the horizontal axis representing each vehicle and the vertical axis representing the stud welding sequence number, each column represents which sequence numbers the defective studs of each vehicle are distributed in. It can be observed that the defective studs have a regional distribution in time and space, and the following verification results are finally obtained:

[0088] 1. Verify the effectiveness of the model of this invention in uncovering the temporal and spatial relationships of multiple welding operations.

[0089] Validation conditions: Some nodes hide all features. Observe whether the model has the ability to identify the quality of feature-hidden nodes based on time and space relationships. If it does not have the ability to identify them, it means that the model cannot improve its performance based on time and space relationships. The statistical range of the following indicators is the nodes with hidden features.

[0090] Table 1. Validation results of the conventional CNN single-shot welding detection model for spatiotemporal relationship mining.

[0091] Accuracy (%) Recall rate (%) F1 score (f1-score) / % Data volume (support) / item Qualified(0) 0 0 0 70 Defect (1) 50 100 66 69 Accuracy 50 139 Micro average (macro avg) 25 50 33 139 Weighted average (avg) 25 50 33 139 ;

[0092] Table 2. Verification results of the spatiotemporal relationship mining capability of the model of this invention.

[0093] Accuracy (%) Recall rate (%) F1 score (f1-score) / % Data volume (support) / item Qualified (0) 71 79 74 70 Defect (1) 75 67 71 69 Accuracy 73 139 Micro average (macro avg) 73 73 73 139 Weighted average (avg) 73 73 73 139 ;

[0094] Combining Tables 1 and 2, it can be observed that traditional models predict all data in the validation set as defects. Because traditional models do not consider the temporal and spatial relationships of multiple stud welding operations, they become completely ineffective if features are hidden. Traditional CNN models lack the ability to mine temporal and spatial relationships. This invention introduces temporal and spatial relationships, exhibiting significant temporal and spatial recognition capabilities. The model relies on features from other nodes to model these relationships, achieving an overall accuracy of 73% on data with hidden features. This demonstrates that this invention effectively mines temporal and spatial relationships and, to a certain extent, improves the performance of quality prediction models.

[0095] 2. Overall effectiveness and performance improvement of the solution; Validation conditions: The model is validated based on all features (node ​​features are not hidden).

[0096] Table 3 Performance validation set results of conventional CNN single-shot welding detection model

[0097] Accuracy (%) Recall rate (%) F1 score (f1-score) / % Data volume (support) / item Qualified (0) 86 87 86 1120 Defect (1) 87 86 86 1120 Accuracy 86 1120 Micro average (macro avg) 86 86 86 1120 Weighted average (avg) 86 86 86 1120 ;

[0098] Table 4 Performance Validation Results of the Proposed Model

[0099] Accuracy (%) Recall rate (%) F1 score (f1-score) / % Data volume (support) / item Qualified (0) 98 96 97 1120 Defect (1) 96 98 97 1120 Accuracy 97 2240 Micro average (macro avg) 97 97 97 2240 Weighted average (avg) 97 97 97 2240 ;

[0100] Tables 3 and 4 show that by comparing the quality detection performance of the CNN pre-trained model + fully connected layer decoder and the CNN pre-trained model + GCN decoder, the CNN pre-trained model + fully connected layer decoder, for single stud welding, lacks the ability to detect quality if features are hidden. It performs quality prediction for studs with hidden features. The GCN network, through its spatiotemporal relationship mining, provides a certain degree of detection capability for points with hidden features, demonstrating the effectiveness of the spatiotemporal relationship approach. Furthermore, the proposed method significantly improves the accuracy of stud welding quality detection, achieving an accuracy of 97% on the current dataset, an 11% improvement compared to the conventional CNN single-welding detection model. This proves the effectiveness and performance improvement of incorporating spatiotemporal relationships in this invention.

[0101] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A welding quality detection method of fusing the welding spatio-temporal characteristics of multiple stud welding, characterized by, The method comprises the following steps: Step A, obtaining all the sensor signals of the welding to be detected, and processing the sensor signals to obtain the feature representation of single welding; Step B, based on the process information, the spatiotemporal features of multiple stud welding, and the feature representation of single welding obtained in step A, a graph data is constructed; Step B1, constructing a topological structure: based on the time relationship and spatial relationship of the stud in the process guide book, the topological connection relationship between the studs is constructed; Step B2, feature mounting: the single feature representation obtained in step A is taken as the feature of the topological structure node; the same plate spatial relationship feature, the same device spatial relationship feature and the time relationship feature are coded as the feature of the topological structure edge; Step C, based on the GCN-AutoMask model, the similarity of the nodes is dynamically calculated, the strong correlation is screened and the feature mask is performed, and the masked feature is obtained, which is as follows: Step C1, based on the graph data obtained in step B, a plurality of node features are obtained, and the similarity of any two node feature matrices is dynamically calculated; First, calculate the cosine similarity S1 of the feature matrices of the two nodes and the DTW similarity S2 of the original sensor signals of the two nodes. Then, construct the spatial distance similarity kernel function parameters and perform kernel function transformation on the node features to extract fluctuation similarity features. Based on the data fluctuation similarity features extracted by the kernel function, repeat the above calculation to obtain the cosine similarity S1 after kernel function optimization. kernel Similarity S2 between DTW and kernel function optimized kernel The final similarity is taken as S1, S2, and S3. kernel S2 kernel The mean; Step C2, according to the final similarity obtained above, the node relationship with the top α proportion of correlation is screened, and α is the mask proportion, which participates in the gradient descent optimization of the model; Step C3, for each pair of strong correlation screened out, the features of one node are randomly masked, so that the model predicts the features of the masked node through the spatiotemporal relationship of the remaining nodes, and then the feature representation of all stud welding nodes is obtained; Step D, based on the graph data and the masked feature, the spatiotemporal relationship between multiple nodes is mined, the node feature is mapped to the probability of OK / NOK through a fully connected network, and the category corresponding to the maximum probability is taken as the quality result of this welding, so that the stud welding quality is predicted.

2. The method according to claim 1, characterized in that: In step B, when the features of the edges are mounted: The same plate spatial relationship feature includes numerical coding of the plate thickness, the coating type, the material type, the part type and the hot forming type; The same device spatial relationship feature includes numerical coding of the robot type, the welding gun type, the electrode rod type, the controller type and the electrode cap dot number; The time relationship The feature: based on the historical equipment maintenance data, the maintenance period of the corresponding equipment of each stud is counted, the average serviceable times of the equipment are counted based on the historical equipment maintenance records, the remaining life of the current equipment is calculated, and the remaining life is the ratio of the current serviceable times to the average serviceable times, and is taken as the time relationship feature between the studs.

3. The method according to claim 1, characterized in that: In step C1, a trainable kernel function parameter is introduced by constructing a spatial distance similarity kernel function parameter, and the kernel function parameter includes a kernel function type parameter and a kernel function form parameter, which are defined as follows: The kernel function type adopts a combination form of Gaussian kernel function and polynomial kernel function: The Gaussian kernel function expression is: ; The polynomial kernel function expression is: ; Wherein, x and y represent node feature vectors; the bandwidth parameter σ of the Gaussian kernel, the coefficient γ of the polynomial kernel, the constant term c and the order d are trainable parameters; When the kernel function is transformed, the Gaussian kernel and the polynomial kernel are respectively applied to the node feature vector x, and the transformed results are spliced as the node features after the kernel function transformation; based on repeated calculation of the transformed features, the final similarity is obtained .

4. The method according to claim 3, characterized in that: In step C2, a model gradient descent collaborative optimization mechanism is designed, and the model parameters are collaboratively optimized with the cross-entropy loss function as the optimization objective: wherein, is the true label, is the predicted probability, L represents the error between the model prediction result and the real quality result of the stud welding, N represents the amount of data participating in training or iteration, i represents a certain welding, and the parameter update path is as follows: (1) Kernel function parameter update: The gradients of the kernel function parameters σ, γ, c, d are obtained by the final similarity S final obtained by back propagation; through the chain rule, S final The partial derivative of the kernel function parameters will affect the node correlation screening, and then act on the adjacency matrix construction of the GCN-AutoMask model. In the gradient descent process, the parameters are dynamically adjusted by the Adam optimizer, so that the kernel function adapts to the feature distribution under different working conditions. (2) Adjacency matrix optimization: The adjacency matrix of GCN-AutoMask model is constructed based on the top alpha proportion of strong correlations. During backpropagation, the gradient of the adjacency matrix is passed through the feature aggregation layer of the GCN model: the partial derivative of L with respect to the adjacency matrix is positively correlated with the node feature aggregation error, prompting the adjacency matrix to preferentially retain node relationships that significantly contribute to the prediction result. (3) Dynamic adjustment of mask proportion: The mask proportion alpha is initially adjusted adaptively according to the sample size and is involved in gradient descent as a trainable parameter. The gradient of alpha is defined as the partial derivative of L with respect to alpha. When the prediction error increases, alpha is updated in the increasing direction to include more potential relevant relationships. When the risk of overfitting rises, alpha is adjusted in the decreasing direction to strengthen the core relationships. Finally, the learning rate decay strategy is used to stabilize the convergence.

Citation Information

Patent Citations

  • Method for detecting welding quality of stud welding based on convolutional neural network

    CN114240896A

  • Weld defect detection method and system based on deep learning

    CN119884936A

  • Metal welding defect root cause analysis method based on mapping knowledge domain

    CN114943415A

  • Multi-device energy consumption situation space-time prediction method based on adaptive graph construction

    CN117634679A