Garment fashion trend prediction method
Through the combination of CEEMDAN decomposition and KPCA dimensionality reduction technology combined with Transformer model, the problem of missing data high-dimensional features in clothing fashion trend prediction is solved, and the daily sales volume of clothing is accurately predicted, the prediction accuracy and efficiency are improved, and the clothing manufacturing industry is provided. Effective market reference.
Patent Information
- Application Number
- CN202411358613.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art cannot accurately obtain high-dimensional feature data of clothing, resulting in low accuracy and referenceability of clothing trend predictions.
CEEMDAN decomposition and core principal component analysis (KPCA) dimensionality reduction technology are used to decompose complex nonlinear and non-stationary time series into inherent modal functions (IMFs), and the Transformer model is used to predict the daily sales of clothing.
It realizes accurate and real-time prediction of clothing fashion trends, reduces data noise, highlights useful information, improves prediction accuracy and model efficiency, and is suitable for the technology and market layout of the clothing manufacturing industry chain.
Smart Images

Figure CN119168696A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of clothing design and manufacturing, and in particular relates to a method for predicting clothing fashion trends. Background Art
[0002] In recent years, with the continuous optimization and upgrading of "Internet" and "big data", the environment, marketing, channels, production and design of the entire clothing market have undergone earth-shaking changes. The fashion cycle of clothing has gradually transitioned from years and months to weeks. In order to improve market competitiveness, meet consumer needs, promote innovation and achieve sustainable development, the clothing manufacturing market urgently needs to accurately predict the fashion trends of clothing.
[0003] Under existing technical conditions, the general web crawler technology is usually combined with the depth / breadth first strategy to visit web pages at all levels in sequence, non-selectively crawling massive clothing data on the Internet, and then building a database as a data source for predictive analysis to predict fashion trends based on the time dimension; using ERP-based clothing design management technology to build an independent clothing design material library for clothing design management. However, this method cannot accurately obtain high-dimensional feature data such as clothing texture, fabric, color, and pattern. Due to the lack of data dimensions, the accuracy and referenceability of the prediction results are not high. Summary of the invention
[0004] The present invention provides a method for predicting fashion trends of clothing to solve the above-mentioned technical problems, and specifically adopts the following technical solutions:
[0005] A method for predicting clothing fashion trends comprises the following steps:
[0006] Step 1, collect historical clothing sales data to obtain original sales data;
[0007] Step 2, preprocessing the original sales data obtained in step 1;
[0008] Step 3, perform CEEMDAN decomposition on the data preprocessed in step 2;
[0009] Step 4, reducing the dimension of the IMFs features decomposed in step 3 to eliminate the correlation and redundancy of the IMFs features;
[0010] Step 5: Combine the IMFs features after dimension reduction in step 4 with the real labels of daily sales to construct a time series dataset suitable for Transformer model input;
[0011] Step 6: Use the time series data set obtained in step 5 to train the Transformer prediction model;
[0012] Step 7: Use the Transformer model trained in step 6 to predict the daily sales volume of clothing in the next few days and output the predicted data of daily sales volume of clothing.
[0013] Furthermore, the step 1 is specifically as follows:
[0014] Step 1.1, through web crawler technology, obtain the clothing sales data of the target platform for the past 200 days. The sales data includes the daily sales volume, return rate, product price, platform search volume, daily average temperature, and daily precipitation of the goods. The return rate, product price, platform search volume, daily average temperature, and daily precipitation are input features, and the daily sales volume is used as the true label. A total of n groups of data are obtained, where n represents the number of clothing categories to be obtained.
[0015] Furthermore, the step 2 is specifically as follows:
[0016] Step 2.1, clean the original sales data;
[0017] Step 2.2, normalize the original sales data.
[0018] Furthermore, linear interpolation is used to clean the original sales data, and minimum-maximum normalization is used to normalize the data.
[0019] Furthermore, the step 3 is specifically as follows:
[0020] Step 3.1: Add K times of Gaussian white noise with a mean of 0 to the sequence to be decomposed x(t) to construct a sequence to be decomposed with a total of K experiments. ;
[0021] Step 3.2, for the above sequence Perform EMD decomposition to obtain the first modal component, and take its mean as the first IMF feature obtained by CEEMDAN decomposition. Subtract the IMF component from the original sequence to obtain the residual sequence ;
[0022] Step 3.3, adding specific noise to the j-th stage residual sequence obtained after decomposition as the original sequence, and continuing EMD decomposition;
[0023] Step 3.4: If the EMD stop condition is met, the residual signal of the nth decomposition If it is a monotonic signal, the iteration stops and the CEEMDAN algorithm decomposition ends.
[0024] Furthermore, the step 4 is specifically as follows:
[0025] Step 4.1, the feature sequences decomposed by CEEMDAN are organized into a feature matrix X with N rows and M columns, where N represents the dimension of the feature sequences decomposed by CEEMDAN, and M represents the number of features of each feature sequence;
[0026] Step 4.2, select kernel function ;
[0027] Step 4.3, calculate the kernel matrix ;
[0028] Step 4.4, center the kernel matrix K by column or row to obtain the centralized kernel matrix ;
[0029] Step 4.5, perform eigenvalue decomposition on the centralized kernel matrix K to obtain eigenvalues and eigenvectors, and select the eigenvectors corresponding to the first k largest eigenvalues as principal components to construct a new dimensionality reduction space;
[0030] Step 4.6, project the original data into the new feature space to obtain the reduced-dimensional feature matrix Y, where each row of Y is the reduced-dimensional feature sequence.
[0031] Furthermore, the kernel function is a cosine kernel function.
[0032] Furthermore, the step 5 is specifically as follows:
[0033] Step 5.1, construct a time series prediction dataset using the reduced dimensionality IMFs features and the true labels of daily sales;
[0034] Step 5.2, divide the time series dataset into training set and test set with a division ratio of 8:2.
[0035] Furthermore, the step 6 is specifically as follows:
[0036] Step 6.1, set the parameters of the Transformer model, including the number of encoder layers, decoder layers, and the number of heads of the multi-head attention mechanism, and initialize the model;
[0037] Step 6.2, select a suitable loss function and optimizer, and perform multiple rounds of training using the training set.
[0038] Furthermore, the step 7 is specifically as follows:
[0039] Step 7.1, use the test set to input the trained Transformer model to predict the sales volume of clothing in the next few days;
[0040] Step 7.2, output the clothing sales forecast data for the next few days.
[0041] The benefit of the present invention lies in the clothing fashion trend prediction method provided. By collecting clothing shopping information from websites and predicting the daily sales volume of clothing through deep learning methods, the accurate and real-time prediction of clothing fashion trends can be achieved, providing an effective reference for the clothing manufacturing industry chain to carry out technology and market layout in advance, thereby reducing the operating risks of enterprises.
[0042] The invention is also beneficial in that the provided clothing fashion trend forecasting method, combined with CEEMDAN decomposition, decomposes complex nonlinear and non-stationary time series into a set of intrinsic mode functions (IMFs) to separate different frequency components in the signal, making each IMF more representative and physically meaningful. It can also reduce data noise, highlight useful information in the data, and improve data quality and model prediction accuracy.
[0043] The invention is also beneficial in that the provided clothing fashion trend prediction method uses kernel principal component analysis (KPCA) to find the principal components in the high-dimensional feature space, thereby reducing the data dimension, retaining the main features and structure of the data, and removing redundant information and noise. It also greatly reduces the computational complexity and improves the training speed and efficiency of the model.
[0044] The invention is also beneficial in that the provided clothing fashion trend prediction method uses a Transformer model that has significant advantages in processing long sequence data and capturing complex time series relationships. And through the self-attention mechanism, it can effectively capture long-term dependencies in time series. Moreover, compared with traditional recurrent neural networks (such as LSTM, GRU), the Transformer model can perform parallel computing, which greatly speeds up the training speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0046] Figure 1 It is a schematic diagram of a clothing fashion trend prediction method of the present invention;
[0047] Figure 2 is a CEEMDAN decomposition flow chart of the present invention;
[0048] Figure 3 It is the KPCA dimensionality reduction flow chart of the present invention. DETAILED DESCRIPTION
[0049] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0050] like Figure 1 A method for predicting clothing fashion trends is disclosed, comprising the following steps:
[0051] Step 1: Collect historical clothing sales data to obtain original sales data.
[0052] In the implementation manner of the present application, step 1 is specifically as follows:
[0053] Step 1.1, through web crawler technology, obtain the clothing sales data of the target platform for nearly 200 days. The sales data includes the daily sales volume, return rate, product price, platform search volume, average daily temperature, and daily precipitation of the goods. Among them, the return rate, product price, platform search volume, average daily temperature, and daily precipitation are input features, and the daily sales volume is used as the real label. A total of n groups of data are obtained, and n represents the number of clothing categories to be obtained. In this application, take n=3 as an example, that is, the clothing categories are: dresses, down jackets, and shorts.
[0054] Step 2: Preprocess the original sales data obtained in step 1. Use data cleaning to handle missing values, and use data normalization to scale data of different dimensions to the same range to facilitate model training and prediction.
[0055] In the implementation manner of the present application, step 2 is specifically as follows:
[0056] Step 2.1, data cleaning of the original sales. The original sales data obtained will have missing values, so data cleaning is required. The data cleaning method in this application uses linear interpolation, which can maintain the time series continuity and trend of the data, which is very important for the analysis and modeling of time series data.
[0057] The general expression of linear interpolation is:
[0058]
[0059] Among them, y represents the date, and x represents the corresponding eigenvalue. and , find the missing x or y value.
[0060] Step 2.2, normalize the original sales data. Data normalization is used to eliminate the impact of data dimension and make the data indicators comparable. This application adopts minimum-maximum normalization. As shown in the following formula:
[0061]
[0062] In the formula, x is the original eigenvalue, is the normalized eigenvalue, is the largest eigenvalue in the feature sequence, is the smallest eigenvalue in the feature sequence.
[0063] Step 3: Perform CEEMDAN decomposition on the data preprocessed in step 2.
[0064] like Figure 2 As shown, in the implementation of the present application, the specific decomposition of step 3CEEMDAN is as follows:
[0065] Step 3.1: Add K times of Gaussian white noise with a mean of 0 to the sequence to be decomposed x(t) to construct a sequence to be decomposed with a total of K experiments. .
[0066]
[0067] In the formula, is the Gaussian white noise weight coefficient; is the Gaussian white noise generated by the second processing.
[0068] Step 3.2, for the above sequence Perform EMD decomposition to obtain the first modal component, and take its mean as the first IMF feature obtained by CEEMDAN decomposition. Subtract the IMF component from the original sequence to obtain the residual sequence .
[0069]
[0070]
[0071] In the formula, represents the first modal component obtained by CEEMDAN decomposition; Represents the residual sequence after the first decomposition.
[0072] Step 3.3, add specific noise to the j-th stage residual sequence obtained after decomposition and use it as the original sequence to continue EMD decomposition.
[0073]
[0074]
[0075] In the formula, represents the jth modal component obtained by CEEMDAN decomposition; represents the j-1th IMF component after EMD decomposition of the sequence; represents the weight coefficient of noise added by CEEMDAN to the residual signal of the j -1th stage; represents the residual sequence of the jth stage.
[0076] Step 3.4: If the EMD stop condition is met, the residual signal of the nth decomposition If it is a monotonic signal, the iteration stops and the CEEMDAN algorithm decomposition ends.
[0077] Step 4: Reduce the dimension of the IMFs features decomposed in step 3 to eliminate the correlation and redundancy of the IMFs features.
[0078] Specifically, the kernel principal component analysis (KPCA) method is used to perform dimensionality reduction. Figure 3 As shown, in the implementation manner of the present application, step 4 is specifically as follows:
[0079] Step 4.1, the feature sequences after CEEMDAN decomposition are organized into a feature matrix X with N rows and M columns, where N represents the dimension of the feature sequence after CEEMDAN decomposition, and M represents the number of features of each feature sequence.
[0080] The number of features a feature sequence has;
[0081]
[0082] Step 4.2, select kernel function .
[0083] The present invention selects the cosine kernel function, and the cosine kernel function is as follows:
[0084]
[0085] In the formula, and Represents the row and column vectors in the feature matrix.
[0086] Step 4.3, calculate the kernel matrix , .
[0087] Step 4.4, center the kernel matrix K by column or row to obtain the centralized kernel matrix .
[0088]
[0089] in, represents a matrix of all ones.
[0090] Step 4.5, perform eigenvalue decomposition on the centralized kernel matrix K to obtain eigenvalues and eigenvectors, and select the eigenvectors corresponding to the first k largest eigenvalues as principal components to construct a new dimensionality reduction space.
[0091] set up The characteristic value of , the eigenvector is , then:
[0092]
[0093] Select the first k largest eigenvalues and its corresponding eigenvector .
[0094] Step 4.6, project the original data into the new feature space to obtain the reduced-dimensional feature matrix Y, where each row of Y is the reduced-dimensional feature sequence.
[0095]
[0096] Step 5: Combine the IMFs features after dimensionality reduction in step 4 with the true labels of daily sales to construct a time series dataset suitable for Transformer model input.
[0097] In the implementation manner of the present application, step 5 is specifically as follows:
[0098] Step 5.1, use the reduced dimensionality IMFs features and the true labels of daily sales to construct a time series prediction dataset.
[0099] Step 5.2, divide the time series dataset into training set and test set with a division ratio of 8:2.
[0100] Step 6: Use the time series dataset obtained in step 5 to train the Transformer prediction model.
[0101] In the implementation manner of the present application, step 6 is specifically as follows:
[0102] Step 6.1, set the parameters of the Transformer model, including the number of encoder layers, decoder layers, and the number of heads of the multi-head attention mechanism, and initialize the model.
[0103] Select the number of encoder layers and decoder layers as L, and the number of heads of the multi-head attention mechanism as H. The number of heads of the multi-head attention mechanism affects the ability of the model to capture features. The larger the number of heads, the stronger the ability to capture features, but it will also increase the computational complexity of the model.
[0104] Step 6.2, select a suitable loss function and optimizer, and perform multiple rounds of training using the training set.
[0105] In the implementation of the present application, the loss function selects the mean square error loss (MSE) to measure the error between the model prediction value and the true value. The mean square error loss (MSE) function is as follows:
[0106]
[0107] In the formula, is the actual daily sales volume of clothing for the i-th sample. is the model prediction value of the i-th sample. The optimizer is Adam.
[0108] Step 7: Use the Transformer model trained in step 6 to predict the daily sales volume of clothing in the next few days and output the predicted data of daily sales volume of clothing.
[0109] In the implementation manner of the present application, step 7 is specifically as follows:
[0110] In step 7.1, use the test set to input the trained Transformer model to predict the sales volume of clothing in the next few days.
[0111] Step 7.2, output the clothing sales forecast data for the next few days.
[0112] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any form, and any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.
Claims
1. A method for predicting clothing fashion trends. It is characterized in that The following steps are involved: Step 1, collect historical clothing sales data to obtain original sales data; Step 2, preprocessing the original sales data obtained in step 1; Step 3, perform CEEMDAN decomposition on the data preprocessed in step 2; Step 4, reducing the dimension of the IMFs features decomposed in step 3 to eliminate the correlation and redundancy of the IMFs features; Step 5: Combine the IMFs features after dimension reduction in step 4 with the real labels of daily sales to construct a time series dataset suitable for Transformer model input; Step 6: Use the time series data set obtained in step 5 to train the Transformer prediction model; Step 7: Use the Transformer model trained in step 6 to predict the daily sales volume of clothing in the next few days and output the predicted data of daily sales volume of clothing.
2. A clothing fashion trend prediction method according to claim 1, It is characterized in that The step 1 is specifically as follows: Step 1.1, through web crawler technology, obtain the clothing sales data of the target platform for the past 200 days. The sales data includes the daily sales volume, return rate, product price, platform search volume, daily average temperature, and daily precipitation of the goods. The return rate, product price, platform search volume, daily average temperature, and daily precipitation are input features, and the daily sales volume is used as the true label. A total of n groups of data are obtained, where n represents the number of clothing categories to be obtained.
3. A method for predicting fashion trends according to claim 1; It is characterized in that The step 2 is specifically as follows: Step 2.1, clean the original sales data; Step 2.2, normalize the original sales data.
4. A method for predicting fashion trends according to claim 1, It is characterized in that Linear interpolation was used to clean the raw sales data, and minimum-maximum normalization was used to normalize the data.
5. A method for predicting fashion trends according to claim 1, It is characterized in that The step 3 is as follows: Step 3.1: Add K times of Gaussian white noise with a mean of 0 to the sequence to be decomposed x(t) to construct a sequence to be decomposed with a total of K experiments. ; Step 3.2, for the above sequence Perform EMD decomposition to obtain the first modal component, and take its mean as the first IMF feature obtained by CEEMDAN decomposition. Subtract the IMF component from the original sequence to obtain the residual sequence ; Step 3.3, adding specific noise to the j-th stage residual sequence obtained after decomposition as the original sequence, and continuing EMD decomposition; Step 3.4: If the EMD stop condition is met, the residual signal of the nth decomposition If it is a monotonic signal, the iteration stops and the CEEMDAN algorithm decomposition ends.
6. A method for predicting fashion trends according to claim 1, It is characterized in that The step 4 is specifically as follows: Step 4.1, the feature sequences decomposed by CEEMDAN are organized into a feature matrix X with N rows and M columns, where N represents the dimension of the feature sequences decomposed by CEEMDAN, and M represents the number of features of each feature sequence; Step 4.2, select kernel function ; Step 4.3, calculate the kernel matrix ; Step 4.4, center the kernel matrix K by column or row to obtain the centralized kernel matrix ; Step 4.5, perform eigenvalue decomposition on the centralized kernel matrix K to obtain eigenvalues and eigenvectors, and select the eigenvectors corresponding to the first k largest eigenvalues as principal components to construct a new dimensionality reduction space; Step 4.6, project the original data into the new feature space to obtain the reduced-dimensional feature matrix Y, where each row of Y is the reduced-dimensional feature sequence.
7. A method for predicting fashion trends according to claim 6, It is characterized in that The kernel function is the cosine kernel function.
8. A method for predicting fashion trends according to claim 1, It is characterized in that The step 5 is specifically as follows: Step 5.1, construct a time series prediction dataset using the reduced dimensionality IMFs features and the true labels of daily sales; Step 5.2, divide the time series dataset into training set and test set with a division ratio of 8:
2.
9. A method for predicting fashion trends according to claim 8, It is characterized in that The step 6 is specifically as follows: Step 6.1, set the parameters of the Transformer model, including the number of encoder layers, decoder layers, and the number of heads of the multi-head attention mechanism, and initialize the model; Step 6.2, select a suitable loss function and optimizer, and perform multiple rounds of training using the training set.
10. A method for predicting fashion trends of clothing according to claim 9, It is characterized in that The step 7 is specifically as follows: Step 7.1, use the test set to input the trained Transformer model to predict the sales volume of clothing in the next few days; Step 7.2, output the clothing sales forecast data for the next few days.
Citation Information
Cited By
Water quality prediction method, device, equipment and medium
CN119849709A
