Intelligent detection method and system for poor molding

Through deep learning algorithms and similarity calculations, the historical data labels are optimized, combined with reinforcement learning to adjust confidence and pruning optimization model, the problems of low efficiency and insufficient accuracy of existing poor molding detection methods are solved, and more efficient and accurate molding is achieved Poor detection.

CN119107320AActive Publication Date: 2024-12-10山东国泰大成科技有限公司
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411595185.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2024-12-10
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

The existing detection methods for poor molding rely on manual visual inspection, are inefficient and susceptible to human factors, and the current image recognition technology ignores the important role of historical data in determining classification accuracy, resulting in insufficient classification accuracy.

Method used

Deep learning algorithm is used to build a classification model, and by adding labels to historical data and training it, combining similarity calculation and correction model, optimizing label quality, using reinforcement learning algorithm to adjust confidence threshold, prune and optimize the model, and set the loss function to improve Classification accuracy.

Benefits of technology

By continuously optimizing the label quality of historical data, the accuracy and generalization capabilities of classification models are improved, misclassification is reduced, computational complexity and storage needs are reduced, and detection efficiency and accuracy are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107320A_ABST
    Figure CN119107320A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent detection method and system for poor molding, and relates to the technical field of intelligent detection, and the detection method comprises the steps of data collection, label addition, first modeling, first model training, first classification, classification judgment, second model training, second classification and the like. The detection system comprises a data acquisition module, a label adding module, a first modeling module, a first model training module, a first classification module, a classification judgment module, a second model training module and a second classification module, and the accuracy of poor molding classification can be improved based on historical data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of intelligent detection, and in particular to a method and system for intelligent detection of molding defects. Background Art

[0002] The detection of poor forming often relies on manual visual inspection methods, such as yarn cones. This method not only requires a lot of manpower input, resulting in low detection efficiency, but is also easily interfered by human factors. Due to the different experience, vision, fatigue level and judgment criteria of each inspector, even when facing the same yarn cone sample, completely different test results may be obtained. This subjectivity greatly increases the inconsistency and error risk of test results. Even those experienced and skilled operators may make mistakes in judgment due to factors such as visual fatigue, distraction or emotional fluctuations in a long-term high-intensity working environment, which in turn affects the accurate assessment of product quality.

[0003] With the advancement of science and technology, relevant technologies have begun to explore and apply advanced technologies such as image recognition to replace traditional manual detection methods. These technologies capture high-definition images of yarn tubes and use complex algorithm models to automatically analyze the shape, texture, size and other characteristics of the yarn tubes, thereby achieving rapid and accurate judgment of the molding quality. However, while pursuing efficiency and accuracy, these current technical solutions also expose certain limitations, that is, they often focus on the processing of current data, while ignoring the important role of historical data in improving the accuracy of judgment and classification. Summary of the invention

[0004] In order to improve the accuracy of poor molding classification based on historical data, the present application provides a method and system for intelligent detection of poor molding.

[0005] In a first aspect, the present invention provides an intelligent detection method for molding defects, which adopts the following technical solution: A method for intelligently detecting molding defects comprises the following steps: Data collection: obtain historical data and collect real-time data; Add tags: add tags to historical data to obtain the first data; First modeling: Building a classification model based on deep learning algorithms; First model training: using the first data to train the classification model, and recording the trained classification model as the first model; First classification: historical data is used as the input of the first model, and the probability of poor molding is output, which is recorded as the second data; Classification judgment: judge whether the second data meets expectations, if so, execute the second classification step; if not, execute the second model training step; Second model training: including similarity calculation, second modeling, updating labels and updating first data; Similarity calculation: calculate the similarity between the first data pairs to obtain the third data; Second modeling: Building a correction model based on deep learning algorithm; Update labels: Use the second data and the third data as inputs to the revised model to obtain updated labels; Updating the first data: replacing the original label in the first data with the updated label to obtain fourth data, using the fourth data as new first data, and executing the first model training step; Second classification: Use the real-time data as the input of the first model to obtain the category of poor molding.

[0006] By adopting the above technical solution, the present application adds labels to historical data, and uses historical data and added labels (the two are collectively referred to as first data) to train the classification model, inputs historical data into the trained classification model, obtains its output (i.e., second data), and obtains the training effect of the classification model by judging whether the second data meets expectations. If the second data meets expectations, it indicates that the classification model training effect is good and can be directly used for the classification of real-time data. If the second data does not meet expectations, it indicates that the added labels are wrong, resulting in the classification model training effect not meeting expectations, and the labels need to be corrected, and the classification model is retrained using the corrected labels. By introducing similarity calculation and correction models, the label quality in historical data can be continuously optimized, historical data is reused, and the corrected labels are more accurate, which can better reflect the actual yarn tube forming conditions. By continuously iterating and optimizing the labels of historical data, the classification model can learn more accurate feature representations, thereby improving the accuracy of classification.

[0007] Optionally, after executing the first model training step and before executing the first classification step, the method further includes: Adjust confidence: including initial settings, determining action space, determining state space, determining reward function and obtaining optimal confidence threshold; Initial settings: Set the initial confidence threshold; Determine the action space: Integrate the values ​​of all confidence thresholds of the classification model into the action space; Determine the state space: Integrate the performance indicators of the classification model, the characteristics of the first data, and the historical classification decisions into the state space; Determine the reward function: Set the reward function based on the performance indicators of the classification model; Obtain the optimal confidence threshold: Based on the reinforcement learning algorithm, select the optimal confidence threshold.

[0008] By adopting the above technical solution, the present application integrates the performance indicators of the classification model, the characteristics of the first data, and the historical classification decisions into a state space, so that the reinforcement learning algorithm can comprehensively consider multiple factors, thereby more comprehensively evaluating the performance of the classification model under different confidence thresholds. By setting a reward function and optimizing the confidence threshold based on the reinforcement learning algorithm, the classification model can learn the optimal decision-making strategy in different situations. By finding the optimal confidence threshold through the reinforcement learning algorithm, the classification model can more accurately judge when to accept or reject a classification result when faced with actual data, which helps to reduce misclassification and further improve the accuracy of the overall classification.

[0009] Optionally, after executing the step of training the second model and before executing the step of training the first model, the method further includes: Pruning: setting the weights in the first model that are below a preset weight threshold to zero to obtain a second model; Retraining: using the fourth data to train the second model to obtain a trained second model; Evaluation: Set the evaluation index of the second model, and regularly evaluate whether the performance of the trained second model meets expectations. If so, execute the termination step; if not, execute the iterative judgment step; Iteration judgment: judge whether the number of execution steps of pruning is greater than the preset threshold. If so, execute the termination step; if not, execute the pruning step and re-record the number of execution steps of pruning; Termination: Use the trained second model as the new first model and execute the steps of training the first model.

[0010] By adopting the above technical solution, the present application prunes the weights below the preset weight threshold, which can reduce the complexity of the first model, reduce the risk of overfitting, and improve the generalization ability of the first model. The pruned first model is more streamlined, which helps to improve computing efficiency and reduce storage requirements. Retraining the second model using the fourth data can further adjust the parameters of the second model to better adapt to the fourth data distribution and characteristics. By regularly evaluating whether the performance of the second model meets expectations, it is determined whether pruning is required or the termination step is executed based on the evaluation results.

[0011] Optionally, after executing the termination step and before executing the first model training step, the method further includes: Obtaining prediction labels: inputting historical data into the first model obtained in the terminated step, obtaining the probability of the category to which the historical data belongs, recorded as the fifth data; Set the first loss function: Set the first loss function, and the calculation model is as follows: ; in, is the value of the first loss function; is the predicted probability of the i-th category in the fifth data; is the predicted probability of the i-th category in the second data; Loss judgment: Determine whether the value of the first loss function is less than the preset loss function threshold. If so, execute the first classification step; if not, execute the first model training step.

[0012] By adopting the above technical solution, the purpose of setting the first loss function in this application is to measure the difference between the prediction probability of the original first model (the category probability obtained in the first classification step) and the prediction probability of the second model (the category probability obtained in the step of obtaining the prediction label), and by comparing the first loss function with the preset loss function threshold, if the loss value is less than the preset loss function threshold, it means that the second model has a good prediction performance for historical data, and the first classification step can be performed. If the loss value is greater than the threshold, it means that the classification performance of the first model is insufficient, and it is necessary to return to the first model training step for further optimization.

[0013] Optionally, after executing the step of setting the first loss function and before executing the step of loss determination, the method further includes: Get the real label: take the label of the first data in the step of adding labels as the real label and record it as the sixth data; Setting the second loss function: Setting the second loss function, the calculation model is as follows: ; in, is the value of the second loss function; A is the number of poorly formed categories; is the true probability of the jth category in the sixth data; is the predicted probability of the jth category in the second data; Calculate the total loss: Set the total loss function and the calculation model is as follows: ; Among them, B is the value of the total loss function.

[0014] By adopting the above technical solution, the present application sets a second loss function to measure the difference between the predicted probability (the category probability obtained in the first classification step) and the probability of the true label. By setting the total loss function, the first loss function and the second loss function are combined to obtain a comprehensive loss value. The total loss function provides a unified goal for model optimization, so that the model can simultaneously consider the second data, the fifth data, and the sixth data during the training process, and continuously optimize its parameters, thereby enabling the model to achieve better generalization capabilities on multiple data, which is more conducive to classifying real-time data.

[0015] Optionally, after executing the step of calculating the total loss and before executing the step of determining the loss, the method further includes: Replacement: Replace the value of the first loss function with the value of the total loss function and perform the loss judgment step.

[0016] By adopting the above technical solution, the value of the total loss function replaces the value of the first loss function, and the loss judgment step is executed, so that the loss judgment step can be based on the total loss, and a more accurate judgment result can be obtained.

[0017] Optionally, the total loss is also calculated by the weight of the first loss function and the weight of the second loss function, and the calculation model is as follows: ; Among them, B is the value of the total loss function; is the weight of the first loss function; is the weight of the second loss function.

[0018] By adopting the above technical solution and reasonably setting the weight of the first loss function and the weight of the second loss function, the model can achieve better performance. When the two weights are equal, the contributions of the two loss functions to the total loss are equal, which is suitable for the situation where the two groups of data have the same importance in model training. If you want the model to focus more on the prediction performance of a certain group of data, you can also increase the weight of the corresponding loss function.

[0019] Optionally, the weight of the first loss function Obtained through cross-validation method.

[0020] By adopting the above technical solution, the present application obtains the weight of the first loss function by cross-validation, and can find the weight value that performs best on the validation set.

[0021] Optionally, after executing the step of collecting data and before executing the step of adding labels, the method further includes: Dimension determination: determine whether the historical data and / or real-time data is one-dimensional data. If so, perform the step of adding labels; if not, perform the step of reducing dimensions; Dimensionality reduction: Perform nonlinear dimensionality reduction on historical data and / or real-time data, record the historical data after dimensionality reduction as new historical data, and record the real-time data after dimensionality reduction as new real-time data.

[0022] By adopting the above technical solutions, one-dimensional data is usually easier to process than high-dimensional data because they simplify the complexity and computational complexity of the data. By quickly determining whether the data is one-dimensional, the one-dimensional data can be directly processed in the future, reducing unnecessary computational overhead. High-dimensional data has high computational complexity when processed and analyzed. Dimensionality reduction can effectively reduce the dimension of the data, thereby reducing computational costs and increasing processing speed. High-dimensional data often contains a large amount of redundant or noisy information, which is harmful to data analysis and model training. Through dimensionality reduction, this redundant information can be removed, key features can be retained, and data quality can be improved. Many deep learning algorithms are prone to "dimensionality disaster" in high-dimensional space, that is, as the dimension increases, the performance of the model drops sharply. Dimensionality reduction can map data to low-dimensional space, making the model easier to learn, thereby improving the generalization ability and accuracy of the model.

[0023] In a second aspect, the present invention provides an intelligent detection system for poor forming, which adopts the following technical solution: An intelligent detection system for poor forming, comprising: Data collection module, used to obtain historical data and collect real-time data; A label adding module is used to add labels to historical data to obtain first data; The first modeling module is used to establish a classification model based on a deep learning algorithm; A first model training module is used to train a classification model using historical data and added labels; The first classification module is used to use the historical data as the input of the trained classification model and output the probability of the category of poor molding; The classification judgment module is used to judge whether the probability of the category of poor molding meets expectations; The second model training module includes a similarity calculation unit, a second modeling unit, an update label unit and an update first data unit; A similarity calculation unit, used for calculating the similarity between two first data; A second modeling unit is used to establish a correction model based on a deep learning algorithm; An updating label unit is used to use the category probability of poor molding and the similarity as inputs of the correction model to obtain an updated label; Updating the first data unit, used to replace the original label in the historical data with the updated label, obtain a new label, and replace the original label with the new label; The second classification module is used to use the real-time data as the input of the classification model to obtain the category of poor molding.

[0024] By adopting the above technical solution, the application adds labels to historical data manually or automatically, which is a key step in deep learning model training. Accurate labels can significantly improve the classification performance of the model. The application establishes a classification model based on a deep learning algorithm and uses labeled historical data for training. The deep learning algorithm is good at extracting complex features from a large amount of data, thereby improving the accuracy and generalization of classification. The trained model can output the category probability of poor bobbin forming to provide support for subsequent decision-making. The first classification module outputs the category probability, and the classification judgment module judges whether it meets expectations based on these probabilities, which helps to discover the shortcomings of the model. Calculating the similarity between historical data helps to discover potential patterns and relationships in the data and provide useful input for the correction model. The correction model is established using a deep learning algorithm, aiming to improve the accuracy of the label by using similarity information and category probability. Combining category probability and similarity information to generate updated labels helps to correct possible label errors and improve the overall quality of the data. After correcting the model and data set, the module inputs real-time data into the classification model to obtain the category of poor forming.

[0025] In summary, the present application includes at least one of the following beneficial technical effects: 1. This application adds labels to historical data, and uses historical data and added labels (the two are collectively referred to as first data) to train the classification model, inputs historical data into the trained classification model, obtains its output (i.e., second data), and obtains the training effect of the classification model by judging whether the second data meets expectations. If the second data meets expectations, it indicates that the classification model training effect is good and can be directly used for the classification of real-time data. If the second data does not meet expectations, it indicates that the added labels are wrong, resulting in the classification model training effect not meeting expectations. The labels need to be corrected, and the classification model is retrained using the corrected labels. By introducing similarity calculation and correction models, the label quality in historical data can be continuously optimized, historical data is reused, and the corrected labels are more accurate, which can better reflect the actual yarn tube forming conditions. By continuously iterating and optimizing the labels of historical data, the classification model can learn more accurate feature representations, thereby improving the accuracy of classification.

[0026] 2. One-dimensional data are usually easier to process than high-dimensional data because they simplify the complexity and computation of the data. By quickly determining whether the data is one-dimensional, the one-dimensional data can be directly processed in the future, reducing unnecessary computational overhead. High-dimensional data has high computational complexity when processed and analyzed. Dimensionality reduction can effectively reduce the dimension of the data, thereby reducing computational costs and increasing processing speed. High-dimensional data often contains a lot of redundant or noisy information, which is harmful to data analysis and model training. Through dimensionality reduction, this redundant information can be removed, key features can be retained, and data quality can be improved. Many deep learning algorithms are prone to "dimensionality disaster" in high-dimensional space, that is, as the dimension increases, the performance of the model drops sharply. Dimensionality reduction can map data to low-dimensional space, making the model easier to learn, thereby improving the generalization ability and accuracy of the model.

[0027] 3. This application adds labels to historical data manually or automatically, which is a key step in deep learning model training. Accurate labels can significantly improve the classification performance of the model. This application establishes a classification model based on a deep learning algorithm and uses labeled historical data for training. The deep learning algorithm is good at extracting complex features from a large amount of data, thereby improving the accuracy and generalization of classification. The trained model can output the category probability of poor bobbin forming to provide support for subsequent decision-making. The first classification module outputs the category probability, and the classification judgment module judges whether it meets expectations based on these probabilities, which helps to discover the deficiencies of the model. Calculating the similarity between historical data helps to discover potential patterns and relationships in the data and provide useful input for the correction model. The correction model is established using a deep learning algorithm, aiming to improve the accuracy of the label by using similarity information and category probability. Combining category probability and similarity information to generate updated labels helps to correct possible label errors and improve the overall quality of the data. After correcting the model and data set, the module inputs real-time data into the classification model to obtain the category of poor forming. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is a flow chart of Example 1 of the present application; Figure 2 This is a flowchart from S4 first model training to S5 first classification in Example 1 of the present application; Figure 3 This is a flow chart from S1 data collection to S2 labeling in Example 1 of the present application; Figure 4 This is a flow chart of Example 2 of the present application. DETAILED DESCRIPTION

[0029] The following combination Figures 1 to 4 This application is described in further detail.

[0030] Embodiment 1: This embodiment discloses a method for intelligently detecting molding defects. Figure 1 As shown, the detection method includes: S1 data collection, S2 label addition, S3 first modeling, S4 first model training, S5 first classification, S6 classification judgment, S7 second model training and S8 second classification. First, historical data and real-time data are obtained, and then labels are added to the historical data to obtain the first data. Then, the classification model is trained using the first data, and then the historical data is used as the input of the trained classification model to obtain the second data. Then, it is judged whether the second data meets expectations, and whether to optimize the label is determined based on the judgment result. This embodiment includes the following steps: S1 data acquisition, obtain historical data, and collect real-time data. Capture various production parameters (such as temperature, humidity, tension, speed, etc.) and yarn tube forming data from the yarn tube production line in real time. At the same time, retrieve and obtain historical production records and historical yarn tube forming data from the database to ensure the comprehensiveness and timeliness of the data.

[0031] In this step, the historical data or real-time data is assumed to be one-dimensional data.

[0032] The real-time data refers to the data of poorly formed yarn cones to be classified.

[0033] S2 adds labels, and performs detailed manual or automatic labeling on the collected historical data, assigning corresponding labels to each sample. These labels reflect the poor forming category of the yarn cone (such as A1 / A2 level: no obvious hair (the amount of hair is 0-100, excluding 0 and 100), B1 / B2 level: there are a small amount of hair (the amount of hair is 100-300, including 100 and 300), T1 / T2 level: hair balls, skipped wires, clamped wires, broken wires, etc.). After the labeling is completed, the historical data and the added labels are used together as the first data.

[0034] S3 first builds a model based on a deep learning algorithm to establish a classification model, wherein the classification model adopts a CNN model or a RNN model.

[0035] S4 first model training, using the first data to train the classification model, and the trained classification model is recorded as the first model.

[0036] S5 is the first classification, taking the historical data as the input of the first model, and outputting the category probability of poor bobbin forming, which is recorded as the second data.

[0037] S6 classification judgment, by comparing the prediction results with the added labels, evaluate whether the classification performance of the first model meets the expected standards (that is, determine whether the labels in the second data output by S5 are consistent with those in the first data). If so, it indicates that the classification effect of the first model is good, and the second classification step can be performed; if not, it indicates that there are erroneous label data in the training set, and the erroneous label data leads to poor classification effect of the first model, and S7 second model training needs to be performed.

[0038] S7 second model training, including S71 similarity calculation, S72 second modeling, S73 updating labels and S74 updating first data.

[0039] S71 similarity calculation, using Gaussian kernel function or cosine similarity, calculates the similarity between the first data pairs to obtain third data, taking Gaussian kernel function as an example: ; for similarity; is the value of the i-th first data; is the value of the j-th first data; It is a hyperparameter, and its value range is 0-10.

[0040] S72 is a second modeling step, in which a correction model is established based on a deep learning algorithm, wherein the correction model adopts an MLP model or a ResNet model.

[0041] S73 updates the label, uses the second data and the third data as inputs of the correction model, and obtains an updated label, including: The second data corresponding to the i-th first data involved in the third data and the second data corresponding to the j-th first data are input into the correction model. The correction model updates the second data corresponding to the j-th first data by reducing the difference between the second data corresponding to the i-th first data and the second data corresponding to the j-th first data, thereby updating the label.

[0042] S74 updates the first data, replaces the original label in the first data with the updated label, obtains the fourth data, uses the fourth data as the new first data, and executes S4 first model training.

[0043] S8 second classification, using real-time data as input of the first model to obtain the category of poor molding.

[0044] This embodiment trains the classification model through historical data and defined labels, and obtains second data by re-inputting historical data into the classification model. Based on the second data, it is determined whether the classification model can directly classify the real-time data (that is, whether there are errors in the labels of the historical data). If the second data does not meet expectations, it indicates that there are errors in the labels of the historical data, resulting in poor classification effect of the trained classification model, and the labels need to be modified and updated; if the second data meets expectations, it indicates that the classification effect of the classification model is good, and the trained classification model can be used to classify the real-time data. This embodiment reuses historical data. By continuously iterating and optimizing the labels of historical data, the classification model can learn more accurate feature representations, thereby improving the accuracy of classification.

[0045] like Figure 2 As shown, in other embodiments, after performing S4 first model training and before performing S5 first classification, it also includes: S9 adjusts the confidence, including S91 initial setting, S92 determining the action space, S93 determining the state space, S94 determining the reward function and S95 obtaining the optimal confidence threshold.

[0046] S91 Initial setting, setting the initial confidence threshold, the initial confidence threshold is set based on expert experience, for example: the confidence threshold is set to 0.5, which usually means in a binary classification problem that when the classification model believes that the probability that a sample belongs to a certain category is greater than 0.5, it will be classified into that category.

[0047] S92 determines the action space, and integrates the values ​​of all confidence thresholds of the classification model into the action space. In this step, the value range of the confidence threshold in the action space is 0-1. The closer to 0, the lower the confidence threshold, and the closer to 1, the higher the confidence threshold.

[0048] S93 determines the state space, integrating the performance indicators of the classification model, the characteristics of the first data, and the historical classification decisions into the state space.

[0049] The performance indicators include: precision, recall and F1 score.

[0050] The characteristics of the first data include: data distribution and feature importance.

[0051] Historical classification decisions include: previous classification results using different confidence thresholds.

[0052] S94 determines the reward function and sets the reward function according to the performance indicators of the classification model. For example, a positive reward is given when the classification accuracy rate improves, and a negative reward is given when the classification accuracy rate decreases.

[0053] The calculation model of the reward function is as follows: ; in, is the value of the reward function; is the reward for the i-th performance indicator.

[0054] The reward function may also adopt the following calculation model: ; in, is the value of the reward function; is the reward for the i-th performance indicator; is the weight of the i-th performance indicator, where .

[0055] S95 obtains the optimal confidence threshold and performs iterative learning based on reinforcement learning algorithms (such as Q learning, policy gradient, etc.) in the defined action space, state space and reward function to find the optimal confidence threshold that can maximize the cumulative reward.

[0056] This embodiment sets a confidence threshold that is adaptively adjusted based on a reinforcement learning algorithm, and further improves the accuracy and reliability of the classification model by obtaining the optimal confidence threshold.

[0057] like Figure 3 As shown, in other embodiments, after executing S1 data collection and before executing S2 tag adding, it also includes: S101 dimensionality determination: determine whether the historical data and / or real-time data is one-dimensional data. If so, execute S2 to add labels; if not, execute S102 to reduce the dimensionality.

[0058] The criteria for determining whether historical data and / or real-time data are one-dimensional data are: If the data contains only the values ​​of a single variable, and these values ​​vary over time or another single factor, then it is considered one-dimensional data.

[0059] If the data contains values ​​of multiple variables, or even if there is only one variable but its representation is a multidimensional array, it is considered to be non-one-dimensional data.

[0060] S102 Dimensionality reduction: According to the characteristics of historical data and / or real-time data, select a suitable dimensionality reduction method (for example: PCA, LLE and KFDA, etc.), perform nonlinear dimensionality reduction processing on it, record the historical data after dimensionality reduction as new historical data, and record the real-time data after dimensionality reduction as new real-time data.

[0061] This embodiment can reduce errors caused by data dimension mismatch by clarifying the dimensional characteristics of the data. For example, mistakenly treating multidimensional data as one-dimensional data may lead to information loss or inaccurate analysis. In deep learning and data mining, high-dimensional data can lead to model overfitting or excessive computational complexity. By reducing the dimensionality, the input dimension of the model can be reduced, and the generalization ability and computational efficiency of the model can be improved.

[0062] Example 2: Figure 4 As shown, the difference between this embodiment and embodiment 1 is that after executing S7 second model training and before executing S4 first model training, it also includes: S110 pruning, setting the weights in the first model that are lower than a preset weight threshold to zero, and obtaining a second model. This step prevents overfitting by removing unimportant parts of the first model (weights that are lower than a preset weight threshold), and setting these weights to zero is equivalent to deleting the corresponding connections or features from the model.

[0063] S111 retrains, using the fourth data to train the second model to obtain a trained second model.

[0064] S112 evaluation, setting the evaluation indicators of the second model (such as accuracy, recall rate, F1 score, etc.), regularly evaluating whether the performance of the trained second model meets expectations (i.e., meets or exceeds the preset evaluation standards). If so, execute S114 to terminate; if not, execute S113 to iterate and judge.

[0065] S113 iteratively determines whether the number of times the pruning steps are executed is greater than a preset threshold. If so, it indicates that the second model has reached a performance bottleneck or the performance can no longer be significantly improved through pruning and retraining, and S114 is executed to terminate; if not, S110 pruning is executed, and the number of times S110 pruning is executed is re-recorded.

[0066] S114 terminates, the trained second model is used as the new first model, and S115 is executed to obtain the predicted label.

[0067] S115 Obtain prediction labels: Input the historical data into the first model obtained at the end of S114 to obtain the category probability to which the historical data belongs, which is recorded as the fifth data.

[0068] S116 sets the first loss function. The calculation model of the first loss function is as follows: ; in, is the value of the first loss function; is the predicted probability of the i-th category in the fifth data; is the predicted probability of the i-th category in the second data. In this step, the second data refers to the part of the second data that meets expectations. If there is second data that does not meet expectations, the label in the first data is updated through S7 second model training to obtain second data that meets expectations, and then S116 is executed to set the first loss function.

[0069] S117 obtains the real label, and adds the label of the first data in S2 as the real label, which is recorded as the sixth data.

[0070] S118 sets the second loss function. The calculation model of the second loss function is as follows: ; in, is the value of the second loss function; A is the number of poorly formed categories; is the true probability of the jth category in the sixth data; is the predicted probability of the j-th category in the second data. The second data in this step is the same as the second data in the first loss function set in S116, and both refer to the expected second data.

[0071] S119 calculates the total loss and sets the total loss function. The calculation model is as follows: ; Among them, B is the value of the total loss function.

[0072] The total loss is also calculated by the weight of the first loss function and the weight of the second loss function, and the calculation model is as follows: ; Among them, B is the value of the total loss function; is the weight of the first loss function; is the weight of the second loss function, the weight of the first loss function Obtained through cross-validation method.

[0073] S120 loss judgment, judging whether the value of the total loss function is less than the preset loss function threshold, if so, executing S5 first classification; if not, executing S4 first model training.

[0074] This embodiment reduces the complexity of the first model through pruning to prevent overfitting, combines retraining to improve the generalization ability of the second model on the fourth data, and regularly evaluates the performance of the second model. At the same time, setting iteration and loss thresholds ensures the stability and reliability of the second model, and the design of multiple loss functions comprehensively optimizes the prediction accuracy of the second model in different aspects. Ultimately, this series of steps not only improves the prediction accuracy of the second model, but also enhances the flexibility and scalability of the process, laying a solid foundation for the excellent performance of the second model in practical applications.

[0075] Embodiment 3: This embodiment discloses an intelligent detection system for poor forming, the detection system comprising: The data acquisition module is used to collect data related to bobbin forming from historical records by means of database query, file reading, etc., such as forming time, forming parameters, environmental parameters, etc. This module is also used to obtain various data in the bobbin forming process in real time, and the various data obtained in the bobbin forming process in real time refers to the data of poor bobbin forming to be classified.

[0076] The label adding module is used to add labels to the historical data to obtain the first data.

[0077] This module defines a variety of poor forming categories based on the actual situation of yarn cone forming, such as A1 / A2: no obvious hair (the amount of hair is 0-100, excluding 0 and 100), B1 / B2: a small amount of hair (the amount of hair is 100-300, including 100 and 300), T1 / T2: hair balls, skipped wires, clamped wires, broken wires, etc.), and labels are added to each sample in the historical data through manual review or automatic algorithms, so that each sample has a clear classification label.

[0078] The first modeling module is used to establish a classification model based on a deep learning algorithm.

[0079] The first model training module is used to train the classification model using historical data and added labels.

[0080] The first classification module is used to use the first data as an input of the trained classification model and output the category probability of poor molding.

[0081] The classification judgment module is used to judge whether the probability of the category of poor molding meets expectations. If the classification accuracy is high, the model performance is good; if the classification accuracy is low, it is necessary to adjust the parameters of the classification model by adjusting the labels in the first data.

[0082] The second model training module includes a similarity calculation unit, a second modeling unit, an updating label unit and an updating first data unit.

[0083] The similarity calculation unit is used to calculate the similarity between historical data to find the correlation and difference between the data.

[0084] The second modeling unit is used to establish a correction model based on a deep learning algorithm.

[0085] The label updating unit is used to use the category probability of poor molding and the similarity as inputs of the correction model, and use the output of the correction model as an updated label.

[0086] The first data unit is updated to replace the original label in the historical data with the updated label, obtain a new label, and replace the original label with the new label.

[0087] The second classification module is used to use the real-time data as the input of the trained classification model to obtain the category of poor molding.

[0088] This embodiment realizes intelligent monitoring and classification of yarn cone forming quality through the collaborative work of modules such as data collection, labeling, model building and training, classification judgment, and model correction. This method based on historical data and deep learning not only improves the accuracy and efficiency of classification, but also provides strong support for subsequent production optimization and quality control.

[0089] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for intelligent detection of molding defects, characterized in that: include: Data collection: obtain historical data and collect real-time data; Add tags: add tags to historical data to obtain the first data; First modeling: Building a classification model based on deep learning algorithms; First model training: using the first data to train the classification model, and recording the trained classification model as the first model; First classification: historical data is used as the input of the first model, and the probability of poor molding is output, which is recorded as the second data; Classification judgment: judge whether the second data meets expectations, if so, execute the second classification step; if not, execute the second model training step; Second model training: including similarity calculation, second modeling, updating labels and updating first data; Similarity calculation: calculate the similarity between the first data pairs to obtain the third data; Second modeling: Building a correction model based on deep learning algorithm; Update labels: Use the second data and the third data as inputs to the revised model to obtain updated labels; Updating the first data: replacing the original label in the first data with the updated label to obtain fourth data, using the fourth data as new first data, and executing the first model training step; Second classification: Use the real-time data as the input of the first model to obtain the category of poor molding.

2. The method for intelligent detection of poor forming according to claim 1, characterized in that: After executing the first model training step and before executing the first classification step, the method further includes: Adjust confidence: including initial settings, determining action space, determining state space, determining reward function and obtaining optimal confidence threshold; Initial settings: Set the initial confidence threshold; Determine the action space: Integrate the values ​​of all confidence thresholds of the classification model into the action space; Determine the state space: Integrate the performance indicators of the classification model, the characteristics of the first data, and the historical classification decisions into the state space; Determine the reward function: Set the reward function based on the performance indicators of the classification model; Obtain the optimal confidence threshold: Based on the reinforcement learning algorithm, select the optimal confidence threshold.

3. The method for intelligent detection of poor forming according to claim 1 or 2, characterized in that: After executing the step of training the second model and before executing the step of training the first model, the method further includes: Pruning: setting the weights in the first model that are below a preset weight threshold to zero to obtain a second model; Retraining: using the fourth data to train the second model to obtain a trained second model; Evaluation: Set the evaluation index of the second model, and regularly evaluate whether the performance of the trained second model meets expectations. If so, execute the termination step; if not, execute the iterative judgment step; Iteration judgment: judge whether the number of execution steps of pruning is greater than the preset threshold. If so, execute the termination step; if not, execute the pruning step and re-record the number of execution steps of pruning; Termination: Use the trained second model as the new first model and execute the steps of training the first model.

4. The method for intelligently detecting poor forming according to claim 3, characterized in that: After executing the termination step and before executing the first model training step, the method further includes: Obtaining prediction labels: inputting historical data into the first model obtained in the terminated step, obtaining the probability of the category to which the historical data belongs, recorded as the fifth data; Set the first loss function: Set the first loss function, and the calculation model is as follows: ; in, is the value of the first loss function; is the predicted probability of the i-th category in the fifth data; is the predicted probability of the i-th category in the second data; Loss judgment: Determine whether the value of the first loss function is less than the preset loss function threshold. If so, execute the first classification step; if not, execute the first model training step.

5. The method for intelligently detecting poor forming according to claim 4, characterized in that: After executing the step of setting the first loss function and before executing the step of loss judgment, the method further includes: Get the real label: take the label of the first data in the step of adding labels as the real label and record it as the sixth data; Setting the second loss function: Setting the second loss function, the calculation model is as follows: ; in, is the value of the second loss function; A is the number of poorly formed categories; is the true probability of the jth category in the sixth data; is the predicted probability of the jth category in the second data; Calculate the total loss: Set the total loss function and the calculation model is as follows: ; Among them, B is the value of the total loss function.

6. The method for intelligently detecting molding defects according to claim 5, characterized in that: After executing the step of calculating the total loss and before executing the step of determining the loss, the method further includes: Replacement: Use the value of the total loss function to replace the value of the first loss function, and perform the loss judgment step.

7. The method for intelligently detecting molding defects according to claim 6, characterized in that: The total loss is also calculated by the weight of the first loss function and the weight of the second loss function. The calculation model is as follows: ; Among them, B is the value of the total loss function; is the weight of the first loss function; is the weight of the second loss function.

8. The method for intelligently detecting poor forming according to claim 7, characterized in that: The weight of the first loss function Obtained through cross-validation method.

9. The intelligent detection method for poor forming according to claim 1 or 2, characterized in that: After executing the step of data collection and before executing the step of adding labels, the method further includes: Dimension determination: determine whether the historical data and / or real-time data is one-dimensional data. If so, perform the step of adding labels; if not, perform the step of reducing dimensions; Dimensionality reduction: Perform nonlinear dimensionality reduction on historical data and / or real-time data, record the historical data after dimensionality reduction as new historical data, and record the real-time data after dimensionality reduction as new real-time data.

10. An intelligent molding defect detection system, the detection system is applicable to the detection method according to any one of claims 1 to 9, characterized in that: include: Data collection module, used to obtain historical data and collect real-time data; A label adding module is used to add labels to historical data to obtain first data; The first modeling module is used to establish a classification model based on a deep learning algorithm; A first model training module is used to train a classification model using historical data and added labels; The first classification module is used to use the historical data as the input of the trained classification model and output the probability of the category of poor molding; The classification judgment module is used to judge whether the probability of the category of poor molding meets expectations; The second model training module includes a similarity calculation unit, a second modeling unit, an update label unit and an update first data unit; A similarity calculation unit, used for calculating the similarity between two first data; A second modeling unit is used to establish a correction model based on a deep learning algorithm; An updating label unit is used to use the category probability of poor molding and the similarity as inputs of the correction model to obtain an updated label; Updating the first data unit, used to replace the original label in the historical data with the updated label; The second classification module is used to use the real-time data as the input of the classification model to obtain the category of poor molding.

Citation Information

Patent Citations

  • A neural network pruning quantization method based on retraining

    CN109635936A

  • Method for identifying and processing label noise in deep learning

    CN112101328A

  • Training method of semi-supervised learning model, image processing method and equipment

    CN112183577A

  • Label prediction model training and sample screening method and device, and storage medium

    CN114418111A

  • Model pruning method and device, equipment and storage medium

    CN114943336A