A method and system for detecting thread breakage in an embroidery machine

By building a deep learning model on the embroidery machine and combining it with an infrared sensor group for dual verification, the problems of low accuracy, poor timeliness, and high power consumption in thread breakage detection of the embroidery machine are solved, realizing efficient thread breakage detection and low-power embroidery production.

CN119083065BActive Publication Date: 2026-07-07FUZHOU HUICHUANG INTELLIGENT CONTROL TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FUZHOU HUICHUANG INTELLIGENT CONTROL TECHNOLOGY CO LTD
Filing Date
2024-09-06
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing methods for detecting broken threads on embroidery machines suffer from low detection accuracy, poor timeliness, and high power consumption, making it difficult to effectively improve embroidery efficiency.

Method used

By constructing a deep learning model based on feature extraction, feature fusion, and line break detection modules, and combining infrared sensor arrays and pulse data for dual verification, line breakage is predicted and a detection report is generated. The model is optimized to improve detection accuracy and timeliness, and reduce power consumption.

Benefits of technology

It achieves high-precision and timely thread breakage detection, reduces power consumption, and improves the production efficiency and reliability of embroidery machines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119083065B_ABST
    Figure CN119083065B_ABST
Patent Text Reader

Abstract

The application provides a kind of embroidery machine thread breakage detection method and system in the technical field of embroidery machine, method includes: step S1, a large number of embroidery history data is acquired to construct data set;Step S2, create thread breakage detection model and set hyperparameter group;Step S3, based on data set, thread breakage detection model is trained and deployed on embroidery machine;Step S4, embroidery machine obtains embroidery job file to control corresponding embroidery needle to work;Step S5, embroidery machine based on the current working embroidery needle starts the infrared sensor group of corresponding needle position to carry out thread breakage detection, obtains first detection result;Collect current embroidery pulse data, embroidery pulse data is input into thread breakage detection model, and second detection result is obtained;Step S6, based on first detection result and second detection result, generate thread breakage detection report, and alarm based on thread breakage detection report.The application has the advantages that: the precision and timeliness of embroidery machine thread breakage detection are greatly improved, and the power consumption is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of embroidery machine technology, and in particular to a method and system for detecting broken threads in embroidery machines. Background Technology

[0002] Embroidery machines, also known as computerized embroidery machines, are the most advanced embroidery machinery of our time. They enable traditional hand embroidery to be completed at high speed and efficiency, and can also achieve the requirements of "multi-layer, multi-functional, uniform and perfect" that hand embroidery cannot achieve. They are electromechanical products that embody a variety of high-tech features. As computerized embroidery replaces hand embroidery, computerized embroidery machines will become the main type of machine in the embroidery industry.

[0003] During the embroidery process, embroidery thread is required. Due to the differences in embroidery techniques, there are also many types of embroidery thread. When using embroidery thread, some types of embroidery thread may inevitably break. If the broken thread is not detected and replaced in time, it will lead to the defective embroidery product. Therefore, there is a need to detect whether the embroidery thread is broken.

[0004] Traditionally, broken embroidery thread is detected using an infrared sensor array. This involves placing an infrared transmitter and receiver on either side of the thread. Under normal conditions, the infrared signal emitted by the transmitter is blocked by the thread and cannot reach the receiver. When a break occurs, the receiver picks up the infrared signal. However, this traditional method has the following drawbacks:

[0005] 1. Due to the inevitable mechanical vibrations during operation, embroidery machines can cause displacement of the embroidery thread or infrared sensor group, thus affecting the accuracy of thread breakage detection; 2. An embroidery machine contains multiple embroidery needles, and each needle's thread requires a paired set of infrared sensor groups, with each sensor group being constantly on, resulting in high power consumption; 3. Detection can only be performed after a thread breakage occurs, which already affects the production cycle. In addition, negligence by staff may prevent timely replacement of broken threads, severely impacting embroidery efficiency.

[0006] Therefore, how to provide a method and system for detecting thread breakage in embroidery machines, thereby improving the accuracy and timeliness of thread breakage detection and reducing power consumption, has become an urgent technical problem to be solved. Summary of the Invention

[0007] The technical problem to be solved by the present invention is to provide a method and system for detecting thread breakage in embroidery machines, thereby improving the accuracy and timeliness of thread breakage detection and reducing power consumption.

[0008] In a first aspect, the present invention provides a method for detecting thread breakage in an embroidery machine, comprising the following steps:

[0009] Step S1: Obtain a large amount of historical embroidery data from when the embroidery machine is working, and construct a dataset after preprocessing and labeling each piece of historical embroidery data;

[0010] Step S2: Create a disconnection detection model based on the feature extraction module, feature fusion module, and disconnection detection module, and set the hyperparameter group of the disconnection detection model;

[0011] Step S3: Train the thread breakage detection model based on the dataset, and deploy the trained thread breakage detection model on the embroidery machine;

[0012] Step S4: The embroidery machine acquires the embroidery work file and controls the corresponding embroidery needle to work based on the embroidery work file;

[0013] Step S5: The embroidery machine starts the infrared sensor group corresponding to the embroidery needle position based on the currently working embroidery needle to detect thread breakage and obtain the first detection result; collect the current embroidery pulse data, input the embroidery pulse data into the thread breakage detection model, and obtain the second detection result;

[0014] Step S6: The embroidery machine generates a thread breakage detection report based on the first detection result and the second detection result, and issues an alarm based on the thread breakage detection report;

[0015] Step S7: The embroidery machine records the embroidery log in real time, optimizes the thread breakage detection model based on the embroidery log, and stores the embroidery log.

[0016] Step S1 specifically involves:

[0017] Acquire a large amount of historical embroidery data during the operation of the embroidery machine, wherein the historical embroidery data is pulse data obtained by blocking the infrared signal of the infrared sensor group with the grating wheel;

[0018] Each of the embroidery history data is preprocessed, including outlier removal and noise suppression. The preprocessed embroidery history data is then labeled with at least the broken thread position and the position about to break the thread. The broken thread position and the position about to break the thread are labeled based on the selection of the target box. A dataset is then constructed based on the labeled embroidery history data.

[0019] Furthermore, in step S2, the feature extraction module adopts a separable convolutional structure, including several feature blocks of different scales; each feature block includes a convolution operation unit, a skip connection unit, a pooling unit, and an SE unit.

[0020] The feature fusion module is constructed based on a weighted bidirectional feature pyramid network and is used to fuse multi-scale broken line features output by the feature extraction module from the bottom up and from the top down.

[0021] The broken line detection module is built based on multi-layer convolutional neural network units, pooling units, and fully connected network units, and is used to predict the size and position of the broken line detection box.

[0022] The hyperparameter set includes at least the loss function, learning rate, batch size, optimizer, learning decay rate, and dropout rate;

[0023] The loss function used is the cross-entropy loss function.

[0024] Furthermore, step S3 specifically includes:

[0025] The dataset is divided into a training set, a test set, and a validation set in a 6:2:2 ratio. Based on the learning rate, batch size, learning decay rate, and dropout rate carried by the hyperparameter set, the disconnection detection model is trained using the training set to learn the pulse pattern until the loss value of the loss function carried by the hyperparameter set is less than the preset loss threshold. During the training process, each hyperparameter in the hyperparameter set is continuously optimized.

[0026] The trained disconnection detection model is tested using the test set to determine if its detection accuracy exceeds a preset accuracy threshold. If not, the test fails, and the training set is expanded to continue training the disconnection detection model. If yes, the test passes, and:

[0027] The tested thread breakage detection model is validated using the validation set. It is determined whether the confidence level of the thread breakage detection model is greater than a preset confidence threshold. If not, the validation fails, and the training set is expanded to continue training the thread breakage detection model. If yes, the validation passes, the training of the thread breakage detection model ends, and the validated thread breakage detection model is deployed on the embroidery machine.

[0028] Furthermore, step S4 specifically includes:

[0029] The embroidery machine acquires the embroidery work file, parses the embroidery work file to obtain the embroidery path carrying the embroidery needle position, and controls the corresponding embroidery needle to work based on the embroidery path;

[0030] Step S5 specifically involves:

[0031] The embroidery machine activates the infrared sensor group corresponding to the currently working embroidery needle, and performs thread breakage detection based on whether the infrared receiver of the infrared sensor group receives the infrared signal from the infrared transmitter, and obtains the first detection result;

[0032] The current embroidery pulse data of the infrared sensor group of the embroidery machine is collected. The embroidery pulse data is preprocessed, including outlier removal and noise suppression. The preprocessed embroidery pulse data is then input into the thread breakage detection model to obtain the second detection result.

[0033] Furthermore, step S6 specifically includes:

[0034] The embroidery machine analyzes the first and second detection results. When both the first and second detection results indicate a broken thread, a broken thread detection report is generated. When either the first or second detection result indicates a broken thread, a broken thread detection report is generated. When the first detection result indicates no broken thread and the second detection result indicates an impending broken thread, a broken thread detection report is generated indicating that the embroidery thread needs to be replaced.

[0035] The disconnection detection report is displayed on the large screen, and the operation of the indicator lights and buzzer is controlled based on the disconnection detection report. The disconnection detection report is also pushed to the pre-managed management terminal in real time to issue an alarm.

[0036] Step S7 specifically involves:

[0037] The embroidery machine records an embroidery log in real time, which includes at least the embroidery time, embroidery product model, embroidery product number, embroidery machine number, and thread breakage detection report. The thread breakage detection model is optimized based on the embroidery log, and the embroidery log is encrypted, stored, and backed up in a distributed manner.

[0038] Secondly, the present invention provides a thread breakage detection system for embroidery machines, comprising the following modules:

[0039] The dataset construction module is used to acquire a large amount of historical embroidery data during the operation of the embroidery machine, and to construct the dataset after preprocessing and labeling the historical embroidery data.

[0040] A broken wire detection model creation module is used to create a broken wire detection model based on a feature extraction module, a feature fusion module, and a broken wire detection module, and to set the hyperparameter set of the broken wire detection model.

[0041] The broken thread detection model training module is used to train the broken thread detection model based on the dataset and deploy the trained broken thread detection model on the embroidery machine.

[0042] The embroidery module is used by the embroidery machine to acquire embroidery work files and control the corresponding embroidery needles to work based on the embroidery work files;

[0043] The thread breakage detection module is used by the embroidery machine to activate the infrared sensor group corresponding to the embroidery needle position based on the currently working embroidery needle to detect thread breakage and obtain a first detection result; collect the current embroidery pulse data, input the embroidery pulse data into the thread breakage detection model, and obtain a second detection result;

[0044] The thread breakage detection report generation module is used by the embroidery machine to generate a thread breakage detection report based on the first detection result and the second detection result, and to issue an alarm based on the thread breakage detection report.

[0045] The embroidery log management module is used to record embroidery logs in real time by the embroidery machine, optimize the thread breakage detection model based on the embroidery logs, and store the embroidery logs.

[0046] The dataset construction module is specifically used for:

[0047] Acquire a large amount of historical embroidery data during the operation of the embroidery machine, wherein the historical embroidery data is pulse data obtained by blocking the infrared signal of the infrared sensor group with the grating wheel;

[0048] Each of the embroidery history data is preprocessed, including outlier removal and noise suppression. The preprocessed embroidery history data is then labeled with at least the broken thread position and the position about to break the thread. The broken thread position and the position about to break the thread are labeled based on the selection of the target box. A dataset is then constructed based on the labeled embroidery history data.

[0049] Furthermore, in the line break detection model creation module, the feature extraction module adopts a separable convolutional structure, including several feature blocks of different scales; each feature block includes a convolution operation unit, a skip connection unit, a pooling unit, and an SE unit;

[0050] The feature fusion module is constructed based on a weighted bidirectional feature pyramid network and is used to fuse multi-scale broken line features output by the feature extraction module from the bottom up and from the top down.

[0051] The broken line detection module is built based on multi-layer convolutional neural network units, pooling units, and fully connected network units, and is used to predict the size and position of the broken line detection box.

[0052] The hyperparameter set includes at least the loss function, learning rate, batch size, optimizer, learning decay rate, and dropout rate;

[0053] The loss function used is the cross-entropy loss function.

[0054] Furthermore, the broken wire detection model training module is specifically used for:

[0055] The dataset is divided into a training set, a test set, and a validation set in a 6:2:2 ratio. Based on the learning rate, batch size, learning decay rate, and dropout rate carried by the hyperparameter set, the disconnection detection model is trained using the training set to learn the pulse pattern until the loss value of the loss function carried by the hyperparameter set is less than the preset loss threshold. During the training process, each hyperparameter in the hyperparameter set is continuously optimized.

[0056] The trained disconnection detection model is tested using the test set to determine if its detection accuracy exceeds a preset accuracy threshold. If not, the test fails, and the training set is expanded to continue training the disconnection detection model. If yes, the test passes, and:

[0057] The tested thread breakage detection model is validated using the validation set. It is determined whether the confidence level of the thread breakage detection model is greater than a preset confidence threshold. If not, the validation fails, and the training set is expanded to continue training the thread breakage detection model. If yes, the validation passes, the training of the thread breakage detection model ends, and the validated thread breakage detection model is deployed on the embroidery machine.

[0058] Furthermore, the embroidery module is specifically used for:

[0059] The embroidery machine acquires the embroidery work file, parses the embroidery work file to obtain the embroidery path carrying the embroidery needle position, and controls the corresponding embroidery needle to work based on the embroidery path;

[0060] The wire breakage detection module is specifically used for:

[0061] The embroidery machine activates the infrared sensor group corresponding to the currently working embroidery needle, and performs thread breakage detection based on whether the infrared receiver of the infrared sensor group receives the infrared signal from the infrared transmitter, and obtains the first detection result;

[0062] The current embroidery pulse data of the infrared sensor group of the embroidery machine is collected. The embroidery pulse data is preprocessed, including outlier removal and noise suppression. The preprocessed embroidery pulse data is then input into the thread breakage detection model to obtain the second detection result.

[0063] Furthermore, the broken wire detection report generation module is specifically used for:

[0064] The embroidery machine analyzes the first and second detection results. When both the first and second detection results indicate a broken thread, a broken thread detection report is generated. When either the first or second detection result indicates a broken thread, a broken thread detection report is generated. When the first detection result indicates no broken thread and the second detection result indicates an impending broken thread, a broken thread detection report is generated indicating that the embroidery thread needs to be replaced.

[0065] The disconnection detection report is displayed on the large screen, and the operation of the indicator lights and buzzer is controlled based on the disconnection detection report. The disconnection detection report is also pushed to the pre-managed management terminal in real time to issue an alarm.

[0066] The embroidery log management module is specifically used for:

[0067] The embroidery machine records an embroidery log in real time, which includes at least the embroidery time, embroidery product model, embroidery product number, embroidery machine number, and thread breakage detection report. The thread breakage detection model is optimized based on the embroidery log, and the embroidery log is encrypted, stored, and backed up in a distributed manner.

[0068] The advantages of this invention are:

[0069] 1. By acquiring a large amount of historical embroidery data from embroidery machine operation, a dataset is constructed after preprocessing and labeling each historical data point. Then, a thread breakage detection model is created based on a feature extraction module, a feature fusion module, and a thread breakage detection module. The hyperparameter set of the thread breakage detection model is set, and the model is trained on the dataset. The trained model is then deployed on the embroidery machine. The embroidery machine acquires the embroidery work file and controls the corresponding embroidery needles to work based on the work file. Based on the currently working embroidery needle, the infrared sensor group at the corresponding needle position is activated to detect thread breakage and obtain the first detection result. The current embroidery pulse data is collected and input into the thread breakage detection model to obtain the second detection result. A thread breakage detection report is generated based on the first and second detection results. An alarm is triggered based on the report, and the embroidery day is recorded in real time. This system optimizes the thread breakage detection model based on embroidery logs and stores these logs. Specifically, by combining infrared detection from the infrared sensor group with pulse pattern detection from the thread breakage detection model, a dual verification judgment can be performed on thread breakage to ensure accuracy. Based on the currently operating embroidery needle, the corresponding infrared sensor group at the needle position is activated for thread breakage detection, while the remaining infrared sensor groups are powered off, avoiding all infrared sensor groups being constantly on and effectively reducing power consumption. By marking the impending thread breakage positions in historical embroidery data and then using this marked historical data to train the thread breakage detection model, the model gains the ability to predict whether the embroidery thread is about to break, allowing for timely replacement of the thread that is about to break. Ultimately, this greatly improves the accuracy and timeliness of thread breakage detection on the embroidery machine and significantly reduces power consumption.

[0070] 2. By performing preprocessing on each embroidery history data, including outlier removal and noise suppression, the data quality is effectively improved, which in turn greatly increases the training speed of the broken thread detection model.

[0071] 3. By labeling each pre-processed embroidery history data with at least the location of the broken thread and the location of the impending broken thread, and then constructing a dataset based on the labeled embroidery history data, the broken thread detection model is trained using the dataset. This enables the broken thread detection model to not only detect the location of the broken thread, but also predict whether the thread is about to break, greatly improving the reliability of the broken thread detection of the embroidery machine.

[0072] 4. The disconnection detection model is trained using the training set until the loss value of the loss function is less than the preset loss threshold. During the training process, each hyperparameter in the hyperparameter group is continuously optimized. The detection accuracy of the trained disconnection detection model is tested using the test set, and the confidence of the disconnection detection model that passes the test is verified using the validation set. In other words, the disconnection detection model is continuously optimized and related tests and verifications are carried out during the training process, which greatly improves the detection accuracy of the disconnection detection model.

[0073] 5. By recording embroidery logs in real time, including at least the embroidery time, embroidery product model, embroidery product number, embroidery machine number, and thread breakage detection report, the thread breakage detection model is optimized based on the embroidery logs, further improving the detection accuracy of the thread breakage detection model. By encrypting and storing the embroidery logs and distributing backups, traceability is greatly improved. Attached Figure Description

[0074] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0075] Figure 1 This is a flowchart of a thread breakage detection method for an embroidery machine according to the present invention.

[0076] Figure 2 This is a schematic diagram of the structure of an embroidery machine thread breakage detection system according to the present invention. Detailed Implementation

[0077] The overall concept of the technical solution in this application embodiment is as follows: By combining infrared detection from the infrared sensor group and pulse pattern detection from the thread breakage detection model, the thread breakage of the embroidery thread can be double-checked to ensure the accuracy of thread breakage detection; based on the currently working embroidery needle, the infrared sensor group corresponding to the embroidery needle position is activated to perform thread breakage detection, while the other infrared sensor groups are in a powered-off state, avoiding all infrared sensor groups being in a long-term on state, effectively reducing the power consumption of thread breakage detection; by marking the positions of impending thread breakage in the embroidery history data, and then using the marked embroidery history data to train the thread breakage detection model, the thread breakage detection model can predict whether the embroidery thread is about to break, so as to replace the embroidery thread that is about to break in time, thereby improving the accuracy and timeliness of thread breakage detection of the embroidery machine and reducing power consumption.

[0078] Please refer to Figures 1 to 2 As shown, a preferred embodiment of the embroidery machine thread breakage detection method of the present invention includes the following steps:

[0079] Step S1: Obtain a large amount of historical embroidery data from when the embroidery machine is working, and construct a dataset after preprocessing and labeling each piece of historical embroidery data;

[0080] Step S2: Create a disconnection detection model based on the feature extraction module, feature fusion module, and disconnection detection module, and set the hyperparameter group of the disconnection detection model;

[0081] Step S3: Train the thread breakage detection model based on the dataset, and deploy the trained thread breakage detection model on the embroidery machine;

[0082] Step S4: The embroidery machine acquires the embroidery work file and controls the corresponding embroidery needle to work based on the embroidery work file;

[0083] Step S5: The embroidery machine starts the infrared sensor group corresponding to the embroidery needle position based on the currently working embroidery needle to detect thread breakage and obtain the first detection result; collect the current embroidery pulse data, input the embroidery pulse data into the thread breakage detection model, and obtain the second detection result;

[0084] Step S6: The embroidery machine generates a thread breakage detection report based on the first detection result and the second detection result, and issues an alarm based on the thread breakage detection report;

[0085] Step S7: The embroidery machine records the embroidery log in real time, optimizes the thread breakage detection model based on the embroidery log, and stores the embroidery log.

[0086] Step S1 specifically involves:

[0087] Acquire a large amount of historical embroidery data during the operation of the embroidery machine, wherein the historical embroidery data is pulse data obtained by blocking the infrared signal of the infrared sensor group with the grating wheel;

[0088] Each of the embroidery history data is preprocessed, including outlier removal and noise suppression. The preprocessed embroidery history data is then labeled with at least the broken thread position and the position about to break the thread. The broken thread position and the position about to break the thread are labeled based on the selection of the target box. A dataset is then constructed based on the labeled embroidery history data.

[0089] By performing preprocessing on each embroidery history data, including outlier removal and noise suppression, the data quality is effectively improved, which in turn greatly increases the training speed of the broken thread detection model.

[0090] By labeling each pre-processed embroidery history data with at least the location of the broken thread and the location of the impending broken thread, and then constructing a dataset based on the labeled embroidery history data, the broken thread detection model is trained using the dataset. This enables the broken thread detection model to not only detect the location of the broken thread, but also predict whether the thread is about to break, greatly improving the reliability of broken thread detection in embroidery machines.

[0091] In step S2, the feature extraction module adopts a separable convolutional structure to extract the broken thread features of the embroidery thread, including several feature blocks of different scales; each feature block includes a convolution operation unit, a skip connection unit, a pooling unit, and an SE unit (Squeeze-and-Extraction), and each unit is repeated N times.

[0092] Separable convolutional structures modify traditional convolution operations into two-layer convolution operations, decoupling spatial and depth information to effectively utilize model parameters. For example, a feature extraction module can be formed by stacking nine feature blocks, with the first three blocks used for low-level feature mapping and the last six blocks used for extracting broken line features at different scales.

[0093] The feature fusion module is constructed based on a weighted bidirectional feature pyramid network and is used to fuse the multi-scale broken line features output by the feature extraction module from the bottom up and from the top down to obtain fused features.

[0094] The feature fusion module is built based on a weighted bidirectional feature pyramid network, which can perform feature fusion in two directions (bottom-up and top-down). It integrates features from high and low levels, making the fused features more expressive and greatly improving the network construction efficiency.

[0095] The broken line detection module is constructed based on multi-layer convolutional neural network units, pooling units, and fully connected network units, and is used to predict the size and position of the broken line detection box based on the fused features.

[0096] The hyperparameter set includes at least the loss function, learning rate, batch size, optimizer, learning decay rate, and dropout rate;

[0097] The loss function used is the cross-entropy loss function.

[0098] Step S3 specifically involves:

[0099] The dataset is divided into a training set, a test set, and a validation set in a 6:2:2 ratio. Based on the learning rate, batch size, learning decay rate, and dropout rate carried by the hyperparameter set, the disconnection detection model is trained using the training set to learn the pulse pattern until the loss value of the loss function carried by the hyperparameter set is less than the preset loss threshold. During the training process, each hyperparameter in the hyperparameter set is continuously optimized.

[0100] The trained disconnection detection model is tested using the test set to determine if its detection accuracy exceeds a preset accuracy threshold. If not, the test fails, and the training set is expanded to continue training the disconnection detection model. If yes, the test passes, and:

[0101] The tested thread breakage detection model is validated using the validation set. It is determined whether the confidence level of the thread breakage detection model is greater than a preset confidence threshold. If not, the validation fails, and the training set is expanded to continue training the thread breakage detection model. If yes, the validation passes, the training of the thread breakage detection model ends, and the validated thread breakage detection model is deployed on the embroidery machine.

[0102] The disconnection detection model is trained on the training set until the loss value of the loss function is less than the preset loss threshold. During the training process, each hyperparameter in the hyperparameter group is continuously optimized. The detection accuracy of the trained disconnection detection model is tested on the test set, and the confidence of the disconnection detection model that passes the test is verified on the validation set. In other words, the disconnection detection model is continuously optimized and tested and verified during the training process, which greatly improves the detection accuracy of the disconnection detection model.

[0103] In specific implementation, during the training process of the broken wire detection model, the soft connection nonmaximum suppression algorithm is used to merge and filter the broken wire detection boxes of the broken wire detection model. The Neura Architecture Search algorithm is used to perform network search operations on the feature extraction module, feature fusion module, and broken wire detection module to determine the scaling factor for each dimension. The scaling factor is used to allocate the computing power of each module to select the network structure with the best efficiency and accuracy, thereby expanding the accuracy and precision of broken wire detection.

[0104] Since the predicted broken wire detection boxes contain a large number of overlapping and invalid results, the soft connection nonmaximum suppression algorithm is used to filter redundant broken wire detection boxes based on the recognition probability value and merge some broken wire detection boxes to output the optimal broken wire detection box.

[0105] By performing network search operations using a composite scaling algorithm, the scaling ratio coefficients for each dimension are determined, thus solidifying the network search space and path, effectively reducing the time complexity of network search, and thereby improving the efficiency of disconnection detection.

[0106] Step S4 specifically involves:

[0107] The embroidery machine acquires the embroidery work file, parses the embroidery work file to obtain the embroidery path carrying the embroidery needle position, and controls the corresponding embroidery needle to work based on the embroidery path;

[0108] Step S5 specifically involves:

[0109] The embroidery machine activates the infrared sensor group corresponding to the currently working embroidery needle, and performs thread breakage detection based on whether the infrared receiver of the infrared sensor group receives the infrared signal from the infrared transmitter, and obtains the first detection result;

[0110] The current embroidery pulse data of the infrared sensor group of the embroidery machine is collected. The embroidery pulse data is preprocessed, including outlier removal and noise suppression. The preprocessed embroidery pulse data is then input into the thread breakage detection model to obtain the second detection result.

[0111] Step S6 specifically involves:

[0112] The embroidery machine analyzes the first and second detection results. When both the first and second detection results indicate a broken thread, a broken thread detection report is generated. When either the first or second detection result indicates a broken thread, a broken thread detection report is generated. When the first detection result indicates no broken thread and the second detection result indicates an impending broken thread, a broken thread detection report is generated indicating that the embroidery thread needs to be replaced.

[0113] The disconnection detection report is displayed on the large screen, and the operation of the indicator lights and buzzer is controlled based on the disconnection detection report. The disconnection detection report is also pushed to the pre-managed management terminal in real time to issue an alarm.

[0114] Step S7 specifically involves:

[0115] The embroidery machine records an embroidery log in real time, which includes at least the embroidery time, embroidery product model, embroidery product number, embroidery machine number, and thread breakage detection report. The thread breakage detection model is optimized based on the embroidery log, and the embroidery log is encrypted, stored, and backed up in a distributed manner.

[0116] By recording embroidery logs in real time, including at least the embroidery time, embroidery product model, embroidery product number, embroidery machine number, and thread breakage detection report, the thread breakage detection model is optimized based on the embroidery logs, further improving the detection accuracy of the thread breakage detection model. By encrypting and storing the embroidery logs and distributing backups, traceability is greatly improved.

[0117] The specific steps for encrypting, storing, and distributing the embroidery log are as follows:

[0118] A public and private key pair is created based on the RSA algorithm. The HMAC value is calculated using the HMAC algorithm on the embroidery log. The embroidery log and the HMAC value are then encrypted using the private key to obtain level-one encrypted data. Level-one encrypted data is mapped using a preset first mapping rule to obtain level-two encrypted data. The number 3 and the letter 's' in the level-two encrypted data are swapped to obtain level-three encrypted data. The public key is mapped using a preset second mapping rule to obtain a level-one key. This level-one key is encrypted using the 3DES algorithm to obtain a level-two key. The level-three encrypted data and the level-one and level-two keys are then encrypted using the XTEA algorithm to form an encrypted log. The encrypted log is stored in a file system and distributed backups are performed on the encrypted log.

[0119] Because data encrypted with the private key can only be decrypted with the public key, and the public key undergoes multiple levels of encryption, the embroidery log is also encrypted at multiple levels. Furthermore, the integrity of the embroidery log can be verified using the HMAC value. HMAC calculation has higher security than ordinary hash calculation. If the corresponding encryption algorithm or data transformation rules are not known, the encrypted log cannot be cracked. At least nine security measures have been taken (RSA algorithm, public and private keys, HMAC calculation, first mapping rule, 3 and s swap, second mapping rule, 3DES algorithm, XTEA algorithm, distributed backup), which greatly improves the security of embroidery log storage.

[0120] A preferred embodiment of the embroidery machine thread breakage detection system of the present invention includes the following modules:

[0121] The dataset construction module is used to acquire a large amount of historical embroidery data during the operation of the embroidery machine, and to construct the dataset after preprocessing and labeling the historical embroidery data.

[0122] A broken wire detection model creation module is used to create a broken wire detection model based on a feature extraction module, a feature fusion module, and a broken wire detection module, and to set the hyperparameter set of the broken wire detection model.

[0123] The broken thread detection model training module is used to train the broken thread detection model based on the dataset and deploy the trained broken thread detection model on the embroidery machine.

[0124] The embroidery module is used by the embroidery machine to acquire embroidery work files and control the corresponding embroidery needles to work based on the embroidery work files;

[0125] The thread breakage detection module is used by the embroidery machine to activate the infrared sensor group corresponding to the embroidery needle position based on the currently working embroidery needle to detect thread breakage and obtain a first detection result; collect the current embroidery pulse data, input the embroidery pulse data into the thread breakage detection model, and obtain a second detection result;

[0126] The thread breakage detection report generation module is used by the embroidery machine to generate a thread breakage detection report based on the first detection result and the second detection result, and to issue an alarm based on the thread breakage detection report.

[0127] The embroidery log management module is used to record embroidery logs in real time by the embroidery machine, optimize the thread breakage detection model based on the embroidery logs, and store the embroidery logs.

[0128] The dataset construction module is specifically used for:

[0129] Acquire a large amount of historical embroidery data during the operation of the embroidery machine, wherein the historical embroidery data is pulse data obtained by blocking the infrared signal of the infrared sensor group with the grating wheel;

[0130] Each of the embroidery history data is preprocessed, including outlier removal and noise suppression. The preprocessed embroidery history data is then labeled with at least the broken thread position and the position about to break the thread. The broken thread position and the position about to break the thread are labeled based on the selection of the target box. A dataset is then constructed based on the labeled embroidery history data.

[0131] By performing preprocessing on each embroidery history data, including outlier removal and noise suppression, the data quality is effectively improved, which in turn greatly increases the training speed of the broken thread detection model.

[0132] By labeling each pre-processed embroidery history data with at least the location of the broken thread and the location of the impending broken thread, and then constructing a dataset based on the labeled embroidery history data, the broken thread detection model is trained using the dataset. This enables the broken thread detection model to not only detect the location of the broken thread, but also predict whether the thread is about to break, greatly improving the reliability of broken thread detection in embroidery machines.

[0133] In the broken thread detection model creation module, the feature extraction module adopts a separable convolutional structure to extract the broken thread features of the embroidery thread, including several feature blocks of different scales; each feature block includes a convolution operation unit, a skip connection unit, a pooling unit, and an SE unit (Squeeze-and-Extraction), and each unit is repeated N times.

[0134] Separable convolutional structures modify traditional convolution operations into two-layer convolution operations, decoupling spatial and depth information to effectively utilize model parameters. For example, a feature extraction module can be formed by stacking nine feature blocks, with the first three blocks used for low-level feature mapping and the last six blocks used for extracting broken line features at different scales.

[0135] The feature fusion module is constructed based on a weighted bidirectional feature pyramid network and is used to fuse the multi-scale broken line features output by the feature extraction module from the bottom up and from the top down to obtain fused features.

[0136] The feature fusion module is built based on a weighted bidirectional feature pyramid network, which can perform feature fusion in two directions (bottom-up and top-down). It integrates features from high and low levels, making the fused features more expressive and greatly improving the network construction efficiency.

[0137] The broken line detection module is constructed based on multi-layer convolutional neural network units, pooling units, and fully connected network units, and is used to predict the size and position of the broken line detection box based on the fused features.

[0138] The hyperparameter set includes at least the loss function, learning rate, batch size, optimizer, learning decay rate, and dropout rate;

[0139] The loss function used is the cross-entropy loss function.

[0140] The broken wire detection model training module is specifically used for:

[0141] The dataset is divided into a training set, a test set, and a validation set in a 6:2:2 ratio. Based on the learning rate, batch size, learning decay rate, and dropout rate carried by the hyperparameter set, the disconnection detection model is trained using the training set to learn the pulse pattern until the loss value of the loss function carried by the hyperparameter set is less than the preset loss threshold. During the training process, each hyperparameter in the hyperparameter set is continuously optimized.

[0142] The trained disconnection detection model is tested using the test set to determine if its detection accuracy exceeds a preset accuracy threshold. If not, the test fails, and the training set is expanded to continue training the disconnection detection model. If yes, the test passes, and:

[0143] The tested thread breakage detection model is validated using the validation set. It is determined whether the confidence level of the thread breakage detection model is greater than a preset confidence threshold. If not, the validation fails, and the training set is expanded to continue training the thread breakage detection model. If yes, the validation passes, the training of the thread breakage detection model ends, and the validated thread breakage detection model is deployed on the embroidery machine.

[0144] The disconnection detection model is trained on the training set until the loss value of the loss function is less than the preset loss threshold. During the training process, each hyperparameter in the hyperparameter group is continuously optimized. The detection accuracy of the trained disconnection detection model is tested on the test set, and the confidence of the disconnection detection model that passes the test is verified on the validation set. In other words, the disconnection detection model is continuously optimized and tested and verified during the training process, which greatly improves the detection accuracy of the disconnection detection model.

[0145] In specific implementation, during the training process of the broken wire detection model, the soft connection nonmaximum suppression algorithm is used to merge and filter the broken wire detection boxes of the broken wire detection model. The Neura Architecture Search algorithm is used to perform network search operations on the feature extraction module, feature fusion module, and broken wire detection module to determine the scaling factor for each dimension. The scaling factor is used to allocate the computing power of each module to select the network structure with the best efficiency and accuracy, thereby expanding the accuracy and precision of broken wire detection.

[0146] Since the predicted broken wire detection boxes contain a large number of overlapping and invalid results, the soft connection nonmaximum suppression algorithm is used to filter redundant broken wire detection boxes based on the recognition probability value and merge some broken wire detection boxes to output the optimal broken wire detection box.

[0147] By performing network search operations using a composite scaling algorithm, the scaling ratio coefficients for each dimension are determined, thus solidifying the network search space and path, effectively reducing the time complexity of network search, and thereby improving the efficiency of disconnection detection.

[0148] The embroidery module is specifically used for:

[0149] The embroidery machine acquires the embroidery work file, parses the embroidery work file to obtain the embroidery path carrying the embroidery needle position, and controls the corresponding embroidery needle to work based on the embroidery path;

[0150] The wire breakage detection module is specifically used for:

[0151] The embroidery machine activates the infrared sensor group corresponding to the currently working embroidery needle, and performs thread breakage detection based on whether the infrared receiver of the infrared sensor group receives the infrared signal from the infrared transmitter, and obtains the first detection result;

[0152] The current embroidery pulse data of the infrared sensor group of the embroidery machine is collected. The embroidery pulse data is preprocessed, including outlier removal and noise suppression. The preprocessed embroidery pulse data is then input into the thread breakage detection model to obtain the second detection result.

[0153] The broken wire detection report generation module is specifically used for:

[0154] The embroidery machine analyzes the first and second detection results. When both the first and second detection results indicate a broken thread, a broken thread detection report is generated. When either the first or second detection result indicates a broken thread, a broken thread detection report is generated. When the first detection result indicates no broken thread and the second detection result indicates an impending broken thread, a broken thread detection report is generated indicating that the embroidery thread needs to be replaced.

[0155] The disconnection detection report is displayed on the large screen, and the operation of the indicator lights and buzzer is controlled based on the disconnection detection report. The disconnection detection report is also pushed to the pre-managed management terminal in real time to issue an alarm.

[0156] The embroidery log management module is specifically used for:

[0157] The embroidery machine records an embroidery log in real time, which includes at least the embroidery time, embroidery product model, embroidery product number, embroidery machine number, and thread breakage detection report. The thread breakage detection model is optimized based on the embroidery log, and the embroidery log is encrypted, stored, and backed up in a distributed manner.

[0158] By recording embroidery logs in real time, including at least the embroidery time, embroidery product model, embroidery product number, embroidery machine number, and thread breakage detection report, the thread breakage detection model is optimized based on the embroidery logs, further improving the detection accuracy of the thread breakage detection model. By encrypting and storing the embroidery logs and distributing backups, traceability is greatly improved.

[0159] The specific steps for encrypting, storing, and distributing the embroidery log are as follows:

[0160] A public and private key pair is created based on the RSA algorithm. The HMAC value is calculated using the HMAC algorithm on the embroidery log. The embroidery log and the HMAC value are then encrypted using the private key to obtain level-one encrypted data. Level-one encrypted data is mapped using a preset first mapping rule to obtain level-two encrypted data. The number 3 and the letter 's' in the level-two encrypted data are swapped to obtain level-three encrypted data. The public key is mapped using a preset second mapping rule to obtain a level-one key. This level-one key is encrypted using the 3DES algorithm to obtain a level-two key. The level-three encrypted data and the level-one and level-two keys are then encrypted using the XTEA algorithm to form an encrypted log. The encrypted log is stored in a file system and distributed backups are performed on the encrypted log.

[0161] Because data encrypted with the private key can only be decrypted with the public key, and the public key undergoes multiple levels of encryption, the embroidery log is also encrypted at multiple levels. Furthermore, the integrity of the embroidery log can be verified using the HMAC value. HMAC calculation has higher security than ordinary hash calculation. If the corresponding encryption algorithm or data transformation rules are not known, the encrypted log cannot be cracked. At least nine security measures have been taken (RSA algorithm, public and private keys, HMAC calculation, first mapping rule, 3 and s swap, second mapping rule, 3DES algorithm, XTEA algorithm, distributed backup), which greatly improves the security of embroidery log storage.

[0162] In summary, the advantages of this invention are:

[0163] 1. By acquiring a large amount of historical embroidery data from embroidery machine operation, a dataset is constructed after preprocessing and labeling each historical data point. Then, a thread breakage detection model is created based on a feature extraction module, a feature fusion module, and a thread breakage detection module. The hyperparameter set of the thread breakage detection model is set, and the model is trained on the dataset. The trained model is then deployed on the embroidery machine. The embroidery machine acquires the embroidery work file and controls the corresponding embroidery needles to work based on the work file. Based on the currently working embroidery needle, the infrared sensor group at the corresponding needle position is activated to detect thread breakage and obtain the first detection result. The current embroidery pulse data is collected and input into the thread breakage detection model to obtain the second detection result. A thread breakage detection report is generated based on the first and second detection results. An alarm is triggered based on the report, and the embroidery day is recorded in real time. This system optimizes the thread breakage detection model based on embroidery logs and stores these logs. Specifically, by combining infrared detection from the infrared sensor group with pulse pattern detection from the thread breakage detection model, a dual verification judgment can be performed on thread breakage to ensure accuracy. Based on the currently operating embroidery needle, the corresponding infrared sensor group at the needle position is activated for thread breakage detection, while the remaining infrared sensor groups are powered off, avoiding all infrared sensor groups being constantly on and effectively reducing power consumption. By marking the impending thread breakage positions in historical embroidery data and then using this marked historical data to train the thread breakage detection model, the model gains the ability to predict whether the embroidery thread is about to break, allowing for timely replacement of the thread that is about to break. Ultimately, this greatly improves the accuracy and timeliness of thread breakage detection on the embroidery machine and significantly reduces power consumption.

[0164] 2. By performing preprocessing on each embroidery history data, including outlier removal and noise suppression, the data quality is effectively improved, which in turn greatly increases the training speed of the broken thread detection model.

[0165] 3. By labeling each pre-processed embroidery history data with at least the location of the broken thread and the location of the impending broken thread, and then constructing a dataset based on the labeled embroidery history data, the broken thread detection model is trained using the dataset. This enables the broken thread detection model to not only detect the location of the broken thread, but also predict whether the thread is about to break, greatly improving the reliability of the broken thread detection of the embroidery machine.

[0166] 4. The disconnection detection model is trained using the training set until the loss value of the loss function is less than the preset loss threshold. During the training process, each hyperparameter in the hyperparameter group is continuously optimized. The detection accuracy of the trained disconnection detection model is tested using the test set, and the confidence of the disconnection detection model that passes the test is verified using the validation set. In other words, the disconnection detection model is continuously optimized and related tests and verifications are carried out during the training process, which greatly improves the detection accuracy of the disconnection detection model.

[0167] 5. By recording embroidery logs in real time, including at least the embroidery time, embroidery product model, embroidery product number, embroidery machine number, and thread breakage detection report, the thread breakage detection model is optimized based on the embroidery logs, further improving the detection accuracy of the thread breakage detection model. By encrypting and storing the embroidery logs and distributing backups, traceability is greatly improved.

[0168] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for detecting thread breakage in an embroidery machine, characterized in that: The steps include the following: Step S1: Obtain a large amount of historical embroidery data from when the embroidery machine is working, and construct a dataset after preprocessing and labeling each piece of historical embroidery data; Step S2: Create a disconnection detection model based on the feature extraction module, feature fusion module, and disconnection detection module, and set the hyperparameter group of the disconnection detection model; Step S3: Train the thread breakage detection model based on the dataset, and deploy the trained thread breakage detection model on the embroidery machine; Step S4: The embroidery machine acquires the embroidery work file and controls the corresponding embroidery needle to work based on the embroidery work file; Step S5: The embroidery machine starts the infrared sensor group corresponding to the embroidery needle position based on the currently working embroidery needle to detect thread breakage and obtain the first detection result; collect the current embroidery pulse data, input the embroidery pulse data into the thread breakage detection model, and obtain the second detection result; Step S6: The embroidery machine generates a thread breakage detection report based on the first detection result and the second detection result, and issues an alarm based on the thread breakage detection report; Step S7: The embroidery machine records the embroidery log in real time, optimizes the thread breakage detection model based on the embroidery log, and stores the embroidery log. Step S1 specifically involves: Acquire a large amount of historical embroidery data during the operation of the embroidery machine, wherein the historical embroidery data is pulse data obtained by blocking the infrared signal of the infrared sensor group with the grating wheel; The embroidery history data is preprocessed, including outlier removal and noise suppression. The preprocessed embroidery history data is then labeled with at least the broken thread position and the position about to break the thread. The broken thread position and the position about to break the thread are labeled based on the selection of the target box. A dataset is then constructed based on the labeled embroidery history data. Step S6 specifically involves: The embroidery machine analyzes the first and second detection results. When both the first and second detection results indicate a broken thread, a broken thread detection report is generated. When either the first or second detection result indicates a broken thread, a broken thread detection report is generated. When the first detection result indicates no broken thread and the second detection result indicates an impending broken thread, a broken thread detection report is generated indicating that the embroidery thread needs to be replaced. The disconnection detection report is displayed on a large screen. Based on the disconnection detection report, the indicator lights and buzzers are controlled, and the disconnection detection report is pushed to the pre-managed management terminal in real time to issue an alarm.

2. The method for detecting thread breakage in an embroidery machine as described in claim 1, characterized in that: In step S2, the feature extraction module adopts a separable convolutional structure, which includes several feature blocks of different scales; each feature block includes a convolution operation unit, a skip connection unit, a pooling unit, and an SE unit. The feature fusion module is constructed based on a weighted bidirectional feature pyramid network and is used to fuse multi-scale broken line features output by the feature extraction module from the bottom up and from the top down. The broken line detection module is built based on multi-layer convolutional neural network units, pooling units, and fully connected network units, and is used to predict the size and position of the broken line detection box. The hyperparameter set includes at least the loss function, learning rate, batch size, optimizer, learning decay rate, and dropout rate; The loss function used is the cross-entropy loss function.

3. The method for detecting thread breakage in an embroidery machine as described in claim 1, characterized in that: Step S3 specifically involves: The dataset is divided into a training set, a test set, and a validation set in a 6:2:2 ratio. Based on the learning rate, batch size, learning decay rate, and dropout rate carried by the hyperparameter set, the disconnection detection model is trained using the training set to learn the pulse pattern until the loss value of the loss function carried by the hyperparameter set is less than the preset loss threshold. During the training process, each hyperparameter in the hyperparameter set is continuously optimized. The trained disconnection detection model is tested using the test set to determine if its detection accuracy exceeds a preset accuracy threshold. If not, the test fails, and the training set is expanded to continue training the disconnection detection model. If yes, the test passes, and: The tested thread breakage detection model is validated using the validation set. It is determined whether the confidence level of the thread breakage detection model is greater than a preset confidence threshold. If not, the validation fails, and the training set is expanded to continue training the thread breakage detection model. If yes, the validation passes, the training of the thread breakage detection model ends, and the validated thread breakage detection model is deployed on the embroidery machine.

4. The method for detecting thread breakage in an embroidery machine as described in claim 1, characterized in that: Step S4 specifically involves: The embroidery machine acquires the embroidery work file, parses the embroidery work file to obtain the embroidery path carrying the embroidery needle position, and controls the corresponding embroidery needle to work based on the embroidery path; Step S5 specifically involves: The embroidery machine activates the infrared sensor group corresponding to the currently working embroidery needle, and performs thread breakage detection based on whether the infrared receiver of the infrared sensor group receives the infrared signal from the infrared transmitter, and obtains the first detection result; The current embroidery pulse data of the infrared sensor group of the embroidery machine is collected. The embroidery pulse data is preprocessed, including outlier removal and noise suppression. The preprocessed embroidery pulse data is then input into the thread breakage detection model to obtain the second detection result.

5. The method for detecting thread breakage in an embroidery machine as described in claim 1, characterized in that: Step S7 specifically involves: The embroidery machine records an embroidery log in real time, which includes at least the embroidery time, embroidery product model, embroidery product number, embroidery machine number, and thread breakage detection report. The thread breakage detection model is optimized based on the embroidery log, and the embroidery log is encrypted, stored, and backed up in a distributed manner.

6. A thread breakage detection system for an embroidery machine, characterized in that: Includes the following modules: The dataset construction module is used to acquire a large amount of historical embroidery data during the operation of the embroidery machine, and to construct the dataset after preprocessing and labeling the historical embroidery data. A broken wire detection model creation module is used to create a broken wire detection model based on a feature extraction module, a feature fusion module, and a broken wire detection module, and to set the hyperparameter set of the broken wire detection model. The broken thread detection model training module is used to train the broken thread detection model based on the dataset and deploy the trained broken thread detection model on the embroidery machine. The embroidery module is used by the embroidery machine to acquire embroidery work files and control the corresponding embroidery needles to work based on the embroidery work files; The thread breakage detection module is used by the embroidery machine to activate the infrared sensor group corresponding to the embroidery needle position based on the currently working embroidery needle to detect thread breakage and obtain a first detection result; collect the current embroidery pulse data, input the embroidery pulse data into the thread breakage detection model, and obtain a second detection result; The thread breakage detection report generation module is used by the embroidery machine to generate a thread breakage detection report based on the first detection result and the second detection result, and to issue an alarm based on the thread breakage detection report. The embroidery log management module is used to record embroidery logs in real time by the embroidery machine, optimize the thread breakage detection model based on the embroidery logs, and store the embroidery logs. The dataset construction module is specifically used for: Acquire a large amount of historical embroidery data during the operation of the embroidery machine, wherein the historical embroidery data is pulse data obtained by blocking the infrared signal of the infrared sensor group with the grating wheel; The embroidery history data is preprocessed, including outlier removal and noise suppression. The preprocessed embroidery history data is then labeled with at least the broken thread position and the position about to break the thread. The broken thread position and the position about to break the thread are labeled based on the selection of the target box. A dataset is then constructed based on the labeled embroidery history data. The broken wire detection report generation module is specifically used for: The embroidery machine analyzes the first and second detection results. When both the first and second detection results indicate a broken thread, a broken thread detection report is generated. When either the first or second detection result indicates a broken thread, a broken thread detection report is generated. When the first detection result indicates no broken thread and the second detection result indicates an impending broken thread, a broken thread detection report is generated indicating that the embroidery thread needs to be replaced. The disconnection detection report is displayed on a large screen. Based on the disconnection detection report, the indicator lights and buzzers are controlled, and the disconnection detection report is pushed to the pre-managed management terminal in real time to issue an alarm.

7. The embroidery machine thread breakage detection system as described in claim 6, characterized in that: In the line breakage detection model creation module, the feature extraction module adopts a separable convolutional structure, which includes several feature blocks of different scales; each feature block includes a convolution operation unit, a skip connection unit, a pooling unit, and an SE unit. The feature fusion module is constructed based on a weighted bidirectional feature pyramid network and is used to fuse multi-scale broken line features output by the feature extraction module from the bottom up and from the top down. The broken line detection module is built based on multi-layer convolutional neural network units, pooling units, and fully connected network units, and is used to predict the size and position of the broken line detection box. The hyperparameter set includes at least the loss function, learning rate, batch size, optimizer, learning decay rate, and dropout rate; The loss function used is the cross-entropy loss function.

8. The embroidery machine thread breakage detection system as described in claim 6, characterized in that: The broken wire detection model training module is specifically used for: The dataset is divided into a training set, a test set, and a validation set in a 6:2:2 ratio. Based on the learning rate, batch size, learning decay rate, and dropout rate carried by the hyperparameter set, the disconnection detection model is trained using the training set to learn the pulse pattern until the loss value of the loss function carried by the hyperparameter set is less than the preset loss threshold. During the training process, each hyperparameter in the hyperparameter set is continuously optimized. The trained disconnection detection model is tested using the test set to determine if its detection accuracy exceeds a preset accuracy threshold. If not, the test fails, and the training set is expanded to continue training the disconnection detection model. If yes, the test passes, and: The tested thread breakage detection model is validated using the validation set. It is determined whether the confidence level of the thread breakage detection model is greater than a preset confidence threshold. If not, the validation fails, and the training set is expanded to continue training the thread breakage detection model. If yes, the validation passes, the training of the thread breakage detection model ends, and the validated thread breakage detection model is deployed on the embroidery machine.

9. The embroidery machine thread breakage detection system as described in claim 6, characterized in that: The embroidery module is specifically used for: The embroidery machine acquires the embroidery work file, parses the embroidery work file to obtain the embroidery path carrying the embroidery needle position, and controls the corresponding embroidery needle to work based on the embroidery path; The wire breakage detection module is specifically used for: The embroidery machine activates the infrared sensor group corresponding to the currently working embroidery needle, and performs thread breakage detection based on whether the infrared receiver of the infrared sensor group receives the infrared signal from the infrared transmitter, and obtains the first detection result; The current embroidery pulse data of the infrared sensor group of the embroidery machine is collected. The embroidery pulse data is preprocessed, including outlier removal and noise suppression. The preprocessed embroidery pulse data is then input into the thread breakage detection model to obtain the second detection result.

10. The embroidery machine thread breakage detection system as described in claim 6, characterized in that: The embroidery log management module is specifically used for: The embroidery machine records an embroidery log in real time, which includes at least the embroidery time, embroidery product model, embroidery product number, embroidery machine number, and thread breakage detection report. The thread breakage detection model is optimized based on the embroidery log, and the embroidery log is encrypted, stored, and backed up in a distributed manner.