A neural network-based yarn breakage recognition method and system for the textile industry
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING COMM CONSTR CO LTD
- Filing Date
- 2025-09-23
- Publication Date
- 2026-08-07
AI Technical Summary
然而,纱线表面毛羽、静电吸附或飞花堆积可能导致传感器误动作,造成过高误报率
Smart Images

Figure CN121234141B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial manufacturing and information technology integration, and in particular to a method and system for identifying yarn breakage in the textile industry based on neural networks. Background Technology
[0002] In the current cross-disciplinary field of industrial manufacturing and information technology integration, yarn breakage detection and control in the textile industry is a crucial link throughout the entire production process, directly impacting quality, efficiency, and cost. Traditional yarn breakage detection in the textile industry is currently achieved primarily through a combination of manual and mechanical methods. Traditional yarn breakage detection mainly relies on workers periodically visually inspecting or manually touching the yarn, which is inefficient and difficult to cover high-speed production lines. Workers are prone to missing detections due to fatigue or distraction, especially during night shifts or in complex yarn scenarios. Furthermore, manual inspection cannot respond to yarn breaks in real time; there is usually a delay of several minutes from the occurrence of a breakage to its resolution, resulting in material waste and production capacity loss. Traditional yarn breakage detection often uses mechanical contact sensors, relying on physical contact with the yarn to trigger a signal. However, yarn surface fuzz, electrostatic adsorption, or fly waste accumulation can cause sensor malfunctions, resulting in an excessively high false alarm rate. In scenarios involving fine denier yarns such as synthetic filaments, mechanical sensors lack sufficient sensitivity to detect minute breaks, leading to potential quality issues flowing into downstream processes. Summary of the Invention
[0003] This invention aims to at least solve the technical problems existing in the prior art, and in particular, it innovatively proposes a method and system for identifying yarn breakage in the textile industry based on neural networks.
[0004] To achieve the above-mentioned objectives of this invention, this invention provides a method for identifying yarn breakage in the textile industry based on a neural network, the method comprising: S1. Collect multimodal data, including yarn surface image data, acoustic signals when yarn breaks, and yarn tension change data; S2. Preprocess the multimodal data and extract the ROI region of the yarn surface image data, the spectral characteristics of the acoustic signal, and the tension change sequence of the yarn tension change data; S3. Perform spatiotemporal alignment and feature extraction on the ROI region, spectral features and tension mutation sequence to obtain a joint feature vector; S4. Input the joint feature vector into the trained yarn breakage recognition model. The yarn breakage recognition model is trained to recognize the characteristics of yarn breakage. S5. Based on the output of the yarn breakage identification model, determine whether there is yarn breakage and output the yarn breakage identification result; S6. The yarn breakage recognition model is continuously updated through online incremental learning.
[0005] On the other hand, the present invention also provides a neural network-based yarn breakage identification system for the textile industry, the system being used to execute the neural network-based yarn breakage identification method for the textile industry; the system includes: The acquisition module is used to acquire multimodal data; A preprocessing module, connected to the acquisition module, is used to preprocess the multimodal data; The feature extraction module, connected to the preprocessing module, is used to extract joint feature vectors from multimodal data; A yarn breakage identification module, connected to the feature extraction module, is used to perform yarn breakage identification based on the joint feature vector and output the probability value of yarn breakage and the identification result. An alarm and control module, connected to the yarn breakage identification module, is used to trigger a real-time alarm mechanism based on the identification result and output a stop control signal when a yarn breakage occurs. An incremental learning module, connected to the yarn breakage recognition module, is used to continuously receive new time-aligned incremental learning data streams, optimize the model parameters of the yarn breakage recognition model online, and dynamically adjust the learning rate.
[0006] The beneficial effects of this invention are: 1) This invention combines yarn surface images, acoustic signals, and tension change data, and utilizes adaptive preprocessing and feature extraction techniques to effectively suppress environmental noise interference and focus on key yarn breakage features, thus solving the problem of false alarms caused by fuzz and static electricity interference in traditional mechanical sensors; 2) This invention achieves efficient fusion of multimodal features through spatiotemporal alignment and self-attention mechanism. Combined with bidirectional LSTM temporal modeling, it can accurately capture the dynamic evolution of yarn breakage events and avoid the omissions and delays of manual visual inspection. 3) The online incremental learning mechanism of this invention enables the model to dynamically adapt to fluctuations in working conditions such as changes in yarn material and equipment aging, continuously optimize detection performance, and ensure long-term operational stability; 4) Compared with traditional methods, the present invention has significantly improved detection sensitivity, real-time response speed and adaptive capability, which can effectively reduce raw material waste and production capacity loss, and reduce the cost of manual intervention.
[0007] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0008] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1This is a flowchart of a neural network-based yarn breakage identification method for the textile industry according to the present invention. Detailed Implementation
[0009] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0010] Example 1 like Figure 1 As shown, a method for identifying yarn breakage in the textile industry based on neural networks is described. The method includes: S1. Collect multimodal data, including yarn surface image data, acoustic signals when yarn breaks, and yarn tension change data; In step S1, it is necessary to describe in detail the real-time acquisition of multimodal data during yarn operation. Specifically, a high-resolution industrial camera is used to capture yarn surface image data at a rate of 30 frames per second, ensuring that the image clarity meets the requirements for feature extraction; a piezoelectric microphone is used to collect the acoustic signal when the yarn breaks, with a sampling frequency set to 44.1kHz to capture high-frequency breakage characteristics; a strain gauge tension sensor is used to monitor yarn tension changes, with a sampling frequency of 100Hz, recording tension fluctuations in real time. All data sources are synchronized through a high-speed data acquisition card to ensure time alignment and to initially filter out environmental noise (such as workshop mechanical vibration or airflow interference), generating a raw data stream for subsequent preprocessing. In addition, the acquisition process must be carried out under standard lighting and temperature and humidity conditions to avoid the influence of external factors on data quality, thereby improving the accuracy of subsequent feature fusion.
[0011] S2. Preprocess the multimodal data and extract the ROI region of the yarn surface image data, the spectral characteristics of the acoustic signal, and the tension change sequence of the yarn tension change data; S3. Spatiotemporal alignment and feature extraction are performed on the ROI region, spectral features, and tension mutation sequences to obtain a joint feature vector; S4. Input the joint feature vector into the trained yarn breakage recognition model. After training, the yarn breakage recognition model can identify the characteristics of yarn breakage. The steps for training the yarn breakage recognition model in step S4 are as follows: Prepare the training dataset: Collect historical multimodal data samples, including normal yarn running status data and data before and after the yarn breakage event, and label the samples to generate a labeled training dataset; the training dataset, validation dataset and test dataset are divided according to a preset ratio (e.g., 7:2:1); Initialize model parameters: Randomly initialize the weight matrix and bias vector of the yarn breakage recognition model; Configure training parameters: Set the number of training epochs, batch size, initial learning rate, and dropout rate for the Dropout layer. Perform batch training: In each training cycle, input the joint feature vector of the training dataset into the model in batches; Forward propagation: For each batch of input data, the calculations are performed sequentially in the input layer, the first fully connected layer, the Dropout layer, the second fully connected layer, and the output layer to obtain the predicted probability value for that batch. Calculate the loss: Use the binary cross-entropy loss function to calculate the loss value between the model's predicted probability value and the true label; Backpropagation: Based on the loss value, the backpropagation algorithm is used to calculate the gradient of the loss function with respect to the parameters (weights and biases) of each layer of the model; Parameter update: The model parameters of the yarn breakage identification model are updated based on the calculated gradient using an optimization algorithm (such as the Adam optimizer). Validation and Evaluation: After each training cycle or when a specified number of iterations is reached, the model performance is evaluated using a validation dataset, and metrics such as accuracy, recall, and F1 score are calculated. Adjusting the learning rate: Based on changes in performance metrics on the validation dataset, dynamically adjust the learning rate using learning rate scheduling strategies (such as learning rate decay or early stopping); Complete training: Stop training when the preset number of training epochs is reached or when the verification loss no longer decreases significantly. Model testing and saving: Use an independent test dataset to evaluate the final generalization performance of the trained yarn breakage recognition model. If the performance meets the preset requirements (such as accuracy > 95%), save the model parameters.
[0012] S5. Based on the output of the yarn breakage identification model, determine whether there is yarn breakage and output the yarn breakage identification result; In step S5, it is necessary to explain in detail that after the yarn breakage identification model outputs the probability value of yarn breakage, the system will make a real-time judgment based on a preset classification threshold: if the probability value is greater than or equal to the threshold, it is determined that a yarn breakage event has occurred, and a "yarn breakage" identification result is output; conversely, if the probability value is less than the threshold, it is determined that the yarn is running normally, and a "normal" identification result is output. The identification result is output in the form of a binary status code (for example, 1 represents yarn breakage, 0 represents normal) and is transmitted to the alarm and control module in real time. At the same time, the system will combine time series data to perform a moving average filter on the probability value to suppress instantaneous noise interference and ensure the stability of the judgment. When the "yarn breakage" result is output, the alarm and control module immediately triggers the audible and visual alarm and generates a shutdown control signal to send to the textile equipment execution unit to realize automatic shutdown and prevent further yarn breakage or equipment damage. In addition, for edge cases where the probability value is close to the threshold, the system adopts a hysteresis comparison strategy to avoid erroneous operation caused by frequent state switching.
[0013] S6. The yarn breakage recognition model is continuously updated through online incremental learning.
[0014] This invention first acquires yarn surface image data using an industrial camera, simultaneously uses a piezoelectric microphone to collect acoustic signals when the yarn breaks, and monitors yarn tension changes in real time using a strain gauge tension sensor. All multimodal data are processed synchronously through a high-speed data acquisition card to ensure time alignment and filter out environmental noise interference. Subsequently, the acquired data undergoes preprocessing, including extracting the Region of Interest (ROI) from the yarn surface image data, analyzing the spectral characteristics of the acoustic signals, and detecting tension abrupt change sequences in the tension change data. These features are fused through spatiotemporal alignment and a self-attention mechanism to form a joint feature vector. This joint feature vector is input into a pre-trained yarn breakage detection model, which uses a bidirectional LSTM network and fully connected layers for temporal modeling and classification calculations, outputting a probability value of yarn breakage. The system determines whether a yarn breakage has occurred in real time based on a preset classification threshold. When the probability value exceeds the threshold, it outputs a "yarn breakage" recognition result and triggers alarm and control mechanisms, including audible and visual alarms and shutdown control signals. Simultaneously, the model parameters are continuously optimized through online incremental learning, dynamically updated using new time-aligned incremental learning data streams to cope with fluctuations in operating conditions such as changes in yarn material and equipment aging, ensuring detection sensitivity and system stability. The entire process achieves high-precision, low-latency yarn breakage identification, effectively reducing false alarms and missed detections, and improving textile production efficiency.
[0015] As an optional embodiment of the present invention, the preprocessing of multimodal data in step S2, and the extraction of the ROI region of the yarn surface image data, the spectral characteristics of the acoustic signal, and the tension abrupt change sequence of the yarn tension change data, may include: S201. Perform adaptive filtering denoising and histogram equalization contrast enhancement processing on the yarn surface image data to preserve yarn texture details and improve the contrast between the yarn and the background, thereby obtaining a clear yarn surface image. In step S201, it should be explained in detail that this embodiment uses an existing adaptive median filtering algorithm to process the original yarn surface image. This algorithm dynamically adjusts the filtering window size and threshold according to the gray value in the current pixel neighborhood, effectively filtering out salt-and-pepper noise and Gaussian noise caused by uneven lighting in the workshop environment, equipment vibration, and camera noise, while preserving the sharpness of the yarn edges and key texture details such as surface fuzz and knots to the greatest extent.
[0016] The denoised image is then subjected to Limit Contrast Adaptive Histogram Equalization (CLAHE). This process divides the image into several local regions, independently calculates and equalizes the grayscale histogram within each region, and uses a preset contrast limiting threshold (ClipLimit) to prevent over-enhancement of local regions and the generation of artifacts. This process significantly enhances the grayscale difference between the main yarn area and the background area, improving the contrast of fine structures on the yarn surface (such as slight wear and discolored impurities), resulting in a high-contrast, detailed, and clear image of the yarn surface.
[0017] Based on the enhanced, clear image, background subtraction or a simple segmentation technique based on grayscale thresholding is used to quickly identify and initially locate the yarn running trajectory region as a candidate ROI (Region of Interest). This step aims to narrow down the processing scope and improve the efficiency of subsequent feature extraction.
[0018] S202. The Canny edge detection operator is used in combination with morphological operations to locate the main yarn region, and the Otsu thresholding method is used to perform binarization segmentation on the yarn surface image to extract candidate regions containing potential yarn breakage features as ROI regions. In step S202, it is necessary to explain in detail that this embodiment uses the Canny edge detection operator to process the clear yarn surface image obtained in step S201. Specifically, firstly, a Gaussian filter (standard deviation σ=1.5) is applied to smooth the image to suppress residual noise and avoid the generation of false edges; then, the gradient magnitude and direction of the image are calculated (using the Sobel operator), and the edge response is refined through non-maximum suppression technology to retain local gradient maximum points; finally, two thresholds are set (high threshold Thigh=0.7*maximum gradient magnitude, low threshold Tlow=0.3*maximum gradient magnitude), connecting weak edges to strong edges to form a continuous and accurate yarn contour edge map.
[0019] Subsequently, morphological operations were performed on the edge map to optimize the yarn body region: first, a 3×3 rectangular structuring element was used for dilation (2 iterations) to fill the edge gaps and connect broken segments; then, the same structuring element was used for erosion (1 iteration) to eliminate isolated noise and small artifacts, resulting in a smooth and closed yarn body mask.
[0020] Based on this mask, the optimal binarization threshold for the image is automatically calculated using the existing Otsu thresholding method. The Otsu algorithm dynamically determines the segmentation threshold by maximizing the inter-class variance between the foreground (yarn) and background, ensuring high-precision separation of the yarn body even under complex lighting conditions. After binarization, the foreground region with the largest area is extracted as a candidate Region of Interest (ROI) using connected component labeling technology. This region contains the yarn's trajectory and potential yarn breakage features (such as cracks, fuzz accumulation, or abnormal knots). Finally, the candidate ROI regions are cropped and output to subsequent processing modules, improving the efficiency and targeting of feature extraction.
[0021] S203. Use a bandpass filter to remove environmental noise from the acoustic signal and use a Hamming window to perform frame division processing to obtain several acoustic signal frames. S204. Perform a fast Fourier transform on each acoustic signal frame, calculate the amplitude-frequency characteristics, and extract the spectral features. In steps S203 and S204, it is necessary to explain in detail that a bandpass filter (with a passband frequency range of 1kHz to 5kHz to focus on the high-frequency characteristics unique to yarn breakage) is used to remove environmental noise (such as low-frequency vibration of workshop machinery or airflow interference) from the acoustic signal; and a Hamming window (window length 20ms) is used for frame processing (frame shift 10ms) to obtain several acoustic signal frames; then, a fast Fourier transform (FFT, with 512 points) is performed on each frame to calculate the power spectral density, and the Mel frequency cepstral coefficients (MFCC) are extracted as spectral features. Specifically, this includes applying 26 triangular Mel filter banks to cover the 0-22.05kHz frequency band, calculating the logarithmic energy, and then reducing the dimension through discrete cosine transform (DCT) to output a 13-dimensional MFCC vector to efficiently characterize the acoustic fingerprint of the yarn breakage event.
[0022] S205. Perform moving average filtering and Z-score normalization on the tension change data, then use dynamic thresholding to detect abrupt change points that exceed h times the local mean standard deviation, and form a tension abrupt change sequence through morphological closing operation.
[0023] In step S205, it is necessary to explain in detail that, firstly, a moving average filter (window size of 10 samples) is applied to smooth the original tension change data, eliminating high-frequency noise caused by equipment vibration or instantaneous interference, while preserving the trend characteristics of tension abrupt changes. Next, Z-score normalization is performed: the global mean μ and standard deviation σ of the entire tension data sequence are calculated, and then a standardization transformation is performed on each data point to make the data distribution zero mean and unit variance, facilitating uniform scale comparison for subsequent threshold detection. Subsequently, a dynamic thresholding method is used to detect abrupt change points: a sliding window (window size of 50 samples) is used to traverse the normalized data, calculating the local mean and standard deviation within each window; when a data point value exceeds (h is preset to 3.0), the point is marked as a potential tension abrupt change candidate point. Finally, morphological closing operations are applied to the marked candidate point sequence: a one-dimensional linear structuring element (length of 5 samples) is used to sequentially perform dilation and erosion operations to fill the gaps between candidate points and eliminate isolated noise points, thereby connecting adjacent abrupt change points to form a continuous and stable tension abrupt change sequence. This sequence serves as a key feature input to the subsequent feature fusion module.
[0024] As an optional embodiment of the present invention, optionally, the expression for calculating the amplitude-frequency characteristics and extracting the spectral features in step S204 is: , , ; in, The first frame of the sound wave signal Each frequency domain complex component This indicates the number of complex components in the frequency domain. The first frame of the sound wave signal Each time-domain sampling point Represents the natural base. express, Represents the complex components in the frequency domain The range, This represents the spectral eigenvector.
[0025] As an optional embodiment of the present invention, optionally, in step S3, spatiotemporal alignment and feature extraction are performed on the ROI region, spectral features, and tension mutation sequence to obtain a joint feature vector, including: S301. Perform spatiotemporal alignment processing on ROI regions, spectral features, and tension abrupt sequence; In step S301, it is necessary to explain in detail that spatiotemporal alignment processing is performed on the ROI region from the yarn surface image, the spectral features of the acoustic signal, and the tension change sequence of the tension variation data to ensure that the multimodal data are accurately synchronized on a unified time axis and to eliminate spatiotemporal inconsistencies caused by differences in acquisition devices. Specifically, firstly, the high-precision timestamps (time resolution ≤ 1ms) embedded in the high-speed data acquisition card are used to unify the time base of all input data streams: linear interpolation operations are performed on the image ROI region (sampling rate 30fps), spectral features (sampling rate 100Hz), and tension change sequence (sampling rate 500Hz) respectively, and they are resampled to a common time grid (sampling rate unified to 100Hz) to maintain temporal continuity and minimize phase distortion. For spatial alignment, since the tension data and acoustic spectral features do not involve spatial dimensions, only the image ROI region is subjected to spatial normalization processing: based on the camera calibration parameters, the ROI region is mapped to a standardized coordinate system (origin is the yarn running center line) through affine transformation to eliminate spatial distortion caused by camera angle offset or yarn jitter. Simultaneously, the existing Dynamic Time Warping (DTW) algorithm is used to perform fine-grained time alignment between the tension abrupt change sequence and spectral features to compensate for potential system latency. If the alignment error exceeds a threshold (e.g., time offset > 10ms), a data discarding or re-acquisition mechanism is triggered to ensure the reliability of subsequent feature fusion. Finally, a time-synchronized and spatially consistent multimodal feature sequence is output as the input basis for the joint feature vector.
[0026] S302. Perform texture feature extraction on the time-aligned ROI region to obtain the frequency domain features and edge distribution features of the yarn surface texture; The expression for extracting frequency domain features is: ; in, The scale is represented as , direction is The frequency domain characteristics of Gabor filters, The scale is represented as , direction is The global mean of the Gabor filter response. The scale is represented as , direction is The global standard deviation of the Gabor filter response; The expression for extracting edge distribution features is: ; in, Represents pixels Local binary pattern encoded value, Represents a symbolic function. Represents pixels No. The grayscale value of each neighboring pixel. Represents pixels The grayscale value of the center pixel; This embodiment employs a Gabor filter bank to process the time-aligned ROI region image. Specifically, multiple scales and orientations are selected (e.g., scales s=4, orientations o=8), and Gabor filtering is applied to the image, calculating the response image for each filter. Then, for each scale and orientation, the global mean and global standard deviation of the response image are calculated, thereby calculating the normalized feature. This feature can effectively characterize the periodic structure and directional changes of the yarn surface texture, enhancing the sensitivity to yarn breakage-related anomalies (such as wear or impurities).
[0027] For edge distribution features, the Local Binary Pattern (LBP) algorithm is used. For each pixel in the image, the difference between the gray values of its 8 neighboring pixels in a 3×3 neighborhood and the gray value of the center pixel is calculated, and binarization is performed using a sign function. =1 when ≥0, otherwise =0), and then the LBP encoded value is obtained by bit-weighted summation. Finally, the histogram of LBP encoding in the entire ROI region is calculated to form the edge distribution feature vector. This feature can efficiently capture local patterns (such as hair accumulation or micro cracks) on the edge of the yarn surface, and improve the ability to distinguish candidate areas of yarn breakage.
[0028] S303. Perform time-frequency joint feature extraction on the time-aligned spectral features to obtain the energy distribution features and spectral evolution features of the acoustic signal; The expression for obtaining the energy distribution characteristics is: ; in, Indicates the first The frame acoustic signal in the first Energy of each frequency band and They represent the first The start and end frequency indices of each frequency band. Indicates the first Frame number Frequency domain components of a sound wave signal at a specific frequency point; The expression for obtaining the spectral evolution characteristics is: ; in, Indicates the first Spectral evolution characteristics of frame acoustic signals Indicates the total number of frequency points. Indicates the first The actual frequency value corresponding to each frequency point Indicates the first Frequency domain components of the frame acoustic wave signal; In step S303, it is necessary to explain in detail that the energy distribution feature accurately characterizes the cumulative distribution of sound wave energy in different frequency sub-regions by dividing the entire spectrum range into multiple predefined frequency bands (for example, using a 26-band division method based on Mel scale) and calculating the sum of the power spectral density within each frequency band. Specifically, for each frame of sound wave signal, its power spectral density is first calculated, and then, according to the frequency band division, the power spectral density values of the corresponding frequency points within each frequency band are accumulated to obtain the energy distribution feature vector. This feature can effectively reveal the frequency domain distribution law of sound wave energy when yarn breaks, enhancing the ability to identify yarn breakage events. The spectrum evolution feature captures the dynamic changes of the spectrum by calculating the difference in the spectrum between adjacent frames. Specifically, for the frequency domain component of each frame, the difference between its frequency domain component and the corresponding frequency point of the previous frame is calculated, thereby obtaining the spectrum evolution feature vector. This feature can sensitively reflect the subtle changes in the spectrum of the sound wave signal over time, helping to identify the abrupt changes in spectrum characteristics caused by yarn breakage events. By combining the energy distribution feature and the spectrum evolution feature, the spatiotemporal evolution information of the sound wave signal can be comprehensively captured.
[0029] S304. Perform time-domain feature extraction on the time-aligned tension mutation sequence, calculate the autocorrelation coefficient through a sliding window, and align the tension mutation sequence with the standard template through dynamic time warping to obtain a similarity score. The expression for calculating the autocorrelation coefficient using a sliding window is: ; in, Indicates the first The tension sequence within a window has a hysteresis step size The autocorrelation coefficient under the following conditions Indicates the length of the sliding window. Indicates the first A sequence of tension mutations within a sliding window, Indicates the window length; The expression for obtaining the similarity score is: ; in, This represents the similarity score between the test sequence and the standard template. and These represent the lengths of the test sequence and the standard template, respectively. This represents the final value of the cumulative distance matrix; In step S304, it is important to explain in detail that the autocorrelation coefficient is used to measure the self-similarity of the tension mutation sequence under different lag steps, reflecting the temporal structure characteristics within the sequence. By setting a series of lag steps, the autocorrelation coefficient is calculated for the tension mutation sequence within each window, constructing an autocorrelation feature vector. This feature vector can effectively characterize the periodic patterns and abnormal fluctuations of yarn tension changes. The lower the similarity score, the closer the test sequence is to the standard template, thereby enhancing the accuracy of identifying yarn breakage events. By integrating the autocorrelation feature and the similarity score, the temporal characteristics of the tension data can be further explored, improving the system's comprehensive discrimination capability.
[0030] S305. The self-attention mechanism is used to perform weighted fusion of frequency domain features, edge distribution features, energy distribution features, spectral evolution features and similarity scores. Then, bidirectional LSTM is used to perform temporal modeling on the weighted fused feature sequence, extract temporal dependencies, and obtain joint feature vectors.
[0031] In step S305, it is necessary to explain in detail that the self-attention mechanism dynamically adjusts the contribution weight of each feature to the final joint feature vector by calculating the correlation scores between different features. Specifically, for frequency domain features, edge distribution features, energy distribution features, spectral evolution features, and similarity scores, they are first concatenated into a high-dimensional feature vector. Then, the importance weight of each feature dimension is calculated using the self-attention mechanism to achieve weighted fusion of features. This process can highlight key features, suppress noise information, and improve the robustness of feature representation. Subsequently, a bidirectional long short-term memory network (BidirectionalLSTM) is used to perform temporal modeling on the weighted fused feature sequence. Bidirectional LSTM can simultaneously capture forward and backward temporal dependencies, effectively mining the contextual information in the feature sequence. Through the processing of bidirectional LSTM, a joint feature vector can be further extracted. This vector not only contains rich feature information but also reflects the temporal correlation between features.
[0032] As an optional embodiment of the present invention, optionally, the expression for obtaining the joint feature vector in step S305 is: , , , , , , , ; in, Represents timestamp The multimodal feature matrix at the location, Represents timestamp Gabor frequency domain characteristics at that location Represents timestamp LBP edge distribution characteristics at the location, Represents timestamp Time-frequency joint features at the location, Represents timestamp DTW similarity score at the location, , and Represents the query matrix, key matrix, and value matrix. , and Both represent learnable weight matrices. Represents the attention weight matrix. This indicates a row-based normalization operation. This represents the attention head dimension. Represents timestamp Self-attention weighted features at the location, and Represents timestamp The forward and backward LSTM hidden states at the point, and Indicates the forward and backward LSTM units. Represents timestamp Two-way hidden state splicing at the location. Represents the joint eigenvector. This indicates the total length of the time series.
[0033] As an optional embodiment of the present invention, optionally, the yarn breakage identification model in step S4 includes an input layer, a first fully connected layer, a Dropout layer, a second fully connected layer and an output layer, wherein the input layer, the first fully connected layer, the Dropout layer, the second fully connected layer and the output layer are connected in sequence; The input layer receives the joint feature vector and converts it into a tensor format that can be processed by the neural network; the first fully connected layer performs a linear transformation on the input data and applies the ReLU activation function to output a feature vector; the Dropout layer randomly discards some neuron outputs at a preset dropout rate during the training phase to prevent overfitting; the second fully connected layer further extracts higher-order features and maps them to a specified dimension through a fully connected operation; the output layer calculates the probability of yarn breakage using the Sigmoid function and outputs the recognition result based on a preset threshold.
[0034] It should be noted that the yarn breakage detection model uses the cross-entropy loss function for model training and updates the network weight parameters through the Adam optimizer. The output dimension of the first fully connected layer is 256, the output dimension of the second fully connected layer is 128, and the dropout rate of the Dropout layer is set to 0.5. If the probability value output by the output layer is greater than a preset threshold (e.g., 0.85), it is determined that a yarn breakage event has occurred; otherwise, it is determined to be a normal state. This threshold can be adjusted according to the false positive and false negative rate requirements in the actual application scenario. After the model is trained, it is deployed on an edge computing device or server to receive and process multimodal data streams from image sensors, sound sensors, and tension sensors in real time, and output the yarn breakage detection result. In summary, the yarn breakage detection model provided by this invention can effectively integrate multi-source heterogeneous features, fully explore the spatiotemporal correlation information of image texture, sound spectrum, and tension change, and significantly improve the detection accuracy and real-time performance of yarn breakage events in textile production.
[0035] As an optional embodiment of the present invention, the expression of the yarn breakage recognition model is optionally: , , , , ; in, This represents the tensor format data output from the input layer. This indicates a tensor reshaping operation. Represents the joint eigenvector. Represents the dimension of the joint feature vector. This represents the output feature vector of the first fully connected layer. This indicates a modified linear unit activation function. This represents the weight matrix of the first fully connected layer. express transpose, This represents the bias vector of the first fully connected layer. This represents the feature vector output by the Dropout layer. Represents a random mask matrix. It represents the Hadamah accumulation. This represents the output feature vector of the second fully connected layer. This represents the weight matrix of the second fully connected layer. express transpose, This represents the bias vector of the second fully connected layer. This represents the probability value of yarn breakage. This represents the activation function. This represents the weight matrix of the output layer. express transpose, This represents the bias term of the output layer. This indicates the final determination result of the yarn breakage detection. This indicates the preset classification threshold.
[0036] As an optional embodiment of the present invention, optionally, the continuous updating of the yarn breakage recognition model through online incremental learning in step S6 includes: S601. During yarn operation, new multimodal data is continuously collected and preprocessed to generate time-aligned incremental learning data streams. In step S601, it is necessary to explain in detail that continuously acquiring new multimodal data includes real-time acquisition of raw data streams from image sensors, sound sensors, and tension sensors. The image sensor captures changes in yarn surface texture, the sound sensor records the acoustic spectrum related to yarn breakage, and the tension sensor monitors the yarn tension mutation sequence. The preprocessing process includes data cleaning, feature standardization, and time alignment. Specifically, data cleaning removes environmental noise and outliers using filtering algorithms; feature standardization uses the Z-score method to scale different modal data to a uniform scale; and time alignment utilizes a timestamp synchronization mechanism to ensure accurate temporal matching of multi-source data. The generated time-aligned incremental learning data stream is organized in a sliding window format, with each window containing a fixed-length multimodal feature vector, facilitating real-time input into the yarn breakage recognition model for weight updates.
[0037] S602. Utilize time-aligned incremental learning data streams to train the yarn breakage recognition model online, calculate the predicted output through forward propagation, and optimize the model parameters of the yarn breakage recognition model based on the cross-entropy loss function. In step S602, it is necessary to explain in detail that during online training, the yarn breakage recognition model processes each sliding window data in the incremental learning data stream using a forward propagation method. Specifically, the time-aligned multimodal feature vector is input into the model, and sequentially passes through tensor transformation in the input layer, linear transformation and ReLU activation in the first fully connected layer, random neuron dropping in the Dropout layer, and feature mapping in the second fully connected layer. Then, the predicted yarn breakage probability for the current window is calculated using the Sigmoid function in the output layer. Based on the difference between the predicted value and the actual label, the gradient is calculated using the cross-entropy loss function, and the learning rate is dynamically adjusted and the network parameters are updated using the Adam optimizer. To adapt to the resource limitations of edge devices, online training uses mini-batch gradient descent (batch size set to 8), and a gradient pruning threshold is set to prevent gradient explosion. The model automatically saves a parameter snapshot after processing every 100 sliding windows, and rolls back to the optimal snapshot when the validation set accuracy continuously decreases.
[0038] S603. After each model parameter optimization, use the validation data within the sliding window to evaluate the model performance, calculate the accuracy and recall, and dynamically adjust the learning rate based on the performance metrics. In step S603, it is important to explain in detail that the validation data is independently partitioned from the incremental learning data stream. Each sliding window contains a time-aligned multimodal feature vector and its actual label (1 for yarn breakage events and 0 for normal states). The model performs forward propagation on the validation window and outputs a Sigmoid probability value. After binarization with a preset threshold (e.g., 0.85), the accuracy and recall are calculated by comparing the value with the actual label. Based on the validation performance metrics, the learning rate of the Adam optimizer is dynamically adjusted: if the F1 score is below 0.92 for 5 consecutive windows, the learning rate is multiplied by a decay factor of 0.8; if the recall exceeds 0.95 but the accuracy is below 0.90, the learning rate is increased by 10% to enhance feature learning. The performance evaluation results also trigger an early stopping mechanism: when the validation loss does not decrease for 10 consecutive iterations, training is paused and a snapshot of the optimal parameters is loaded.
[0039] S604. Continuously monitor the model output of the yarn breakage identification model. When the predicted probability of multiple consecutive samples exceeds the warning threshold, trigger a real-time alarm mechanism.
[0040] In step S604, it needs to be explained in detail that the real-time alarm mechanism is implemented through an audible and visual alarm integrated into the textile equipment and the workshop monitoring system. Specifically, when the model output value exceeds the warning threshold (usually set to 0.7) for N consecutive time windows (e.g., N=5), the system performs the following operations: 1) Trigger the red LED flashing alarm and buzzer sounding on the device; 2) Send an alarm code (including device ID, timestamp, and probability value sequence) to the MES system. 3) Automatically capture and store a snapshot of multimodal data (K seconds prior to alarm, K=10 recommended) in the diagnostic database; 4) Push alarm information to mobile terminals via industrial IoT gateway; The alarm threshold employs a dynamic adjustment strategy: based on the model's historical false alarm and false negative rates, and the real-time needs of textile production, the warning threshold is dynamically adjusted. If the model's false alarm rate increases recently, the warning threshold is appropriately raised to reduce unnecessary interference; conversely, if the false negative rate increases, the warning threshold is lowered to ensure that important yarn breakage events can be detected in a timely manner. The implementation of the dynamic adjustment strategy relies on continuous monitoring and feedback loops of model performance to ensure that the yarn breakage identification system remains efficient and stable in practical applications. Furthermore, the alarm information pushed through the industrial IoT gateway not only includes key data such as device ID, timestamp, and probability value sequence, but also includes links to multimodal data snapshots, facilitating technicians to remotely and quickly locate problems and take appropriate measures. This yarn breakage identification system, integrating real-time monitoring, intelligent early warning, and remote diagnostics, will effectively improve the automation level of textile production and product quality.
[0041] As an optional embodiment of the present invention, optionally, the expression for the predicted output calculated by forward propagation in step S602 is: , , , ; in, Indicates time The output feature vector of the first fully connected layer, This indicates a modified linear unit activation function. This represents the weight matrix of the first fully connected layer. Indicates time The joint eigenvector at the location, This represents the bias vector of the first fully connected layer. This represents the feature vector output by the Dropout layer. It represents the Hadamah accumulation. This indicates that the Dropout layer is in time. The generated random mask matrix, Indicates time The output feature vector of the second fully connected layer, This represents the weight matrix of the second fully connected layer. This represents the bias vector of the second fully connected layer. Indicates time The model predicts the probability of yarn breakage. This represents the Sigmoid activation function. This represents the weight matrix of the output layer. This represents the bias term of the output layer.
[0042] Example 2 A neural network-based yarn breakage identification system for the textile industry, comprising: The acquisition module is used to acquire multimodal data; The preprocessing module, connected to the acquisition module, is used to preprocess multimodal data; The feature extraction module, connected to the preprocessing module, is used to extract joint feature vectors from multimodal data; The yarn breakage identification module, connected to the feature extraction module, is used to perform yarn breakage identification based on the joint feature vector and output the probability value of yarn breakage and the identification result. The alarm and control module is connected to the yarn breakage identification module. It is used to trigger a real-time alarm mechanism based on the identification result and output a stop control signal when a yarn breakage occurs. The incremental learning module, connected to the yarn breakage recognition module, is used to continuously receive new time-aligned incremental learning data streams, optimize the model parameters of the yarn breakage recognition model online, and dynamically adjust the learning rate.
[0043] The neural network-based yarn breakage identification system in this embodiment is used to implement the neural network-based yarn breakage identification method in the above embodiment 1. The principle of the textile industry yarn breakage identification system based on neural networks in this embodiment is as follows: Through the collaborative work of various modules, intelligent identification and response to yarn breakage events during the textile process are achieved. The acquisition module is responsible for capturing raw data streams in real time from image sensors, sound sensors, and tension sensors. These data streams encompass the visual texture, sound spectrum, and tension variation information of the yarn. The preprocessing module cleans, standardizes, and times-aligns this raw data to ensure the quality and consistency of the input data, facilitating efficient processing by the feature extraction module. The feature extraction module further extracts joint feature vectors from the preprocessed data. These feature vectors integrate complementary information from multimodal data, enhancing the model's ability to identify yarn breakage events. Based on these feature vectors, the yarn breakage identification module uses a trained neural network model to predict the probability of yarn breakage and outputs the identification results. Once a yarn breakage event is detected, the alarm and control module immediately triggers a real-time alarm mechanism, promptly notifying operators through audible and visual alarms on the equipment and by sending alarm codes to the MES system. Simultaneously, this module also outputs a shutdown control signal to automatically pause the textile equipment, preventing subsequent quality problems caused by yarn breakage. The incremental learning module plays a continuous role throughout the system's operation. It constantly receives new time-aligned incremental learning data streams, uses this data to optimize the parameters of the yarn breakage recognition model online, and dynamically adjusts the learning rate based on validation performance indicators. This ensures the model can adapt to the ever-changing textile environment and maintain high recognition accuracy and stability. The entire system achieves closed-loop management from data acquisition, preprocessing, feature extraction, yarn breakage recognition to alarm control, effectively improving the level of intelligence in textile production and product quality control capabilities.
[0044] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A method for identifying yarn breakage in the textile industry based on neural networks, characterized in that, The method includes: S1. Collect multimodal data, including yarn surface image data, acoustic signals when yarn breaks, and yarn tension change data; S2. Preprocess the multimodal data and extract the ROI region of the yarn surface image data, the spectral characteristics of the acoustic signal, and the tension change sequence of the yarn tension change data; S3. Perform spatiotemporal alignment and feature extraction on the ROI region, spectral features and tension mutation sequence to obtain a joint feature vector; S4. Input the joint feature vector into the trained yarn breakage recognition model. The yarn breakage recognition model is trained to recognize the characteristics of yarn breakage. S5. Based on the output of the yarn breakage identification model, determine whether there is yarn breakage and output the yarn breakage identification result; S6. The yarn breakage recognition model is continuously updated through online incremental learning; In step S3, the ROI region, spectral features, and tension abrupt change sequences are spatiotemporally aligned and feature extracted to obtain a joint feature vector, including: S301. Perform spatiotemporal alignment processing on the ROI region, spectral features, and tension abrupt sequence; S302. Perform texture feature extraction on the time-aligned ROI region to obtain the frequency domain features and edge distribution features of the yarn surface texture; S303. Perform time-frequency joint feature extraction on the time-aligned spectral features to obtain the energy distribution features and spectral evolution features of the acoustic signal; S304. Perform time-domain feature extraction on the time-aligned tension mutation sequence, calculate the autocorrelation coefficient through a sliding window, and align the tension mutation sequence with the standard template through dynamic time warping to obtain a similarity score. S305. The frequency domain features, edge distribution features, energy distribution features, spectral evolution features and similarity scores are weighted and fused using a self-attention mechanism. Then, a bidirectional LSTM is used to perform temporal modeling on the weighted and fused feature sequence to extract temporal dependencies and obtain a joint feature vector. The expression for obtaining the joint feature vector in step S305 is: , , , , , , , ; in, Represents timestamp The multimodal feature matrix at the location, Represents timestamp Gabor frequency domain characteristics at that location Represents timestamp LBP edge distribution characteristics at the location, Represents timestamp Time-frequency joint features at the location, Represents timestamp DTW similarity score at the location, , and Represents the query matrix, key matrix, and value matrix. , and Both represent learnable weight matrices. Represents the attention weight matrix. This indicates a row-based normalization operation. This represents the attention head dimension. Represents timestamp Self-attention weighted features at the location, and Represents timestamp The forward and backward LSTM hidden states at the point, and Indicates the forward and backward LSTM units. Represents timestamp Two-way hidden state splicing at the location. Represents the joint eigenvector. This indicates the total length of the time series.
2. The method for identifying yarn breakage in the textile industry based on neural networks as described in claim 1, characterized in that, In step S2, the multimodal data is preprocessed, and the ROI region of the yarn surface image data, the spectral characteristics of the acoustic signal, and the tension abrupt change sequence of the yarn tension change data are extracted, including: S201. Perform adaptive filtering denoising and histogram equalization contrast enhancement processing on the yarn surface image data to preserve yarn texture details and improve the contrast between the yarn and the background, thereby obtaining a clear yarn surface image. S202. The main yarn region is located by using the Canny edge detection operator combined with morphological operations, and the yarn surface image is binarized and segmented by the Otsu thresholding method to extract candidate regions containing potential yarn breakage features as the ROI region. S203. Use a bandpass filter to remove environmental noise from the acoustic signal and use a Hamming window to perform frame division processing to obtain several acoustic signal frames. S204. Perform a fast Fourier transform on each of the aforementioned acoustic signal frames to calculate the amplitude-frequency characteristics and extract the spectral features; S205. Perform moving average filtering and Z-score normalization on the tension change data, then use dynamic thresholding to detect abrupt change points that exceed h times the local mean standard deviation, and form a tension abrupt change sequence through morphological closing operation.
3. The method for identifying yarn breakage in the textile industry based on neural networks as described in claim 2, characterized in that, The expression for calculating the amplitude-frequency response and extracting the spectral features in step S204 is as follows: , , ; in, The first frame of the sound wave signal Each frequency domain complex component This indicates the number of complex components in the frequency domain. The first frame of the sound wave signal Each time-domain sampling point Represents the natural base. express, Represents the complex components in the frequency domain The range, This represents the spectral eigenvector.
4. The method for identifying yarn breakage in the textile industry based on neural networks as described in claim 1, characterized in that, The yarn breakage identification model in step S4 includes an input layer, a first fully connected layer, a Dropout layer, a second fully connected layer, and an output layer, which are connected sequentially. The input layer receives the joint feature vector and converts it into a tensor format that can be processed by the neural network; the first fully connected layer performs a linear transformation on the input data and applies the ReLU activation function to output the feature vector. The Dropout layer is used to randomly discard some neuron outputs at a preset dropout rate during the training phase to prevent overfitting; the second fully connected layer is used to further extract higher-order features and map them to a specified dimension through a fully connected operation; the output layer is used to calculate the probability value of yarn breakage through the Sigmoid function and output the recognition result based on a preset threshold.
5. The method for identifying yarn breakage in the textile industry based on neural networks as described in claim 1 or 4, characterized in that, The expression for the yarn breakage identification model is: , , , , ; in, This represents the tensor format data output from the input layer. This indicates a tensor reshaping operation. Represents the joint eigenvector. Represents the dimension of the joint feature vector. This represents the output feature vector of the first fully connected layer. This indicates a modified linear unit activation function. This represents the weight matrix of the first fully connected layer. express transpose, This represents the bias vector of the first fully connected layer. This represents the feature vector output by the Dropout layer. Represents a random mask matrix. It represents the Hadamah accumulation. This represents the output feature vector of the second fully connected layer. This represents the weight matrix of the second fully connected layer. express transpose, This represents the bias vector of the second fully connected layer. This represents the probability value of yarn breakage. This represents the activation function. This represents the weight matrix of the output layer. express transpose, This represents the bias term of the output layer. This indicates the final determination result of the yarn breakage detection. This indicates the preset classification threshold.
6. The method for identifying yarn breakage in the textile industry based on neural networks as described in claim 1, characterized in that, Step S6 involves continuously updating the yarn breakage recognition model through online incremental learning, including: S601. During yarn operation, new multimodal data is continuously collected and preprocessed to generate time-aligned incremental learning data streams. S602. Using the time-aligned incremental learning data stream, the yarn breakage identification model is trained online, the predicted output is calculated through forward propagation, and the model parameters of the yarn breakage identification model are optimized based on the cross-entropy loss function. S603. After each optimization of the model parameters, the model performance is evaluated using the validation data within the sliding window, the accuracy and recall are calculated, and the learning rate is dynamically adjusted according to the performance metrics. S604. Continuously monitor the model output of the yarn breakage identification model. When the predicted probability of multiple consecutive samples exceeds the warning threshold, trigger a real-time alarm mechanism.
7. The method for identifying yarn breakage in the textile industry based on neural networks as described in claim 6, characterized in that, In step S602, the expression for the predicted output calculated through forward propagation is as follows: , , , ; in, Indicates time The output feature vector of the first fully connected layer, This indicates a modified linear unit activation function. This represents the weight matrix of the first fully connected layer. Indicates time The joint eigenvector at the location, This represents the bias vector of the first fully connected layer. This represents the feature vector output by the Dropout layer. It represents the Hadamah accumulation. This indicates that the Dropout layer is in time. The generated random mask matrix, Indicates time The output feature vector of the second fully connected layer, This represents the weight matrix of the second fully connected layer. This represents the bias vector of the second fully connected layer. Indicates time The model predicts the probability of yarn breakage. This represents the Sigmoid activation function. This represents the weight matrix of the output layer. This represents the bias term of the output layer.
8. A textile industry yarn breakage identification system based on neural networks, characterized in that, The system is used to execute the neural network-based yarn breakage identification method for the textile industry as described in any one of claims 1 to 7; the system includes: The acquisition module is used to acquire multimodal data; A preprocessing module, connected to the acquisition module, is used to preprocess the multimodal data; The feature extraction module, connected to the preprocessing module, is used to extract joint feature vectors from multimodal data; A yarn breakage identification module, connected to the feature extraction module, is used to perform yarn breakage identification based on the joint feature vector and output the probability value of yarn breakage and the identification result. An alarm and control module, connected to the yarn breakage identification module, is used to trigger a real-time alarm mechanism based on the identification result and output a stop control signal when a yarn breakage occurs. An incremental learning module, connected to the yarn breakage recognition module, is used to continuously receive new time-aligned incremental learning data streams, optimize the model parameters of the yarn breakage recognition model online, and dynamically adjust the learning rate.
Citation Information
Patent Citations
Ring spinning broken yarn detection method and system based on signal processing
CN118547407A
Audio signal authenticity verification method and device, equipment and medium
CN120673780A