Washing machine abnormal sound recognition method and system and computer readable storage medium
By using a teacher-student model framework and a dynamic distillation mechanism, the problems of noise environment robustness, computational efficiency, and incremental updates in washing machine noise recognition are solved, achieving efficient, low-cost noise recognition and lightweight deployment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-05
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies lack robustness in identifying abnormal noises from washing machines in complex noise environments. The computational complexity of the model conflicts with the needs of edge deployment. Incremental learning suffers from catastrophic forgetting and high-cost updates.
A teacher-student model framework is constructed, and the high-precision discrimination capability of the large model is transferred to the lightweight model through knowledge distillation. Sample-level knowledge alignment and dynamic distillation mechanism are introduced to achieve low-cost incremental updates and efficient recognition.
It maintains excellent abnormal sound recognition performance in complex noise environments, reduces computational complexity and deployment costs, effectively mitigates catastrophic forgetting, and is suitable for deployment on edge devices.
Smart Images

Figure CN121838802A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of audio recognition technology, and in particular to a method, system, and computer-readable storage medium for identifying abnormal noises from washing machines. Background Technology
[0002] With the rapid development of intelligent manufacturing and the Industrial Internet, equipment condition monitoring and fault early warning based on acoustic signals have become one of the key technologies in the field of industrial quality inspection. As a mass-produced household appliance, the abnormal noises emitted during the operation of washing machines (such as metal impacts, friction squeals, and loose parts) are important indicators reflecting assembly quality, component defects, or aging failures. Traditional methods for detecting abnormal noises in washing machines mainly rely on experienced quality inspectors to identify them by ear. This method is not only inefficient and costly, but also easily affected by subjective factors and hearing fatigue, making it difficult to meet the high-efficiency, high-consistency, and traceability quality control requirements of modern production lines.
[0003] In recent years, machine learning-based audio recognition technology has provided a feasible path for automated abnormal noise detection. By collecting audio from washing machines, extracting acoustic features (such as MFCC and Mel spectrum), and training classification models (such as support vector machines and deep neural networks) to distinguish normal sounds from various abnormal noises, a degree of automation in detection has been achieved. However, applying such technologies to real and complex industrial manufacturing environments still faces a series of serious challenges:
[0004] (1) Insufficient robustness in complex noise environments: There are many background noise sources in actual production workshops (such as mechanical transmission, pneumatic tools, human voices, environmental broadcasts, etc.), and they have non-stationary and strong interference characteristics. Abnormal sound signals are often weak in energy and short in duration, and are easily submerged in background noise. Existing models are usually trained on relatively clean laboratory data. When transferred to the complex sound field of the production line, the recognition performance drops significantly, and the false alarm rate and false negative rate increase.
[0005] (2) The contradiction between model computational complexity and edge deployment requirements: In order to achieve high recognition accuracy, existing solutions often use complex models with a large number of parameters and deep layers (such as large convolutional neural networks and Transformers). These models have high requirements for computing resources and power consumption, and are difficult to deploy directly in resource-constrained environments such as the edge of the production line or embedded quality inspection equipment. On the other hand, directly designing lightweight models often comes at the cost of sacrificing accuracy and cannot meet the high standards of quality inspection.
[0006] (3) Catastrophic forgetting and high update costs in incremental learning scenarios: Washing machine product models, component suppliers, and assembly processes are constantly updated and iterated, resulting in new types of abnormal noises. The model needs to have the ability to continuously learn new knowledge. There are two traditional approaches: one is to retrain the model with all historical data plus new data for each update, but this requires storing all historical data and is time-consuming and labor-intensive, making the cost unacceptable; the other is to fine-tune the model with only new data, but this will cause the model's performance in recognizing old types of abnormal noises that it has seen before to decline sharply, i.e., the "catastrophic forgetting" problem. How to achieve incremental model updates in a low-cost and high-efficiency manner while ensuring that historical knowledge is not forgotten is the core pain point in practical applications.
[0007] To address these challenges, the industry has attempted to introduce knowledge distillation and incremental learning techniques. Knowledge distillation transfers knowledge from a large "teacher model" to a lightweight "student model," aiming to maintain performance while compressing the model. Incremental learning, on the other hand, aims to allow the model to continuously learn new tasks without forgetting old knowledge. However, existing combined solutions still have limitations when applied to industrial audio quality inspection scenarios: First, traditional knowledge distillation treats all historical samples "equally" in incremental learning, failing to distinguish the contribution of different samples to the retention of old knowledge, which may lead to low knowledge transfer efficiency or conflicts between new and old knowledge; second, it lacks a fine-grained screening mechanism for the old knowledge provided by the teacher model, which may transfer redundant or conflicting old knowledge along with the current learning objectives, interfering with the learning of new knowledge; third, the mechanism for dynamically adjusting the learning intensity of new and old knowledge is insufficient, making it difficult to achieve a stable balance in the complex and ever-changing incremental update process.
[0008] Therefore, there is an urgent need for a washing machine noise recognition solution designed for industrial noise environments, which balances recognition accuracy and computational efficiency, and can reliably perform incremental updates at low cost, effectively mitigating catastrophic forgetting. Summary of the Invention
[0009] This invention provides a method, system, and computer-readable storage medium for identifying abnormal noises in washing machines. The technical problem it solves is: how to design for industrial noise environments, balance recognition accuracy and computational efficiency, and stably perform incremental updates in a low-cost manner to effectively mitigate catastrophic forgetting in the identification of abnormal noises in washing machines.
[0010] To solve the above technical problems, the present invention provides a method for identifying abnormal noises in a washing machine, comprising:
[0011] A. Collect the sound of the washing machine running and preprocess it to generate an audio representation;
[0012] B. Construct a teacher model to generate old knowledge information for knowledge transfer from the input audio representation; construct a student model that is lighter than the teacher model to generate new knowledge information for recognition and training from the input audio representation.
[0013] C. Train the teacher model using the audio representation;
[0014] D. Using the audio representation and the trained teacher model, train the student model through knowledge distillation;
[0015] E. Deploy the trained student model to the edge device.
[0016] Furthermore, the knowledge distillation described in step D includes:
[0017] Input batch data simultaneously into the teacher model and the student model to be trained with fixed parameters;
[0018] Extract the old knowledge information output by the teacher model and the new knowledge information output by the student model;
[0019] For each sample, calculate the correlation metric between the old knowledge information and the new knowledge information to generate a sample-level alignment.
[0020] Based on the sample-level alignment, the old knowledge information is weighted and purified to generate a purified old knowledge representation.
[0021] Distillation loss is calculated based on the purified old knowledge representation and the output of the student model.
[0022] The parameters of the student model are updated through backpropagation, while the parameters of the teacher model remain frozen.
[0023] Furthermore, the relevance measure is implemented through a cross-attention mechanism, including:
[0024] Project the new knowledge information output by the student model into a query vector;
[0025] The old knowledge information output by the teacher model is projected into key vectors and value vectors respectively;
[0026] The attention weight matrix is calculated using the query vector and the key vector, and is used as the sample-level alignment.
[0027] The value vector is weighted and summed using the attention weight matrix to generate a purified representation of the old knowledge.
[0028] Furthermore, the knowledge distillation described in step D also includes:
[0029] The attention weight matrix is then aggregated into scalar features through global pooling.
[0030] The scalar features are input into the mapping network, and sample-level dynamic distillation weights between 0 and 1 are generated by the Sigmoid activation function.
[0031] The dynamic distillation weight is used as a weighting coefficient for distillation loss and is included in the total loss calculation.
[0032] Furthermore, after step E, the following is also included:
[0033] F. Collect new types of unusual noises from washing machine operation and preprocess them to generate new audio representations, thus constructing a new sample set;
[0034] G. Extract data from the audio representation and the new audio representation to construct a hybrid audio representation;
[0035] H. Using the hybrid audio representation and the trained teacher model, incrementally train the trained student model through knowledge distillation;
[0036] 1. Deploy the incrementally trained student model to the edge device.
[0037] Furthermore, the knowledge distillation described in step H includes:
[0038] Batch data is sampled from the mixed audio representation, the batch data containing both historical samples and new samples;
[0039] Input batch data into both the teacher model with fixed parameters and the student model to be updated simultaneously;
[0040] Calculate the sample-level alignment using the same process as in step D, generate the purified old knowledge representation, and generate sample-level dynamic distillation weights.
[0041] Cross-entropy loss is calculated based on the predicted output of the student model and the true labels of the samples, and distillation loss is calculated based on the purified old knowledge representation and the output of the student model.
[0042] The total incremental training loss is obtained by summing the weighted distillation loss with the cross-entropy loss using the aforementioned dynamic distillation weights.
[0043] Backpropagation is performed on the total incremental training loss, updating only the parameters of the student model.
[0044] Furthermore, the teacher model is a high-parameter model based on a Transformer encoder, including an input embedding layer, stacked Transformer encoder layers, and an output layer; the input embedding layer is used to map audio features into a high-dimensional feature sequence and add position encoding; the Transformer encoder layer is composed of a multi-head attention mechanism and a feedforward neural network, and is stacked through residual connections and layer normalization; the prior knowledge information includes at least one of intermediate layer features, final layer features, or output probability distribution after high-temperature softening.
[0045] Furthermore, the student model is a lightweight network structure, including: a lightweight feature extraction layer for extracting local acoustic features through lightweight convolution or feature mapping; a lightweight attention layer for adaptively weighting the features; and a feature fusion and compression layer for aggregating and compressing the features into a compact vector for classifier decision-making.
[0046] The present invention also provides a washing machine noise recognition system, the key of which is: including a historical data construction unit, a teacher-student model construction unit, a teacher model training unit, a student model initial training unit, a student model deployment unit, a new sample collection unit, a mixed dataset construction unit, a student model incremental training unit, and a student model redeployment unit, which are respectively used to execute steps A to I in the washing machine noise recognition method.
[0047] The present invention also provides a computer-readable storage medium, the key feature of which is that a computer program is stored thereon, which, when executed by a processor, implements the aforementioned method for identifying abnormal noises in a washing machine.
[0048] The washing machine noise recognition method, system, and computer-readable storage medium provided by this invention are based on a core "teacher-student" dual-model framework, incorporating sample-level knowledge alignment and dynamic distillation mechanisms. During incremental learning, by calculating the alignment degree between new and old knowledge representations, the old knowledge provided by the teacher model is selectively purified, transferring only knowledge components relevant to the current sample. Simultaneously, sample-level dynamic distillation weights are generated to adaptively adjust the intensity of knowledge transfer across different samples. Combined with differentiated loss strategies for new and old samples and mixed sampling training, this approach effectively mitigates catastrophic forgetting while significantly reducing reliance on historical data and retraining costs, while ensuring the student model remains lightweight and suitable for edge deployment.
[0049] The technical effects achieved by this invention are as follows:
[0050] By transferring the high-precision discrimination capability of the large model (teacher model) to the lightweight model (student model) through knowledge distillation, and combining it with audio preprocessing designed for industrial noise, the system can still maintain excellent abnormal sound recognition performance in complex noise environments, with high recognition accuracy and robustness.
[0051] The student model has a lightweight structure, significantly reducing the number of parameters and computational complexity, and supports real-time inference on edge devices or low-power terminals, thus reducing deployment costs and resource overhead.
[0052] The innovative sample-level alignment and dynamic distillation mechanism enables the model to complete efficient and low-cost incremental updates using only a small number of historical and new samples for training, while effectively suppressing the forgetting of learned knowledge.
[0053] It does not depend on a specific network structure and can flexibly select different model architectures, alignment methods and loss functions according to actual needs. It has good scalability and can be extended to other industrial acoustic detection scenarios. Attached Figure Description
[0054] Figure 1 This is an overall flowchart of the washing machine noise recognition method provided in this embodiment of the invention;
[0055] Figure 2 This is a flowchart of audio acquisition and preprocessing provided in an embodiment of the present invention;
[0056] Figure 3 This is a schematic diagram of the structure of the teacher model provided in an embodiment of the present invention;
[0057] Figure 4 This is a schematic diagram of the student model provided in an embodiment of the present invention;
[0058] Figure 5 This is a schematic diagram illustrating the principle of sample-level knowledge alignment and purification.
[0059] Figure 6 This is a schematic diagram of the knowledge distillation training principle in the incremental learning stage (step H);
[0060] Figure 7 This is a flowchart of the deployment process for student models to perform real-time inference on edge devices. Detailed Implementation
[0061] The embodiments of the present invention are described in detail below with reference to the accompanying drawings. The embodiments are given for illustrative purposes only and should not be construed as limiting the present invention. The accompanying drawings are for reference and illustration only and do not constitute a limitation on the scope of patent protection of the present invention, because many changes can be made to the present invention without departing from the spirit and scope of the present invention.
[0062] This invention first provides a method for identifying abnormal noises in a washing machine, such as... Figure 1 The flowchart shows that the method includes the following steps:
[0063] A. Collect the operating sound of the washing machine and preprocess it to generate an audio representation, and build a historical dataset;
[0064] B. Construct a teacher model to generate old knowledge information for knowledge transfer from the input audio representation; construct a student model that is lighter than the teacher model to generate new knowledge information for recognition and training from the input audio representation.
[0065] C. Train the teacher model using historical datasets;
[0066] D. Using historical datasets and trained teacher models, train student models through knowledge distillation;
[0067] E. Deploy the trained student model to the edge device.
[0068] At this point, the sound of the washing machine to be identified is preprocessed and then input into the trained student model, which outputs the abnormal sound recognition result.
[0069] When a new type of abnormal noise appears in the production environment (e.g., a unique noise from a new model of washing machine), the identification method also includes the following steps:
[0070] F. Collect new types of unusual noises from washing machine operation and preprocess them to generate new audio representations, thus constructing a new sample set;
[0071] G. Extract data from historical datasets and newly added sample sets to construct a hybrid dataset;
[0072] H. Using a hybrid dataset and a trained teacher model, incrementally train the trained student model through knowledge distillation.
[0073] I. Deploy the incrementally trained student model to the edge device.
[0074] At this point, the sound of the washing machine to be identified is preprocessed and then input into the retrained student model, which outputs the abnormal sound recognition result.
[0075] When a new type of abnormal noise appears in the production environment (e.g., a unique noise from a new model of washing machine), steps F to I are iteratively executed to enhance and update the student model. The model deployed on the edge device is always the student model. The teacher model exists only during the training phase on the server side and is never deployed to the edge device. To make the model more lightweight, before deploying to the edge device, optimizations such as quantization, pruning, and compilation optimization can be performed on the latest version of the student model, resulting in a smaller, faster, and lower-power student model with minimal loss of accuracy.
[0076] In each incremental learning process, by calculating the alignment between the old and new knowledge representations, on the one hand, the old knowledge provided by the teacher model is selectively purified, transferring only the knowledge components related to the current sample; on the other hand, sample-level dynamic distillation weights are generated to adaptively adjust the intensity of knowledge transfer on different samples. Further, differentiated loss strategies and mixed sampling training are implemented for the old and new samples. This can effectively alleviate catastrophic forgetting while greatly reducing dependence on historical data and retraining costs, and at the same time ensure that the student model maintains its lightweight characteristics and is suitable for edge deployment.
[0077] The following provides a detailed explanation of some of the steps.
[0078] (1) Steps A and F: Audio acquisition and preprocessing
[0079] Figure 2 This is a flowchart of audio acquisition and preprocessing. For example... Figure 2 As shown, the audio acquisition and preprocessing process is as follows:
[0080] Collect sound data of washing machines with various background noises from real industrial production lines or test environments;
[0081] The collected audio data is cleaned to remove invalid or severely distorted segments;
[0082] Background noise is processed using conventional filtering or spectral subtraction, and acoustic features (such as Mel spectral coefficients) are obtained by performing operations such as pre-emphasis, framing, windowing, Fourier transform, Mel filter, and logarithmic calculation on the audio data, forming the feature input used in the subsequent training and inference process.
[0083] Since the methods for data acquisition and preprocessing are basically existing and mature audio signal processing methods, this embodiment will not elaborate further.
[0084] (2) Step B: Construct a teacher-student dual model
[0085] ①Teacher Model
[0086] The teacher model is used to perform deep feature representation on the input audio representation and output prior knowledge information. Prior knowledge information can be intermediate layer features, output layer features, or output probability distributions of the teacher model, which are used for subsequent knowledge transfer and distillation constraints.
[0087] The teacher model employs a large-parameter model structure based on a Transformer encoder, utilizing an attention-based network structure to enhance its global modeling capability for time and frequency domain information. In other embodiments, the teacher model may also be implemented using convolutional networks, recurrent networks, transformer structures, or combinations thereof. This invention does not limit the specific network form and layer configuration of the teacher model; its key feature is that the teacher model can provide prior knowledge information for knowledge transfer, thereby providing stable teacher guidance for the lightweight training and incremental updates of the student model.
[0088] As an example, the architecture of the teacher model is as follows: Figure 3 As shown, it includes an input embedding layer, stacked Transformer encoder layers, and an output layer. Through training with large-scale audio data, the teacher model achieves high-precision discrimination against various abnormal sounds, normal sounds, and multiple background noise features from a washing machine. The teacher model outputs a deep representation or probability distribution of the audio features, providing soft targets (soft labels) or intermediate features for the subsequent knowledge distillation stage.
[0089] The preprocessed acoustic features enter the input embedding layer. The input embedding layer first passes through a linear projection layer or a lightweight convolutional layer to map the features of each time frame to a higher hidden dimension (such as 512 or 768). At the same time, learnable positional encoding is added to inject the temporal order information of the sequence, compensating for the Transformer's inherent insensitivity to sequence. Finally, the output is a Transformer encoder layer with the feature sequence input stacked.
[0090] The stacked Transformer encoder layers serve as the core feature extractors, consisting of L (e.g., 12) identical encoder layers stacked together. Each layer primarily comprises two core sub-layers: a multi-head attention mechanism layer and a feedforward neural network, both employing residual connections and layer normalization for stable training. The multi-head attention mechanism layer enables global interaction between features from any two time frames in the sequence, thereby modeling the long-range dependencies of the entire audio segment. This is crucial for determining the temporal diffusion patterns of unusual sounds and distinguishing their co-occurrence with noise. Specifically, the multi-head attention mechanism layer linearly maps the input sequence into query, key, and value matrices, and splits them into H heads. Each head independently computes attention within a different representation subspace, and the results are then concatenated and projected. The feedforward neural network performs non-linear transformations and enhancements on the features at each position of the self-attention layer's output. This network is typically a two-layer fully connected network containing activation functions such as ReLU. Layer normalization is performed before the output of each sub-layer, and it is added to its input (residual connection), which greatly alleviates the gradient problem during deep network training.
[0091] After L layers of encoding, the final high-level representation of the sequence is obtained and enters the output layer. The prior knowledge information from the teacher model can be extracted from multiple levels for subsequent distillation, including intermediate layer features (feature maps output by specific encoder layers, containing information at different levels of abstraction), final layer features (features output by the last encoder layer, representing the model's final context-aware representation of the input audio), a classification head, and soft labels. For the output of the classification head and soft labels, a global average pooling layer and a fully connected classifier can be added above the final layer features to output the probability distribution of each sound category. By setting a high temperature coefficient, soft labels can be obtained, which contain rich similarity information between categories (e.g., "high-frequency howling" and "metallic friction sound" may be related), which is more conducive to knowledge transfer than simple hard labels.
[0092] The Transformer's self-attention mechanism enables it to directly capture the correlation between distant frames in an audio sequence, which has an inherent advantage in understanding the temporal structure of abnormal sounds and distinguishing between periodic noise and transient abnormal sounds. Its large number of parameters (tens of millions or even hundreds of millions) and deep structure give it the ability to learn extremely complex and nonlinear acoustic patterns, thus enabling it to focus on weak abnormal sound signals in high-noise backgrounds.
[0093] ②Student Model
[0094] The student model is used to represent the input audio and output the recognition result as the main update object. It adopts a lightweight network structure, such as a convolutional network, an attention network, or a combination thereof. In one embodiment, a convolutional attention network structure can be adopted, combined with point convolution, depthwise separable convolution, gated linear units, and lightweight multi-head attention modules to build a network with high efficiency and low parameter count.
[0095] The student model and the teacher model are jointly trained. During the knowledge distillation process, the distillation loss function enables the student model to mimic the discriminative ability of the teacher model. After training, the student model can be independently deployed to resource-constrained edge devices for real-time inference.
[0096] As an example, the architecture of the student model is as follows: Figure 4 As shown, it includes a lightweight feature extraction layer (convolution or feature mapping), a lightweight attention layer, and a feature fusion and compression layer. The lightweight feature extraction layer is used to efficiently extract local basic acoustic features from the audio spectrum using lightweight convolution operations. The lightweight attention layer is used to adaptively weight the features, focusing on the time and frequency segments most critical for identifying abnormal sounds. The feature fusion and compression layer is used to aggregate and compress the aforementioned features into a compact vector representation for the final classifier to make decisions. The student model with this structure has a small number of parameters and low computational cost, making it suitable for deployment on edge devices.
[0097] (3) Knowledge distillation in step D
[0098] The purpose of knowledge distillation in step D is to enable the lightweight student model to learn and approximate its knowledge representation and decision-making capabilities under the guidance of the teacher model with fixed parameters. The knowledge distillation process includes:
[0099] 1) First stage: Preparation and prerequisites
[0100] Specifically, this includes: fixing the teacher model, initializing the student model, and preparing the historical dataset.
[0101] The teacher model has been fully trained on the historical dataset, achieving high-precision recognition performance. During the subsequent knowledge distillation training process, all its parameters will be frozen (fixed), serving only as a static knowledge provider. The student model has a lightweight network structure (such as a hybrid of depthwise separable convolutions and lightweight attention), with a significantly smaller parameter size than the teacher model. A complete historical dataset is prepared, where each sample contains the original audio waveform or its feature representation and the corresponding true anomaly category label.
[0102] 2) Second stage, iterative training process
[0103] For each iteration (batch) during the training process, perform the following detailed operations:
[0104] Step 1: Forward Propagation and Knowledge Extraction
[0105] Step one specifically includes:
[0106] ① Sample a batch of training samples from the historical dataset;
[0107] ② Input the batch data into both the teacher model with fixed parameters and the student model to be trained simultaneously;
[0108] ③ The teacher model outputs old knowledge information, which can be soft labels (output layer probability distribution smoothed by the temperature parameter, rich in inter-category similarity information), intermediate features (feature maps or feature vectors extracted from specific deep layers of the teacher network), or final features (final feature representation of the teacher model before the classification layer).
[0109] ④ The student model outputs new knowledge information, which is usually the intermediate or final layer features calculated under its current parameters, as well as the original predicted probability distribution.
[0110] Step Two: Sample-Level Knowledge Alignment and Refinement
[0111] Step two aims to achieve selective and focused knowledge transfer, rather than simply copying everything. (Refer to...) Figure 5 The schematic diagram shown illustrates that sample-level knowledge alignment and refinement specifically includes:
[0112] ① For each sample in this batch, calculate the prior knowledge information output by the teacher model (denoted as...). ) and the new knowledge information output by the student model (denoted as ) A measure of correlation or consistency between attentional factors. A preferred implementation is a cross-attention mechanism, including the steps of:
[0113] By querying the projection matrix Will Projection as query vector (Query); Project the matrix through the key respectively Sum projection matrix Will Projected as key vectors respectively (Key) and value vector (Value);
[0114] Calculate the attention weight matrix using Query and Key. This matrix reflects Each section is related to the current student status. Sample-level alignment.
[0115] ② Using the attention weight matrix calculated above , value vector (i.e., Value) is weighted and summed to generate a purified representation of the old knowledge. This representation reinforces teacher knowledge relevant to the current student learning state while suppressing irrelevant or conflicting information.
[0116] Step 3: Dynamic Distillation Weight Generation
[0117] This step adaptively adjusts the strength of knowledge transfer for different samples. Specifically, this step includes:
[0118] The attention weight matrix calculated above They are aggregated into a scalar feature representing the overall alignment through global pooling (such as average pooling);
[0119] The scalar feature is input into a lightweight mapping network (such as a small fully connected layer), and then passed through a sigmoid activation function to generate a sample-level dynamic distillation weight between 0 and 1. . A large value indicates that the teachers and students have consistent understanding of the model in this sample, and distillation should be strengthened; a small value indicates that there are large differences, and the distillation intensity should be reduced.
[0120] Step 4: Loss Calculation and Joint Optimization
[0121] By designing a composite loss function, the student model is simultaneously constrained to learn real labels and imitate teacher knowledge. This embodiment designs a composite loss function for calculating supervised loss. and calculation of distillation loss The weighted sum is used. The standard cross-entropy loss is calculated by using the student model's raw predicted output with the sample's true hard labels. This ensures that the student model learns the correct classification boundary. For distillation loss, the purified prior knowledge is represented... The output of the corresponding layer of the student model is compared. If the feature is transferred, the mean squared error loss is used. If the soft label is transferred, the Kullback-Leibler divergence loss with temperature coefficient is used (the teacher output softened by high temperature provides richer knowledge).
[0122] Step 5: Parameter Update
[0123] Total losses Perform backpropagation. Note that gradients are only backpropagated through the student model; the teacher model's parameters are frozen and do not receive gradient updates. Update all parameters of the student model using an optimizer (such as Adam).
[0124] 3) The third stage: Termination and Output
[0125] This phase repeats the iterative process of the second phase until performance stabilizes on an independent validation set or the preset number of training epochs are reached. After training, a trained student model is obtained. This model is structurally lightweight and suitable for edge deployment. In terms of performance, due to inheriting the powerful representational capabilities of the teacher model through knowledge distillation, its recognition accuracy is significantly higher than that of a model trained from scratch using the same structure but only with supervised loss, and approaches the level of the teacher model. This student model has internalized knowledge of all anomaly categories learned from the historical dataset.
[0126] (4) Knowledge distillation in step H
[0127] In the incremental training step H, the knowledge distillation process follows the basic framework of step D, with specific optimizations for the incremental learning scenario. The goal of this step is to maintain the student model's ability to identify historical variant voice categories while introducing new variant voice category data (new sample set), achieving efficient model updates with low catastrophic forgetting. Its core is the introduction of a sample-level knowledge alignment mechanism and dynamic distillation weights during the distillation process, such as... Figure 6 The schematic diagram shown includes the following sub-steps in step H:
[0128] H1. Sample a batch of training samples from a mixed dataset, which includes new samples (newly collected samples) and historical samples in a preset ratio (e.g., 1:1).
[0129] H2. Input batch data into both the teacher model and the student model simultaneously. The teacher model outputs old knowledge information, and the student model outputs new knowledge information (prediction results). );
[0130] H3. Following the same sample-level knowledge alignment and purification, and dynamic distillation weight generation process described above, the purified old knowledge representation is obtained. and sample-level dynamic distillation weights ;
[0131] H4. Output based on the student model and refined representation of prior knowledge Calculate the distillation loss by using the cross-entropy loss based on the predicted output of the student model and the true labels of the samples;
[0132] H5, Dynamically Distill Weights at the Sample Level As weights for the distillation loss, the weighted sum of the distillation loss and cross-entropy loss is calculated as the total incremental training loss;
[0133] H6. Backpropagate the total loss from incremental training, updating only the parameters of the student model while keeping the teacher model parameters frozen. Iterate using an optimizer (such as Adam) until the model converges on the validation set or reaches the preset number of iterations.
[0134] It should be noted that, for distillation losses, if migration characteristics are considered, the mean squared error (MSE) is used to calculate the purified prior knowledge representation. Differences between student and corresponding features; if transferring soft labels, use KL divergence with temperature coefficient to calculate distillation loss.
[0135] This process achieves stable incremental updates to the student model without retraining the teacher model or relying on all historical data. Through sample-level alignment and a dynamic weighting mechanism, it adaptively balances the learning of new and old knowledge, significantly mitigating catastrophic forgetting. The resulting incrementally updated student model remains lightweight, suitable for deployment on edge devices, and supports continuous iterative updates.
[0136] (5) Model deployment in step E
[0137] This step aims to deploy the lightweight student model, trained through knowledge distillation, to edge computing devices in a real-world industrial environment (such as embedded quality inspection terminals, industrial control computers, and edge servers) to achieve real-time, low-power abnormal noise recognition of washing machine operation. The specific deployment process includes the following steps:
[0138] E1. Model Compression and Accelerated Preprocessing
[0139] Before deployment, the student model is optimized to further improve inference speed, reduce memory usage and energy consumption, and adapt to the resource constraints of edge devices. Optimization includes quantization, pruning, mixed-precision inference, graph optimization, and compilation. Quantization involves converting model weights and activation values from floating-point numbers (e.g., FP32) to a low-precision format (e.g., INT8), using dynamic quantization, static quantization, or perceptual training quantization, significantly reducing model size and accelerating computation with almost no loss of accuracy. Pruning removes redundant connections or channels from the model, such as structured pruning based on weight size or unstructured pruning based on gradients, further reducing the number of parameters and computational cost. Mixed-precision inference uses FP16 or BF16 precision for some layers on hardware that supports mixed precision, balancing speed and numerical stability. Graph optimization and compilation use inference frameworks (e.g., TensorRT, OpenVINO, TFLite) to optimize the model's computation graph through operator fusion, constant folding, etc., and compiles it into an efficient executable file for the target hardware.
[0140] E2, Model Format Conversion and Integration
[0141] The optimized model is then converted to a format supported by the edge device (such as TFLite, ONNX, TensorRT engine, CoreML, etc.). Next, the corresponding inference interface is written or configured to integrate the model into the edge device's runtime environment, ensuring that it can receive real-time audio streams or feature inputs.
[0142] E3, Edge Deployment and System Integration
[0143] Deploy the model files, dependency libraries, and inference program to the target edge device. Interface with the data acquisition module (microphone array or audio interface) to achieve real-time acquisition and preprocessing of audio signals (as in step A) and automatic construction of model input. Integrate the result output module to report the model recognition results (such as abnormal sound category, confidence level, and timestamp) to the central server via network protocols (such as MQTT and HTTP), or trigger local alarms, log recording, and other actions.
[0144] E4. Real-time Inference and Output
[0145] After deployment, the system will proceed as follows: Figure 7 The process shown is as follows:
[0146] Real-time audio recording of the washing machine in operation;
[0147] Perform preprocessing (noise reduction, feature extraction, etc.);
[0148] Input the audio features into the student model;
[0149] The model outputs the abnormal sound recognition results (normal / abnormal and specific abnormal sound category);
[0150] Perform corresponding operations (such as alarms, sorting, and recording) based on business logic.
[0151] (6) Model deployment in step I
[0152] This step is performed after the model has undergone incremental learning (step H), and aims to seamlessly deploy the updated student model to edge devices to support continuous recognition of new and old voice categories. Its process is similar to step E, but it places particular emphasis on model version management and update strategies, specifically including the following steps:
[0153] I1. Model Optimization and Validation
[0154] Perform the same compression and acceleration processing as E1 on the incrementally trained student model; validate the model performance on the test set (including historical and newly added variant voice categories) to ensure that there is no significant forgetting or decrease in accuracy after the update.
[0155] I2, versioning and hot update support
[0156] Version the model (e.g., by time or number of iterations);
[0157] The design supports a hot update deployment mechanism, allowing model files to be replaced without interrupting production testing services, thus reducing downtime.
[0158] Provides a rollback mechanism to quickly revert to the previous stable version when anomalies occur in the new model.
[0159] I3. Incremental Deployment and Smooth Switching
[0160] Push the new model file and configuration to the edge device;
[0161] Dynamic model loading can be achieved through device-side services or containerized deployment technologies (such as Docker);
[0162] You can use A / B testing to gradually switch traffic, or set up a maintenance window for batch updates.
[0163] I4. Monitoring and Feedback Closed Loop
[0164] After deployment, continuously monitor the model's recognition performance in real-world environments (such as accuracy, response time, and resource consumption); collect false positives and false negatives as data sources for subsequent incremental learning, forming a closed-loop iterative process of "deployment – collection – update – redeployment".
[0165] The deployment process in steps E and I is centered around the student model, while the teacher model is only used in the training phase and does not participate in edge inference. The deployment process can be optimized for specific hardware (such as Jetson series, Kunpeng, Qualcomm platform, etc.).
[0166] To address the aforementioned method for identifying abnormal noises in washing machines, this invention also provides a system for identifying abnormal noises in washing machines. This system includes a historical data construction unit, a teacher-student model construction unit, a teacher model training unit, a student model initial training unit, a student model deployment unit, a new sample collection unit, a mixed dataset construction unit, a student model incremental training unit, and a student model redeployment unit. These units are respectively used to execute steps A to I in the aforementioned method for identifying abnormal noises in washing machines. These units are divided according to function and can actually be implemented through software modules, hardware circuits, or a combination thereof. The units work collaboratively within the system to form a complete system for identifying abnormal noises in washing machines, jointly completing the entire process from data acquisition, model training, incremental updates to edge inference. The system can be integrated into a server, edge computing device, or distributed computing platform. Through data interfaces and calling relationships between the units, the automated execution and continuous optimization of the abnormal noise identification task can be achieved.
[0167] Furthermore, embodiments of the present invention also provide a computer-readable storage medium storing a computer program thereon. When executed by a processor, this computer program implements steps A to I of the aforementioned washing machine noise identification method. The storage medium includes, but is not limited to, disks, optical discs, solid-state drives, cloud storage, etc., and is suitable for loading and running on various computing devices.
[0168] This invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements steps A to I of the aforementioned washing machine noise recognition method. The electronic device can be a server, an industrial control computer, an embedded device, or any terminal device with computing capabilities.
[0169] In summary, this invention provides a method, system, and computer-readable storage medium for identifying abnormal noises in washing machines. Addressing the core challenge of automatic noise identification in industrial quality inspection, it constructs a collaborative "teacher-student" dual-model framework. The teacher model, with its large number of parameters and high accuracy, provides rich prior knowledge; while the lightweight student model is the execution entity ultimately deployed on edge devices on the production line. A key improvement of this invention lies in the introduction of a dynamic knowledge transfer mechanism. During incremental learning, the system calculates the alignment between the new knowledge representation of the student model and the old knowledge representation provided by the teacher model in real time. Based on this, on the one hand, old knowledge is filtered and refined, transferring only the parts most relevant to the current learning task, avoiding interference from irrelevant or conflicting knowledge; on the other hand, a dynamic weight is automatically generated to adjust the intensity of knowledge transfer. Simultaneously, the training strategy is more targeted: for newly added noise samples, it focuses on supervised learning using real labels; for historical samples, it relies more on knowledge distilled from the teacher model, thus efficiently learning new knowledge while firmly consolidating old memories. Finally, before deployment, the lightweight student model will be optimized through quantization, pruning, and other processes to better suit the computing power of edge devices and support smooth hot updates and version management.
[0170] Through the comprehensive application of these technologies, this invention achieves significant technical results. First, the system maintains high accuracy and robustness in identifying abnormal sounds even under complex industrial noise conditions. Second, the final deployed model is highly lightweight, capable of running in real-time on low-power edge devices, greatly reducing deployment costs and hardware barriers. Most importantly, the system supports efficient and low-cost incremental updates; requiring only a small amount of mixed new and old data for training, the model can continuously learn new types of abnormal sounds while effectively suppressing the forgetting of existing knowledge, achieving continuous performance evolution and a significant reduction in maintenance costs. This solution is not dependent on a specific network structure, possesses good flexibility and scalability, and can be widely applied to various industrial acoustic detection scenarios.
[0171] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A method of identifying abnormal sound of a washing machine, characterized by, Including the following steps: A. Collect the sound of the washing machine running and preprocess it to generate an audio representation; B. Construct a teacher model to generate old knowledge information for knowledge transfer from the input audio representation; construct a student model that is lighter than the teacher model to generate new knowledge information for recognition and training from the input audio representation. C. Train the teacher model using the audio representation; D. Using the audio representation and the trained teacher model, train the student model through knowledge distillation; E. Deploy the trained student model to the edge device.
2. The laundry machine abnormal sound recognition method of claim 1, characterized in that, The knowledge distillation described in step D includes: Input batch data simultaneously into the teacher model and the student model to be trained with fixed parameters; Extract the old knowledge information output by the teacher model and the new knowledge information output by the student model; For each sample, calculate the correlation metric between the old knowledge information and the new knowledge information to generate a sample-level alignment. Based on the sample-level alignment, the old knowledge information is weighted and purified to generate a purified old knowledge representation. Distillation loss is calculated based on the purified old knowledge representation and the output of the student model. The parameters of the student model are updated through backpropagation, while the parameters of the teacher model remain frozen.
3. The washing machine noise identification method according to claim 2, characterized in that, The relevance metric is implemented through a cross-attention mechanism, including: Project the new knowledge information output by the student model into a query vector; The old knowledge information output by the teacher model is projected into key vectors and value vectors respectively; The attention weight matrix is calculated using the query vector and the key vector, and is used as the sample-level alignment. The value vector is weighted and summed using the attention weight matrix to generate a purified representation of the old knowledge.
4. The washing machine noise identification method according to claim 3, characterized in that, The knowledge distillation described in step D also includes: The attention weight matrix is then aggregated into scalar features through global pooling. The scalar features are input into the mapping network, and sample-level dynamic distillation weights between 0 and 1 are generated by the Sigmoid activation function. The dynamic distillation weight is used as a weighting coefficient for distillation loss and is included in the total loss calculation.
5. The washing machine noise identification method according to claim 4, characterized in that, Step E is followed by: F. Collect new types of unusual noises from washing machine operation and preprocess them to generate new audio representations, thus constructing a new sample set; G. Extract data from the audio representation and the new audio representation to construct a hybrid audio representation; H. Using the hybrid audio representation and the trained teacher model, incrementally train the trained student model through knowledge distillation; 1. Deploy the incrementally trained student model to the edge device.
6. The washing machine noise identification method according to any one of claims 2 to 5, characterized in that, The knowledge distillation described in step H includes: Batch data is sampled from the mixed audio representation, the batch data containing both historical samples and new samples; Input batch data into both the teacher model with fixed parameters and the student model to be updated simultaneously; Calculate the sample-level alignment using the same process as in step D, generate the purified old knowledge representation, and generate sample-level dynamic distillation weights. Cross-entropy loss is calculated based on the predicted output of the student model and the true labels of the samples, and distillation loss is calculated based on the purified old knowledge representation and the output of the student model. The total incremental training loss is obtained by summing the weighted distillation loss with the cross-entropy loss using the aforementioned dynamic distillation weights. Backpropagation is performed on the total incremental training loss, updating only the parameters of the student model.
7. The washing machine noise identification method according to claim 1, characterized in that: The teacher model is a high-parameter model based on a Transformer encoder, including an input embedding layer, stacked Transformer encoder layers, and an output layer. The input embedding layer is used to map audio features into a high-dimensional feature sequence and add positional encoding. The Transformer encoder layer is composed of a multi-head attention mechanism and a feedforward neural network, and is stacked through residual connections and layer normalization. The prior knowledge information includes at least one of the following: intermediate layer features, final layer features, or output probability distribution after high-temperature softening.
8. The washing machine noise identification method according to claim 1, characterized in that, The student model is a lightweight network structure, including: a lightweight feature extraction layer for extracting local acoustic features through lightweight convolution or feature mapping; a lightweight attention layer for adaptively weighting the features; and a feature fusion and compression layer for aggregating and compressing the features into a compact vector for the classifier to make decisions.
9. A washing machine noise recognition system, characterized in that: It includes a historical data construction unit, a teacher-student model construction unit, a teacher model training unit, a student model initial training unit, a student model deployment unit, a new sample collection unit, a mixed dataset construction unit, a student model incremental training unit, and a student model redeployment unit, which are respectively used to perform steps A to I in the washing machine noise recognition method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: It stores a computer program that, when executed by a processor, implements the washing machine noise identification method according to any one of claims 1 to 8.