Welding quality detection method fusing welding spatio-temporal characteristics of multiple stud welding

By combining the GCN-Automask model with the spatiotemporal characteristics of multiple stud welding processes, the problem of not considering the temporal and spatial correlation in existing technologies is solved, and higher-precision welding quality detection is achieved, thereby improving the accuracy and robustness of detection.

CN120744409AActive Publication Date: 2025-10-03SHANGHAI BALLSNOW INTELLIGENT TECH CO LDT +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511254030.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2025-10-03
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, high rates of missed or false positives, and insufficient utilization of process knowledge and experience.

Method used

The GCN-Automask model is adopted, combined with the spatiotemporal characteristics of multiple stud welding, and an adaptive mask mechanism of topological structure and local similarity is constructed to dynamically capture the spatiotemporal dependency between studs, and integrate process information for quality prediction.

Benefits of technology

The accuracy and robustness of welding quality detection are improved, and accurate identification of potential quality risks and automated full inspection are achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744409A_ABST
    Figure CN120744409A_ABST
Patent Text Reader

Abstract

The invention discloses a welding quality detection method fusing welding spatio-temporal characteristics of multiple stud welding, and belongs to the field of welding quality detection.The welding quality detection method comprises the steps that firstly, a plurality of stud welding topological structures are constructed; a GCN-AutoMask model is put forward, a local similarity adaptive mask module is added on the basis of the GCN model, coding and decoding are carried out through the GCN-AutoMask model, and the welding quality of all nodes is predicted. According to the scheme, space-time information is fused, time sequence analysis and spatial topology modeling are combined, and the space-time dependency relationship between the studs is dynamically captured, so that potential quality risks are predicted more accurately, in addition, graph data are constructed based on process information, static process information is fully mined, meanwhile, dynamically changing characteristics are constructed, robustness and mobility of the model are enhanced, and the quality risk of the stud is predicted more accurately. And the model identification precision and robustness are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of welding quality detection, and in particular relates to a welding quality detection method integrating the spatiotemporal characteristics of multiple stud welding operations. Background Art

[0002] Stud welding is a method of welding metal studs or other similar metal fasteners to metal sheets. This method creates a hole-free connection and is widely used in industries such as automotive, home appliances, instrumentation, and medical devices. The quality of stud welding significantly impacts product quality. While the time-series electrical signals (current, voltage, etc.) collected by a stud welding controller can reflect weld quality, traditional threshold methods struggle to capture these complex characteristics.

[0003] Currently, the main stud welding quality inspection method in industrial production processes is destructive testing, such as bend testing and stretching. With the development of deep learning / machine learning, its application in the field of welding quality inspection is widespread. For example, the invention patent application with publication number [CN 114240896 A] discloses a method for inspecting stud welding quality based on a convolutional neural network. Through pre-training based on the convolutional neural network system, the quality inspection of stud welding for specific specifications is more efficient, and different types of welding defects can be accurately classified. The invention patent application with publication number [CN 119884936 A] discloses a weld defect detection method and system based on deep learning. The method collects ultrasonic information through sensors and develops a multi-branch deep fusion network model. By integrating one-dimensional and two-dimensional convolutional neural networks, the temporal and spatial characteristics of the weld are simultaneously captured, and single-point quality is modeled. The weld quality is predicted by extracting the sensor signal characteristics of a single weld.

[0004] For the stud welding process in automobile production, a single vehicle undergoes multiple stud welds at different locations. Multiple stud welds are subject to temporal and spatial relationships. Temporal relationships include equipment damage leading to quality anomalies in consecutive stud welds. Spatial relationships include plate deformation leading to local stud weld quality anomalies, unqualified batch plate material properties leading to quality anomalies in some or all studs, and thermal deformation of the plate during production leading to local stud weld quality anomalies. Traditional welding quality inspection methods primarily use sensor data from the welding process to determine welding quality. These methods often use convolutional layers to automatically extract local signal features for quality classification, ignoring the temporal and spatial correlations between welds. They also fail to consider the impact of the stud welding / assembly sequence on overall quality (such as accumulated thermal deformation) and fail to model the interactions between adjacent studs (such as stress distribution and spacing deviation). Furthermore, insufficient use of process knowledge and experience, direct processing of raw sensor data without integrating process parameters, material information, and process design, can also result in poor model robustness and transferability.

[0005] It can be seen that the existing method does not utilize process knowledge and experience, and does not consider the temporal and spatial correlation between multiple welding processes. As a result, the model has a good ability to recognize serious defects, but poor ability to recognize abnormal quality, resulting in a high rate of missed reports or false alarms and low detection accuracy. Summary of the Invention

[0006] In order to solve the problems of poor detection quality and low accuracy caused by the traditional welding quality detection method not considering the spatiotemporal correlation between welds, this paper proposes a welding quality detection method that integrates the spatiotemporal characteristics of multiple stud welding. Based on the GCN-Automask model, the spatiotemporal characteristics between multiple stud weldings are combined, and relevant process information is fully mined to effectively improve the welding quality and detection accuracy.

[0007] The present invention is implemented by adopting the following technical solution: a welding quality detection method integrating the spatiotemporal characteristics of multiple stud welding, comprising the following steps: Step A: obtaining sensor signals of all welds of the product to be inspected, and performing signal processing on the sensor signals to obtain a characteristic representation of a single weld; Step B: Based on the process information and the spatiotemporal characteristics of multiple stud welding operations, the feature representation of a single welding operation is obtained in step A to construct graph data; Step B1, constructing a topological structure: constructing a topological connection relationship between studs based on the temporal and spatial relationships of the studs in the process instruction book; Step B2, feature mounting: The single feature representation obtained in step A is used as the feature of the topological structure node; the spatial relationship feature of the same plate, the spatial relationship feature of the same equipment, and the time relationship feature are encoded as the feature of the topological structure edge; Step C: Dynamically calculate node similarity based on the GCN-Automask model, filter strong correlations, and perform feature masking to obtain masked features. Specifically, it includes: Step C1: Combine the graph data obtained in step B to obtain multiple node features, and dynamically calculate the similarity of any two node feature matrices; First, the cosine similarity S1 of the feature matrix of the two nodes and the DTW similarity S2 of the original sensor signals of the two nodes are calculated; then the spatial distance similarity kernel function parameters are constructed, and the node features are transformed by the kernel function to extract the fluctuation similarity features. Based on the data fluctuation similarity features extracted by the kernel function, the above calculations are repeated to obtain the cosine similarity S1 after the kernel function optimization. kernel and DTW similarity S2 after kernel function optimization kernel ; The final similarity is S1, S2, S1 kernel 、S2 kernel The mean of Step C2: Based on the final similarity obtained above, select the node relationships with the top α ratio of correlation, where α is the mask ratio, and participate in the model gradient descent optimization; Here, a model gradient descent collaborative optimization mechanism is designed, and the model parameter collaborative optimization takes the cross entropy loss function as the optimization target: ;in is the real label, that is, the actual welding quality of a certain welding. is the prediction probability, i.e., the model prediction result of a certain welding, L represents the error between the model prediction result and the actual quality result of stud welding, N represents the amount of data involved in training or iteration, i.e., the number of welding times, and i represents a certain welding. The update path of each parameter is as follows: (1) Kernel function parameter update: Kernel function parameters σ, γ, c, d The gradient of the final similarity is S final Back propagation is obtained; through the chain rule, S final The partial derivative of the kernel function parameters affects the node relevance screening, which in turn acts on the adjacency matrix construction of the GCN-Automask model. During the gradient descent process, the Adam optimizer dynamically adjusts the parameters to adapt the kernel function to the feature distribution under different working conditions. (2) Adjacency matrix optimization: The adjacency matrix of the GCN-Automask model is constructed based on the strong correlation of the first α ratios screened. 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 prioritize retaining node relationships that contribute significantly to the prediction results; (3) Dynamic adjustment of mask ratio: 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 an increasing direction to incorporate more potential correlations. When the risk of overfitting increases, α is adjusted in a decreasing direction to strengthen the core relationship. Finally, stable convergence is achieved through a learning rate decay strategy. Step C3: For each pair of strongly correlated relationships screened out, all features of one of the nodes are randomly masked, forcing the model to predict the features of the masked node through the spatiotemporal relationships of the remaining nodes, thereby obtaining feature representations of all stud welding nodes; Step D: Based on the graph data and masked features, the spatiotemporal relationships between multiple nodes are mined. The node features are mapped to the probability of OK / NOK through a fully connected network. The category corresponding to the maximum probability is taken as the quality result of the welding, completing the prediction of the stud welding quality.

[0008] Compared with the prior art, the advantages and positive effects of the present invention are: This solution incorporates spatiotemporal feature information and proposes a spatiotemporal joint modeling algorithm. By constructing the topological structure of multiple stud welds, the original sensor signals are encoded through CNN to obtain low-dimensional node features. Each node represents a welding. Based on the GCN-AutoMask model with an adaptive mask mechanism that adds local similarity, combined with time series analysis and spatial topology modeling, it dynamically captures the spatiotemporal dependencies between studs and predicts the welding quality of all nodes. This solution constructs graph data based on process information, fully mines static process information, and constructs dynamically changing features, so as to more accurately predict potential quality risks, improve detection robustness, and realize automated full inspection. At the same time, big data learning can achieve accurate identification of welding defects. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 This is a flow chart of a welding quality detection method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the data construction process according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the CNN model structure according to an embodiment of the present invention; Figure 4 Schematic diagram of the time-space relationship of defects in multiple stud welds according to an embodiment of the present invention. DETAILED DESCRIPTION

[0010] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described below with reference to the accompanying drawings and embodiments. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can also be implemented in other ways than those described herein. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0011] For stud welding, existing methods primarily consider process sensor data to determine welding quality, considering factors influencing welding quality. However, in actual production, process parameters, material information, process design, and the potential lifespan of equipment also affect welding quality to varying degrees. However, because this information is often unchanging, the model cannot tap into its role. In addition, stud defects also exhibit spatial and temporal correlations. When the same set of plates is dimensionally deformed, the quality of studs in adjacent areas will exhibit varying degrees of abnormality or defects. When the same equipment exhibits an abnormality, all studs welded by the current equipment will exhibit varying degrees of abnormality or defects. As time passes, the equipment lifespan will gradually decrease, and the quality of welded studs will also exhibit temporal correlations.

[0012] This example analyzes the temporal and spatial distribution of defective studs during automobile production. Figure 4 As shown in the figure, by analyzing the defect distribution of each vehicle, the horizontal axis represents each vehicle (vehicles are welded continuously, sorted by time, from vehicle #0 to vehicle #300), and the vertical axis represents the welding sequence of the multiple stud welds of the current vehicle (the sequence numbers represent studs #0 to #646, sorted by time. Points at adjacent times often have spatial relationships, such as when the same welding gun is used or welded on the same set of plates). The red points in each column represent the distribution of defective studs for the current vehicle. The temporal correlation or continuity of the defective studs can be observed horizontally (temporal correlation), while the regional clustering characteristics can be observed vertically (spatial correlation). The distribution of defective studs demonstrates the existence of a temporal-spatial relationship and the necessity of models mining temporal-spatial relationships.

[0013] In view of the above problems, this embodiment proposes a welding quality detection method that integrates the spatiotemporal characteristics of multiple stud welding. Figure 1 As shown, the following steps are included: Step A: acquiring sensor signals of all welds of the product to be inspected, and processing the sensor signals to obtain a characteristic representation of a single weld; Step B: Based on the process information and the spatiotemporal characteristics of multiple stud welding operations, the feature representation of a single welding operation is obtained in step A to construct graph data; Step B1, constructing a topological structure: constructing a topological connection relationship between studs based on the temporal and spatial relationships of the studs in the process instruction book; Step B2, feature mounting: The single feature representation obtained in step A is used as the feature of the topological structure node; the spatial relationship between the same plate, the spatial relationship between the same equipment, and the time relationship are encoded as the features of the topological structure edge; Step C: Dynamically calculate node similarity based on the GCN-Automask model, filter strong correlations, and perform feature masking to obtain masked features; the GCN-Automask model includes an adaptive mask module for local similarity and a GCN module; Step D: Based on the graph data and masked features, the spatiotemporal relationships between multiple nodes are mined. The node features are mapped to the probability of OK / NOK through a fully connected network. The category corresponding to the maximum probability is taken as the quality result of the welding, completing the prediction of the stud welding quality.

[0014] Specifically, in order to more clearly understand the solution of the present invention, the solution is described in detail below in conjunction with specific implementation steps: In step A, a CNN autoencoder is designed and trained based on the original sensor signal. After training, the model is saved as a pre-trained CNN encoder module. The sensor signal obtained by the production is encoded by the module to obtain a low-dimensional feature representation of the welding, which is used as the node feature (Node Embedding) in the subsequent topological structure; the stud welding process is mainly divided into four stages: short circuit stage, pilot current stage, welding current stage and upset current stage. In each stage, the sensor will collect the electrical and position signals of the process, mainly including welding voltage signal, welding current signal, stud movement position and speed signal. Usually, the length of each welding signal is about 5000.

[0015] like Figure 3 As shown in the figure, the CNN autoencoder consists of an encoder and a decoder. The raw sensor signals are processed through convolutional layers and sampling and pooling layers to extract low-dimensional features. The extracted features mainly include abnormal signal jitter, peaks and valleys, and glitches. The decoder restores the raw sensor signals through a fully connected network. This feature compression and restoration process enables the CNN model to extract the core low-dimensional features of the curve. After training, the encoder portion of the model is saved for subsequent retraining of the model. After CNN pre-training is complete, the pre-trained CNN encoder is loaded during the model's formal training phase to extract features from the raw sensor signals, obtaining a low-dimensional feature representation of the weld, which serves as the node features in the subsequent graph structure.

[0016] In actual production, some defective stud welds often lack obvious sensor signal anomalies, making traditional deep learning models unable to predict the quality outcomes of these defects. Data analysis revealed that the quality outcomes of multiple stud welds on the same vehicle exhibit temporal and spatial correlations: Stud defects exhibit spatial correlations. For example, when dimensional deformation occurs in the same set of plates, the quality of studs in adjacent areas will exhibit varying degrees of anomalies or defects. When an anomaly occurs in the same piece of equipment, all studs welded by that equipment will exhibit varying degrees of anomalies or defects. Stud defects exhibit temporal correlations. For example, as equipment life decreases over time, the quality of the welded studs will also exhibit temporal correlations.

[0017] In step B, a topological structure is constructed based on process information and the spatiotemporal relationship between multiple stud welds. Combined with the feature representation obtained in step A, the feature representation is mounted on the topological structure to obtain graph data. Specifically, the following steps are included: Step B1: Constructing a topological structure: In the actual production process, multiple stud welding operations are performed on vehicles. First, a topological structure is constructed based on the temporal and spatial relationships of multiple studs in the process instruction book. The topological structure construction method is as follows: The process instructions contain temporal and spatial information about the studs, such as which studs are welded on the same equipment, which studs are welded on the same plate, and the order in which the studs are welded. Based on these connections, the studs are connected to create a topological structure.

[0018] like Figure 2 As shown, the topological structure includes edges and nodes, wherein each stud weld serves as a node; the spatiotemporal relationship between stud welds serves as an edge, and the edge includes 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 between the successive stud welds.

[0019] Step B2: perform feature mounting on nodes and edges in the topological structure; (1) Feature mounting of edges; This example combines the process instructions and constructs three types of edges in the topological structure based on the temporal and spatial relationships between studs: same-plate spatial relationships, same-equipment spatial relationships, and temporal relationships. The characteristics of these three types of relationships are as follows: Spatial relationship characteristics of the same sheet material: Conventional numerical coding is performed on process information such as sheet thickness, coating type, material type, part type, and thermoforming type. The sheet thickness uses the original value, and other coating, material, and other types are coded using 0, 1, 2, ... n. Spatial relationship characteristics of the same equipment: process information such as robot type, welding gun type, electrode rod type, controller type, and electrode cap dot number are numerically coded, using 0, 1, 2, ... n to express the type of robot, welding gun, etc. Time relationship feature: Based on historical equipment maintenance data, the maintenance cycle of the equipment corresponding to each stud is counted. The remaining life of the current equipment is calculated by combining the number of times the current equipment is used and the average number of times the equipment can be used based on historical equipment maintenance records. The remaining life is the ratio of the current number of times it is used to the average number of times it can be used, and this ratio is used as the time relationship feature between the studs.

[0020] (2) Node feature mounting; The bicycle will undergo multiple stud welding, and the corresponding sensor signal will be collected for each welding. The sensor signal will obtain multiple node features after step A. Each node feature will be mounted / used as the feature of the corresponding node in the topological structure, thereby constructing the graph data.

[0021] This embodiment integrates process information into the topological structure. During the subsequent GCN mining of feature transfer between studs (nodes), the process information features of the edges guide feature transfer. To address the inadequate modeling of process coupling effects, the spatiotemporal joint modeling system explicitly encodes the physical interactions between welds by constructing a heterogeneous topological network encompassing the welding sequence (time graph) and spatial correlations (spatial graph). This architecture further improves the accuracy of error identification during continuous welding, effectively addressing the misjudgment problem caused by traditional isolated detection methods that ignore spatiotemporal correlations.

[0022] This embodiment improves the GCN model by adding an adaptive masking module for local similarity. The model design incorporates the temporal and spatial relationships between 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 primarily adds an adaptive masking module for local similarity to the GCN model to enhance the graph neural network's ability to mine the temporal and spatial relationships between multiple stud welds.

[0023] In step C, the node similarity is dynamically calculated based on the GCN-Automask model, strong correlations are screened, and feature masks are performed. The specific steps include: Step C1: Combine the graph data obtained in step B to obtain multiple node features, and dynamically calculate the similarity of any two node feature matrices; Calculate the cosine similarity S1 of the feature matrix 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 the fluctuation similarity features, repeat the above calculation based on the data fluctuation features extracted by the kernel function, and obtain the cosine similarity S1 after the kernel function optimization. kernel and DTW similarity S2 after kernel function optimization kernel ; The final similarity is S1, S2, S1 kernel 、S2 kernel The mean of Step C2: Based on the above similarity, select the node relationships with the top α ratio of correlation, where α is the mask ratio, and participate in the model gradient descent optimization; Step C3: For each pair of strongly correlated relationships screened out, all features of one of the nodes are randomly masked, 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.

[0024] In step C1, trainable kernel function parameters are introduced. The kernel function parameters include kernel function type parameters and kernel function morphology parameters, which are specifically defined as follows: The kernel function type selects a combination of Gaussian kernel function and polynomial kernel function: The Gaussian kernel function expression is: ; The polynomial kernel function expression is: ; Where x and y represent node feature vectors (x is usually the feature vector of the node to be processed, and y is another node feature vector to be compared or calculated similarity with it), and the trainable parameters include the bandwidth parameter of the Gaussian kernel σ , the coefficients of the polynomial kernel γ , constant term c (initial value is set to 0) and order d ; The kernel function transformation process is: apply Gaussian kernel and polynomial kernel transformation to the node feature x, and get 、 (in is the mean vector of all node features in the training set), and the two are concatenated as the node features after kernel function transformation; repeated calculations are performed based on the transformed features to obtain S 1 kernel (cosine similarity after kernel optimization) and S 2 kernel (DTW similarity after kernel function optimization), final similarity .

[0025] This embodiment effectively enhances the nonlinear expression capability of features by introducing a trainable kernel function. The Gaussian kernel function maps low-dimensional features to high-dimensional space through radial basis mapping, which can capture the implicit nonlinear associations in sensor signals (such as the implicit relationship between current mutation and welding defects); the polynomial kernel function adjusts the feature interaction complexity through the order parameter d, and can adapt to different stud welding processes (such as the difference in welding features of studs with different diameters); the cosine similarity and DTW similarity of the original features are easily affected by noise, and the kernel function transformation is carried out through the trainable parameter σ 、 γ Dynamically adjust feature weights, for example, the bandwidth of the Gaussian kernel can suppress the impact of high-frequency noise on similarity calculations, and the coefficients of the polynomial kernel can be adjusted. γ It can enhance the contribution of key features (such as voltage peaks). In addition, the kernel function parameters are autonomously learned and adapted through gradient descent. When the welding material is switched, the kernel function automatically adjusts the feature mapping method to ensure the consistency of similarity calculation across different working conditions.

[0026] 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 target: ;in, is the real label, that is, the actual welding quality of a certain welding. is the prediction probability, i.e., the model prediction result of a certain welding, L represents the error between the model prediction result and the actual quality result of stud welding, N represents the amount of data involved in training or iteration, i.e., the number of welding times, and i represents a certain welding. The update path of each parameter is as follows: (1) Kernel function parameter update: Kernel function parameters (σ, γ, c, d) The gradient of the final similarity is S final Back propagation is obtained. By the chain rule, S final The partial derivative of the kernel function parameters affects the node correlation screening, which in turn acts on the adjacency matrix construction of the GCN model. During the gradient descent process, the parameters are dynamically adjusted through the Adam optimizer to make the kernel function adapt to the feature distribution under different working conditions.

[0027] (2) Adjacency matrix optimization: The adjacency matrix A of GCN is constructed based on the top α strong correlations of the screened Aij =1 if node i , j 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, prompting the adjacency matrix to prioritize the node relationships that contribute significantly to the prediction results.

[0028] (3) Dynamic adjustment of mask ratio: 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 α. As the prediction error increases, α is updated to increase to incorporate more potential correlations. As the risk of overfitting increases, α is adjusted to decrease to strengthen core relationships. Ultimately, a learning rate decay strategy (initial learning rate 1e-3, decaying by 10% every 10 epochs) achieves stable convergence.

[0029] In this embodiment, the kernel function parameters, adjacency matrix, and mask ratio α are collaboratively updated through the same loss function, L, avoiding parameter conflicts caused by independent optimization. Dynamic adaptation of the adjacency matrix and α enables a closed-loop optimization process of "relationship screening and feature aggregation": as α decreases due to gradient descent, the adjacency matrix prioritizes node relationships that are strongly correlated with defect prediction, thereby improving the accuracy of mining multi-node spatiotemporal relationships. The mask ratio α is included in training and has a maximum value of 20%.

[0030] This solution proposes an adaptive masking mechanism based on local similarity, which completely hides the features of some studs through masking. In step C3, the studs with completely hidden features are denoted as Mask-Studs, and the studs with unmasked features are denoted as Unmasked-Studs. There is a temporal and spatial relationship between Mask-Studs and Unmasked-Studs. The GCN-Automask model mines and generates feature representations for all studs by leveraging the temporal and spatial relationships between the features of the Unmasked-Studs portion and the studs.

[0031] Then, based on the feature representation of all nodes obtained in step C, the probability of mapping to the binary classification (OK / NOK) is obtained through a fully connected network, and the category with the maximum probability is taken as the result. This can realize the prediction of the stud welding quality and fully explore the temporal and spatial relationship between multiple stud welds, greatly improving the performance of the model.

[0032] In this embodiment, a joint training module is used when training the model, and the implementation method is as follows: (1) Before formal training, first train the CNN autoencoder and save the trained CNN autoencoder model; (2) During the formal training phase, the Encoder in the CNN model is loaded as the extractor of the original sensor signal, and the CNN Encoder and the GCN-AutoMask model are taken as a whole for secondary training; (3) CNN Encoder and GCN-Automask as a whole as the final model.

[0033] This allows for the coordinated optimization of local features and global relationships, improving model generalization. By pre-training a CNN as an extractor, the team first trained the GCN with fixed CNN parameters, then fine-tuned the GCN to prevent premature overfitting of the feature extractor. Combining a two-stage transfer learning framework, the team achieved a technological leap from "single-point judgment" to "global optimization" in welding quality inspection by freezing the underlying feature extractor during CNN pre-training and dynamically unfreezing edge weights during the GCN fine-tuning phase.

[0034] The objective loss function is designed as follows: Focal Loss solves the category imbalance (α=0.8, γ=2). By comparing the true value with the predicted value, the model weight is updated with the help of gradient descent technology to improve the model performance.

[0035] Combine Figure 4 As shown in the figure, by analyzing the defect distribution of each vehicle, the horizontal axis is each vehicle, the vertical axis is the stud welding serial number, and each column represents the stud serial number of each vehicle where the defective studs are distributed. It can be observed that the defective studs have a regional distribution in time and space, and the final verification results are as follows: 1. Verify the effectiveness of the proposed model in mining the temporal and spatial relationships of multiple welding processes Verification conditions: Hide all features of some nodes and observe whether the model has the ability to identify the quality of feature-hidden nodes based on time-space relationships. If it does not have this ability, it means that the model cannot improve its performance based on time-space relationships. The statistical scope of the following indicators is the nodes with hidden features. Table 1 Verification results of the spatiotemporal relationship mining capability of the conventional CNN single welding detection model Accuracy (precision) / % Recall rate (recall) / % F1 score (f1-score) / % Data volume (support) / Qualified (0) 0 0 0 70 Defects (1) 50 100 66 69 Accuracy 50 139 macro avg 25 50 33 139 weighted avg 25 50 33 139 Table 2 Verification results of the model's ability to mine spatiotemporal relationships Accuracy (precision) / % Recall rate (recall) / % F1 score (f1-score) / % Data volume (support) / Qualified (0) 71 79 74 70 Defects (1) 75 67 71 69 Accuracy 73 139 macro avg 73 73 73 139 weighted avg 73 73 73 139 Combining Tables 1 and 2, we can see that the traditional model predicts all the data in the validation set as defects. Because it fails to consider the temporal and spatial relationships of multiple stud welds, it completely fails if features are hidden. The traditional CNN model lacks the ability to mine temporal and spatial relationships. The present invention introduces temporal and spatial relationships, demonstrating significant temporal and spatial recognition capabilities. The model leverages other node features to model temporal and spatial relationships, achieving an overall accuracy of 73% on data with hidden features. This demonstrates that the present invention effectively mines temporal and spatial relationships and, to a certain extent, improves the performance of the quality prediction model.

[0036] 2. Improve the effectiveness and performance of the overall solution; Verification conditions: The model is verified based on all features (node ​​features are not hidden).

[0037] Table 3. Performance verification set results of conventional CNN single welding detection model Accuracy (precision) / % Recall rate (recall) / % F1 score (f1-score) / % Data volume (support) / Qualified (0) 86 87 86 1120 Defects (1) 87 86 86 1120 Accuracy 86 1120 macro avg 86 86 86 1120 weighted avg 86 86 86 1120 Table 4. Results of the performance verification set of this solution model Accuracy (precision) / % Recall rate (recall) / % F1 score (f1-score) / % Data volume (support) / Qualified (0) 98 96 97 1120 Defects (1) 96 98 97 1120 accuracy 97 2240 macro avg 97 97 97 2240 weighted avg 97 97 97 2240 As can be seen from Tables 3 and 4, by comparing the quality detection effects 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 does not have the ability to detect quality for a single stud welding if the feature is hidden. The GCN network mines the spatiotemporal relationship and has a certain degree of detection capability for points with hidden features, proving the effectiveness of the spatiotemporal relationship. This method significantly improves the accuracy of stud welding quality detection. The model has an accuracy of 97% on the current dataset, an 11% increase compared to the conventional CNN single welding detection model. This demonstrates the effectiveness and performance improvement of the present invention by incorporating spatiotemporal relationships.

[0038] The above description is merely a preferred embodiment of the present invention and does not constitute any other form of limitation to the present invention. Any person skilled in the art may utilize the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes for application in other fields. However, any simple modification, equivalent change, and modification of the above embodiments made in accordance with the technical essence of the present invention without departing from the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.

Claims

1. A welding quality detection method integrating the spatiotemporal characteristics of multiple stud welding processes, characterized in that: The following steps are involved: Step A: obtaining sensor signals of all welds of the product to be inspected, and performing signal processing on the sensor signals to obtain a characteristic representation of a single weld; Step B: Based on the process information and the spatiotemporal characteristics of multiple stud welding operations, the feature representation of a single welding operation is obtained in step A to construct graph data; Step B1, constructing a topological structure: constructing a topological connection relationship between studs based on the temporal and spatial relationships of the studs in the process instruction book; Step B2, feature mounting: The single feature representation obtained in step A is used as the feature of the topological structure node; the spatial relationship feature of the same plate, the spatial relationship feature of the same equipment, and the time relationship feature are encoded as the feature of the topological structure edge; Step C: Dynamically calculate node similarity based on the GCN-AutoMask model, filter strong correlations, and perform feature masking to obtain masked features; Step D: Based on the graph data and masked features, the spatiotemporal relationships between multiple nodes are mined. The node features are mapped to the probability of OK / NOK through a fully connected network. The category corresponding to the maximum probability is taken as the quality result of the welding, completing the prediction of the stud welding quality.

2. The welding quality detection method integrating the spatiotemporal characteristics of multiple stud welding according to claim 1 is characterized in that: In step B, when mounting the edge feature: Spatial relationship characteristics of the same sheet material: including numerical coding of sheet material thickness, coating type, material type, part type, and thermoforming type; Spatial relationship characteristics of the same equipment: including numerical coding of robot type, welding gun type, electrode rod type, controller type and number of electrode cap points; Time relationship Features: Based on historical equipment maintenance data, the maintenance cycle of each stud corresponding to the equipment is counted. The remaining life of the current equipment is calculated by combining the number of times the current equipment is used and the average number of times the equipment can be used based on historical equipment maintenance records. The remaining life is the ratio of the current number of times it is used to the average number of times it can be used, and is used as the time relationship feature between studs.

3. The welding quality detection method integrating the spatiotemporal characteristics of multiple stud welding according to claim 1 is characterized in that: In the step C, the following method is used: Step C1: Combine the graph data obtained in step B to obtain multiple node features, and dynamically calculate the similarity of any two node feature matrices; First, the cosine similarity S1 of the feature matrix of the two nodes and the DTW similarity S2 of the original sensor signals of the two nodes are calculated; then the spatial distance similarity kernel function parameters are constructed, and the node features are transformed by the kernel function to extract the fluctuation similarity features. Based on the data fluctuation similarity features extracted by the kernel function, the above calculations are repeated to obtain the cosine similarity S1 after the kernel function optimization. kernel and DTW similarity S2 after kernel function optimization kernel ; The final similarity is S1, S2, S1 kernel 、S2 kernel The mean of Step C2: Based on the final similarity obtained above, select the node relationships with the top α ratio of correlation, where α is the mask ratio, and participate in the model gradient descent optimization; Step C3: For each pair of strongly correlated relationships screened out, all features of one of the nodes are randomly masked, 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.

4. The welding quality detection method integrating the spatiotemporal characteristics of multiple stud welding according to claim 3 is characterized in that: In step C1, trainable kernel function parameters are introduced by constructing spatial distance similarity kernel function parameters. The kernel function parameters include kernel function type parameters and kernel function morphology parameters, which are specifically defined as follows: The kernel function type uses a combination of Gaussian kernel function and polynomial kernel function: The Gaussian kernel function expression is: ; The polynomial kernel function expression is: ; Among them, x and y represent node feature vectors; the bandwidth parameter of the Gaussian kernel is σ , the coefficients of the polynomial kernel γ , constant term c and order d is a trainable parameter; During kernel function transformation, Gaussian kernel and polynomial kernel transformation are applied to the node feature vector x respectively, and the transformed results are concatenated as the node features after kernel function transformation; the final similarity is obtained by repeated calculation based on the transformed features. .

5. The welding quality detection method integrating the spatiotemporal characteristics of multiple stud welding according to claim 4 is characterized in that: In step C2, a model gradient descent collaborative optimization mechanism is designed, and the model parameter collaborative optimization takes the cross entropy loss function as the optimization target: ;in, is the true label, is the prediction probability, L represents the error between the model prediction result and the actual quality result of stud welding, N represents the amount of data involved in training or iteration, i represents a certain welding, and the update path of each parameter is as follows: (1) Kernel function parameter update: Kernel function parameters σ, γ, c, d The gradient of the final similarity is S final Back propagation is obtained; through the chain rule, S final The partial derivative of the kernel function parameters affects the node relevance screening, which in turn acts on the adjacency matrix construction of the GCN-AutoMask model. During the gradient descent process, the Adam optimizer dynamically adjusts the parameters to adapt the kernel function to the feature distribution under different working conditions. (2) Adjacency matrix optimization: The adjacency matrix of the GCN-Automask model is constructed based on the strong correlation of the first α ratios screened. 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 prioritize retaining node relationships that contribute significantly to the prediction results; (3) Dynamic adjustment of mask ratio: The mask ratio α is initially adaptively adjusted according to 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 increasing direction to incorporate more potential correlations; when the overfitting risk increases, α is adjusted in the decreasing direction to strengthen the core relationship, and finally stabilized convergence is achieved through the learning rate decay strategy.

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

  • Mask-masked transverse federal heterogeneous graph learning method and device

    CN119761410A