A one-time simultaneous dyeing method for a cotton-polyester composite fabric
Patent Information
- Application Number
- CN202610707706.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-21
- Publication Date
- 2026-10-20
AI Technical Summary
[0004]目前,行业内对棉涤复合面料的主流染色方法为“两浴两步法”,即先在中性/弱酸性条件下用分散染料高温染涤纶,排液后经还原清洗,再更换染料,在碱性条件下用活性染料染棉并固色,该方法虽工艺成熟,但存在工艺流程冗长、能耗水耗巨大、废水排放量多、生产效率低下等显著缺点
上述方法将传统的“两浴两步法”合并为“一次性同浴”完成,节省了一道染色、排液、清洗的完整流程,直接导致水耗、蒸汽能耗、电耗综合降低,从而节约了能耗,AI精准的配方预测避免了因试色、修色造成的染料浪费,提高了染料利用率,通过AI颜色配方预测模型精准计算染料用量,并结合优化的工艺温度,确保了最终产品色差(ΔE)小于1.0,各项色牢度均达4级以上,产品质量稳定且优异。
Smart Images

Figure FT_1
Abstract
Description
Technical Field
[0001] This invention relates to the field of textile printing and dyeing, and more specifically, to a one-time co-bath dyeing method for cotton-polyester composite fabrics. Background Technology
[0002] Cotton-polyester composite fabrics are widely used in the textile and apparel industry because they combine the comfort and breathability of cotton with the durability and abrasion resistance of polyester.
[0003] Due to the significant differences in physical structure and chemical properties between cotton and polyester fibers, the applicable dyes and dyeing processes are drastically different. Polyester fibers have a dense structure and are highly hydrophobic, typically requiring dyeing with disperse dyes under high-temperature (around 130℃) and weakly acidic conditions; while cotton fibers are hydrophilic, usually requiring dyeing with reactive dyes under alkaline conditions and color fixing with alkali agents.
[0004] Currently, the mainstream dyeing method for cotton-polyester composite fabrics in the industry is the "two-bath two-step method". This method involves first dyeing polyester with disperse dyes at high temperature under neutral / weakly acidic conditions, then draining the liquid and washing it by reduction. Next, the dye is changed, and cotton is dyed with reactive dyes under alkaline conditions and then fixed. Although this method is a mature technology, it has significant drawbacks such as a long process flow, huge energy and water consumption, large wastewater discharge, and low production efficiency.
[0005] Therefore, this application proposes a one-time co-bath dyeing method for cotton-polyester composite fabrics to solve the above problems. Summary of the Invention
[0006] To address the shortcomings of existing technologies, the present invention aims to provide a one-time co-bath dyeing method for cotton-polyester composite fabrics.
[0007] The above-mentioned technical objective of this invention is achieved through the following technical solution: a one-time same-bath dyeing method for cotton-polyester composite fabrics, comprising the following steps, S1. Dye liquor preparation: Disperse dye, reactive dye, composite pH adjuster and fiber swelling aid are added to the dyeing vat simultaneously, water medium is injected and stirred to form a homogeneous dye liquor; the composite pH adjuster contains a heat-sensitive acidic component that can decompose and produce gas during the heating process; the fiber swelling aid is an environmentally friendly polar organic solvent. S2, Staged staining: including, S2.1 First stage heat preservation: The cotton-polyester composite fabric is immersed in the dye solution prepared in step S1, and the dye solution is heated to the first heat preservation temperature at the first heating rate and kept warm. In this stage, the active dye is adsorbed on the cotton fibers in the cotton-polyester composite fabric, and the fiber swelling agent swells the polyester fibers in the cotton-polyester composite fabric. S2.2, Second stage heating and pH conversion: After completing stage S2.1, the dye liquor is heated to the second holding temperature at the second heating rate. During this heating process, the composite pH regulator is decomposed by heat, causing the dye pH to drop to the weakly acidic range on its own. S2.3, Third stage heat preservation: Heat preservation is carried out at the second heat preservation temperature to promote the dyeing of the disperse dye onto the swollen polyester fibers; S3. Alkaline fixing and purification: After completing step S2, the dye is cooled to the alkaline fixing temperature range, the alkaline fixing agent is slowly added, and the pH of the system is adjusted to the alkaline range for heat preservation. This promotes the covalent bonding reaction between the reactive dye and the cotton fiber to complete the fixing reaction. At the same time, the disperse dye adhering to the surface of the cotton fiber and the polyester fiber is hydrolyzed and removed from the fiber surface. S4. Post-treatment: After color fixing, the dyed fabric is washed with water, soaped and dried to finally obtain the dyed finished product. The first insulation temperature in step S2.1 and the second insulation temperature in step S2.3 are determined collaboratively by an AI temperature collaborative optimization model. The AI temperature collaborative optimization model is trained by a multi-task learning algorithm with fabric weight XG and polyester content percentage XP as input features, and the optimal first insulation temperature YT1 and the optimal second insulation temperature YT2 as collaborative prediction targets.
[0008] The present invention is further configured such that the method for establishing the AI temperature collaborative optimization model includes: Data acquisition: Extract multiple valid records from the historical production database. Each record contains input variables: fabric weight XG and polyester content percentage XP; and output variables: optimal first insulation temperature YT1 and optimal second insulation temperature YT2. Model training: The dataset is divided into training set and test set according to the proportion. The training set data is used to train a multi-output machine learning regression algorithm. The fabric weight XG and polyester content percentage XP are used as input features. The optimal first insulation temperature YT1 and the optimal second insulation temperature YT2 are used as collaborative prediction targets. By minimizing the multi-task loss function, the model parameters are iteratively optimized to obtain the AI temperature collaborative optimization model. Temperature prediction: The current weight (G) of the fabric to be dyed is used. new And the percentage of polyester content P new The input is fed into the trained AI temperature co-optimization model, and the model simultaneously outputs the first holding temperature T1 used in step S2.1 of this staining process. new and the second heat preservation temperature T2 in step S2.3 new .
[0009] The present invention is further configured such that the concentration ratio of disperse dye to reactive dye in step S1 is determined by the following method: A color formula prediction model is constructed, and its establishment method includes: Dyeing Database Construction: Collect historical successful dyeing cases and construct a historical successful dyeing case database. Each data record includes: the CIEL, a, b values Lin, ain, bin of the target color, as well as the concentration of disperse dye Cdisp and reactive dye Creact actually used to achieve the color and verified by the colorimeter. Wherein, Lin, ain, and bin are the lightness value, red-green value, and yellow-blue value of the target color in the CIELAB color space, respectively; Nonlinear mapping learning: The color values Lin, ain, and bin in the database are used as input features, and the dye concentration ratios Cdisp and Creact are used as output labels. The input is fed into a multilayer perceptron neural network for supervised learning. The network learns the complex nonlinear mapping relationship between the color space and the dye concentration space through the backpropagation algorithm. Formula generation: Input the target color values L_target, a_target, and b_target of this production order into the trained color formula prediction model. The model directly outputs the recommended disperse dye concentration Cdisprec and reactive dye concentration Creactrec.
[0010] The present invention is further configured such that the method for constructing the historical production database or the historical successful staining case database includes: Data entry: Through the manual entry interface or automatic data acquisition interface of the database management system, the confirmed qualified production work order data is persistently stored in the designated table of the relational database; Record generation: The generation rule for each record is as follows: Whenever a dyeing batch is confirmed by quality inspection to have a color difference ΔE < 1.0 and all color fastness grades reach level 4 or above, a record generation operation is triggered, and all fabric parameters, process parameters and result indicators used in the batch are automatically associated and stored in the database. Optimal data filtering: Periodically execute database maintenance scripts to filter and clean historical records based on predefined optimization objective functions; The optimization objective function is: F = k1·(1 / ΔE) + k2·S in: ΔE is the CIELAB color difference between the measured color difference value and the target color difference value of the dyeing batch represented by this historical record; S represents the energy-saving score of the dyeing batch represented by this historical record, and its value is inversely proportional to the energy consumption per unit output during the production process of this batch. k1 and k2 are pre-defined weighting coefficients used to weigh the importance of color accuracy and energy consumption in the optimization objective, respectively, and satisfying k1>0 and k2>0. Only records with function values F higher than a set threshold Q are retained to form the optimal coloring dataset for model training.
[0011] The present invention is further configured such that: the heat-sensitive acidic component in the composite pH regulator is an organic acid ester compound, wherein the organic acid ester compound is one or more of methyl formate, ethyl formate, methyl acetate, ethyl acetate or diethyl oxalate.
[0012] The present invention is further configured such that the fiber swelling agent is one or more of benzyl alcohol, methyl salicylate or N-cyclohexylpyrrolidone.
[0013] The present invention is further configured such that: in step S3, the alkaline fixing temperature range is 60-70℃, and "adjusting the pH of the system to the alkaline range" means adjusting the pH value of the dye to the range of 10.5-11.5.
[0014] In summary, the present invention has the following beneficial effects: The above method combines the traditional "two-bath, two-step method" into a "one-time, one-bath" process, saving a complete process of dyeing, draining, and rinsing. This directly leads to a comprehensive reduction in water consumption, steam energy consumption, and electricity consumption, thereby saving energy. AI's precise formula prediction avoids dye waste caused by color testing and correction, improving dye utilization. By accurately calculating the amount of dye used through the AI color formula prediction model and combining it with optimized process temperature, it ensures that the final product's color difference (ΔE) is less than 1.0, and all color fastness grades reach level 4 or above, resulting in stable and excellent product quality. Attached Figure Description
[0015] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0016] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0017] A one-time same-bath dyeing method for cotton-polyester composite fabrics, such as Figure 1 As shown, its core intelligence relies on the construction of two databases: a historical production database and a historical successful staining case database. The following examples first describe in detail the database construction process.
[0018] The establishment of a historical production database includes the following steps: 1. Database system setup A MySQL relational database was selected, and a database instance named "ProductionHistoryDB" was created. The core data table "OptimalDyeingProcesses" was designed, containing the following fields: Batch ID (primary key), Fabric Weight (float, g / m²), Polyester Content (float, %), First Hold Temp (float, °C), Second Hold Temp (float, °C), Measured Color Difference (DeltaE, float), Energy Consumption per Unit Output (float, kW·h / kg), Fastness Grade (float), and Record Generation Time (datetime).
[0019] 2. Data entry mechanism Developing a database management system (DBMS) includes: Manual input interface: Used by quality inspectors to input test results such as color fastness and color difference; Automatic data acquisition interface: It interfaces with the dyeing machine control system via the OPC protocol to automatically collect temperature parameters and energy consumption data; Fabric parameter import interface: Supports synchronization of basic information such as fabric weight and composition ratio from ERP system.
[0020] 3. Record generation rules Set automatic trigger conditions: When the dyeing batch is completed and the quality inspection confirms that "color difference ΔE < 1.0 and all color fastness grades reach level 4 or above", the system will automatically trigger the record generation process. Execute the data association program: automatically associate the fabric parameters (weight, polyester content), process parameters (temperature at each stage), and result indicators (color difference, color fastness, energy consumption) of this batch; Generate immutable batch records and store them in the "OptimalDyeingProcesses" table.
[0021] 4. Optimal data filtering mechanism Deploy weekly database maintenance scripts to achieve the following: Calculate the objective function value for each record: F = k1·(1 / ΔE) + k2·S Where: k1=0.6, k2=0.4 (weighting coefficients can be adjusted according to production needs) S represents the energy-saving score, calculated as: S = Baseline energy consumption / Actual energy consumption of this batch (Baseline energy consumption is set to the industry average). Set the filtering threshold Q=0.85, retain only records with F>0.85, and mark the filtered records as "training-level data" for training the AI temperature co-optimization model.
[0022] The construction of a database of historical successful staining cases includes the following steps: 1. Database system setup A PostgreSQL relational database instance named "ColorMatchingCasesDB" was created, and the core data table "SuccessfulColorFormulas" was designed, containing the following fields: Case ID (primary key), Target color L value (TargetL, float), Target color a value (TargetA, float), Target color b value (TargetB, float), Disperse dye concentration (Cdisp, float, %owf), Reactive dye concentration (Creact, float, %owf), Fabric weight (FabricWeight, float, g / m²), Polyester content percentage (PolyesterContent, float, %), Measured color difference value (DeltaE, float), Color fastness grade (FastnessGrade, float), Energy consumption per unit output (EnergyConsumption, float, kW·h / kg), and Record generation time (RecordTime, datetime).
[0023] 2. Data entry mechanism Develop a dedicated data acquisition system, including: Color parameter acquisition module: Connects to a colorimeter (such as X-Rite Ci7800) via USB interface to automatically read CIELAB values; Dye formulation input module: Links to electronic scale data and automatically records the actual concentrations of disperse and reactive dyes; Process parameter synchronization interface: Synchronizes fabric parameters and energy consumption data from historical production database; Manual review entry: Allows technicians to add notes and special process descriptions.
[0024] 3. Record generation rules Set trigger conditions: When the dyeing batch is confirmed by quality inspection to have "color difference ΔE < 1.0 and all color fastness grades reach level 4 or above", the case record generation process will be automatically started. Perform a color-formulation association procedure: establish a mapping relationship between the target color value (L, a, b) and the actual dye concentration used (disperse dye, reactive dye); Automatically associate the fabric parameters of this batch, generate a complete case record and save it to the "SuccessfulColorFormulas" table.
[0025] Optimal data filtering mechanism Deploy a screening script that runs every two weeks to achieve the following: Calculate the objective function value for each record: F = k1·(1 / ΔE) + k2·S Where: k1=0.7, k2=0.3 S represents the energy-saving score, where S = baseline energy consumption / actual energy consumption of this batch (the baseline energy consumption is set to the industry average). Set the screening threshold Q=0.9 (higher than the production database to ensure formula accuracy). The filtered records are categorized and labeled according to color system (red, yellow, blue, black, etc.) for use in training the color recipe prediction model.
[0026] After establishing the aforementioned historical production database and historical successful dyeing case database, an AI temperature collaborative optimization model is then built. The method for building this model is as follows: I. Data Collection: Data is collected from the core data table ("OptimalDyeingProcesses") in the existing historical production database. Only valid records that have been processed by the optimal data filtering mechanism and marked as "training-level data" are collected. These records ensure high data quality, meaning that the corresponding production batches perform well in terms of color difference, color fastness, and energy consumption. Each record must contain all of the following fields: Input variables (features): Fabric weight (XG): The unit is usually g / m² (grams per square meter); Polyester content percentage (XP): Unit is %.
[0027] Output variables (target labels): Optimal first holding temperature (YT1): The unit is ℃, which corresponds to the critical temperature of the first stage in the dyeing process; Optimal second holding temperature (YT2): The unit is ℃, which corresponds to the critical temperature of the second stage in the dyeing process.
[0028] II. Model training includes the following steps: Step 1: Data cleaning, checking and handling outlier data with missing values or obvious errors.
[0029] Step 2: Data standardization. The input variables extracted from the historical production database—fabric weight (XG) and polyester content percentage (XP)—are standardized. Standardization method: The Z-Score standardization method is used to transform the original data into a standard normal distribution with a mean of 0 and a standard deviation of 1; The calculation formula is as follows: X_scaled=(X-μ) / σ; X represents the original value of a feature (i.e., the original value of XG or XP).
[0030] μ represents the arithmetic mean of the feature on the training set.
[0031] σ represents the standard deviation of the feature on the training set.
[0032] X_scaled represents the new value after standardization.
[0033] Implementation steps: a. Calculate statistics: Use only the training set data to calculate the mean (μ_XG, μ_XP) and standard deviation (σ_XG, σ_XP) for each feature.
[0034] b. Perform the transformation: Using the mean and standard deviation calculated above, perform Z-Score standardization transformation on the XG and XP features in the entire dataset (including the training set and the test set).
[0035] c. Parameter Storage: The calculated mean (μ) and standard deviation (σ) are persistently stored as standardized parameters. When the model is put into production (i.e., in the temperature prediction stage), these parameters from the training set must be used to perform the exact same standardized transformation on the new input features (Gnew, Pnew) to ensure the consistency of data distribution.
[0036] Step 3: Dataset partitioning. The preprocessed complete dataset (including cleaning, association, and standardization) is randomly partitioned in an 8:2 ratio.
[0037] Specific steps: Use the `train_test_split` function from the Python machine learning library scikit-learn, set the parameter `test_size=0.2`, and fix the random seed `random_state=42` to ensure the reproducibility of the results.
[0038] The data was divided into two parts: 80% was used as the training set to drive the model to learn the intrinsic mapping relationship between fabric parameters and temperature; and 20% was used as the test set to objectively and fairly evaluate the model's generalization prediction ability for unseen data after training, thus preventing overfitting.
[0039] Step 4: Algorithm selection. In this embodiment of the invention, the multi-output random forest regression algorithm is selected as the base model. This algorithm naturally supports multi-objective regression tasks by constructing and integrating multiple decision trees. It can effectively capture the nonlinear relationship between features and multiple outputs, and is not sensitive to hyperparameters and has stable training.
[0040] Specific training process: Input and Objective: The standardized fabric weight (XG_scaled) and polyester content percentage (XP_scaled) from the training set are used as the input feature matrix. The corresponding optimal first insulation temperature (YT1) and optimal second insulation temperature (YT2) are used as the collaborative prediction objective matrix.
[0041] Model initialization: Using the MultiOutputRegressor wrapper from the scikit-learn library, with the internal base estimator set to RandomForestRegressor(n_estimators=200, max_depth=15), a multi-output random forest model with 200 decision trees and a maximum depth of 15 is constructed.
[0042] Loss Function and Optimization: The training process automatically iteratively optimizes the model parameters by minimizing the multi-task loss function. This loss function is specifically defined as the sum of the mean squared errors (MSEs) of the two temperature predictions, and its mathematical expression is: Loss=MSE(YT1_pred,YT1_true)+MSE(YT2_pred,YT2_true) Here, YT1_pred and YT2_pred are the model's predicted temperatures for the first and second insulation periods, while YT1_true and YT2_true are the actual optimal temperature values from the historical database. The algorithm minimizes this total loss through gradient descent or out-of-bag error (OOBError) calculations, thereby simultaneously optimizing the prediction accuracy of both temperatures.
[0043] Step 5: Model evaluation. After training is complete, the model performance is comprehensively evaluated using the reserved test set.
[0044] Evaluation indicators: Indicator 1: Mean Absolute Error: The MAE of the model's predictions of the first and second insulation temperatures, expressed in °C, directly reflects the average temperature difference between the predicted and actual values.
[0045] The MAE calculation is performed independently for the two prediction tasks: the first insulation temperature (YT1) and the second insulation temperature (YT2). The specific calculation implementation is as follows: Basic concepts of computation: YT1_true: The true first insulation temperature (unit: °C) corresponding to the *i*th sample in the test set.
[0046] YT1_pred: The model's predicted first insulation temperature (in °C) for the *i*th sample in the test set.
[0047] YT2_true: The true second insulation temperature (unit: °C) corresponding to the *i*th sample in the test set.
[0048] YT2_pred: The model's predicted second insulation temperature (in °C) for the *i*th sample in the test set.
[0049] n: The total number of samples in the test set.
[0050] Calculation formula: For any temperature task (taking the first insulation temperature YT1 as an example), the formula for calculating its MAE is: MAE(YT1)=(1 / n)*Σ|YT1_true_i-YT1_pred_i| |YT1_true_i-YT1_pred_i| (Absolute Error): This is the absolute value of the difference between the predicted value and the true value of the *i*th sample. This calculation avoids the cancellation of positive and negative errors and can truly reflect the magnitude of the prediction error for each sample.
[0051] Σ: Summation symbol, indicating the summation of the absolute errors of all *n* samples in the test set.
[0052] (1 / n): Calculate the average value to obtain the mean of the absolute errors of all samples, i.e., the mean absolute error.
[0053] Similarly, the formula for calculating the MAE of the second insulation temperature YT2 is: MAE(YT2)=(1 / n)*Σ|YT2_true_i-YT2_pred_i| Calculation process and explanation: Calculate MAE(YT1) and MAE(YT2) respectively.
[0054] Indicator Explanation: MAE=0: This indicates that the model's predictions are "perfect," and all predicted values are completely consistent with the actual values.
[0055] MAE>0: Its value directly reflects the average temperature difference between the predicted and actual values. The unit of MAE is degrees Celsius (°C), which has a clear physical meaning.
[0056] For example, if the calculated MAE(YT1) = 1.5℃, it means that the model's prediction of the first insulation temperature deviates from its corresponding true optimal process temperature by an average of 1.5 degrees Celsius. The smaller this value, the higher the model's prediction accuracy.
[0057] In this invention, MAE and R² scores complement each other, jointly evaluating model performance. The acceptance criteria set in the embodiments are: both MAE(YT1) and MAE(YT2) must be below 2.0℃. This indicates that the model's prediction error is controlled within a very small range, meeting the stringent requirements of modern dyeing industry for process reproducibility and accuracy, and ensuring stable and excellent results achievable using the model's recommended parameters.
[0058] Indicator 2: Coefficient of determination: Calculated as the R² score of the model for two temperature predictions. This metric reflects the model's ability to explain changes in the target variable. The closer the R² is to 1, the higher the model's predictive accuracy and reliability, and the stronger the learned mapping relationship.
[0059] The R² score reflects the model's ability to explain changes in the target variable. Its calculation is performed independently for the two prediction tasks: the first insulation temperature (YT1) and the second insulation temperature (YT2). The specific calculation implementation is as follows: Basic concepts of computation: YT1_true: A vector consisting of the true first insulation temperatures of all samples in the test set.
[0060] YT1_pred: A vector consisting of the model's predicted first insulation temperature for all samples in the test set.
[0061] YT2_true: A vector consisting of the true second insulation temperatures of all samples in the test set.
[0062] YT2_pred: A vector consisting of the model's predicted second insulation temperatures for all samples in the test set.
[0063] Calculation formula: For any temperature task (taking the first insulation temperature YT1 as an example), the formula for calculating its R² fraction is: R²(YT1)=1-[SS_res(YT1) / SS_tot(YT1)] in: SS_res(YT1) (Sum of Squared Residuals): This is the sum of squares of the differences between the predicted and actual values. The formula is as follows: SS_res(YT1)=Σ(YT1_true_i-YT1_pred_i)² It represents the total amount of unexplained error remaining after the model's predictions.
[0064] SS_tot(YT1) (Total Sum of Squares): This is the sum of the squares of the differences between the true values and their mean. The formula is as follows: SS_tot(YT1)=Σ(YT1_true_i-mean(YT1_true))² It represents the total amount of inherent fluctuation in the target variable (YT1), which is the error of the simplest "baseline model" (which always predicts the average).
[0065] Calculation process and explanation: Calculate R²(YT1) and R²(YT2) respectively.
[0066] Explanation of fractions: R²=1: This indicates that the model's predictions are "perfect," the sum of squared residuals is 0, and the model fully explains all fluctuations in the target variable.
[0067] R²=0: This indicates that the model's predictive ability is equivalent to directly predicting the average of the true values on the test set, and the model does not provide any valuable information.
[0068] R²<0: This indicates that the model's prediction performance is worse than the baseline model (mean prediction), suggesting that the model training has failed and it cannot learn an effective mapping relationship.
[0069] In this invention, a successfully trained model is required to perform well on both prediction tasks. The acceptance criteria set in this embodiment are: both R²(YT1) and R²(YT2) must be higher than 0.85. This means that the model can explain more than 85% of the temperature fluctuations between the first and second insulation periods, and the prediction results have high accuracy and reliability, meeting the stringent requirements for precise process control in industrial production.
[0070] Acceptance criteria: In this embodiment, the model is considered to have been successfully trained and deployed for production predictions if the average MAE for both temperature predictions on the test set is below 2.0℃ and the average R² score is above 0.85.
[0071] Temperature prediction (model application): Deployment: Integrate the trained and evaluated AI model into the production management system and encapsulate it as a callable prediction service.
[0072] Input: When a new dyeing order is received, obtain the actual parameters of the fabric to be dyed, namely weight (Gnew) and percentage of polyester content (Pnew).
[0073] Processing and Prediction: Gnew and Pnew are input into the trained AI temperature co-optimization model. The model first automatically standardizes them in the same way as during training, and then performs internal calculations.
[0074] Output: The model ultimately outputs two prediction results simultaneously: The first holding temperature (T1new) to be used in step S2.1 of this staining process. The second holding temperature (T2new) should be used in step S2.3 of this staining process.
[0075] A color formula prediction model is then constructed, based on rigorously screened historical success case data. Its core is to learn the complex nonlinear mapping relationship from color space to dye concentration space.
[0076] The specific implementation is as follows: Data extraction: Extract high-quality records processed by the optimal data filtering mechanism (F>0.9) from the core data table "SuccessfulColorFormulas" in the existing database of historical successful staining cases.
[0077] Each data record contains: Input Features: Input features (X): Extract TargetL (Lin, brightness value), TargetA (ain, red-green value), and TargetB (bin, yellow-blue value) from each record.
[0078] Output Labels: Cdisp (disperse dye concentration), Creact (reactive dye concentration) Data preprocessing: Input feature standardization: Z-score standardization is performed on [Lin, ain, bin]. The training data is fitted using StandardScaler, and the mean (μ) and standard deviation (σ) of each feature are calculated and transformed: X_scaled = (X - μ) / σ. This aims to eliminate the differences in the dimensions and distribution ranges of the three features L, a, and b, and accelerate model convergence.
[0079] The specific implementation is as follows: Standardization method: The Z-Score standardization method is used to transform the original color data into a standard normal distribution with a mean of 0 and a standard deviation of 1.
[0080] Its calculation formula is: X_scaled=(X-μ) / σ, in: X represents the original value of a certain color feature (i.e., the original value of Lin, ain, or bin).
[0081] μ represents the arithmetic mean of the feature on the training set.
[0082] σ represents the standard deviation of the feature on the training set.
[0083] X_scaled represents the new value after standardization.
[0084] Implementation steps: a. Calculate statistics: Use only the training set data to calculate the mean (μ_L, μ_a, μ_b) and standard deviation (σ_L, σ_a, σ_b) for each color feature.
[0085] b. Perform the transformation: Using the mean and standard deviation calculated above, perform Z-Score standardization transformation on the Lin, ain and bin features in the entire dataset (including the training set and the test set).
[0086] c. Parameter Storage: The calculated mean (μ) and standard deviation (σ) are persistently stored as standardized parameters. When the model is put into production (i.e., in the recipe prediction stage), these parameters from the training set must be used to perform the exact same standardized transformation on the new input features (L_target, a_target, b_target) to ensure the consistency of data distribution.
[0087] Output label normalization: Max-Min normalization is performed on [Cdisp, Creact], and then MinMaxScaler is used to scale it to the [0,1] interval: Y_normalized=(Y-Y_min) / (Y_max-Y_min). This is done to adapt the output values to the effective range of the Sigmoid activation function of the neural network output layer.
[0088] To adapt to the characteristics of the activation function in the output layer of a neural network, the output labels need to be normalized before processing. The specific implementation is as follows: Normalization method: The Max-Min normalization method is used to linearly scale the original dye concentration data to the [0,1] interval.
[0089] The calculation formula is as follows: Y_normalized=(Y-Y_min) / (Y_max-Y_min) in: Y represents the original value of a dye concentration (i.e., the original value of Cdisp or Creact, in %owf).
[0090] Y_min represents the minimum concentration on the training set.
[0091] Y_max represents the maximum value of this concentration on the training set.
[0092] Y_normalized represents the new value after normalization.
[0093] a. Calculate statistics: Use only the training set data to calculate the minimum (Cdisp_min, Creact_min) and maximum (Cdisp_max, Creact_max) values for each dye concentration feature.
[0094] b. Perform the transformation: Using the minimum and maximum values obtained above, perform Max-Min normalization transformation on the Cdisp and Creact labels in the entire dataset (including the training set and the test set).
[0095] c. Parameter storage: The calculated minimum (Y_min) and maximum (Y_max) values are persistently stored as normalization parameters. When the model is put into production use (i.e., the formulation prediction stage), these parameters from the training set need to be used to inversely transform the predicted values output by the model to obtain the recommended values of the dye concentration that are actually usable, ensuring the consistency of dimensions.
[0096] Parameter saving: The fitted StandardScaler and MinMaxScaler objects are serialized and saved for subsequent transformation of new data and inverse transformation of predicted values.
[0097] Nonlinear mapping learning: Dataset partitioning: The preprocessed complete dataset is randomly divided into training and test sets in an 8:2 ratio. A fixed random seed (e.g., random_state=42) is used to ensure reproducible results.
[0098] Model Architecture: A multilayer perceptron (MLP) neural network is constructed, with the following specific structure: Input layer: 3 neurons, receiving standardized color features [Lin', ain', bin'] Hidden layers: 2 fully connected layers. The first hidden layer contains 128 neurons and uses the ReLU activation function; the second hidden layer contains 64 neurons and uses the ReLU activation function. These hidden layers learn the complex mapping relationship between color and recipe step by step through nonlinear transformations.
[0099] Output layer: 2 neurons, corresponding to the normalized disperse dye concentration and the predicted reactive dye concentration [Cdisp_pred', Creact_pred']. A sigmoid activation function is used to constrain the output values to the range (0,1).
[0100] Training configuration: Loss function: The mean squared error (MSELoss) is used to calculate the error between the model's predicted value and the true normalized label.
[0101] The specific implementation is as follows: Loss function: The mean squared error loss function (MSELoss) is used to calculate the error between the model's predicted values and the true normalized labels. The calculation formula is as follows: Loss=MSE([Cdisp_true',Creact_true'],[Cdisp_pred',Creact_pred'])=(1 / n)*Σ[(Cdisp_true'-Cdisp_pred')²+(Creact_true'-Creact_pred')²] in: 'Cdisp_true' and 'Creact_true' represent the normalized true disperse dye concentration and reactive dye concentration labels.
[0102] Cdisp_pred' and Creact_pred' represent the normalized concentration values predicted by the model.
[0103] n represents the batch size (BatchSize).
[0104] This loss function simultaneously minimizes the prediction error of the concentrations of both dyes, guiding the model to learn a co-optimized formulation.
[0105] Optimizer: The Adam optimizer is used with an initial learning rate of 0.001.
[0106] Training process: Using the preprocessed training set data, supervised learning is performed through the backpropagation algorithm. The specific process is as follows: a. Forward propagation: A batch of standardized color features [Lin',ain',bin'] are input into the network, calculated by the hidden layer, and finally the predicted normalized concentration [Cdisp_pred',Creact_pred'] is obtained in the output layer.
[0107] b. Loss Calculation: Based on the loss function described above, calculate the error between the predicted value and the true label for this batch.
[0108] c. Backpropagation: Using automatic differentiation techniques, calculate the gradient of the loss function with respect to each weight and bias parameter in the network.
[0109] d. Parameter update: The Adam optimizer updates all parameters in the network according to its algorithm rules based on the calculated gradients.
[0110] e. Iteration: Repeat step ad until all samples in the training set have been traversed, which is considered a completed training epoch. In this implementation, the total number of training epochs is set to 500.
[0111] f. Batch training: The above ad step is performed on each mini-batch of data. In this implementation, the batch size is set to 32.
[0112] g. Validation Monitoring: After each training cycle, the test set is used as the validation set for forward propagation, and its loss value is calculated and recorded. By monitoring the trend of the validation set loss, we can determine whether the model is overfitting and the convergence status.
[0113] Model evaluation: After training, evaluate using the test set: Evaluation metrics: Calculate the mean absolute error (MAE) between the predicted concentration (after inverse normalization) and the actual concentration, requiring MAE < 0.4% (owf); calculate the coefficient of determination (R²), requiring R² > 0.92.
[0114] Implementation of Mean Absolute Error (MAE) Calculation: Calculation formula: MAE=(1 / n)*Σ|Y_true-Y_pred| in: Y_true represents the actual dye concentration value (unit: %owf), which is Cdisp_true or Creact_true obtained from the test set.
[0115] Y_pred represents the recommended dye concentration (in %owf) predicted by the model and then denormalized, i.e., Cdisp_rec or Creact_rec.
[0116] n represents the number of samples in the test set.
[0117] Σ represents the summation of the absolute errors over all samples in the test set.
[0118] Calculation process: a. Perform model prediction on the test set data to obtain the normalized prediction output [Cdisp_pred', Creact_pred'].
[0119] b. Using the MinMaxScaler parameters (i.e., Y_min and Y_max) saved during the training phase, the predicted output is inversely normalized to obtain recommended concentration values that can be used in actual production: Cdisp_rec=Cdisp_pred'*(Cdisp_max-Cdisp_min)+Cdisp_min Creact_rec=Creact_pred'*(Creact_max-Creact_min)+Creact_min c. Calculate the MAE values for the predicted concentrations of disperse dyes and reactive dyes respectively: MAE_disp=(1 / n)*Σ|Cdisp_true-Cdisp_rec| MAE_react=(1 / n)*Σ|Creact_true-Creact_rec| d. Acceptance requirements: The model performance must meet the requirements of MAE_disp < 0.4% (owf) and MAE_react < 0.4% (owf). This indicator directly reflects that the average absolute deviation between the concentration value predicted by the model and the actual optimal concentration is controlled within 0.4%, and the accuracy meets the requirements of industrial production.
[0120] Implementation of coefficient of determination (R²) calculation: Calculation formula: R² = 1 - [SS_res / SS_tot] in: SS_res is the sum of squared residuals, SS_res=Σ(Y_true-Y_pred)².
[0121] SS_tot is the total sum of squares, SS_tot=Σ(Y_true-Y_mean)².
[0122] Y_mean is the average of the true concentration values.
[0123] Calculation process: a. Use the predicted concentrations Cdisp_rec and Creact_rec after inverse normalization, and the corresponding true concentrations Cdisp_true and Creact_true.
[0124] b. Calculate the R² values for the predicted concentrations of disperse dyes and reactive dyes respectively: , c. Acceptance Requirements: The model performance must meet the following requirements: R²_disp > 0.92 and R²_react > 0.92. This indicator shows that the model can explain more than 92% of dye concentration fluctuations, the predicted results are highly correlated with the actual values, and the model has extremely high accuracy and reliability.
[0125] Performance acceptance: Once the target is met, the trained model will be serialized and saved.
[0126] Recipe generation: Input the target color values L_target, a_target, and b_target of this production order into the trained color formula prediction model, and the model will directly output the recommended disperse dye concentration Cdisp and reactive dye concentration Creact.
[0127] The specific process is as follows: Input preprocessing: The target color values L_target, a_target, and b_target provided in this production order are standardized using the same Z-Score parameters (mean μ and standard deviation σ) saved during model training, resulting in the standardized input vector [L_target', a_target', b_target']. This step ensures that the input data distribution is consistent with the data distribution learned during model training.
[0128] Model prediction: The standardized input vector [L_target',a_target',b_target'] is directly input into the deployed and trained color recipe prediction model (i.e., the multilayer perceptron neural network).
[0129] Output results: The model performs forward propagation calculations and directly outputs two predicted values: the recommended disperse dye concentration Cdisp' and the recommended reactive dye concentration Creact'. The output values here are the normalized results of the model, and their values range from [0,1].
[0130] Post-processing: The normalized concentration values Cdisp' and Creact' output by the model are denormalized using the normalization parameters (maximum value Max and minimum value Min) saved during model training. The calculation process is as follows: Cdisp=Cdisp'*(Cdisp_max-Cdisp_min)+Cdisp_min Creact=Creact'*(Creact_max-Creact_min)+Creact_min The final result is the recommended disperse dye concentration Cdisp and the recommended reactive dye concentration Creact, which can be directly used in actual production and are expressed in % (owf).
[0131] After establishing the AI temperature co-optimization model and the color formula prediction model, this application further elaborates on how to use the AI model and the color formula prediction model trained by the database to perform the staining method.
[0132] This embodiment takes the dyeing of a navy blue cotton-polyester fabric as an example, wherein the content of polyester fiber in the fabric is 65% and the content of cotton fiber is 35%.
[0133] The customer provided a standard navy blue color sample. Using a spectrophotometer (such as X-RiteCi7800), its CIELAB color value was measured, yielding the target values: L_target=22.5, a_target=8.0, b_target=-25.0.
[0134] Input L_target, a_target, and b_target into the deployed color recipe prediction model.
[0135] The model directly outputs recommended dye concentrations: Disperse Navy Blue S-3BG concentration is Cdisp_rec=2.8%(owf), and Reactive Navy Blue RN concentration is Creact_rec=1.6%(owf).
[0136] Obtain the physical parameters of the fabric to be dyed: weight (G). new =220g / m², polyester content P new =65%.
[0137] G new and P new Input into the deployed AI temperature collaborative optimization model.
[0138] The optimal process temperature recommended by the model in collaboration: first holding temperature T1 new =63℃, second insulation temperature T2 new =130℃.
[0139] S1. Dye solution preparation: In the high-temperature and high-pressure dyeing machine, soft water is injected as the water medium.
[0140] Based on the formula recommended by the AI, accurately weigh: 2.8% (owf) of Disperse S-3BG and 1.6% (owf) of Active S-3BG.
[0141] Add 1.0 to 4.0 g / L of a compound pH adjuster, which is 2.0 g / L in this example (its thermosensitive acidic component is ethyl acetate).
[0142] Add 2.0 to 6.0 g / L of fiber swelling agent, which is 3.5 g / L in this example (which is benzyl alcohol, an environmentally friendly polar organic solvent).
[0143] Start the dyeing machine and stir for 20 minutes to form a homogeneous dye solution.
[0144] S2, staged staining: S2.1, First Stage Incubation: 100 kg of the cotton-polyester composite fabric is immersed in the dyeing machine. The dye bath is heated to the AI-recommended 63°C at a first heating rate of 1.5°C / min, and held at this temperature for 20 minutes. During this stage, the reactive dye is adsorbed onto the cotton fibers in the cotton-polyester composite fabric, while benzyl alcohol swells the polyester fibers.
[0145] S2.2, Second Stage Heating and pH Shift: After completing stage S2.1, continue heating the dye solution to the AI-recommended 130℃ at a second heating rate of 1.0℃ / min. During this heating process, ethyl acetate decomposes thermally, releasing acetic acid, causing the pH of the dye solution to autonomously decrease from the initial near-neutral to 5.0 (the pH value of a weakly acidic environment is 4.5 to 6).
[0146] S2.3, Third stage heat preservation: Keep at 130℃ for 40 minutes to promote the full dyeing of the disperse dye on the swollen polyester fibers.
[0147] S3, Alkaline color fixing and purification: After staining is completed, the dye solution is cooled to 65℃ (alkaline fixation temperature range) at a rate of 2.5℃ / min.
[0148] The alkaline fixing agent (a mixture of sodium carbonate and sodium hydroxide) is slowly added over 15 minutes using a metering pump.
[0149] The pH of the system was adjusted to 11.0 (alkaline range) using an online pH monitoring and control system, and maintained at this condition for 20 minutes. Two processes were completed simultaneously during this stage: Covalent bonding reaction: Under alkaline conditions, reactive dyes react with cotton fibers to form strong covalent bonds, thus completing the color fixation.
[0150] Hydrolysis and shedding: The alkaline environment causes the disperse dyes adhering to the surface of cotton and polyester fibers to hydrolyze and detach from the fiber surface, achieving a purification effect.
[0151] S4. Post-processing: After draining the residual liquid, the dyed fabric is washed with water, soaped (95℃, 1g / L soaping agent, 15min), washed with hot water, washed with cold water, and finally dried at 120℃ to obtain the dyed finished product.
[0152] After quality inspection, the obtained fabric had a color difference ΔE of 0.7, a rubbing fastness (dry / wet) of 4-5 / 4, and a washing fastness of 4 or above. All indicators were of high quality. All data of this successful case (fabric parameters, AI recommended values, process parameters, and result indicators) were automatically collected, reviewed, and stored in the historical database for subsequent model iteration and optimization.
[0153] The specific process parameters given in the above embodiments, such as the dosage of the composite pH adjuster (2.0 g / L), the dosage of the fiber swelling agent (3.5 g / L), and the final pH value (5.0), are preferred examples for the specific fabric and color formulation. Those skilled in the art should understand that in practical applications, the above parameters can be adaptively adjusted through conventional process optimization experiments according to the composition, weight, color depth of the fabric to be dyed, and the specific type of dye used.
[0154] Generally, the dosage of the compound pH adjuster can be adjusted within the range of 1.0 to 4.0 g / L, and the dosage of the fiber swelling agent can be adjusted within the range of 2.0 to 6.0 g / L. After the compound pH adjuster decomposes upon heating, the pH of the dye bath will autonomously decrease to a weakly acidic range, which refers to a pH value of 4.5 to 6.0. Adjustments within these ranges can ensure the achievement of the expected autonomous pH conversion, fiber swelling, and final dyeing effect.
[0155] The above method combines the traditional "two-bath, two-step method" into a "one-time, one-bath" process, saving a complete process of dyeing, draining, and rinsing. This directly leads to a comprehensive reduction in water consumption, steam energy consumption, and electricity consumption, thereby saving energy. AI's precise formula prediction avoids dye waste caused by color testing and correction, improving dye utilization. By accurately calculating the amount of dye used through the AI color formula prediction model and combining it with optimized process temperature, it ensures that the final product's color difference (ΔE) is less than 1.0, and all color fastness grades reach level 4 or above, resulting in stable and excellent product quality.
[0156] In step S3, alkaline fixing and purification effectively remove the floating disperse dyes adhering to the surface of cotton and polyester fibers, solving the key problems of dull color and poor fastness of cotton components in the traditional one-bath method, and ensuring the brightness and purity of the color.
[0157] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A one-time same-bath dyeing method for cotton-polyester composite fabric, characterized in that... Includes the following steps, S1. Dye liquor preparation: Disperse dye, reactive dye, composite pH adjuster and fiber swelling aid are added to the dyeing vat simultaneously, water medium is injected and stirred to form a homogeneous dye liquor; the composite pH adjuster contains a heat-sensitive acidic component that can decompose and produce gas during the heating process; the fiber swelling aid is an environmentally friendly polar organic solvent. S2, Staged staining: including, S2.1 First stage heat preservation: The cotton-polyester composite fabric is immersed in the dye solution prepared in step S1, and the dye solution is heated to the first heat preservation temperature at the first heating rate and kept warm. In this stage, the active dye is adsorbed on the cotton fibers in the cotton-polyester composite fabric, and the fiber swelling agent swells the polyester fibers in the cotton-polyester composite fabric. S2.2, Second stage heating and pH conversion: After completing stage S2.1, the dye liquor is heated to the second holding temperature at the second heating rate. During this heating process, the composite pH regulator is decomposed by heat, causing the dye pH to drop to the weakly acidic range on its own. S2.3, Third stage heat preservation: Heat preservation is carried out at the second heat preservation temperature to promote the dyeing of the disperse dye onto the swollen polyester fibers; S3. Alkaline fixing and purification: After completing step S2, the dye is cooled to the alkaline fixing temperature range, the alkaline fixing agent is slowly added, and the pH of the system is adjusted to the alkaline range for heat preservation. This promotes the covalent bonding reaction between the reactive dye and the cotton fiber to complete the fixing reaction. At the same time, the disperse dye adhering to the surface of the cotton fiber and the polyester fiber is hydrolyzed and removed from the fiber surface. S4. Post-treatment: After color fixing, the dyed fabric is washed with water, soaped and dried to finally obtain the dyed finished product. The first insulation temperature in step S2.1 and the second insulation temperature in step S2.3 are determined collaboratively by an AI temperature collaborative optimization model. The AI temperature collaborative optimization model is trained by a multi-task learning algorithm with fabric weight XG and polyester content percentage XP as input features, and the optimal first insulation temperature YT1 and the optimal second insulation temperature YT2 as collaborative prediction targets.
2. The method for one-time same-bath dyeing of cotton-polyester composite fabric according to claim 1, characterized in that: The method for establishing the AI temperature collaborative optimization model includes: Data acquisition: Extract multiple valid records from the historical production database. Each record contains input variables: fabric weight XG and polyester content percentage XP; and output variables: optimal first insulation temperature YT1 and optimal second insulation temperature YT2. Model training: The dataset is divided into training set and test set according to the proportion. The training set data is used to train a multi-output machine learning regression algorithm. The fabric weight XG and polyester content percentage XP are used as input features. The optimal first insulation temperature YT1 and the optimal second insulation temperature YT2 are used as collaborative prediction targets. By minimizing the multi-task loss function, the model parameters are iteratively optimized to obtain the AI temperature collaborative optimization model. Temperature prediction: The current weight (G) of the fabric to be dyed is used. new And the percentage of polyester content P new The input is fed into the trained AI temperature co-optimization model, and the model simultaneously outputs the first holding temperature T1 used in step S2.1 of this staining process. new and the second heat preservation temperature T2 in step S2.3 new .
3. The method for one-time same-bath dyeing of cotton-polyester composite fabric according to claim 1, characterized in that: The concentration ratio of disperse dye to reactive dye in step S1 is determined as follows: A color formula prediction model is constructed, and its establishment method includes: Dyeing Database Construction: Collect historical successful dyeing cases and construct a historical successful dyeing case database. Each data record includes: the CIEL, a, b values Lin, ain, bin of the target color, as well as the concentration of disperse dye Cdisp and reactive dye Creact actually used to achieve the color and verified by the colorimeter. Wherein, Lin, ain, and bin are the lightness value, red-green value, and yellow-blue value of the target color in the CIELAB color space, respectively; Nonlinear mapping learning: The color values Lin, ain, and bin in the database are used as input features, and the dye concentration ratios Cdisp and Creact are used as output labels. The input is fed into a multilayer perceptron neural network for supervised learning. The network learns the complex nonlinear mapping relationship between the color space and the dye concentration space through the backpropagation algorithm. Formula generation: Input the target color values L_target, a_target, and b_target of this production order into the trained color formula prediction model. The model directly outputs the recommended disperse dye concentration Cdisprec and reactive dye concentration Creactrec.
4. A one-time same-bath dyeing method for cotton-polyester composite fabric according to claim 2 or 3, characterized in that: The method for constructing the historical production database or historical successful staining case database includes: Data entry: Through the manual entry interface or automatic data acquisition interface of the database management system, the confirmed qualified production work order data is persistently stored in the designated table of the relational database; Record generation: The generation rule for each record is as follows: Whenever a dyeing batch is confirmed by quality inspection to have a color difference ΔE < 1.0 and all color fastness grades reach level 4 or above, a record generation operation is triggered, and all fabric parameters, process parameters and result indicators used in the batch are automatically associated and stored in the database. Optimal data filtering: Periodically execute database maintenance scripts to filter and clean historical records based on predefined optimization objective functions; The optimization objective function is: F = k1·(1 / ΔE) + k2·S in: ΔE is the CIELAB color difference between the measured color difference value and the target color difference value of the dyeing batch represented by this historical record; S represents the energy-saving score of the dyeing batch represented by this historical record, and its value is inversely proportional to the energy consumption per unit output during the production process of this batch. k1 and k2 are pre-defined weighting coefficients used to weigh the importance of color accuracy and energy consumption in the optimization objective, respectively, and satisfying k1>0 and k2>0. Only records with function values F higher than a set threshold Q are retained to form the optimal coloring dataset for model training.
5. The method for one-time same-bath dyeing of cotton-polyester composite fabric according to claim 1, characterized in that: The thermosensitive acidic component in the composite pH regulator is an organic acid ester compound, which is one or more of methyl formate, ethyl formate, methyl acetate, ethyl acetate, or diethyl oxalate.
6. The method for one-time same-bath dyeing of cotton-polyester composite fabric according to claim 1, characterized in that: The fiber swelling agent is one or more of benzyl alcohol, methyl salicylate, or N-cyclohexylpyrrolidone.
7. The method for one-time same-bath dyeing of cotton-polyester composite fabric according to claim 1, characterized in that: In step S3, the alkaline fixing temperature range is 60-70℃, and "adjusting the pH of the system to the alkaline range" means adjusting the pH value of the dye to the range of 10.5-11.5.