Resistance spot welding nugget diameter prediction method, device, equipment and storage medium

CN122595775APending Publication Date: 2026-08-18ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610461037.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-09
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

然而,该方法存在检测周期长和成本高的问题

Benefits of technology

[0015]The aforementioned method, apparatus, computer equipment, and storage medium for predicting the weld nugget diameter in resistance spot welding collect current and resistance data during the welding process. Current data reflects the magnitude and stability of the welding energy input, providing an energy basis for the weld nugget diameter. Resistance data reflects the melting status of the weld point and the formation process of the weld nugget, showcasing the internal physical processes of the weld point. By extracting key local features from both data using a convolutional neural network and extracting temporal features using a gated recurrent unit network, and then fusing these features, a multi-level feature fusion is achieved. This allows for a more comprehensive capture of key features related to the weld nugget diameter, avoiding errors caused by manual measurement. Furthermore, the trained weld nugget diameter prediction model directly outputs the predicted weld nugget diameter without the need for destructive testing, saving detection costs and eliminating the need for manual measurement, thus improving the prediction efficiency and accuracy of the weld nugget diameter.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122595775A_ABST
    Figure CN122595775A_ABST
Patent Text Reader

Abstract

The application relates to a nugget diameter prediction method and device for resistance spot welding, computer equipment and a storage medium. The foregoing method comprises the following steps: acquiring welding process parameters of a to-be-detected welding spot, the welding process parameters comprising current data and resistance data at multiple sampling time points; performing sliding window processing on the welding process parameters; performing feature extraction on the data of each window obtained through the sliding window processing by using a convolutional neural network to obtain first feature data; performing time sequence feature extraction on the welding process parameters by using a gated recurrent unit network to obtain second feature data; performing feature fusion on the first feature data and the second feature data; and inputting the fused feature data into a pre-trained nugget diameter prediction model to obtain a nugget diameter prediction result of the to-be-detected welding spot. The method can improve the prediction efficiency of the nugget diameter prediction result and save costs without destructive detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of spot welding quality monitoring technology, and in particular to a method, apparatus, equipment and storage medium for predicting the weld nugget diameter in resistance spot welding. Background Technology

[0002] The body-in-white is a crucial component of an automobile, providing structural support and safety assurance for the entire vehicle. Among the various joining processes in body-in-white manufacturing, resistance spot welding has become one of the most widely used joining processes in mass production due to its significant advantages of high efficiency and low cost. However, the weld nugget growth process can be altered by uncertain factors such as material surface condition, electrode wear, and the gap between sheet metal parts, leading to fluctuations in weld quality.

[0003] Currently, post-weld destructive testing is commonly used in production sites to inspect weld joint quality. This involves manually measuring the weld nugget dimensions of randomly selected weld joints to indirectly assess the overall quality of the current batch of weld joints. However, this method suffers from long testing cycles and high costs. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, and storage medium for predicting the weld nugget diameter of resistance spot welding, which can improve the efficiency of weld nugget diameter prediction and save detection costs, in response to the above-mentioned technical problems.

[0005] In a first aspect, this application provides a method for predicting the weld nugget diameter in resistance spot welding, including: The welding process parameters of the weld joint to be tested are obtained, including current data and resistance data at multiple sampling times. The welding process parameters are processed by a sliding window, and the first feature data is obtained by extracting features from the data of each window obtained by the sliding window processing using a convolutional neural network. The welding process parameters are extracted using a gated recurrent unit network to obtain the second feature data; The first feature data and the second feature data are fused together, and the fused feature data is input into a pre-trained weld nugget diameter prediction model. The feature mapping is performed through the fully connected layer of the weld nugget diameter prediction model to obtain the weld nugget diameter prediction result of the weld point to be tested.

[0006] In one embodiment, the method for predicting the weld nugget diameter in resistance spot welding further includes: The third feature data is extracted based on the welding process parameters. The third feature data includes one or more of the following: the resistance value corresponding to the key sampling moment, the energy consumption value and resistance difference corresponding to different welding stages, the total energy consumption value, and the maximum welding current. Methods for predicting the weld nugget diameter in resistance spot welding also include: The feature data obtained by fusing the first and second feature data is dimensionality reduced and then fused with the third feature data. The fused feature data is input into a pre-trained weld nugget diameter prediction model, including: The feature data obtained by fusing the first feature data, the second feature data, and the third feature data is input into the weld nugget diameter prediction model.

[0007] In one embodiment, the method for predicting the weld nugget diameter in resistance spot welding further includes, before applying sliding window processing to the welding process parameters: The welding process parameters are normalized and masked to obtain a mask sequence. Temporal features of welding process parameters are extracted using a gated recurrent unit network to obtain second feature data, including: Temporal features of the mask sequence are extracted using a gated recurrent unit network to obtain the second feature data.

[0008] In one embodiment, the gated loop unit network includes a preset number of gated loop unit layers. The gated loop unit network is used to extract temporal features of welding process parameters to obtain second feature data, including: The welding process parameters at each time step are processed by the reset gate and update gate in the gated loop unit layer to obtain the hidden state data corresponding to each time step, where each time step corresponds to a sampling time. The number of effective time steps in the welding process parameters is determined based on the mask sequence; Based on the number of effective time steps, the hidden state data corresponding to the last effective time step in the output of the last gated recurrent unit layer is obtained, thus obtaining the second feature data.

[0009] In one embodiment, a first feature data is obtained by using a convolutional neural network to extract features from the data of each window obtained through sliding window processing, including: The welding process parameters are sequentially processed by using convolutional layers, random deactivation layers, and max pooling layers of a convolutional neural network for feature extraction and dimensionality reduction. The first feature data is obtained by performing feature mapping on the dimensionality-reduced data through the average pooling layer of a convolutional neural network.

[0010] In one embodiment, the method for predicting the weld nugget diameter in resistance spot welding further includes: The first feature data is input into the attention network, and the attention weights of each sliding window are calculated through the attention network. The feature data corresponding to each sliding window are weighted and summed according to the attention weight of each sliding window, and the fourth feature data is determined based on the result of the weighted summation and the total number of sliding windows. Feature fusion is performed on the first feature data and the second feature data, including: The fourth feature data, the first feature data, and the second feature data are fused.

[0011] In one embodiment, feature fusion of the first feature data and the second feature data includes: Determine the average and standard deviation of the feature data for each window based on the first feature data; The weighted average feature data is determined based on the average and standard deviation of the feature data from each window. The weighted average feature data is fused with the second feature data.

[0012] Secondly, this application provides a device for predicting the weld nugget diameter in resistance spot welding, comprising: The acquisition module is used to acquire the welding process parameters of the weld joint under test. The welding process parameters include current data and resistance data at multiple sampling times. The first extraction module is used to perform sliding window processing on the welding process parameters, and to use a convolutional neural network to extract features from the data of each window obtained by the sliding window processing to obtain the first feature data. The second extraction module is used to extract the temporal features of welding process parameters using a gated recurrent unit network to obtain the second feature data. The prediction module is used to fuse the first feature data and the second feature data, and input the fused feature data into a pre-trained weld nugget diameter prediction model. The feature mapping is performed through the fully connected layer of the weld nugget diameter prediction model to obtain the weld nugget diameter prediction result of the weld point to be tested.

[0013] Thirdly, this application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the resistance spot welding weld nugget diameter prediction method provided in any embodiment of this application in the first aspect.

[0014] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the resistance spot welding weld nugget diameter prediction method provided in any embodiment of the first aspect of this application.

[0015] The aforementioned method, apparatus, computer equipment, and storage medium for predicting the weld nugget diameter in resistance spot welding collect current and resistance data during the welding process. Current data reflects the magnitude and stability of the welding energy input, providing an energy basis for the weld nugget diameter. Resistance data reflects the melting status of the weld point and the formation process of the weld nugget, showcasing the internal physical processes of the weld point. By extracting key local features from both data using a convolutional neural network and extracting temporal features using a gated recurrent unit network, and then fusing these features, a multi-level feature fusion is achieved. This allows for a more comprehensive capture of key features related to the weld nugget diameter, avoiding errors caused by manual measurement. Furthermore, the trained weld nugget diameter prediction model directly outputs the predicted weld nugget diameter without the need for destructive testing, saving detection costs and eliminating the need for manual measurement, thus improving the prediction efficiency and accuracy of the weld nugget diameter. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating the method for predicting the weld nugget diameter in resistance spot welding in some embodiments; Figure 2 This is a schematic diagram of the resistance data changing over time in some embodiments; Figure 3 This is a schematic diagram illustrating the process of fusing feature data in some embodiments; Figure 4 This is a structural block diagram of a weld nugget diameter prediction device for resistance spot welding in some embodiments; Figure 5 This is a diagram showing the internal structure of a computer device in some embodiments. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0018] In a first aspect, this application provides a method for predicting the weld nugget diameter in resistance spot welding, such as... Figure 1 As shown, the method is applied to a server as an example, and includes the following steps: Step S11: Obtain the welding process parameters of the weld point to be tested. The welding process parameters include current data and resistance data at multiple sampling times.

[0019] Resistance spot welding refers to a welding method in which two or more workpieces to be welded are placed between upper and lower electrodes, pressure is applied through the electrodes and welding current is conducted, and the metal is melted by the resistance heat generated at the contact interface and inside the workpiece to form a weld nugget, which is then cooled to form a weld spot.

[0020] The weld nugget diameter refers to the effective diameter of the weld nugget formed by the cooling and solidification of molten metal at the workpiece interface after welding. It is a key indicator reflecting the weld strength and welding quality.

[0021] The solder joint to be tested refers to a single resistance spot weld joint that requires quality assessment and prediction of the weld nugget diameter. There can be one or more solder joints to be tested.

[0022] Welding process parameters refer to dynamic process parameters collected during resistance spot welding that reflect the welding state and the formation process of the weld nugget, specifically including current data and resistance data.

[0023] Current data refers to the welding current values ​​that flow through the welding circuit and the weld point to be tested at various sampling times during resistance spot welding, collected at a preset sampling frequency.

[0024] Resistance data refers to the resistance value of the welded area of ​​the weld point under test at various sampling times, calculated based on the collected voltage and current signals during the resistance spot welding process.

[0025] Specifically, this application can collect the current and voltage data of the upper and lower electrodes of the welding gun of the welding equipment, and calculate the resistance data in the welding process parameters. The current data of the upper and lower electrodes of the welding gun of the welding equipment is the current data in the welding process parameters.

[0026] Step S12: Perform sliding window processing on the welding process parameters, and use a convolutional neural network to extract features from the data of each window obtained by the sliding window processing to obtain the first feature data.

[0027] Among them, sliding window processing refers to the process of segmenting the sequence of welding process parameters arranged in chronological order according to a preset window length and sliding step size to obtain multiple continuous data windows. This is used to divide long time-series parameters into local data segments suitable for convolution feature extraction.

[0028] A Convolutional Neural Network (CNN) is a type of feedforward neural network and one of the core models in deep learning. Through a hierarchical structure of convolutional layers, pooling layers, and fully connected layers, it automatically extracts local features from input data, progressively compresses information, reduces redundancy, and improves generalization ability. In this application, the convolutional neural network can specifically be a 1D CNN (1D Convolutional Neural Network) used to extract local waveform features, inflection point features, and trend features from welding process parameters.

[0029] The data in each window refers to the combination of current and resistance data within each window over a corresponding period of time after being segmented by a sliding window. It is the input unit of the convolutional neural network.

[0030] The first feature data refers to the feature data output by a one-dimensional convolutional neural network after extracting local features from the data of each window. It is used to characterize the local features of welding process parameters such as waveform, amplitude, and rate of change in a local time segment, providing a local feature basis for subsequent feature fusion.

[0031] Specifically, this application constructs a sequence of current data and a sequence of resistance data at various sampling times. Sliding window processing is then applied to these two sequences according to a preset window length and sliding step, resulting in multiple local data windows. The data from each window is input into a pre-constructed or trained convolutional neural network. Local features are extracted from the data in each window using the convolutional and pooling layers of the one-dimensional convolutional neural network, and the corresponding local features are output.

[0032] The local features extracted from all windows are integrated to obtain the first feature data.

[0033] Step S13: Use a gated recurrent unit network to extract the temporal features of the welding process parameters to obtain the second feature data.

[0034] Among them, the gated recurrent unit network is a network composed of gated recurrent units (GRUs). A gated recurrent unit is a recurrent neural network unit with a gating mechanism, used to extract time-dependent features and dynamic change patterns in time-series data.

[0035] Time-series feature extraction learns and extracts time-series-related features such as dependencies, trends, and phased patterns from current and resistance data arranged in chronological order.

[0036] The second feature data is the feature data obtained by extracting the temporal features of the welding process parameters from the gated recurrent unit network. It is used to characterize the temporal dependency of the resistance data sequence and the current data sequence throughout the welding process.

[0037] Specifically, this application can input welding process parameters into a pre-trained gated recurrent unit network, learn the temporal features of the welding process parameters through the gated recurrent unit network, capture the correlation and dynamic change patterns between different sampling times, and use the hidden layer features output by the gated recurrent unit network as the second feature data.

[0038] Step S14: The first feature data and the second feature data are fused together, and the fused feature data is input into the pre-trained weld nugget diameter prediction model. The weld nugget diameter prediction result of the weld point to be tested is obtained by feature mapping through the fully connected layer of the weld nugget diameter prediction model.

[0039] The weld nugget diameter prediction model is a deep learning model that takes current and resistance data during the welding process as input and weld nugget diameter as output. It is pre-trained with welding process parameters of weld point samples and is used to predict the weld nugget diameter of resistance spot welding.

[0040] Feature fusion refers to the operation of concatenating the first feature data extracted by the convolutional neural network with the second feature data extracted by the gated recurrent unit network to form a fused feature containing multi-dimensional information.

[0041] A fully connected layer refers to a network layer in the weld nugget diameter prediction model, where each neuron is connected to all neurons in the previous layer, and is used to perform nonlinear transformation and integration on the fused features.

[0042] Feature mapping refers to the process of weighting, biasing, and nonlinearly transforming fused features through a fully connected layer to map the high-dimensional feature space to the numerical space of weld nugget diameter, thereby outputting the predicted weld nugget diameter.

[0043] The weld nugget diameter prediction result is a numerical or classification result output by the weld nugget diameter prediction model, which characterizes the size of the weld nugget diameter of the weld point to be tested and can be used to evaluate the weld point quality.

[0044] Specifically, this application fuses the first feature data output by the convolutional neural network with the second feature data output by the gated recurrent unit network to obtain fused feature data containing local detail features and global temporal features. This fused feature data is then input into a pre-trained weld nugget diameter prediction model. The model uses fully connected layers to perform feature mapping on the fused features, transforming the high-dimensional features into a weld nugget diameter prediction result, ultimately yielding the predicted weld nugget diameter of the weld point to be tested. Specifically, the weld nugget diameter prediction model pre-establishes a mapping relationship between the feature data of the weld point and its diameter, and based on this mapping relationship, the fused features are transformed into a weld nugget diameter prediction result.

[0045] In one embodiment, the method for predicting the weld nugget diameter of resistance spot welding may further include: extracting third feature data based on welding process parameters. The third feature data includes one or more of the following: resistance value corresponding to key sampling time, energy consumption value corresponding to different welding stages, resistance difference, total energy consumption value, and maximum welding current. The method for predicting the weld nugget diameter of resistance spot welding may further include: performing dimensionality reduction processing on the feature data obtained by fusing the first feature data and the second feature data, and then fusing it with the third feature data. The fused feature data is then input into a pre-trained weld nugget diameter prediction model, including: inputting the feature data obtained by fusing the first feature data, the second feature data, and the third feature data into the weld nugget diameter prediction model.

[0046] The third feature data refers to the process features related to welding energy, current intensity, and dynamic resistance changes extracted from the welding process parameters during resistance spot welding.

[0047] Key sampling moments can include the moment when the resistance reaches a local minimum, the moment when the resistance reaches a local peak, and the moment when welding ends. Different welding stages refer to the time intervals between each key sampling moment, constituting different welding stages. Total energy consumption refers to the total energy consumption during the entire welding process.

[0048] The maximum welding current refers to the maximum welding current during the entire welding process.

[0049] Specifically, this application can construct a curve of resistance changing over time based on the resistance data at each sampling time. Please refer to... Figure 2 , Figure 2 This is a schematic diagram showing the resistance changing over time in one embodiment. Figure 2 The horizontal axis represents time in milliseconds, and the vertical axis represents resistance in microohms. Figure 2 Points A, B, and C in the diagram represent critical inflection points, and the time corresponding to each critical inflection point is the critical sampling moment. The energy consumption values ​​for different welding stages include the energy consumption values ​​for stages AB and BC. For example... Figure 2 As shown, in the initial stage of welding, the gap between the plates gradually narrows under the action of electrode pressure. At point A, the resistance reaches a local minimum value, and the plates are tightly bonded. As the energizing time increases, the metal inside the plates gradually molten. At the local peak point B, the weld nugget is formed as a whole. The BC stage is the main stage for the growth and formation of the weld nugget, and the resistance value gradually decreases. Point C represents the end of welding.

[0050] The third feature data in this application may specifically include the resistance value, time value, and energy consumption value corresponding to the key inflection point. Specifically, such as... Figure 2As shown, the third characteristic data may specifically include the resistance values ​​and time values ​​at points A, B, and C, the resistance difference at stage BC, the energy consumption at stage AB, the energy consumption at stage BC, the total energy consumption, and the maximum welding current.

[0051] Specifically, this application can fuse the pre-obtained first feature data with the second feature data; then perform dimensionality reduction on the fused high-dimensional features. The dimensionality-reduced fused features are then fused again with the third feature data. Finally, the fused feature data is input into a pre-trained weld nugget diameter prediction model to obtain the weld nugget diameter prediction result.

[0052] The beneficial effect of this embodiment is that by fusing the first and second feature data for dimensionality reduction and then fusing them with the third feature data, the solution can be applied to small sample scenarios. By injecting domain prior knowledge into the third feature data, the problem of overfitting in deep learning methods in small sample scenarios is solved, and high prediction accuracy can still be maintained under small sample conditions, significantly reducing the dependence on large batches of labeled samples.

[0053] In one embodiment, before performing sliding window processing on the welding process parameters, the method for predicting the weld nugget diameter of resistance spot welding may further include: normalizing and masking the welding process parameters to obtain a mask sequence, and using a gated recurrent unit network to extract temporal features from the welding process parameters to obtain second feature data, including: using a gated recurrent unit network to extract temporal features from the mask sequence to obtain second feature data.

[0054] Normalization refers to mapping the numerical range of the original welding process parameters to a unified standard interval [0, 1] to eliminate the influence of differences in physical dimensions and numerical magnitudes, making the model training more stable and convergent faster.

[0055] Masking refers to the process of generating a binary mask sequence of the same length as the sequence of welding process parameters. The mask corresponding to the real data is 1, while the mask corresponding to the filler data is 0. The mask sequence is used to mark which positions in the sequence are valid data and which are invalid or filler data, so that the model can automatically ignore the invalid parts in subsequent processing.

[0056] A mask sequence is a sequence of welding process parameters obtained after normalization and masking.

[0057] Specifically, this application can perform normalization, masking, and sliding window processing on current and resistance data. Normalization refers to scaling the data to the range of [0, 1] using max-min normalization to eliminate the influence of different data dimensions. Since different sample data have inconsistent lengths, they need to be unified to a fixed length N. If the sample length is greater than N, the excess portion is truncated; if the sample length is less than N, masking is performed, filling the gaps with 0 values, and then creating a mask. The mask corresponding to the actual data is 1, while the mask corresponding to the filled data is 0. The length of all sample data used is unified to N. Sliding window processing is performed on the normalized and masked current and resistance data according to the set window size L1 and step size S, respectively, to obtain M subsequences, where M is calculated using the following formula: (1) Where M represents the number of windows, L1 represents the window size, i.e. the number of sampling points contained in each window, and S represents the sliding step size.

[0058] The current and resistance data processed by the sliding window are further merged into dual-channel data [2, M] to obtain the data for each window, forming a sliding window dataset. The data for each window is then input into a convolutional neural network to obtain the first feature data. The resulting mask sequence is then input into a gated recurrent unit network to obtain the second feature data.

[0059] The beneficial effects of this embodiment are: normalization eliminates the influence of different parameters' dimensions; masking solves the problem of inconsistent welding process durations; and through padding and masking, the model can handle welding process parameter sequences of arbitrary length, while marking invalid information to avoid interference from padding data on feature extraction.

[0060] In one embodiment, the gated recurrent unit network includes a preset number of gated recurrent unit layers. The gated recurrent unit network is used to extract the temporal features of the welding process parameters to obtain the second feature data. This includes: processing the welding process parameters at each time step through reset gates and update gates in the gated recurrent unit layers to obtain the hidden state data corresponding to each time step. Each time step corresponds to a sampling time. The number of valid time steps in the welding process parameters is determined according to the mask sequence. The hidden state data corresponding to the last valid time step in the output result of the last gated recurrent unit layer is obtained according to the number of valid time steps to obtain the second feature data.

[0061] Among them, the gated recurrent unit network is a type of recurrent neural network that processes time-series data and adaptively extracts time-dependent features through a gating mechanism.

[0062] A Gated Recurrent Unit (GRU) is the basic unit that makes up a GRU network. It controls information transmission through reset and update gates. The reset gate controls the degree to which historical information is forgotten, determining how much of the past hidden state is discarded. The update gate controls the degree to which new information is retained, determining the fusion ratio between historical and current information. A time step refers to the sampling time corresponding to each sampling point in the time-series data.

[0063] A valid time step refers to a time step in the mask sequence that is marked as valid data, which is different from an invalid time step generated by padding.

[0064] Hidden state data refers to the temporal feature vector output by the gated loop unit at each time step, which contains feature information of the current time and historical time.

[0065] Specifically, the gated recurrent unit network consists of two unidirectional GRU layers, with the output of the first GRU serving as the input to the second GRU. The input data dimension of the gated recurrent unit network can be [batch_size, 2, L2], where batch_size represents the number of samples processed at one time, 2 represents that the data to be processed is dual-channel, i.e., current data and resistance data, and L2 represents the length of the entire mask sequence, i.e., the number of sampling points in the entire mask sequence. The single-layer GRU uses a reset gate r... t With Update Gate z t For the data x at the t-th time step of the mask sequence t The processing is performed using the following formula: (2) Among them, W Z W r W h Z represents the weight. t Represents the update gate, r t This represents the reset gate, and σ represents the Sigmoid activation function. Represents candidate hidden state data, This represents the hidden state data in the final output. x represents the hidden state data corresponding to the (t-1)th time step. t This represents the data at time step t in the mask sequence.

[0066] After the first layer of GRU processes the input data according to the above formula (2), hidden state data of dimension hidden_size is generated for each time step. The output data dimension of the first layer of GRU is [batch_size, hidden_size, L2], where hidden_size represents the number of hidden layer neurons in GRU, that is, the dimension of the output hidden state data.

[0067] Further, the second-layer GRU reads the output of the first-layer GRU, processes the input data according to the above formula (2), and outputs the hidden state data corresponding to each time step. The output data dimension is [batch_size, hidden_size, L2]. After the second-layer GRU finishes processing all time steps, it calculates the number of valid time steps in the welding process parameters through the mask sequence, that is, the number of sampling points in the mask sequence. Then, it extracts the hidden state data of the last valid time step from the output of the second-layer GRU to obtain the second feature data. The last valid time step refers to the last valid sampling time in the mask sequence, excluding the filling sampling time.

[0068] The final output dimension of the second feature data is [batch_size, hidden_size]. If hidden_size is set to 8, then the dimension of the second feature data is [batch_size, 8], which means that batch_size samples are processed at one time, and each sample takes 8-dimensional features.

[0069] To prevent overfitting, the hidden layer dropout (random inactivation rate) can be set to 0.1, which means that 10% of the neurons between the output of the first GRU layer and the input of the second GRU layer are randomly set to 0, forcing the model to not rely on specific neuron connections and improving robustness.

[0070] The beneficial effect of this embodiment is that by accurately capturing the long-term dependence of welding timing through reset gates and update gates, and by using only effective time steps in the mask sequence, interference from padding data can be eliminated.

[0071] In one embodiment, the first feature data is obtained by using a convolutional neural network to extract features from the data of each window obtained by the sliding window processing. This includes: sequentially performing feature extraction and dimensionality reduction processing on the welding process parameters through the convolutional layer, random deactivation layer and max pooling layer of the convolutional neural network, and performing feature mapping on the dimensionality-reduced data through the average pooling layer of the convolutional neural network to obtain the first feature data.

[0072] The convolutional layer is used to perform local sliding convolution operations on the time-series data of the input welding process parameters through the convolution kernel. This is used to extract local change features, inflection point features, and waveform morphology features of the current and resistance data, resulting in a high-dimensional local feature map.

[0073] The random deactivation layer (Dropout layer) randomly sets the output of some neurons to 0 during model training, so that the network does not rely too much on certain neurons, suppresses overfitting, and improves the model's ability to generalize to different welding conditions.

[0074] Max pooling layers are used to extract the maximum value of the convolutional feature map by region, which reduces the feature dimension and computational cost while preserving the most salient local features.

[0075] The average pooling layer is used to average the features after max pooling by region, thereby achieving global feature smoothing and feature mapping.

[0076] Specifically, the specific network structure of the convolutional neural network consists of convolutional layer 1, dropout layer, max pooling layer 1, convolutional layer 2, dropout layer, max pooling layer 2, convolutional layer 3, dropout layer, max pooling layer 3, and a one-dimensional average pooling layer. The kernel size of each convolutional layer can be 5, and the stride can be 1. A random deactivation layer is placed after each convolutional layer. This random deactivation layer randomly sets the output of some neurons in the output of the current convolutional layer to 0 with a preset deactivation probability, thereby suppressing network overfitting and improving the model's generalization ability and prediction stability.

[0077] The beneficial effect of this embodiment is that the various layers of the convolutional neural network can adaptively extract the local waveform features, inflection point features and changing trends of the spot welding current and resistance signals, accurately reflect the physical changes in the weld nugget formation process, and enable the first feature data to more accurately reflect the intrinsic relationship between welding quality and weld nugget diameter, thereby improving the final prediction accuracy.

[0078] In one embodiment, the method for predicting the weld nugget diameter of resistance spot welding may further include: inputting first feature data into an attention network, calculating the attention weight of each sliding window through the attention network, performing a weighted summation of the feature data corresponding to each sliding window based on the attention weight of each sliding window, determining fourth feature data based on the result of the weighted summation and the total number of sliding windows, and performing feature fusion of the first feature data and the second feature data, including: performing feature fusion of the fourth feature data, the first feature data and the second feature data.

[0079] The attention network is mainly used to evaluate the importance of each sliding window and to aggregate the window features in a weighted manner based on their importance.

[0080] Attention weights are obtained by normalizing the attention scores assigned to the features corresponding to each sliding window by the attention network, and are used to quantify the importance of each sliding window feature to the prediction of weld nugget diameter.

[0081] The fourth feature data is the weighted average feature data obtained by inputting the first feature data into the attention network, performing weighted summation according to the attention weights corresponding to each sliding window, and normalizing the total number of sliding windows. It is used to characterize the importance of different sliding window features to the prediction of weld nugget diameter.

[0082] Specifically, the input to the attention network is the output data of the convolutional neural network. First, the attention network calculates the attention score for each window. The attention network structure includes multiple layers, namely a fully connected layer, a Tanh activation layer (Hyperbolic Tangent Activation Layer), and a fully connected layer. The fully connected layer increases the dimensionality to enrich the feature representation capability, the Tanh activation layer introduces non-linearity to explore complex feature relationships, and the fully connected layer reduces the dimensionality of the output to generate the attention score.

[0083] The attention network output dimension can be [batch_size, M, 1], where batch_size represents the number of samples processed at one time, M represents the number of windows, and 1 represents a 1-dimensional attention score. The scores for each sample across the M windows are [m1, m2, ..., m]. M Next, the attention scores of each window are softmax normalized, and the score of each window is scaled to the [0,1] interval to obtain the attention weight. The larger the attention weight, the more important the current window is. The scaling calculation formula is as follows: (3) in, Let represent the sequence of attention weight masks for each window, where p represents the p-th sliding window, and q is the traversal index in the summation symbol, representing each window from the 1st to the Mth window, used to sum the scores of all windows. This represents the p-th window.

[0084] Furthermore, the first feature data output by the convolutional neural network is multiplied by the corresponding attention weights. For windows with higher attention weights, the corresponding feature data is magnified; for windows with lower attention weights, the corresponding feature data is shrunk. Then, the weighted feature data is summed according to the window dimension and divided by the total number of windows to obtain the fourth feature data. The dimension of the fourth feature data is [batch_size, 8]. This achieves the fusion of multi-window features with dimension [batch_size, M, 8] into feature data with dimension [batch_size, 8], which is consistent with the dimension of the second feature data, facilitating data fusion.

[0085] Furthermore, the first feature data, the second feature data, and the fourth feature data are fused together to reduce the dimensionality, and the dimensionality-reduced data is then fused with the third feature data. Finally, the fused feature data is input into the weld nugget diameter prediction model.

[0086] Please refer to Figure 3 , Figure 3This is a schematic diagram illustrating the process of fusing various feature data in one embodiment. Figure 3 In this process, the data obtained after sliding window processing is input into a convolutional neural network (such as 1DCNN). The output data of the convolutional neural network is fed into an attention network, which outputs the fourth feature data. Additionally, the mask sequence is input into a gated recurrent unit (GRU) network, which ultimately outputs the second feature data. GRU 1 is the first layer of GRUs, and GRU 2 is the second layer. Further, the first, second, and fourth feature data are fused and then dimensionality-reduced. The dimensionality-reduced result is then fused again with the third feature data. This fused feature data is then input into the weld nugget diameter prediction model to obtain the weld nugget diameter prediction result.

[0087] The beneficial effect of this embodiment is that it uses an attention network to identify key sliding windows that have a greater impact on the weld nugget diameter, thereby enhancing effective information and improving model accuracy.

[0088] In one embodiment, feature fusion of the first feature data and the second feature data includes: determining the average value and standard deviation of the feature data of each window based on the first feature data; determining the weighted average feature data of the feature data of each window based on the average value and standard deviation of the feature data of each window; and fusing the weighted average feature data with the second feature data.

[0089] The average value of the feature data of each window refers to the feature data obtained by averaging the first feature data across the sliding window dimension, which is used to reflect the overall central tendency of the feature data of each window.

[0090] The standard deviation of the feature data for each window refers to the feature data obtained by calculating the standard deviation of the first feature data along the sliding window dimension, which is used to reflect the dispersion and fluctuation characteristics of the feature data for each window.

[0091] The weighted average feature data of each window refers to the feature data obtained by weighting and fusing the average value and standard deviation according to preset weights. It is used to simultaneously fuse the central tendency and dispersion of features to enhance the feature expressive power.

[0092] The data dimension obtained after sliding window processing can be [batch_size, M, 2, L1], where batch_size represents the number of samples processed at one time, M represents the number of windows, 2 represents two data channels, namely current data and resistance data, and L1 represents the window size, that is, the number of sampling points contained in each window.

[0093] The data obtained after sliding window processing is input into the convolutional neural network. Therefore, the input data dimension of the convolutional neural network is [batch_size, M, 2, L1]. After 3 layers of convolution and adaptive average pooling, the output first feature data dimension is [batch_size, M, 8], where 8 represents that each window extracts 8-dimensional features.

[0094] Furthermore, the mean and standard deviation of the first feature data with dimensions [batch_size, M, 8] are calculated according to the window dimension, and the weighted average feature data are obtained by fusing the mean and standard deviation of the first feature data. The specific fusion formula is as follows: cnn_features = W1 * mean_features + W2 * std_features (4) Wherein, cnn_features represents the weighted average feature data, mean_features represents the mean of the feature data in the first feature data, std_features represents the standard deviation of the feature data in the first feature data, W1 is the weight of the mean, which can be set to 0.9, and W2 is the weight of the standard deviation, which can be set to 0.1.

[0095] After fusion using formula (4), the dimension of the first feature data is transformed from [batch_size, M, 8] to [batch_size, 8]. The transformed dimension is consistent with the dimensions of the second and fourth feature data, which are both [batch_size, 8], so as to facilitate feature fusion of the transformed first feature data, fourth feature data and second feature data. Here, batch_size can be set to 8.

[0096] In one embodiment, before extracting the third feature data based on the welding process parameters, the method for predicting the weld nugget diameter of resistance spot welding further includes: using an SG filter to perform noise reduction processing on the welding process parameters.

[0097] Among them, the SG filter (Savitzky-Golay filter) is a time-domain digital smoothing filter. Its core principle is to perform polynomial least squares fitting on local data within a sliding window, and replace the original data with the value of the fitted polynomial at the center of the window to achieve noise reduction and smoothing, while preserving key features of the signal such as peaks, inflection points, and shapes to the greatest extent.

[0098] In this application, since there is noise information in the production process, SG filtering is used to perform noise reduction processing before feature extraction.

[0099] The SG filter principle is based on local polynomial least squares fitting. For the original dynamic resistance data sequence R(i), where i = 0, 1, 2, ..., n-1 (n is the total number of data points, and R(i) represents the dynamic resistance value at time i), the SG filter window length is set to 5, and the polynomial order is set to 2. The fitted value of the dynamic resistance at time i is... The calculation formula is as follows: (5) in, Let represent the dynamic resistance fitting value at time i, where i represents the i-th time at which the fitting value is to be calculated, j is the summation index, representing the offset from -k to +k within the window centered at i, and c j The weights are determined by the window length and the polynomial stage, R. i+j This represents the dynamic resistance value at time i+j, and the value of k can be set to 2.

[0100] In a second aspect, this application provides a device for predicting the weld nugget diameter in resistance spot welding, such as... Figure 4 As shown, the resistance spot welding weld nugget diameter prediction device includes: an acquisition module 41, a first extraction module 42, a second extraction module 43, and a prediction module 44, wherein: The acquisition module 41 is used to acquire the welding process parameters of the weld joint to be tested. The welding process parameters include current data and resistance data at multiple sampling times. The first extraction module 42 is used to perform sliding window processing on the welding process parameters, and to use a convolutional neural network to extract features from the data of each window obtained by the sliding window processing to obtain the first feature data. The second extraction module 43 is used to extract the temporal features of welding process parameters using a gated recurrent unit network to obtain the second feature data. The prediction module 44 is used to fuse the first feature data and the second feature data, and input the fused feature data into the pre-trained weld nugget diameter prediction model. The feature mapping is performed through the fully connected layer of the weld nugget diameter prediction model to obtain the weld nugget diameter prediction result of the weld point to be tested.

[0101] In one embodiment, the first extraction module 42 can also extract third feature data based on welding process parameters. The third feature data includes one or more of the following: resistance value corresponding to a key sampling moment, energy consumption value corresponding to different welding stages, resistance difference, total energy consumption value, and maximum welding current. After dimensionality reduction, the feature data obtained by fusing the first feature data and the second feature data is fused with the third feature data. The prediction module 44 can input the feature data obtained by fusing the first feature data, the second feature data and the third feature data into the weld nugget diameter prediction model.

[0102] In one embodiment, the first extraction module 42 can also normalize and mask the welding process parameters to obtain a mask sequence, and the second extraction module 43 can use a gated recurrent unit network to extract the temporal features of the mask sequence to obtain second feature data.

[0103] In one embodiment, the gated loop unit network includes a preset number of gated loop unit layers. The second extraction module 43 can process the welding process parameters of each time step through the reset gate and update gate in the gated loop unit layer to obtain the hidden state data corresponding to each time step. Each time step corresponds to a sampling time. The number of valid time steps in the welding process parameters is determined according to the mask sequence. The hidden state data corresponding to the last valid time step in the output result of the last gated loop unit layer is obtained according to the number of valid time steps to obtain the second feature data.

[0104] In one embodiment, the first extraction module 42 can sequentially extract and reduce the welding process parameters through the convolutional layer, random deactivation layer and max pooling layer of the convolutional neural network, and perform feature mapping on the dimensionality-reduced data through the average pooling layer of the convolutional neural network to obtain the first feature data.

[0105] In one embodiment, the first extraction module 42 can input the first feature data into the attention network, calculate the attention weight of each sliding window through the attention network, perform a weighted summation of the feature data corresponding to each sliding window according to the attention weight of each sliding window, and determine the fourth feature data according to the result of the weighted summation and the total number of sliding windows. The prediction module 44 can perform feature fusion of the fourth feature data, the first feature data and the second feature data.

[0106] In one embodiment, the prediction module 44 can determine the average value and standard deviation of the feature data of each window based on the first feature data, determine the weighted average feature data based on the average value and standard deviation of the feature data of each window, and perform feature fusion with the weighted average feature data and the second feature data.

[0107] In a third aspect, this application provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the resistance spot welding weld nugget diameter prediction method provided in any embodiment of the first aspect of this application.

[0108] In one embodiment, the computer device may be a server, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for predicting the weld nugget diameter in resistance spot welding.

[0109] In a fourth aspect, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the resistance spot welding weld nugget diameter prediction method provided in any embodiment of the first aspect of this application.

[0110] The computer-readable storage medium may be Figure 5 The computer-readable storage medium in the computer device shown.

[0111] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0112] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0113] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for predicting the weld nugget diameter in resistance spot welding, characterized in that, The method includes: The welding process parameters of the weld joint to be tested are obtained, including current data and resistance data at multiple sampling times; The welding process parameters are processed using a sliding window, and the data from each window obtained by the sliding window processing are extracted using a convolutional neural network to obtain the first feature data. The welding process parameters are extracted using a gated recurrent unit network to obtain second feature data. The first feature data and the second feature data are fused together, and the fused feature data is input into a pre-trained weld nugget diameter prediction model. The weld nugget diameter prediction result of the weld nugget to be tested is obtained by feature mapping through the fully connected layer of the weld nugget diameter prediction model.

2. The method according to claim 1, characterized in that, The method further includes: The third feature data is extracted based on the welding process parameters. The third feature data includes one or more of the following: resistance value corresponding to the key sampling moment, energy consumption value and resistance difference corresponding to different welding stages, total energy consumption value, and maximum welding current. The method further includes: The feature data obtained by fusing the first feature data and the second feature data is dimensionality reduced and then fused with the third feature data; The step of inputting the fused feature data into a pre-trained weld nugget diameter prediction model includes: The feature data obtained by fusing the first feature data, the second feature data, and the third feature data is input into the weld nugget diameter prediction model.

3. The method according to claim 1, characterized in that, Before performing sliding window processing on the welding process parameters, the method further includes: The welding process parameters are normalized and masked to obtain a mask sequence; The second feature data, obtained by extracting temporal features from the welding process parameters using a gated recurrent unit network, includes: The second feature data is obtained by extracting temporal features from the mask sequence using a gated recurrent unit network.

4. The method according to claim 3, characterized in that, The gated loop unit network includes a preset number of gated loop unit layers. The second feature data, obtained by extracting temporal features of the welding process parameters using the gated loop unit network, includes: The welding process parameters of each time step are processed by the reset gate and update gate in the gated loop unit layer to obtain the hidden state data corresponding to each time step, wherein each time step corresponds to a sampling time. The number of valid time steps in the welding process parameters is determined based on the mask sequence; Based on the number of effective time steps, the hidden state data corresponding to the last effective time step in the output result of the last gated loop unit layer is obtained, and the second feature data is obtained.

5. The method according to claim 1, characterized in that, The first feature data is obtained by extracting features from the data of each window processed by the sliding window using a convolutional neural network, including: The welding process parameters are sequentially processed by the convolutional layer, random deactivation layer, and max pooling layer of the convolutional neural network to extract features and reduce dimensions. The first feature data is obtained by performing feature mapping on the dimensionality-reduced data through the average pooling layer of the convolutional neural network.

6. The method according to claim 1, characterized in that, The method further includes: The first feature data is input into the attention network, and the attention weights of each sliding window are calculated through the attention network. The feature data corresponding to each sliding window are weighted and summed according to the attention weights of each sliding window, and the fourth feature data is determined based on the weighted summation result and the total number of sliding windows. The feature fusion of the first feature data and the second feature data includes: The fourth feature data, the first feature data, and the second feature data are fused together.

7. The method according to claim 1, characterized in that, The feature fusion of the first feature data and the second feature data includes: The average value and standard deviation of the feature data for each window are determined based on the first feature data. The weighted average feature data is determined based on the average value and standard deviation of the feature data of each window. The weighted average feature data is fused with the second feature data.

8. A device for predicting the diameter of a weld nugget in resistance spot welding, characterized in that, The device includes: The acquisition module is used to acquire welding process parameters of the weld joint to be tested, including current data and resistance data at multiple sampling times; The first extraction module is used to perform sliding window processing on the welding process parameters, and to use a convolutional neural network to extract features from the data of each window obtained by the sliding window processing to obtain the first feature data. The second extraction module is used to extract the temporal features of the welding process parameters using a gated recurrent unit network to obtain the second feature data. The prediction module is used to fuse the first feature data and the second feature data, and input the fused feature data into a pre-trained weld nugget diameter prediction model. The weld nugget diameter prediction result of the weld nugget to be tested is obtained by feature mapping through the fully connected layer of the weld nugget diameter prediction model.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.