Dye depletion rate prediction method and system based on multilayer perceptron
The dye depletion rate prediction model is constructed through a multi-layer perceptron algorithm, which solves the problem that dye depletion rate outliers in textile dyeing is difficult to detect in real time, and automatically supplement dyes are realized, which improves dye efficiency and product quality.
Patent Information
- Application Number
- CN202410959499.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-26
AI Technical Summary
During the dyeing process of traditional textiles, the outliers of dye depletion rate are difficult to detect and control in real time, resulting in poor product quality and relying on operator experience and low efficiency.
The agent model and dye depletion rate prediction model are constructed using a multi-layer perceptron regression algorithm, and predicted through the training data set to automatically supplement dyes and avoid pausing the detection of the dyeing process.
Real-time detection and control of dye depletion rate outliers is achieved, dyeing efficiency is improved, and the dependence on operator experience is reduced. The dye can be automatically added, ensuring the standard dyeing time.
Smart Images

Figure CN119028484A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of dyeing in the textile industry, and in particular to a method and system for predicting a dye exhaustion rate based on a multi-layer perceptron. Background Art
[0002] With the development of the textile industry, dyeing has become a cost-intensive process. The dyeing process not only requires a large amount of hot water and reactive dyes, but also requires a large amount of chemicals to maintain the dyeing conditions. In addition, the dyeing process also produces a large amount of wastewater, forming a serious environmental pollutant. Especially in the reactive dyeing process, the water temperature needs to be maintained between 60-120℃, which also leads to a large amount of energy consumption.
[0003] Generally speaking, the dyeing process consists of two stages. In the first stage, the fabric absorbs the dye; in the second stage, the dye is fixed to the fabric through covalent bonds. In the first adsorption stage, Na2SO4 is used to reduce the repulsion between the fiber surface and the anionic reactive dye to promote adsorption. In the second fixation stage, the dye is fixed to the fabric through Na2CO3 forming a covalent bond between the fabric and the dye.
[0004] However, in the textile dyeing process, due to reasons such as unreacted dye and dye loss, abnormal depletion rate values will appear, and the product quality is often not ideal.
[0005] The traditional solution is for the operator to pause the dyeing process, sample the fabric for testing, and add additional dye based on experience to compare the color with the target color. This is inefficient and relies on the operator's experience, and it is unable to detect and control abnormal values of the depletion rate in real time. Summary of the invention
[0006] In order to solve the technical problems that the traditional operator pauses the dyeing process, samples the fabric for inspection, and adds additional dye based on experience to compare the color with the target color, which is inefficient and relies on the operator's experience, and cannot detect and control depletion rate abnormal values in real time, the present invention provides a dye depletion rate prediction method and system based on a multi-layer perceptron.
[0007] The technical solution provided by the embodiment of the present invention is as follows:
[0008] First aspect:
[0009] An embodiment of the present invention provides a method for predicting a dye depletion rate based on a multi-layer perceptron, comprising:
[0010] S1: Collect characteristic conditions of multiple fabric samples during the dyeing process and construct an initial data set;
[0011] S2: preprocessing the initial data set;
[0012] S3: Construct a proxy model through a multi-layer perceptron regression algorithm;
[0013] S4: using the preprocessed initial data set as input of the proxy model to train the proxy model;
[0014] S5: Expanding the initial data set through the trained proxy model to obtain an expanded data set;
[0015] S6: Construct a dye depletion rate prediction model using a multi-layer perceptron regression algorithm;
[0016] S7: using the expanded data set as input of the dye depletion rate prediction model to train the dye depletion rate prediction model;
[0017] S8: predicting the dye depletion rate by using the trained dye depletion rate prediction model to obtain a dye depletion prediction value;
[0018] S9: When the current dyeing time does not reach the standard dyeing time, the missing amount is automatically supplemented according to the dye exhaustion prediction value, and dyeing is continued until the standard dyeing time is reached.
[0019] Second aspect:
[0020] An embodiment of the present invention provides a dye depletion rate prediction system based on a multi-layer perceptron, comprising: a memory and one or more processors;
[0021] One or more application programs are stored in the memory, and the one or more application programs are suitable for being executed by the one or more processors to implement the above-mentioned dye depletion rate prediction method based on multi-layer perceptron.
[0022] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0023] In the present invention, a proxy model is constructed through a multi-layer perceptron regression algorithm, and the initial data set is expanded through the trained proxy model, thereby avoiding the need to pause the dyeing process to sample and test the fabric, no longer relying on the operator's experience, and improving efficiency. A dye depletion rate prediction model is constructed through a multi-layer perceptron regression algorithm, and the dye depletion rate is predicted through the trained dye depletion rate prediction model, thereby achieving real-time detection and control of the prediction of depletion rate abnormalities, automatically supplementing the missing amount through the dye depletion prediction value, and continuing dyeing until the standard dyeing time is reached, thereby achieving automatic addition of additional dye without relying on experience to compare the color with the target color. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 A schematic diagram of a flow chart of a dye depletion rate prediction method based on a multi-layer perceptron provided in an embodiment of the present invention;
[0026] Figure 2 A schematic diagram of the structure of a proxy model network provided by an embodiment of the present invention;
[0027] Figure 3 A schematic diagram of a network structure of a dye depletion rate prediction model provided by an embodiment of the present invention;
[0028] Figure 4 A schematic diagram of the structure of a dye depletion rate prediction system based on a multi-layer perceptron provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0030] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0031] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0032] Reference Manual Attached Figure 1 , showing a flow chart of a dye depletion rate prediction method based on a multi-layer perceptron provided in an embodiment of the present invention.
[0033] The embodiment of the present invention provides a method for predicting a dye depletion rate based on a multi-layer perceptron. The method can be implemented by a dye depletion rate prediction device based on a multi-layer perceptron. The dye depletion rate prediction device based on a multi-layer perceptron can be a terminal or a server. The processing flow of the method for predicting a dye depletion rate based on a multi-layer perceptron can include the following steps:
[0034] S1: Collect characteristic conditions of multiple fabric samples during the dyeing process and construct an initial data set.
[0035] Among them, the characteristic conditions of each fabric sample include: time, temperature, Na2SO4 input and Na2CO3 input.
[0036] Specifically, 615 fabric samples were collected during the dyeing process, which described the time, temperature, Na2SO4 input and Na2CO3 input in detail. The time value was between 0 and 120 minutes, with an interval of 3 minutes. The temperature fluctuated according to certain set values during this time period. Three Na2SO4 inputs were collected in each fabric sample, specifically 10g, 30g and 50g. Five Na2CO3 inputs were collected at the same time, specifically 0g, 5g, 10g, 15g and 20g. These data were used as initial data to construct the initial data set.
[0037] Furthermore, the initial data set is divided into a training data set and a test data set according to a preset ratio.
[0038] Specifically, the initial data set is divided into a training data set and a test data set in a ratio of 7:3.
[0039] In the present invention, by collecting multiple combinations of time, temperature, Na2SO4 input and Na2CO3 input, it is ensured that the data set contains enough sample diversity and comprehensiveness. This helps the model to accurately predict the dye depletion rate under different conditions. The combination of different time, temperature and chemical input covers a wide range of experimental conditions, so that the model can be applied under a wide range of operating conditions, improving the adaptability and generalization ability of the model. Dividing the training data set and the test data set in a ratio of 7:3 can ensure that there are enough samples for model training, while retaining a certain number of samples for model verification. The sample size of the training data set is large, which helps to fully learn the model. The sample size of the test data set is moderate, which helps to effectively evaluate the model performance.
[0040] S2: Preprocess the initial dataset.
[0041] In a possible implementation, S2 specifically includes sub-steps S201 to S202:
[0042] S201: remove part of the data set in the initial data set.
[0043] Specifically, a part of the data set in the initial data set is removed, and the remaining data set after the part of the data set is removed contains 41 (time)×3 (Na2SO4)×4 (Na2CO3)=492 data elements.
[0044] S202: normalizing the initial data set after removing part of the data set by using the z-score normalization method:
[0045]
[0046] Among them, Z represents the normalized eigenvalue, σ represents the characteristic standard deviation, X represents the initial eigenvalue, μ represents the characteristic mean, N represents the total number of fabric samples, and X i represents the eigenvalue of the i-th fabric sample.
[0047] Among them, the z-score normalization method is a data standardization technique used to convert data into a standard normal distribution with a mean of 0 and a standard deviation of 1. The specific method is to subtract the mean of each data point and then divide it by the standard deviation of the data, so that the processed data is easy to compare and analyze on the same scale.
[0048] Specifically, the mean and standard deviation of all data in the initial data set after removing part of the data set are first calculated, and then the z-score normalization method is applied to each feature value of each data, and the data are scaled using the mean and standard deviation of each value of the same parameters to show a normal distribution with a mean of 0 and a standard deviation of 1.
[0049] In the present invention, removing part of the data set can help remove abnormal or unnecessary data points that may exist in the data set, thereby improving the quality and accuracy of the data. This helps the model avoid interference from noise and abnormal data during training and prediction, and improves the stability and reliability of the model. Using the z-score normalization method, data with different features can be converted into data with the same scale, that is, a standard normal distribution with a mean of 0 and a standard deviation of 1. This standardization method helps to eliminate the dimensional influence between different feature values, so that the influence weight of each feature on model training is more balanced, and the convergence speed and accuracy of the model are improved. The preprocessed data set helps to improve the generalization ability of the model, that is, the model's ability to predict new samples. By removing outliers and standardizing data, the model is more likely to learn the general laws and trends of the data, rather than just remembering the specific values of the training data, thereby effectively dealing with unknown input data.
[0050] S3: Construct a proxy model through the multi-layer perceptron regression algorithm.
[0051] Among them, the Multilayer Perceptron (MLP) regression algorithm is a model based on artificial neural networks, with multiple hidden layers and at least one output layer. It makes predictions by learning the complex nonlinear relationship between input features and target values, and is applicable to various continuous prediction problems. By introducing nonlinear transformations in the hidden layer through activation functions, MLP can capture complex patterns and features in the data, and optimize model parameters through the back-propagation algorithm, thereby achieving accurate prediction of the target variable.
[0052] It should be noted that the multi-layer perceptron regression algorithm includes an input layer, multiple hidden layers and an output layer.
[0053] Among them, the proxy model is a small-scale extended analysis model designed to simulate input and output properties similar to the actual model when the amount of original data is insufficient or the acquisition cost is high. In the dyeing process considered in the project, the various costs of measuring the depletion rate under characteristic conditions (time, temperature, Na2SO4 input and Na2CO3 input) limit the collection of data. Therefore, the data set is further expanded by building a proxy model.
[0054] Specifically, the SMNa2SO4 proxy model and the SMNa2CO3 proxy model were constructed through the multi-layer perceptron regression algorithm. The SMNa2SO4 proxy model was used as the Na2SO4 prediction model, and the SMNa2CO3 proxy model was used as the Na2CO3 prediction model.
[0055] It should be noted that, considering that the Na2CO3 concentration does not start from 0, the training data used by the SMNa2CO3 proxy model is the data after 40 minutes (40-120min), so the corresponding number of data elements is 27 (time) × 3 (Na, S04) × 4 (Na2CO3) = 324.
[0056] In a possible implementation, S3 specifically includes sub-steps S301 to S303:
[0057] S301: In an input layer, the preprocessed initial data set is used as input, wherein the number of feature neurons in the input layer is equal to the number of fabric samples in the preprocessed initial data set.
[0058] Specifically, the preprocessed initial data set, namely time, temperature, Na2SO4 input amount and Na2CO3 input amount, is used as input features and input into the input layer of the multilayer perceptron regression algorithm, and the number of feature neurons in the input layer is equal to the number of input features.
[0059] S302: In a hidden layer, a nonlinear transformation is performed through an activation function, and the hidden layer includes a first hidden layer, a second hidden layer, and a third hidden layer.
[0060] Specifically, three hidden layers are set, and each hidden layer has 100 neurons.
[0061] Furthermore, the first hidden layer and the second hidden layer use the ReLU activation function:
[0062] ReLU(x)=max(0,x)
[0063] Where ReLU(·) represents the ReLU activation function, and x represents the initial data set after preprocessing.
[0064] Among them, the ReLU (Rectified Linear Unit) activation function is a commonly used nonlinear function in deep learning. It converts the input value into a non-negative number: when the input is greater than zero, the output is equal to the input. When the input is less than or equal to zero, the output is zero. The ReLU function is simple and computationally efficient, which helps solve the gradient vanishing problem and enables the neural network to learn more complex features and patterns.
[0065] Furthermore, the third hidden layer uses the Sigmoid activation function:
[0066]
[0067] Where Sigmoid(·) represents the Sigmoid activation function.
[0068] Among them, the Sigmoid activation function is a commonly used nonlinear function that compresses the input value to a range between 0 and 1. Specifically, the output of the Sigmoid function is a smooth S-shaped curve, which approaches 1 when the input approaches positive infinity and approaches 0 when it approaches negative infinity. It is widely used in binary classification tasks in neural networks, such as logistic regression models, and in some scenarios where output probability is required.
[0069] S303: In the output layer, output the exhaustion rate curve.
[0070] Specifically, through the SMNa2SO4 proxy model and the SMNa2CO3 proxy model, the corresponding fitting data, namely the depletion rate curves of Na2SO4 and Na2CO3 at different times and temperatures, are output in the output layer.
[0071] In the present invention, the MLP regression algorithm is capable of handling the complex nonlinear relationship between the input features and the target variable. In the prediction of the dye depletion rate, features such as time, temperature, Na2SO4 input and Na2CO3 input may interact with each other and affect the consumption rate of the dye. The MLP model can learn the relationship between these complex features, thereby accurately predicting the depletion rate curve of the dye. By constructing a proxy model, a limited initial data set can be used to expand the data. Since the acquisition cost of the dye depletion rate data is high or time-consuming, the proxy model can learn the patterns and trends in the data set through training, and generate a large number of new data points, further enriching the training set, and improving the generalization ability and prediction accuracy of the model.
[0072] S4: Use the preprocessed initial dataset as the input of the proxy model to train the proxy model.
[0073] In a possible implementation, S4 specifically includes sub-steps S401 to S402:
[0074] S401: With the goal of minimizing the error between the predicted value and the actual value of the surrogate model, construct the MSE loss function:
[0075]
[0076] Where f represents the loss function, MSE represents the MSE loss function used for the surrogate model, and y i represents the actual value of the i-th fabric sample in the proxy model, represents the predicted value of the i-th fabric sample in the surrogate model, and n represents the total number of fabric samples in the surrogate model.
[0077] Among them, the mean squared error (MSE) loss function measures the average squared difference between the predicted value and the actual value, and is used to evaluate the accuracy of the model's prediction. By calculating the sum of the squares of the errors of each sample between the predicted value and the true value, the MSE loss function can quantify the error size of the model during the training process, and is usually used for regression problems in supervised learning.
[0078] S402: Using the Adam optimizer, adaptively adjust the learning rate and acceleration parameters of the proxy model to train the proxy model:
[0079]
[0080] m t =β1m t-1 +(1-β1)g t
[0081] Among them, θ trepresents the parameters of the proxy model at time step t, θ t-1 represents the parameters of the proxy model at the previous time step t-1, α represents the learning rate, represents the second-order moment estimate after correction of the bias for the surrogate model at time step t, ε represents a small constant for numerical stability, represents the first-order moment estimate after correction of the bias for the surrogate model at time step t, v t represents the second-order moment estimate for the surrogate model at time step t, β2 represents the second-order moment estimate attenuation coefficient, and v t-1 represents the second-order moment estimate used for the surrogate model at the previous time step t-1, g t represents the gradient for the surrogate model at time step t, represents the gradient operation, f represents the loss function, Indicates the gradient operation of the proxy model parameters at time step t, m t represents the first-order moment estimate for the surrogate model at time step t, β1 represents the first-order moment estimate attenuation coefficient, and m t-1 represents the first-order moment estimate used for the surrogate model at the previous time step t-1.
[0082] Among them, the Adaptive Moment Estimation optimizer (Adam) is an optimization algorithm that combines the first-order moment estimation (mean) and second-order moment estimation (variance) of the gradient, and is usually used to train neural networks. It calculates the exponential moving average and square exponential moving average of the gradient at each time step, and uses these moving averages to adjust the learning rate of each parameter to achieve the optimization effect of adaptive learning rate.
[0083] Furthermore, the trained SMNa2SO4 proxy model and SMNa2CO3 proxy model were tested and evaluated.
[0084] In the present invention, by minimizing the mean square error (MSE), the proxy model can accurately adjust parameters during the training process so that the error between the predicted value and the actual value is minimized. This loss function is commonly used in regression problems in supervised learning, and can effectively evaluate the prediction accuracy of the model, ensuring that the model's prediction ability for the dye depletion rate reaches the best state. The Adam optimizer combines the first-order moment estimation (mean) and the second-order moment estimation (variance) of the gradient, and can adaptively adjust the learning rate of each parameter. This optimization algorithm effectively balances the speed and direction of parameter updating, so that the proxy model can quickly converge to the optimal solution during the training process, improving the training efficiency and the generalization ability of the model. By training and testing the proxy model, a large number of prediction experiments can be carried out in a virtual environment, thereby reducing the cost and time of real experiments. This method not only saves resources, but also can quickly respond to production needs, optimize dyeing process design, and improve production efficiency and product quality.
[0085] S5: The initial data set is expanded through the trained proxy model to obtain an expanded data set.
[0086] In a possible implementation, S5 specifically includes sub-steps S501 to S503:
[0087] S501: Outputting a depletion rate curve through the trained proxy model.
[0088] S502: According to the output exhaustion rate curve, the independent data attributes of the fabric sample are subdivided to generate independent variable data.
[0089] S503: Expand the initial data set using the generated independent variable data to obtain an expanded data set.
[0090] Specifically, the three input amounts of Na2SO4 in the initial data set (10 g, 30 g, and 50 g) were expanded to 41 consecutive integer values (10, 11, 12, ..., 50). The four input amounts of Na2CO3 in the initial data set (5 g, 10 g, 15 g, and 20 g) were expanded to 16 consecutive integer values (5, 6, 7, ..., 20).
[0091] Furthermore, through this data expansion method, the data measurement obtained is:
[0092] dataNa2SO4: 41(time)×41(Na2SO4)×16(Na2CO3)=26896 groups,
[0093] dataNa2CO3: 27(time)×41(Na2SO4)×16(Na2CO3)=17612 groups.
[0094] Furthermore, the expanded data set is divided into a training data set and a test data set according to a preset ratio.
[0095] Specifically, the two obtained data sets (dataNa2SO4 and dataNa2CO4) are divided into training data sets and test data sets in a ratio of 7:3.
[0096] In the present invention, the Na2SO4 input and Na2CO3 input in the initial data set are subdivided and expanded by the depletion rate curve output by the proxy model. This method increases the continuous integer value range of the input variable, thereby expanding the diversity and coverage of the data. This is crucial for the generalization ability and prediction accuracy of the model because the model can be trained and tested under a wider range of input conditions. The expanded data set increases the number and diversity of training data, which helps to reduce the risk of overfitting and improve the generalization ability and stability of the model. More data samples can help the model better capture the complex relationship between the input variables and the output (dye depletion rate), thereby improving the accuracy and reliability of the prediction. Through the prediction and data expansion of the model, a large number of simulation experiments can be carried out in a virtual environment, reducing the cost and time consumption of real experiments. This method not only saves resources, but also can quickly optimize the dye depletion rate prediction model in a relatively short time, providing support for process optimization and product design.
[0097] S6: Construct a dye depletion rate prediction model through a multi-layer perceptron regression algorithm.
[0098] Specifically, the PMNa2SO4 dye depletion rate prediction model and the PMNa2CO3 dye depletion rate prediction model were constructed respectively through the multi-layer perceptron regression algorithm.
[0099] In a possible implementation, S6 specifically includes sub-steps S601 to S603:
[0100] S601: In an input layer, taking an expanded data set as input, wherein the number of feature neurons in the input layer is equal to the number of fabric samples in the expanded data set.
[0101] It should be noted that the two sets of data sets (dataNa2SO4 and dataNa2CO4) obtained are used as input features of the PMNa2SO4 dye depletion rate prediction model and the PMNa2CO3 dye depletion rate prediction model respectively.
[0102] S602: In a hidden layer, a nonlinear transformation is performed through an activation function, and the hidden layer includes a first hidden layer, a second hidden layer, and a third hidden layer.
[0103] The first and second hidden layers use the ReLU activation function:
[0104] ReLU(x′)=max(0,x)
[0105] Among them, x′ represents the expanded data set.
[0106] The third hidden layer uses the Sigmoid activation function:
[0107]
[0108] S603: In the output layer, output the dye depletion prediction value.
[0109] In the present invention, the expanded and segmented data set is used as input to fully utilize a large amount of sample data that covers a wider range of experimental conditions (different Na2SO4 and Na2CO4 concentrations). This helps the model learn and understand the complex relationship between the dye depletion rate and various input variables. By establishing an accurate prediction model, the number and cost of laboratory experiments can be reduced. The model can be simulated in a large number of virtual environments, thereby saving time and resources, while quickly optimizing the parameters and structure of the dye depletion rate prediction model.
[0110] S7: Using the expanded data set as input of the dye depletion rate prediction model, the dye depletion rate prediction model is trained.
[0111] In a possible implementation, S7 specifically includes sub-steps S701 to S702:
[0112] S701: With the goal of minimizing the error between the predicted value and the actual value of the dye depletion rate prediction model, construct an MSE loss function:
[0113]
[0114] Where f′ represents the loss function, MSE′ represents the MSE loss function for the dye depletion rate prediction model, and y i ′ represents the actual value of the i-th fabric sample in the dye depletion rate prediction model, represents the predicted value of the i-th fabric sample in the dye depletion rate prediction model, and n′ represents the total number of fabric samples in the dye depletion rate prediction model.
[0115] S702: Using the Adam optimizer, adaptively adjusting the learning rate and acceleration parameters of the dye depletion rate prediction model to train the dye depletion rate prediction model:
[0116]
[0117]
[0118] m′ t =β1m′ t-1 +(1-β1)g′ t
[0119] Among them, θ′ t represents the parameters of the dye depletion rate prediction model at time step t, θ′ t-1 represents the parameters of the dye depletion rate prediction model at the previous time step t-1, α represents the learning rate, represents the bias-corrected second-order moment estimate for the dye depletion rate prediction model at time step t, ε represents a small constant for numerical stability, represents the bias-corrected first-order moment estimate for the dye depletion rate prediction model at time step t, v′ t represents the second-order moment estimate used in the dye depletion rate prediction model at time step t, β2 represents the second-order moment estimate attenuation coefficient, and v′ t-1 represents the second-order moment estimate used in the dye depletion rate prediction model at the previous time step t-1, g′ t represents the gradient of the dye depletion rate prediction model at time step t, represents the gradient operation, f′ represents the loss function, represents the gradient calculation of the dye depletion rate prediction model parameters at time step t, m′ t represents the first-order moment estimate for the dye depletion rate prediction model at time step t, β1 represents the first-order moment estimate attenuation coefficient, and m′ t-1 represents the first-order moment estimate used in the dye depletion rate prediction model at the previous time step t-1.
[0120] Furthermore, the trained PMNa2SO4 dye depletion rate prediction model and PMNa2CO3 dye depletion rate prediction model were tested and evaluated.
[0121] In the present invention, by using the mean square error (MSE) loss function, the model can be gradually optimized during the training process, so that the average square difference between the predicted value and the actual observed value is minimized. This helps to ensure that the dye depletion rate prediction model has a good fit on the training set, thereby improving the accuracy and reliability of the prediction. The Adam optimizer combines the first-order moment estimate (mean) and the second-order moment estimate (variance) of the gradient, and can dynamically adjust the learning rate of each parameter. This allows the model to quickly converge to the local optimal solution, and has adaptability during the parameter update process, can effectively cope with the situation of different samples and noise, and improves training efficiency and stability.
[0122] S8: Predicting the dye depletion rate through the trained dye depletion rate prediction model to obtain a dye depletion prediction value.
[0123] Specifically, the trained PMNa2SO4 dye depletion rate prediction model and PMNa2CO3 dye depletion rate prediction model are used to predict the abnormal values of fabric dyeing depletion rate.
[0124] In the present invention, the prediction model can predict the change of dye depletion rate in real time during the actual dyeing process. This enables production personnel to instantly identify potential depletion anomalies during the dyeing process and take timely measures to avoid product quality degradation or output loss. The data support and prediction results provided by the prediction model can help management make more forward-looking and strategic production decisions. Through reasonable production scheduling and resource allocation, the overall operational efficiency and production management are optimized.
[0125] S9: When the current staining time does not reach the standard staining time, the missing amount is automatically supplemented according to the dye exhaustion prediction value, and the staining is continued until the standard staining time is reached.
[0126] In the present invention, the consumption of required dyes can be accurately predicted by the dye depletion prediction model, so as to avoid excessive use of dyes or waste of resources. This precise dye management not only saves costs, but also reduces the impact on the environment, which is in line with the production concept of sustainable development. Automatic replenishment of the missing amount can avoid interruption of the dyeing process due to dye depletion. The production process does not require manual intervention or waiting for dye replenishment, thereby greatly reducing downtime and improving production efficiency and capacity utilization.
[0127] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0128] In the present invention, a proxy model is constructed through a multi-layer perceptron regression algorithm, and the initial data set is expanded through the trained proxy model, thereby avoiding the need to pause the dyeing process to sample and test the fabric, no longer relying on the operator's experience, and improving efficiency. A dye depletion rate prediction model is constructed through a multi-layer perceptron regression algorithm, and the dye depletion rate is predicted through the trained dye depletion rate prediction model, thereby achieving real-time detection and control of the prediction of depletion rate abnormalities, automatically supplementing the missing amount through the dye depletion prediction value, and continuing dyeing until the standard dyeing time is reached, thereby achieving automatic addition of additional dye without relying on experience to compare the color with the target color.
[0129] Reference Manual Attached Figure 4 , showing a structural schematic diagram of a dye depletion rate prediction system based on a multi-layer perceptron provided by the present invention.
[0130] The present invention also provides a dye depletion rate prediction system 30 based on a multi-layer perceptron, comprising: a memory 303 and one or more processors 301 .
[0131] One or more application programs are stored in the memory 303 , and the one or more application programs are suitable for being executed by the one or more processors 301 to implement the dye depletion rate prediction method based on a multi-layer perceptron described in the method embodiment.
[0132] The dye depletion rate prediction system 30 based on multi-layer perceptron includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, for example, through a bus 302.
[0133] The structure of the dye depletion rate prediction system 30 based on the multi-layer perceptron does not constitute a limitation to the embodiment of the present invention.
[0134] Processor 301 may be a CPU, a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0135] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI bus or an EISA bus, etc. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0136] The memory 303 can be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, a CD-ROM or other optical disk storage, an optical disk storage (including a compressed optical disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0137] It should be noted that the dye depletion rate prediction system 30 based on the multi-layer perceptron can implement the above-mentioned dye depletion rate prediction method based on the multi-layer perceptron, and can achieve the same or similar technical effects. To avoid repetition, the present invention will not be repeated.
[0138] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0139] In the present invention, a proxy model is constructed through a multi-layer perceptron regression algorithm, and the initial data set is expanded through the trained proxy model, thereby avoiding the need to pause the dyeing process to sample and test the fabric, no longer relying on the operator's experience, and improving efficiency. A dye depletion rate prediction model is constructed through a multi-layer perceptron regression algorithm, and the dye depletion rate is predicted through the trained dye depletion rate prediction model, thereby achieving real-time detection and control of the prediction of depletion rate abnormalities, automatically supplementing the missing amount through the dye depletion prediction value, and continuing dyeing until the standard dyeing time is reached, thereby achieving automatic addition of additional dye without relying on experience to compare the color with the target color.
[0140] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which can be loaded and executed by a processor to implement the dye depletion rate prediction method based on a multilayer perceptron as described in the first aspect.
[0141] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0142] There are a few points to note:
[0143] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.
[0144] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of the layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.
[0145] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.
[0146] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A dye depletion rate prediction method based on multi-layer perceptron, characterized in that: include: S1: Collect characteristic conditions of multiple fabric samples during the dyeing process and construct an initial data set; S2: preprocessing the initial data set; S3: Construct a proxy model through a multi-layer perceptron regression algorithm; S4: using the preprocessed initial data set as input of the proxy model to train the proxy model; S5: Expanding the initial data set through the trained proxy model to obtain an expanded data set; S6: Construct a dye depletion rate prediction model using a multi-layer perceptron regression algorithm; S7: using the expanded data set as input of the dye depletion rate prediction model to train the dye depletion rate prediction model; S8: predicting the dye depletion rate by using the trained dye depletion rate prediction model to obtain a dye depletion prediction value; S9: When the current dyeing time does not reach the standard dyeing time, the missing amount is automatically supplemented according to the dye exhaustion prediction value, and dyeing is continued until the standard dyeing time is reached.
2. The dye depletion rate prediction method based on multi-layer perceptron according to claim 1 is characterized in that: The characteristic conditions of each of the fabric samples included: time, temperature, Na2SO4 input and Na2CO3 input.
3. The dye depletion rate prediction method based on multi-layer perceptron according to claim 1 is characterized in that: According to a preset ratio, the initial data set and the expanded data set are divided into a training data set and a test data set respectively.
4. The dye depletion rate prediction method based on multi-layer perceptron according to claim 1 is characterized in that: The S2 specifically includes: S201: removing part of the data set in the initial data set; S202: normalizing the initial data set after removing part of the data set by using the z-score normalization method: Among them, Z represents the normalized eigenvalue, σ represents the characteristic standard deviation, X represents the initial eigenvalue, μ represents the characteristic mean, N represents the total number of fabric samples, and X i represents the eigenvalue of the i-th fabric sample.
5. The dye depletion rate prediction method based on multi-layer perceptron according to claim 1 is characterized in that: The multi-layer perceptron regression algorithm includes an input layer, multiple hidden layers and an output layer, and S3 specifically includes: S301: In the input layer, taking the preprocessed initial data set as input, wherein the number of feature neurons in the input layer is equal to the number of fabric samples in the preprocessed initial data set; S302: performing a nonlinear transformation in the hidden layer by using an activation function, the hidden layer including a first hidden layer, a second hidden layer and a third hidden layer; The first hidden layer and the second hidden layer use the ReLU activation function: ReLU(x)=max(0,x) Where ReLU(·) represents the ReLU activation function, and x represents the initial data set after preprocessing; The third hidden layer uses the Sigmoid activation function: Where Sigmoid(·) represents the Sigmoid activation function; S303: In the output layer, output a depletion rate curve.
6. The dye depletion rate prediction method based on multi-layer perceptron according to claim 1 is characterized in that: The S4 specifically includes: S401: With the goal of minimizing the error between the predicted value and the actual value of the proxy model, construct an MSE loss function: Where f represents the loss function, MSE represents the MSE loss function used for the surrogate model, and y i represents the actual value of the i-th fabric sample in the proxy model, represents the predicted value of the i-th fabric sample in the surrogate model, and n represents the total number of fabric samples in the surrogate model; S402: Using the Adam optimizer, adaptively adjusting the learning rate and acceleration parameters of the proxy model to train the proxy model: m t =β1m t-1 +(1-β1)g t Among them, θ t represents the parameters of the proxy model at time step t, θ t-1 represents the parameters of the proxy model at the previous time step t-1, α represents the learning rate, represents the second-order moment estimate after correction of the bias for the surrogate model at time step t, ε represents a small constant for numerical stability, represents the first-order moment estimate after correction of the bias for the surrogate model at time step t, v t represents the second-order moment estimate for the surrogate model at time step t, β2 represents the second-order moment estimate attenuation coefficient, and v t-1 represents the second-order moment estimate used for the surrogate model at the previous time step t-1, g t represents the gradient for the surrogate model at time step t, represents the gradient operation, f represents the loss function, Indicates the gradient operation of the proxy model parameters at time step t, m t represents the first-order moment estimate for the surrogate model at time step t, β1 represents the first-order moment estimate attenuation coefficient, and m t-1 represents the first-order moment estimate used for the surrogate model at the previous time step t-1.
7. The dye depletion rate prediction method based on multi-layer perceptron according to claim 1 is characterized in that: The S5 specifically includes: S501: Outputting a depletion rate curve through the trained proxy model; S502: According to the output exhaustion rate curve, the independent data attributes of the fabric sample are subdivided to generate independent variable data; S503: Expand the initial data set using the generated independent variable data to obtain an expanded data set.
8. The dye depletion rate prediction method based on multi-layer perceptron according to claim 1 is characterized in that: The S6 specifically includes: S601: In the input layer, taking the expanded data set as input, wherein the number of feature neurons in the input layer is equal to the number of fabric samples in the expanded data set; S602: performing a nonlinear transformation in the hidden layer by using an activation function, the hidden layer including a first hidden layer, a second hidden layer and a third hidden layer; The first hidden layer and the second hidden layer use the ReLU activation function: ReLU(x′)=max(0,x′) Among them, x′ represents the expanded data set; The third hidden layer uses the Sigmoid activation function: S603: In the output layer, output the dye depletion prediction value.
9. The dye depletion rate prediction method based on multi-layer perceptron according to claim 1 is characterized in that: The S7 specifically includes: S701: With the goal of minimizing the error between the predicted value and the actual value of the dye depletion rate prediction model, construct an MSE loss function: Where f′ represents the loss function, MSE′ represents the MSE loss function for the dye depletion rate prediction model, and y′ i represents the actual value of the i-th fabric sample in the dye depletion rate prediction model, represents the predicted value of the i-th fabric sample in the dye depletion rate prediction model, and n′ represents the total number of fabric samples in the dye depletion rate prediction model; S702: Using an Adam optimizer, adaptively adjusting a learning rate and an acceleration parameter of the dye depletion rate prediction model to train the dye depletion rate prediction model: m′ t =β1m′ t-1 +(1-β1)g′ t Among them, θ′ t represents the parameters of the dye depletion rate prediction model at time step t, θ′ t-1 represents the parameters of the dye depletion rate prediction model at the previous time step t-1, α represents the learning rate, represents the bias-corrected second-order moment estimate for the dye depletion rate prediction model at time step t, ε represents a small constant for numerical stability, represents the bias-corrected first-order moment estimate for the dye depletion rate prediction model at time step t, v′ t represents the second-order moment estimate used in the dye depletion rate prediction model at time step t, β2 represents the second-order moment estimate attenuation coefficient, and v′ t-1 represents the second-order moment estimate used in the dye depletion rate prediction model at the previous time step t-1, g′ t represents the gradient of the dye depletion rate prediction model at time step t, represents the gradient operation, f′ represents the loss function, represents the gradient calculation of the dye depletion rate prediction model parameters at time step t, m′ t represents the first-order moment estimate for the dye depletion rate prediction model at time step t, β1 represents the first-order moment estimate attenuation coefficient, m′ t-1 represents the first-order moment estimate used in the dye depletion rate prediction model at the previous time step t-1.
10. A dye depletion rate prediction system based on multi-layer perceptron, characterized in that: include: memory and one or more processors; One or more application programs are stored in the memory, and the one or more application programs are suitable for being executed by the one or more processors to implement the dye depletion rate prediction method based on a multi-layer perceptron according to any one of claims 1 to 9.
Citation Information
Cited By
Combination optimization method for yarn combination weaving parameters
CN120611622A
Training method and device of prediction model, prediction method and device, medium and electronic equipment
CN120705587A
