A SPR connection quality tracing method and system based on pruning light weight
By pruning and lightweighting the SPR connectivity quality traceability method, a simplified linear model is generated using standardized data and LIME. Combined with structured pruning, the problems of low prediction accuracy, slow speed, and poor interpretability in SPR connectivity quality traceability are solved, achieving efficient and accurate quality traceability and process parameter debugging.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTHEASTERN UNIV CHINA
- Filing Date
- 2026-03-24
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies for SPR connection quality traceability suffer from low curve prediction accuracy, slow inference speed, and poor interpretability, making it impossible to quickly and accurately trace the key process parameters that cause anomalies, resulting in low efficiency in quality control and production scheduling.
A pruning-based lightweight approach is adopted. By standardizing data, training a multi-output neural network regression model, and combining it with the LIME method to generate a simplified linear model, and then performing structured pruning to establish an inverse regression model, the quality of SPR connections can be accurately traced.
It improves prediction accuracy and inference speed, increases model interpretability, ensures the accuracy and stability of the connection process, meets the real-time response requirements of edge devices, and achieves millisecond-level quality diagnosis and precise adjustment of process parameters.
Smart Images

Figure CN121903644B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of neural network optimization technology, and in particular to a method and system for tracing SPR connection quality based on pruning and lightweighting. Background Technology
[0002] In precision manufacturing processes such as SPR (Self-Piercing Riveting), the quality of the connection directly determines the structural safety and reliability of the product. The force-displacement curve (hereinafter referred to as the "process curve") generated during SPR is the most comprehensive "fingerprint" reflecting the connection status, and subtle changes in its shape often indicate potential quality risks. Currently, the core pain point facing the industry has shifted from "whether the curve can be predicted" to "whether the curve can be understood"—that is, when an anomaly occurs in the curve, how to quickly and accurately trace the source to the key process parameters (such as sheet thickness, rivet length, and set path) that caused the anomaly. This "quality traceability" capability is crucial for achieving process optimization, closed-loop quality control, and rapid production scheduling.
[0003] Existing technical solutions have fundamental limitations in achieving effective source tracing: First, "black box" prediction models lack source tracing capabilities. Although complex models such as deep learning can achieve high-precision prediction of process curves, their decision-making process is opaque. When the predicted curve deviates from the standard curve, the model cannot answer the questions "Which specific parameter is responsible for this deviation?" and "How significant is the impact of this parameter?" This disconnect between prediction and interpretation limits the model's value in quality root cause analysis. Second, global interpretation cannot meet the needs of instance-level source tracing: Traditional methods based on feature importance or statistical correlation analysis can only provide the average influence trend of parameters on the global dataset. However, quality problems in production are often caused by single connections and nonlinear coupling of multiple parameters under specific operating conditions. Global interpretation cannot accurately pinpoint the root cause of specific abnormal instances, making it difficult to support rapid diagnosis and intervention at the production line level. There is also a contradiction between the timeliness of source tracing and deployment costs in the system. Models with certain interpretive capabilities are often computationally complex and cannot meet the real-time requirements of online source tracing on resource-constrained production line side-side equipment. This results in source tracing analysis being mostly conducted offline after the fact, failing to prevent defects from occurring within the critical production window and missing the best opportunity for process control. Finally, the system lacks interactive causal exploration tools: the existing system cannot support process engineers in causal reasoning. Engineers cannot interactively ask key questions such as, "If I increase the rivet length by 0.1mm, how will this abnormal curve change?" This lack of interactive source tracing capability severely hinders the accumulation and rapid iteration of process knowledge.
[0004] In recent years, research in the field of explainable artificial intelligence, especially model-agnostic local explanation techniques such as LIME (Local Interpretable Model-agnostic Explanations), has provided novel approaches to solving the aforementioned challenges. The core of this type of technology lies in constructing a local, interpretable approximation model for a single prediction result of any complex model, thereby revealing the causal relationship between input features (process parameters) and output (curve shape) in a way that humans can understand.
[0005] Therefore, there is an urgent need in this field for a technological breakthrough that can deeply integrate advanced local interpretability technology with the actual traceability needs of industrial manufacturing. This technological solution should not be limited to serving as a more accurate "black box" predictor, but should strive to become a "white box" traceability system capable of clearly indicating the direction and magnitude of the influence of each process parameter for a single curve generated from a single connection. This would provide a reliable, usable, and efficient data-driven solution for online quality diagnosis, precise adjustment of process parameters, and rapid line changeover in the SPR connection process. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this application provides a lightweight SPR connection quality traceability method and system based on pruning.
[0007] Firstly, a lightweight, pruning-based SPR connection quality tracing method is proposed, including:
[0008] The SPR curve and process parameters of the SPR process are standardized to obtain the standardized SPR curve and standardized process parameters; the SPR curve is plotted based on the riveting force and punch displacement data of the SPR process collected in real time.
[0009] The multi-output neural network regression model was trained using the standardized SPR curve and standardized process parameters.
[0010] Local perturbations are applied to the standardized process parameters; the perturbation samples are input into the trained multi-output neural network regression model to obtain the predicted SPR curve; based on the relationship between the perturbation samples and the predicted SPR curve, a simplified linear model is trained to obtain the regression coefficient matrix and the bias term of the simplified linear model.
[0011] The inverse regression model is trained using the standardized SPR curve, standardized process parameters, regression coefficient matrix, and bias term of the simplified linear model.
[0012] The abnormal SPR curves detected in real time are input into the inverse regression model to obtain the process parameters of the abnormal SPR curves.
[0013] Optionally, the method further includes:
[0014] Calculate the importance score of each neuron weight in the multi-output neural network regression model and the inverse regression model;
[0015] When the importance score of a neuron weight is lower than a preset threshold, the corresponding neuron and its associated connections are removed.
[0016] Optionally, the back regression model is trained using the following loss function:
[0017] ;
[0018] Where a is the balance coefficient; The primary supervised loss function; The goodness of fit of LIME linearity; The auxiliary loss function for LIME consistency; This is the total loss function.
[0019] Optionally, the LIME consistency auxiliary loss function is calculated as follows:
[0020] ;
[0021] in, These are explanatory pseudo-labels; Mean square error; This is a reverse regression model; Y is the standardized SPR curve.
[0022] Optionally, the explanatory pseudo-labels are generated by performing a local linear inversion on each standardized SPR curve Y using the regression coefficient matrix and bias terms; the calculation formula is as follows:
[0023] ;
[0024] Where λ is the regularization coefficient; C is the identity matrix; C is the regression coefficient matrix; To simplify the bias terms of the linear model; Let C be the transpose of C.
[0025] Optionally, the expression for the multi-output neural network regression model is:
[0026] ;
[0027] in, This is the predicted value for the SPR curve; For neural network mapping functions; These are the standardized process parameters.
[0028] Optionally, the simplified linear model is expressed as:
[0029] ;
[0030] in, It is the m-th standardized process parameter; is the m-th regression coefficient, representing the local influence weight of the m-th process parameter on the shape of the k-th sampling point of the predicted SPR curve; d is the number of standardized process parameters. To simplify the predicted values of the linear model; To simplify the bias term for the k-th sampling point in the linear model.
[0031] Optionally, the expression for the back regression model is:
[0032] ;
[0033] in, These are process parameters; This is the actual SPR curve; (·) represents the inverse regression model.
[0034] Optionally, the removal of the neuron and the connections associated with the neuron is performed using the following function:
[0035] ;
[0036] in, The importance score of the q-th channel neuron; Let be the weight of the q-th channel neuron; The preset threshold; W pruned The weights of the pruned, structured neurons.
[0037] Secondly, a lightweight SPR connection quality traceability system based on pruning is proposed, including:
[0038] The standardization module is used to standardize the SPR curve and the process parameters of the SPR process to obtain the standardized SPR curve and standardized process parameters; the SPR curve is plotted based on the riveting force and punch displacement data collected in real time during the SPR process.
[0039] The regression model training module is used to train a multi-output neural network regression model using standardized SPR curves and standardized process parameters.
[0040] The linear model training module is used to apply local perturbations to the standardized process parameters; the perturbation samples are input into the trained multi-output neural network regression model to obtain the predicted SPR curve;
[0041] Based on the relationship between the perturbation samples and the predicted SPR curve, a simplified linear model is trained to obtain the regression coefficient matrix and the bias term of the simplified linear model.
[0042] The inverse model training module is used to train an inverse regression model using the standardized SPR curve, standardized process parameters, regression coefficient matrix, and bias term of the simplified linear model.
[0043] The traceability result output module is used to input the abnormal SPR curve detected in real time into the inverse regression model to obtain the process parameters of the abnormal SPR curve.
[0044] Beneficial technical effects:
[0045] 1. This application improves prediction accuracy and inference speed, increases model interpretability, and ensures the accuracy and stability of the SPR connection process;
[0046] 2. The inverse regression model established in this application reduces multiplication and addition operations through a structured pruning strategy, thereby reducing computational complexity and achieving millisecond-level system response. Attached Figure Description
[0047] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a flowchart of the SPR connection quality traceability method based on pruning and lightweighting, according to an embodiment of this application.
[0049] Figure 2 This is a block diagram illustrating the principle of the SPR connection quality traceability system based on pruning and lightweight design, as described in this application. Detailed Implementation
[0050] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0051] With the widespread application of single-point connection technology in the automotive manufacturing industry, SPR (Surface Mount Reinforced Plastic) connection technology, as an important connection technique, is widely used for connecting body components. During SPR connection, changes in process parameters, such as sheet metal thickness, rivet length, path setting, and maximum applied force, directly affect the connection quality. However, existing methods for tracing connection failures have the following problems:
[0052] 1) Low curve prediction accuracy: Traditional methods cannot accurately predict connecting curves;
[0053] 2) Slow inference speed: Existing models have poor real-time response capabilities and slow inference speed during production.
[0054] 3) Poor interpretability: It is impossible to clearly understand the specific impact of each process parameter on the connection quality.
[0055] The purpose of this invention is to improve prediction accuracy, inference speed, and increase model interpretability by providing a pruning-based lightweight SPR connection quality tracing method and system, thereby ensuring the accuracy and stability of the connection process.
[0056] Example 1
[0057] This application discloses a lightweight SPR connection quality tracing method based on pruning, such as... Figure 1 As shown, it includes the following steps:
[0058] Step S1: Standardize the SPR curve and the process parameters of the SPR process to obtain the standardized SPR curve and standardized process parameters; the SPR curve is plotted based on the riveting force and punch displacement data collected in real time during the SPR process.
[0059] Specifically, the actual SPR curve data obtained during the connection process are first collected. This data is typically stored in time series format. Each SPR curve represents a change in the connection state during a process. Since the actual SPR curves use different process parameters, the flow charts may have varying lengths or numbers of sampling points, making direct comparison or statistical analysis difficult. Therefore, interpolation techniques are needed to standardize the data, ensuring that all curve data have the same length for consistent analysis.
[0060] 1) Sensor Data Collection and Curve Analysis: On the SPR (Signal-Reduction) connection production line, sensors (such as force sensors and displacement sensors) collect key physical quantities in real time during the connection process, forming SPR curves (e.g., pressure-time curves or displacement-time curves). These raw curve data vary in length and cannot be directly input into the neural network.
[0061] Alignment processing (equal-length sequence conversion):
[0062] The original SPR curves are standardized using linear interpolation or spline interpolation to ensure that all curves have the same eigenvector length. It is usually taken in the following form:
[0063] ;
[0064] in, This represents the interpolation algorithm function. This is the original non-uniform curve data. For the standardized sampling point index, The length of the feature vector. This represents the length of the original data.
[0065] Specifically, in this embodiment, the original data length is Non-uniform curves The length of the target feature vector mapped to is Standardized sequence The specific linear interpolation formula is as follows:
[0066] ;
[0067] Where i: index of the target sequence, with a value range of [1, N];
[0068] Target point The formula for calculating the corresponding "imaginary coordinates" in the original sequence is: ;
[0069] and : respectively represent to Round down and up to locate two adjacent sampling points in the original sequence;
[0070] : The raw force-displacement data points collected in real time by the sensor.
[0071] This step transforms the dynamic, non-uniform-length connection process data into a fixed-dimensional feature vector (length N), preparing it for batch processing input to the neural network.
[0072] 2) Process Parameter Standardization: The model input involves various process parameters (such as sheet thickness, rivet type, clamping force, stamping speed, etc.), which vary greatly in dimension and numerical range. To prevent parameters with large values from dominating model training and to eliminate the influence of different process parameter dimensions and ranges on model training, all input features (such as sheet thickness, rivet length, etc.) are standardized, specifically using Z-score standardization.
[0073] ;
[0074] in, Let μ be the original process parameters, σ be the mean of the original process parameters, and σ be the standard deviation of the original process parameters. Standardizing the parameters ensures that all features have a similar scale, avoiding significant impacts on model training caused by differences in the order of magnitude of certain parameters.
[0075] At this point, we have obtained M sample data that constitute the training set used for subsequent model training. Each sample contains a standardized SPR curve Y (length N) and the corresponding standardized process parameters. (d-dimensional).
[0076] Step S2: Train a multi-output neural network regression model using the standardized SPR curve and standardized process parameters;
[0077] 1) Model Design and Objectives:
[0078] Design a deep fully connected network. The model uses standardized process parameters. As input, a multilayer perceptron, formed by stacking multiple fully connected layers, generates multiple outputs, each corresponding to a predicted value of the SPR curve. The network structure can be represented as:
[0079] y = f(Wx + b);
[0080] Where x is the standardized process parameter, W is the weight matrix, b is the bias term of the fully connected network, and f is the activation function.
[0081] Each layer of the network undergoes a nonlinear transformation, gradually extracting high-level features from the input features and combining the extracted features to output regression prediction values.
[0082] The goal of the model design is to predict the entire SPR curve. (length is) sequence).
[0083] The expression for the multi-output neural network regression model is as follows:
[0084] ;
[0085] The network uses multi-layer nonlinear transformation Learn the complex mapping relationship between inputs (process parameters) and outputs (the entire curve shape).
[0086] 2) Training a multi-output neural network regression model using a loss function:
[0087] The training objective for a multi-output neural network is to minimize the error between the predicted value and the actual SPR curve.
[0088] In this specific embodiment, the loss function selected is the prediction curve that minimizes the mean squared error (MSE). Compared to the true curve The deviation at all points is expressed as follows:
[0089] ;
[0090] Where M is the total number of samples, and N is the total number of sampling points (length of feature vector) after the SPR curve is interpolated. For the first The first sample Predicted values for each sampling point For the first The first sample The true value of each sampling point.
[0091] 3) Use backpropagation algorithm and gradient descent optimization to train the neural network.
[0092] In the specific implementation process, the optimal regression model is obtained by iteratively reducing the loss function L, updating the network weight parameters W and bias b.
[0093] Furthermore, through backpropagation and optimizers such as Adam (Adaptive Moment Estimation), the network weights are iteratively updated, enabling the model to accurately predict the expected shape of the connection curve based on the given process parameters.
[0094] Step S3: Apply local perturbation to the standardized process parameters; input the perturbation sample into the trained multi-output neural network regression model to obtain the predicted SPR curve; based on the relationship between the perturbation sample and the predicted SPR curve, train the simplified linear model to obtain the regression coefficient matrix and the bias term of the simplified linear model;
[0095] To enhance the interpretability of neural networks, the LIME method is employed. In this method, new datasets are generated by locally perturbing process parameters. The perturbation involves making small adjustments to a single process parameter (uniformly and randomly within a certain range, essentially scanning within the engineering-allowed range), and then observing the changes in the output. For example, if a standardized process parameter is x1, multiple perturbed data points can be generated by adjusting x1 within a small range (e.g., ±0.1).
[0096] 1) Local Perturbation Generation: Deep neural networks are black-box models, while the LIME method is used to provide local interpretability. This is relevant for a specific prediction result (i.e., a set of process parameters). The generated prediction curve LIME makes tiny perturbations around it.
[0097] 2) Training a locally simplified model:
[0098] The set of data points generated by the perturbation is input into a neural network to obtain prediction results. This dataset, derived from the perturbation-generated data points and corresponding prediction results, is then used to train another interpretable machine learning model. To ensure the interpretability and simplicity of its output, models with fewer parameters, such as linear regression and decision trees, are typically used. The simplified model fits the output of the regression neural network locally (in the region where the perturbation data points are located), using the learned parameters to quantify the contribution of each process parameter to the connectivity curve.
[0099] In the specific implementation process, these local disturbance samples Input the multi-output neural network regression model trained in step 2 to obtain the corresponding predicted SPR curve. LIME then used these local data points to train a [system / program / etc.]. A highly accurate simplified linear model of the surrounding area:
[0100] ;
[0101] in, It is the m-th standardized process parameter; d represents the local influence weight of the m-th process parameter on the shape of the k-th sampling point of the predicted SPR curve; d is the number of standardized process parameters. To simplify the linear model for the first The bias term for each sampling point.
[0102] In the above simplified linear model calculation formula This constitutes the regression coefficient matrix. , is a d-row × N-column two-dimensional matrix generated by LIME, where d is the number of standardized process parameters; and N is the total number of sampling points for the standardized SPR curve.
[0103] Each row of C corresponds to a standardized process parameter m, and each column corresponds to a sampling point k of the standardized SPR curve. Matrix elements The meaning is: within the local neighborhood of the current sample, the first... For every unit change in the standardized process parameters, the standardized SPR curve [values missing]. The predicted value for each sampling point will change linearly. Units.
[0104] For the s-th sample in the training set, the LIME linear fit goodness R is calculated using a simplified linear model.s ², the calculation formula is as follows:
[0105] ;
[0106] Among them, R s The value of ² ranges from [0, 1]. The closer the value is to 1, the more accurately the simplified linear model fits the perturbation data near the sample. s is the sample index, indicating that the current sample being processed is the s-th sample in the training set (s = 1, 2, ..., M). t is the index of the local perturbation sample. K is the total number of local perturbation samples, representing the number of perturbation samples generated by LIME near the i-th sample. Let F be the true predicted value of the t-th local disturbance sample (from the multi-output neural network regression model), and let F be the mapping function F that generates the process parameters for the t-th local disturbance sample input into the multi-output neural network regression model. NN The SPR curve sampling point values obtained afterwards (after standardization); For the linear model prediction of the t-th local perturbation sample (given by the simplified linear model), use the regression coefficient matrix C and the bias term. The calculated fitted value; For all The mean, ȳ=(1 / K)Σ The benchmark used to measure the total sum of squares; The residual represents the portion of the error that the linear model failed to explain; The total deviation represents the fluctuation of the true predicted value of the t-th local perturbation sample relative to its mean, and is used to calculate the total sum of squares.
[0107] 3) Quantification of parameter influence:
[0108] Regression coefficients in a linear model Quantified in Nearby, the m-th standardized process parameter For curves The local contribution of shape.
[0109] The simplified model generated by the LIME method provides an interpretable approximation of large black-box neural networks to some extent. In this simplified model, each coefficient directly reflects the impact of process parameters on SPR curve prediction, further helping engineers understand the specific impact of each process parameter on connection quality.
[0110] Step S4: Train the back regression model using the standardized SPR curve, standardized process parameters, regression coefficient matrix, and bias term of the simplified linear model;
[0111] Based on the previously obtained SPR curve data and the approximate model generated by the LIME method, a back regression model is trained (this process may still require data preprocessing such as interpolation and z-score normalization, depending on the situation), which can infer the corresponding process parameters from the predicted SPR curve. The training set used to train the back regression model consists of M sample data points collected and standardized in step 1. Each sample contains a standardized SPR curve Y (length N) and the corresponding standardized process parameter x (d-dimensional), and the regression coefficient matrix C and bias terms for each sample have been pre-calculated using the LIME method in step 3. and goodness of fit R s ².
[0112] Specifically, in this embodiment, a back regression model g(·) is constructed, which takes the standardized SPR curve Y as input and inversely infers the standardized process parameter x that is most likely to produce the curve.
[0113] In this embodiment, the regression coefficient matrix C and bias terms obtained first are used using the LIME method. For each standardized SPR curve Y, a local linear inversion is performed to generate an interpretive pseudo-label X. lime The calculation formula is:
[0114] ;
[0115] Where λ is the regularization coefficient (typically taken as 1e). -4 ); It is the identity matrix; Let C be the transpose of matrix C;
[0116] Then, a dual-loss mechanism combining the main supervision loss and the LIME consistency auxiliary loss is adopted. The inverse regression model g(·) is trained using the standardized SPR curve Y, the standardized process parameter x, and the simplified regression model.
[0117] The specific training process is as follows: for each training sample, two losses are calculated simultaneously;
[0118] Main supervisor's loss: ;
[0119] LIME consistency auxiliary loss: ;
[0120] Total loss function: ;
[0121] Where a is the balance coefficient; This is a reverse regression model; Y is the standardized SPR curve.
[0122] By minimizing Ltotal The model parameters are iteratively updated using the backpropagation algorithm and the Adam optimizer until convergence. The backpropagation algorithm is a common technique in this field and will not be described in detail here.
[0123] This model can be based on a similar NN architecture to step 2, but with the input and output roles reversed.
[0124] The expression for the inverse regression model is:
[0125] ;
[0126] in, These are process parameters; is the SPR curve; g(·) is the inverse regression model.
[0127] Step S5: Input the abnormal SPR curve detected in real time into the inverse regression model to obtain the process parameters of the abnormal SPR curve.
[0128] 1) Production Failure Tracing: This is the core step in quality control and troubleshooting. When an abnormal SPR curve Y' is detected on the actual production line (e.g., a steep curve shape, abnormal connection peaks), it is immediately input into the back regression model g(·). The process parameter x' causing the abnormality can be calculated through the back regression model. For example, assuming a curve with insufficient connection strength appears, process parameters such as plate thickness and rivet length that may cause the problem can be calculated through back regression.
[0129] 2) Process Optimization and Quality Improvement: The traceability results (i.e., the "process parameters that caused the SPR curve error") clearly indicate which link or equipment in the production process deviated. Engineers can use this information to accurately calibrate equipment and adjust parameters, thereby "adjusting the erroneous process parameters to improve the actual production process" and achieving closed-loop intelligent quality control.
[0130] To improve inference speed and reduce computational load, the SPR connection quality tracing method based on pruning lightweight disclosed in this embodiment may also include a structured pruning step, which directly removes the entire neuron or input / output channel through structured pruning.
[0131] This step no longer removes individual weights, but treats the entire neuron (or channel) in the neural network as a structural unit.
[0132] Importance calculation: The influence of a channel on the output curve is quantified by calculating the importance of the weights corresponding to each channel / neuron.
[0133] Specifically, in this embodiment, for the q-th neuron in the fully connected layer, its associated weight vector is: Instead of checking the absolute value of individual weights, it evaluates the "energy" of the entire vector:
[0134] ;
[0135] in, It is the importance score of the weight of the q-th channel (neuron). It is the input dimension.
[0136] Pruning operation: Set a threshold for the importance of channel (neuron) weights. When the overall importance of a channel's weights falls below this threshold, the neuron and its associated input-output connections are directly removed. This is equivalent to directly deleting the corresponding row or column in matrix operations, reducing a large matrix to a more compact smaller matrix.
[0137] Specifically, in this embodiment, a weight importance threshold for global or hierarchical neurons is set. The entire dimension can be retained or deleted directly using an indicator function:
[0138] ;
[0139] After this processing, the shape of the matrix will directly change from... Become ,in This physically reduces multiply-accumulate operations (MACs) directly, unlike unstructured pruning which only makes the matrix sparser.
[0140] The structured pruning approach has the following advantages:
[0141] 1. Improved inference performance:
[0142] Hardware friendliness: The model generated by structured pruning is still a dense matrix, which can be directly accelerated by the general CPU / GPU instruction set of edge devices (such as PLCs and industrial computers) without the need for special sparse computing libraries.
[0143] Reduced complexity: Reasoning time complexity from Reduced to ,in This represents the scale of the reduced neuron parameters;
[0144] In this specific embodiment, due to the reduction in matrix shape, the BLAS acceleration library of edge devices (such as PLCs or industrial computers) can be perfectly utilized to achieve true millisecond-level response.
[0145] 2. Edge device deployment and real-time response:
[0146] Results: Pruning can reduce the number of model parameters by 50% to 70% (e.g., from 100,000 parameters to 30,000), significantly reducing memory usage and computation latency. Compared to unstructured pruning, which requires a dedicated sparse matrix library, the method in this embodiment is very suitable for scenarios with extremely high real-time requirements, such as SPR production lines.
[0147] Real-time performance guarantee: The optimized lightweight model can meet the millisecond-level monitoring requirements of ≤200 ms in the production site, ensuring that quality warnings and adaptive adjustments are completed within the golden window of the connection process.
[0148] 3. Improved accuracy:
[0149] Accuracy Optimization Principle: Based on the Lottery Ticket Hypothesis, the initial deep neural network includes "Winning Tickets" that can achieve equal or even higher accuracy. This application evaluates the importance of neurons in the fully connected layers and removes channels with lower "importance," essentially eliminating invalid parameters in the model that are sensitive to noise or generate redundant calculations. This operation acts as a structured regularization, effectively mitigating the risk of overfitting when fitting complex SPR curves. Thus, while achieving lightweight design, it also encourages the model to focus on the most representative process features, further improving the model's prediction accuracy and generalization ability in real-world production environments.
[0150] Example 2
[0151] This application provides a lightweight, pruning-based SPR connection quality traceability system, such as... Figure 2 As shown, it includes:
[0152] The standardization module is used to standardize the SPR curve and the process parameters of the SPR process to obtain the standardized SPR curve and standardized process parameters; the SPR curve is plotted based on the riveting force and punch displacement data collected in real time during the SPR process.
[0153] The regression model training module is used to train a multi-output neural network regression model using standardized SPR curves and standardized process parameters.
[0154] The linear model training module is used to apply local perturbations to the standardized process parameters for the trained multi-output neural network regression model; input the perturbation samples into the multi-output neural network regression model to obtain the predicted SPR curve; based on the relationship between the perturbation samples and the predicted SPR curve, train a simplified linear model to obtain the regression coefficient matrix and the bias term of the simplified linear model;
[0155] The inverse model training module is used to train an inverse regression model using the standardized SPR curve, standardized process parameters, regression coefficient matrix, and bias term of the simplified linear model.
[0156] The traceability result output module is used to input the abnormal SPR curve detected in real time into the inverse regression model to obtain the process parameters of the abnormal SPR curve.
[0157] The SPR connection quality traceability system based on pruning and lightweight provided in this embodiment has the same technical features as the SPR connection quality traceability method based on pruning and lightweight provided in Embodiment 1, so it can also solve the same technical problems and achieve the same technical effects.
[0158] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0159] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0160] In the embodiments provided in this application, it should be understood that the disclosed systems / terminal devices and methods can be implemented in other ways. For example, the system / terminal device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection of systems or units may be electrical, mechanical, or other forms.
[0161] Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or system capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and practice in the jurisdiction. For example, in some jurisdictions, according to legislation and practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0162] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
[0163] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the scope of the technology disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application.
Claims
1. A lightweight SPR connection quality traceability method based on pruning, characterized in that, include: The SPR curve and process parameters of the SPR process are standardized to obtain the standardized SPR curve and standardized process parameters. The SPR curve is plotted based on the riveting force and punch displacement data collected in real time during the SPR process. The multi-output neural network regression model was trained using the standardized SPR curve and standardized process parameters. Local perturbations are applied to the standardized process parameters; the perturbation samples are input into the trained multi-output neural network regression model to obtain the predicted SPR curve; Based on the relationship between the perturbation samples and the predicted SPR curve, a simplified linear model is trained to obtain the regression coefficient matrix and the bias term of the simplified linear model. The inverse regression model is trained using the standardized SPR curve, standardized process parameters, regression coefficient matrix, and bias term of the simplified linear model. The abnormal SPR curves detected in real time are input into the inverse regression model to obtain the process parameters of the abnormal SPR curves.
2. The SPR connection quality traceability method based on pruning and lightweighting according to claim 1, characterized in that, The method also includes: Calculate the importance score of each neuron weight in the multi-output neural network regression model and the inverse regression model; When the importance score of a neuron's weight is lower than a preset threshold, the corresponding neuron and its associated connections are removed.
3. The SPR connection quality traceability method based on pruning and lightweighting according to claim 1, characterized in that, The back regression model is trained using the following loss function: ; Where a is the balance coefficient; The primary supervised loss function; The LIME linear fit goodness is calculated using a simplified linear model for the s-th standardized SPR curve; The auxiliary loss function for LIME consistency; This is the total loss function.
4. The SPR connection quality traceability method based on pruning and lightweighting according to claim 3, characterized in that, The LIME consistency auxiliary loss function is calculated as follows: ; in, These are explanatory pseudo-labels; Mean square error; This is a reverse regression model; Y is the standardized SPR curve.
5. The SPR connection quality traceability method based on pruning and lightweighting according to claim 4, characterized in that, The explanatory pseudo-labels are generated by performing a local linear inversion on each standardized SPR curve Y using the regression coefficient matrix and bias term; the calculation formula is as follows: ; Where λ is the regularization coefficient; C is the identity matrix; C is the regression coefficient matrix; To simplify the bias terms of the linear model; Let C be the transpose of C.
6. The SPR connection quality traceability method based on pruning and lightweighting according to claim 1, characterized in that, The expression for the multi-output neural network regression model is: ; in, This is the predicted value for the SPR curve; For neural network mapping functions; These are the standardized process parameters.
7. The SPR connection quality traceability method based on pruning and lightweighting according to claim 1, characterized in that, The simplified linear model is expressed as follows: ; in, It is the m-th standardized process parameter; is the m-th regression coefficient, representing the local influence weight of the m-th process parameter on the shape of the k-th sampling point of the predicted SPR curve; d is the number of standardized process parameters; To simplify the predicted values of the linear model; To simplify the bias term for the k-th sampling point in the linear model.
8. The SPR connection quality traceability method based on pruning and lightweighting according to claim 1, characterized in that, The expression for the inverse regression model is: ; in, These are process parameters; This is the actual SPR curve; (·) represents the inverse regression model.
9. The SPR connection quality traceability method based on pruning and lightweighting according to claim 2, characterized in that, The removal of the corresponding neuron and its associated connections is performed using the following function: ; in, The importance score of the q-th channel neuron; Let be the weight of the q-th channel neuron; The preset threshold; W pruned The weights of the pruned, structured neurons.
10. A lightweight SPR connection quality traceability system based on pruning, characterized in that, include: The standardization module is used to standardize the SPR curve and the process parameters of the SPR process to obtain the standardized SPR curve and standardized process parameters; the SPR curve is plotted based on the riveting force and punch displacement data collected in real time during the SPR process. The regression model training module is used to train a multi-output neural network regression model using standardized SPR curves and standardized process parameters. The linear model training module is used to apply local perturbations to the standardized process parameters; the perturbation samples are input into the trained multi-output neural network regression model to obtain the predicted SPR curve; Based on the relationship between the perturbation samples and the predicted SPR curve, a simplified linear model is trained to obtain the regression coefficient matrix and the bias term of the simplified linear model. The inverse model training module is used to train an inverse regression model using the standardized SPR curve, standardized process parameters, regression coefficient matrix, and bias term of the simplified linear model. The traceability result output module is used to input the abnormal SPR curve detected in real time into the inverse regression model to obtain the process parameters of the abnormal SPR curve.