Method and system for obtaining dye color formula of silk cotton knitted printed fabric

By constructing a color prediction model based on dye characteristic embedding and a dye combination optimization model based on Markov's decision-making, the problem of inaccurate acquisition of dye color formulas in the existing technology is solved, and more efficient and accurate dye combination optimization is achieved, and the dyeing performance of silk cotton knitted printed fabrics is improved.

CN120183540BActive Publication Date: 2025-08-12SHAOXING COUNTY SHUMEI KNITTING & TEXTILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510637270.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-08-12
Estimated Expiration
2045-05-19

AI Technical Summary

Technical Problem

The prior art fails to effectively consider the functional characteristics of silk cotton knitted printed fabrics after dyeing during the process of obtaining dye color formulas, resulting in inaccurate dye performance results, affecting dye cost, dye quality and production efficiency.

Method used

A color prediction model based on dye characteristic feature embedding and a dye combination optimization model based on Markov decision-making is constructed, combining deep learning and optimization algorithms to obtain the optimal dye formula by training and optimizing dye combinations.

Benefits of technology

It improves the efficiency and accuracy of dye color formula acquisition, reduces color deviation, optimizes the influence of dynamic parameters during the dyeing process, and improves production efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120183540B_ABST
    Figure CN120183540B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of dye formula acquisition, specifically a method and system for acquiring dye color formulas for silk-cotton knitted printed fabrics, taking into account the functional properties of the dyed silk-cotton knitted printed fabrics. First, dye data, target color, current dyeing parameter data, and historical dyeing data are acquired. Then, the historical dyeing data is input into a color prediction model based on dye characteristic feature embedding for training, thereby obtaining a pre-trained color prediction model. The dye data, target color, pre-trained color prediction model, and an optimization algorithm are combined to obtain a predicted dye combination. Next, a dye combination optimization model based on Markov decision making is constructed, and the dye combination optimization model is trained using historical dyeing data. Finally, the predicted dye combination and current dyeing parameter data are input into the trained dye combination optimization model for optimization, thereby obtaining an optimal dye combination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of dye formula acquisition, and in particular to a method and system for acquiring the dye color formula of silk cotton knitted printed fabrics. Background Art

[0002] To ensure the color and performance of the final product, every color must undergo a pre-dyeing sampling process before mass production. This process aims to determine the optimal color matching solution, verify the accuracy of the initial dye formula, evaluate the feasibility of dyeing process parameters, estimate dye and chemical costs, and ensure that the fabric will ultimately meet various specifications.

[0003] However, the current dye color formula acquisition process only considers color deviation, without factoring in the functional properties of the dyed silk cotton knitted printed fabric. Furthermore, dyes are easily affected by parameters such as temperature and pH during the dyeing process, making it difficult to accurately guarantee the dyeing performance results of a fixed color formula. This, in turn, makes it difficult to control dye costs, dyeing quality, and product production cycle time, reducing overall production efficiency and quality. Summary of the Invention

[0004] The present invention aims to provide a method and system for obtaining dye color formulas for silk-cotton knitted printed fabrics. First, dye data, target color, current dyeing parameter data, and historical dyeing data are obtained. Then, the historical dyeing data is input into a color prediction model based on dye characteristic feature embedding for training, thereby obtaining a pre-trained color prediction model. The dye data, target color, pre-trained color prediction model, and optimization algorithm are combined to obtain a predicted dye combination. Next, a dye combination optimization model based on Markov decision-making is constructed, defining the state space, action space, and reward function of the Markov decision process. A DQN is selected as the backbone network, and the dye combination optimization model is trained using historical dyeing data. Finally, the predicted dye combination and current dyeing parameter data are input into the trained dye combination optimization model for optimization, thereby obtaining the optimal dye combination.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A method for obtaining a dye color formula for a silk-cotton knitted printed fabric comprises:

[0007] Acquire dye data, target color, current dyeing parameter data, and historical dyeing data; wherein the dye data includes: dye characteristics, dye types, dye ratios, and dye concentrations;

[0008] Constructing a color prediction model based on dye characteristic feature embedding, inputting historical dye color formula data into the color prediction model for training to obtain a pre-trained color prediction model; combining the dye data, the target color, the pre-trained color prediction model and the optimization algorithm to obtain a predicted dye combination;

[0009] A dye combination optimization model based on Markov decision is constructed, the state space, action space and reward function of the Markov decision process are defined, DQN is selected as the backbone network, and the dye combination optimization model is trained using the historical dyeing data. The predicted dye combination and the current dyeing parameter data are then input into the trained dye combination optimization model for optimization to obtain the optimal dye combination.

[0010] Furthermore, the current dyeing parameter data includes: dyeing time, dyeing temperature, pH value and dyeing bath ratio; the historical dyeing data includes: historical dye data, historical dyeing parameter data and historical dyeing result data; wherein, the historical dyeing result data includes historical color data and historical color fastness data.

[0011] Furthermore, the color prediction model based on dye characteristic feature embedding includes: an input layer, a feature extraction layer, a weighted self-attention layer based on dye characteristic feature embedding, a fully connected layer, and an output layer;

[0012] wherein the input layer converts the historical dye color formula data into data features;

[0013] The feature extraction layer further extracts the data features to obtain deep features;

[0014] The weighted self-attention layer based on the dye characteristic feature embedding processes the deep features in combination with the dye characteristic features and the weighted self-attention mechanism to obtain attention features;

[0015] The fully connected layer converts the attention features into predicted color features;

[0016] The output layer outputs a predicted color result according to the predicted color feature.

[0017] Furthermore, the weighted self-attention layer based on the dye characteristic feature embedding performs linear transformation on the deep features and the dye characteristic features to obtain respective query matrices, key matrices and value matrices; the query matrix, key matrix and value matrix of the deep features are weightedly fused according to the learnable weight parameters and the query matrix, key matrix and value matrix of the dye characteristic features to obtain the fused query matrix, key matrix and value matrix, and the attention features are obtained in combination with the calculation formula of the attention weight.

[0018] Furthermore, the specific steps of obtaining a predicted dye combination by combining the dye data, the target color, the pre-trained color prediction model and the optimization algorithm include:

[0019] Step 1: Determine the dye type range, dye ratio range, and dye concentration range based on the dye data;

[0020] Step 2: randomly generating a set of dye combinations, including: the dye type, the dye ratio, and the dye concentration;

[0021] Step 3: Inputting the dye combination, the dye characteristics, and the given dyeing condition data into the pre-trained color prediction model to obtain the Lab value of the predicted color;

[0022] Step 4: Calculate the color deviation between the Lab value of the predicted color and the Lab value of the target color;

[0023] Step 5: Based on the color deviation, use the optimization algorithm to update the dye combination so as to update it in a direction of decreasing the color deviation;

[0024] Step 6: Iterate steps 3 to 5 until the preset number of iterations is reached or the color deviation is less than the preset threshold;

[0025] Step 7: Output the dye combination with the minimum color deviation as the predicted dye combination.

[0026] Furthermore, the process of training the dye combination optimization model using the historical dyeing data includes:

[0027] Obtaining the historical dyeing data and defining a Markov decision environment;

[0028] Wherein, the Markov decision environment includes: the state space, the action space and the reward function;

[0029] A DQN network is constructed, the weights of the DQN network are randomly initialized, and the DQN network is iterated cyclically in combination with Markov decision making until convergence, that is, the Q value output by the DQN network no longer changes significantly.

[0030] Furthermore, the state space includes: dye combination, dyeing parameters and initial color; the action space includes: dye combination adjustment and dyeing parameter adjustment; the reward function includes: color deviation, color fastness, dye cost, color change response time and antibacterial rate.

[0031] A dye color formula acquisition system for silk-cotton knitted printed fabrics, comprising: a system control module, a data acquisition module, a color prediction module, a dye combination prediction module, a dye combination optimization module, and an output module;

[0032] Wherein, the system control module is used to control the start, pause and stop of the system;

[0033] The data acquisition module is used to obtain dye data, target color, current dyeing parameter data and historical dyeing data; wherein the dye data includes: dye characteristics, dye types, dye ratio and dye concentration;

[0034] The color prediction module is used to input historical dye color formula data into a color prediction model based on dye characteristic feature embedding for training to obtain a pre-trained color prediction model;

[0035] The dye combination prediction module is used to combine the dye data, the target color, the pre-trained color prediction model and the optimization algorithm to obtain a predicted dye combination;

[0036] The dye combination optimization module is used to input the predicted dye combination and the current dyeing parameter data into a trained dye combination optimization model based on Markov decision making to optimize and obtain an optimal dye combination;

[0037] The output module is used to output the optimal dye combination.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] 1. The present invention proposes a color prediction model based on dye characteristic feature embedding for predicting color results based on dye combinations; the model combines dye characteristic features and a weighted attention mechanism through a weighted self-attention layer based on dye characteristic feature embedding, and utilizes the inherent properties of different dyes to more accurately capture the interactions between dyes and their impact on the final color results, further improving the efficiency and accuracy of dye color formula acquisition.

[0040] 2. The present invention proposes a dye combination prediction method for obtaining predicted dye combinations; this method provides accurate color predictions for the optimization algorithm through a pre-trained color prediction model, thereby accelerating the optimization process and obtaining better color formula matching effects; by combining model prediction and algorithm optimization, it can significantly reduce color deviation and effectively reduce the blind trial and error in the traditional manual proofing process, thereby improving the efficiency and accuracy of dye color formula acquisition.

[0041] 3. The present invention proposes a dye combination optimization method based on Markov decision-making for adjusting the predicted dye combination to adapt to the influence of dynamic parameters in the dyeing process; this method combines Markov decision-making and DQN network to dynamically adjust the dye combination according to the current dyeing parameter data during the dyeing process, overcome the influence of fluctuations in factors such as temperature and pH value during the dyeing process, and learn the optimal dye combination strategy under different states, thereby effectively improving the efficiency and accuracy of dye color formula acquisition. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 This is a flow chart of a method for obtaining a dye color formula for a silk cotton knitted printed fabric according to the present invention;

[0043] Figure 2 A schematic diagram of the process for obtaining a predicted dye combination according to the present invention;

[0044] Figure 3 The figure is a structural schematic diagram of a system for acquiring dye color formula for silk cotton knitted printed fabrics according to the present invention. DETAILED DESCRIPTION

[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0046] The present invention provides a method and system for obtaining a dye color formula for a silk-cotton knitted printed fabric, so as to improve the efficiency and accuracy of obtaining the dye color formula for the silk-cotton knitted printed fabric. The method and system proposed by the present invention will be described in detail below in conjunction with the first and second embodiments, as follows:

[0047] Example 1

[0048] In order to accurately and efficiently obtain the dye color formula of silk cotton knitted printed fabrics, a dyeing factory used a method for obtaining the dye color formula of silk cotton knitted printed fabrics proposed in the present invention. The process of the method is shown in the following figure: Figure 1 As shown, specifically including:

[0049] S1. Obtain dye data, target color, current dyeing parameter data, and historical dyeing data;

[0050] Furthermore, the dye data includes: dye characteristics, dye types, dye ratios, and dye concentrations;

[0051] Furthermore, the current dyeing parameter data includes: dyeing time, dyeing temperature, pH value and dyeing bath ratio; the historical dyeing data includes: historical dye data, historical dyeing parameter data and historical dyeing result data; wherein the historical dyeing result data includes historical color data and historical color fastness data;

[0052] Furthermore, two sets of current dyeing parameter data were randomly selected as references and displayed in a table, which were respectively recorded as sample 1 and sample 2, as shown in Table 1.

[0053] Table 1. Current dyeing parameter data

[0054]

[0055] Furthermore, dye data and historical dyeing data are obtained by calling a database; current dyeing parameter data are collected using corresponding sensors; and target color and historical color data are represented using Lab values.

[0056] By using current dyeing parameter data, historical dyeing data and dye data, reliable data support is provided for subsequent color prediction, dye combination prediction and dye combination optimization, thereby effectively improving the efficiency and accuracy of dye color formula acquisition.

[0057] S2. Construct a color prediction model based on dye characteristic feature embedding, input historical dyeing data into the color prediction model for training, and obtain a pre-trained color prediction model;

[0058] Furthermore, the color prediction model based on dye characteristic feature embedding includes: an input layer, a feature extraction layer, a weighted self-attention layer based on dye characteristic feature embedding, a fully connected layer, and an output layer;

[0059] Among them, the input layer converts historical dye color formula data into data features;

[0060] Furthermore, the historical dye color formula data includes historical dye data and historical dyeing parameter data.

[0061] The feature extraction layer further extracts data features to obtain deep features;

[0062] The weighted self-attention layer based on dye characteristic feature embedding combines the dye characteristic features and the weighted self-attention mechanism to process the deep features and obtain the attention features;

[0063] The fully connected layer transforms the attention features into predicted color features;

[0064] The output layer outputs the predicted color result based on the predicted color features;

[0065] By combining dye properties, dyeing parameters and deep learning technology, the accuracy, generalization ability and adaptability of color prediction can be improved. At the same time, the use of dye characteristics can provide a reference for the impact of dyeing performance for subsequent dye combination prediction optimization methods. For example, the adsorption of dyes will affect the permeability of dyed fabrics, thereby improving the efficiency and accuracy of dye color formula acquisition.

[0066] Furthermore, the process of acquiring attention features based on the weighted self-attention layer embedded with dye characteristic features includes:

[0067] Perform linear transformations on the deep features and dye characteristic features to obtain their respective query matrices, key matrices, and value matrices;

[0068] The query matrix, bond matrix and value matrix of the deep features are weightedly fused according to the learnable weight parameters and the query matrix, bond matrix and value matrix of the dye characteristic features to obtain the fused query matrix, bond matrix and value matrix;

[0069] Combined with the calculation formula of attention weight, attention features are obtained;

[0070] Furthermore, the dye characteristic features are obtained by encoding the dye characteristics and then transforming them using a convolution kernel; dye characteristics such as molecular weight, solubility, charge, etc.

[0071] Furthermore, the dye characteristics include: dye molecular weight characteristics, dye solubility characteristics, dye charge characteristics, dye adsorption characteristics, etc.;

[0072] Furthermore, the fused query matrix, key matrix, and value matrix can be expressed as follows:

[0073] ;

[0074] in, 、 and are the query matrix, key matrix and value matrix after fusion respectively; 、 and are the query matrix, key matrix, and value matrix obtained after linear transformation of deep features; 、 and is a learnable weight parameter used to control the influence of the dye characteristic features; 、 and are the query matrix, key matrix, and value matrix obtained after the linear transformation of the dye characteristic features;

[0075] Furthermore, the calculation formula of attention weight is expressed as:

[0076] ;

[0077] in, is the attention weight; is the normalization function; and are the fused query matrix and transposed key matrix respectively; is the inner product operation; is the dimension of the query matrix and key matrix.

[0078] In order to illustrate the effectiveness of the weighted self-attention layer based on dye characteristic feature embedding, two schemes are selected for verification. The weighted self-attention layer based on dye characteristic feature embedding proposed in the present invention can enable the subsequently predicted dye combination to maintain the fabric performance. One is the mechanism of weighted attention using dye characteristic features, recorded as Scheme 1; the other is a scheme without adding dye characteristic features, recorded as Scheme 2. In order to better illustrate the impact on fabric performance, fabric penetration uniformity is selected as a reference performance indicator; a group of dye combinations are randomly selected, and different schemes and the process of predicting dye combinations are combined to obtain predicted dye combinations under different schemes. The fabric penetration uniformity under different schemes obtained by using the predicted dye combinations is compared with the target fabric penetration uniformity, and the deviation range is set in [-5%, 5%]. The test results of the effectiveness of dye characteristic feature embedding are shown in Table 2.

[0079] Table 2. Dye characteristic feature embedding effectiveness test results

[0080]

[0081] As shown in Table 2, the color prediction model using the weighted self-attention layer based on dye characteristic feature embedding can make the output results of the dye combination prediction model retain higher dyed fabric characteristics, which can ensure that the dyed fabric characteristics will not be reduced while keeping the color deviation to a minimum.

[0082] In this embodiment, the weighted self-attention layer based on dye characteristic feature embedding combines dye characteristic features and the weighted attention mechanism, utilizing the inherent properties of different dyes to more accurately capture the interactions between dyes and their impact on the final color results and fabric properties, further improving the efficiency and accuracy of dye color formula acquisition.

[0083] To further verify the effectiveness of the color prediction model based on dye characteristic feature embedding proposed in this paper, we selected historical dyeing data from the past five years for model ablation control tests, denoted as Test 1, Test 2, and Test 3. The historical dyeing data from the past 3-5 years and the past 1-2 years were used as the model training dataset and model test dataset, with corresponding data sets of 600 and 400, respectively. The historical dyeing data and historical dyeing parameter data in the historical dyeing data were used as model input data, and the historical dyeing result data were used as model output comparison data.

[0084] Three different models were selected for ablation comparison, and the model training data set was input into different models to obtain different pre-trained models. The corresponding pre-trained models were then used to process the model test data set to obtain the color prediction results of different models; the color deviation was obtained according to the color prediction result and the target color, and the color deviation was compared with the deviation threshold to obtain the test results of different models; among which the deviation threshold was set to 0.95; the models were: the color prediction model based on dye characteristic feature embedding proposed in the present invention, recorded as model one; the dye characteristic feature embedding and weighted processing in the weighted self-attention layer based on dye characteristic feature embedding were removed, and only the self-attention layer was retained, recorded as model two; the weighted self-attention layer of the entire dye characteristic feature embedding was removed, recorded as model three; the color prediction model validity test results can be referred to Table 3.

[0085] Table 3. Validity test results of color prediction model

[0086]

[0087] As can be seen from Table 3, the color prediction model (Model 1) based on dye property feature embedding proposed in the present invention is superior to other models in terms of accurate color prediction. This shows that the color prediction model proposed in the present invention can provide accurate predicted colors for subsequent dye combination predictions. At the same time, it can not only obtain the correlation between the dye combination and the dyeing result, but also use the dye property features to obtain the relationship between the dye properties and the performance of the dyed fabric, thereby improving the efficiency and accuracy of dye color formula acquisition.

[0088] S3. Combining the dye data, target color, pre-trained color prediction model, and optimization algorithm to obtain a predicted dye combination;

[0089] Furthermore, the dye data, target color, pre-trained color prediction model and optimization algorithm are combined to obtain the predicted dye combination. The process diagram for obtaining the predicted dye combination can be referred to Figure 2 , as follows:

[0090] Step 1: Determine the range of dye types, dye ratios, and dye concentrations available based on dye data;

[0091] Step 2: Randomly generate a set of dye combinations, including: dye type, dye ratio and dye concentration;

[0092] Step 3: Input the dye combination, dye characteristics, and given dyeing condition data into the pre-trained color prediction model to obtain the Lab value of the predicted color;

[0093] Step 4: Calculate the color deviation between the Lab value of the predicted color and the Lab value of the target color;

[0094] Step 5: Based on the color deviation, use the optimization algorithm to update the dye combination so that it is updated in the direction of decreasing color deviation;

[0095] Step 6: Iterate steps 3 to 5 until the preset number of iterations is reached or the color deviation is less than the preset threshold;

[0096] Step 7: Output the dye combination with the minimum color deviation as the predicted dye combination;

[0097] Furthermore, the color deviation was calculated by using the CIEDE2000 color difference formula;

[0098] Furthermore, the optimization algorithm may be selected from genetic algorithm, particle swarm algorithm, simulated annealing algorithm, etc.;

[0099] Furthermore, the preset number of iterations and the preset threshold are set to 150 and 1.0, respectively.

[0100] By combining color model prediction and intelligent algorithm optimization, color deviation can be significantly reduced. At the same time, the correlation between dye characteristics and dyed fabric properties obtained from the pre-trained color prediction model is used to maintain fabric properties, thereby improving the efficiency and accuracy of dye color formula acquisition.

[0101] S4. Construct a dye combination optimization model based on Markov decision-making, define the state space, action space and reward function of the Markov decision process, select DQN as the backbone network, and use historical dyeing data to train the dye combination optimization model. Then, input the predicted dye combination and current dyeing parameter data into the trained dye combination optimization model for optimization to obtain the optimal dye combination.

[0102] Furthermore, DQN, the full name of which is Deep Q Network, is a model-free reinforcement learning algorithm that does not require knowledge of state transition probabilities;

[0103] Furthermore, the process of training the dye combination optimization model using historical dyeing data includes:

[0104] Obtain historical coloring data and define a Markov decision environment;

[0105] Among them, the Markov decision environment includes: state space, action space and reward function;

[0106] Build a DQN network and randomly initialize the weights of the DQN network;

[0107] The historical coloring data is input into the DQN network for training, and the DQN network is iterated cyclically in combination with Markov decision making until convergence, that is, the Q value output by the DQN network no longer changes significantly;

[0108] Furthermore, the predicted dye combination and current dyeing parameter data are input into the trained dye combination optimization model for optimization to obtain the optimal dye combination.

[0109] By combining Markov decision making and the DQN network, it is possible to dynamically adjust the dye combination according to the current dyeing parameter data during the dyeing process, overcome the influence of fluctuations in factors such as temperature and pH value during the dyeing process, learn the optimal dye combination strategy under different states, and improve the performance of dyed fabrics while minimizing color deviation, thereby effectively improving the efficiency and accuracy of dye color formula acquisition.

[0110] Furthermore, the state space includes: dye combination, dyeing parameters and initial color; the action space includes: dye combination adjustment and dyeing parameter adjustment; the reward function includes: color deviation, color fastness, dye cost, color change response time and antibacterial rate;

[0111] Furthermore, the values in both the state space and the action space need to be discretized;

[0112] Furthermore, the reward function R(s,a,s') defines the reward obtained after taking action a in state s and transitioning to state s', which can be expressed as:

[0113] ;

[0114] in, Indicates color deviation; and They are the grades of color fastness to washing and color fastness to light; is the dye cost; 、 、 、 and is the corresponding weight, which is used to balance color deviation, color fastness, dye cost, color change response time and antibacterial rate;

[0115] Furthermore, the color fastness to washing grades and color fastness to light grades are obtained through the tests of "GB / T3921-2008 Textiles - Tests for Color Fastness to Washing - Color Fastness to Soaping" and "GB / T8427-2008 Textiles - Tests for Color Fastness to Light: Sunlight Exposure Method" respectively, and are obtained by staining rating using the gray card;

[0116] Furthermore, the color fastness to washing grade and the color fastness to light grade range from 1 to 5, with higher grades indicating better results.

[0117] In order to further illustrate the effectiveness of the dye combination optimization method based on Markov decision, a group of data was randomly selected for testing. The data included a set of predicted dye combinations and corresponding current dyeing parameter data. One set of data used the dye combination optimization method based on Markov decision proposed in the present invention to obtain used and unused dyeing results, which were mainly reflected in color deviation, wash fastness grade, discoloration response time, and antibacterial rate. The dye combination optimization test results can be referred to Table 4.

[0118] Table 4. Dye combination optimization test results

[0119]

[0120] As shown in Table 4, the dye combination optimization method based on Markov decision-making proposed in the present invention can further optimize the dye combination and improve the photosensitivity and antibacterial properties of the silk-cotton knitted printed fabric after dyeing. This can maintain color consistency and enable the dye color formula based on the silk-cotton knitted printed fabric to have a composite function.

[0121] By defining a Markov decision environment, namely the state space, action space, and reward function, the DQN network can learn in loop iterations how the dynamic changes in parameters during the dyeing process affect dye combination allocation, color deviation, color fastness, dye cost, color change response time, and antibacterial rate, thereby obtaining a more accurate dye color formula.

[0122] In this embodiment, a method for obtaining the dye color formula of silk-cotton knitted printed fabric is proposed; the method combines dye data, target color, a pre-trained color prediction model and an optimization algorithm to obtain a predicted dye combination; then, a dye combination optimization model based on Markov decision is constructed, and the dye combination optimization model is trained using historical dyeing data. Finally, the predicted dye combination and current dyeing parameter data are input into the trained dye combination optimization model for optimization to obtain the optimal dye combination; this method, combined with deep learning, Markov decision and intelligent algorithms, can effectively improve the efficiency and accuracy of dye color formula acquisition.

[0123] Example 2

[0124] The present invention provides a system for obtaining dye color formula of silk cotton knitted printed fabrics. The structure of the system can refer to Figure 3 , including: system control module, data acquisition module, color prediction module, dye combination prediction module, dye combination optimization module and output module;

[0125] The system control module is used to control the start, pause and stop of the system;

[0126] Reference Figure 1 S1 in the embodiment is applied to a data acquisition module of a dye color formula acquisition system for a silk-cotton knitted printed fabric. The data acquisition module is used to acquire dye data, target color, current dyeing parameter data, and historical dyeing data. The dye data includes dye characteristics, dye type, dye ratio, and dye concentration.

[0127] Reference Figure 1 S2 in the embodiment is applied to a color prediction module of a dye color formula acquisition system for a silk-cotton knitted printed fabric. The color prediction module is used to input historical dye color formula data into a color prediction model based on dye characteristic feature embedding for training to obtain a pre-trained color prediction model.

[0128] Reference Figure 1 S3 in the above example is applied to a dye combination prediction module of a dye color formula acquisition system for silk-cotton knitted printed fabrics. The dye combination prediction module is used to combine dye data, target color, pre-trained color prediction model and optimization algorithm to obtain a predicted dye combination.

[0129] Furthermore, the process of the dye combination prediction module obtaining the predicted dye combination is as follows:

[0130] Step 1: Determine the range of dye types, dye ratios, and dye concentrations available based on dye data;

[0131] Step 2: Randomly generate a set of dye combinations, including: dye type, dye ratio and dye concentration;

[0132] Step 3: Input the dye combination, dye characteristics, and given dyeing condition data into the pre-trained color prediction model to obtain the Lab value of the predicted color;

[0133] Step 4: Calculate the color deviation between the Lab value of the predicted color and the Lab value of the target color;

[0134] Step 5: Based on the color deviation, use the optimization algorithm to update the dye combination so that it is updated in the direction of decreasing color deviation;

[0135] Step 6: Iterate steps 3 to 5 until the preset number of iterations is reached or the color deviation is less than the preset threshold;

[0136] Step 7: Output the dye combination with the smallest color deviation as the predicted dye combination.

[0137] In order to illustrate the effectiveness of the dye combination prediction method proposed in the present invention, 100 target colors were randomly selected and their Lab values were calculated; the dyeing condition data were dyeing temperature, pH value, dyeing time, and bath ratio; two sets of dyeing condition data were given, the left side was recorded as condition one, and the data were 75°C, 9.7, 40 min, and 1:15; the right side was recorded as condition two, and the data were 85°C, 10.3, 55 min, and 1:19; two different methods were used to predict dye combinations, and the corresponding predicted dye combinations were obtained. The color values obtained by dyeing with the predicted dye combinations were compared with the target colors to obtain the reasonable proportions of dyeing results under different conditions by different dye combination prediction methods; the left side corresponds to the proportion under condition one, and the right side corresponds to the proportion under condition two; wherein the method includes: the method used by the dye combination prediction module, recorded as method one; the optimization algorithm in step 5 was replaced by manually updating the dye combination, and the rest remained unchanged, recorded as method two; the effectiveness test results of the dye combination prediction method are shown in Table 5.

[0138] Table 5. Validity test results of dye combination prediction method

[0139]

[0140] As can be seen from Table 5, the dye combination prediction method proposed in the present invention (method 1) is better than method 2 in predicting the actual dyeing effect of the dye combination. This shows that the optimization algorithm combined with the pre-trained color prediction model can provide more accurate dye combinations, thereby improving the efficiency and accuracy of dye color formula acquisition.

[0141] Reference Figure 1 S4 in the embodiment is applied to a dye combination optimization module of a dye color formula acquisition system for a silk-cotton knitted printed fabric. The dye combination optimization module is used to input the predicted dye combination and current dyeing parameter data into a trained dye combination optimization model based on Markov decision-making for optimization to obtain the optimal dye combination.

[0142] Furthermore, the dye combination optimization module trains the dye combination optimization model in the following process:

[0143] Obtain historical coloring data and define a Markov decision environment;

[0144] Among them, the Markov decision environment includes: state space, action space and reward function;

[0145] Build a DQN network and randomly initialize the weights of the DQN network;

[0146] The historical coloring data is input into the DQN network for training, and the DQN network is iterated cyclically in combination with Markov decision making until convergence, that is, the Q value output by the DQN network no longer changes significantly.

[0147] The output module is used to output the optimal dye combination.

[0148] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A method for obtaining a dye color formula for a silk-cotton knitted printed fabric, characterized in that: include: Acquire dye data, target color, current dyeing parameter data, and historical dyeing data of silk cotton knitted printed fabrics; wherein the dye data includes: dye characteristics, dye types, dye ratio, and dye concentration; and the historical dyeing data includes: historical dye data, historical dyeing parameter data, and historical dyeing result data; Constructing a color prediction model based on dye characteristic feature embedding, inputting historical dye color formula data into the color prediction model for training to obtain a pre-trained color prediction model; combining the dye data, the target color, the pre-trained color prediction model and the optimization algorithm to obtain a predicted dye combination; the historical dye color formula data includes historical dye data and historical dyeing parameter data; The color prediction model based on dye characteristic feature embedding includes: an input layer, a feature extraction layer, a weighted self-attention layer based on dye characteristic feature embedding, a fully connected layer, and an output layer; wherein the input layer converts the historical dye color formula data into data features; the feature extraction layer further extracts the data features to obtain deep features; the weighted self-attention layer based on dye characteristic feature embedding combines the dye characteristic features and the weighted self-attention mechanism to process the deep features to obtain attention features; the fully connected layer converts the attention features into predicted color features; and the output layer outputs the predicted color results based on the predicted color features. A dye combination optimization model based on Markov decision is constructed, the state space, action space and reward function of the Markov decision process are defined, DQN is selected as the backbone network, and the dye combination optimization model is trained using the historical dyeing data. The predicted dye combination and the current dyeing parameter data are then input into the trained dye combination optimization model for optimization to obtain the optimal dye combination.

2. The method for obtaining a dye color formula for a silk cotton knitted printed fabric according to claim 1, wherein: The current dyeing parameter data includes: dyeing time, dyeing temperature, pH value and dyeing bath ratio; the historical dyeing result data includes historical color data, historical color fastness data, historical color change response data and historical antibacterial rate data.

3. The method for obtaining a dye color formula for a silk cotton knitted printed fabric according to claim 1, wherein: The weighted self-attention layer based on dye characteristic feature embedding linearly transforms the deep features and the dye characteristic features to obtain their respective query matrices, key matrices and value matrices; the query matrix, key matrix and value matrix of the deep features are weightedly fused according to the learnable weight parameters and the query matrix, key matrix and value matrix of the dye characteristic features to obtain the fused query matrix, key matrix and value matrix, and the attention features are obtained in combination with the calculation formula of the attention weight.

4. The method for obtaining a dye color formula for a silk cotton knitted printed fabric according to claim 1, wherein: The specific steps of combining the dye data, the target color, the pre-trained color prediction model and the optimization algorithm to obtain the predicted dye combination include: Step 1: Determine the dye type range, dye ratio range, and dye concentration range based on the dye data; Step 2: randomly generating a set of dye combinations, including: the dye type, the dye ratio, and the dye concentration; Step 3: Inputting the dye combination, the dye characteristics, and the given dyeing condition data into the pre-trained color prediction model to obtain the Lab value of the predicted color; Step 4: Calculate the color deviation between the Lab value of the predicted color and the Lab value of the target color; Step 5: Based on the color deviation, use the optimization algorithm to update the dye combination so as to update it in a direction of decreasing the color deviation; Step 6: Iterate steps 3 to 5 until the preset number of iterations is reached or the color deviation is less than the preset threshold; Step 7: Output the dye combination with the minimum color deviation as the predicted dye combination.

5. The method for obtaining a dye color formula for a silk cotton knitted printed fabric according to claim 1, wherein: The process of training the dye combination optimization model using the historical dyeing data includes: Obtaining the historical dyeing data and defining a Markov decision environment; Wherein, the Markov decision environment includes: the state space, the action space and the reward function; Construct a DQN network, randomly initialize the weights of the DQN network; input the historical coloring data into the DQN network and perform cyclic iteration on the DQN network in combination with Markov decision making until convergence.

6. The method for obtaining a dye color formula for a silk cotton knitted printed fabric according to claim 5, characterized in that: The state space includes: dye combination, dyeing parameters and initial color; the action space includes: dye combination adjustment and dyeing parameter adjustment; the reward function includes: color deviation, color fastness, dye cost, color change response time and antibacterial rate.

7. A system for obtaining dye color formula for silk cotton knitted printed fabrics, characterized in that: include: System control module, data acquisition module, color prediction module, dye combination prediction module, dye combination optimization module and output module; Wherein, the system control module is used to control the start, pause and stop of the system; The data acquisition module is used to obtain dye data, target color, current dyeing parameter data and historical dyeing data; wherein the dye data includes: dye characteristics, dye types, dye ratio and dye concentration; the historical dyeing data includes: historical dye data, historical dyeing parameter data and historical dyeing result data; The color prediction module is used to input historical dye color formula data into a color prediction model based on dye characteristic feature embedding for training to obtain a pre-trained color prediction model; the historical dye color formula data includes historical dye data and historical dyeing parameter data; The color prediction model based on dye characteristic feature embedding includes: an input layer, a feature extraction layer, a weighted self-attention layer based on dye characteristic feature embedding, a fully connected layer, and an output layer; wherein the input layer converts the historical dye color formula data into data features; the feature extraction layer further extracts the data features to obtain deep features; the weighted self-attention layer based on dye characteristic feature embedding combines the dye characteristic features and the weighted self-attention mechanism to process the deep features to obtain attention features; the fully connected layer converts the attention features into predicted color features; and the output layer outputs the predicted color results based on the predicted color features. The dye combination prediction module is used to combine the dye data, the target color, the pre-trained color prediction model and the optimization algorithm to obtain a predicted dye combination; The dye combination optimization module is used to input the predicted dye combination and the current dyeing parameter data into a trained dye combination optimization model based on Markov decision making to optimize and obtain an optimal dye combination; The output module is used to output the optimal dye combination.

Citation Information

Patent Citations

  • Dyeing formula optimization method based on multi-model collaboration

    CN117807891A

  • Dyeing method and device based on dyeing prediction model, computer equipment and storage medium

    CN119782924A