CN115238804A - Spot welding data filling method and device based on generation countermeasure network and storage medium - Google Patents

Spot welding data filling method and device based on generation countermeasure network and storage medium Download PDF

Info

Publication number
CN115238804A
CN115238804A CN202210905128.7A CN202210905128A CN115238804A CN 115238804 A CN115238804 A CN 115238804A CN 202210905128 A CN202210905128 A CN 202210905128A CN 115238804 A CN115238804 A CN 115238804A
Authority
CN
China
Prior art keywords
data
spot welding
standard
probability
welding data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210905128.7A
Other languages
Chinese (zh)
Inventor
陶志宏
何锡焕
刘祝托
郑世卿
庄树祥
邹见效
凡时财
苌洋
曾诚
李玥峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Higher Research Institute Of University Of Electronic Science And Technology Shenzhen
GAC Honda Automobile Co Ltd
Original Assignee
Higher Research Institute Of University Of Electronic Science And Technology Shenzhen
GAC Honda Automobile Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Higher Research Institute Of University Of Electronic Science And Technology Shenzhen, GAC Honda Automobile Co Ltd filed Critical Higher Research Institute Of University Of Electronic Science And Technology Shenzhen
Priority to CN202210905128.7A priority Critical patent/CN115238804A/en
Publication of CN115238804A publication Critical patent/CN115238804A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a spot welding data filling method, a spot welding data filling device and a storage medium based on a generated countermeasure network, wherein the method comprises the steps of acquiring standard spot welding data; calculating a forward time interval matrix and a backward time interval matrix corresponding to the standard spot welding data; inputting the standard spot welding data, the forward time interval matrix and the backward time interval matrix into a generator for generating a countermeasure network to generate complete time sequence data; judging according to a discriminator for generating the countermeasure network to obtain the true probability of the data; respectively constructing loss functions corresponding to the generator and the discriminator based on the data true probability, and performing iterative training until the loss functions are converged to obtain final spot welding data generated by the generator after training; and filling the missing value of the standard spot welding data according to the final spot welding data to obtain complete standard data, and carrying out inverse standardization on the complete standard data to obtain complete spot welding time sequence data. The method can improve the accuracy of filling missing values of spot welding data.

Description

Spot welding data filling method and device based on generation countermeasure network and storage medium
Technical Field
The invention relates to the technical field of welding, in particular to a spot welding data filling method and device based on a generated countermeasure network and a storage medium.
Background
At present, for a missing value of spot welding time sequence data, a method of directly discarding a missing sample is generally adopted, or a missing value filling method based on statistics, such as mean value filling and last observation value filling, is adopted, or a missing value filling method based on machine learning is adopted to directly fill the missing data.
However, the method of directly discarding reduces the number of samples, brings huge information loss, is not only not beneficial to monitoring spot welding process data, but also is not beneficial to establishing a spot welding quality evaluation model. The filling method based on statistics is small in calculation amount, only the overall statistical condition of data is considered, the individual condition of each data sample is not considered, and filling accuracy is low. In addition, the missing value filling method based on machine learning generally cannot directly fill the missing data on the premise of considering the time law of the time series data, and the direct filling method considering the time law also only uses the data at the time before the missing value to fill, does not consider the time series characteristics and the missing law at the time after, and has incomplete data utilization and lower filling accuracy.
In summary, the missing value filling method of spot welding time sequence data in the prior art does not completely utilize data, so that the filling accuracy is low, and monitoring of spot welding process data and establishment of a spot welding quality evaluation model are not facilitated.
Disclosure of Invention
The invention provides a spot welding data filling method, a spot welding data filling device and a storage medium based on a generated countermeasure network, which are used for fully utilizing time sequence information and missing characteristics of data, improving the accuracy of filling missing values of spot welding data and being beneficial to monitoring spot welding process data and establishing a spot welding quality evaluation model.
In a first aspect, to solve the above technical problem, the present invention provides a spot welding data padding method based on generation of a countermeasure network, including:
acquiring spot welding time sequence data in a spot welding process, and standardizing the spot welding time sequence data to obtain standard spot welding data;
calculating a forward time interval matrix and a backward time interval matrix corresponding to the standard spot welding data;
inputting the standard spot welding data, the forward time interval matrix and the backward time interval matrix into a generator for generating a countermeasure network to generate complete time sequence data;
judging according to a discriminator for generating the countermeasure network to obtain the true probability of the data;
respectively constructing loss functions corresponding to the generator and the discriminator based on the data true probability, and performing iterative training until the loss functions are converged to obtain final spot welding data generated by the trained generator;
and filling the missing value of the standard spot welding data according to the final spot welding data to obtain complete standard data, and carrying out inverse standardization on the complete standard data to obtain complete spot welding time sequence data.
Preferably, the calculating a forward time interval matrix and a backward time interval matrix corresponding to the standard spot welding data includes:
calculating each element in a mask matrix according to the standard spot welding data;
calculating to obtain each element in the forward time interval matrix and the backward time interval matrix according to each element in the mask matrix; wherein the backward time interval matrix is a transpose of the forward time interval matrix.
Preferably, the inputting the standard spot welding data, the forward time interval matrix and the backward time interval matrix into a generator for generating a countermeasure network, generating complete time series data includes:
inputting the standard spot welding data into a bidirectional gating filling circulation unit in the generator for forward and backward propagation to obtain t N-1 A forward memory vector and a backward memory vector of a moment;
stitching the forward memory vector and the backward memory vector into t N-1 The bidirectional memory vector of the moment is mapped into a middle vector with the same dimensionality as the standard spot welding data based on a fully-connected neural network;
taking the intermediate vector as an initial input vector of a one-way gating filling circulation unit in the generator, and obtaining N output vectors with the same dimension as the standard spot welding data through circulation;
and splicing the N output vectors according to a time sequence to obtain the complete time sequence data.
Preferably, the determining according to the determiner for generating the countermeasure network to obtain the data true probability includes:
calculating a random sampling value between the complete time sequence data and the standard spot welding data;
inputting the standard spot welding data, the complete time sequence data and the random sampling value into a discriminator for generating a countermeasure network to obtain a first probability, a second probability and a third probability; the first probability, the second probability and the third probability are respectively data true probabilities corresponding to the standard spot welding data, the complete time sequence data and the random sampling values.
Preferably, the inputting the standard spot welding data, the complete time series data, and the random sampling value into a discriminator for generating a countermeasure network to obtain a first probability, a second probability, and a third probability includes:
inputting the standard spot welding data, the complete time sequence data and the random sampling value into a bidirectional gating filling circulation unit in the discriminator to carry out forward and backward propagation to respectively obtain t N-1 Forward judging memory vectors and backward judging memory vectors of time;
splicing the forward direction discrimination memory vector and the backward direction discrimination memory vector into t N-1 Bidirectional discrimination memory vector of time;
and mapping the bidirectional discriminant memory vector into a one-dimensional vector based on a fully-connected neural network, and limiting the one-dimensional vector to be 0 to 1 by adopting a sigma function to obtain a first probability, a second probability and a third probability.
Preferably, the propagation formula for forward and backward propagation includes:
Figure BDA0003772036010000031
in the formula (I), the compound is shown in the specification,
Figure BDA0003772036010000032
a memory vector of a previous moment after attenuation;
Figure BDA0003772036010000033
is the attenuation factor at the current time; "·" represents a matrix dot product operation;
Figure BDA0003772036010000034
is the memory vector of the previous moment;
Figure BDA0003772036010000035
to update the door; σ is a sigmoid function; w is a group of xz 、W hz 、W xr 、W hr 、W xh 、W hh Is a weight parameter;
Figure BDA0003772036010000036
inputting for the current moment; b z 、b r 、b h Is a deviation parameter;
Figure BDA0003772036010000041
to reset the gate;
Figure BDA0003772036010000042
is a candidate memory vector; tan h is a hyperbolic tangent function;
Figure BDA0003772036010000043
is the memory vector of the current moment.
Preferably, the loss function comprises a discriminator loss function and a generator loss function; wherein the content of the first and second substances,
the discriminator loss function includes:
Figure BDA0003772036010000044
in the formula, lambda is a penalty factor, x,
Figure BDA0003772036010000045
Respectively being the standard spot welding data, the complete time sequence data, the random sampling value, D (x),
Figure BDA0003772036010000046
The first probability, the second probability and the third probability are respectively;
the generator loss function includes:
Figure BDA0003772036010000047
where ρ is a coefficient of the reconstruction loss function.
Preferably, the randomly sampled value is calculated by the formula:
Figure BDA0003772036010000048
wherein, the epsilon is from U (0,1); x, x,
Figure BDA0003772036010000049
The standard spot welding data, the complete time sequence data and the random sampling value are respectively.
In a second aspect, the present invention provides a spot welding data padding apparatus based on a generation countermeasure network, including:
the data processing module is used for acquiring spot welding time sequence data in a spot welding process and standardizing the spot welding time sequence data to obtain standard spot welding data;
the matrix calculation module is used for calculating a forward time interval matrix and a backward time interval matrix corresponding to the standard spot welding data;
the data generation module is used for inputting the standard spot welding data, the forward time interval matrix and the backward time interval matrix into a generator for generating a countermeasure network to generate complete time sequence data;
the probability calculation module is used for judging according to a discriminator for generating the countermeasure network to obtain the true probability of the data;
the iterative training module is used for respectively constructing loss functions corresponding to the generator and the discriminator based on the data true probability, and performing iterative training until the loss functions are converged to obtain final spot welding data generated by the generator after training;
and the data filling module is used for filling the missing value of the standard spot welding data according to the final spot welding data to obtain complete standard data, and carrying out inverse standardization on the complete standard data to obtain complete spot welding time sequence data.
In a third aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned spot welding data padding methods based on generation of a countermeasure network.
Compared with the prior art, the invention has the following beneficial effects:
according to the spot welding data filling method based on the generation countermeasure network, the spot welding time sequence data in the spot welding process are obtained, and the spot welding time sequence data are standardized to obtain the standard spot welding data; calculating a forward time interval matrix and a backward time interval matrix corresponding to the standard spot welding data; inputting the standard spot welding data, the forward time interval matrix and the backward time interval matrix into a generator for generating a countermeasure network to generate complete time sequence data; judging the complete time sequence data according to a discriminator for generating a countermeasure network to obtain the true probability of the data; respectively constructing loss functions corresponding to the generator and the discriminator based on the data true probability, and performing iterative training until the loss functions are converged to obtain final spot welding data generated by the trained generator; and filling the missing value of the standard spot welding data according to the final spot welding data to obtain complete standard data, and carrying out inverse standardization on the complete standard data to finally obtain complete spot welding time sequence data.
In the invention, the thought of generating the countermeasure network is adopted, the generator generates false and spurious data, the discriminator judges whether the data is generated by the generator or the original data, and the generator and the discriminator mutually confront and jointly enhance, so that the generator generates complete data which accords with the distribution of the original data and uses the complete data to fill up the missing value. Compared with the existing missing value filling method, the method provided by the invention fully utilizes the time sequence information and the missing characteristics of the data, improves the accuracy of filling the missing value of the spot welding data, and is beneficial to monitoring the spot welding process data and establishing a spot welding quality evaluation model.
Drawings
FIG. 1 is a schematic flow chart of a spot welding data padding method based on a generation countermeasure network according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of a spot welding data padding method based on a generation countermeasure network;
FIG. 3 is a flow diagram of one embodiment of a spot weld data padding method based on a generated countermeasure network;
fig. 4 is a schematic structural diagram of a spot welding data shimming device based on a generation countermeasure network according to a second embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a first embodiment of the present invention provides a spot welding data filling method based on a generated countermeasure network, including the following steps:
s11, acquiring spot welding time sequence data in a spot welding process, and standardizing the spot welding time sequence data to obtain standard spot welding data;
s12, calculating a forward time interval matrix and a backward time interval matrix corresponding to the standard spot welding data;
s13, inputting the standard spot welding data, the forward time interval matrix and the backward time interval matrix into a generator for generating a countermeasure network to generate complete time sequence data;
s14, judging according to a discriminator for generating the countermeasure network to obtain the true probability of the data;
s15, respectively constructing loss functions corresponding to the generator and the discriminator based on the data true probability, and performing iterative training until the loss functions are converged to obtain final spot welding data generated by the generator after training;
and S16, filling the missing value of the standard spot welding data according to the final spot welding data to obtain complete standard data, and carrying out inverse standardization on the complete standard data to obtain complete spot welding time sequence data.
In step S11, spot welding timing data during spot welding is first acquired. In specific implementation, d types of spot welding process data in a spot welding workbench are collected, spot welding time sequence data are obtained according to time sequence, and an expression of d-dimensional spot welding time sequence data y observed for N times is as follows:
Figure BDA0003772036010000071
wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003772036010000072
is a d-dimensional vector, t i For observing data
Figure BDA0003772036010000073
The time of (a) is,
Figure BDA0003772036010000074
at time y i Observed spot weld data values for the jth feature.
Then, replacing the missing value in the spot welding time sequence data y by a 0 value, and standardizing the spot welding time sequence data y to obtain standard spot welding data x, wherein the standardized formula is as follows:
Figure BDA0003772036010000075
where μ is the mean value of y and σ is the standard deviation of y.
In step S12, calculating a forward time interval matrix and a backward time interval matrix corresponding to the standard spot welding data includes:
calculating each element in a mask matrix according to the standard spot welding data;
calculating to obtain each element in the forward time interval matrix and the backward time interval matrix according to each element in the mask matrix; wherein the backward time interval matrix is a transpose of the forward time interval matrix.
Specifically, each element in the mask matrix m is calculated first, and the calculation formula is:
Figure BDA0003772036010000076
in the formula, t i For observing data
Figure BDA0003772036010000077
The time of (a) is,
Figure BDA0003772036010000078
indicating the time t in standard spot welding data i Observed spot weld data values for the jth feature;
recalculating forward time interval matrix delta for The calculation formula of each element in (1) is as follows:
Figure BDA0003772036010000079
then, a backward time interval matrix δ is calculated back The calculation formula is:
Figure BDA0003772036010000081
in step S13, inputting the standard spot welding data, the forward time interval matrix and the backward time interval matrix into a generator for generating a countermeasure network, and generating complete time series data, including:
the standard spot welding data is input to a bidirectional gated fill-cycle cell in the generator for forward and backward propagation,to obtain t N-1 A forward memory vector and a backward memory vector of a moment;
stitching the forward memory vector and the backward memory vector into t N-1 The bidirectional memory vector of the moment is mapped into a middle vector with the same dimensionality as the standard spot welding data based on a fully-connected neural network;
taking the intermediate vector as an initial input vector of a one-way gating filling circulation unit in the generator, and obtaining N output vectors with the same dimension as the standard spot welding data through circulation;
and splicing the N output vectors according to a time sequence to obtain the complete time sequence data.
The generator is based on the idea of a noise reduction self-encoder, and consists of a noise reduction encoder and a noise reduction decoder, and the standard spot welding data is encoded and mapped into a low-dimensional vector by using a bidirectional time interval matrix, and then the low-dimensional vector is decoded to reconstruct complete time sequence data. The noise reduction encoder is composed of a single-layer bidirectional gate control filling circulation unit and a full-connection neural network, the noise reduction decoder is composed of a full-connection neural network and a single-layer gate control filling circulation unit, the gate control filling circulation unit is responsible for learning data distribution by utilizing the time law of standard spot welding data, and the full-connection neural network is responsible for transforming the dimensionality of the data and is convenient to operate the data.
A bidirectional gating filling circulating unit in a noise reduction encoder of a generator respectively transmits the standard spot welding data with noise added and missing in the forward direction and the reverse direction, forgets and selectively memorizes the data at the previous moment and the next moment through gating, memorizes unimportant information needing to be memorized for a long time, memorizes the precedence relationship of time sequence data information, correspondingly attenuates the utilization degree of the information with dimension missing for a long time by utilizing a bidirectional time interval matrix, the lower the utilization degree is the longer the missing time is, and the forward time information and the reverse time information and the missing rule of the time sequence data are fully utilized.
Specifically, the standard spot welding data x is first added with noise, and the noise is addedWith missing standard spot welding data x, forward time interval matrix delta for And a backward time interval matrix delta back The bidirectional gating filling circulation unit input to the generator carries out forward and backward propagation, and the formula for propagating and updating is as follows:
Figure BDA0003772036010000091
in the formula (I), the compound is shown in the specification,
Figure BDA0003772036010000092
a memory vector of a previous moment after attenuation;
Figure BDA0003772036010000093
is the attenuation factor at the current time; "·" represents a matrix dot product operation;
Figure BDA0003772036010000094
is the memory vector of the previous moment;
Figure BDA0003772036010000095
to update the door; σ is a sigmoid function; w xz 、W hz 、W xr 、W hr 、W xh 、W hh Is a weight parameter;
Figure BDA0003772036010000096
inputting for the current moment; b is a mixture of z 、b r 、b h Is a deviation parameter;
Figure BDA0003772036010000097
to reset the gate;
Figure BDA0003772036010000098
is a candidate memory vector; tan h is a hyperbolic tangent function;
Figure BDA0003772036010000099
is the memory vector of the current time.
Then, obtainTo
Figure BDA00037720360100000910
The method comprises the steps of obtaining a forward memory vector and a backward memory vector of a moment, and splicing the forward memory vector and the backward memory vector into t N-1 Bidirectional memory vector of time
Figure BDA00037720360100000911
Then, the generator uses a fully connected neural network to memorize the vector
Figure BDA00037720360100000912
And mapping the vector z into a low-dimensional vector z, and mapping the low-dimensional vector z into an intermediate vector z' with the same dimension as that of the standard spot welding data by adopting a fully-connected neural network.
Finally, the cycle phase comprises: the one-way gating filling circulation unit in the generator takes the intermediate vector z' as the initial input of the generator, the obtained memory vector is input into the fully-connected neural network to obtain a vector with the same dimension as the standard spot welding data, the vector is taken as the input of the next gating filling unit, finally, N output vectors with the same dimension as the standard spot welding data are obtained, and the N output vectors are spliced together according to the time sequence to obtain complete time sequence data
Figure BDA00037720360100000913
In step S14, the obtaining of the data true probability according to the discrimination performed by the discriminator for generating the countermeasure network includes:
calculating a random sampling value between the complete time sequence data and the standard spot welding data;
inputting the standard spot welding data, the complete time sequence data and the random sampling value into a discriminator for generating a countermeasure network to obtain a first probability, a second probability and a third probability; the first probability, the second probability and the third probability are respectively data true probabilities corresponding to the standard spot welding data, the complete time sequence data and the random sampling values.
Wherein, the calculation formula of the random sampling value is as follows:
Figure BDA0003772036010000101
wherein, the epsilon is ∈ U (0,1); x, x,
Figure BDA0003772036010000102
The standard spot welding data, the complete time sequence data and the random sampling value are respectively.
Specifically, the standard spot welding data, the complete time sequence data and the random sampling value are input into a bidirectional gating filling circulation unit in the discriminator to carry out forward propagation and backward propagation, and t is obtained respectively N-1 Forward judging memory vectors and backward judging memory vectors of time;
splicing the forward direction discrimination memory vector and the backward direction discrimination memory vector into t N-1 Bidirectional discrimination memory vector of time;
and mapping the bidirectional discriminant memory vector into a one-dimensional vector based on a fully-connected neural network, and limiting the one-dimensional vector to be 0 to 1 by adopting a sigma function to obtain a first probability, a second probability and a third probability.
The discriminator consists of a single-layer bidirectional gate control filling circulation unit and a fully-connected neural network, the bidirectional gate control filling circulation unit fully utilizes data before and after a missing value to learn data distribution, the fully-connected neural network is responsible for mapping the output of the bidirectional gate control filling circulation unit into a probability value, and the discriminator respectively maps standard spot welding data x and complete time sequence data
Figure BDA0003772036010000103
Random sampling value
Figure BDA0003772036010000104
And judging, and outputting the probability that each datum is the real datum, wherein the probability value reflects the possible degree of the data being the real datum.
In this embodiment, the arbiter also adopts the bidirectional gated padding loop unit to learn the forward and backward information of the data, and the propagation formula for forward and backward propagation is the same as that in step S13, and is not described herein again. The discriminator fully utilizes the information of the past and future time of the data to learn the data distribution by learning the context information, and simultaneously utilizes the bidirectional time interval matrix to correspondingly attenuate the utilization degree of the information of the dimension with long-time missing, and the longer the missing time is, the lower the utilization degree is. The final output D (x) of the discriminator,
Figure BDA0003772036010000105
The first probability, the second probability, and the third probability, respectively.
In step S15, constructing loss functions corresponding to the generator and the discriminator based on the data true probabilities, and performing iterative training until the loss functions converge to obtain final spot welding data generated by the trained generator, including:
constructing a loss function of a discriminator according to the first probability, the second probability and the third probability;
constructing a loss function of the generator according to the second probability;
and updating network parameters in the discriminator and the generator by adopting an Adman optimization gradient descent algorithm until the loss function is converged, and generating final spot welding data by adopting the trained generator.
In particular, the loss function includes a discriminator loss function and a generator loss function.
Wherein the discriminator loss function comprises:
Figure BDA0003772036010000111
in the formula, lambda is a penalty factor, x,
Figure BDA0003772036010000112
Respectively are the standard spot welding dataThe complete timing data, the randomly sampled value, D (x),
Figure BDA0003772036010000113
The first probability, the second probability and the third probability are respectively;
the generator loss function includes:
Figure BDA0003772036010000114
where ρ is a coefficient of the reconstruction loss function.
It should be noted that λ is a penalty factor, which is dynamically adjusted according to the gradient descent speed. When the gradient is decreased slowly, the lambda is increased to ensure the training efficiency, when the gradient is decreased quickly, the lambda is decreased to ensure the training effect, the gradient punishment generation countermeasure network for dynamically adjusting the punishment factors ensures the training effect and efficiency, the situations of gradient disappearance or explosion and the like are avoided, and the high generation quality of the final generator is ensured.
In the iterative training, whether the loss function is converged can be judged by setting the iteration times or the loss threshold. For example, when the loss value of the loss function is smaller than a preset loss threshold, it is determined that the loss function converges, the training of the generator is completed, and finally, the final spot welding data is generated by the trained generator.
In step S16, the missing value of the standard spot welding data is filled according to the final spot welding data to obtain complete standard data, and the complete standard data is inversely normalized to obtain complete spot welding time sequence data.
Specifically, the final spot welding data generated in the generator is used for filling the missing value to obtain complete standard data, and the filling formula of the complete standard data is as follows:
Figure BDA0003772036010000121
for the complete standard data x imputed Carrying out inverse standardization to obtain original complete spot welding time sequence data y imputed The inverse normalization formula is:
y imputed =x imputed ·σ+μ
where μ is the mean value of y and σ is the standard deviation of y.
In order to facilitate an understanding of the invention, specific embodiments thereof will be described further below.
Illustratively, 1762 welding spot process parameter data are collected in the spot welding process, 1074 welding spots have missing values, each welding spot collects 3-dimensional data of a dynamic resistance value, a dynamic current value and a welding gun energy value in the welding process, and each-dimensional process data is 42 observation times.
In the embodiment, a direct comparison method and an indirect comparison method are adopted, and the method is compared with other methods to fill the accuracy.
Wherein, the direct comparison method carries out artificial deletion on complete spot welding data and adopts average relative error (MAPE) and Mean Square Error (MSE) as the standard of filling accuracy.
Figure BDA0003772036010000122
Figure BDA0003772036010000123
Wherein, y i Representing the original data that was missing,
Figure BDA0003772036010000125
representing the complete time series data after padding.
TABLE 1 MAPE result table after filling of deletion values under different deletion rates by different methods
Figure BDA0003772036010000124
Figure BDA0003772036010000131
Table 2 MSE results table after filling missing values under different missing rates by different methods
Figure BDA0003772036010000132
As shown in tables 1 and 2, the missing value of the spot welding time sequence data is filled by the spot welding time sequence data missing value filling method based on the generation countermeasure network, and MAPE and MSE are lower than those of other methods, so that the optimal filling effect is achieved.
The indirect comparison method directly fills the missing time series data, the time series data are classified through a classifier, the classification effect of the classifier is evaluated by adopting AUC indexes, and the missing value filling accuracy is indirectly evaluated. The AUC measure is the area under the ROC curve. The abscissa of the ROC curve is a false positive rate, and is the probability that the classifier judges that the sample is positive but not positive, namely the probability that the positive sample is judged in the positive and negative samples; the ordinate of the ROC curve is the true positive rate, which is the probability that the classifier determines that the positive sample is also the positive sample, i.e., the probability that the positive sample is determined to be the positive sample.
TABLE 3 AUC result table classified by different classifiers after filling data missing values by different methods
Figure BDA0003772036010000133
As shown in table 3, after the missing value of the spot welding time series data is filled by the method provided by the present invention, the highest AUC value is obtained under all classifiers, which indirectly shows that the missing value filling method of the spot welding time series data of the present invention obtains the optimal filling effect.
In summary, the spot welding data filling method based on the generation countermeasure network provided by the invention obtains the spot welding time sequence data in the spot welding process, and standardizes the spot welding time sequence data to obtain the standard spot welding data; calculating a forward time interval matrix and a backward time interval matrix corresponding to the standard spot welding data; inputting the standard spot welding data, the forward time interval matrix and the backward time interval matrix into a generator for generating a countermeasure network to generate complete time sequence data; judging the complete time sequence data according to a discriminator for generating a countermeasure network to obtain the true probability of the data; respectively constructing loss functions corresponding to the generator and the discriminator based on the data true probability, and performing iterative training until the loss functions are converged to obtain final spot welding data generated by the trained generator; and filling the missing value of the standard spot welding data according to the final spot welding data to obtain complete standard data, and carrying out inverse standardization on the complete standard data to finally obtain complete spot welding time sequence data.
In the invention, the thought of generating a countermeasure network is adopted, a generator generates false and spurious data, a discriminator judges whether the data is generated by the generator or original data, and the generator and the discriminator mutually confront and are enhanced together, so that the generator generates complete data which accords with the distribution of the original data and is used for filling missing values. Compared with the existing missing value filling method, the method provided by the invention fully utilizes the time sequence information and the missing characteristics of the data, improves the accuracy of filling the missing value of the spot welding data, and is beneficial to monitoring the spot welding process data and establishing a spot welding quality evaluation model.
Meanwhile, the invention provides a data filling method for constructing an artificial intelligent system for detecting the quality of the welding spot, can reduce the labor intensity of the operation of the staff, improve the operation environment of the staff, change the technical pattern that the quality detection of the welding spot in the automobile industry completely depends on a manual inspection mode, and fill the blank in the industry.
Referring to fig. 4, a second embodiment of the present invention provides a spot welding data padding apparatus based on a generation countermeasure network, including:
the data processing module is used for acquiring spot welding time sequence data in a spot welding process and standardizing the spot welding time sequence data to obtain standard spot welding data;
the matrix calculation module is used for calculating a forward time interval matrix and a backward time interval matrix corresponding to the standard spot welding data;
the data generation module is used for inputting the standard spot welding data, the forward time interval matrix and the backward time interval matrix into a generator for generating a countermeasure network to generate complete time sequence data;
the probability calculation module is used for judging according to a discriminator for generating the countermeasure network to obtain the true probability of the data;
the iterative training module is used for respectively constructing loss functions corresponding to the generator and the discriminator based on the data true probability, and performing iterative training until the loss functions are converged to obtain final spot welding data generated by the generator after training;
and the data filling module is used for filling the missing value of the standard spot welding data according to the final spot welding data to obtain complete standard data, and carrying out inverse standardization on the complete standard data to obtain complete spot welding time sequence data.
Preferably, the matrix calculation module includes:
the element calculation unit is used for calculating each element in the mask matrix according to the standard spot welding data;
a matrix calculation unit, configured to calculate, according to each element in the mask matrix, each element in the forward time interval matrix and each element in the backward time interval matrix; wherein the backward time interval matrix is a transpose of the forward time interval matrix.
Preferably, the data generation module includes:
a memory vector unit for inputting the standard spot welding data into a bidirectional gating filling circulation unit in the generator for forward and backward propagation to obtain t N-1 A forward memory vector and a backward memory vector of a moment;
an intermediate vector unit for stitching the forward memory vector and the backward memory vector into t N-1 The bidirectional memory vector at a moment is mapped into a middle vector with the same dimension as the standard spot welding data based on a fully-connected neural network;
the output vector unit is used for taking the intermediate vector as an initial input vector of a one-way gating filling circulation unit in the generator and obtaining N output vectors with the same dimensionality as the standard spot welding data through circulation;
and the data generation unit is used for splicing the N output vectors according to a time sequence to obtain the complete time sequence data.
Preferably, the probability calculation module includes:
a sampling value calculation unit for calculating a random sampling value between the complete time series data and the standard spot welding data;
the probability calculation unit is used for inputting the standard spot welding data, the complete time sequence data and the random sampling value into a discriminator for generating a countermeasure network to obtain a first probability, a second probability and a third probability; the first probability, the second probability and the third probability are respectively data true probabilities corresponding to the standard spot welding data, the complete time sequence data and the random sampling values.
Preferably, the probability calculation unit includes:
a memory vector unit for inputting the standard spot welding data, the complete time sequence data and the random sampling value into a bidirectional gating filling circulation unit in the discriminator for forward and backward propagation to respectively obtain t N-1 Forward judging memory vectors and backward judging memory vectors of time;
a bidirectional vector unit for stitching the forward direction discrimination memory vector and the backward direction discrimination memory vector into t N-1 Bidirectional discrimination memory vector of time;
and the probability output unit is used for mapping the bidirectional discriminant memory vector into a one-dimensional vector based on a fully-connected neural network, and limiting the one-dimensional vector to be 0 to 1 by adopting a sigma function to obtain a first probability, a second probability and a third probability.
It should be noted that the spot welding data filling device based on the generation countermeasure network according to the embodiment of the present invention is used for executing all the process steps of the spot welding data filling method based on the generation countermeasure network according to the above embodiment, and the working principles and beneficial effects of the two are in one-to-one correspondence, and therefore, the detailed description is omitted.
The embodiment of the invention also provides the terminal equipment. The terminal device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a spot weld data shimming program based on generating a countermeasure network. The processor, when executing the computer program, implements the steps in each embodiment of the spot welding data padding method based on the generation countermeasure network, such as step S11 shown in fig. 1. Alternatively, the processor, when executing the computer program, implements the functions of the modules/units in the above device embodiments, such as a data padding module.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used for describing the execution process of the computer program in the terminal device.
The terminal device can be a desktop computer, a notebook, a palm computer, an intelligent tablet and other computing devices. The terminal device may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that the above components are merely examples of a terminal device and do not constitute a limitation of a terminal device, and that more or fewer components than those described above may be included, or certain components may be combined, or different components may be included, for example, the terminal device may also include input output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is the control center of the terminal device and connects the various parts of the whole terminal device using various interfaces and lines.
The memory may be used for storing the computer programs and/or modules, and the processor may implement various functions of the terminal device by executing or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the terminal device integrated module/unit can be stored in a computer readable storage medium if it is implemented in the form of software functional unit and sold or used as a stand-alone product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U.S. disk, removable hard disk, magnetic diskette, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signal, telecommunications signal, and software distribution medium, etc. It should be noted that the computer-readable medium may contain suitable additions or subtractions depending on the requirements of legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer-readable media may not include electrical carrier signals or telecommunication signals in accordance with legislation and patent practice.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
The above-mentioned embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, and it should be understood that the above-mentioned embodiments are only examples of the present invention and are not intended to limit the scope of the present invention. It should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A spot welding data filling method based on a generation countermeasure network is characterized by comprising the following steps:
acquiring spot welding time sequence data in a spot welding process, and standardizing the spot welding time sequence data to obtain standard spot welding data;
calculating a forward time interval matrix and a backward time interval matrix corresponding to the standard spot welding data;
inputting the standard spot welding data, the forward time interval matrix and the backward time interval matrix into a generator for generating a countermeasure network to generate complete time sequence data;
judging according to a discriminator for generating the countermeasure network to obtain the true probability of the data;
respectively constructing loss functions corresponding to the generator and the discriminator based on the data true probability, and performing iterative training until the loss functions are converged to obtain final spot welding data generated by the trained generator;
and filling the missing value of the standard spot welding data according to the final spot welding data to obtain complete standard data, and carrying out inverse standardization on the complete standard data to obtain complete spot welding time sequence data.
2. The spot welding data filling method based on the generation countermeasure network according to claim 1, wherein the calculating a forward time interval matrix and a backward time interval matrix corresponding to the standard spot welding data comprises:
calculating each element in a mask matrix according to the standard spot welding data;
calculating to obtain each element in the forward time interval matrix and the backward time interval matrix according to each element in the mask matrix; wherein the backward time interval matrix is a transpose of the forward time interval matrix.
3. The spot welding data filling method based on the generation countermeasure network of claim 1, wherein the inputting the standard spot welding data, the forward time interval matrix and the backward time interval matrix into a generator for generating the countermeasure network generates complete time series data, comprising:
inputting the standard spot welding data into a bidirectional gating filling circulation unit in the generator for forward and backward propagation to obtain t N-1 A forward memory vector and a backward memory vector of a moment;
stitching the forward memory vector and the backward memory vector into t N-1 The bidirectional memory vector of the moment is mapped into a middle vector with the same dimensionality as the standard spot welding data based on a fully-connected neural network;
taking the intermediate vector as an initial input vector of a one-way gating filling circulation unit in the generator, and obtaining N output vectors with the same dimension as the standard spot welding data through circulation;
and splicing the N output vectors according to a time sequence to obtain the complete time sequence data.
4. The spot welding data filling method based on the generated countermeasure network according to claim 1, wherein the step of judging according to a discriminator for generating the countermeasure network to obtain a data true probability comprises the following steps:
calculating a random sampling value between the complete time sequence data and the standard spot welding data;
inputting the standard spot welding data, the complete time sequence data and the random sampling value into a discriminator for generating a countermeasure network to obtain a first probability, a second probability and a third probability; the first probability, the second probability and the third probability are respectively data true probabilities corresponding to the standard spot welding data, the complete time sequence data and the random sampling values.
5. The spot welding data filling method based on the generated countermeasure network according to claim 4, wherein the inputting the standard spot welding data, the complete time series data and the random sampling value into a discriminator of the generated countermeasure network to obtain a first probability, a second probability and a third probability comprises:
inputting the standard spot welding data, the complete time sequence data and the random sampling value into a bidirectional gating filling circulation unit in the discriminator to carry out forward and backward propagation to respectively obtain t N-1 Forward discrimination memory vectors and backward discrimination memory vectors of time;
splicing the forward direction discrimination memory vector and the backward direction discrimination memory vector into t N-1 Bidirectional discrimination memory vector of time;
and mapping the bidirectional discriminant memory vector into a one-dimensional vector based on a fully-connected neural network, and limiting the one-dimensional vector to be 0 to 1 by adopting a sigma function to obtain a first probability, a second probability and a third probability.
6. The spot welding data filling method based on generation of countermeasure network according to claim 3 or 5, characterized in that the propagation formula for forward and backward propagation comprises:
Figure FDA0003772033000000031
in the formula (I), the compound is shown in the specification,
Figure FDA0003772033000000032
a memory vector of a previous moment after attenuation;
Figure FDA0003772033000000033
is the attenuation factor at the current time; "·" represents a matrix dot product operation;
Figure FDA0003772033000000034
is the memory vector of the previous moment;
Figure FDA0003772033000000035
to update the door; σ is a sigmoid function; w is a group of xz 、W hz 、W xr 、W hr 、W xh 、W hh Is a weight parameter;
Figure FDA0003772033000000036
inputting for the current moment; b z 、b r 、b h Is a deviation parameter;
Figure FDA0003772033000000037
to reset the gate;
Figure FDA0003772033000000038
is a candidate memory vector; tan h is a hyperbolic tangent function;
Figure FDA0003772033000000039
is the memory vector of the current time.
7. The spot welding data filling method based on the generation countermeasure network as claimed in claim 4, wherein the loss function includes a discriminator loss function and a generator loss function; wherein the content of the first and second substances,
the discriminator loss function includes:
Figure FDA00037720330000000310
in the formula, lambda is a penalty factor, x,
Figure FDA00037720330000000311
Respectively being the standard spot welding data, the complete time sequence data, the random sampling value, D (x),
Figure FDA00037720330000000312
The first probability, the second probability and the third probability are respectively;
the generator loss function includes:
Figure FDA00037720330000000313
where ρ is a coefficient of the reconstruction loss function.
8. The spot welding data filling method based on the generation countermeasure network as claimed in claim 4, wherein the calculation formula of the random sampling value is:
Figure FDA00037720330000000314
wherein, the epsilon is from U (0,1); x, x,
Figure FDA00037720330000000315
The standard spot welding data, the complete time sequence data and the random sampling value are respectively.
9. A spot welding data filling device based on a generation countermeasure network is characterized by comprising:
the data processing module is used for acquiring spot welding time sequence data in a spot welding process and standardizing the spot welding time sequence data to obtain standard spot welding data;
the matrix calculation module is used for calculating a forward time interval matrix and a backward time interval matrix corresponding to the standard spot welding data;
the data generation module is used for inputting the standard spot welding data, the forward time interval matrix and the backward time interval matrix into a generator for generating a countermeasure network to generate complete time sequence data;
the probability calculation module is used for judging according to a discriminator for generating the countermeasure network to obtain the true probability of the data;
the iterative training module is used for respectively constructing loss functions corresponding to the generator and the discriminator based on the data true probability, and performing iterative training until the loss functions are converged to obtain final spot welding data generated by the generator after training;
and the data filling module is used for filling the missing value of the standard spot welding data according to the final spot welding data to obtain complete standard data, and carrying out inverse standardization on the complete standard data to obtain complete spot welding time sequence data.
10. A computer-readable storage medium, comprising a stored computer program, wherein when the computer program runs, the computer-readable storage medium controls a device to execute the spot welding data padding method based on generation of countermeasure network according to any one of claims 1 to 8.
CN202210905128.7A 2022-07-29 2022-07-29 Spot welding data filling method and device based on generation countermeasure network and storage medium Pending CN115238804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210905128.7A CN115238804A (en) 2022-07-29 2022-07-29 Spot welding data filling method and device based on generation countermeasure network and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210905128.7A CN115238804A (en) 2022-07-29 2022-07-29 Spot welding data filling method and device based on generation countermeasure network and storage medium

Publications (1)

Publication Number Publication Date
CN115238804A true CN115238804A (en) 2022-10-25

Family

ID=83677429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210905128.7A Pending CN115238804A (en) 2022-07-29 2022-07-29 Spot welding data filling method and device based on generation countermeasure network and storage medium

Country Status (1)

Country Link
CN (1) CN115238804A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115796235A (en) * 2022-11-04 2023-03-14 上海艾莎医学科技有限公司 Training method and system for generator model for supplementing missing data
CN115952859A (en) * 2023-03-01 2023-04-11 支付宝(杭州)信息技术有限公司 Data processing method, device and equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115796235A (en) * 2022-11-04 2023-03-14 上海艾莎医学科技有限公司 Training method and system for generator model for supplementing missing data
CN115796235B (en) * 2022-11-04 2023-06-06 上海艾莎医学科技有限公司 Method and system for training generator model for supplementing missing data
CN115952859A (en) * 2023-03-01 2023-04-11 支付宝(杭州)信息技术有限公司 Data processing method, device and equipment

Similar Documents

Publication Publication Date Title
US11893781B2 (en) Dual deep learning architecture for machine-learning systems
CN106570464B (en) Face recognition method and device for rapidly processing face shielding
CN115238804A (en) Spot welding data filling method and device based on generation countermeasure network and storage medium
CN111027576B (en) Cooperative significance detection method based on cooperative significance generation type countermeasure network
CN110532880B (en) Sample screening and expression recognition method, neural network, device and storage medium
CN112529146B (en) Neural network model training method and device
CN114120041B (en) Small sample classification method based on double-countermeasure variable self-encoder
CN112232526B (en) Geological disaster vulnerability evaluation method and system based on integration strategy
CN113128671B (en) Service demand dynamic prediction method and system based on multi-mode machine learning
CN111310918B (en) Data processing method, device, computer equipment and storage medium
CN114048468A (en) Intrusion detection method, intrusion detection model training method, device and medium
CN113704082A (en) Model evaluation method and device, electronic equipment and storage medium
CN116596095B (en) Training method and device of carbon emission prediction model based on machine learning
CN111488810A (en) Face recognition method and device, terminal equipment and computer readable medium
CN112818774A (en) Living body detection method and device
CN110855474B (en) Network feature extraction method, device, equipment and storage medium of KQI data
CN114387524B (en) Image identification method and system for small sample learning based on multilevel second-order representation
CN116384471A (en) Model pruning method, device, computer equipment, storage medium and program product
CN115954019A (en) Environmental noise identification method and system integrating self-attention and convolution operation
CN114519520A (en) Model evaluation method, model evaluation device and storage medium
CN114116456A (en) Test case generation method, system and computer readable storage medium
CN113657595A (en) Neural network real-time pruning method and system and neural network accelerator
CN116959489B (en) Quantization method and device for voice model, server and storage medium
CN116402116B (en) Pruning method, system, equipment, medium and image processing method of neural network
CN115329968B (en) Method, system and electronic equipment for determining fairness of quantum machine learning algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination