An intelligent monitoring method and system for welding quality
By establishing a historical data database and training evaluation model, combining similarity calculation and incremental learning, the problems of low efficiency and accuracy of traditional welding quality monitoring are solved, intelligent welding quality monitoring is achieved, and the stability and reliability of welding quality are improved.
Patent Information
- Application Number
- CN202510254547.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-03-05
AI Technical Summary
Traditional welding quality monitoring methods rely on manual inspection, are inefficient and susceptible to human factors. The existing systems cannot make full use of historical data, resulting in limited accuracy and reliability of monitoring results.
Establish a database that stores historical welding data, train a welding quality evaluation model, calculate the similarity between real-time welding data and historical data, use the model to evaluate and feedback, and combine incremental learning and gray wolf optimization algorithm to optimize model parameters to achieve intelligent monitoring of welding quality.
It realizes comprehensive, accurate and real-time monitoring of welding quality, improves the stability and reliability of welding quality, reduces errors, and provides operators with detailed feedback information to support continuous improvement.
Smart Images

Figure CN119747955B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of welding quality monitoring, and in particular, to an intelligent welding quality monitoring method and system. Background Art
[0002] In the welding process, welding quality is a key factor in improving the reliability and safety of products. However, traditional welding quality monitoring methods often rely on manual inspection and empirical judgment, which are not only inefficient but also easily affected by human factors, resulting in limitations in the accuracy and reliability of monitoring results.
[0003] With the rapid development of industrial manufacturing, the need for real-time monitoring and intelligent evaluation of welding quality is becoming increasingly urgent. To achieve this goal, an intelligent monitoring method that can automatically collect welding data, intelligently analyze welding quality, and provide real-time feedback on monitoring results is required.
[0004] Currently, although there are some welding quality monitoring systems based on sensor and data acquisition technologies, most of these systems can only achieve simple data recording and storage functions and cannot fully utilize the information in historical welding data, resulting in false alarms and missed alarms during the monitoring process. Summary of the Invention
[0005] In order to make full use of historical data in the process of welding quality monitoring and achieve accurate analysis of welding quality, this application provides an intelligent welding quality monitoring method and system.
[0006] In a first aspect, this application provides an intelligent welding quality monitoring method, adopting the following technical solution:
[0007] An intelligent welding quality monitoring method includes the following steps:
[0008] Database building: Build a database storing multiple first feature vectors, where the first feature vectors are composed of multiple historical welding data with the same timestamp;
[0009] Model building: Build a welding quality evaluation model, and train the welding quality evaluation model using historical welding data to obtain a trained welding quality evaluation model;
[0010] Data collection: Collect various real-time welding data and integrate all the real-time welding data into a second feature vector;
[0011] First calculation: Calculate the similarity between the second feature vector and each first feature vector respectively to obtain multiple similarity values;
[0012] First judgment: Determine whether there is a similarity value greater than a preset similarity threshold. If so, perform the steps of the first evaluation; if not, perform the feedback step;
[0013] First evaluation: Input the real-time welding data into the trained welding quality evaluation model to obtain the first evaluation result;
[0014] Second judgment: Determine whether the first evaluation result meets the expectation. If so, perform the data collection step after a preset time interval; if not, perform the feedback step;
[0015] Feedback: Send a feedback signal, where the feedback signal includes: the similarity between the first feature vector and the second feature vector and / or the first evaluation result.
[0016] This application can effectively integrate and utilize historical welding data by establishing a database storing multiple first feature vectors. Then, use the historical welding data to train the welding quality evaluation model. The trained welding quality model can capture the key features in the welding process, thereby accurately evaluating the welding quality. Then, collect various real-time welding data and integrate them into a second feature vector. By calculating the similarity between the second feature vector and each first feature vector, the current welding state can be intelligently matched with the known states in history. Then, based on the comparison result of the similarity with the preset similarity threshold, it can be intelligently determined whether there are potential risks in the current welding process. According to the comparison result of the similarity with the preset threshold, trigger the evaluation or feedback mechanism to achieve real-time monitoring of the welding quality. Then, input the real-time welding data into the trained welding quality evaluation model to obtain an accurate evaluation result of the welding quality (i.e., the first evaluation result). Then, based on the judgment result of whether the first evaluation result meets the expectation, decide whether to send a feedback signal. If the evaluation result does not meet the expectation, trigger the feedback mechanism so that the operator can timely understand the welding quality problem. The feedback signal includes the similarity between the first feature vector and the second feature vector and / or the first evaluation result, providing detailed and accurate information for the operator. This application realizes comprehensive, accurate, and real-time monitoring of the welding quality through mechanisms such as integrating historical data, real-time data collection, automated evaluation, and feedback. This not only improves the stability and reliability of the welding quality, but also reduces errors and realizes accurate analysis of the welding quality.
[0017] Optionally, after performing the steps of the second judgment and before performing the feedback step, it further includes:
[0018] Second evaluation: It includes feature extraction, second calculation, third judgment, and output;
[0019] Feature extraction: Based on the step of the first evaluation, obtain the feature vector of the first evaluation result, denoted as the third feature vector. Each eigenvalue in the third feature vector represents the probability when the real-time welding data is classified into different categories;
[0020] Second calculation: Adopt the weighted average algorithm to calculate the evaluation value of the real-time welding data based on the eigenvalues in the third feature vector;
[0021] Third judgment: Judge whether the evaluation value is greater than the preset evaluation threshold. If so, execute the output step; if not, execute the feedback step;
[0022] Output: Output a signal indicating normal welding;
[0023] The feedback signal further includes: the evaluation value of the real-time welding data.
[0024] This application further extracts the feature vector (i.e., the third feature vector) of the result of the first evaluation. The third feature vector reflects the probability when the real-time welding data is classified into different quality categories. Then, the weighted average algorithm is adopted to calculate the evaluation value of the real-time welding data in combination with the eigenvalues in the third feature vector. Through quantitative evaluation, this application obtains a numerical index (i.e., the evaluation value) that can reflect the welding quality for subsequent decision-making and judgment. Then, the evaluation value is compared with the preset evaluation threshold to decide whether to output a signal indicating normal welding or execute the feedback step. When the evaluation value is greater than the preset evaluation threshold, it indicates that the welding quality under the real-time welding data is excellent, and then a signal indicating normal welding is output. The evaluation value of the real-time welding data is added to the feedback signal, providing more comprehensive quality information for the operator. This application not only improves the accuracy and reliability of the monitoring results but also provides more comprehensive feedback information for the operator, contributing to the continuous improvement of welding quality.
[0025] Optionally, after the step of the third judgment and before the step of output, it further includes:
[0026] Incremental learning: Obtain the loss function of the trained welding quality evaluation model, adopt the online gradient descent algorithm, and use the real-time welding data to calculate the gradient of the loss function with respect to the parameters of the trained welding quality evaluation model;
[0027] Update parameters: Use the gradient to update the parameters of the trained welding quality evaluation model to obtain a new welding quality evaluation model;
[0028] Data storage: Update the real-time welding data to the database, and after an interval of the preset duration, execute the data collection step.
[0029] This application obtains the loss function of the trained welding quality assessment model and uses the online gradient descent algorithm to calculate the gradient of the loss function with respect to the model parameters using real-time welding data. Incremental learning allows the welding quality assessment model to gradually update itself when new data is received without having to retrain the entire model, saving time and improving the adaptability and accuracy of the model. This enables the trained welding quality assessment model to more quickly adapt to changes in the welding process and improves the processing ability of welding data for new welding materials. Subsequently, the calculated gradient is used to update the parameters of the trained welding quality assessment model. By continuously adjusting the model parameters, the trained welding quality assessment model can better fit the real-time welding data, thereby improving the accuracy of the assessment. The continuous optimization of the model parameters makes the welding quality assessment model more precise and able to more accurately reflect the welding quality status. Subsequently, the real-time welding data is updated to the database, providing rich historical data support for subsequent incremental learning and model training. The continuous enrichment of the database further enhances the ability of the welding quality assessment model to utilize historical data and helps improve the generalization performance of the model. Through incremental learning and parameter update, the model can continuously adapt to changes in the welding process, improve the processing ability of new data, and thus enhance the overall performance.
[0030] Optionally, after the step of performing the third judgment and before the step of performing the feedback, it further includes:
[0031] First setting: Standardize the first feature vector to obtain a fourth feature vector, and sequentially splice the fourth feature vectors into a first matrix. The element in the i-th row and j-th column of the first matrix represents the j-th eigenvalue in the i-th fourth feature vector;
[0032] First obtaining: Sequentially splice the maximum values of each column in the first matrix into a fifth feature vector; sequentially splice the minimum values of each column in the first matrix into a sixth feature vector;
[0033] Third calculation: Calculate the index value of the i-th fourth feature vector in the first matrix and the fifth feature vector. The calculation model is as follows:
[0034] ;
[0035] Wherein, is the index value of the i-th fourth feature vector in the first matrix and the fifth feature vector; is the eigenvalue in the j-th column of the i-th fourth feature vector; is the j-th eigenvalue in the fifth feature vector; n is the total number of eigenvalues in the fifth feature vector; m is the number of fourth feature vectors in the first matrix;
[0036] Fourth calculation: Calculate the index value of the i-th fourth eigenvector and the sixth eigenvector in the first matrix. The calculation model is as follows:
[0037] ;
[0038] Among them, is the index value of the i-th fourth eigenvector and the sixth eigenvector in the first matrix; is the j-th eigenvalue in the sixth eigenvector;
[0039] Fifth calculation: Calculate the ideal value of the i-th fourth eigenvector. The calculation model is as follows:
[0040] ;
[0041] Among them, is the ideal value of the i-th fourth eigenvector;
[0042] Second setting: Set the historical welding data corresponding to the maximum ideal value as the target data;
[0043] First adjustment: Adjust the real-time welding data according to the target data.
[0044] In this application, by standardizing the first eigenvector, the dimensional difference between different features can be eliminated, making the data more comparable. Then, the standardized fourth eigenvectors are concatenated into the first matrix, and by extracting the maximum and minimum values of each column in the first matrix, the fifth eigenvector and the sixth eigenvector are respectively formed. Then, by calculating the index values of the fourth eigenvector and the fifth eigenvector, and the sixth eigenvector, the distance between each fourth eigenvector and the extreme value eigenvector can be quantified, so as to identify the outliers or the situations deviating from the normal range in the data. Then, calculate the ideal value of the fourth eigenvector, and the ideal value reflects the optimal or expected state in the data. Then, set the historical welding data corresponding to the maximum ideal value as the target data, which helps to provide a reference standard or target for the real-time welding data. Then, adjust the real-time welding data according to the target data, which can make the real-time data closer to the ideal state or the target data, thereby improving the welding quality.
[0045] Optionally, after performing the step of the second setting and before performing the step of the first adjustment, it further includes:
[0046] Third evaluation: Input the target data into the trained welding quality evaluation model to obtain the third evaluation result;
[0047] Fourth judgment: Judge whether the third evaluation result meets the expectation. If so, perform the step of the first adjustment; if not, perform the feedback step.
[0048] The present application inputs target data into a trained welding quality assessment model to obtain a third assessment result, so as to further verify the quality of the target data and determine that the target data truly represents the desired state during the welding process. According to the third assessment result, it is judged whether it meets the expectations. If the assessment result meets the expectations, it indicates that the target data is reliable, and the real-time welding data can be adjusted based on the target data. Through the third assessment and the fourth judgment, the reliability of the target data can be further verified before adjusting the real-time welding data, which helps to reduce adjustment errors caused by inaccurate target data and enhances the accuracy of decision-making.
[0049] Optionally, after performing the step of the fourth judgment and before performing the step of feedback, it further includes:
[0050] Initialization: Set the relevant parameters of the gray wolf population, and randomly initialize the positions of the gray wolf population according to the second eigenvector. Each gray wolf in the gray wolf population represents an adjustment scheme for welding data. The relevant parameters include the population size, the maximum number of iterations, and the convergence factor.
[0051] Calculate fitness: Recalculate the fitness value of the second eigenvector for each gray wolf, and take the gray wolf corresponding to the minimum fitness value as the alpha wolf.
[0052] Position update: Update the position of the alpha wolf according to the social hierarchy of the gray wolves, and perform the step of calculating fitness until the stop condition is met.
[0053] Obtain the scheme: Obtain the adjustment scheme for the welding data corresponding to the alpha wolf as the final adjustment scheme.
[0054] Second adjustment: Adjust the real-time welding data according to the final adjustment scheme.
[0055] The feedback signal further includes: the final adjustment scheme.
[0056] This application sets the relevant parameters of the gray wolf population (such as population size, maximum number of iterations, and convergence factor), providing a basis for the subsequent gray wolf optimization algorithm. Then, the positions of the gray wolf population are randomly initialized according to the second eigenvector. Each gray wolf in the gray wolf population represents a welding data adjustment scheme. After that, by recalculating the fitness value of each gray wolf, the effect of each adjustment scheme is quantified. The smaller the fitness value, the closer the scheme is to the optimal solution. Then, the gray wolf with the smallest fitness value is used as the alpha wolf, that is, the current optimal welding data adjustment scheme. The gray wolf optimization algorithm uses the social hierarchy of gray wolves to update positions, which helps the algorithm quickly converge to the optimal solution in the solution space. By continuously iterating and updating the position of the alpha wolf and recalculating the fitness value, the optimal welding data adjustment scheme can be gradually approximated. When the stop condition is met (such as reaching the maximum number of iterations or converging to a certain threshold), the welding data adjustment scheme corresponding to the current alpha wolf is obtained as the final adjustment scheme. Then, the real-time welding data is adjusted according to the final adjustment scheme in order to achieve better welding quality. The final adjustment scheme is included in the feedback signal, which helps the operation and maintenance personnel or users understand the current optimal adjustment scheme and provides a basis for subsequent decisions.
[0057] Optionally, after performing the step of obtaining the scheme and before performing the step of second adjustment, it further includes:
[0058] Fourth evaluation: Input the welding data corresponding to the final adjustment scheme into the trained welding quality evaluation model to obtain the fourth evaluation result;
[0059] Fifth judgment: Judge whether the fourth evaluation result meets the expectation. If so, perform the step of second adjustment; if not, perform the step of alarming;
[0060] Alarm: Send an alarm signal.
[0061] After this application obtains the final adjustment scheme, it inputs the corresponding welding data into the trained welding quality evaluation model again for verification, determining the effectiveness of the adjustment scheme. Through the evaluation of the model, a quantitative index of the effect of the adjustment scheme can be obtained, which helps to improve the accuracy and reliability of the adjustment. Judge whether the adjustment scheme meets the expectation according to the fourth evaluation result. This is a key step in determining subsequent operations (adjustment or alarm). If the evaluation result does not meet the expectation, it means that there may be problems with the adjustment scheme or model prediction deviation. At this time, performing the alarm step can timely discover the problem and take measures.
[0062] Optionally, after performing the step of first judgment and before performing the step of first evaluation, it further includes:
[0063] Sixth calculation: Record the historical welding data corresponding to when the similarity value is greater than the preset similarity threshold as the first data;
[0064] Sixth Judgment: Determine whether the quantity of the first data is one. If so, perform the clustering step; if not, perform the first evaluation step.
[0065] Clustering: Use the K-Means clustering algorithm to cluster the historical welding data to obtain a normal welding data set and an abnormal welding data set.
[0066] Obtain the centers: Obtain the clustering center of the normal welding data set, denoted as the second data; obtain the clustering center of the abnormal welding data set, denoted as the third data.
[0067] Seventh Calculation: Calculate the Euclidean distance between the first data and the second data, denoted as the first Euclidean distance; calculate the Euclidean distance between the first data and the third data, denoted as the second Euclidean distance.
[0068] Seventh Judgment: Respectively determine whether the first Euclidean distance and the second Euclidean distance are less than the preset distance threshold. If so, perform the first evaluation step; if not, perform the data acquisition step.
[0069] In this application, by counting the number of similarity values greater than the preset similarity threshold, it is determined whether to perform the clustering step based on whether the quantity of the first data is one. If the quantity of the first data is one, it means that there is only one sample in the historical welding data that is highly similar to the target data. At this time, clustering is required to further analyze the data set, and it is determined whether the first data can fall into the corresponding category through the Euclidean distance. If the quantity of the first data is not one, that is, there are multiple similar samples, then the evaluation can be directly performed, improving the efficiency. Using the K-Means clustering algorithm to divide the historical welding data helps to divide the data set into two categories: a normal welding data set and an abnormal welding data set, providing a basis for subsequent analysis. Then, through clustering, the clustering centers of the normal welding data set and the abnormal welding data set can be obtained, and these centers represent the typical characteristics of their respective data sets. Then, obtaining the clustering centers (the second data and the third data) is the basis for subsequent calculation of the Euclidean distance, which helps to quantify the distance between the first data and the normal and abnormal welding data sets. Then, by calculating the Euclidean distance between the first data and the second and third data, the similarity between the target data and the normal and abnormal data sets can be quantified. According to whether the Euclidean distance is less than the preset distance threshold, it is determined whether to perform the data acquisition step, and then it is determined whether there is an error in the current real-time welding data. If the distance between the target data and the clustering center of the normal or abnormal data set is relatively close, it means that the real-time welding data can be mapped to the corresponding data set. When the Euclidean distance is greater than the preset threshold, it means that there is an error in the real-time welding data acquisition, and then the data acquisition step is performed.
[0070] Optionally, after performing the seventh judgment step and before performing the data acquisition step, it further includes:
[0071] Redivision: Re-determine the values for dividing historical welding data using Otsu's Method, and re-divide the historical welding data into a normal data set and an abnormal data set according to the said values;
[0072] Reset the center: Calculate the Euclidean distance between the i-th sample in the normal data set and the remaining samples respectively, denoted as the fourth data, and take the sample corresponding to the minimum sum of the fourth data as the new second data. Calculate the Euclidean distance between the i-th sample in the abnormal data set and the remaining samples respectively, denoted as the fifth data, and take the sample corresponding to the minimum sum of the fifth data as the new third data, and re-execute the steps of the seventh calculation.
[0073] This application uses Otsu's Method to re-determine the values for dividing historical welding data (i.e., use Otsu's Method to determine which historical welding data is used as the threshold for dividing the normal data set and the abnormal data set). This is an adaptive threshold determination method that can automatically select the optimal threshold according to the statistical characteristics of the data, thereby optimizing the division of the data set. Through re-division, the division of the normal data set and the abnormal data set can be made more accurate, reducing the situations of misclassification and missed classification, and improving the data quality. By calculating the Euclidean distance between each sample in the normal data set and the abnormal data set and the remaining samples, and selecting the sample with the minimum sum of distances as the new clustering centers (the second data and the third data), the positions of the clustering centers can be updated to more accurately represent the typical characteristics of their respective data sets. Resetting the center helps to enhance the robustness of the clustering results and reduce the deviation of the clustering results caused by improper selection of the initial clustering centers. After re-division and resetting the center, it is necessary to re-calculate the Euclidean distance between the target data and the new clustering centers to obtain the latest distance information, so that the intelligent welding quality monitoring method can show better performance when facing complex and variable data sets, improving the reliability and accuracy.
[0074] In a second aspect, this application provides an intelligent welding quality monitoring system, adopting the following technical solution:
[0075] An intelligent welding quality monitoring system, comprising: a processor and a memory,
[0076] The memory stores program codes;
[0077] When the processor calls the program codes in the memory, it executes the steps of the said method.
[0078] In summary, this application includes at least one of the following beneficial technical effects:
[0079] 1. This application realizes the comprehensive, accurate, and real-time monitoring of welding quality by integrating mechanisms such as historical data, real-time collected data, automated evaluation, and feedback. This not only improves the stability and reliability of welding quality but also reduces human intervention and enables accurate analysis of welding quality.
[0080] 2. By standardizing the first eigenvector, this application can eliminate the dimensional differences between different features, making the data more comparable. Then, the standardized fourth eigenvector is concatenated into the first matrix, and the maximum and minimum values of each column in the first matrix are extracted to form the fifth eigenvector and the sixth eigenvector respectively. After that, by calculating the index values of the fourth eigenvector with the fifth and sixth eigenvectors, the distance between each fourth eigenvector and the extreme value eigenvectors can be quantified, thereby identifying outliers or situations deviating from the normal range in the data. Then, the ideal value of the fourth eigenvector is calculated, and the ideal value reflects the optimal or expected state in the data. Then, the historical welding data corresponding to the maximum ideal value is set as the target data, which helps to provide a reference standard or target for real-time welding data. Subsequently, adjusting the real-time welding data according to the target data can make the real-time data closer to the ideal state or the target data, thus improving welding quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] Figure 1 is the flowchart of Embodiment 1 of this application;
[0082] Figure 2 is the flowchart of Embodiment 2 of this application;
[0083] Figure 3 is the flowchart of Embodiment 3 of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0084] The following is a further detailed description of this application in conjunction with Figures 1 to 3 this application.
[0085] Embodiment 1: This embodiment discloses an intelligent monitoring method for welding quality. Referring to Figure 1 , the method includes: S1 database building, S2 model building, S3 data collection, S4 first calculation, S5 first judgment, S6 first evaluation, S7 second judgment, and S8 feedback. First, a database storing the first eigenvector composed of historical welding data is established, and a welding quality evaluation model is trained. Then, real-time welding data is collected and integrated to obtain the second eigenvector. The similarity between the second eigenvector and each first eigenvector is calculated respectively to determine whether further evaluation of welding quality is required. If the similarity meets the standard, the evaluation model is used for quality judgment; if it does not meet the standard or the evaluation result does not meet the expectation, a feedback signal including the similarity or the evaluation result is sent. The process of this embodiment is as follows:
[0086] S1 Database building: Build a database storing multiple first feature vectors, where the first feature vectors are composed of multiple pieces of historical welding data with the same timestamp.
[0087] The historical welding data includes various parameters such as current, voltage, welding speed, and gas flow. These data are recorded at the same timestamp to form a complete description of the welding state. Through feature extraction technology, key information can be extracted from these historical welding data to form the first feature vector.
[0088] S2 Model building: Build a welding quality assessment model and train the welding quality assessment model using the historical welding data to obtain the trained welding quality assessment model. The role of the trained welding quality assessment model is to perform quality assessment on the input welding data and determine whether it meets the preset quality standards.
[0089] The welding quality assessment model can be any one of models such as CNN model, RNN model, LSTM model, BI-LSTM model, etc. As long as the model can be trained by the historical welding data and has the ability to judge whether the input data meets the preset quality standards.
[0090] S3 Data collection: During the actual welding process, various welding parameters are recorded in real time to form real-time welding data. These data may come from sensors, controllers, or other data collection devices. In order to compare with the first feature vectors in the database, these real-time data need to be integrated into a second feature vector. The composition of this vector is consistent with the first feature vector to improve the accuracy of calculating the similarity.
[0091] For example, if the real-time welding data is: current 200 A, voltage 24 V, welding speed 30 cm / min, then the second feature vector is represented as: [200, 24, 30].
[0092] S4 First calculation: Calculate the similarity between the second feature vector and each first feature vector respectively to obtain multiple similarity values.
[0093] Similarity is an index to measure the closeness between two vectors and can be calculated by various methods such as cosine similarity and Euclidean distance. In this step, multiple similarity values are calculated, and each similarity value corresponds to the similarity degree between a first feature vector and the second feature vector.
[0094] S5 First judgment: Judge whether there is a similarity value greater than the preset similarity threshold. If so, execute S6 First evaluation; if not, execute S8 Feedback.
[0095] S6 First evaluation: Input the real-time welding data into the trained welding quality evaluation model to obtain the first evaluation result.
[0096] The first evaluation result is the welding quality grade or score predicted by the trained welding quality evaluation model based on the input welding parameters.
[0097] S7 Second judgment: By comparing the first evaluation result with the preset quality standard, determine whether the first evaluation result meets the expectation. If so, perform S3 data collection after a preset time interval; if not, perform S8 feedback.
[0098] The preset quality standard can be different scores corresponding to different welding qualities. For example, when the output score is 80 (inclusive) to 100 (inclusive), it is excellent; when it is 60 (inclusive) to 80 (exclusive), it is qualified; when it is less than 60 (exclusive), it is unqualified. Different score thresholds can also be set according to requirements.
[0099] The preset quality standard can also be the tolerance range of the number, size or distribution of specified welding defects. For example, in a weld of a preset length, the number of pores shall not exceed a certain number (such as no more than 3 pores per meter of weld), and the maximum diameter of the pores shall not exceed 10% of the weld thickness; the number of slag inclusions in the weld shall be controlled within a certain range, and the size of the slag inclusions shall not be too large so as not to affect the mechanical properties of the weld, etc.
[0100] S8 Feedback: If the similarity does not meet the standard or the evaluation result does not meet the expectation, a feedback signal needs to be sent. The feedback signal can include the similarity between the first feature vector and the second feature vector and / or the first evaluation result, so that the operator can understand the actual situation of the welding quality and take corresponding measures. The form of the feedback signal can be acoustic and optical alarms, screen displays, data records, etc., depending on the actual application scenario and requirements.
[0101] This embodiment includes establishing a database for storing the first feature vector composed of historical welding data; establishing and training a welding quality evaluation model; collecting and integrating real-time welding data; calculating the similarity; determining whether the similarity is greater than the preset similarity threshold to decide whether to evaluate or give feedback; and then determining whether the first evaluation result meets the expectation. If it meets, perform the data collection step; if not, send a feedback signal. This application realizes real-time monitoring and early warning of the welding process by collecting welding data in real time, comparing it with historical data, and combining the trained welding quality evaluation model for quality prediction.
[0102] Embodiment 2: Refer to Figure 2 , the difference between this embodiment and Embodiment 1 is that after performing S7 second judgment and before performing S8 feedback, it further includes:
[0103] The second evaluation, S701, includes: feature extraction, second calculation, third judgment, and output.
[0104] Feature extraction: Based on the results of the first evaluation in S6, perform feature extraction, extract key information from the first evaluation results, obtain the feature vector of the first evaluation results, denoted as the third feature vector. Each eigenvalue in the third feature vector represents the probability when the real-time welding data is divided into different categories, and each eigenvalue in the third feature vector represents the probability that the real-time welding data is divided into a specific category.
[0105] Second calculation: Use the weighted average algorithm to calculate the evaluation value of the real-time welding data. This evaluation value is calculated based on the eigenvalues (i.e., the probability values of each category) in the third feature vector. The weighted average algorithm takes into account the weights of each eigenvalue, making the evaluation results more accurate and reliable.
[0106] A weight can be assigned to each eigenvalue, and then the weighted average is calculated as the evaluation value. The evaluation value reflects the performance of the real-time welding data in the overall welding quality and is used to determine whether the welding quality meets the expectations.
[0107] Third judgment: Judge whether the evaluation value is greater than the preset evaluation threshold. If so, it means that the quality of the real-time welding data is high and meets or exceeds the expected standard. The reason why the first evaluation result in the second judgment of S7 does not meet the expectations is that the real-time welding data is new welding material, resulting in a new evaluation result. It is necessary to execute S702 incremental learning to enhance the generalization ability of the trained welding quality evaluation model; if not, it means that the quality of the real-time welding data is low and does not meet the expected standard. It is necessary to adjust the real-time welding data and then execute S705 first setting.
[0108] S702 incremental learning, obtain the loss function of the trained welding quality evaluation model, use the online gradient descent algorithm, and calculate the gradient of the loss function with respect to the parameters of the trained welding quality evaluation model using the real-time welding data.
[0109] The online gradient descent algorithm will first initialize the parameters of the trained welding quality evaluation model and set a learning rate. Then, for each real-time welding data sample, the algorithm will calculate its corresponding loss function value and the gradient of the loss function with respect to the model parameters. After that, the model parameters are updated according to the gradient and the learning rate. This process will be repeated until the performance of the model on the new data reaches the preset stop condition (such as the loss function value no longer decreases significantly).
[0110] S703 update parameters, use the gradient to update the parameters of the trained welding quality evaluation model, and obtain a new welding quality evaluation model.
[0111] Using gradient to update parameters is a prior art. In this step, the ordinary gradient descent algorithm is used for calculation, and the calculation model is as follows:
[0112] ;
[0113] Among them, represents the updated model parameters, represents the model parameters before update, represents the learning rate, represents the gradient of the loss function L with respect to the model parameters.
[0114] For another example, using the mini-batch gradient descent algorithm to update the model parameters, the process is as follows:
[0115] ;
[0116] represents the gradient of the loss function L with respect to the parameters on the mini-batch data.
[0117] S704 Data storage: Update the real-time welding data to the database, and after an interval of a preset duration, execute S3 data acquisition.
[0118] Output: Output a signal indicating normal welding.
[0119] S705 First setting: Standardize the first feature vector, and denote the standardized first feature vector as the fourth feature vector.
[0120] After that, the fourth feature vectors are sequentially concatenated into a first matrix (this concatenation process is carried out in the order of the fourth feature vectors, and each fourth feature vector becomes a row of the matrix. The eigenvalues of each fourth feature vector are placed in the corresponding columns of the matrix according to their positions in the vector). The element in the i-th row and j-th column of the first matrix represents the j-th eigenvalue in the i-th fourth feature vector.
[0121] S706 First acquisition: Traverse each column of the first matrix, find the maximum value of the column, and sequentially concatenate these maximum values into a fifth feature vector. The fifth feature vector contains the maximum values of each column of the first matrix and is used to represent the upper limit of the eigenvalues represented by the column.
[0122] Similarly, traverse each column of the first matrix, find the minimum value of the column, and sequentially concatenate these minimum values into a sixth feature vector. The sixth feature vector contains the minimum values of each column of the first matrix and is used to represent the lower limit of the eigenvalues represented by the column.
[0123] S707 Third calculation: Calculate the index value between the i-th fourth feature vector in the first matrix and the fifth feature vector. The calculation model is as follows:
[0124] ;
[0125] wherein, is the index value of the i-th fourth eigenvector and the fifth eigenvector in the first matrix; is the eigenvalue of the j-th column in the i-th fourth eigenvector; is the j-th eigenvalue in the fifth eigenvector; n is the total number of eigenvalues in the fifth eigenvector; m is the number of fourth eigenvectors in the first matrix.
[0126] S708 Fourth calculation, calculate the index value of the i-th fourth eigenvector and the sixth eigenvector in the first matrix, and the calculation model is as follows:
[0127] ;
[0128] wherein, is the index value of the i-th fourth eigenvector and the sixth eigenvector in the first matrix; is the j-th eigenvalue in the sixth eigenvector.
[0129] S709 Fifth calculation, calculate the ideal value of the i-th fourth eigenvector, and the calculation model is as follows:
[0130] ;
[0131] wherein, is the ideal value of the i-th fourth eigenvector.
[0132] S710 Second setting, set the historical welding data corresponding to the maximum ideal value as the target data, that is, traverse all fourth eigenvectors (i.e., all historical welding data), calculate their ideal values, and find the historical welding data corresponding to the fourth eigenvector with the maximum ideal value. This historical welding data is considered to be the optimal or closest to the desired state, so it is set as the target data.
[0133] S711 Third evaluation, input the target data into the trained welding quality evaluation model to obtain the third evaluation result.
[0134] S712 Fourth judgment, judge whether the third evaluation result meets the expectation. If so, it means that the welding quality represented by the target data has reached the standard or expectation, and then execute S721 First adjustment; if not, execute S713 Initialization.
[0135] S713 Initialization, set the relevant parameters of the gray wolf population, and randomly initialize the positions of the gray wolf population according to the second eigenvector. Each gray wolf in the gray wolf population represents an adjustment scheme for welding data, and the relevant parameters include the population size, the maximum number of iterations, and the convergence factor.
[0136] Grey Wolf Population: Each grey wolf in the grey wolf population represents an adjustment scheme for welding data, that is, each grey wolf has a unique set of welding parameter settings, and these parameters together constitute an adjustment scheme.
[0137] Relevant Parameters: The relevant parameters to be set include the population size (i.e., the number of grey wolves), the maximum number of iterations (the maximum number of loops for the algorithm to run), and the convergence factor (a parameter affecting the convergence speed and search accuracy of the algorithm).
[0138] Initialization of Position: Randomly initialize the positions of the grey wolf population according to the second eigenvector (i.e., the vector composed of real-time welding data). The initial parameters of each grey wolf (i.e., each adjustment scheme for welding data) are randomly selected within a certain range according to the second eigenvector.
[0139] S714 Calculate the fitness. For each grey wolf, recalculate the fitness value of the second eigenvector, and take the grey wolf corresponding to the minimum fitness value as the leading wolf.
[0140] Fitness Value: For each grey wolf (i.e., each adjustment scheme for welding data), it is necessary to recalculate the fitness value of its second eigenvector. This fitness value reflects the performance or effect of the welding data after adjusting the real-time welding data according to this adjustment scheme during the welding process.
[0141] Selection of the Leading Wolf: Take the grey wolf with the minimum fitness value as the leading wolf, that is, in the current population, the grey wolf with the best performance (i.e., the minimum fitness value) is regarded as the leader (optimal solution).
[0142] S715 Update the position. Update the position of the leading wolf according to the social hierarchy of the grey wolves, and execute S714 to calculate the fitness until the stop condition is met, and then execute S716 to obtain the scheme. The stop conditions include: reaching the maximum number of iterations or converging to a certain predetermined fitness value.
[0143] S716 Obtain the scheme. Obtain the adjustment scheme for the welding data corresponding to the leading wolf as the final adjustment scheme.
[0144] S717 Fourth Evaluation: Input the welding data corresponding to the final adjustment scheme into the trained welding quality evaluation model to obtain the fourth evaluation result.
[0145] S718 Fifth Judgment: Judge whether the fourth evaluation result meets the expectation. If so, execute S720 Second Adjustment; if not, execute S719 Alarm.
[0146] S719 Alarm: Send an alarm signal.
[0147] S720 Second adjustment: Adjust the real-time welding data according to the final adjustment plan.
[0148] S721 First adjustment: Adjust the real-time welding data according to the target data.
[0149] In the S8 feedback, the feedback signal further includes: the final adjustment plan and the evaluation value of the real-time welding data.
[0150] In this embodiment, key information is extracted from the first evaluation result to obtain a third feature vector representing the classification probability of the real-time welding data. Then, the weighted average algorithm is used to calculate the evaluation value of the real-time welding data based on the eigenvalues in the third feature vector. Then, according to the comparison between the evaluation value and the preset threshold, it is determined whether incremental learning needs to be performed or the real-time welding data needs to be adjusted. If the evaluation value does not meet the expectation and is caused by new welding materials, the steps of incremental learning are performed (updating the parameters of the welding quality evaluation model using the online gradient descent algorithm). If the evaluation value does not meet the expectation but is not caused by new materials, the real-time welding data is adjusted.
[0151] The process of adjusting the real-time welding data in this embodiment is as follows: Through the first set of steps to the fourth judgment step, target data similar to the current working condition is searched for in the historical welding data, and the real-time welding data is adjusted according to the target data. If there is no welding data in the historical welding data that makes the evaluation result (i.e., the third evaluation result) meet the expectation, a new adjustment plan is searched for through the initialization step to the second adjustment step, and the real-time welding data is adjusted according to the adjustment plan, so that the welding quality evaluation model can adapt to different welding materials as much as possible. By searching for target data similar to the current working condition in the historical welding data and adjusting the real-time welding data according to the target data, the value of the historical data is fully utilized, and the accuracy and efficiency of the adjustment are improved. When there is no welding data that meets the conditions in the historical data, a new adjustment plan is searched for through the initialization step, so that the welding quality evaluation model can adapt to different welding materials and working conditions. The implementation of the adjustment plan enables the welding quality evaluation model to adapt to different welding materials as much as possible, improving the practicability and reliability of the model.
[0152] Example 3: Refer to Figure 3 , the difference between this embodiment and Embodiment 1 is that after performing S5 First Judgment and before performing S6 First Evaluation, it further includes:
[0153] S91 Sixth calculation: Record the historical welding data corresponding to when the similarity value is greater than the preset similarity threshold as the first data.
[0154] S92 Sixth judgment: Judge whether the number of the first data is one. If so, perform S93 clustering; if not, perform S6 First Evaluation.
[0155] S93 Clustering: Use the K-Means clustering algorithm to cluster historical welding data to obtain a normal welding data set and an abnormal welding data set.
[0156] S94 Obtain Centers: After clustering is completed, obtain the clustering center of the normal welding data set (denoted as the second data) and the clustering center of the abnormal welding data set (denoted as the third data).
[0157] The clustering centers of these data sets are actually welding data. Denote the welding data corresponding to the clustering center of the normal welding data set as the second data, and denote the welding data corresponding to the clustering center of the abnormal welding data set as the third data.
[0158] S95 Seventh Calculation: Calculate the Euclidean distance between the first data and the second data, denoted as the first Euclidean distance; calculate the Euclidean distance between the first data and the third data, denoted as the second Euclidean distance.
[0159] S96 Seventh Judgment: Respectively judge whether the first Euclidean distance and the second Euclidean distance are less than the preset distance threshold. If so, it means that the first data is close enough to a certain clustering center and can be considered to belong to the cluster represented by this clustering center, and then execute S6 First Evaluation; if not, it means that the current data division may not be accurate enough or the selection of clustering centers is not reasonable enough, and execute S97 Re-division.
[0160] S97 Re-division: Use the large law (also known as the Otsu method) to re-determine the value for dividing historical welding data, and re-divide the historical welding data into a normal data set and an abnormal data set according to this value.
[0161] S98 Reset Centers: Calculate the Euclidean distance between the i-th sample in the normal data set and the remaining samples, denoted as the fourth data, and take the sample corresponding to the minimum sum of the fourth data as the new second data. Calculate the Euclidean distance between the i-th sample in the abnormal data set and the remaining samples, denoted as the fifth data, and take the sample corresponding to the minimum sum of the fifth data as the new third data. Re-execute S95 Seventh Calculation to update the value of the Euclidean distance.
[0162] This embodiment includes counting the number of similarity values greater than the preset threshold, and accordingly judging whether K-Means clustering is required to obtain normal and abnormal welding data sets. Subsequently, calculate the Euclidean distance between these similar data and the clustering centers, and judge the attribution of the data based on the distance. Or when necessary, use the large law to re-divide the data set and reset the clustering centers, and re-execute S95 Seventh Calculation to verify whether the classification error is caused by the problem of the clustering centers.
[0163] Embodiment 4: This embodiment discloses an intelligent welding quality monitoring system, and the system includes:
[0164] A processor and a memory,
[0165] wherein program code is stored in the memory;
[0166] When the processor calls the program code in the memory, it executes the steps of the method.
[0167] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereby. Therefore, all equivalent changes made according to the structure, shape, and principle of the present application shall be covered within the protection scope of the present application.
Claims
1. An intelligent monitoring method for welding quality, characterized in that, Including: Database building: Build a database storing multiple first feature vectors, where the first feature vectors are composed of multiple historical welding data with the same timestamp; Modeling: Build a welding quality evaluation model, and use historical welding data to train the welding quality evaluation model to obtain a trained welding quality evaluation model; Data acquisition: Collect various real-time welding data and integrate all the real-time welding data into a second feature vector; First calculation: Calculate the similarity between the second feature vector and each first feature vector respectively to obtain multiple similarity values; First judgment: Judge whether there is a similarity value greater than a preset similarity threshold. If so, execute the steps of the first evaluation; if not, execute the feedback steps; First evaluation: Input the real-time welding data into the trained welding quality evaluation model to obtain a first evaluation result; Second judgment: Judge whether the first evaluation result meets the expectation. If so, execute the data acquisition step after a preset time interval; If not, execute the feedback steps; Feedback: Send a feedback signal, where the feedback signal includes: the similarity between the first feature vector and the second feature vector and / or the first evaluation result; Before executing the feedback steps after executing the second judgment step, it further includes: Second evaluation: Including feature extraction, second calculation, third judgment and output; Feature extraction: Based on the steps of the first evaluation, obtain the feature vector of the first evaluation result, denoted as the third feature vector. Each eigenvalue in the third feature vector represents the probability when the real-time welding data is classified into different categories; Second calculation: Use the weighted average algorithm to calculate the evaluation value of the real-time welding data based on the eigenvalues in the third feature vector; Third judgment: Judge whether the evaluation value is greater than a preset evaluation threshold. If so, execute the output step; if not, execute the feedback steps; Output: Output a signal indicating normal welding; The feedback signal further includes: the evaluation value of the real-time welding data; Before executing the feedback steps after executing the third judgment step, it further includes: First setting: Perform normalization processing on the first feature vector to obtain a fourth feature vector, and sequentially splice the fourth feature vectors into a first matrix. The element in the i-th row and j-th column of the first matrix represents the j-th eigenvalue in the i-th fourth feature vector; First obtaining: Sequentially splice the maximum values of each column in the first matrix into a fifth feature vector; sequentially splice the minimum values of each column in the first matrix into a sixth feature vector; Third calculation: Calculate the index value of the i-th fourth feature vector in the first matrix and the fifth feature vector. The calculation model is as follows: ; Among them, is the index value of the i-th fourth eigenvector and the fifth eigenvector in the first matrix; is the eigenvalue of the j-th column in the i-th fourth eigenvector; is the j-th eigenvalue in the fifth eigenvector; n is the total number of eigenvalues in the fifth eigenvector; m is the number of fourth eigenvectors in the first matrix; Fourth calculation: Calculate the index value of the i-th fourth feature vector in the first matrix and the sixth feature vector. The calculation model is as follows: ; Among them, is the index value of the i-th fourth eigenvector and the sixth eigenvector in the first matrix; is the j-th eigenvalue in the sixth eigenvector; Fifth calculation: Calculate the ideal value of the i-th fourth feature vector. The calculation model is as follows: ; Among them, is the ideal value of the i-th fourth eigenvector; Second setting: Set the historical welding data corresponding to the maximum ideal value as the target data; First adjustment: Adjust the real-time welding data according to the target data.
2. The intelligent welding quality monitoring method according to claim 1, wherein Before executing the output step after executing the third judgment step, it further includes: Incremental learning: Obtain the loss function of the trained welding quality evaluation model, adopt the online gradient descent algorithm, and use the real-time welding data to calculate the gradient of the loss function with respect to the parameters of the trained welding quality evaluation model; Update parameters: Use the gradient to update the parameters of the trained welding quality evaluation model to obtain a new welding quality evaluation model; Data storage: Update the real-time welding data to the database, and after an interval of a preset duration, execute the step of data collection.
3. The intelligent monitoring method for welding quality according to claim 1, characterized in that, After executing the steps of the second setting and before executing the steps of the first adjustment, it further includes: Third evaluation: Input the target data into the trained welding quality evaluation model to obtain a third evaluation result; Fourth judgment: Judge whether the third evaluation result meets the expectation. If so, execute the steps of the first adjustment; if not, execute the feedback step.
4. The intelligent monitoring method for welding quality according to claim 3, wherein, After executing the steps of the fourth judgment and before executing the feedback step, it further includes: Initialization: Set the relevant parameters of the gray wolf population, randomly initialize the positions of the gray wolf population according to the second eigenvector. Each gray wolf in the gray wolf population represents an adjustment scheme for welding data. The relevant parameters include the population size, the maximum number of iterations, and the convergence factor; Calculate fitness: Recalculate the fitness value of the second eigenvector for each gray wolf, and take the gray wolf corresponding to the minimum fitness value as the alpha wolf; Position update: Update the position of the alpha wolf according to the social hierarchy of the gray wolves, and execute the step of calculating the fitness until the stop condition is met; Obtain the scheme: Obtain the adjustment scheme for the welding data corresponding to the alpha wolf as the final adjustment scheme; Second adjustment: Adjust the real-time welding data according to the final adjustment scheme; The feedback signal further includes: the final adjustment scheme.
5. The intelligent monitoring method for welding quality according to claim 4, wherein, After executing the steps of obtaining the scheme and before executing the steps of the second adjustment, it further includes: Fourth evaluation: Input the welding data corresponding to the final adjustment scheme into the trained welding quality evaluation model to obtain a fourth evaluation result; Fifth judgment: Judge whether the fourth evaluation result meets the expectation. If so, execute the steps of the second adjustment; if not, execute the warning step; Warning: Send out a warning signal.
6. The intelligent monitoring method for welding quality according to claim 1 or 2, characterized in that, After executing the steps of the first judgment and before executing the steps of the first evaluation, it further includes: Sixth calculation: Record the historical welding data corresponding to when the similarity value is greater than the preset similarity threshold as the first data; Sixth judgment: Judge whether the number of the first data is one. If so, execute the clustering step; if not, execute the steps of the first evaluation; Clustering: Use the K-Means clustering algorithm to cluster the historical welding data to obtain a normal welding data set and an abnormal welding data set; Obtain the center: Obtain the clustering center of the normal welding data set, denoted as the second data; obtain the clustering center of the abnormal welding data set, denoted as the third data; Seventh calculation: Calculate the Euclidean distance between the first data and the second data, denoted as the first Euclidean distance; calculate the Euclidean distance between the first data and the third data, denoted as the second Euclidean distance; Seventh judgment: Respectively judge whether the first Euclidean distance and the second Euclidean distance are less than the preset distance threshold. If so, execute the steps of the first evaluation; if not, execute the step of data collection.
7. The intelligent monitoring method for welding quality according to claim 6, wherein After performing the step of the seventh determination and before performing the step of data collection, it further includes: Redivision: Using the major law to re-determine the values for dividing the historical welding data, and re-dividing the historical welding data into a normal data set and an abnormal data set according to the values; Resetting the center: Calculating the Euclidean distance between the i-th sample in the normal data set and the remaining samples respectively, denoted as the fourth data, and taking the sample corresponding to the minimum sum of the fourth data as the new second data. Calculating the Euclidean distance between the i-th sample in the abnormal data set and the remaining samples respectively, denoted as the fifth data, and taking the sample corresponding to the minimum sum of the fifth data as the new third data, and re-performing the step of the seventh calculation.
8. An intelligent welding quality monitoring system, characterized in that, It includes: A processor and a memory, Program codes are stored in the memory; When the processor calls the program codes in the memory, it executes the steps of the method described in any one of claims 1-7.
Citation Information
Patent Citations
Support vector machine classifier utilizing overall intercommunication weighting
CN101599126A
Commodity recommendation method based on neighbor users and comment information
CN112884551A