A computerized flat knitting machine anomaly detection method for multiple working conditions and noise environments

By using the adaptive denoising module TDSAD and the multi-condition mapping module VFA-MAD, combined with the noise adaptive diffusion network and the multi-domain unified attention module, the performance degradation problem of traditional computerized flat knitting machine anomaly detection in multi-condition and noisy environments is solved, achieving efficient fault detection and stability improvement.

CN120724334BActive Publication Date: 2026-04-17WUHAN TEXTILE UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN TEXTILE UNIV
Filing Date
2025-06-26
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Traditional computerized flat knitting machine anomaly detection methods show significant performance degradation under various working conditions and noisy environments, making it difficult to effectively cope with the challenges of multiple working conditions. Existing technologies also have insufficient model generalization ability, making it difficult to adapt to the effects of equipment aging, material changes, and environmental noise.

Method used

The model employs an adaptive denoising module TDSAD and a multi-condition mapping module VFA-MAD, combined with a noise adaptive diffusion network, a Transformer inverse denoising neural network, a multi-domain unified attention module, and a hybrid variational autoencoder. Through adaptive denoising and multi-condition mapping, the feature mapping is dynamically adjusted to improve the stability and adaptability of the model under different conditions.

Benefits of technology

It significantly improved the fault detection rate by 17.7%, maintained high accuracy and high efficiency in anomaly detection under various operating conditions, adapted to complex noise environments, and enhanced the robustness and adaptability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120724334B_ABST
    Figure CN120724334B_ABST
Patent Text Reader

Abstract

The application discloses a computerized flat knitting machine anomaly detection method for multiple working conditions and noise environments. First, training data and test data are obtained, and all data are sequentially converted into local context prompt windows. Then, the prompt windows are input into the first stage model TDSAD. TDSAD dynamically focuses on data features under different working conditions in the process of noise diffusion and removal, and removes noise in the data. Next, the denoised data is input into the second stage model VFA-MAD. On the basis of feature extraction by a Transform, a convolutional neural network and a multi-domain unified attention module, multi-domain data is mapped to a unified latent space based on causality. At the same time, a history memory module is used to adjust the mapping relationship in real time. Finally, the mapped data is reconstructed by a Transform decoder, and the root mean square error between the reconstructed output and the original input is calculated to obtain an anomaly score. The anomaly score is compared with a set threshold to determine the anomaly of the data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of anomaly detection (AD) technology for mechanical equipment, and more particularly to an anomaly detection technology based on a multi-condition computerized flat knitting machine dataset. Background Technology

[0002] Traditional computerized flat knitting machines (CFTs) typically rely on manual auditory judgment for anomaly detection. However, with the increasing integration of CFTs, ​​the sounds emitted by various components during operation gradually overlap, making manual judgment increasingly difficult. Simultaneously, increased environmental noise not only significantly increases the complexity of detection but also poses a serious threat to the hearing health of inspection personnel. In recent years, with the rapid development of artificial intelligence technology, researchers have made significant progress in the field of sound anomaly detection by combining traditional signal processing techniques (such as filtering techniques and Fourier transforms) with efficient deep learning methods. However, most of these studies are limited to single-condition environments with relatively stable production conditions, typically based on the independent and identically distributed assumption, assuming that training and test data are independent and identically distributed. However, in practical applications, factors such as equipment aging, material changes, and differences in customer demands can cause slow drifts or periodic fluctuations in production status, resulting in significant differences between real-time and training data. These multi-condition problems caused by drifts or changes in operating conditions (i.e., inter-domain differences) often significantly degrade the performance of conventional knitting fault detection and diagnosis models. Therefore, how to effectively address the challenges of multiple operating conditions and improve the generalization ability of the model has become a key issue that urgently needs to be addressed.

[0003] Currently, researchers have proposed several common general solutions to address the domain generalization problem under multiple operating conditions. First, they have improved generalization ability by enhancing the diversity of data. For example, Wu and Zhao (2020) proposed an autoencoder model that uses generated data to improve the performance of the method in different domains. The uncertainty of the generated data in this type of method will seriously affect the final result. For details, please refer to: Wu H, Zhao J. Fault detection and diagnosis based on transfer learning for multimode chemical processes[J]. Computers & Chemical Engineering, 2020, 135: 106731. Second, they have optimized advanced learning strategies. For example, Li et al. proposed a meta-learning method to reduce the negative impact of domain transfer on the model. The effect of this type of method is inconsistent in different domains, and instability will seriously affect the experimental results. For details, please refer to: Li D, Yang YX, Song YZ, et al. Learning to generalize: Meta-learning for domain generalization[C]. Proceedings of the AAAI conference on artificial intelligence. 2018, 32(1). Third, representation learning can be used to extract domain-invariant latent representations from multiple source domains. Ben-David et al. (2006) theoretically proved that if feature representations remain invariant, they can remain general and transferable across different domains. (See: Ben-David S, Blitzer J, Crammer K, et al. Analysis of representations for domain adaptation[J]. Advances in neural information processing systems, 2006, 19.) Extracting domain-invariant latent representations through representation learning eliminates the need to consider data uncertainty and adjust model parameters in practical applications, offering certain advantages. However, the effectiveness of representation learning largely depends on the selection and design of a suitable feature space and how to handle differences between different domains. When the difference between the target domain and the source domain is very large, domain-invariant features are still difficult to extract. Therefore, researching how to further improve the accuracy and adaptability of domain-invariant representations and further enhance the fault detection performance of models remains a challenging problem. Summary of the Invention

[0004] To address the problems existing in the prior art, this invention provides a method for detecting anomalies in computerized flat knitting machines under multiple working conditions and noisy environments. The method includes the following steps:

[0005] S1, Select training data and test data from the relevant dataset of industrial process computerized flat knitting machine operation;

[0006] S2, based on timestamps, sequentially converts training and test data into local contextual prompt windows. ;

[0007] S3, using the TDSAD noise reduction module to... Adaptive denoising training is performed to obtain denoised data; the denoising module TDSAD includes a noise adaptive diffusion network based on a diffusion model and a reverse denoising neural network based on Transformer.

[0008] S4. Fine-tune the TDSAD model parameters using the first loss function, and then repeat S3 to obtain the final denoising module TDSAD.

[0009] S5, the VFA-MAD multi-condition mapping module is used to perform multi-condition mapping on the denoised data to obtain the reconstructed data; the VFA-MAD includes a multi-domain unified attention module, a GNN-based feature extractor and a Transformer-based hybrid variational autoencoder.

[0010] S6. Fine-tune the VFA-MAD model parameters using the second loss function, and then repeat S5 to obtain the final multi-condition mapping module VFA-MAD.

[0011] S7, Anomaly detection training phase: Based on the training data and the reconstructed output obtained using the multi-condition mapping module, anomaly scores are defined, and the peak threshold method is used to select the threshold.

[0012] S8, the anomaly detection test phase, uses the anomaly scores and thresholds generated in S7 to mark the anomaly data and obtain the final detection results.

[0013] Furthermore, in step S1, normal data under different working conditions are selected from the relevant dataset of industrial process computer flat knitting machine operation as test data, and a set of normal data and abnormal data under different working conditions is selected as test data. The two types of data each follow different probability distributions; the test data are in different domains, but in the same domain as some of the training data.

[0014] Furthermore, the noise adaptive diffusion network includes a noise forward diffusion module, a position encoder, a three-layer Transformer-based encoder, and a first decoder; the inverse denoising neural network includes a noise inverse denoising module, a position encoder, a three-layer Transformer-based encoder, and a second decoder.

[0015] Furthermore, the network structures of the first and second decoders are identical, both including a masked multi-head attention layer, a multi-head cross-attention layer, a feedforward fully connected layer, and residual connections and normalization layers. The goal of the first decoder is to simulate and reproduce various noise scenarios in the final stage of forward diffusion by maximizing the loss. The intensity of the denoising task of the second decoder is increased; the second decoder then minimizes the loss in the final stage of the inverse generation process. To perform adaptive denoising, the first decoder is forced to generate a more complex noisy scene. The total loss, i.e., the first loss function, is defined as: ;

[0016] in It refers to training rounds. It is a parameter that controls the intensity of noise reduction. These represent the outputs of the first decoder and the second decoder, respectively.

[0017] Furthermore, the multi-domain unified attention module is used to enhance the denoised data. The enhanced data is input into a CNN-based feature extractor to obtain high-order feature representations, which are then input into a Transformer-based hybrid variational autoencoder (VAE). First, a reparameterization technique is used to obtain latent vectors. Then, the latent features are used as input to the Transformer for feature mapping and spatial reconstruction, resulting in a reconstructed output. The processing steps of the multi-domain unified attention module are as follows:

[0018] First, analyze the features of the denoised data. Perform global attention operations using the formula:

[0019]

[0020] Calculate the attention score; where, This is the data for the current window. and Do not represent the data in other windows of the entire data segment. Indicates the number of windows. This is the dimension of the current window data; subsequently, the attention score is fused with the original data to generate an enhanced data representation. Right now:

[0021] .

[0022] Furthermore, the second loss function is the correlation loss. VAE loss Reconstruction loss The weighted average, where the correlation loss The calculation formula is as follows:

[0023]

[0024] in For multi-domain unified attention unified module, For the current batch of data, For data from other batches, The quantity of the batch;

[0025] VAE loss The calculation formula is as follows:

[0026]

[0027]

[0028] in, This represents the potential vector at the current time step, while It is the first The potential vector of each historical time step, where N is the spatiotemporal cue length; It is a hyperparameter. This indicates the first input into the VAE. 10 samples, of which It is the distribution of the latent variables output by VAE. It is the probability of the data generated by VAE. Represents the latent variable Distribution Seeking expectations, This indicates that the KL divergence is calculated on it;

[0029] Finally, the reconstruction loss is calculated using the L1 norm:

[0030]

[0031] in The number of reconstructed outputs, Represents the first in the training data One data point, Indicates the first in the reconstructed output data Data points.

[0032] Furthermore, the second loss function is defined as:

[0033]

[0034] in, This indicates the calculation of the average value. It is the reconstruction loss. These are the weights of the VAE loss. It is correlation loss. It is the weight of the correlation loss.

[0035] Furthermore, Calculated using the following formula:

[0036]

[0037] in This refers to calculating the average value. This refers to the Kullback-Leibler divergence of all data in a VAE. This refers to the Kullback-Leibler divergence of the current data.

[0038] Furthermore, the anomaly score during the anomaly detection training phase is defined as:

[0039]

[0040] in For training data, For the reconstruction output of the multi-condition mapping module, These are abnormal scores;

[0041] During the anomaly detection testing phase, an anomaly score is calculated for each timestamp of the test data. If the anomaly score exceeds a set threshold, the timestamp is marked as an anomaly.

[0042] Furthermore, it also includes using accuracy P, F1 value, fault detection rate FDR, and fault false alarm rate FAR as evaluation indicators to evaluate the final anomaly detection results.

[0043] Compared with the prior art, the above-described technical solutions conceived in this invention can achieve the following beneficial effects:

[0044] (1) This invention proposes an anomaly detection method for multi-condition data. In the current research field, there is still a lack of literature on this topic.

[0045] (2) An adaptive denoising strategy was designed. The model dynamically focuses on the data characteristics under different working conditions during the noise diffusion and removal process, thereby effectively removing the complex noise generated by multiple factors in the data and improving the accuracy and efficiency of noise removal.

[0046] (3) A multi-condition mapping strategy was designed to map multi-domain data to a unified latent space through causal relationships, thereby ensuring its stability and adaptability under different conditions. In particular, during the process of changing conditions, the embedded historical memory module can adjust the mapping in real time to ensure rapid and accurate control of feature fluctuations.

[0047] (4) The effectiveness of the proposed method TADUFMA was verified in the actual field data of computer flat knitting machine production. Compared with the most advanced method at present, the failure detection rate was improved by 17.7%. Attached Figure Description

[0048] Figure 1 This is a flowchart provided in an embodiment of the present invention;

[0049] Figure 2 This is a model framework diagram provided in the embodiments of the present invention;

[0050] Figure 3 This is a visual schematic diagram of the anomaly detection process POT provided in an embodiment of the present invention;

[0051] Figure 4 This is a diagram illustrating the multi-condition dataset acquisition device for computerized flat knitting machines in an embodiment of the present invention.

[0052] Figure 5 This is a visualization of the feature mapping in the ablation experiment of this embodiment of the invention, which lacks a multi-domain unified attention module;

[0053] Figure 6 This is a visualization of the feature mapping of a multi-domain unified attention module in the ablation experiment of this invention. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0055] To address the anomaly detection problem in multi-condition data of computerized flat knitting machines and to create a transferable model that can dynamically adapt to online test data from different conditions, this invention provides an anomaly detection method for computerized flat knitting machines under multiple conditions and noisy environments. First, in the offline stage, data from different conditions are selected from a dataset related to the operation of computerized flat knitting machines in industrial processes, serving as training and testing data respectively. Then, the training and testing data are sequentially converted into local contextual prompt windows. Next, the prompt windows are input into the first-stage model, TDSAD. During noise diffusion and removal, TDSAD dynamically monitors the data characteristics under different conditions and removes noise from the data. Then, the denoised data is input into the second-stage model, VFA-MAD. Based on feature extraction using Transformer, convolutional neural networks, and a multi-domain unified attention module, multi-domain data is mapped to a unified latent space based on causal relationships. Simultaneously, a history memory module is used to adjust the mapping relationship in real time. Finally, the mapped data is reconstructed using a Transformer decoder, and the root mean square error between the reconstructed output and the original input is calculated to obtain an anomaly score. The anomaly score is compared with a set threshold to determine the anomaly status of the data. Figure 1 A flowchart illustrating the present invention. Figure 2 The following is a model framework diagram of the present invention, and specific implementation examples are provided below.

[0056] (1) Data collection and processing:

[0057] (1.1) Select normal data under different working conditions from the relevant dataset of industrial process computerized flat knitting machine operation as training data. , >=1 indicates the number of work conditions. This is a multi-work condition dataset. arrive Each follows a different probability distribution, where the th The data distribution for each working condition satisfies: The test data consisted of sets of normal and abnormal data under different working conditions. m>=1 represents the number of test data points, ensuring the availability of test data. They are in different domains, but share the same domain as some of the training data; specifically:

[0058] Acquiring time-series data of computerized flat knitting machine operation in industrial processes Each data point At a specific timestamp The site was collected. Represents the sequence length.

[0059] (1.2) Convert all data into local contextual tooltip windows; specifically:

[0060] (1.2.1) Input data sequence of length T The length of each block is as follows The local context window is represented as .

[0061] (1.2.2) During the block partitioning process, for Copy and fill will appear in the window. Add a constant vector The length of the vector is To ensure that each timestamp The corresponding window length is .

[0062] (2) Pre-training and iterative optimization of the TADUFMA model (full name: Transformer-based Adaptive Denoising and Unified Feature Modeling for Multi-condition Anomaly detection in Computerized FlatKnitting Machines).

[0063] (2.1) In the first stage of the model, the TDSAD denoising module is used to denoise the model. Perform adaptive denoising training to obtain denoised data. The TDSAD includes a noise adaptive diffusion network based on a diffusion model and a Transformer-based inverse denoising neural network. The noise adaptive diffusion network includes a noise forward diffusion module, a position encoder, three Transformer-based encoder layers, and decoder 1. Similarly, the inverse denoising neural network includes a noise inverse denoising module, a position encoder, three Transformer-based encoder layers, and decoder 2. Specifically:

[0064] (2.1.1) In the forward diffusion process, firstly, to increase the robustness of the data, we gradually introduce random noise into the input, similar to the forward process of the diffusion model. The random noise gradually passes through... Add one step to the initial input sample In the middle. The mathematical representation of this process is:

[0065]

[0066] in

[0067]

[0068] Next, It can be represented as:

[0069]

[0070] in: It is in the Step samples, It is an adjustment parameter that controls the degree of noise addition. It is noise sampled from a standard Gaussian distribution. It is the total number of steps in the forward process. It is used to control the intensity of noise.

[0071] (2.1.2) In the reverse generation process, we first remove the noise step by step based on the previously added random noise to initially recover the output of the noise diffusion network. This process can be achieved by learning the following conditional probability distribution:

[0072]

[0073] in These are the parameters of the model, representing the steps from the current step. Revert to the previous step The process. This inverse process can be represented as:

[0074]

[0075] in, It is a trainable denoising function, the purpose of which is to remove the denoising function of the th element. Step noise, and It controls the degree of noise reduction.

[0076] (2.1.3) We designed an adversarial training scheme for TDSAD; specifically:

[0077] Adversarial training is performed using the outputs of decoder 1 and decoder 2. The decoder structure is as follows: Figure 2 As shown, it consists of a shielded multi-head attention layer, a multi-head cross-attention layer, a feedforward fully connected layer, and residual connections and normalization layers. In the designed module, the goal of decoder 1 is to simulate and reproduce various noise scenarios in the final stage of forward diffusion, by maximizing the loss... The intensity of the denoising task in Decoder 2 is increased to train the model to handle different types of noise; Decoder 2 then minimizes the loss in the final stage of the inverse generation process. This is used to perform adaptive denoising, forcing decoder 1 to generate more complex noisy scenes. The total loss is defined as: .

[0078] in It refers to training rounds. These are parameters that control the denoising intensity of the diffusion neural network. These represent the outputs of the first decoder and the second decoder, respectively.

[0079] (2.2) In the second stage of the model, the VFA-MAD multi-condition mapping module is used to process the denoised data. Perform multi-condition mapping to obtain reconstructed data. The VFA-MAD includes a multi-domain unified attention module, based on a CNN feature extractor and a Transformer-based hybrid variational autoencoder; specifically:

[0080] (2.2.1) Multi-domain unified attention module: First, the denoised data features are processed. Perform global attention operations using the formula:

[0081]

[0082] Calculate the attention score. This is the data for the current window. and Do not represent the data in other windows of the entire training data. Indicates the number of windows. This refers to the dimension of the current window data. Subsequently, these attention scores are fused with the original data to generate an enhanced data representation. Right now:

[0083]

[0084] (2.2.2) CNN-based feature extractor: A convolutional neural network is used as the initial local feature extractor for VFA-MAD. The formula for the convolution operation can be expressed as:

[0085]

[0086] in, It's a convolution operation. It is a convolution kernel. It is a bias term used to adjust the convolution output. It is a high-order feature representation obtained after processing by a convolutional neural network.

[0087] (2.2.3) Transformer-based hybrid variational autoencoder: representing high-order data features The input is fed into the VAE model, and the encoder network receives the input. And calculate two outputs: 1. Mean 2. Standard deviation Then, a random noise vector is sampled from the standard normal distribution. The latent vector is obtained through reparameterization techniques:

[0088]

[0089] latent features The features are used as input to the Transformer for feature mapping and spatial reconstruction, thereby obtaining the reconstructed output. ;

[0090] (2.2.4) For VFA-MAD, we adopt joint optimization; the specific calculation is as follows:

[0091] (2.2.4.1) During the processing of each batch, this module retains the attention score for each task. After completing all attention operations, the relationship between tasks in the feature space is evaluated using the correlation loss between each task:

[0092] (1)

[0093] in For multi-domain unified attention unified module, For the current batch of data, For data from other batches, The enhanced data representation, which takes the number of batches as an example, can more fully capture the global features of the input data, providing a more effective feature representation for subsequent latent space modeling, thereby ensuring that the feature space can more accurately reflect the representation of the entire dataset.

[0094] (2.2.4.2) Historical cue information is introduced into the training of VAE, and differential loss is used to mark the current working condition. The difference is defined as:

[0095]

[0096] in, This represents the potential vector at the current time step, while It is the first The latent vectors of each historical time step. A larger value indicates a greater difference between the current feature and its neighboring features. Therefore, we can achieve dynamic calibration of the historical memory module during backpropagation. Based on this, The new loss is formed by combining the loss of the traditional VAE method as follows:

[0097] (2)

[0098] in, It is a hyperparameter used to adjust the contribution of the difference term to the loss function. This represents the first input into the VAE model. 10 samples, of which It is the distribution of the latent variables output by the VAE encoder. It is the probability of the data generated by the VAE decoder model. Represents the latent variable Distribution To calculate the expected value, This indicates that KL divergence calculation is performed on it, where N is the spatiotemporal cue length, representing the number of latent vectors z from different batches remembered by the current historical memory module.

[0099] (2.2.4.3) Finally, we use the L1 norm to calculate the reconstruction loss:

[0100] (3)

[0101] in The number of reconstructed outputs.

[0102] (2.2.4.4) By combining the above methods, the VFA-MAD model is trained by jointly optimizing multiple loss terms (1), (2), and (3), defined as:

[0103]

[0104] in It is the reconstruction loss of Transformer. These are the loss weights of the VAE. It is the correlation loss calculated by the attention unification module. It is calculated using the following formula:

[0105]

[0106] in This refers to calculating the average value. The Kullback-Leibler divergence refers to the divergence of all data in a VAE model, and is often used to measure the difference between two probability distributions. This refers to the Kullback-Leibler divergence of the current data.

[0107] (3) Anomaly detection based on TADUFMA:

[0108] (3.1) Regarding the data The TADUFMA model uses the pre-trained multi-condition mapping module to generate a reconstructed feature. Based on this feature, we define the anomaly detection test score as:

[0109]

[0110] (3.2) We employed the Peak Over Threshold (POT) method to automatically and dynamically select the threshold. The POT method utilizes extreme value theory, fitting the data distribution through a Generalized Pareto Distribution (GPD), and dynamically determining the threshold D based on the risk value. If so, the window is marked as abnormal, that is... = 1( ).

[0111] Anomaly diagnostic labels for each timestamp and overall test results The definition is as follows:

[0112]

[0113] in, This represents an aggregation operation that calculates the total number of anomaly labels for the window based on the anomaly label for each timestamp.

[0114] (3.3) During anomaly detection, we only consider data up to the current timestamp; therefore, the operation is performed online in chronological order. A corresponding anomaly score is calculated for each timestamp. If the score exceeds the set threshold, we will mark the timestamp as abnormal. Figure 3 The process of anomaly detection for a specific practice sequence is demonstrated.

[0115] The following explanation further illustrates the beneficial effects of this invention in specific application scenarios.

[0116] To verify the effectiveness of the proposed method in anomaly detection under various operating conditions using insufficient online and unseen data, we conducted a series of experiments on a self-developed multi-condition dataset for computerized flat knitting machines. This dataset was sourced from a leading domestic R&D company specializing in computerized flat knitting machines. A sound sensor (YAV Z1, range 0-10V) was used to collect sound data from knitting production. This sensor was fixed to the head of the computerized flat knitting machine. Figure 4 As shown, the signal acquisition card (YAV 8AD, range 0-10V, frequency 1KHZ) is used to receive noise sensor data and upload it to the signal acquisition platform via USB for data visualization and storage. The acquired data is single-channel data.

[0117] During the data acquisition process, data were collected under three operating conditions: 30cm / s, 60cm / s, and 90cm / s, for normal operation, totaling approximately 220,000 normal data points. For fault conditions, three conditions were introduced: presence or absence of loose yarn, presence or absence of loops, and presence or absence of broken or bent needles. Based on the actual operation of the computerized flat knitting machine, fault data with different distributions from the training data were measured and divided into 5 categories, as detailed in Table 1.

[0118] Table 1. Overview of Computerized Flat Knitting Machine Production Data Set Information

[0119]

[0120] To demonstrate the effectiveness of our proposed method, we compare it with three representative anomaly detection methods to analyze anomalies under different operating conditions listed in Table 1. These methods include AE-LSTM, Transferable TranAD, and Exploring Sound Versus Vibration for Robust Fault Detection on Rotating Machine.

[0121] AE-LSTM (Autoencoder Long Short-Term Memory) combines the advantages of autoencoders (AEs) and long short-term memory networks (LSTMs). Autoencoders extract low-dimensional feature representations of the input data, while LSTMs model temporal relationships by capturing temporal dependencies in the data. It is particularly suitable for applications with complex temporal patterns.

[0122] TranAD (Transformer-based Anomaly Detection) is an anomaly detection method based on the Transformer architecture, specifically designed for time-series data. It uses a self-attention mechanism to capture long-term dependencies in the input data, thereby identifying complex anomaly patterns. Compared to traditional anomaly detection methods, TranAD can more effectively handle high-dimensional and complex time-series data.

[0123] Exploring Sound Versus Vibration for Robust Fault Detection on Rotating Machine is a fault detection method that combines sound and vibration signals. Sound signals reflect the overall operating status of the machine, while vibration signals provide information on local faults. Combining the two can overcome the limitations of a single signal source, adapt to situations with significant noise interference, and effectively enhance the reliability of fault detection.

[0124] The proposed method and three comparative methods are modeled using normal data preprocessed with a low-pass filter, and tested under five abnormal conditions. The performance of the four methods is comprehensively evaluated using four metrics: accuracy P, F1 score, fault detection rate (FDR), and false alarm rate (FAR). Their calculation formulas are as follows:

[0125] Accuracy: Fault detection rate:

[0126] F1 value: False alarm rate:

[0127] Where TP represents the number of correctly predicted positive samples, FP represents the number of incorrectly predicted positive samples, FN represents the number of incorrectly predicted negative samples, and TN represents the number of correctly predicted negative samples. For the first three metrics, the closer they are to 1, the better the model performance; for the last metric, the closer they are to 0, the better the model performance.

[0128] Table 2 Comparison results between TADUFMA and the comparative method

[0129]

[0130] We conducted six independent replicate experiments, and all experimental results are summarized in Table 2. The best result with the best average of the six experiments is marked in bold. Under Conditions 1, 2, and 3, our method significantly outperforms the three comparative methods in terms of accuracy, F1 score, and fault detection rate, exceeding them by at least 20 percentage points. Under Conditions 4 and 5, our method significantly outperforms AE-LSTM and ESVRFDRM in the first three indicators. TranAD's method lags behind our method in the first two indicators, but is on par with our proposed method in terms of FDR. Therefore, our proposed method has an absolute advantage in the first three indicators. Regarding the false alarm rate, TADUFMA is slightly inferior to ESVRFDRM because ESVRFDRM is specifically designed to reduce the false alarm rate. However, the FAR of our proposed method is no higher than 1%, which is still within an acceptable range. Furthermore, the deviation P-std calculated in the six independent experiments shows that although the diffusion model in TADUFMA introduces randomness, its P-std is smaller than other methods and ranks best among all methods, demonstrating its excellent robustness. This advantage is primarily attributed to two key design features of TADUFMA: (i) the autoregressive latent vector enhances its ability to capture changes in operating conditions; and (ii) the unified attention module enables multi-level extraction of common features from the data. By summarizing and comparing the data in Table 3, we found that TADUFMA ranked first in accuracy (99.759%), fault detection rate (99.998%), and F1 score (99.888%). This demonstrates that compared to the contrasting methods, TADUFMA can withstand the influence of different data distributions in complex multi-condition data and successfully complete anomaly detection tasks even in environments where data features are highly concealed.

[0131] Furthermore, this invention proposes a model that integrates multiple deep learning algorithms. We observed a significant correlation between the number of model layers and the learning rate, which has a substantial impact on model performance. Simultaneously, the proposed method introduces a historical memory module during multi-condition mapping, thus correspondingly setting the spatiotemporal cue length N, which affects the results. To further explore the optimal configuration of these hyperparameters, we will systematically explore the optimal combination by adjusting the numerical range of different hyperparameters, thereby further optimizing model performance.

[0132] The impact of model layer number and learning rate on experimental results is summarized in Table 3. Table 3 shows that anomaly detection performance is optimal when the model has only one layer. This result can be attributed to the integration of a multi-domain unified attention mechanism, convolutional neural network, and Transformer in our model, resulting in a more comprehensive and richer information set of mixed features. Therefore, we fixed the model layer number to one. Consistent with previous studies, we used the Adam optimizer to adjust the weight parameters. As shown in Table 3, within a certain range, increasing the learning rate significantly improved the mean values ​​of P, F1, and FDR indices and reduced the false positive rate. However, when the learning rate exceeds 0.001, excessively high learning rates lead to a decrease in model performance. This phenomenon can be attributed to overfitting caused by high learning rates. Given the wide and uneven range of audio signal time series, excessively high learning rates may exacerbate the instability of model parameter updates. Therefore, we chose to configure the learning rate of the TVDAD model to 0.001.

[0133] Table 3. Effects of network layer number and learning rate on experimental results under Condition 3.

[0134]

[0135] The impact of spatiotemporal cue length on model performance is summarized in Table 4. As shown in Table 4, the model accuracy significantly improved from the pure frame mode with N=0 to N=3, eventually reaching 99.4%. This trend indicates that the differences between latent vectors can effectively regulate the mapping of common features. However, when N is greater than 3, further increases in the spatiotemporal cue length actually led to a decrease in fault detection performance. This is because our training set only contains three operating conditions. As the value of N exceeds 3, more repetitive operating condition information is introduced, thus affecting the model's accuracy. Therefore, we fixed the spatiotemporal cue length N to 3 as the final parameter.

[0136] Table 4. Influence of spatiotemporal cue length on experimental results under different operating conditions.

[0137]

[0138] In the framework proposed in this invention, the adaptive denoising module (TDSAD), the multi-domain unified attention module, and the hybrid variational autoencoder architecture based on Transformer (VFA-MAD (Transformer)) are the main factors affecting the high performance of the model. In order to explore their specific roles, we tested the performance of these modules under five conditions using four metrics: Precision, F1, FDR, and FAR. The results are summarized in Table 5.

[0139] Table 5 Ablation Experiment Results of TVDAD

[0140]

[0141] To better illustrate the effectiveness of each component in the overall model, the first row of each condition in Table 5 represents the experimental results of our complete model.

[0142] First, we verified the effect of the TDSAD adaptive denoising network. We directly fed the raw data into VFA-MAD for common feature mapping and performed fault detection. The specific experimental results are shown in the second row of each condition in Table 5. By comparing the test results in the first and second rows of Table 5, although the performance of TVDAD did not change much in terms of FDR and FAR, the accuracy improved by an average of 11.82%, and the false alarm rate decreased by an average of 1.12%. This proves that TDSAD has a positive effect on improving the final detection performance in the denoising module.

[0143] Secondly, we further verified the role of the multi-domain unified attention module. Specific experimental results are shown in the third row of each condition in Table 5. In the ablation experiments, the original data, after being denoised by the TDSAD module, was directly passed to VFA-MAD for multi-condition mapping. As shown in Table 5, although several metrics did not change significantly under conditions 1 and 5, the accuracy of the model without the multi-domain unified attention module decreased by 75% under condition 2, especially in conditions 3 and 4 where the accuracy became 0. This experimental data indicates that in most conditions, the model lacking the multi-domain unified attention module cannot correctly map common features. This result is attributed to the fact that VFA-MAD, lacking a multi-domain unified attention mechanism, tends to overemphasize local features and ignore global feature changes, thus incorrectly mapping abnormal data to the normal range during mapping.

[0144] To better demonstrate the performance of the multi-domain unified attention module, we visualized the processing procedure. Without the multi-domain unified attention mechanism, the VFA-MAD model focuses solely on mapping the data features of the current batch using a convolutional neural network and the Transform attention mechanism, such as... Figure 5 As shown, this approach fails to effectively map data from various operating conditions to a unified latent space. Adding a multi-domain unified attention module allows the global features extracted by the module to directly correct the VFA-MAD mapping process, such as... Figure 6 As shown, this perfectly maps data from multiple operating conditions into a unified distributed potential space.

[0145] Finally, to illustrate the role of the Transformer architecture in VFA-MAD, we replaced the Transformer-based encoder-decoder architecture in the VFA-MAD model with a simple feedforward network for comparison. By comparing the experimental results in the first and last rows of Table 5, we can see that the feedforward network performs well under some simpler conditions, but its accuracy is significantly lower than the Transformer-based architecture when dealing with more challenging conditions such as conditions 1, 2, and 3, with an average decrease of 10%. This is because it lacks the Transformer's attention mechanism to guide the mapping of VAE common features; the simple feedforward network cannot effectively capture long-range dependencies and global contextual information in the data. In contrast, the Transformer-based encoder-decoder architecture, with its self-attention mechanism, can adaptively assign weights to each input data point, thus better capturing key information in the data, especially in scenarios with multiple conditions and multi-dimensional features.

[0146] The embodiments and detailed descriptions provided in this patent document are intended to illustrate the concepts, principles, and applications of the present invention, and not to limit the scope of protection of the present invention. The scope of protection of the present invention should be determined by the claims, and it should be understood that any technical improvements, substitutions, or variations that conform to the innovative spirit and essence of the present invention, as long as they do not exceed the scope of protection defined by the claims, should be considered within the scope of protection of the present invention. Those skilled in the art, under the guidance of the present invention, can make various forms of substitutions or adjustments to adapt to different application scenarios and needs, without departing from the core ideas and scope of protection of the present invention.

Claims

1. A method for detecting anomalies in computerized flat knitting machines under multiple working conditions and noisy environments, characterized in that, Includes the following steps: S1, Select training data and test data from the relevant dataset of industrial process computerized flat knitting machine operation; S2, based on timestamps, sequentially converts training and test data into local contextual prompt windows. ; S3, using the TDSAD noise reduction module to... Adaptive denoising training is performed to obtain denoised data; the denoising module TDSAD includes a noise adaptive diffusion network based on a diffusion model and a reverse denoising neural network based on Transformer. S4. Fine-tune the TDSAD model parameters using the first loss function, and then repeat S3 to obtain the final denoising module TDSAD. S5, the VFA-MAD multi-condition mapping module is used to perform multi-condition mapping on the denoised data to obtain the reconstructed data; the VFA-MAD includes a multi-domain unified attention module, a GNN-based feature extractor and a Transformer-based hybrid variational autoencoder. The multi-domain unified attention module is used to enhance the denoised data. The enhanced data is input into a CNN-based feature extractor to obtain high-order feature representations, which are then input into a Transformer-based hybrid variational autoencoder (VAE). First, a reparameterization technique is used to obtain latent vectors. Then, the latent features are used as input to the Transformer for feature mapping and spatial reconstruction, resulting in a reconstructed output. The processing steps of the multi-domain unified attention module are as follows: First, analyze the features of the denoised data. Perform global attention operations using the formula: ; Calculate the attention score; where, This is the data for the current window. and These represent the data from other windows within the entire data segment. Indicates the number of windows. This is the dimension of the current window data; subsequently, the attention score is fused with the original data to generate an enhanced data representation. Right now: ; S6. Fine-tune the VFA-MAD model parameters using the second loss function, and then repeat S5 to obtain the final multi-condition mapping module VFA-MAD. S7, Anomaly detection training phase: Based on the training data and the reconstructed output obtained using the multi-condition mapping module, anomaly scores are defined, and the peak threshold method is used to select the threshold. S8, the anomaly detection test phase, uses the anomaly scores and thresholds generated in S7 to mark the anomaly data and obtain the final detection results.

2. The method for detecting abnormalities in computerized flat knitting machines under multiple working conditions and noisy environments as described in claim 1, characterized in that: In step S1, normal data under different working conditions are selected from the relevant dataset of industrial process computer flat knitting machine operation as test data, and a set of normal data and abnormal data under different working conditions are selected as test data, with the two types of data each following a different probability distribution. The test data are from different domains, but some of them are from the same domain as the training data.

3. The method for detecting anomalies in a computerized flat knitting machine under multiple working conditions and noise environments as described in claim 1, characterized in that: The noise adaptive diffusion network includes a noise forward diffusion module, a position encoder, a three-layer Transformer-based encoder, and a first decoder; the inverse denoising neural network includes a noise inverse denoising module, a position encoder, a three-layer Transformer-based encoder, and a second decoder.

4. The method for detecting abnormalities in computerized flat knitting machines under multiple working conditions and noisy environments as described in claim 3, characterized in that: The first and second decoders have the same network structure, both including a shielded multi-head attention layer, a multi-head cross-attention layer, a feedforward fully connected layer, and residual connections and normalization layers. The goal of the first decoder is to simulate and reproduce various noise scenarios in the final stage of forward diffusion by maximizing the loss. Increase the intensity of the second decoder's denoising task; The second decoder minimizes the loss in the final stage of the reverse generation process. To perform adaptive denoising, the first decoder is forced to generate a more complex noisy scene. The total loss, i.e., the first loss function, is defined as: ; in It refers to training rounds. It is a parameter that controls the intensity of noise reduction. These represent the outputs of the first decoder and the second decoder, respectively.

5. The method for detecting abnormalities in computerized flat knitting machines under multiple working conditions and noise environments as described in claim 1, characterized in that: The second loss function is the correlation loss. VAE loss Reconstruction loss The weighted average, where the correlation loss The calculation formula is as follows: ; in For multi-domain unified attention unified module, For the current batch of data, For data from other batches, The quantity of the batch; VAE loss The calculation formula is as follows: ; ; in, This represents the potential vector at the current time step, while It is the first The potential vector of each historical time step, where N is the spatiotemporal cue length; It is a hyperparameter. This indicates the first input into the VAE. 10 samples, of which It is the distribution of the latent variables output by VAE. It is the probability of the data generated by VAE. Represents the latent variable Distribution Seeking expectations, This indicates that the KL divergence is calculated on it; Finally, the reconstruction loss is calculated using the L1 norm: ; in The number of reconstructed outputs, Represents the first in the training data One data point, Indicates the first in the reconstructed output data Data points.

6. The method for detecting abnormalities in computerized flat knitting machines under multiple working conditions and noise environments as described in claim 5, characterized in that: The second loss function is defined as: ; in, This indicates the calculation of the average value. It is the reconstruction loss. These are the weights of the VAE loss. It is correlation loss. It is the weight of the correlation loss.

7. The method for detecting abnormalities in computerized flat knitting machines under multiple working conditions and noisy environments as described in claim 6, characterized in that: Calculated using the following formula: ; in This refers to calculating the average value. This refers to the Kullback-Leibler divergence of all data in a VAE. This refers to the Kullback-Leibler divergence of the current data.

8. The method for detecting abnormalities in computerized flat knitting machines under multiple working conditions and noise environments as described in claim 1, characterized in that: The anomaly score during the anomaly detection training phase is defined as: ; in For training data, For the reconstruction output of the multi-condition mapping module, These are abnormal scores; During the anomaly detection testing phase, an anomaly score is calculated for each timestamp of the test data. If the anomaly score exceeds a set threshold, the timestamp is marked as an anomaly.

9. The method for detecting abnormalities in computerized flat knitting machines under multiple working conditions and noisy environments as described in claim 1, characterized in that: It also includes using accuracy P, F1 value, fault detection rate FDR, and fault false alarm rate FAR as evaluation indicators to evaluate the final anomaly detection results.

Citation Information

Patent Citations

  • Defect online detection method and system for computerized flat knitting machine

    CN118883580A

  • Attitude detection method based on livestock three-dimensional measurement

    CN119359783A