A method for detecting color deviation of a textile
By acquiring digital images of textiles, extracting color features, and performing cluster analysis to construct a color distribution feature vector, the problem of rapidly and accurately acquiring the color deviation distribution features on the surface of textiles was solved. This enabled dynamic feedback control of textile color quality and improved product quality stability.
Patent Information
- Application Number
- CN202411411078.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-10-10
AI Technical Summary
In the textile production process, existing technologies struggle to quickly and accurately obtain the distribution characteristics of color deviations on the textile surface, and lack effective means to discover and capture the correlation characteristics of color deviations, which affects the stability of product quality.
By acquiring digital images of textiles, extracting fabric structural features and dividing them into regular sub-regions, calculating color histogram features, performing cluster analysis and mapping to a standard color sample library, constructing a color distribution feature vector, calculating Euclidean distance, identifying color deviation quantification indicators, and conducting time series analysis in continuous production to predict color deviation trends and propagation paths, and generating process parameter adjustment strategies.
It enables dynamic feedback control of textile color quality, identifies and controls color deviations, and improves product quality stability.
Smart Images

Figure CN119515776B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of information technology, and in particular to a textile color deviation detection method. BACKGROUND
[0002] In the process of textile production, due to the differences in raw materials, dye ratio, process parameters and other factors, the color of products of different batches and different production lines often has certain deviation. In order to quantitatively evaluate the degree of color deviation, an objective and accurate color deviation detection method needs to be introduced. The traditional methods of naked eye observation or color difference instrument measurement can only obtain single-point color deviation value, and cannot fully reflect the distribution of the color deviation of the entire textile surface. Moreover, the size of the color deviation value is greatly affected by the selection of the measurement position, and the measurement results at different positions are obviously different, resulting in poor consistency and repeatability of color deviation evaluation. How to quickly, accurately and comprehensively obtain the distribution characteristics of color deviation in the entire surface range of the textile has become a technical problem to be solved. At the same time, in the actual process of textile production, due to some unknown systematic factors, the color deviation may show certain correlation and propagation between different batches and different production lines, but at present there is a lack of effective technical means to find and capture these correlation characteristics, it is difficult to timely warn and control the production process, and finally affect the quality stability of the product is a technical problem to be solved. SUMMARY
[0003] The present application provides a textile color deviation detection method, mainly comprising:
[0004] Obtaining a digital image of the textile to be detected, extracting fabric structure features, dividing the image into regular sub-regions, extracting color histogram features of each sub-region, and obtaining color feature vectors of the sub-regions;
[0005] Performing cluster analysis on the color feature vectors of each sub-region, mapping each sub-region to a color category in a pre-established standard color sample library according to the cluster results, and obtaining color category labels of the sub-regions;
[0006] According to the color category labels of the sub-regions, the number of sub-regions corresponding to each color category is counted, the area proportion is calculated, and a color distribution feature vector with color category as the dimension is constructed to represent the overall color distribution of the textile;
[0007] According to the overall color distribution, selecting a standard sample of the same type in the standard color sample library, extracting its color distribution feature vector, calculating the Euclidean distance between the color distribution feature vectors of the current textile and the standard sample, and obtaining a color deviation quantitative index;
[0008] In continuous multi-batch production, the color deviation quantitative index of each batch of products is obtained, a color deviation index time sequence is constructed, and the color deviation index sequences of different batches are aligned;
[0009] On the aligned color deviation index time sequence, the color concentricity index of the current batch and each previous batch is calculated, and when the color concentricity index is lower than a preset threshold, it is determined whether there is a color deviation propagation trend;
[0010] The color deviation quantitative index of the current batch is predicted, and if the predicted value exceeds a preset color deviation threshold range, the influencing factors and propagation path of the color deviation are determined in combination with the color concentricity calculation result;
[0011] According to the influencing factors and propagation path of the color deviation, a corresponding process parameter adjustment strategy is generated, and the upstream key process causing the color deviation is located and tracked.
[0012] The technical scheme provided by the embodiment of the present application can include the following beneficial effects:
[0013] The present application discloses a kind of textile color deviation detection method.The method is by obtaining textile digital image, extracts color feature, constructs color distribution feature vector, calculates and standard sample's color deviation.In continuous production, the color deviation index of multiple batches of products is analyzed in time sequence, color concentricity is calculated, and color deviation trend is predicted.By constructing color deviation propagation network, key propagation path is identified, which is mapped to specific process.Using process and color deviation correlation matrix, the contribution of each process is quantified, the upstream key process is traced back, and the source of color deviation is determined.Finally, targeted process parameter adjustment strategy is generated, and dynamic feedback control of textile color quality is realized.The present application can effectively identify and control color deviation in textile production process, improve product quality stability. BRIEF DESCRIPTION OF DRAWINGS
[0014] Figure 1 It is a flow chart of the textile color deviation detection method of the present application.
[0015] Figure 2 It is a schematic diagram of the textile color deviation detection method of the present application.
[0016] Figure 3 It is another schematic diagram of the textile color deviation detection method of the present application. DETAILED DESCRIPTION
[0017] For further understanding of the present application, the application will be described in detail with reference to the drawings and embodiments. The application will be further described in detail with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related application, but not to limit the application. In addition, it should be noted that, for the convenience of description, only the parts related to the application are shown in the drawings.
[0018] As Figure 1 -3, the textile color deviation detection method can specifically include:
[0019] S101, obtaining a digital image of the textile to be detected, extracting fabric structure features, dividing the image into regular sub-regions, extracting color histogram features of each sub-region, and obtaining color feature vectors of the sub-regions.
[0020] Obtaining a digital image of the textile to be detected, the digital image containing fabric structure information and color information; extracting fabric structure features of the digital image to obtain a structure feature image of the textile; dividing the structure feature image into sub-regions to obtain a plurality of regular sub-regions; performing color space conversion on the regular sub-regions, the color space conversion being from RGB color space to HSV color space; performing color quantization processing on the converted HSV color space image to obtain a plurality of color intervals; counting the number of pixels of each color interval in each regular sub-region to generate a color histogram; performing normalization processing on the color histogram to obtain a sub-region color feature vector; calculating the statistical features of the sub-region color feature vector to form a comprehensive feature vector of the entire image; using K-neighbor algorithm to classify the comprehensive feature vector, wherein the value of K is set to a preset value; determining the structure features and color features of the textile to be detected according to the classification result of the K-neighbor algorithm.
[0021] For example, after acquiring a digital image of the textile to be detected, a Gabor filter is used to extract the fabric structure features. Based on the extracted feature information, the image is divided into multiple regular sub-regions. Color space conversion is then performed on the sub-regions, converting them from RGB to HSV color space. Color quantization is performed on the converted HSV color space image, dividing the H channel into 18 intervals, and the S and V channels each into 3 intervals, resulting in a total of 162 color intervals. The number of pixels in each color interval within each sub-region is counted to generate a 162-dimensional color histogram. The histogram data is normalized to obtain the sub-region color feature vector. For each sub-region, the mean, variance, skewness, and kurtosis of the color feature vector are calculated to form a four-dimensional statistical feature vector. The statistical feature vectors of all sub-regions are concatenated to form the comprehensive feature vector of the entire image. The K-nearest neighbor algorithm is used to classify the feature vectors, with K set to 5, and Euclidean distance used as the distance metric. Training samples are selected from a pre-labeled sample database. For each new input textile image feature vector, the five nearest neighbor samples are found in the training samples. The majority class of these five samples is used as the classification result of the new sample. The classification result is output, completing the structural and color feature analysis of the textile to be detected. A digital image of the textile to be detected is acquired, with a resolution of 2048x2048 pixels. A Gabor filter is used to extract the fabric structural features, with filter parameters set to a frequency of 0.1, orientation angles of 0°, 45°, 90°, and 135°, and a filter size of 15x15 pixels. Based on the extracted feature information, the image is divided into 16x16 regular sub-regions, each with a size of 128x128 pixels. RGB to HSV (hue, saturation, value) color space conversion is performed on each sub-region, with the conversion formulas V = max(R, G, B), S = (V - min(R, G, B)) / V, and H is calculated differently depending on the maximum RGB value. Color quantization was performed on the HSV color space. The H channel was divided into 18 intervals, each 20° apart, and the S and V channels were each divided into 3 intervals: 0–0.33, 0.33–0.66, and 0.66–1, resulting in a total of 162 color intervals. The number of pixels in each color interval within each sub-region was counted to generate a 162-dimensional color histogram. The histogram data was normalized to obtain the color feature vectors of the sub-regions. The mean, variance, skewness, and kurtosis of the color feature vectors of each sub-region were calculated to form a four-dimensional statistical feature vector. For example, the statistical feature vector of a certain sub-region might be [0.35, 0.12, 0.78, 2.45]. The statistical feature vectors of all 256 sub-regions were concatenated to form a 1024-dimensional comprehensive feature vector for the entire image. The K-nearest neighbor algorithm was used for classification, with K set to 5, and Euclidean distance used as the distance metric.Training samples are selected from 10,000 pre-labeled sample images. For the feature vector of a newly input textile image, the Euclidean distance between it and the training samples is calculated, and the five samples with the smallest distance are selected. Assuming that three of these five samples belong to category A and two belong to category B, the new sample is classified as category A. The classification result is output, completing the structural and color feature analysis of the textile to be detected.
[0022] S102. Perform cluster analysis on the color feature vectors of each sub-region, and map each sub-region to the color category in the pre-established standard color sample library according to the clustering results to obtain the color category label of the sub-region.
[0023] Obtain the color feature vectors of each sub-region, and cluster them using the K-means clustering method, where the number of clusters K is a preset value. Based on the clustering results, compare the color feature vectors of the sub-regions with samples in a pre-established standard color sample library, which contains a preset number of common colors. Determine the color category label corresponding to each sub-region and generate a sub-region color category label matrix, where each element represents the color category number of the corresponding sub-region. Perform smoothing processing on the color category label matrix. If the color category of a sub-region is different from the color category of its neighboring sub-regions, and the area of the sub-region is less than a preset threshold, then adjust the color category of the sub-region to be the same as the color category of its largest neighboring area. Calculate the silhouette coefficient of the clustering results and determine whether the silhouette coefficient is less than a preset threshold. If the silhouette coefficient is less than the preset threshold, increase the number of clusters K and re-execute the clustering process.
[0024] For example, K-means clustering analysis is performed on the color feature vectors of each sub-region. The number of clusters, K, is set to 10. The K-means++ algorithm is used to select initial cluster centers. By calculating the Euclidean distance from the color feature vector of each sub-region to each cluster center, the sub-region is assigned to the category of the nearest cluster center. The center point of each cluster is recalculated, which is the average value of all color feature vectors within that cluster. The cluster centers are updated, and the distance calculation and category assignment process is repeated until the distance moved by the cluster center is less than a preset threshold of 0.001 or the maximum number of iterations (100) is reached. Based on the clustering results, the color feature vector of each sub-region is compared with samples in a pre-established standard color sample library. The standard color sample library contains 100 common colors, each represented by an HSV value. The color difference between the sub-region's color feature vector and the colors in the sample library is calculated using the CIEDE2000 color difference formula. The standard color sample with the smallest color difference is selected as the color category of that sub-region. For each sub-region, a corresponding color category label is assigned, generating a sub-region color category label matrix. Each element in the matrix represents the color category number of the corresponding sub-region. The color category label matrix is smoothed. If the color category of a sub-region differs from that of its neighboring sub-regions, and the area of the sub-region is less than a preset threshold, the color category of the sub-region is adjusted to be the same as that of its largest neighboring area. The silhouette coefficient of the clustering results is calculated to evaluate the clustering quality. If the silhouette coefficient is less than a preset threshold of 0.5, the number of clusters K is increased and the clustering process is repeated. K-means clustering analysis is performed on the color feature vectors of each sub-region, with the initial number of clusters K set to 10. The K-means++ algorithm is used to select the initial cluster centers. Specifically, the first center point is randomly selected, and then the shortest distance from each point to the selected center point is calculated. The next center point is selected with probability based on the square of the distance, and this process is repeated until K center points are selected. Assuming there are 1000 sub-regions, and the color feature vector of each sub-region is 162-dimensional, the Euclidean distance from the color feature vector of each sub-region to each cluster center is calculated, and the sub-region is assigned to the category of the nearest cluster center. The center point of each cluster is recalculated, which is the average value of all color feature vectors within that cluster. After updating the cluster centers, iteration stops if the maximum distance between the old and new center points is less than a preset threshold of 0.001 or the maximum number of iterations (100) is reached. Based on the clustering results, the color feature vector of each sub-region is compared with samples in a pre-established standard color sample library. The standard color sample library contains 100 common colors, each represented by an HSV value, such as red (0, 100, 100), blue (240, 100, 100), etc. The CIEDE2000 color difference between the sub-region's color feature vector and the colors in the sample library is calculated, and the standard color sample with the smallest color difference is selected as the color category of that sub-region.For each sub-region, a corresponding color category label is assigned, generating a 32x32 sub-region color category label matrix. Each element in the matrix ranges from 1 to 100, representing the color category number of the corresponding sub-region. The color category label matrix is smoothed using a 3x3 window median filter to reduce isolated color categories. If the color category of a sub-region differs from that of its neighboring sub-regions, and the area of the sub-region is less than 9 pixels, then the color category of the sub-region is adjusted to be the same as that of its largest neighboring area. Finally, the silhouette coefficient of the clustering results is calculated to evaluate the clustering quality. The silhouette coefficient is calculated by taking the average distance *a* between each sample and other samples in the same class, and the average distance *b* between each sample and the nearest other sample in another class. The silhouette coefficient is the average of (b-a) / max(a, b). If the silhouette coefficient is less than a preset threshold of 0.5, the number of clusters K is increased by 2, and the clustering process is repeated until the silhouette coefficient is greater than 0.5 or K reaches 20.
[0025] S103. Based on the color category labels of the sub-regions, count the number of sub-regions corresponding to each color category, calculate their area ratio, and construct a color distribution feature vector with color category as the dimension to represent the overall color distribution of the textile.
[0026] The system receives matrix data containing color category labels for sub-regions and preprocesses the matrix data according to a preset color category range. If invalid or erroneous data is detected, it is corrected to valid values. The preprocessed color category label matrix is obtained, and an area counter is built for each color category. By traversing each element in the matrix and accumulating the sub-region area of the corresponding color category, the total area statistics for each color category are obtained. The total area of all sub-regions is used as the denominator, and the total area of each color category is used as the numerator to calculate the area proportion of the sub-region corresponding to each color category. The area proportion of each color category is determined; if the proportion is less than a preset threshold, the color category is merged into the most similar color category, and the similarity is determined by calculating the Euclidean distance in the HSV space. A color distribution feature vector is constructed, where the vector dimension is the same as the number of merged color categories; the feature vector is standardized to obtain the final color distribution feature vector.
[0027] For example, the color category label matrix of the sub-regions is preprocessed to check and correct invalid or erroneous data, setting label values outside the predetermined color category range to the closest valid values. Based on the processed color category label matrix, the actual area of the sub-regions corresponding to each color category is calculated. A color category area counter is created, iterating through each element in the matrix and accumulating the actual area of the sub-regions corresponding to the color category to obtain the total area statistics for each color category. The area percentage of the sub-regions corresponding to each color category is calculated, using the total area of all sub-regions as the denominator and the total area of each color category as the numerator to obtain the area percentage of each color category. Color categories are then merged, with a threshold of 0.01. Color categories with an area percentage less than the threshold are merged into the most similar color category. The similarity is determined by calculating the Euclidean distance of the color values in the HSV space. A color distribution feature vector is constructed, with the vector dimension matching the number of merged color categories. Each dimension corresponds to one color category, and the vector element value is the area percentage of that color category. The color distribution feature vector is standardized using z-score, and the z-score of each element is calculated as z-score = (x - μ) / σ, where x is the element value, μ is the vector mean, and σ is the vector standard deviation. The standardized z-score is restricted to the range [-3, 3], and values outside the range are set as boundary values to obtain the final color distribution feature vector. The entropy value of the color distribution feature vector is calculated to evaluate the uniformity of the color distribution, and the entropy value = -Σ(pi * log2(pi)), where pi is the area proportion of the i-th color category. The 32x32 sub-region color category label matrix is preprocessed to check and correct invalid or erroneous data. Assuming that the effective color category range is 1-100, label values outside this range are set to the closest effective value. For example, if the label value is found to be 0 or 101, it is corrected to 1 and 100 respectively. Based on the processed matrix, the actual area of the sub-region corresponding to each color category is calculated. Assuming each sub-region is 10x10 pixels, a 100-dimensional array of color category area statistics is created. The 1024 elements in the matrix are traversed, and the area of each color category is accumulated to 100 square pixels. When calculating the area percentage, 1024000 square pixels are used as the denominator, and the total area of all color categories is used as the numerator. Color categories are merged, with a threshold of 0.01. For example, if red has a percentage of 0.005 and orange has a percentage of 0.008, these two colors are merged into the most similar color category, and the similarity is determined by calculating the Euclidean distance in HSV space. A color distribution feature vector is constructed. Assuming 50 color categories remain after merging, a 50-dimensional vector is generated, with each dimension corresponding to the area percentage of one color category. This 50-dimensional vector is then z-score standardized, and the z-score of each element is calculated.If a certain color category has a proportion of 0.15, a vector mean of 0.02, and a standard deviation of 0.03, then the z-score of that element is (0.15 - 0.02) / 0.03 = 4.33. Restricting the z-score to the range [-3, 3], 4.33 is set to 3. Finally, the entropy value of the color distribution feature vector is calculated to evaluate the uniformity of the color distribution. Assume the standardized vector is...
[0028] [0.1, 0.2, 0.15, 0.05, ...], calculate -Σ(pi*log2(pi)) to obtain the entropy value, which is used to measure the complexity of the color distribution.
[0029] S104. Based on the overall color distribution, select standard samples of the same type from the standard color sample library, extract their color distribution feature vectors, calculate the Euclidean distance between the color distribution feature vectors of the current textile and the standard samples, and obtain the color deviation quantification index.
[0030] Based on the color distribution feature vector of the textile, the top preset standard samples with the highest similarity are selected as matching samples from the standard color sample library. The color distribution feature vectors of the preset matching standard samples are aligned with the feature vector of the textile. If the dimensions are inconsistent, upsampling is performed using linear interpolation or downsampling is performed using average pooling. The Euclidean distance between the color distribution feature vector of the textile and the color distribution feature vectors of the preset matching standard samples is calculated, and the weighted average of the preset distance values is used as the color deviation quantification index. It is determined whether the color deviation quantification index is greater than a preset threshold. If it is greater than the preset threshold, the color distribution feature vector of the textile is added to the standard color sample library. The newly added samples are cross-validated. If the validation passes, they are retained; otherwise, the newly added samples are removed.
[0031] For example, based on the overall color distribution feature vector of the textile, standard samples of the same type are selected from a standard color sample library. A color histogram similarity algorithm is used to calculate the similarity between the current textile and each standard sample in the sample library, and the top 5 standard samples with the highest similarity are selected as matching samples. The color distribution feature vectors of the selected 5 matching standard samples are extracted, and these feature vectors are dimensionally aligned with the feature vector of the current textile. If the dimensions are inconsistent, upsampling is performed using linear interpolation or downsampling using average pooling to ensure consistent feature vector dimensions. The Euclidean distance between the color distribution feature vector of the current textile and the color distribution feature vectors of the 5 matching standard samples is calculated, resulting in 5 distance values. The weighted average of these 5 distance values is calculated, with the weights determined according to the similarity ranking, and serves as the final color deviation quantification index. Based on the calculated color deviation quantification index, it is determined whether the color distribution of the current textile is within an acceptable range. If the deviation quantification index is greater than a preset threshold, the color distribution feature vector of the current textile is added to the standard color sample library as a new standard sample. The preset threshold is determined based on the statistical analysis results of historical data. Newly added samples undergo cross-validation to ensure their representativeness and reliability within the sample library. Samples that pass validation are retained; those that fail are removed. For example, a blue striped shirt has a 100-dimensional color distribution feature vector. In a color sample library containing 1000 standard samples, a color histogram similarity algorithm is used to calculate similarity. The algorithm divides the feature vector into 10 intervals, calculates the cumulative probability of each interval, and then compares the sum of the minimum values of the corresponding intervals for two vectors. The five samples with the highest similarity are selected, assuming their similarity scores are 0.95, 0.93, 0.91, 0.88, and 0.85. The feature vectors of these five samples are then dimensionally aligned, revealing that three are 80-dimensional and two are 120-dimensional. The 80-dimensional vectors are upsampled to 100-dimensional using linear interpolation, and the 120-dimensional vectors are downsampled to 100-dimensional using 2x2 average pooling. The Euclidean distances between the current shirt and five samples were calculated, yielding values of 3.2, 3.5, 3.8, 4.1, and 4.3. Weights of 0.3, 0.25, 0.2, 0.15, and 0.1 were assigned based on similarity, and the weighted average distance was calculated to be 3.58, serving as a quantification of color deviation. Assuming a preset threshold of 4.0 (based on statistical analysis of the past 1000 samples), 3.58 is less than 4.0, indicating the color distribution is within an acceptable range. If the distance is greater than 4.0, the shirt's feature vector is added to the sample library. When adding a new sample, 100 samples from the existing sample library are randomly selected for cross-validation. The average similarity between the new sample and these 100 samples is calculated; if the similarity is higher than 0.75, the sample is retained; otherwise, it is discarded.
[0032] S105. In continuous multi-batch production, obtain the color deviation quantitative index of each batch of products, construct the color deviation index time series, and align the color deviation index series between different batches.
[0033] The process involves acquiring quantitative color deviation indicators from multiple consecutive batches of products, recording the production timestamp for each batch, and constructing a time series of color deviation indicators. Key-value pairs are formed based on the timestamps and color deviation indicators and stored in a hash table. The sequence length is standardized across different batches, and a fixed time window size is set. If data points are sparse within a time period, linear interpolation is used to fill in missing data; if data points are dense, mean downsampling is used to reduce the number of data points. Outliers are identified using the moving median method, and it is determined whether a data point exceeds a preset multiple of the standard deviation. If it does, the data point is replaced with the average of the preceding and following data points. The processed data is then smoothed using single exponential smoothing. The batch with the longest time span is selected as the baseline sequence, and this batch is aligned with the baseline sequence. The Euclidean distance matrix between the two sequences is calculated. Based on the Euclidean distance matrix, the optimal matching path is found, the time axis is adjusted, and the aligned color deviation indicator sequence is obtained.
[0034] For example, color deviation quantification indicators for multiple consecutive batches of products are obtained, and the production timestamp of each batch is recorded to construct an initial color deviation indicator time series. The timestamps and corresponding color deviation indicators are stored as key-value pairs in a hash table. The sequence lengths of different batches are standardized, with a fixed time window size of 24 hours. For sparse data periods, linear interpolation is used to fill in missing data; for dense data periods, mean downsampling is used to reduce data points, ensuring consistent sequence lengths across all batches. The standardized time series undergoes data preprocessing. Outliers are identified using the 5-point moving median method, and data points exceeding three standard deviations are replaced with the average of preceding and following data points. The processed data is then smoothed using single exponential smoothing with a smoothing factor of 0.3. The color deviation indicator sequences of different batches are aligned. The batch with the longest time span is selected as the baseline sequence. Sequences of other batches are aligned with the baseline sequence using a dynamic time warping algorithm. The Euclidean distance matrix between the two sequences is calculated, and dynamic programming is used to find the optimal matching path. The time axis is adjusted to ensure temporal correspondence between similar patterns, resulting in the aligned color deviation indicator sequence. Taking textiles produced continuously for 30 days as an example, color deviation quantification is acquired hourly, resulting in a total of 720 data points. These data points are stored in a hash table with Unix timestamps as keys and deviation indices as values. A fixed 24-hour time window is set, dividing the 720 data points into 30 batches. For sparse batches, such as those with only 20 valid data points on a given day, linear interpolation is used to fill in the 4 missing points, selecting the adjacent points with the highest correlation coefficient for interpolation. For dense batches, such as those with 26 data points on a given day, the average of every 6 points is taken, downsampling to 24 points. For the uniformly long sequence, the 5-point moving median method is used to identify outliers, calculating the global standard deviation σ = 0.05. Data points exceeding the 3σ range are replaced with the average of the preceding and following data points. Then, single exponential smoothing is applied with a smoothing factor α = 0.3, resulting in a smoothed value St = 0.3 * Xt + 0.7 * St - 1, where Xt is the current observation and St - 1 is the previous smoothed value. Finally, the batch with the longest span within the 30-day period, such as day 1 to day 30, was selected as the baseline sequence. The Euclidean distance matrix between this batch and other batch sequences was calculated, with a matrix size of 24x24. Dynamic programming was used to find the path with the minimum distance sum. Based on this path, the timelines of other batches were adjusted to align the color deviation index sequences of all batches in time, facilitating subsequent analysis and comparison.
[0035] S106. On the aligned color deviation index time series, calculate the color concentricity index of the current batch and the previous batches. When the color concentricity index is lower than the preset threshold, determine whether there is a color deviation propagation trend.
[0036] The aligned color deviation index time series is obtained, and a sliding window processing is performed on the time series to calculate the color concentricity index based on the sliding window. It is then determined whether the color concentricity index is below a preset threshold. If the index is below the threshold, anomaly detection is performed, including identifying outliers and performing STL time series decomposition on the outliers to obtain trend components. These trend components are then predicted, and the color deviation propagation speed is calculated based on the prediction results. It is then determined whether the color deviation propagation speed exceeds a preset threshold. If so, the Mann-Kendall trend test is used for verification. Based on the Mann-Kendall trend test results, it is determined whether a significant color deviation propagation trend exists.
[0037] For example, a sliding window process is applied to the aligned color deviation index time series, with a window size of 24 hours and a step size of 1 hour. The most recent 10 batches are selected for comparison, and the Pearson correlation coefficient between the current batch and the selected batches within each window is calculated. This correlation coefficient is used as the color concentricity index. Based on the statistical distribution of historical data, a preset threshold of 0.8 for the color concentricity index is set. When the calculated color concentricity index is lower than this threshold, an anomaly detection mechanism is triggered. The Z-score method is used to identify outliers, and data points exceeding 3 standard deviations are marked as anomalies. The detected outliers are then subjected to STL (Season on and Trend decomposition using Loess) time series decomposition, which decomposes the series into trend, seasonal, and random components. The trend component is extracted, and Holt-Winters triple exponential smoothing is used to predict the trend component, with smoothing parameters α = 0.3, β = 0.1, and γ = 0.1. Based on the prediction results, the propagation speed of color deviation is calculated and defined as the first difference of the trend component. If the propagation speed exceeds a preset threshold of 0.05, a Mann-Kendall trend test is performed. If the p-value is less than 0.05, a significant color deviation propagation trend is determined, triggering an early warning mechanism and adjusting production parameters. Every 30 days, the statistical distribution of the color concentricity index is recalculated using the latest data, and the preset threshold is dynamically adjusted to adapt to different production environments and seasonal changes. Taking textiles produced continuously for 30 days as an example, the time series of aligned color deviation indices is processed. A 24-hour window is set, sliding once per hour to select the most recent 10 batches of data. Within each window, the Pearson correlation coefficient between the current batch and the other 9 batches is calculated, resulting in 9 color concentricity indices. Assume the index calculated within a certain window is...
[0038] [0.92, 0.88, 0.85, 0.79, 0.82, 0.90, 0.87, 0.91, 0.86]. Since 0.79 is below the preset threshold of 0.8, anomaly detection is triggered. Using the Z-score method, the mean μ = 0.867 and standard deviation σ = 0.041 are calculated. 0.79 is marked as an outlier, and (0.79 - 0.867) / 0.041 = -1.88, exceeding -3σ. STL decomposition is performed on the 720-hour (30-day) data containing this outlier to obtain trend, seasonal, and random components. The Holt-Winters method is used to predict the trend for the next 24 hours, with parameters α = 0.3, β = 0.1, and γ = 0.1. The first difference of the trend component is calculated as the propagation velocity, yielding 24 velocity values, with a maximum value of 0.06, exceeding the threshold of 0.05. A Mann-Kendall test was performed, yielding a p-value of 0.03 < 0.05, indicating a significant propagation trend. Simultaneously, the color concentricity index distribution was recalculated using data from the most recent 30 days, resulting in a new mean of 0.85 and a standard deviation of 0.05. Based on this, the preset threshold was adjusted from 0.8 to 0.83 to adapt to the current production environment.
[0039] S107. Predict the color deviation quantification index of the current batch. If the predicted value exceeds the preset color deviation threshold range, combine the color concentricity calculation results to determine the influencing factors and propagation path of color deviation.
[0040] Historical data of color deviation quantification index is acquired, and time series prediction is performed based on the historical data, with the color deviation quantification index value and its preset confidence interval as output; it is determined whether the predicted value of the color deviation quantification index exceeds a preset threshold range, wherein the preset threshold range is determined by the mean of the historical data; if the predicted value of the color deviation quantification index or its confidence interval exceeds the preset threshold range, sensitivity analysis is performed on the time points exceeding the threshold, and the first-order and global sensitivity indices of the color deviation quantification index to each production parameter are calculated; a color deviation propagation map is constructed based on the sensitivity analysis results, the propagation nodes and propagation paths of color deviation are determined, and the probability of each propagation path is calculated.
[0041] For example, based on historical data of the color deviation quantification index for the current batch, an ARIMA model is used for time series prediction to forecast the color deviation quantification index value for the next 24 hours, and the 95% confidence interval of the predicted value is calculated. Based on the statistical analysis results of historical data, a preset color deviation threshold range is set as mean ± 2 standard deviations. The predicted color deviation quantification index value is compared with the preset threshold range. If the predicted value or its confidence interval exceeds the threshold range, further analysis is triggered. Combining the color concentricity calculation results, Sobol sensitivity analysis is performed on the time points exceeding the threshold to calculate the first-order and global sensitivity indices of the color deviation quantification index to various production parameters, identifying the factors with the greatest impact on color deviation. Based on the analysis results of influencing factors, a Bayesian network color deviation propagation map is constructed. Probabilistic inference algorithms are used to trace the propagation path of color deviation, identify key propagation nodes and propagation paths, and calculate the probability of each propagation path. Through cross-validation, the dataset is divided into training and test sets. The model is built on the training set and the accuracy of the identified influencing factors and propagation paths is verified on the test set. The prediction accuracy and F1 score are calculated to evaluate the reliability of the analysis results. Taking 30 consecutive days of production data from a textile factory as an example, hourly color deviation quantification indicators were collected, totaling 720 data points. An ARIMA(2,1,2) model was used to fit the data and predict the color deviation index value for the next 24 hours. The prediction results showed that the predicted value for the 23rd hour was 0.158, with a 95% confidence interval of [0.142, 0.174]. Based on historical data analysis, the mean of the color deviation index was 0.12, and the standard deviation was 0.02; therefore, a preset threshold range was set to [0.08, 0.16]. Since the predicted value of 0.158 and its upper confidence interval of 0.174 exceeded the threshold range, further analysis was triggered. Sobol sensitivity analysis was performed on this time point, considering 10 production parameters including temperature, humidity, and dye concentration. The first-order sensitivity index of temperature was calculated to be 0.42, and the global sensitivity index was 0.51, indicating that temperature is the most influential factor. A Bayesian network was used to construct a color deviation propagation map containing these 10 parameters, and a variational inference algorithm was used to approximate the conditional probabilities between the parameters. The results showed that temperature had the highest probability of influencing the propagation path of color deviation by affecting dye solubility, with a probability of 0.38. Five-fold cross-validation was used, training the model on 80% of the data and validating it on 20%. Validation results showed that the model achieved an accuracy of 85% in identifying the main influencing factors, with an F1 score of 0.82, confirming the reliability of the analysis results.
[0042] Calculate the color deviation gradient between adjacent batches, determine the trend of deviation growth or weakening, identify the periodic pattern of color deviation between batches, construct a color deviation propagation network diagram, determine the propagation direction by the connection strength between nodes, and map the propagation direction to the process after combining it with the production process flow diagram to identify the propagation path.
[0043] Obtain the color deviation gradient between adjacent batches and calculate the deviation change rate at each time point; determine the increasing or decreasing trend of color deviation based on the deviation change rate; smooth the trend curve using the sliding window averaging method. Examine the color deviation time series; if the time series is non-stationary, perform differencing until it becomes stationary. Analyze the spectral characteristics of the stationary series; identify the main periodic components of the stationary series. Construct a color deviation propagation network diagram; treat each batch as a node and calculate the deviation correlation coefficient between adjacent batches; determine the connection strength between nodes based on the deviation correlation coefficient. Map the propagation network diagram to the production process flow chart; match the node timestamps of the propagation network diagram to the nearest process time point; calculate the in-degree and out-degree of each process node; combine the node importance score to identify the critical path of color deviation propagation.
[0044] For example, the color deviation gradient between adjacent batches is calculated, and the rate of change of deviation at each time point is calculated using a Savitzky-Golay filter. The sign of the rate of change indicates whether the deviation is increasing or decreasing. The trend curve is obtained by smoothing the data using a sliding window averaging method. An Augmented Dickey-Fuller (ADF) test is performed on the color deviation time series to determine its stationarity. If the series is non-stationary, differencing is performed until it becomes stationary. Wavelet transform is applied to the stationary series to analyze its spectral characteristics, identify the main periodic components, and combine this with autocorrelation function analysis to determine the periodic pattern of color deviation between batches. A color deviation propagation network graph is constructed, with each batch as a node. The connection strength between nodes is determined by the deviation correlation coefficient between adjacent batches. A transition probability matrix is defined, where the element Pij represents the transition probability from node i to node j, calculated as Pij = Wij / ΣkWik, where Wij is the connection strength between nodes i and j, and ΣkWik is the sum of the weights between node i and all its neighboring nodes k. The PageRank algorithm is used to iteratively calculate node importance and identify key propagation nodes. The propagation network diagram is mapped to the production process flowchart, and the nearest neighbor algorithm is used to match the timestamps of network nodes to the closest process time points. The in-degree and out-degree of each process node are calculated, and combined with the node importance score, the critical path of color deviation propagation is identified. Multiple sets of simulated data are generated using the Monte Carlo simulation method, and the critical path identification process is repeatedly executed. The frequency of each path being identified as a critical path is counted to verify the stability and reliability of the identification results. Taking 30 consecutive days of production data from a textile factory as an example, 24 color deviation data points are collected each day. The Savitzky-Golay filter with a window size of 15 and a polynomial order of 3 is used to calculate the deviation gradient, obtaining 720 gradient values. A 5-hour sliding window averaging method is used for smoothing to obtain the trend curve. An ADF test is performed on the original sequence; the p-value is 0.06 > 0.05, indicating that the sequence is non-stationary. After first differencing, the p-value decreases to 0.01 < 0.05, and the sequence becomes stationary. A db4 wavelet transform was applied to the stationary sequence, with a decomposition level of 4. Spectral characteristics were analyzed, revealing two main periods: 12-hour and 24-hour cycles. A 30x30 color deviation propagation network diagram was constructed, and the Pearson correlation coefficient between nodes was calculated as the connection strength. A transition probability matrix P was defined; for example, P12 = 0.15 indicates a transition probability of 0.15 from day 1 to day 2. The PageRank algorithm was used with a damping factor of 0.85, iterated 10 times, and node importance scores were obtained, with the highest score being 0.068. Network nodes were matched with 10 production processes, such as matching the node with the 14:30 timestamp to the 14:00 dyeing process. The average in-degree and out-degree of each process node were calculated, and combined with the importance scores, the "dyeing-drying-setting" path was identified as the critical propagation path.Through 1000 Monte Carlo simulations, the path was identified as the critical path in 92.5% of cases, validating the reliability of the results.
[0045] S108. Based on the influencing factors and propagation paths of color deviation, generate corresponding process parameter adjustment strategies and track and locate the upstream key processes that cause color deviation.
[0046] Acquire process parameters and color quality data, and establish a parameter sensitivity matrix to quantify the nonlinear influence of process parameters on color quality. Based on the process flow diagram and color deviation propagation network, locate the upstream key processes causing color deviation and establish an inter-process correlation matrix. Each node in the correlation matrix records the process timestamp and related parameters. Based on the parameter sensitivity matrix and upstream key process information, design a process parameter adjustment strategy, including using a genetic algorithm to optimize the adjustment range, where chromosome encoding is real number encoding. Construct a dynamic feedback controller for real-time control of textile color quality, where the control objective is to minimize the sum of squares of color deviations over the next N steps.
[0047] For example, based on the influencing factors and propagation paths of color deviation, a relationship model between process parameters and color quality is constructed. A parameter sensitivity matrix is established using the random forest regression method to quantify the nonlinear influence of each process parameter on color quality. Through a depth-first search algorithm, combined with the process flow diagram and color deviation propagation network, the upstream key processes causing color deviation are located, and an inter-process correlation matrix is established, with each node recording the process timestamp and related parameters. Based on the parameter sensitivity matrix and upstream key process information, a targeted process parameter adjustment strategy is established. A genetic algorithm is used to optimize the adjustment range, with chromosome encoding using real numbers to represent the adjustment amount of each parameter. Arithmetic crossover is used, and Gaussian mutation is used. The fitness function is the weighted sum of the reciprocal of the color deviation and the process constraints. A dynamic feedback controller is designed, and a model predictive control algorithm is used to achieve real-time control of textile color quality. A prediction model based on random forest is constructed, defining the control objective as minimizing the sum of squares of color deviations over the next N steps. The optimal control sequence is solved through quadratic programming. Process parameters are dynamically adjusted based on real-time monitoring data, and an anomaly warning mechanism is triggered when the deviation exceeds a preset threshold. A virtual production line was constructed using digital twin technology to conduct simulation experiments, verifying the effectiveness of the control strategy, evaluating the control performance under different parameter combinations, and optimizing the control parameter settings. Taking the dyeing process of a textile factory as an example, 1000 sets of data on 10 key process parameters, such as temperature, pH value, dye concentration, and color deviation, were collected. Random forest regression with 100 trees and a maximum depth of 10 was used to establish a parameter sensitivity matrix, obtaining the importance score of each parameter, such as temperature 0.25, pH value 0.18, and dye concentration 0.22. Using a depth-first search algorithm, color deviation was traced in a flowchart containing 20 process nodes, identifying three key upstream processes: ingredient preparation, pretreatment, and dyeing, and establishing a 3x3 process correlation matrix. A genetic algorithm was designed to optimize the parameter adjustment strategy, with a population size of 50, 100 iterations, and a chromosome length of 10 corresponding to the 10 parameters, a crossover probability of 0.8, and a mutation probability of 0.1. The fitness function was set as a weighted sum of the reciprocal of the color deviation and the degree of violation of process constraints, with a weight ratio of 0.7:0.3. Model predictive control was implemented with a prediction step size of N=5 and a control step size of M=3, employing rolling time-domain optimization. A prediction model based on random forest was constructed, with 50 trees and a maximum depth of 8. Real-time data was collected every 5 minutes to predict color deviation for the next 25 minutes. The optimal control sequence, such as temperature adjustment of [-0.5, 0.2, 0.1]℃, was solved using quadratic programming. A virtual production line was constructed using digital twin technology to simulate 100 batches of production. The standard deviation of color deviation before and after optimization was compared, decreasing from 0.15 to 0.08, thus verifying the effectiveness of the control strategy.
[0048] By combining the influencing factors of color deviation, a correlation matrix between process and color deviation is constructed to quantify the contribution of each process to the deviation. According to the propagation path of color deviation, the process is traced upstream step by step along the path. By combining the propagation network topology, key node processes are identified. By comparing the influence intensity of processes on different propagation paths, the upstream process group causing color deviation is determined. The upstream processes are prioritized to determine the source process of color deviation.
[0049] A correlation matrix between the process and color deviation is obtained. This correlation matrix is calculated using partial least squares regression to determine the contribution of each process to the color deviation. A weighted directed graph is constructed based on the contribution, representing the propagation relationship between processes. A propagation network topology is constructed, and the importance score of each node in the propagation network is calculated. If a node's score exceeds a preset threshold, the node is determined to be a key process. For the key process, a judgment matrix is constructed using the analytic hierarchy process (AHP). This judgment matrix is used to calculate eigenvectors and obtain the weights of each process. Based on the weights, the source process of the color deviation is determined. Multiple sets of simulated data are generated using the Monte Carlo method. This simulated data is used to repeatedly execute the source process identification process. The frequency of each process being identified as a source is counted. If the frequency of a process being identified as a source exceeds a preset threshold, it is determined to be the final source process of the color deviation.
[0050] For example, a correlation matrix between process and color deviation is constructed. Partial least squares regression is used to extract key influencing factors, and the contribution of each process to color deviation is calculated to obtain a process contribution vector. Based on the color deviation propagation path, a weighted directed graph is established to represent the propagation relationship between processes, with weights reflecting the influence intensity between processes, thus constructing a propagation network topology. The PageRank algorithm is applied to calculate the importance score of each node in the propagation network. Combined with the process contribution vector, key node processes are identified through weighted summation, and the influence intensity of processes on different propagation paths is calculated. The Analytic Hierarchy Process (AHP) is used to prioritize key upstream processes. A judgment matrix is constructed based on the relative importance between processes, and eigenvectors are calculated to obtain the weight of each process, thus determining the source process of color deviation. Multiple sets of simulated data are generated using Monte Carlo simulation, and the source process identification process is repeatedly executed. The frequency of each process being identified as a source is counted to verify the stability and reliability of the identification results. If the frequency of a process being identified as a source exceeds a preset threshold, it is determined as the final source process of color deviation. Based on the identification results, sensitivity analysis is performed on the key parameters of the source process to quantify the impact of parameter changes on color deviation, providing a basis for subsequent process parameter optimization. Taking a textile factory's dyeing production line as an example, 20 process parameters and color deviation data for 10 key processes were collected, totaling 1000 samples. Partial least squares regression was used to construct the correlation matrix between processes and color deviation, extracting 5 principal components that explained 85% of the variance. The process contribution vector was then calculated.
[0051] [0.15, 0.22, 0.18, 0.10, 0.08, 0.05, 0.07, 0.06, 0.04, 0.05]. Based on the process flow, a 10x10 weighted directed graph adjacency matrix was constructed, with weights ranging from 0 to 1, reflecting the intensity of influence between processes. The PageRank algorithm was applied, with a damping factor of 0.85, and the node importance was calculated after 100 iterations. The three nodes with the highest scores were [0.18, 0.16, 0.15]. Combining the process contribution, a weighted summation was performed using a weight ratio of 0.6:0.4 to identify three key process nodes. A 3x3 judgment matrix was constructed using the analytic hierarchy process (AHP), and based on the predefined relative importance, the eigenvector [0.5, 0.3, 0.2] was calculated as the process weight. Through 1000 Monte Carlo simulations, the frequency of each process being identified as a source was statistically analyzed. The highest frequency was 62%, exceeding the preset threshold of 60%, and was therefore identified as the source process of color deviation. Sensitivity analysis was performed on five key parameters of this process. The Morris method was used to calculate the parameter importance index μ*, and the parameter with the highest score was...
[0052] [2.5, 1.8, 1.2, 0.9, 0.6] provide direction for subsequent process optimization.
[0053] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the present invention will not describe the various possible combinations separately. Furthermore, various different embodiments of the present invention can also be arbitrarily combined, as long as they do not violate the spirit of the present invention, and should also be regarded as the content disclosed by the present invention.
Claims
1. A method for detecting color deviation in textiles, characterized in that, The method includes: Acquire a digital image of the textile to be detected, extract the fabric structure features, divide the image into regular sub-regions, extract the color histogram features of each sub-region, and obtain the color feature vector of the sub-region. Cluster analysis is performed on the color feature vectors of each sub-region. Based on the clustering results, each sub-region is mapped to a color category in a pre-established standard color sample library to obtain the color category label of the sub-region. Based on the color category labels of the sub-regions, the number of sub-regions corresponding to each color category is counted, their area proportion is calculated, and a color distribution feature vector with color category as the dimension is constructed to represent the overall color distribution of the textile. Based on the overall color distribution, select standard samples of the same type from the standard color sample library, extract their color distribution feature vectors, calculate the Euclidean distance between the color distribution feature vectors of the current textile and the standard samples, and obtain the color deviation quantification index. In continuous multi-batch production, obtain the color deviation quantitative index of each batch of products, construct the color deviation index time series, and align the color deviation index series between different batches. On the aligned color deviation index time series, calculate the color concentricity index of the current batch and the previous batches. When the color concentricity index is lower than the preset threshold, determine whether there is a color deviation propagation trend. Predict the quantitative index of color deviation for the current batch. If the predicted value exceeds the preset color deviation threshold range, combine the color concentricity calculation results to determine the influencing factors and propagation path of color deviation. Based on the influencing factors and propagation paths of color deviation, corresponding process parameter adjustment strategies are generated, and the upstream key processes causing color deviation are tracked and located.
2. The method according to claim 1, wherein, The process of acquiring a digital image of the textile to be detected, extracting fabric structure features, dividing the image into regular sub-regions, extracting the color histogram features of each sub-region, and obtaining the color feature vector of the sub-region includes: Acquire a digital image of the textile to be inspected, the digital image containing fabric structure information and color information; Extract the fabric structure features from the digital image to obtain a structural feature image of the textile. The structural feature image is divided into sub-regions to obtain multiple regular sub-regions; The color space of the regular sub-region is converted from RGB color space to HSV color space. The converted HSV color space image is subjected to color quantization processing to obtain multiple color ranges; Count the number of pixels in each color interval within each rule sub-region and generate a color histogram; The color histogram is normalized to obtain the color feature vector of the sub-region; Calculate the statistical features of the color feature vector of the sub-region to form the comprehensive feature vector of the entire image; The K-nearest neighbor algorithm is used to classify the comprehensive feature vector, where the K value is set to a preset value; Based on the classification results of the K-nearest neighbor algorithm, the structural and color features of the textile to be detected are determined.
3. The method according to claim 1, wherein, The process involves clustering the color feature vectors of each sub-region, mapping each sub-region to a color category in a pre-established standard color sample library based on the clustering results, and obtaining the color category label for each sub-region, including: Obtain the color feature vector of each sub-region, and use the K-means clustering method to cluster the color feature vector, where the number of clusters K is a preset value; Based on the clustering results, the color feature vector of the sub-region is compared with samples in a pre-established standard color sample library, which contains a preset number of common colors. Determine the color category label corresponding to each sub-region and generate a sub-region color category label matrix, where each element in the matrix represents the color category number of the corresponding sub-region; Smoothing is performed on the color category label matrix. If the color category of a sub-region is different from the color category of its neighboring sub-regions and the area of the sub-region is less than a preset threshold, the color category of the sub-region is adjusted to be the same as the color category of its largest neighboring area. Calculate the silhouette coefficient of the clustering result, determine whether the silhouette coefficient is less than a preset threshold, and if the silhouette coefficient is less than the preset threshold, increase the number of clusters K and re-execute the clustering process.
4. The method according to claim 1, wherein, The process involves counting the number of sub-regions corresponding to each color category based on the color category labels of the sub-regions, calculating their area proportions, and constructing a color distribution feature vector with color category as the dimension to characterize the overall color distribution of the textile. This includes: Receive matrix data containing color category labels for sub-regions, and preprocess the matrix data according to a preset color category range; If invalid or erroneous data is detected, it will be corrected to a valid value. Obtain the preprocessed color category label matrix and build an area counter for each color category; By traversing each element in the matrix and summing the areas of the sub-regions corresponding to the color category, the total area statistics for each color category are obtained. Using the total area of all sub-regions as the denominator and the total area of each color category as the numerator, calculate the area ratio of the sub-region corresponding to each color category; Determine the area percentage of each color category; If the proportion is less than a preset threshold, the color category is merged into the most similar color category, and the similarity is determined by calculating the Euclidean distance in the HSV space. Construct a color distribution feature vector, where the vector dimension is the same as the number of color categories after merging; The feature vector is standardized to obtain the final color distribution feature vector.
5. The method according to claim 1, wherein, Based on the overall color distribution, standard samples of the same type are selected from the standard color sample library, their color distribution feature vectors are extracted, and the Euclidean distance between the color distribution feature vectors of the current textile and the standard samples is calculated to obtain a color deviation quantification index, including: Based on the color distribution feature vector of textiles, the top 10 standard samples with the highest similarity in the standard color sample library are selected as matching samples. The color distribution feature vectors of the preset matching standard samples are aligned with the feature vectors of the textiles in terms of dimensions. If the dimensions are inconsistent, upsampling is performed by linear interpolation or downsampling is performed by average pooling. Calculate the Euclidean distance between the color distribution feature vector of the textile and the color distribution feature vector of a preset set of matching standard samples, and obtain the weighted average of the preset distance values as a color deviation quantification index; Determine whether the color deviation quantification index is greater than a preset threshold. If it is greater than the preset threshold, add the color distribution feature vector of the textile to the standard color sample library. Perform cross-validation on newly added samples. If the cross-validation passes, the sample is retained; otherwise, the newly added sample is removed.
6. The method according to claim 1, wherein, In the process of continuous production across multiple batches, the method involves obtaining a quantitative index of color deviation for each batch of products, constructing a time series of color deviation indices, and aligning the color deviation index series between different batches, including: Obtain quantitative indicators of color deviation from multiple consecutive batches of products, record the production timestamp of each batch, and construct a time series of color deviation indicators. Key-value pairs are formed based on timestamps and color deviation indicators and stored in a hash table; Standardize the sequence length across different batches and set a fixed time window size; If the data points are sparse for a given time period, then linear interpolation can be used to fill in the missing data. If the data points are dense within a time period, then the mean downsampling method should be used to reduce the number of data points. Outliers are identified using the moving median method. If a data point exceeds a preset multiple of the standard deviation, it is replaced with the average of the preceding and following data points. The processed data was smoothed using a single exponential smoothing method. Select the batch with the longest time span as the reference sequence, align the batch with the reference sequence, and calculate the Euclidean distance matrix between the two sequences; The optimal matching path is found based on the Euclidean distance matrix, and the time axis is adjusted to obtain the aligned color deviation index sequence.
7. The method according to claim 1, wherein, The step involves calculating the color concentricity index between the current batch and previous batches on the aligned color deviation index time series. When the color concentricity index is lower than a preset threshold, it is determined whether there is a color deviation propagation trend, including: Obtain the time series of aligned color deviation index, perform sliding window processing on the time series, and calculate the color concentricity index based on the sliding window. Determine whether the color concentricity index is lower than a preset threshold. If the color concentricity index is lower than the preset threshold, perform anomaly detection, including identifying anomaly points and performing STL time series decomposition on the anomaly points to obtain trend components. The trend component is predicted, and the color deviation propagation speed is calculated based on the prediction result; Determine whether the propagation speed of the color deviation exceeds a preset threshold. If the propagation speed of the color deviation exceeds the preset threshold, then perform the test using the Mann-Kendall trend test method. Based on the Mann-Kendall trend test results, determine whether there is a significant color deviation propagation trend.
8. The method according to claim 1, wherein, If the predicted color deviation quantification index for the current batch exceeds the preset color deviation threshold range, then, in conjunction with the color concentricity calculation results, the influencing factors and propagation paths of the color deviation are determined, including: Obtain historical data of color deviation quantification index, perform time series prediction based on the historical data, and output the color deviation quantification index value and its preset confidence interval. Determine whether the predicted value of the color deviation quantification index exceeds a preset threshold range, wherein the preset threshold range is determined by the average of historical data; If the predicted value or confidence interval of the color deviation quantification index exceeds the preset threshold range, then a sensitivity analysis is performed on the time points that exceed the threshold, and the first-order and global sensitivity indices of the color deviation quantification index to each production parameter are calculated. Based on the sensitivity analysis results, a color deviation propagation map is constructed to determine the propagation nodes and paths of color deviation, and the probability of each propagation path is calculated. This also includes: calculating the color deviation gradient between adjacent batches, determining the trend of deviation growth or weakening, identifying the periodic pattern of color deviation between batches, constructing a color deviation propagation network diagram, determining the propagation direction by the connection strength between nodes, and mapping the propagation direction to the process flow diagram to identify the propagation path. Specifically, this includes: obtaining the color deviation gradient between adjacent batches and calculating the deviation change rate at each time point; determining the trend of color deviation growth or weakening based on the deviation change rate; smoothing the trend curve using the sliding window averaging method; examining the color deviation time series; if the time series is non-stationary, performing differencing until it is stationary; analyzing the spectral characteristics of the stationary series; identifying the main periodic components of the stationary series; constructing a color deviation propagation network diagram; treating each batch as a node and calculating the deviation correlation coefficient between adjacent batches; determining the connection strength between nodes based on the deviation correlation coefficient; mapping the propagation network diagram to the production process flow diagram; matching the node timestamps of the propagation network diagram to the nearest process time point; calculating the in-degree and out-degree of each process node; and identifying the critical path of color deviation propagation by combining the node importance score.
9. The method according to claim 1, wherein, The process of generating corresponding process parameter adjustment strategies based on the influencing factors and propagation paths of color deviation, and tracing and locating the upstream key processes causing color deviation, includes: Acquire process parameters and color quality data, and establish a parameter sensitivity matrix. The parameter sensitivity matrix is used to quantify the degree of nonlinear influence of process parameters on color quality. Based on the process flow diagram and color deviation propagation network, the upstream key process causing color deviation is located, and a correlation matrix between processes is established. Each node in the correlation matrix records the process timestamp and related parameters; Based on the parameter sensitivity matrix and upstream key process information, a process parameter adjustment strategy is designed, including using a genetic algorithm to optimize the adjustment range, where chromosome encoding is real number encoding. A dynamic feedback controller is constructed to regulate the color quality of textiles in real time, where the control objective is to minimize the sum of squares of color deviations over the next N steps. It also includes: constructing a correlation matrix between processes and color deviation based on the influencing factors of color deviation, quantifying the contribution of each process to the deviation, tracing upstream processes step by step along the propagation path of color deviation according to the propagation path, identifying key node processes by combining the propagation network topology, determining the upstream process group causing color deviation by comparing the influence intensity of processes on different propagation paths, prioritizing the upstream processes, and determining the source process of color deviation. Specifically, this includes: obtaining a correlation matrix between processes and color deviation, which is calculated using partial least squares regression to determine the contribution of each process to color deviation; constructing a weighted directed graph based on the contribution, wherein the weighted directed graph... A graph is used to represent the propagation relationship between processes; a propagation network topology is constructed, and the importance score of each node in the propagation network is calculated. If the node score exceeds a preset threshold, the node is determined to be a key process. For the key process, an analytic hierarchy process (AHP) is used to construct a judgment matrix, which is used to calculate the feature vector and obtain the weight of each process. Based on the weight, the source process of color deviation is determined. Multiple sets of simulation data are generated using the Monte Carlo method, and the simulation data is used to repeatedly execute the source process identification process. The frequency of each process being identified as a source is counted. If the frequency of a process being identified as a source exceeds a preset threshold, it is determined to be the final source process of color deviation.
Citation Information
Patent Citations
Textile color difference detection method based on image data
CN115100186A
Printing quality control method and system
CN118570130A