Small sample fault diagnosis method and system based on physical priori element optimization
By extracting and enhancing statistical and physical features in the fault diagnosis model, and adjusting the learning rate of the parameter optimization model, the problem of low diagnostic accuracy of fixed parameter models in scarce sample scenarios is solved, and adaptive optimization and efficient diagnosis of the model are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU INTERNATIONAL INNOVATION INSTITUTE OF BEIHANG UNIVERSITY
- Filing Date
- 2026-01-23
- Publication Date
- 2026-05-05
AI Technical Summary
In existing technologies, fault diagnosis models with fixed parameters cannot adapt to the data distribution of new equipment, resulting in a decrease in diagnostic accuracy in scenarios with scarce samples. Furthermore, they are difficult to effectively integrate physical characteristics in industrial data, and thus cannot meet the adaptability and versatility requirements of diagnostic systems in practical industrial applications.
By receiving signal data from industrial equipment, statistical and physical features are extracted to generate a signal feature set. The set is then trained using a fault diagnosis model. Combined with a parameter optimization model, the learning rate is adjusted according to the loss curve, and the optimized model parameters are output, thus achieving real-time optimization of the model parameters.
It significantly improves the diagnostic accuracy in scenarios with scarce samples, enhances the model's adaptability to complex working conditions, and meets the adaptability and versatility requirements of diagnostic systems in practical industrial applications.
Smart Images

Figure CN121980348A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of fault diagnosis technology, and in particular to a small-sample fault diagnosis method and system based on physical prior optimization. Background Technology
[0002] With the rapid development of industrial equipment, there is a need for rapid diagnostic capabilities. The most common existing technology involves pre-training a learning model and then using this model to perform classification tasks on industrial equipment signal data for fault diagnosis. However, this fixed-parameter model approach has significant problems: the model parameters cannot adaptively adjust according to the specific data distribution of new equipment, leading to a significant drop in diagnostic accuracy in scenarios with scarce samples; secondly, the fixed network structure and parameters make it difficult to effectively integrate the physical characteristics of industrial data, failing to meet the requirements of adaptability and versatility for diagnostic systems in practical industrial applications. Summary of the Invention
[0003] This application provides a small-sample fault diagnosis method and system based on physical prior optimization. The technical solution is as follows:
[0004] In a first aspect, embodiments of this application provide a method, the method comprising: receiving signal data samples from industrial equipment, and performing statistical feature extraction and physical feature extraction to obtain corresponding signal features;
[0005] Feature enhancement is performed on the signal features of fault signal samples in the signal data samples to generate signal features with physical interpretation, and all signal features form a signal feature set;
[0006] For each signal feature in the signal feature set, a fault diagnosis model is trained. The output of the fault diagnosis model is the diagnosis result and probability of the industrial equipment corresponding to the signal feature. Starting from the initial model parameters of the fault diagnosis model, different diagnosis results and probabilities are obtained by adjusting the model parameters of the fault diagnosis model, thereby obtaining a data sequence set of the signal feature, the corresponding fault diagnosis model and model parameters, and the diagnosis result and probability.
[0007] The data sequence set is used to train a parameter optimization model, which adjusts the learning rate according to the loss curve and outputs the optimized model parameter prediction values.
[0008] The optimized model parameter prediction values are input into the fault diagnosis model as initial model parameters to update the data sequence set until the change in the model parameters is less than a preset threshold.
[0009] Receive signal data from industrial equipment and perform fault diagnosis using the trained fault diagnosis model.
[0010] In one possible implementation, the receiving of signal data samples from industrial equipment, and the extraction of statistical and physical features to obtain corresponding signal features, include:
[0011] Receive signal data samples from industrial equipment and perform multimodal signal acquisition and preprocessing;
[0012] Statistical feature extraction is performed on the preprocessed signal data to obtain the statistical encoder feature vector;
[0013] Physical features are extracted from the preprocessed signal data to obtain a multi-scale physical feature matrix;
[0014] The statistical encoder feature vector and the multi-scale physical feature matrix are weighted and fused to obtain the corresponding signal features.
[0015] In one possible implementation, the feature enhancement of the signal features of the fault signal samples in the signal data samples to generate physically interpretable signal features includes:
[0016] Physical prior embedding processing is performed on the signal features of fault signal samples in the signal data samples to generate feature representations with physical constraints.
[0017] Multi-scale feature enhancement is performed on the physically constrained feature representation by gradually adding noise through the forward diffusion process of the diffusion model and recovering the signal features from the noise using the reverse denoising process.
[0018] The recovered signal features are fused with the signal features of the fault signal sample to obtain the corresponding signal features.
[0019] In one possible implementation, starting from the initial model parameters of the fault diagnosis model, different diagnostic results and probabilities are obtained by adjusting the model parameters of the fault diagnosis model, including:
[0020] For each signal feature, the input signal feature is forward-propagated based on the initial model parameters of the fault diagnosis model to obtain the diagnosis result and probability;
[0021] Calculate the loss between the diagnostic results and the true labels, and backpropagate the gradient to update the model parameters;
[0022] Record the signal characteristics, model parameters, diagnostic results, and probabilities in this iteration to form a single-round data sequence;
[0023] Repeat the above steps based on the updated model parameters until the convergence condition is met.
[0024] In one possible implementation, calculating the loss between the diagnostic result and the true label, and backpropagating the gradient to update the model parameters, includes:
[0025] The cross-entropy loss between the diagnostic results and the true labels is calculated, and a regularization term based on physical priors is combined to form a loss function.
[0026] The gradient is backpropagated based on the loss function, and the update direction of the model parameters is weighted by combining the physical enhancement gradient of the signal features.
[0027] The update step size of the model parameters is adjusted according to the gradient until the model parameters converge.
[0028] In one possible implementation, training a parameter optimization model using the data sequence set, wherein the parameter optimization model adjusts the learning rate according to the loss curve and outputs optimized model parameter prediction values, includes:
[0029] A spatiotemporal feature matrix is constructed using the data sequence set, and principal component analysis is used to reduce the dimensionality of the spatiotemporal feature matrix to form an input-output pair for training the parameter optimization model;
[0030] A deep neural network incorporating multi-head attention and residual connections is used as the parameter optimization model. The network weights are updated by calculating the loss between the output of the parameter optimization model and the target value, and the trend of the loss curve is recorded.
[0031] The learning rate and update step size are adjusted according to the derivative of the loss curve until the parameter optimization model converges, and the optimized model parameter prediction values are output.
[0032] In one possible implementation, the step of constructing a spatiotemporal feature matrix using the data sequence set and then using principal component analysis to reduce the dimensionality of the spatiotemporal feature matrix to form an input-output pair for training the parameter optimization model includes:
[0033] Arrange the signal features, model parameters, diagnostic results, and probabilities in the data sequence set in chronological order to construct a spatiotemporal feature matrix;
[0034] Principal component analysis is performed on the spatiotemporal feature matrix, and principal components with a contribution rate greater than a preset threshold are retained to achieve dimensionality reduction.
[0035] The reduced spatiotemporal feature matrix is used as input, and the corresponding model parameters are used as output to form an input-output pair for training the parameter optimization model.
[0036] In one possible implementation, the step of updating network weights and recording the trend of the loss curve by calculating the loss between the output of the parameter optimization model and the target value includes:
[0037] Calculate the mean squared error loss between the predicted values of the model parameters output by the parameter optimization model and the target values, and use the regularization term to form a comprehensive loss function;
[0038] The network weights of the parameter optimization model are updated based on the comprehensive loss function.
[0039] Record the current loss value, iteration number, and learning rate in each iteration to construct a loss curve data sequence;
[0040] The loss curve data sequence is smoothed, and the rate of change of loss is calculated.
[0041] In one possible implementation, adjusting the learning rate and update step size based on the derivative of the loss curve includes:
[0042] Calculate the first and second derivatives of the loss curve to determine the decreasing trend of the loss and the convergence speed, respectively;
[0043] The learning rate is adjusted according to the change of the first derivative, and the learning rate is reduced when the first derivative approaches zero.
[0044] The step size is adjusted and updated based on the change in the second derivative; the step size is decreased when the second derivative increases.
[0045] Secondly, embodiments of this application provide a system including a storage medium and one or more processors; the storage medium stores a computer program, which is invoked by one or more processors to implement any of the above-described small-sample fault diagnosis methods based on physical prior optimization.
[0046] The technical solution provided in this application provides at least the following beneficial effects: By dynamically adjusting the parameters of the fault diagnosis model through parameter optimization, the problem that fixed-parameter models cannot adapt to the data distribution of new equipment is solved. This method uses a data sequence set to train the parameter optimization model and intelligently adjusts the learning rate according to the loss curve, achieving real-time optimization and updating of model parameters, significantly improving diagnostic accuracy in scenarios with scarce samples. Simultaneously, through the extraction and fusion of statistical and physical features, and feature enhancement for fault signals, physical features from industrial data are effectively embedded into the diagnostic process, enhancing the model's adaptability to complex working conditions and meeting the requirements for adaptability and versatility of diagnostic systems in practical industrial applications. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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 schematic flowchart of a small-sample fault diagnosis method based on physical prior optimization provided in an embodiment of this application. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0050] refer to Figure 1 This application provides a small-sample fault diagnosis method based on physical prior optimization, which includes the following steps:
[0051] Step 101: Receive signal data samples from industrial equipment and perform statistical feature extraction and physical feature extraction to obtain the corresponding signal features.
[0052] In one possible implementation, the receiving of signal data samples from industrial equipment, and the extraction of statistical and physical features to obtain corresponding signal features, include:
[0053] Receive signal data samples from industrial equipment and perform multimodal signal acquisition and preprocessing;
[0054] Statistical feature extraction is performed on the preprocessed signal data to obtain the statistical encoder feature vector;
[0055] Physical features are extracted from the preprocessed signal data to obtain a multi-scale physical feature matrix;
[0056] The statistical encoder feature vector and the multi-scale physical feature matrix are weighted and fused to obtain the corresponding signal features.
[0057] In one possible implementation, taking rolling bearing fault diagnosis as an example, the above feature extraction and fusion process is specifically illustrated:
[0058] Signal Acquisition and Preprocessing: Acquire vibration and temperature signals from the bearing. Perform wavelet denoising on the vibration signal to remove high-frequency noise. Perform linear interpolation on the temperature signal to align it with the time length of the vibration signal.
[0059] Statistical feature extraction: Extract 20 time-domain features, such as mean, variance, and kurtosis, 15 frequency-domain features, such as spectral centroid and spectral energy, and 10 time-frequency-domain features, such as wavelet energy entropy, from the vibration signal to form a 45-dimensional statistical encoder feature vector.
[0060] Physical feature extraction: Based on bearing parameters such as rolling element diameter, pitch circle diameter, contact angle, and rotational speed, fault characteristic frequencies are calculated. Wavelet transform is performed on the vibration signal to obtain a 64×32 time-frequency energy matrix. Principal component analysis is then used to reduce the dimensionality of the time-frequency energy matrix to a 45-dimensional physical feature vector.
[0061] Feature fusion: The statistical feature vector and the physical feature vector are weighted and fused according to a weight ratio, such as 0.6 and 0.4, to obtain a 90-dimensional fused feature vector. The fused feature vector is then standardized to obtain the final signal features.
[0062] Step 102: Perform feature enhancement on the signal features of the fault signal samples in the signal data samples to generate signal features with physical interpretation, and form a signal feature set with all signal features.
[0063] In one possible implementation, the step of feature enhancement of the signal features of fault signal samples in the signal data samples to generate physically interpretable signal features may include:
[0064] Physical prior embedding processing is performed on the signal features of fault signal samples in the signal data samples to generate feature representations with physical constraints.
[0065] Multi-scale feature enhancement is performed on the physically constrained feature representation by gradually adding noise through the forward diffusion process of the diffusion model and recovering the signal features from the noise using the reverse denoising process.
[0066] The recovered signal features are fused with the signal features of the fault signal sample to obtain the corresponding signal features.
[0067] In one possible implementation, the signal features of fault signal samples in the signal data samples are subjected to physical prior embedding processing to generate a feature representation with physical constraints:
[0068] Physical prior embedding aims to explicitly incorporate the physical mechanisms of industrial equipment operation, such as structural parameters, load types, and fault characteristic frequencies, into signal features, thereby generating feature representations with physical constraints. This process enhances the physical interpretability of features and the model's adaptability to complex operating conditions by introducing constraints based on physical formulas.
[0069] Taking bearing fault diagnosis as an example, the bearing inner ring fault characteristic frequency is calculated using bearing rotational frequency, rolling element diameter, bearing pitch diameter, and contact angle. The physical prior features extracted in this invention include, but are not limited to: basic fault characteristic frequencies, such as inner ring fault frequency, outer ring fault frequency, rolling element fault frequency, and cage fault frequency; modulation features, such as sideband features and modulation depth; nonlinear combination features, such as frequency product features, frequency ratio features, and frequency difference features; energy distribution features, such as band energy ratio, harmonic energy, and energy entropy; time-domain statistical features, such as kurtosis, peak factor, margin, waveform factor, and impulse factor; and time-frequency domain features, such as wavelet energy entropy, short-time Fourier transform features, and wavelet packet energy features. By embedding this physical prior knowledge into the feature representation, a physical constraint feature vector is constructed. The physical constraint feature representation not only includes fault characteristic frequencies but also their nonlinear combinations, such as products, ratios, and differences, generating more discriminative features, thus forming a 45-dimensional multi-scale physical feature matrix, providing a physical basis for subsequent feature enhancement.
[0070] This invention utilizes a diffusion model to perform multi-scale feature enhancement on physically constrained feature representations. The process consists of two stages: forward diffusion and backward denoising. During forward diffusion, noise is progressively added to the original features, gradually transforming them into a pure noise distribution. This process is modeled using the following formula:
[0071]
[0072] in, Let be the noise characteristics at time t. The noise scheduling coefficient is used to control the intensity of noise addition, and it is dynamically adjusted with time t. After T steps of forward diffusion, the original feature x0 gradually evolves into pure noise xT. Through multi-scale noise injection, the multi-level information of the original feature is gradually destroyed, laying the foundation for multi-scale reconstruction during reverse denoising.
[0073] In the reverse denoising stage, a trained neural network is used to gradually recover the original signal features from the noise. This process reconstructs a feature representation that conforms to physical laws by predicting noise and iteratively denoising it. Physically constrained features. It inherently contains multi-scale information, such as fault frequency, nonlinear combinations, and multi-scale physical feature matrices. In the inverse denoising process: local physical constraints, such as fault frequency, guide the recovery of high-frequency features; global physical constraints, such as equipment operating patterns, guide the reconstruction of low-frequency features. Through the synergistic effect of multi-scale networks and physical constraints, the inverse denoising process reconstructs a complete feature representation from details to trends.
[0074] To ensure that the recovered features retain both the original information and conform to physical constraints, this invention employs the following loss function for training:
[0075]
[0076] in, Expressing expectations; : Noise characteristics; t: Time step; Physical constraint characteristics; ϵ: Standard Gaussian noise; : Noise reduction network; Mean squared error loss; : represents the Euclidean norm operation. This loss function not only optimizes the accuracy of noise prediction but also incorporates physical constraints, thereby improving the robustness and representational power of features.
[0077] In one possible implementation, the recovered signal features are fused with the signal features of the fault signal sample to obtain corresponding signal features. This process preserves the information of the original features while incorporating the enhanced robust features. The specific fusion process may include:
[0078] Feature alignment: Align the enhanced features with the original features in dimensions to ensure that they can be fused.
[0079] Weighted fusion: The enhanced features and the original features are fused based on their importance, for example, weighted at 0.7 and 0.3 respectively. The weights can be adjusted according to the specific application scenario, with enhanced features typically given higher weights.
[0080] Feature standardization: The fused features are standardized to eliminate the influence of dimensions.
[0081] Through the aforementioned feature enhancement process, the generated final signal features not only encompass the physical mechanism of bearing failure but also enhance the robustness and representational ability of the features through a diffusion model, significantly improving the accuracy and generalization of fault diagnosis. This feature enhancement method based on physical priors and a diffusion model effectively addresses the problem of insufficient feature representation in small sample scenarios, providing high-quality input for subsequent fault diagnosis models.
[0082] Step 103: For each signal feature in the signal feature set, train the fault diagnosis model. The output of the fault diagnosis model is the diagnosis result and probability of the industrial equipment corresponding to the signal feature. Starting from the initial model parameters of the fault diagnosis model, different diagnosis results and probabilities are obtained by adjusting the model parameters of the fault diagnosis model, thereby obtaining a data sequence set of the signal feature, the corresponding fault diagnosis model and model parameters, and the diagnosis result and probability.
[0083] In one possible implementation, starting from the initial model parameters of the fault diagnosis model, different diagnostic results and probabilities are obtained by adjusting the model parameters of the fault diagnosis model, including:
[0084] For each signal feature, the input signal feature is forward propagated based on the initial model parameters of the fault diagnosis model to obtain the diagnosis result and probability; the loss between the diagnosis result and the true label is calculated, and the gradient is backpropagated to update the model parameters; the signal features, model parameters, diagnosis results and probabilities in this iteration are recorded to form a single-round data sequence; the above steps are repeated according to the updated model parameters until the convergence condition is met.
[0085] This step achieves fine-tuning of the fault diagnosis model's diagnostic performance by dynamically adjusting its parameters. By recording the signal characteristics, model parameters, diagnostic results, and probabilities of each iteration, a complete training data sequence is constructed, effectively improving the model's adaptability to small sample data. Combining gradient backpropagation and loss function optimization not only accelerates model convergence but also significantly improves the accuracy and stability of diagnostic results, providing a reliable basis for subsequent model evaluation and deployment.
[0086] In one possible implementation, the input signal features are forward-propagated based on the initial model parameters of the fault diagnosis model to obtain diagnostic results and probabilities. This step first inputs the feature-enhanced signal features into the fault diagnosis model. This model can employ a deep neural network structure, with its initial model parameters set through pre-training or random initialization. After receiving the input signal features, the model performs feature mapping and classification through multi-layer nonlinear transformations, ultimately outputting the diagnostic results and their corresponding probability distributions. The diagnostic results typically include fault type labels, while the probability distributions characterize the model's confidence in each fault category and diagnostic scheme. This process not only provides a foundation for subsequent loss calculation and parameter optimization but also ensures that the model can make a preliminary judgment on the input signal in the initial stage, laying a data foundation for subsequent iterative optimization.
[0087] In one possible implementation, calculating the loss between the diagnostic result and the true label, and backpropagating the gradient to update the model parameters, includes:
[0088] The cross-entropy loss between the diagnostic results and the true labels is calculated, and a regularization term based on physical priors is incorporated to form the loss function. First, the model's diagnostic results for signal features and their probability distributions are obtained through forward propagation and compared with the true labels to calculate the cross-entropy loss. To enhance the model's generalization ability in small sample scenarios, a regularization term based on physical priors is introduced into the loss function to constrain the direction of model parameter updates, ensuring it conforms to the physical operating rules of industrial equipment.
[0089] The gradient is backpropagated based on the loss function, and the update direction of the model parameters is weighted by incorporating the physically enhanced gradient of the signal features. The gradient of the model parameters is calculated using the backpropagation algorithm based on the loss function. During the gradient update process, a physically enhanced gradient is introduced to correct the update direction of the model parameters through a weighted approach, enabling the model to not only rely on data-driven methods but also incorporate prior physical knowledge.
[0090] The update step size of the model parameters is adjusted according to the gradient until the model parameters converge. This step can employ an adaptive momentum optimization algorithm, which dynamically adjusts the update step size of the model parameters based on the comprehensive gradient. This algorithm adaptively adjusts the learning rate by calculating the first and second moment estimates of the gradient, avoiding training instability caused by gradient oscillations or vanishing gradients.
[0091]
[0092]
[0093]
[0094] in, The first moment of the gradient is the estimate; t is the t-th update; loss function The gradient with respect to the model parameter θ; This is the second moment estimate of the gradient at the t-th update. and The attenuation rate is estimated by moments; It is the numerical stability constant; This is the learning rate.
[0095] Then, the signal features, model parameters, diagnostic results, and probabilities in this iteration are recorded to form a single-round data sequence. The above steps are repeated based on the updated model parameters until the convergence condition is met. To construct a high-quality training data sequence for subsequent parameter optimization model training, this method integrates the current signal features, model parameters, diagnostic results, and probabilities in each iteration step to form a single-round data sequence. This process is fundamental to achieving meta-optimization of model parameters; it provides rich temporal information for parameter optimization by systematically recording the dynamic changes of the model during training. After completing the recording of the single-round data sequence, this method uses the updated model parameters to repeatedly execute forward propagation, loss calculation, gradient update, and data sequence recording steps, forming a closed-loop iterative optimization process. This process continues until the preset convergence condition is met, thereby ensuring that the fault diagnosis model can achieve optimal diagnostic performance in small sample scenarios.
[0096] Step 104: Train a parameter optimization model using the data sequence set. The parameter optimization model adjusts the learning rate according to the loss curve and outputs the optimized model parameter prediction values, including:
[0097] A spatiotemporal feature matrix is constructed using the data sequence set, and principal component analysis is used to reduce the dimensionality of the spatiotemporal feature matrix to form an input-output pair for training the parameter optimization model;
[0098] A deep neural network incorporating multi-head attention and residual connections is used as the parameter optimization model. The network weights are updated by calculating the loss between the output of the parameter optimization model and the target value, and the trend of the loss curve is recorded.
[0099] The learning rate and update step size are adjusted according to the derivative of the loss curve until the parameter optimization model converges, and the optimized model parameter prediction values are output.
[0100] This method achieves intelligent control over the training process of fault diagnosis models by constructing a parameter optimization model based on spatiotemporal feature matrices. Principal component analysis is used to extract key dynamic information, and a multi-head attention mechanism is combined to accurately capture the nonlinear trend of the loss curve, enabling adaptive adjustment of the learning rate and update step size. This method significantly improves the efficiency and accuracy of parameter optimization, avoids the convergence oscillation problem in traditional methods, and enhances the model's generalization ability and robustness through a meta-learning mechanism, providing technical support for constructing efficient diagnostic models in small-sample scenarios.
[0101] In one possible implementation, the step of constructing a spatiotemporal feature matrix using the data sequence set and then using principal component analysis to reduce the dimensionality of the spatiotemporal feature matrix to form an input-output pair for training the parameter optimization model includes:
[0102] The signal features, model parameters, diagnostic results, and probabilities in the data sequence set are arranged in chronological order to construct a spatiotemporal feature matrix.
[0103] For example, signal features can be meta-physical features enhanced by physical priors. ,in It is the feature mapping function of the i-th layer of the diffusion model. It is the hidden layer feature at step t. This is a conditional vector composed of statistical encoder features. This step transforms the discrete data sequence generated during the iteration process into a structured matrix that can characterize the dynamic evolution of the training process. Specifically, the signal features, model parameters, diagnostic results, and probabilities recorded in each iteration are arranged in chronological order. The resulting spatiotemporal feature matrix has rows representing the time step and columns containing key information such as signal features, model parameters, diagnostic results, and probabilities. This matrix not only records the model's state at each time point but also implicitly contains the correlation between these states over time, providing rich spatiotemporal context information for subsequent parameter optimization.
[0104] Principal component analysis (PCA) is performed on the spatiotemporal feature matrix, retaining principal components with a contribution rate greater than a preset threshold to achieve dimensionality reduction. Since the spatiotemporal feature matrix has a high dimensionality, directly using it to train the parameter optimization model may lead to increased computational complexity and overfitting risk. Therefore, this step uses PCA to reduce the matrix's dimensionality. A linear transformation maps the original high-dimensional data to a low-dimensional space while preserving the main variance information in the data. Optionally, the covariance matrix of the spatiotemporal feature matrix can be calculated first, and then its eigenvalues and eigenvectors can be solved. The principal components are sorted according to the magnitude of the eigenvalues, i.e., their contribution rates, and the top k principal components with a cumulative contribution rate greater than a preset threshold are selected as the dimensionality-reduced features. In this way, the data dimensionality is significantly reduced while preserving the key dynamic information in the original data to the greatest extent, improving the training efficiency and generalization ability of the subsequent parameter optimization model.
[0105] The reduced spatiotemporal feature matrix is used as input, and the corresponding model parameters are used as output to form an input-output pair for training the parameter optimization model.
[0106] After dimensionality reduction of the spatiotemporal feature matrix, this step constructs samples for training the parameter optimization model. The dimensionality-reduced spatiotemporal feature matrix is used as input features; this matrix encodes the historical states and evolutionary trends during model training. Simultaneously, the model parameters for the next iteration or the optimized model parameters for the current iteration, corresponding to this spatiotemporal feature matrix, are used as output labels. In this way, a mapping relationship is formed from historical training states to future optimized parameters. These input-output pairs together constitute the training dataset for the parameter optimization model, enabling the model to learn how to predict the optimal model parameter update strategy based on the historical trends of the loss curve, thereby achieving intelligent control over the training process of the fault diagnosis model.
[0107] In one possible implementation, the step of updating network weights and recording the trend of the loss curve by calculating the loss between the output of the parameter optimization model and the target value includes:
[0108] Calculate the mean squared error loss between the predicted values of the model parameters output by the parameter optimization model and the target values, and use the regularization term to form a comprehensive loss function;
[0109] The network weights of the parameter optimization model are updated based on the comprehensive loss function.
[0110] Record the current loss value, iteration number, and learning rate in each iteration to construct a loss curve data sequence;
[0111] The loss curve data sequence is smoothed, and the rate of change of loss is calculated.
[0112] The calculation of the mean squared error loss between the predicted values of the model parameters output by the parameter optimization model and the target values, and the formation of a comprehensive loss function using a regularization term, may include:
[0113] The mean squared error between the predicted values of the model parameters and the target values output by the parameter optimization model is used to measure the prediction accuracy. The mean squared error loss is calculated by averaging the values across all parameter dimensions. Based on the network weights of the parameter optimization model, the square of their magnitude is calculated and multiplied by a regularization coefficient to serve as a regularization term for constraining model complexity. The mean squared error loss and the regularization term are linearly weighted to construct a comprehensive loss function that simultaneously optimizes prediction accuracy and model complexity, serving as the final goal of training the parameter optimization model.
[0114] Updating the network weights of the parameter optimization model based on the comprehensive loss function may include:
[0115] Based on the comprehensive loss function, the partial derivative of the loss function with respect to each weight parameter in the network is calculated using the backpropagation algorithm, which serves as the gradient indicating the direction of loss descent. Using the calculated gradient and the preset learning rate, the network weights are iteratively updated along the opposite direction of the gradient to minimize the comprehensive loss function. Based on the historical statistical information of the gradient, such as the first and second moments, an adaptive optimization algorithm is used to dynamically adjust the learning rate for each parameter to improve the convergence speed and stability of the training process.
[0116] In each iteration, the current loss value, iteration count, and learning rate are recorded to construct a loss curve data sequence. This can include: after each weight update, recording the current iteration count, learning rate, and overall loss value as the original data points for constructing the loss curve data sequence; combining the recorded iteration count, learning rate, and loss value into structured data points containing timestamps to characterize the model's training state at a specific moment; and arranging all time-series data points in chronological order of iteration time to form a complete loss curve data sequence for visual analysis of the dynamic evolution of the entire training process.
[0117] Smoothing the loss curve data sequence and calculating the rate of change of loss may include:
[0118] In one possible implementation, adjusting the learning rate and update step size based on the derivative of the loss curve includes: filtering the loss values using an exponentially weighted moving average algorithm based on the original loss curve data sequence to eliminate random noise and generate a smooth loss curve; calculating the difference between the loss values at adjacent time points based on the smoothed loss curve as the loss change rate, quantifying the rate of loss decline; and using the calculated loss change rate as a key feedback signal as the basis for subsequent adaptive adjustments to the learning rate and update step size. The exponentially weighted moving average algorithm is a weighted averaging method with memory; more recent data has a larger weight, and the weight decays exponentially.
[0119] This scheme significantly improves the training efficiency and convergence stability of the parameter optimization model by constructing a closed-loop intelligent optimization mechanism. First, by introducing a regularization term into the comprehensive loss function, overfitting is effectively prevented while ensuring prediction accuracy, thus enhancing the model's generalization ability. Second, by smoothing the loss curve and calculating the rate of change, the dynamics of training can be accurately captured, providing a stable and reliable decision-making basis for subsequent adaptive adjustments. This scheme transforms the originally static and fixed hyperparameter adjustment process into a dynamic optimization process based on real-time feedback, enabling the parameter optimization model to intelligently adjust its learning strategy, thereby converging to the optimal solution faster and more stably, ultimately outputting more accurate fault diagnosis model parameters.
[0120] Optionally, adjusting the learning rate and update step size based on the derivative of the loss curve includes:
[0121] The first and second derivatives of the loss curve are calculated to determine the loss descent trend and convergence speed, respectively. This step involves in-depth analysis of the smoothed loss curve generated in the previous step to quantify the training dynamics of the parameter optimization model, providing a precise mathematical basis for subsequent adaptive adjustments. During the discrete iteration process, the first derivative can be approximated by the loss change rate calculated in the previous step, directly reflecting the instantaneous change rate of the loss value at the current point. The second derivative can be approximated by calculating the difference between adjacent loss change rates, characterizing the rate of change of the loss descent trend itself. By simultaneously monitoring these two derivatives, this method can comprehensively grasp the dynamic characteristics of the optimization process.
[0122] The learning rate is adjusted based on the change in the first derivative, decreasing as the first derivative approaches zero. This step, based on the loss reduction trend reflected by the first derivative, macroscopically and adaptively adjusts the learning rate in the parameter optimization model to ensure stable and efficient convergence. The learning rate determines the basic "step size" in the parameter update process, and its adjustment strategy is closely related to the downward trend. When the absolute value of the first derivative is continuously decreasing and approaches a preset threshold, it indicates that the model is entering a flat region of the loss function, possibly close to a local or global optimum. At this point, if a large learning rate is still used, the parameters are likely to oscillate around the optimum, failing to converge accurately. Therefore, this method automatically reduces the learning rate, for example, by multiplying it by a decay factor, thereby using a smaller step size for fine-grained searching, ensuring that the model can stably stop at the optimum and improving the accuracy of the final solution.
[0123] The update step size is adjusted based on the change in the second derivative. When the second derivative increases, the step size is reduced: Utilizing the curvature information provided by the second derivative, the actual update step size of the parameter optimization model in a single update is adjusted more microscopically and in real-time to cope with complex loss function terrain and improve the robustness of the optimization. When a significant increase in the value of the second derivative is detected, this indicates that the curvature of the loss function has increased. A fixed step size may lead to excessively large parameter update amplitudes, resulting in repeated oscillations and ineffective degradation. Therefore, this step reduces the actual update step size, for example, by adjusting the internal state of the adaptive optimization algorithm or directly scaling the gradient, to make more cautious moves and ensure stability.
[0124] This scheme achieves refined and adaptive control of the learning rate and update step size by simultaneously utilizing the first and second derivatives of the loss curve, significantly improving the efficiency and stability of parameter optimization. The first derivative reflects the decreasing trend of the loss; adjusting the learning rate accordingly automatically reduces the step size as the model approaches convergence, avoiding oscillations near the optimum due to excessively large step sizes, thus achieving smoother convergence. The second derivative characterizes the curvature or convergence speed of the loss function; dynamically adjusting the update step size accordingly—reducing the step size when the curvature increases—effectively prevents overshooting the optimum, improving the model's optimization accuracy. This dual control mechanism makes the optimization process both fast and robust, ultimately finding the optimal model parameters faster and more accurately.
[0125] Step 105: Input the optimized model parameter predictions into the fault diagnosis model as initial model parameters to update the data sequence set until the change in model parameters is less than a preset threshold. This step achieves a closed loop in the learning framework, enabling the fault diagnosis model parameters to self-improve through an iterative feedback mechanism. First, this step uses the optimized parameter predictions output by the parameter optimization model as new initial parameters to configure the fault diagnosis model. This allows the model to re-execute the training process from a favorable starting point based on historical experience predictions, generating a new data sequence set containing higher-quality dynamic information. Next, the progress of optimization is quantified by calculating the change in the new and old model parameter predictions and comparing it with a very small preset threshold. If the change is not less than the threshold, it indicates that the parameters still have significant room for improvement, and the process returns to the initial step, starting a new cycle. This closed-loop iterative process is repeated continuously until the change in parameters is less than the threshold, ultimately resulting in a trained fault diagnosis model. Because its parameters have been repeatedly optimized by the meta-learning framework, this model can adaptively obtain the initial configuration that best suits the current diagnostic task, thereby achieving fast convergence and high-precision diagnosis in small sample scenarios.
[0126] Step 106: Receive signal data from industrial equipment and perform fault diagnosis using the trained fault diagnosis model. This step deploys the trained fault diagnosis model in a real-world scenario, providing decision support for equipment operation and maintenance. First, real-time signal data, such as vibration and temperature, collected by sensors deployed on the industrial equipment is received via a data interface as the raw input for diagnosis. Next, these raw signals undergo preprocessing and feature extraction identical to those used in the training phase, including filtering, normalization, and wavelet packet decomposition, to ensure the standardization and consistency of the input data format. Then, the extracted standard signal feature vectors are input into the fault diagnosis model to obtain the probability distribution for various fault states. The system analyzes this probability distribution to determine the final fault diagnosis conclusion and provides visual alarms through a human-machine interface, or generates structured records to automatically trigger maintenance work orders. This process seamlessly integrates intelligent diagnostic results into the industrial operation and maintenance process, achieving a closed loop from data acquisition to intelligent decision-making. This provides strong technical support for predictive maintenance and rapid fault troubleshooting, significantly improving the reliability and efficiency of industrial production.
[0127] This paper proposes a meta-learning-based parameter optimization method for fault diagnosis models. Its core advantage lies in constructing an adaptive and self-improving closed-loop optimization system. By introducing a parameter optimization model, this method can intelligently generate optimal initial parameters for the fault diagnosis model based on different signal characteristics, fundamentally solving the problems of slow convergence and low accuracy of traditional methods when facing small sample sizes or variable operating conditions. The system continuously refines the parameter optimization model using the training data sequence of the diagnostic model through an iterative feedback mechanism, giving it strong generalization capabilities. Ultimately, the trained fault diagnosis model can quickly adapt to new diagnostic tasks, achieving high-precision and high-stability fault identification even under small sample conditions. This not only significantly improves diagnostic efficiency and accuracy but also seamlessly integrates intelligent diagnosis into industrial operation and maintenance processes, providing efficient and reliable technical support for predictive maintenance of equipment and ensuring production safety.
[0128] On the other hand, embodiments of this application provide a system including a storage medium and one or more processors; the storage medium stores a computer program that is invoked by one or more processors to implement any of the methods described above.
[0129] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores at least one piece of program code that is loaded and executed by a processor to enable a computer to implement any of the methods described above.
[0130] Optionally, the aforementioned computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0131] In an exemplary embodiment, a computer program or computer program product is also provided, which stores at least one computer instruction that is loaded and executed by a processor to enable the computer to implement any of the methods described above.
[0132] It should be noted that all actions involving the acquisition of signals, information, or data in this application are carried out in compliance with the data protection laws and policies of the country where the application is located, and with authorization from the owner of the relevant device.
[0133] It should be understood that "multiple" as used in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0134] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0135] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A small-sample fault diagnosis method based on physical prior optimization, characterized in that, The method includes: Receive signal data samples from industrial equipment and perform statistical and physical feature extraction to obtain the corresponding signal features; Feature enhancement is performed on the signal features of fault signal samples in the signal data samples to generate signal features with physical interpretation, and all signal features form a signal feature set; For each signal feature in the signal feature set, a fault diagnosis model is trained. The output of the fault diagnosis model is the diagnosis result and probability of the industrial equipment corresponding to the signal feature. Starting from the initial model parameters of the fault diagnosis model, different diagnosis results and probabilities are obtained by adjusting the model parameters of the fault diagnosis model, thereby obtaining a data sequence set of the signal feature, the corresponding fault diagnosis model and model parameters, and the diagnosis result and probability. The data sequence set is used to train a parameter optimization model, which adjusts the learning rate according to the loss curve and outputs the optimized model parameter prediction values. The optimized model parameter prediction values are input into the fault diagnosis model as initial model parameters to update the data sequence set until the change in the model parameters is less than a preset threshold. Receive signal data from industrial equipment and perform fault diagnosis using the trained fault diagnosis model.
2. The small-sample fault diagnosis method based on physical prior optimization according to claim 1, characterized in that, The signal data samples received from the industrial equipment are subjected to statistical feature extraction and physical feature extraction to obtain the corresponding signal features, including: Receive signal data samples from industrial equipment and perform multimodal signal acquisition and preprocessing; Statistical feature extraction is performed on the preprocessed signal data to obtain the statistical encoder feature vector; Physical features are extracted from the preprocessed signal data to obtain a multi-scale physical feature matrix; The statistical encoder feature vector and the multi-scale physical feature matrix are weighted and fused to obtain the corresponding signal features.
3. The small-sample fault diagnosis method based on physical prior optimization according to claim 2, characterized in that, The step of enhancing the signal features of fault signal samples in the signal data samples to generate physically interpretable signal features includes: Physical prior embedding processing is performed on the signal features of fault signal samples in the signal data samples to generate feature representations with physical constraints. Multi-scale feature enhancement is performed on the physically constrained feature representation by gradually adding noise through the forward diffusion process of the diffusion model and recovering the signal features from the noise using the reverse denoising process. The recovered signal features are fused with the signal features of the fault signal sample to obtain the corresponding signal features.
4. The small-sample fault diagnosis method based on physical prior optimization according to claim 3, characterized in that, Starting from the initial model parameters of the fault diagnosis model, different diagnostic results and probabilities are obtained by adjusting the model parameters of the fault diagnosis model, including: For each signal feature, the input signal feature is forward-propagated based on the initial model parameters of the fault diagnosis model to obtain the diagnosis result and probability; Calculate the loss between the diagnostic results and the true labels, and backpropagate the gradient to update the model parameters; Record the signal characteristics, model parameters, diagnostic results, and probabilities in this iteration to form a single-round data sequence; Repeat the above steps based on the updated model parameters until the convergence condition is met.
5. The small-sample fault diagnosis method based on physical prior optimization according to claim 4, characterized in that, The calculation of the loss between the diagnostic result and the true label, and the backpropagation of gradients to update the model parameters, includes: The cross-entropy loss between the diagnostic results and the true labels is calculated, and a regularization term based on physical priors is combined to form a loss function. The gradient is backpropagated based on the loss function, and the update direction of the model parameters is weighted by combining the physical enhancement gradient of the signal features. The update step size of the model parameters is adjusted according to the gradient until the model parameters converge.
6. The small-sample fault diagnosis method based on physical prior optimization according to any one of claims 1 to 4, characterized in that, The step of training a parameter optimization model using the data sequence set, wherein the parameter optimization model adjusts the learning rate according to the loss curve, and outputs the optimized model parameter prediction values, includes: A spatiotemporal feature matrix is constructed using the data sequence set, and principal component analysis is used to reduce the dimensionality of the spatiotemporal feature matrix to form an input-output pair for training the parameter optimization model; A deep neural network incorporating multi-head attention and residual connections is used as the parameter optimization model. The network weights are updated by calculating the loss between the output of the parameter optimization model and the target value, and the trend of the loss curve is recorded. The learning rate and update step size are adjusted according to the derivative of the loss curve until the parameter optimization model converges, and the optimized model parameter prediction values are output.
7. The small-sample fault diagnosis method based on physical prior optimization according to claim 6, characterized in that, The step of constructing a spatiotemporal feature matrix using the data sequence set and then using principal component analysis to reduce the dimensionality of the spatiotemporal feature matrix to form an input-output pair for training the parameter optimization model includes: Arrange the signal features, model parameters, diagnostic results, and probabilities in the data sequence set in chronological order to construct a spatiotemporal feature matrix; Principal component analysis is performed on the spatiotemporal feature matrix, and principal components with a contribution rate greater than a preset threshold are retained to achieve dimensionality reduction. The reduced spatiotemporal feature matrix is used as input, and the corresponding model parameters are used as output to form an input-output pair for training the parameter optimization model.
8. The small-sample fault diagnosis method based on physical prior optimization according to claim 6, characterized in that, The process of calculating the loss between the output of the parameter optimization model and the target value, updating the network weights, and recording the trend of the loss curve includes: Calculate the mean squared error loss between the predicted values of the model parameters output by the parameter optimization model and the target values, and use the regularization term to form a comprehensive loss function; The network weights of the parameter optimization model are updated based on the comprehensive loss function. Record the current loss value, iteration number, and learning rate in each iteration to construct a loss curve data sequence; The loss curve data sequence is smoothed, and the rate of change of loss is calculated.
9. The small-sample fault diagnosis method based on physical prior optimization according to claim 8, characterized in that, The step of adjusting the learning rate and update step size based on the derivative of the loss curve includes: Calculate the first and second derivatives of the loss curve to determine the loss descent trend and convergence speed, respectively; The learning rate is adjusted according to the change of the first derivative, and the learning rate is reduced when the first derivative approaches zero. The step size is adjusted and updated based on the change in the second derivative; the step size is decreased when the second derivative increases.
10. A system comprising a storage medium and one or more processors; said storage medium storing a computer program, characterized in that, The computer program is called by one or more processors to implement a small-sample fault diagnosis method based on physical prior optimization as described in any one of claims 1 to 9.