Welding gun fault prediction method and device based on knowledge distillation and electronic equipment
By using a knowledge distillation-based approach and training a welding torch fault prediction model with multimodal sensor data, the problem of welding torch fault detection relying on human experience is solved, enabling rapid and accurate fault prediction and reducing production line downtime risks and maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, welding torch fault detection relies on manual experience, which results in low accuracy, can easily lead to production line downtime, and consumes a lot of manpower.
A knowledge distillation-based approach is adopted. By acquiring historical data from multimodal sensors, data cleaning and feature extraction are performed. A teacher model for welding torch fault prediction is trained using a ResNet-LSTM neural network, and a student model for welding torch fault prediction is obtained through knowledge distillation using a lightweight LSTM neural network, thus achieving fast and accurate fault prediction.
It reduces the demand for computing resources at the edge, improves the accuracy and timeliness of welding torch failure prediction, and reduces the risk of production line downtime and maintenance costs.
Smart Images

Figure CN121637154A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automobile production, and in particular to a welding gun fault prediction method and device based on knowledge distillation and electronic equipment. BACKGROUND
[0002] In automobile body welding production, the welding gun is the core equipment, and a production line usually has 20 to 30 welding guns. Problems such as electrode wear, current abnormalities, and cooling system failures can all cause welding quality defects (such as virtual welding and missed welding). If not discovered in time, it may result in unqualified products, or even cause the welding gun to burn out, leading to the shutdown of the entire production line and causing huge losses to the vehicle manufacturer. The general response method is to use regular manual inspection, as follows: 1) Daily inspection: The welding gun at each welding station is inspected every 2 hours by the operator at the station in cooperation with the inspection personnel during the production gap, mainly for quick inspection of the appearance and basic functions of the welding gun; 3) Special inspection: A comprehensive special inspection is performed once a week by a professional equipment maintenance and inspection team, which detects all key components and performance parameters of the welding gun in detail to thoroughly investigate potential wear and tear problems; 3) Monthly inspection: A monthly comprehensive inspection is performed at the end of each month by a joint inspection team composed of the technical department, equipment management department, and production department to comprehensively evaluate the overall wear and tear, usage, and maintenance records of the welding gun, and provide a basis for subsequent welding gun management and maintenance plan adjustments.
[0003] However, the above method not only requires a large amount of manpower, but also relies on human experience for prediction, which is not very accurate and can lead to delayed fault discovery, still posing a significant production risk.
[0004] The above problems need to be solved urgently. SUMMARY
[0005] The purpose of the present application is to at least partially solve one of the technical problems in the prior art.
[0006] To this end, one purpose of an embodiment of the present application is to provide a welding gun fault prediction method based on knowledge distillation, which reduces the resource requirements of the edge and improves the accuracy and timeliness of welding gun fault prediction.
[0007] Another purpose of an embodiment of the present application is to provide a welding gun fault prediction device based on knowledge distillation.
[0008] In order to achieve the above technical purposes, the technical solutions adopted by the embodiments of the present application include: In one aspect, the embodiment of the present application provides a welding gun fault prediction method based on knowledge distillation, comprising the following steps: Obtaining multi-modal sensor historical data of a sample welding gun, wherein the multi-modal sensor historical data comprises historical electrical parameters, historical mechanical parameters and historical process parameters; Performing data cleaning and feature extraction on the multi-modal sensor historical data to obtain multi-modal time series feature samples, and determining real fault labels corresponding to the multi-modal time series feature samples; Training a pre-constructed ResNet-LSTM neural network according to the multi-modal time series feature samples and the real fault labels to obtain a welding gun fault prediction teacher model; Performing knowledge distillation on the welding gun fault prediction teacher model based on a light-weighted LSTM neural network to obtain a welding gun fault prediction student model, and issuing the welding gun fault prediction student model to an edge node through a cloud server; Obtaining multi-modal time series feature data of a target welding gun through the edge node, and inputting the multi-modal time series feature data into the welding gun fault prediction student model to obtain a fault prediction result of the target welding gun.
[0009] Further, in one embodiment of the present application, the historical electrical parameters comprise at least two of historical welding current time series data, historical welding voltage time series data and historical welding power time series data, the historical mechanical parameters comprise historical electrode pressure time series data, historical electrode wear degree time series data and historical welding gun posture time series data, and the historical process parameters comprise historical welding gas flow time series data, historical welding temperature time series data, historical welding time length sequence and historical number of welding points sequence.
[0010] Further, in one embodiment of the present application, the data cleaning and feature extraction on the multi-modal sensor historical data to obtain multi-modal time series feature samples specifically comprises: Detecting abnormal values and missing values of the multi-modal sensor historical data based on a sliding window, filtering out the abnormal values and interpolating and completing the missing values to obtain multi-modal sample data; Extracting mean value, variance, peak value, valley value and maximum fluctuation amplitude of each modality of the multi-modal sample data in different time windows to obtain time domain feature samples; Performing Fourier transform on each modality of the multi-modal sample data respectively, and extracting main frequency energy proportion and harmonic energy proportion to obtain frequency domain feature samples; Calculating change trends of each modality of the multi-modal sample data at different time points to obtain trend feature samples; The time domain feature samples, the frequency domain feature samples and the trend features of each modality are subjected to data dimension reduction and standardization processing to obtain the multi-modal time sequence feature samples.
[0011] Further, in an embodiment of the present application, the pre-constructed ResNet-LSTM neural network is trained according to the multi-modal time sequence feature samples and the real fault labels to obtain a welding torch fault prediction teacher model, which specifically comprises: The multi-modal time sequence feature samples are input into the ResNet-LSTM neural network to obtain a first fault prediction result; A first loss value is determined according to the first fault prediction result and the real fault labels; The parameters of the ResNet-LSTM neural network are updated according to the first loss value to obtain the welding torch fault prediction teacher model.
[0012] Further, in an embodiment of the present application, the ResNet-LSTM neural network comprises a ResNet network, a feature fusion layer, an LSTM network and an output layer, and the multi-modal time sequence feature samples are input into the ResNet-LSTM neural network to obtain a first fault prediction result, which specifically comprises: Local spatial features of each modality of the multi-modal time sequence feature samples are extracted by the ResNet network; The local spatial features of each modality are subjected to feature fusion based on an attention mechanism by the feature fusion layer to obtain global fusion features; Temporal-spatial fusion features are generated according to the global fusion features of multiple consecutive time steps; A hidden state vector is obtained by performing hidden state calculation on the temporal-spatial fusion features by the LSTM network; The hidden state vector is mapped into the first fault prediction result by the output layer.
[0013] Further, in an embodiment of the present application, the welding torch fault prediction teacher model is subjected to knowledge distillation based on a light-weighted LSTM neural network to obtain a welding torch fault prediction student model, which specifically comprises: A light-weighted LSTM neural network is constructed; The multi-modal time sequence feature samples are input into the light-weighted LSTM neural network to obtain a second fault prediction result; The multi-modal time sequence feature samples are input into the welding torch fault prediction teacher model to obtain a third fault prediction result; A second loss value is determined according to the second fault prediction result, the third fault prediction result and the real fault labels. update parameters of the light-weighted LSTM neural network according to the second loss value, to obtain the welding torch fault prediction student model.
[0014] Further, in an embodiment of the present application, the second loss value is determined according to the second fault prediction result, the third fault prediction result and the real fault label, which specifically comprises: calculating a KL divergence loss value of the second fault prediction result and the third fault prediction result; calculating a cross-entropy loss value of the second fault prediction result and the real fault label; weighting and summing the KL divergence loss value and the cross-entropy loss value based on a preset weight parameter, to obtain the second loss value.
[0015] In another aspect, an embodiment of the present application provides a welding torch fault prediction device based on knowledge distillation, comprising: a data acquisition module configured to acquire multi-modal sensor historical data of a sample welding torch, wherein the multi-modal sensor historical data comprises historical electrical parameters, historical mechanical parameters and historical process parameters; a sample construction module configured to perform data cleaning and feature extraction on the multi-modal sensor historical data, to obtain multi-modal time series feature samples, and to determine real fault labels corresponding to the multi-modal time series feature samples; a model training module configured to train a pre-constructed ResNet-LSTM neural network according to the multi-modal time series feature samples and the real fault labels, to obtain a welding torch fault prediction teacher model; a knowledge distillation module configured to perform knowledge distillation on the welding torch fault prediction teacher model based on a light-weighted LSTM neural network, to obtain a welding torch fault prediction student model, and to distribute the welding torch fault prediction student model to an edge node through a cloud server; a fault prediction module configured to acquire multi-modal time series feature data of a target welding torch through the edge node, and to input the multi-modal time series feature data into the welding torch fault prediction student model, to obtain a fault prediction result of the target welding torch.
[0016] In another aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor; at least one memory configured to store at least one program; when the at least one program is executed by the at least one processor, the at least one processor is caused to implement the above-mentioned welding torch fault prediction method based on knowledge distillation.
[0017] In another aspect, the embodiment of the present application also provides a computer readable storage medium, wherein a computer program executable by a processor is stored, and the computer program implements the knowledge distillation-based welding gun fault prediction method when executed by the processor.
[0018] In another aspect, the embodiment of the present application also provides a computer program product comprising a computer program, and the computer program implements the knowledge distillation-based welding gun fault prediction method when executed by a processor.
[0019] The advantages and beneficial effects of the present application will be partially given in the following description, partially will become obvious from the following description, or will be understood through the practice of the present application: The embodiment of the present application obtains the multi-modal sensor historical data of the sample welding gun, the multi-modal sensor historical data comprising historical electrical parameters, historical mechanical parameters and historical process parameters, performs data cleaning and feature extraction on the multi-modal sensor historical data to obtain multi-modal time series feature samples, determines the real fault labels corresponding to the multi-modal time series feature samples, trains a pre-constructed ResNet-LSTM neural network according to the multi-modal time series feature samples and the real fault labels to obtain a welding gun fault prediction teacher model, performs knowledge distillation on the welding gun fault prediction teacher model based on a lightweight LSTM neural network to obtain a welding gun fault prediction student model, and distributes the welding gun fault prediction student model to an edge node through the cloud, obtains the multi-modal time series feature data of the target welding gun through the edge node, inputs the multi-modal time series feature data into the welding gun fault prediction student model to obtain the fault prediction result of the target welding gun. The embodiment of the present application extracts multi-modal time series features based on the electrical parameters, mechanical parameters and process parameters of the welding gun, trains a welding gun fault prediction teacher model through a ResNet-LSTM neural network in the cloud, then performs knowledge distillation based on a lightweight LSTM neural network to obtain a welding gun fault prediction student model and distribute it to an edge node, so that the welding gun on the production line can be quickly and accurately fault predicted at the edge node, the resource demand of the edge end is reduced, the accuracy and timeliness of the welding gun fault prediction are improved, and the downtime risk and maintenance cost of the production line are also reduced. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following introduces the drawings needed to be used in the embodiments of the present application. It should be understood that the drawings introduced in the following merely for the convenience of clearly describing part of the embodiments of the technical solutions of the present application, and for those skilled in the art, other drawings can also be obtained without paying creative labor on the premise of the drawings.
[0021] Figure 1A step flow chart of a welding gun fault prediction method based on knowledge distillation provided for an embodiment of the present application is shown in FIG. 1. Figure 2 A structural block diagram of a welding gun fault prediction device based on knowledge distillation provided for an embodiment of the present application is shown in FIG. 2. Figure 3 A structural block diagram of an electronic device provided for an embodiment of the present application is shown in FIG. 3. DETAILED DESCRIPTION
[0022] In order to make the objectives, technical solutions and advantages of the present application clearer, further detailed description will be given below in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementation described in the following exemplary embodiments does not represent all the implementations consistent with the embodiments of the present application, but is only an example of devices and methods consistent with some aspects of the embodiments of the present application as described in the appended claims.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0024] The welding gun fault prediction method based on knowledge distillation provided by the embodiments of the present application can be applied in a terminal, can also be applied in a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, etc., but is not limited thereto; the server end can be configured as an independent physical server, can also be configured as a server cluster or a distributed system composed of multiple physical servers, can also be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform, and the server can also be a node server in a blockchain network; the software can be an application for implementing the welding gun fault prediction method based on knowledge distillation, etc., but is not limited to the above forms.
[0025] This invention can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This invention can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0026] It should be noted that in various specific embodiments of the present invention, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of the present invention require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to a confirmation page. Only after obtaining the user's separate permission or consent is the necessary user-related data for the normal operation of the embodiments of the present invention acquired.
[0027] Reference Figure 1 This invention provides a welding torch fault prediction method based on knowledge distillation, which specifically includes the following steps: S101. Obtain historical data of the multimodal sensor of the sample welding torch. The historical data of the multimodal sensor includes historical electrical parameters, historical mechanical parameters and historical process parameters. S102. Perform data cleaning and feature extraction on the historical data of the multimodal sensor to obtain multimodal time series feature samples, and determine the real fault labels corresponding to the multimodal time series feature samples. S103. Train the pre-built ResNet-LSTM neural network based on multimodal temporal feature samples and real fault labels to obtain the welding torch fault prediction teacher model. S104. Based on the lightweight LSTM neural network, knowledge distillation is performed on the welding torch fault prediction teacher model to obtain the welding torch fault prediction student model, and the welding torch fault prediction student model is distributed to the edge node through the cloud. S105. Obtain the multimodal time-series feature data of the target welding torch through edge nodes, and input the multimodal time-series feature data into the welding torch fault prediction student model to obtain the fault prediction result of the target welding torch.
[0028] This invention extracts multimodal time-series features based on the electrical, mechanical, and process parameters of the welding torch. A teacher model for welding torch fault prediction is trained in the cloud using a ResNet-LSTM neural network. Then, a student model for welding torch fault prediction is obtained by knowledge distillation based on a lightweight LSTM neural network and distributed to edge nodes. This enables fast and accurate fault prediction of welding torches on the production line at edge nodes, reducing the computing power resource requirements at the edge and improving the accuracy and timeliness of welding torch fault prediction. It also reduces the downtime risk and maintenance cost of the production line.
[0029] As an optional implementation, the historical electrical parameters include at least two of the following: historical welding current timing data, historical welding voltage timing data, and historical welding power timing data; the historical mechanical parameters include historical electrode pressure timing data, historical electrode wear timing data, and historical welding torch posture timing data; and the historical process parameters include historical welding gas flow timing data, historical welding temperature timing data, historical welding duration sequence, and historical weld point number sequence.
[0030] Specifically, multiple types of sensors are deployed on the welding torch and its supporting equipment to collect various key parameters in real time, including: 1) Electrical parameters: welding current, voltage, and power fluctuations; 2) Mechanical parameters: welding torch electrode pressure, electrode wear, welding torch posture; 3) Environmental and process parameters: welding gas flow rate, welding temperature, welding time and number of weld points.
[0031] By aligning the collected key parameters in time sequence, the historical data of the multimodal sensor can be obtained.
[0032] As a further optional implementation, the historical data of the multimodal sensor is cleaned and features are extracted to obtain multimodal time-series feature samples, which specifically include: S1021. Based on the sliding window, detect outliers and missing values in the historical data of the multimodal sensor, filter out outliers and interpolate and fill in missing values to obtain multimodal sample data; S1022. Extract the mean, variance, peak value, valley value, and maximum fluctuation amplitude of each mode of the multimodal sample data within different time windows to obtain time-domain feature samples; S1023. Perform Fourier transform on each mode of the multimodal sample data and extract the main frequency energy ratio and harmonic energy ratio to obtain frequency domain feature samples. S1024. Calculate the changing trend of each mode of the multimodal sample data at different times to obtain trend feature samples; S1025. Perform dimensionality reduction and standardization on the time-domain feature samples, frequency-domain feature samples, and trend features of each modality to obtain multimodal time-series feature samples.
[0033] Specifically, a sliding window (window size 10 seconds) is used to remove outliers (such as jump values caused by sensor jitter, which are identified by the 3σ principle) and missing values from the sensor data (when the missing rate is <5%, linear interpolation is used to fill in the missing values, and when the missing rate is ≥5%, the data in the window is removed) to obtain multimodal sample data.
[0034] Feature extraction for multimodal data is performed as follows: 1) Time-domain features: Extract the mean, variance, peak value, valley value, and maximum fluctuation amplitude (such as the difference between peak and valley values of current) of the parameters within each sliding window. 2) Frequency domain characteristics: Perform Fourier transform on high-frequency data such as current and voltage to extract features such as the dominant frequency and the proportion of harmonic energy; 3) Trend characteristics: Calculate the slope of parameter changes (such as the rate of electrode pressure decrease) within 1 minute to identify slow degradation trends; 4) Data dimensionality reduction and standardization: PCA is used to reduce the dimensionality of high-dimensional features, thereby reducing the computational cost of the model; at the same time, the features are standardized by Z-score (mean is 0, standard deviation is 1) to eliminate the influence of dimensions.
[0035] After obtaining multimodal time-series feature samples through the above steps, the corresponding real fault labels are determined by manual annotation. The real fault labels include the fault type (such as excessive electrode wear, current breakdown, gas blockage) and the fault occurrence time, thereby constructing a training dataset (covering 8-10 common fault types).
[0036] As an optional implementation, a pre-built ResNet-LSTM neural network is trained based on multimodal temporal feature samples and real fault labels to obtain a welding torch fault prediction teacher model, which specifically includes: S1031. Input the multimodal temporal feature samples into the ResNet-LSTM neural network to obtain the first fault prediction result; S1032. Determine the first loss value based on the first fault prediction result and the actual fault label; S1033. Update the parameters of the ResNet-LSTM neural network based on the first loss value to obtain the welding torch fault prediction teacher model.
[0037] As a further optional implementation, the ResNet-LSTM neural network includes a ResNet network, a feature fusion layer, an LSTM network, and an output layer. Multimodal temporal feature samples are input into the ResNet-LSTM neural network to obtain a first fault prediction result, which specifically includes: S10311. Extract the local spatial features of each modality of the multimodal temporal feature samples using the ResNet network; S10312. The feature fusion layer performs feature fusion on the local spatial features of each modality based on the attention mechanism to obtain global fused features; S10313. Generate spatiotemporal fusion features based on global fusion features from multiple consecutive time steps; S10314. The hidden state vector is obtained by calculating the hidden state of the spatiotemporal fusion features through an LSTM network. S10315. The hidden state vector is mapped to the first fault prediction result through the output layer.
[0038] Specifically, this embodiment of the invention trains a cloud-based teacher model based on a high-precision but structurally complex ResNet-LSTM neural network. The preprocessed training dataset is divided into a training set, a validation set, and a test set in a 7:2:1 ratio to ensure a consistent fault type distribution across sets (using stratified sampling). The training set is then input into the ResNet-LSTM neural network. The ResNet network extracts local spatial features of each modality from the multimodal temporal feature samples. A feature fusion layer, based on an attention mechanism, fuses these local spatial features to obtain global fusion features. Spatiotemporal fusion features are generated based on the global fusion features from multiple consecutive time steps. Then, the temporal dependencies of the spatiotemporal fusion features are extracted using an LSTM network to calculate the hidden state vector. Finally, the output layer maps the hidden state vector to the first fault prediction result.
[0039] The first loss value is determined based on the difference between the first fault prediction result and the actual fault label. Then, the parameters of the ResNet-LSTM neural network are updated through the backpropagation algorithm based on the first loss value to complete one iteration of training. When the number of iterations reaches a preset threshold or the model performance no longer improves, training is stopped, and the trained welding torch fault prediction teacher model is obtained.
[0040] As a further optional implementation, knowledge distillation is performed on the welding torch fault prediction teacher model based on a lightweight LSTM neural network to obtain a welding torch fault prediction student model, which specifically includes: S1041. Construct a lightweight LSTM neural network; S1042. Input the multimodal temporal feature samples into the lightweight LSTM neural network to obtain the second fault prediction result; S1043. Input the multimodal time series feature samples into the welding torch fault prediction teacher model to obtain the third fault prediction result; S1044. Determine the second loss value based on the second fault prediction result, the third fault prediction result, and the actual fault label. S1045. Update the parameters of the lightweight LSTM neural network according to the second loss value to obtain the student model for welding torch fault prediction.
[0041] Specifically, this embodiment of the invention uses a lightweight LSTM as the "student model." Through distillation loss, the student model learns the fault prediction distribution of the teacher model, improving prediction accuracy while maintaining model size. When constructing the lightweight LSTM neural network, the LSTM unit structure needs to be simplified (e.g., reducing the number of hidden layer neurons to 64-128, and using depthwise separable convolutions to replace some fully connected layers) to reduce the number of model parameters. Multimodal temporal feature samples are input into the lightweight LSTM neural network and the welding torch fault prediction teacher model, respectively, to obtain second and third fault prediction results. Then, based on the second and third fault prediction results and the true fault labels, a second loss value is determined. The parameters of the lightweight LSTM neural network are updated based on the second loss value, and then the next round of knowledge distillation begins.
[0042] This invention employs a 30-episode training process, using an early stopping mechanism (training stops when the validation set accuracy shows no improvement for 5 consecutive epochs) to prevent overfitting. After training, model performance is validated on the test set. If the prediction accuracy for a certain type of fault (e.g., gas leak) falls below 90%, labeled data for that fault type is supplemented, and the teacher model undergoes local fine-tuning and the student model undergoes knowledge distillation again, until the prediction accuracy for all fault types reaches the target. After obtaining the welding torch fault prediction student model, the model weights can be quantized from 32-bit floating-point numbers (FP32) to 8-bit integers (INT8), compressing the model size by 75% and increasing inference speed by 3-4 times, thus adapting to low computing power requirements.
[0043] The cloud distributes the trained welding torch fault prediction student model to the edge, enabling rapid and accurate fault prediction of welding torches on the production line at the edge, without the need to upload data to the cloud for prediction.
[0044] As a further optional implementation, a second loss value is determined based on the second fault prediction result, the third fault prediction result, and the actual fault label, specifically including: S10441. Calculate the KL divergence loss value between the second fault prediction result and the third fault prediction result. S10442. Calculate the cross-entropy loss value between the second fault prediction result and the actual fault label; S10443. Based on the preset weight parameters, the KL divergence loss value and the cross-entropy loss value are weighted and summed to obtain the second loss value.
[0045] Specifically, this embodiment of the invention employs a combined loss function of "cross-entropy loss + distillation loss". KL divergence loss is calculated based on the prediction results of the lightweight LSTM and the teacher model, while cross-entropy loss is calculated based on the prediction results of the lightweight LSTM and the true fault labels. The two are then weighted and summed to obtain the final second loss value (i.e., the distillation loss value). In this embodiment, the cross-entropy loss weight is 0.7, and the distillation loss weight is 0.3, thereby balancing the model fit and the distillation effect.
[0046] The method steps of the embodiments of the present invention have been described above. It can be understood that the embodiments of the present invention extract multimodal temporal features based on the electrical, mechanical, and process parameters of the welding torch. A teacher model for welding torch fault prediction is trained in the cloud using a ResNet-LSTM neural network. Then, a student model for welding torch fault prediction is obtained through knowledge distillation based on a lightweight LSTM neural network and distributed to edge nodes. This allows for fast and accurate fault prediction of welding torches on the production line at edge nodes, reducing the computational resource requirements at the edge, improving the accuracy and timeliness of welding torch fault prediction, and also reducing the risk of production line downtime and maintenance costs.
[0047] Compared with the prior art, the present invention has the following advantages: 1) Fault handling has shifted from "reactive maintenance" to "early warning," significantly reducing downtime losses. Traditional fault handling methods mainly rely on "reactive maintenance" or "regular maintenance," which have significant time lags; while model prediction can identify fault trends in advance and resolve problems in their early stages.
[0048] 2) Resource costs shift from "extensive consumption" to "precise allocation," reducing labor and material costs. Traditional methods rely on manual experience and fixed processes, resulting in significant waste of resources; model prediction enables precise management through data-driven approaches, optimizing resource allocation.
[0049] 3) Fault diagnosis shifts from "experience-dependent" to "data-driven," reducing misjudgments and omissions. Traditional fault diagnosis relies heavily on human experience, and its accuracy is greatly affected by personnel skills and condition; the model is trained with multi-dimensional data, making judgments more stable and comprehensive.
[0050] Reference Figure 2 This invention provides a welding torch fault prediction device based on knowledge distillation, comprising: The data acquisition module is used to acquire historical data of the multimodal sensor of the sample welding torch. The historical data of the multimodal sensor includes historical electrical parameters, historical mechanical parameters and historical process parameters. The sample construction module is used to perform data cleaning and feature extraction on historical data from multimodal sensors to obtain multimodal time-series feature samples and determine the real fault labels corresponding to the multimodal time-series feature samples. The model training module is used to train a pre-built ResNet-LSTM neural network based on multimodal temporal feature samples and real fault labels to obtain a welding torch fault prediction teacher model. The knowledge distillation module is used to perform knowledge distillation on the welding torch fault prediction teacher model based on a lightweight LSTM neural network to obtain the welding torch fault prediction student model, and then distribute the welding torch fault prediction student model to the edge nodes through the cloud. The fault prediction module is used to acquire multimodal time-series feature data of the target welding torch through edge nodes, and input the multimodal time-series feature data into the welding torch fault prediction student model to obtain the fault prediction result of the target welding torch.
[0051] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0052] Reference Figure 3 This invention provides an electronic device, comprising: At least one processor; At least one memory for storing at least one program; When the above-mentioned at least one program is executed by the above-mentioned at least one processor, the above-mentioned at least one processor implements the above-mentioned knowledge distillation-based welding torch fault prediction method.
[0053] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0054] This invention also provides a computer-readable storage medium storing a processor-executable computer program that, when executed by a processor, implements the aforementioned knowledge distillation-based welding torch fault prediction method.
[0055] This invention provides a computer-readable storage medium that can execute a knowledge distillation-based welding torch fault prediction method provided in the method embodiments of this invention. It can execute any combination of the implementation steps of the method embodiments and has the corresponding functions and beneficial effects of the method.
[0056] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described knowledge distillation-based welding torch fault prediction method.
[0057] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0058] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0059] The embodiments described in this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.
[0060] The terms "first," "second," "third," "fourth," etc. (if present) in the specification and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0061] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the aforementioned blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.
[0062] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the aforementioned functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0063] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0064] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0065] More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the aforementioned program can be printed, because the aforementioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0066] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0067] In the foregoing description of this specification, references to terms such as "one embodiment," "another embodiment," or "some embodiments" indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0068] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0069] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.
Claims
1. A method for welding torch failure prediction based on knowledge distillation, the method comprising: The method comprises the following steps: obtaining multi-modal sensor historical data of a sample welding gun, the multi-modal sensor historical data comprising historical electrical parameters, historical mechanical parameters and historical process parameters; performing data cleaning and feature extraction on the multi-modal sensor historical data to obtain multi-modal time series feature samples and determine corresponding real fault labels of the multi-modal time series feature samples; training a pre-constructed ResNet-LSTM neural network according to the multi-modal time series feature samples and the real fault labels to obtain a welding gun fault prediction teacher model; performing knowledge distillation on the welding gun fault prediction teacher model based on a light-weighted LSTM neural network to obtain a welding gun fault prediction student model, and issuing the welding gun fault prediction student model to an edge node through a cloud server; obtaining multi-modal time series feature data of a target welding gun through the edge node, and inputting the multi-modal time series feature data into the welding gun fault prediction student model to obtain a fault prediction result of the target welding gun.
2. The welding torch failure prediction method based on knowledge distillation according to claim 1, wherein, The historical electrical parameters comprise at least two of historical welding current time series data, historical welding voltage time series data and historical welding power time series data, the historical mechanical parameters comprise historical electrode pressure time series data, historical electrode wear degree time series data and historical welding gun posture time series data, and the historical process parameters comprise historical welding gas flow time series data, historical welding temperature time series data, a historical welding time sequence and a historical number of welding points sequence.
3. The welding torch failure prediction method based on knowledge distillation according to claim 1, wherein, The data cleaning and feature extraction on the multi-modal sensor historical data to obtain multi-modal time series feature samples specifically comprises: detecting abnormal values and missing values of the multi-modal sensor historical data based on a sliding window, filtering out the abnormal values and interpolating and completing the missing values to obtain multi-modal sample data; extracting mean values, variances, peak values, valley values and maximum fluctuation amplitudes of each mode of the multi-modal sample data in different time windows to obtain time domain feature samples; performing Fourier transform on each mode of the multi-modal sample data respectively, and extracting main frequency energy proportions and harmonic energy proportions to obtain frequency domain feature samples; calculating change trends of each mode of the multi-modal sample data at different time points to obtain trend feature samples; performing data dimension reduction and standardization processing on the time domain feature samples, the frequency domain feature samples and the trend features of each mode to obtain the multi-modal time series feature samples.
4. The welding torch failure prediction method based on knowledge distillation of claim 1, wherein, The training of the pre-constructed ResNet-LSTM neural network according to the multi-modal time series feature samples and the real fault labels to obtain the welding gun fault prediction teacher model specifically comprises: inputting the multi-modal time series feature samples into the ResNet-LSTM neural network to obtain a first fault prediction result; determining a first loss value according to the first fault prediction result and the real fault labels; updating parameters of the ResNet-LSTM neural network according to the first loss value to obtain the welding gun fault prediction teacher model.
5. The knowledge distillation-based welding torch failure prediction method of claim 4, wherein, The ResNet-LSTM neural network comprises a ResNet network, a feature fusion layer, an LSTM network, and an output layer, the multi-modal time sequence feature sample is input into the ResNet-LSTM neural network to obtain a first fault prediction result, and the method specifically comprises the following steps: extracting local spatial features of each modality of the multi-modal time sequence feature sample through the ResNet network; performing feature fusion on the local spatial features of each modality based on an attention mechanism through the feature fusion layer to obtain global fusion features; generating spatio-temporal fusion features according to the global fusion features of multiple continuous time steps; performing hidden state calculation on the spatio-temporal fusion features through the LSTM network to obtain a hidden state vector; mapping the hidden state vector into the first fault prediction result through the output layer.
6. The knowledge distillation-based welding torch failure prediction method of claim 1, wherein, The knowledge distillation module is configured to perform knowledge distillation on the welding gun fault prediction teacher model based on a light-weighted LSTM neural network to obtain a welding gun fault prediction student model, and the welding gun fault prediction student model is distributed to an edge node through a cloud. The method specifically comprises the following steps: constructing a light-weighted LSTM neural network; inputting the multi-modal time sequence feature sample into the light-weighted LSTM neural network to obtain a second fault prediction result; inputting the multi-modal time sequence feature sample into the welding gun fault prediction teacher model to obtain a third fault prediction result; determining a second loss value according to the second fault prediction result, the third fault prediction result, and the real fault label; 7. The knowledge distillation-based welding torch failure prediction method of claim 6, wherein, updating parameters of the light-weighted LSTM neural network according to the second loss value to obtain the welding gun fault prediction student model. The method specifically comprises the following steps: calculating a KL divergence loss value of the second fault prediction result and the third fault prediction result; calculating a cross-entropy loss value of the second fault prediction result and the real fault label; 8. A welding torch failure prediction device based on knowledge distillation, characterized by, performing weighted summation on the KL divergence loss value and the cross-entropy loss value based on a preset weight parameter to obtain the second loss value. The method comprises the following steps: a data acquisition module is configured to acquire multi-modal sensor historical data of a sample welding gun, wherein the multi-modal sensor historical data comprises historical electrical parameters, historical mechanical parameters, and historical process parameters; a sample construction module is configured to perform data cleaning and feature extraction on the multi-modal sensor historical data to obtain multi-modal time sequence feature samples and determine real fault labels corresponding to the multi-modal time sequence feature samples; a model training module is configured to train a pre-constructed ResNet-LSTM neural network according to the multi-modal time sequence feature samples and the real fault labels to obtain a welding gun fault prediction teacher model; a knowledge distillation module is configured to perform knowledge distillation on the welding gun fault prediction teacher model based on a light-weighted LSTM neural network to obtain a welding gun fault prediction student model, and the welding gun fault prediction student model is distributed to an edge node through a cloud. A fault prediction module is configured to acquire multi-modal time series feature data of a target welding gun through the edge node, and input the multi-modal time series feature data into the welding gun fault prediction student model to obtain a fault prediction result of the target welding gun.
9. An electronic device, comprising: The method comprises: at least one processor; at least one memory for storing at least one program; when the at least one program is executed by the at least one processor, the at least one processor implements a welding gun fault prediction method based on knowledge distillation as claimed in any one of claims 1 to 7.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement a welding gun fault prediction method based on knowledge distillation as claimed in any one of claims 1 to 7.