A small sample process monitoring method suitable for multiple working conditions
By introducing sample attention mechanism and operating condition prior knowledge into the meta-learning framework, using convolutional neural network to extract features and modulate basic classifier parameters, the problem of insufficient adaptability and generalization capabilities of traditional monitoring models in multi-condition environments is solved, and high-precision small sample fault detection is achieved.
Patent Information
- Application Number
- CN202510278738.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-03-10
AI Technical Summary
Traditional monitoring models are difficult to maintain stability in multi-condition environments, fault monitoring accuracy and efficiency are reduced, and they face the challenge of small sample data, especially in extreme operating conditions, high-quality data is scarce, existing methods are insufficient in feature extraction and distribution alignment, and it is difficult to effectively capture the complex relationships between different tasks.
A meta-learning framework is used to construct small sample tasks, introduce sample attention mechanism and working condition prior knowledge, extract features through convolutional neural networks, generate working condition embedding vectors, and introduce condition layers to the basic classifier for parameter modulation, and use working condition prior information to enhance model adaptability and generalization capabilities.
It realizes high-precision small sample fault detection in multi-working environments. The model can quickly adapt to new working conditions, improves the reliability and adaptability of fault monitoring, and improves the generalization performance in unknown working conditions.
Smart Images

Figure CN119782786B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial monitoring technology, and in particular to a small sample process monitoring method suitable for multiple working conditions. Background Art
[0002] With the constant changes in load, temperature, humidity and other working conditions in industrial environments, traditional monitoring models often find it difficult to maintain stable performance under various working conditions, resulting in a significant decrease in the accuracy and efficiency of fault monitoring. Traditional methods are usually unable to fully adapt and generalize when faced with complex and changing environments, which in turn affects the reliability and timeliness of fault monitoring. At the same time, data collection faces the difficulty of sample scarcity, especially under extreme or rare working conditions, where high-quality data is even more difficult to obtain. Therefore, it is particularly urgent to develop a highly accurate and adaptable monitoring method for fault monitoring under small sample sizes and multiple working conditions.
[0003] To address the problems of degraded model performance, insufficient adaptability, and poor generalization caused by changing operating conditions, two main approaches are currently available. The first is based on vibration signal processing, primarily utilizing techniques such as modal decomposition, empirical mode decomposition (EMD), and singular value decomposition (SVD) to extract vibration features. In practical applications, this approach can experience eigenmode overlap during the transition from time-domain decomposition to frequency-domain feature extraction, leading to cross-interference between signal components and reducing feature extraction accuracy and diagnostic reliability. Another approach considers operating condition changes as a transition between different domains, proposing fault diagnosis methods based on transfer learning (TL). Transfer learning leverages knowledge from one task (source domain) to enhance learning and performance in another similar task (target domain), effectively improving model generalization while reducing the need for large amounts of labeled data. However, in real-world equipment operation, the probability of faults occurring is low, and obtaining samples of rare fault types is particularly challenging, presenting a typical small-sample learning problem.
[0004] Meta-learning (ML) provides a new training paradigm for few-shot learning and is increasingly demonstrating its value in the field of fault detection and diagnosis. This paradigm simulates multiple few-shot learning tasks to extract common learning patterns, enabling the model to quickly adapt to new tasks and maintain high diagnostic performance even when data is scarce. While the aforementioned meta-learning-based frameworks have alleviated the few-shot learning problem to some extent, they still face the challenge of insufficient generalization when handling cross-domain tasks or tasks with significant distribution differences. This limitation stems primarily from deficiencies in feature extraction and distribution alignment in existing methods, making it difficult to effectively capture the complex relationships between different tasks. Summary of the Invention
[0005] To address the limitations and defects of the prior art, the present invention provides a small sample process monitoring method applicable to multiple working conditions, comprising:
[0006] Step S1: using sensors to collect industrial multi-condition data;
[0007] Step S2: performing standardization processing on the industrial multi-operating condition data;
[0008] Step S3: Using the standardized industrial multi-condition data, construct a small sample task in the meta-learning framework according to the N-way and K-shot settings. The N-way setting means that in each meta-learning task, the model classifies from N different categories, and the K-shot setting means that for each category, the model randomly selects K samples of each category during training.
[0009] Step S4: A sample attention mechanism is introduced into the meta-learning method based on prior knowledge of working conditions. The sample attention mechanism is used to dynamically assign a weight to each sample and highlight the information contribution of key samples.
[0010] Step S5: using a convolutional neural network to perform feature extraction on the sample set after weighted processing by the sample attention mechanism, so as to provide preset feature support for generating a working condition embedding vector;
[0011] Step S6: Based on the sample set after weighted processing by the sample attention mechanism, a mapping function is used to generate a working condition embedding vector, where the working condition embedding vector includes feature information of the sample and is used to reflect the commonalities and differences between working conditions;
[0012] Step S7: A preset number of conditional layers are introduced into the meta-learning-based basic classifier. The conditional layers use a feature linear modulation method to generate modulation parameters according to the working condition embedding vector, adjust the parameters of the basic classifier network point by point, and introduce working condition prior information.
[0013] Optionally, step S2 further includes:
[0014] The expression of the normalization process is as follows:
[0015] ,
[0016] in, is the original value, is the normalized value, is the mean of the bearing data, is the standard deviation of the bearing data.
[0017] Optionally, step S4 further includes:
[0018] The format expression of the support set sample in the meta-learning method is as follows:
[0019] ,
[0020] in, Indicates input, Indicates the corresponding label, k For each sample in a batch;
[0021] Calculate the attention score and perform softmax normalization on the samples of the support set batch size. The expression is as follows:
[0022] ,
[0023] Among them, S i is the attention score of the i-th sample, is the corresponding attention weight, exp represents the exponential function, batch_size Indicates the total number of samples in the batch;
[0024] The attention weight is assigned to the sample as follows:
[0025] ,
[0026] in, is the input tensor, is the attention-weighted sample.
[0027] Optionally, step S5 further includes:
[0028] Taking the support set samples as input, the vector representation of the working condition information is generated by embedding the network model, and the expression is as follows:
[0029] ,
[0030] in, are the embedded network parameters, To perform feature extraction using the convolutional neural network, is the attention-weighted sample, y is the corresponding label, v is the vector representation of working condition information.
[0031] Optionally, step S6 further includes:
[0032] Obtain the working condition embedding vector The expression is as follows:
[0033] ,
[0034] in, is the number of dimensions, It is input vectors, is the load case embedding vector, is the weight matrix, is the bias parameter, is a linear transformation function or a nonlinear transformation function.
[0035] Optionally, step S7 further includes:
[0036] The conditional layer modifies the parameters of the base classifier network through the dot product operation of the modulation parameters, and the expression is as follows:
[0037] ,
[0038] in, Z is the working condition embedding vector, represents the modulated characteristics, ω g is the modulation factor, B(x) represents the network before modulation, ⊙ is the Hadamard product, and B(x) and modulated features Perform element-by-element multiplication operation, and B(x)′ represents the modulated network.
[0039] Optionally, also include:
[0040] In the inner loop of meta-learning, according to the model-independent meta-learning algorithm, the initial parameters By supporting The gradient descent step on the training task Adjusting this, the expression for a single gradient update step is as follows:
[0041] ,
[0042] in, is the inner loop learning rate, is the support set loss gradient;
[0043] Using cross entropy as the loss function of the base classifier network, the expression is as follows:
[0044] ,
[0045] in, ( ) represents the loss function, represents the true label of the i-th sample, Indicates the iThe input data of samples, log represents the logarithmic function, and ∑ represents the sum of all samples;
[0046] By optimizing the objective function, the parameters of each meta-learning base classifier network are updated, and the expression is as follows:
[0047] ,
[0048] Among them, min means minimizing the objective function, Indicates that all samples p(T) Distributed tasks Perform the summation, Indicates a task The loss function, α is a hyperparameter, which controls the step size of the gradient update. Represents the new loss function calculated after updating the model parameters using the gradient descent method;
[0049] In the outer meta-learning loop, the initial parameters are refined by reducing the associated loss, which consists of the loss associated with the parameters of a specific task on the query set, expressed as follows:
[0050] ,
[0051] Among them, θ represents the parameters of the model, is the learning rate for updating model parameters, Represents the model parameters θ Calculate the gradient, Represents the model, Indicates that the query dataset The loss function on .
[0052] The present invention has the following beneficial effects:
[0053] This paper proposes a small-sample process monitoring method suitable for multi-operating-condition environments, addressing the problem of small-sample fault detection under diverse operating conditions. This method embeds prior knowledge of operating conditions into a model-agnostic meta-learning (MAML) framework to enhance learning capabilities. Specifically, the meta-learning framework is used to construct multiple small-sample tasks. Subsequently, convolutional neural networks (CNNs) are used to extract features from the samples and construct embedding vectors representing the operating-condition patterns. The sample set contains multiple categories, and normal and faulty samples contribute differently to the representation of the operating-condition patterns. To address this issue, the present invention introduces a sample attention mechanism to ensure that samples containing more operating-condition pattern information are given higher weight when generating the embedding vectors. Subsequently, multiple conditional layers are introduced into the meta-learning base classifier to flexibly incorporate prior operating-condition information. These conditional layers utilize the feature-wise linear modulation (FiLM) method to generate modulation parameters by calculating the embedding vectors. These modulation parameters are then adjusted point-by-point to incorporate the prior operating-condition information into the base classifier network. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 This is a flowchart of a small sample process monitoring method applicable to multiple working conditions provided in the first embodiment of the present invention.
[0055] Figure 2 This is a confusion matrix diagram for small-sample fault monitoring under four working conditions provided in Example 1 of the present invention.
[0056] Figure 3 This is a visual comparison chart of the classification results of various methods provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0057] In order to enable those skilled in the art to better understand the technical solution of the present invention, the small sample process monitoring method applicable to multiple working conditions provided by the present invention is described in detail below with reference to the accompanying drawings.
[0058] Example 1
[0059] This embodiment addresses the practical needs of small-sample fault monitoring under multiple operating conditions and proposes an embedded fault monitoring method that combines meta-learning and prior knowledge of operating conditions. This approach aims to address the poor adaptability and generalization capabilities of traditional methods under changing operating conditions. This embodiment introduces a sample attention mechanism and a dynamic embedding network to extract common knowledge between task-specific features and operating conditions from a small number of samples, thereby enhancing the robustness and flexibility of the model. The meta-training phase optimizes model parameters to acquire initial cross-task knowledge, and the meta-testing phase rapidly optimizes and adapts to new operating conditions, achieving efficient migration and fault detection from known to unknown operating conditions.
[0060] This embodiment includes: obtaining data and performing data preprocessing, embedding prior knowledge of working conditions, building a meta-learning base classifier network, and multi-working condition fault monitoring based on meta-learning.
[0061] This embodiment achieves efficient migration and generalization from known to unknown operating conditions through a sample attention mechanism and dynamic feature embedding. The meta-training phase learns common knowledge to provide robust initial parameters for the model, while the meta-testing phase rapidly adapts the support set to complete fault detection in unknown conditions. This process ensures high accuracy and adaptability of the model under small sample sizes and multiple operating conditions.
[0062] To address the imbalance in operating condition information across different samples, a meta-learning approach based on prior knowledge of operating conditions introduces a sample attention mechanism. This mechanism dynamically assigns weight to each sample, highlighting the information contribution of key samples. Specifically, an attention score is generated using randomly initialized weights and normalized using softmax. The input features of the sample are then weighted according to the attention score to generate a weighted sample representation. This collection of weighted samples is further used as input for feature extraction, strengthening the model's ability to focus on key information.
[0063] After weighting the sample attention, the model extracts features using a convolutional neural network. A CNN consists of four layers, each of which includes convolution, batch normalization (BN), and a ReLU activation function, extracting spatial features from low-order to high-order layers. In the final layer, the model uses an adaptive average pooling layer to compress high-dimensional features into a fixed-size vector. This process provides sufficient feature support for generating the embedding vector.
[0064] Based on the weighted sample set, the model generates operating condition embedding vectors using a mapping function. These vectors not only contain the sample's characteristic information but also reflect the commonalities and differences between operating conditions. Furthermore, the model incorporates a dynamic embedding layer that dynamically generates embedding vectors by traversing each preset dimension, ultimately forming a complete embedding representation that provides a global feature representation for subsequent fault classification.
[0065] During the meta-training phase, the model uses the support set to learn the task characteristics and patterns under known working conditions and optimizes network parameters to obtain a good initial state. First, the working condition embedding vector is input into the conditioning layer. A gating mechanism generates working condition-dependent scaling and bias parameters, and dynamically modulates the feature representation of the base learner. The model then computes gradients on the support set and iteratively updates the parameters of the embedding network and base classifier. Finally, the modulated features are input into the classifier to predict fault categories, gradually learning common knowledge across working conditions. The goal of the meta-testing phase is to generalize the model to tasks with unknown working conditions. Using the initial parameters learned during the meta-training phase, the model can quickly adapt to new tasks. When encountering an unknown working condition, the model extracts features using a small number of samples from the support set and quickly fine-tunes the parameters to adapt to the characteristic distribution of the new working condition. The model then performs fault detection on the query set to evaluate its generalization performance under the new task.
[0066] This embodiment proposes a new meta-learning method based on prior knowledge to solve the problem of small sample industrial data fault monitoring under different working conditions.
[0067] First, industrial multi-condition data are collected through sensors; then, these data are standardized. The specific formula for standardization is shown in formula (1):
[0068] ,
[0069] in, is the original value, represents the normalized value, and are the mean and standard deviation of the bearing data, respectively.
[0070] The normalized data is then used to construct small-sample tasks within the meta-learning framework. These tasks are constructed using an N-way, K-shot setup. N-way refers to the fact that in each meta-learning task, the model must classify from N different categories. K-shot, on the other hand, means that for each category, the model only randomly selects K samples from each category during training.
[0071] The samples for each meta-learning task are encoded into an embedding vector representing each operating condition. At the same time, recognizing that the sample set contains both normal and abnormal samples, the differences between these samples are considered and an attention mechanism is applied to the entire sample set to more accurately represent the conditional pattern information. Sample weights are learned through the attention mechanism and optimized using the fault classification loss, ensuring that samples containing more operating condition information have a greater impact on the model. The specific format of the support set samples in the meta-learning task is as follows:
[0072] ,
[0073] Next, the attention scores are calculated and softmax normalized over the samples of the support batch size:
[0074] ,
[0075] Among them, is the attention score of the i-th sample, is the corresponding attention weight. Next, the attention weight is assigned to the sample:
[0076] ,
[0077] in, is the input tensor, is the attention-weighted sample.
[0078] A convolutional neural network (CNN) is used as the primary tool for extracting sample operating condition patterns after weighted processing using an attention mechanism. This CNN embedding network model effectively captures key operating condition information. Then, using the support set samples as input, the embedding network generates a vector representation of the operating condition information:
[0079] ,
[0080] in, are the embedded network parameters, Feature extraction is performed through CNN. In addition, an embedding vector layer is designed to dynamically add a linear layer to each preset dimension in the embedding list. When each embedding layer learns different weights and biases, the resulting embedding vectors show corresponding diversity. The resulting embedding vector as follows:
[0081] ,
[0082] in, is the number of dimensions, It is input vectors, It is the vector after the working condition information modulation operation.
[0083] To improve the base classifier network's ability to capture parameters and patterns under different conditions, this study introduced a conditional layer into the base learner structure. The conditional layer is a module that dynamically adjusts the network's behavior based on the conditional vector. This design allows the model to consider additional conditional information when processing input data, thereby improving its adaptability and flexibility. The network model of the meta-learning base classifier network has three components: a feature extractor, a conditional layer, and a classifier:
[0084] The base classifier network employs a strategy in its feature extractor that combines a wide convolution kernel in the initial layers of the classifier network with multiple narrow convolution kernels in subsequent layers. This strategy aims to address the noise issues common in bearing fault monitoring. The wide convolution kernel is used to capture essential fluctuations and noise patterns in the signal. This wide convolution kernel design ensures coverage of the fluctuations and noise that can occur during bearing faults, preventing the loss of important information due to overly small convolution kernels.
[0085] At the same time, the conditional layer of the basic classifier adopts the method of linear modulation of features, and then calculates the embedding vector through the conditional layer Modulation parameters The basic classifier network parameters are modified by the dot product operation of the modulation parameters, as shown in formulas (7) and (8).
[0086] ,
[0087] In this way, the feature extractor focuses on extracting meta-knowledge containing prior information about the working conditions from known working conditions. Based on this learned meta-knowledge, the system can generalize more effectively when faced with new tasks under unknown conditions, thereby achieving accurate fault detection under different working conditions.
[0088] The Model-Agnostic Meta-Learning (MAML) algorithm strictly follows a two-layer optimization approach, where the inner loop handles the adaptive update of model parameters and the outer loop focuses on fine-tuning the meta-parameters.
[0089] Specifically, during meta-training, the base network can be viewed as a network parameterized as When encountering a new task , MAML utilizes the process of learning a set of initial parameters These parameters are adaptively adjusted to form new parameters In the inner loop, the initial parameters By supporting Several gradient descent steps on When using a single gradient update step, the flow is as follows:
[0090] ,
[0091] Among them, the step length is defined as the inner loop learning rate, is the loss gradient. This paper uses cross entropy as the loss function of the base classifier network:
[0092] ,
[0093] By optimizing the objective function, the parameters of each meta-learning base classifier network are updated:
[0094] ,
[0095] In the meta-learning outer loop, the initial parameters are refined by reducing the loss with respect to the task-specific parameters on the query set:
[0096] ,
[0097] in, The learning rate used to update the model parameters.
[0098] In response to the small sample problem caused by the scarcity of fault samples, this embodiment proposes a meta-learning method based on prior working condition knowledge to achieve fault monitoring under different working conditions. This embodiment also proposes a working condition information embedding network framework to convert meta-learning task samples into embedding vectors. The framework uses working condition patterns as prior knowledge to improve the performance of fault monitoring. In addition, this embodiment also proposes a new meta-learning-based basic classifier network, which aims to combine prior knowledge of working conditions for fault monitoring. When faced with unknown working conditions, the basic classifier can cleverly use previously learned prior knowledge to adjust parameters, thereby achieving fast and effective generalization. Due to its strong generalization ability, this method has demonstrated extensive practical value in practical applications and has broad market prospects.
[0099] This embodiment proposes a small-sample process monitoring method suitable for a multi-operating-condition environment to solve the problem of small-sample fault detection under different operating conditions. This embodiment embeds prior knowledge of the operating conditions into a model-independent meta-learning framework to improve learning capabilities. Specifically, a meta-learning framework is first used to construct multiple small-sample tasks. Subsequently, a convolutional neural network is used to extract features from the samples and construct an embedding vector representing the operating condition pattern. The sample set contains multiple categories, and normal samples and fault samples contribute differently to the representation of the operating condition pattern. To address the above issues, this embodiment introduces a sample attention mechanism to ensure that samples containing more operating condition pattern information have higher weights during the generation of the embedding vector. Subsequently, multiple conditional layers are introduced into the meta-learning base classifier to flexibly introduce prior information on the operating conditions. The conditional layer uses a feature linear modulation method to generate modulation parameters by calculating the embedding vector, and then adjusts the parameters of the base classifier network point by point, referencing the prior information on the operating conditions.
[0100] It will be understood that the above embodiments are merely exemplary embodiments for illustrating the principles of the present invention, and the present invention is not limited thereto. Those skilled in the art will appreciate that various modifications and improvements can be made without departing from the spirit and substance of the present invention, and such modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A small sample process monitoring method suitable for multiple working conditions, characterized in that: include: Step S1: using sensors to collect industrial multi-condition data; Step S2: performing standardization processing on the industrial multi-operating condition data; Step S3: Using the standardized industrial multi-condition data, construct a small sample task in the meta-learning framework according to the N-way and K-shot settings. The N-way setting means that in each meta-learning task, the model classifies from N different categories, and the K-shot setting means that for each category, the model randomly selects K samples of each category during training. Step S4: A sample attention mechanism is introduced into the meta-learning method based on prior knowledge of working conditions. The sample attention mechanism is used to dynamically assign a weight to each sample and highlight the information contribution of key samples. Step S5: using a convolutional neural network to perform feature extraction on the sample set after weighted processing by the sample attention mechanism, so as to provide preset feature support for generating a working condition embedding vector; Step S6: Based on the sample set after weighted processing by the sample attention mechanism, a mapping function is used to generate a working condition embedding vector, where the working condition embedding vector includes feature information of the sample and is used to reflect the commonalities and differences between working conditions; Step S7: A preset number of conditional layers are introduced into the meta-learning-based basic classifier. The conditional layers use a feature linear modulation method to generate modulation parameters according to the working condition embedding vector, adjust the parameters of the basic classifier network point by point, and introduce working condition prior information.
2. The small sample process monitoring method applicable to multiple working conditions according to claim 1 is characterized in that: The step S2 further includes: The expression of the normalization process is as follows: , in, is the original value, is the normalized value, is the mean of the bearing data, is the standard deviation of the bearing data.
3. The small sample process monitoring method applicable to multiple working conditions according to claim 2 is characterized in that: The step S4 further includes: The format expression of the support set sample in the meta-learning method is as follows: , in, Indicates input, Indicates the corresponding label, k For each sample in a batch; Calculate the attention score and perform softmax normalization on the samples of the support set batch size. The expression is as follows: , Among them, S i is the attention score of the i-th sample, is the corresponding attention weight, exp represents the exponential function, batch_ size Indicates the total number of samples in the batch; The attention weight is assigned to the sample as follows: , in, is the input tensor, is the attention-weighted sample.
4. The small sample process monitoring method applicable to multiple working conditions according to claim 3 is characterized in that: The step S5 further includes: Taking the support set samples as input, the vector representation of the working condition information is generated by embedding the network model, and the expression is as follows: , in, are the embedded network parameters, To perform feature extraction using the convolutional neural network, is the attention-weighted sample, y is the corresponding label, v is the vector representation of working condition information.
5. The small sample process monitoring method applicable to multiple working conditions according to claim 4 is characterized in that: The step S6 further includes: Obtain the working condition embedding vector The expression is as follows: , in, is the number of dimensions, It is input vectors, is the load case embedding vector, is the weight matrix, is the bias parameter, is a linear transformation function or a nonlinear transformation function.
6. The small sample process monitoring method applicable to multiple working conditions according to claim 5 is characterized in that: The step S7 further comprises: The conditional layer modifies the parameters of the base classifier network through the dot product operation of the modulation parameters, and the expression is as follows: , , in, Z is the working condition embedding vector, represents the modulated characteristics, ω g is the modulation factor, B(x) represents the network before modulation, ⊙ is the Hadamard product, and B(x) and modulated features Perform element-by-element multiplication operation, and B(x)′ represents the modulated network.
7. The small sample process monitoring method applicable to multiple working conditions according to claim 6 is characterized in that: Also includes: In the inner loop of meta-learning, according to the model-independent meta-learning algorithm, the initial parameters By supporting The gradient descent step on the training task Adjusting this, the expression for a single gradient update step is as follows: , in, is the inner loop learning rate, is the support set loss gradient; Using cross entropy as the loss function of the base classifier network, the expression is as follows: , in, ( ) represents the loss function, represents the true label of the i-th sample, Indicates the i The input data of samples, log represents the logarithmic function, and ∑ represents the sum of all samples; By optimizing the objective function, the parameters of each meta-learning base classifier network are updated, and the expression is as follows: , Among them, min means minimizing the objective function, Indicates that all samples p(T) Distributed tasks Perform the summation, Indicates a task The loss function is is the inner loop learning rate, Represents the new loss function calculated after updating the model parameters using the gradient descent method; In the outer meta-learning loop, the initial parameters are refined by reducing the associated loss, which consists of the loss associated with the parameters of a specific task on the query set, expressed as follows: , Among them, θ represents the parameters of the model, is the learning rate for updating model parameters, Represents the model parameters θ Calculate the gradient, Represents the model, Indicates that the query dataset The loss function on .
Citation Information
Patent Citations
Complex working condition bearing fault diagnosis method based on meta-learning under small sample
CN112418013A
Small sample remote sensing image scene classification method based on embedded smooth graph neural network
CN114067160A
Small sample remote sensing image scene classification method based on embedding smoothing graph neural network
WO2023087558A1