Clothing demand prediction method and system based on hybrid modeling framework
By combining LightGBM and GRU models in a hybrid modeling framework, the problem of insufficient prediction by a single time series model in the apparel industry is solved. This enables high-precision, dynamic, and differentiated prediction of apparel demand, thereby improving the efficiency of production and inventory decision-making for apparel companies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU FUTURE FIRST HAND NETWORK TECH CO LTD
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-08
AI Technical Summary
In the apparel industry, existing technologies, particularly single time series models, struggle to accurately capture demand patterns across different apparel categories. This is especially true when dealing with complex data scenarios, where prediction accuracy varies significantly. Furthermore, these models lack the ability to adapt to and dynamically iterate on differentiated product category data, and they also lack an effective mechanism for linking non-time series data with basic sales data.
A hybrid modeling framework is adopted to obtain co-occurrence relationship data through temporal feature decomposition, and to combine the LightGBM model and the GRU model to perform differentiated demand prediction. The system is dynamically optimized through scenario adaptation effect evaluation, and finally outputs the demand prediction value.
It improves the prediction accuracy in complex scenarios in the apparel industry, accurately captures demand patterns, dynamically iterates and optimizes the model, adapts to demand changes in different time periods and data dimensions, and improves the reliability and accuracy of prediction results.
Smart Images

Figure CN121998333A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of demand forecasting technology, and in particular to a method and system for forecasting apparel demand based on a hybrid modeling framework. Background Technology
[0002] In the apparel industry, demand forecasting is a core supporting link for enterprises to formulate production plans, optimize inventory, and coordinate the supply chain. The accuracy of the forecast directly determines the enterprise's capital turnover efficiency and market competitiveness.
[0003] For example, Chinese invention patent application CN120410613A discloses a method and system for predicting the demand for clothing products. The specific implementation process is as follows: First, an original dataset is obtained; then, a temporal generative adversarial network model is used to expand the original dataset to obtain a synthetic dataset, and the original dataset and the synthetic dataset are merged as a new dataset, or the original dataset is directly used as the new dataset; next, a clothing product demand prediction model is constructed; then, the prediction model is initially trained using the new dataset, and the model parameters are optimized using the Blackwing Kite optimization algorithm; based on the optimized parameters, the demand prediction model is reconstructed and retrained to finally obtain a hybrid prediction model; finally, the hybrid prediction model is used to predict the demand for clothing products and output the results.
[0004] Current technologies largely employ a single-model-driven forecasting logic. This involves first establishing a data processing system for apparel demand forecasting. By analyzing historical sales data, user behavior data, and trend data, core data dimensions and relationships such as demand influencing factors, apparel category characteristics, and consumption scenarios are constructed. Next, real-time multi-source data is integrated, cleaned, and normalized before being input into the forecasting model. Subsequently, time series models such as Gated Recurrent Units (GRUs) or deep learning models, such as Lightweight Gradient Boosting Machine Models (LightGBMs), are used to forecast demand. The forecast results are then adjusted based on human experience. Finally, the demand forecast conclusions are output to provide decision-making support for production preparation and inventory allocation, completing the entire demand forecasting process.
[0005] However, when faced with the complex data scenarios of the apparel industry, which features a wide variety of product categories and demand influenced by factors such as seasons and trends, single time series methods, such as GRU, typically rely on the linear time-series characteristics of historical data. This results in inconsistent prediction accuracy for different product categories. Furthermore, product data management lacks the ability to adapt and dynamically iterate to differentiated product category data. At the same time, the lack of an effective correlation mechanism between non-time-series data and basic sales data in existing product data management leads to low coverage of multi-dimensional feature extraction for these single models. When encountering discrete data such as size distribution and color preferences, the prediction error for core demand data is exacerbated, making it difficult to accurately capture the true demand patterns of different apparel categories. Summary of the Invention
[0006] To address the technical problems in the prior art, embodiments of the present invention provide a method and system for predicting apparel demand based on a hybrid modeling framework. The technical solution is as follows: On the one hand, a method for predicting apparel demand based on a hybrid modeling framework is provided. This method includes: performing time-series feature decomposition on the target dataset for apparel demand prediction under a specific time-series data monitoring scenario, and obtaining co-occurrence relationship data reflecting the degree of correlation between different data during the time-series feature decomposition process; importing the obtained co-occurrence relationship data into a hybrid framework based on the fusion of LightGBM and GRU models for differentiated demand prediction, and outputting demand prediction values reflecting apparel demand corresponding to different time periods and different data dimensions; evaluating the scenario adaptation effect based on the demand prediction values, and determining whether to output the final demand prediction value by monitoring the dynamic adaptation status of the Poisson distribution parameters of the demand sequences corresponding to different data dimensions and different time periods during the scenario adaptation effect evaluation process.
[0007] On the other hand, a clothing demand forecasting system based on a hybrid modeling framework is provided. This system includes: a co-occurrence relationship data acquisition module, used to perform time-series feature decomposition on the target dataset for clothing demand forecasting in a specific time-series data monitoring scenario, and to acquire co-occurrence relationship data reflecting the degree of correlation between different data during the time-series feature decomposition process; a differentiated demand forecasting module, used to import the acquired co-occurrence relationship data into a hybrid framework based on the fusion of LightGBM and GRU models for differentiated demand forecasting, and output demand forecast values reflecting clothing demand corresponding to different time periods and different data dimensions; and an adaptation effect evaluation and judgment module, used to evaluate the scene adaptation effect based on the demand forecast values, and to determine whether to output the final demand forecast value by monitoring the dynamic adaptation status of the Poisson distribution parameters of the demand sequences corresponding to different data dimensions and different time periods during the scene adaptation effect evaluation process.
[0008] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: 1. This invention, in a specific time-series data monitoring scenario, first performs time-series feature decomposition on the target dataset, simultaneously extracting correlation patterns from different data dimensions and generating structured co-occurrence relationship data, effectively integrating the feature correlations between discrete data such as size and color and sales time-series data; then, the co-occurrence relationship data is imported into a hybrid prediction framework of LightGBM and GRU to perform differentiated demand prediction and output demand prediction values for different time periods and different data dimensions. This hybrid framework combines the feature selection advantages of tree models with the time-series fitting capabilities of recurrent neural networks, which can improve prediction accuracy in complex scenarios; finally, the scenario adaptation effect is evaluated based on the demand prediction values, and the final output is determined by monitoring the dynamic adaptation state of the Poisson distribution parameters of the demand sequence under different dimensions and periods, realizing dynamic iterative optimization of the prediction model and accurately capturing the demand patterns of the apparel industry affected by seasons and trends.
[0009] 2. Through a multi-step process, co-occurrence relationship data for apparel products is accurately obtained. First, the original data is smoothed using a sliding window filter. Then, Fourier transform is used to decompose periodic feature data, effectively eliminating periodic interference. Subsequently, time-domain least squares is combined to separate trend feature data, ensuring the accuracy of feature extraction. Based on the time window segmentation results, discrete and non-discrete co-occurrence data are separated. The timestamp overlap of the two types of data is calculated, and the co-occurrence frequency is statistically analyzed to quantify the strength of the correlation between dimensions. Significantly correlated data pairs are screened and classified using frequency thresholds, while abnormal co-occurrence relationships are marked to improve the targeting of data association analysis. For historical co-occurrence data that does not meet frequency requirements, a GRU model is introduced, using timestamp overlap as input to predict short-term time-series association trends. The significance of the association is dynamically determined based on the predicted co-occurrence frequency. The overall process balances data stabilization, accurate feature separation, and dynamic association determination, effectively integrating discrete and non-discrete data features, improving the reliability and comprehensiveness of co-occurrence relationship data, and providing high-quality data support for subsequent differentiated demand prediction.
[0010] 3. For scenarios with only high-frequency co-occurring data, the timestamp overlap and first-order difference slope of the data are first extracted. A dynamic weighting coefficient adjusted by the Pearson correlation coefficient is introduced to generate a growth-time-related coupled feature matrix. This matrix vector is then input into a hybrid LightGBM and GRU model. Leveraging the model's collaborative fitting capabilities, multi-period, multi-dimensional predicted values are output to accurately capture the growth trend of high-frequency data. For scenarios with only low-frequency co-occurring data, the decay rate and timestamp overlap of the demand sequence are extracted. A dynamic correction coefficient is calculated based on the corresponding Pearson correlation coefficient to generate a decay-time-related coupled feature matrix. Prediction is completed through a hierarchical fitting logic of the hybrid model, adapting to the decay characteristics of low-frequency data and addressing the problem of insufficient fitting of sparse data by a single model. For scenarios where both types of data coexist, the high-frequency and low-frequency feature matrix vectors are standardized and then a dual-branch parallel input channel is constructed. LightGBM is used to calculate the contribution weights of the dual-branch features, and GRU is used to capture the temporal correlation and long-term dependency patterns of the two types of data, outputting predicted values that take into account both growth and decay characteristics. The entire process addresses three scenarios: high-frequency co-occurrence data, low-frequency co-occurrence data, and coexistence of both types of data. It constructs a hierarchical prediction logic to effectively improve the prediction accuracy in complex demand scenarios in the apparel industry.
[0011] 4. The real-time scene adaptation effect evaluation process in this invention starts with the demand forecast value and constructs a hierarchical judgment logic to ensure the accuracy and reliability of the apparel demand forecast results. First, the demand forecast value is compared with the corresponding preset value. If the demand forecast value is greater than the corresponding preset value, it is directly judged as unqualified and a substandard accuracy prompt is sent. If the demand forecast value is not greater than the corresponding preset value, two core parameters are further obtained: the absolute value of the Poisson fitting residual and the proportion of temporal dimension features. Based on the interval adaptation of the two parameters, three types of scene judgments are made: if both parameters meet the standard, the final predicted value is directly output to ensure the validity of the result; if a single parameter deviates, the model's temporal window length is fine-tuned and the prediction process is re-executed to dynamically optimize the model's adaptability and avoid prediction failure due to local parameter anomalies; if both parameters fail to meet the standard, adaptation failure is judged and an anomaly prompt is sent to promptly warn of risks. This process, through multi-level verification and dynamic optimization mechanisms, effectively avoids unqualified prediction result output, improves prediction accuracy, and enhances the model's dynamic adaptability to complex scenarios in the apparel industry, providing strong support for accurate demand decision-making. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating the clothing demand forecasting method based on a hybrid modeling framework provided in this embodiment of the invention; Figure 2 A flowchart for evaluating and determining the real-time scene adaptation effect provided in this embodiment of the invention; Figure 3 A full-chain workflow diagram for apparel demand forecasting provided in this embodiment of the invention; Figure 4 A schematic diagram of the structure of the clothing demand forecasting system based on a hybrid modeling framework provided in an embodiment of the present invention; Figure 5 A hybrid framework diagram of the LightGBM model and the GRU model provided for embodiments of the present invention. Detailed Implementation
[0014] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0015] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0016] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0017] Example 1
[0018] This invention provides a method for predicting apparel demand based on a hybrid modeling framework, such as... Figure 1 The flowchart shown is for a clothing demand forecasting method based on a hybrid modeling framework. The processing flow of this method may include the following steps: In a specific time-series data monitoring scenario, time-series feature decomposition is performed on the target dataset used for apparel demand prediction. During the time-series feature decomposition process, co-occurrence relationship data reflecting the degree of correlation between different data is obtained. Time-series feature decomposition is used to separate the periodic fluctuations, trend components, and random disturbances in the target dataset. The obtained co-occurrence relationship data is imported into a hybrid framework based on the fusion of the LightGBM model and the GRU model for differentiated demand prediction, outputting demand prediction values for different time periods and different data dimensions to reflect apparel demand. Based on the demand prediction values, the scenario adaptation effect is evaluated. By monitoring the dynamic adaptation status of the Poisson distribution parameters of the demand sequences corresponding to different data dimensions and different time periods during the scenario adaptation effect evaluation process, it is determined whether to output the final demand prediction value.
[0019] The specific process for acquiring co-occurrence relationship data is as follows: A sliding window filtering algorithm is used to smooth the collected apparel product data (such as daily sales, weekly page views, monthly inventory turnover rate, and new product launch frequency). A window length (e.g., 7 days / 30 days) is set by pre-defined personnel to adapt to the fluctuation characteristics of apparel demand. The mean of the data within this window is iteratively calculated to remove outliers (such as sudden sales spikes on promotional days) and reduce random noise interference, resulting in a stable time-series dataset with smooth fluctuations. Based on Fourier transform, the continuous time-domain data in the stable time-series dataset is mapped to the frequency domain. A fast Fourier transform is used to convert it into a complex sequence, and the amplitude spectrum reflecting the energy distribution of each frequency component and the phase spectrum representing the relative time shift information of each frequency component are calculated. Fixed time periods such as weekly, monthly, and seasonal periods are matched, and the amplitude and phase of the corresponding frequencies are extracted to generate periodic feature data. This typically includes the weekly consumption fluctuation amplitude, the monthly new product launch cycle phase, and the seasonal demand peak frequency, accurately representing the fluctuation pattern of the data with fixed time periods and eliminating periodic interference for subsequent trend component extraction.
[0020] By combining the least squares method in the time domain and using the extracted periodic feature data as a benchmark, the fitted values corresponding to the original periodic feature data in the stationary time series dataset are subtracted from the periodic fitted values at the corresponding time nodes to obtain the remaining data sequence. A linear correspondence between time and the remaining data is established, and the optimal fitting parameters are solved, such as the optimal solutions for slope and intercept: the optimal solution for slope represents the temporal change rate of timestamp overlap, and the optimal solution for intercept represents the benchmark value of overlap at the initial time node. By minimizing the sum of squared residuals between the fitted value and the actual value, the optimal parameter combination is determined, achieving accurate separation of trend components and random interference terms in the remaining data, filtering out the influence of random interference terms, and finally obtaining trend feature data that can reflect the long-term growth or decline direction of clothing demand.
[0021] Based on the time window segmentation results of the stationary time series dataset, i.e., equal-length segments divided according to a preset granularity (day / week / month), the system filters out the associated occurrence records corresponding to different trend characteristics within the same time window. For example, within a 30-day window, the synchronous occurrence records of knitwear category + size M + winter new arrivals and monthly sales growth of 8% + average browsing time of 10 minutes are used. Categorical indicators (such as clothing category, size, new arrivals) are classified as discrete co-occurrence data, while continuous indicators (such as sales growth and average browsing time) are classified as non-discrete co-occurrence data, thus achieving accurate separation of the two types of data. The timestamps of discrete and non-discrete co-occurring data are unified to the same granularity (e.g., daily / week) to generate a standard timeline. For each time node, the ratio of the number of nodes where both types of data appear synchronously to the total number of nodes where at least one type of data exists is recorded as the timestamp overlap. This quantifies the temporal synchronization correlation strength between discrete and non-discrete co-occurring data, filters out interference from blank nodes, and intuitively reflects the temporal matching degree between data. The timeline is truncated according to a preset sliding window, and the number of nodes where both types of data appear synchronously within the same time window is counted, which is the co-occurrence frequency, to quantify the degree of correlation between data in different dimensions.
[0022] All co-occurrence data with a frequency greater than the reference co-occurrence frequency are aggregated into co-occurrence data pairs and identified as having a significant correlation. Co-occurrence characteristics are divided into different stages according to time periods, and association combinations of different attributes such as category, size, and sales growth rate are distinguished according to data dimensions to obtain co-occurrence relationship data for the same time period and different data dimensions, such as the sales growth rate of 15% for the floral dress category under the monthly dimension. The reference co-occurrence frequency is represented by the sum and average of historical co-occurrence frequencies during the historical co-occurrence data processing. Co-occurrence data with a frequency not greater than the reference co-occurrence frequency are aggregated into co-occurrence data pairs and identified as having no significant correlation. These abnormal co-occurrence relationships are marked to prompt pre-selected personnel for manual investigation.
[0023] Differentiated demand forecasting includes: based on the frequency of co-occurrence within a sliding time window, co-occurrence data with a frequency exceeding a set threshold across different data dimensions are categorized as high-frequency co-occurrence data, while co-occurrence data with a frequency below the set threshold are categorized as low-frequency co-occurrence data; demand forecasting is then performed based on the acquired high-frequency and low-frequency co-occurrence data; the set threshold is determined based on the quartile statistical results of historical co-occurrence frequencies. If the frequency of co-occurrence across different data dimensions equals the set threshold, differentiated demand forecasting is not required. In this case, the mean feature and timestamp overlap benchmark value of the co-occurrence data are directly used as inputs to the LightGBM and GRU models, outputting a unified apparel demand forecast result. There is no need to distinguish the weighting of high-frequency and low-frequency features, simplifying the forecasting process while ensuring the stability of the results.
[0024] Example A: When the differential classification result indicates the existence of only high-frequency co-occurring data, the specific process for demand forecasting is as follows: Obtain the timestamp overlap of the high-frequency co-occurring data within the sliding time window; obtain the temporal feature values of the high-frequency co-occurring data within the sliding time window, i.e., the phase offset of each time node; calculate the difference between adjacent temporal feature values; take the average of the differences to obtain the corresponding first-order difference slope; obtain a two-dimensional feature space with timestamp overlap as the horizontal axis and the first-order difference slope as the vertical axis; simultaneously introduce the Pearson correlation coefficient corresponding to timestamp overlap and the first-order difference slope to quantify the linear correlation strength and direction between timestamp overlap and the first-order difference slope; summarize the maximum and minimum values of the Pearson correlation coefficients corresponding to timestamp overlap and the first-order difference slope to determine the upper and lower limits of data fluctuation; use the minimum-maximum normalization formula to calculate the difference between the maximum and minimum values corresponding to each Pearson correlation coefficient within the sliding time window, and then calculate the Pearson correlation coefficients obtained from the time window. The Pearson correlation coefficient is divided by the difference between the maximum and minimum values to achieve linear scaling. All Pearson correlation coefficients are mapped to the [0,1] interval to eliminate the dimensional differences between different indicators, resulting in dynamic weight coefficients that can be directly used for weight allocation. The dynamic weight coefficients are assigned to each data point in the two-dimensional feature space. The horizontal axis (timestamp overlap) and vertical axis (first-order difference slope) coordinates of the data points are integrated by matrix arrangement to generate a growth-time correlation coupling feature matrix for visualizing the growth trend and time correlation features of high-frequency co-occurrence data, thus realizing the visualization of the growth trend and time correlation features of high-frequency co-occurrence data. The vectors in the generated growth-time correlation coupling feature matrix are used as inputs for demand prediction in high-frequency co-occurrence scenarios. Demand prediction is performed based on the collaborative fitting capabilities of the LightGBM and GRU models. The predicted demand values for different time periods and different data dimensions in high-frequency co-occurrence scenarios are output, and the real-time scenario adaptation effect is evaluated.
[0025] Similar to the above demand forecasting execution process, Example B: When the result of differential classification is that only low-frequency co-occurring data exists, the specific process of demand forecasting is as follows: Obtain the demand sequence decay rate and corresponding timestamp overlap of the low-frequency co-occurring data within the sliding time window. The demand sequence decay rate represents the decrease in the corresponding value of the demand sequence at each time node within the sliding time window over time. This is obtained by calculating the average difference between the corresponding values of the demand sequences at adjacent time nodes and taking the negative value; Plot the demand sequence decay rate on the vertical axis and the timestamp overlap on the horizontal axis, while simultaneously introducing the relationship between the demand sequence decay rate and time... The Pearson correlation coefficient corresponding to the interstitial overlap is obtained through the same process as the dynamic weight coefficient mentioned above, thus obtaining the dynamic correction coefficient and generating the decay-time correlation coupling feature matrix for visualizing the decay trend and temporal correlation characteristics of low-frequency co-occurrence data. The vectors in the obtained decay-time correlation coupling feature matrix are used as inputs for demand prediction in low-frequency co-occurrence scenarios. Demand prediction is performed through the prediction logic of hierarchical fitting of LightGBM and GRU models, outputting demand prediction values for different time periods and different data dimensions in low-frequency co-occurrence scenarios, and evaluating the real-time scenario adaptation effect.
[0026] Example C: When the differential classification result shows that high-frequency co-occurrence data and low-frequency co-occurrence data coexist, the specific process of demand prediction is as follows: Obtain the vectors of the associated coupling feature matrices corresponding to the high-frequency and low-frequency co-occurrence data respectively; unify the vector dimension and data granularity according to the feature dimension alignment rule; complete the standardization process; build independent transmission paths for the two types of vectors respectively; integrate them to form a dual-branch parallel input channel with high-frequency branch and low-frequency branch; calculate the dynamic weight coefficients corresponding to the feature contribution of high-frequency and low-frequency co-occurrence data in the dual-branch parallel input channel respectively using the LightGBM model; capture the temporal linear evolution law of the two types of data respectively using the GRU model; output the demand prediction value that takes into account both the high-frequency growth trend and the low-frequency decay characteristics; and evaluate the real-time scene adaptation effect.
[0027] like Figure 2The flowchart shown illustrates the evaluation and judgment process for real-time scene adaptation effectiveness. The specific process for evaluating the real-time scene adaptation effectiveness is as follows: If the obtained demand prediction value is greater than the preset demand prediction value, the demand prediction for the corresponding scene is deemed unqualified, and a prompt indicating that the model prediction accuracy is insufficient is sent. The preset demand prediction value is represented by the average of the historical output demand prediction values during the historical clothing demand prediction process. If the obtained demand prediction value is not greater than the preset demand prediction value, the demand prediction for the corresponding scene is deemed qualified, and the absolute value of the Poisson fitting residual and the proportion of temporal dimension features are obtained. The absolute value of the Poisson fitting residual represents the absolute value of the difference between the actual observed value of the demand sequence and the theoretical fitted value of the Poisson distribution. The proportion of temporal dimension features represents the sum of the contribution weights of timestamp overlap to the LightGBM and GRU models. A comprehensive judgment is made on whether to output the final clothing demand prediction result. Specifically: If both the absolute value of the Poisson fitting residuals and the proportion of time-series features are within their respective allowable intervals, the current model's prediction accuracy and data fit are deemed satisfactory, and the final demand forecast value is directly output. The corresponding allowable intervals represent: the absolute value of the historical Poisson fitting residuals and the proportion of historical time-series features in the historical apparel demand forecasting process, and the closed intervals corresponding to the historical maximum and minimum values. If a single parameter in the absolute value of the Poisson fitting residuals and the proportion of time-series features is not within its corresponding allowable interval, the time-series window length of the corresponding model is fine-tuned based on the degree of deviation of the corresponding parameter. For example, when the absolute value of the Poisson fitting residuals exceeds the allowable interval by 10%, the original 7-day sliding window is extended to 10 days to optimize the fitting accuracy of the Poisson distribution to the demand sequence and reduce the absolute value of the residuals to within the allowable interval. When the proportion of time-series features is less than 8% of the allowable interval, the original 30-day window is shortened to 20 days to increase the contribution weight of indicators such as timestamp overlap to the model.
[0028] After fine-tuning, and re-executing the differentiated demand forecasting process, if the absolute value of the Poisson fitting residual and the proportion of time-series features are both within the corresponding allowable range, the final demand forecast value is output; if the absolute value of the Poisson fitting residual and the proportion of time-series features are not within the corresponding allowable range, it is determined that the current model prediction accuracy and data fit are not up to standard, and a demand forecasting anomaly prompt is sent to prompt the designated personnel to conduct manual investigation.
[0029] Specifically, the output demand forecast is a multi-dimensional time-series demand quantification result combined with the apparel industry scenario. It specifically refers to the demand scale estimate under different time periods (day / week / month) and different data dimensions (category / size / style), covering the short-term growth demand of high-frequency co-occurring data and the long-term decay demand of low-frequency co-occurring data, providing accurate quantitative basis for inventory scheduling and production and sales planning.
[0030] Based on the coupled feature matrix vectors of high-frequency and low-frequency co-occurrence data, a training set and a test set are divided, with historical clothing demand values used as the prediction label. Core hyperparameters such as tree depth, learning rate, and number of leaf nodes are set, and an iterative training mode of gradient boosting decision trees is adopted, using the Gini coefficient as the node splitting criterion to minimize the mean squared error loss between predicted and true values. L1 / L2 regularization is added to constrain the model parameters, penalizing excessively large parameter weights to suppress overfitting risk and ensure the model's generalization ability. Simultaneously, K-fold cross-validation is used, dividing the dataset into multiple alternating training and validation sets, iteratively optimizing the combination of hyperparameters such as tree depth and learning rate, ultimately obtaining a gradient boosting model adapted to the temporal demand characteristics of clothing, namely the LightGBM model.
[0031] Based on the coupled feature matrix vectors of high-frequency and low-frequency co-occurrence data, a training set and a test set are divided, with historical clothing demand values used as the prediction label. Core hyperparameters such as hidden layer dimension, time step, and learning rate are set, and a gated recurrent neural network architecture (such as a single-layer bidirectional GRU structure or a stacked multi-layer GRU structure) is adopted. By relying on the weights for transmitting temporal information through updating the gates and the retention value of historical information through resetting the gates, long-term dependencies in temporal data are dynamically captured. Using cross-entropy loss or mean squared error loss as the model optimization objective, the network parameters are iteratively updated using the gradient descent algorithm. A dropout layer is added to randomly deactivate some neurons to suppress overfitting, ultimately obtaining a GRU model adapted to the temporal correlation features of clothing demand.
[0032] The hybrid framework integrating LightGBM and GRU refers to a dual-model collaborative prediction architecture that combines the advantages of LightGBM in handling nonlinear features with the ability of GRU in uncovering linear time-series patterns. The framework inputs feature vectors from high-frequency and low-frequency co-occurring data into both models in parallel, outputting nonlinear and linear time-series predictions respectively. The final result is obtained through dynamic weighted fusion, taking into account both short-term fluctuations and long-term trends in apparel demand.
[0033] like Figure 3The diagram illustrates the entire workflow of apparel demand forecasting. Starting with data collection and preprocessing, after cleaning and organizing the basic data, the process moves to feature engineering and encoding. Word2vec encoding transforms information such as order relationships, products, and marketing activities into vector space representations, quantifying unstructured features. Subsequently, based on product classification and modeling strategy selection, three models—Poisson distribution, LightGBM, and GRU—are used according to data characteristics. Poisson distribution is suitable for discrete demand scenarios, LightGBM captures nonlinear features, and GRU mines temporal correlations. These three models complement each other through augmentation. Finally, a hybrid model is used to integrate the outputs of multiple models, achieving complementary advantages. The final demand forecast is then obtained through the prediction results. This diagram comprehensively covers the core stages of feature processing, multi-model selection, and hybrid fitting, intuitively demonstrating the modular and collaborative logic of demand forecasting.
[0034] This invention provides a clothing demand forecasting system based on a hybrid modeling framework, such as... Figure 4 The diagram shows the structure of a clothing demand forecasting system based on a hybrid modeling framework. This system can include: a co-occurrence data acquisition module, used to perform time-series feature decomposition on the target dataset for clothing demand forecasting under specific time-series data monitoring scenarios, and to acquire co-occurrence relationship data reflecting the degree of correlation between different data during the time-series feature decomposition process; a differentiated demand forecasting module, used to import the acquired co-occurrence relationship data into a hybrid framework based on a fusion of the LightGBM model and the GRU model for differentiated demand forecasting, outputting demand forecast values corresponding to different time periods and different data dimensions; and an adaptation effect evaluation and judgment module, used to evaluate the scenario adaptation effect based on the demand forecast values, and to determine whether to output the final demand forecast value by monitoring the dynamic adaptation status of the Poisson distribution parameters of the demand sequences corresponding to different data dimensions and different time periods during the scenario adaptation effect evaluation process.
[0035] In this first embodiment, by decomposing time-series features and accurately extracting co-occurrence relationship data, the periodic and trend components and random interference items in apparel demand data are effectively separated. The strength of data association is quantified by combining timestamp overlap and co-occurrence frequency. A secondary time-series verification mechanism is added to avoid missing potentially significant related data, improving the quality of feature data and laying a solid foundation for accurate prediction. Based on time distribution density clustering, high-frequency and low-frequency differentiated classification of co-occurrence data is achieved, matching a targeted prediction process. Leveraging the synergistic advantages of the LightGBM and GRU model hybrid framework, both nonlinear short-term fluctuations and linear long-term periodic patterns are considered. The dual-branch parallel architecture adapts to the collaborative prediction of both types of data, improving the scenario adaptability of the prediction results. Combining Poisson fitting residuals and dynamic verification of the proportion of time-series features, model performance is optimized through time-series window fine-tuning, reducing demand prediction bias. Finally, multi-period, multi-dimensional accurate demand prediction values are output, providing a basis for apparel inventory scheduling and production and sales planning, effectively reducing inventory backlog and supply-demand imbalance, and improving the operational decision-making efficiency of apparel companies.
[0036] Example 1 describes a basic scheme for directly determining the significance of co-occurrence data associations based on co-occurrence frequency. Similarly, to improve the accuracy of association determination and avoid missing potentially significant association data, Example 2 is added based on Example 1. This example provides an optimized scheme for secondary time-series verification of co-occurrence data pairs whose historical co-occurrence frequency is no greater than the reference co-occurrence frequency. The details are as follows: Example 2
[0037] The specific process of acquiring co-occurrence relationship data also includes: if there are co-occurrence data pairs whose historical co-occurrence frequency is no greater than the reference co-occurrence frequency, i.e., those that do not meet the criteria for determining significant correlation, then the overlap of timestamps on the same time axis between discrete and non-discrete co-occurrence data is first calculated and used as input to the GRU model. The GRU model is used to capture the long-term dependency relationship of time series data, and a short-term time series correlation trend prediction is performed through a time series trend extrapolation algorithm, outputting the co-occurrence frequency of the corresponding co-occurrence data in the next time period. If the co-occurrence frequency does not meet the preset requirement for significant correlation, i.e., the co-occurrence frequency in the next time period is still no greater than the reference co-occurrence frequency, then the judgment result that it does not have a significant correlation is maintained. Otherwise, it is judged as a co-occurrence data pair with a significant correlation, and classified according to the preset time granularity and data dimension level, finally obtaining co-occurrence relationship data for different time periods and different data dimensions, such as the sales growth rate of 10% for knitwear category and the average browsing time of 12 minutes for casual pants category in the monthly dimension.
[0038] In this second embodiment, for co-occurrence data pairs whose historical co-occurrence frequency is no greater than the reference co-occurrence frequency and which do not meet the criteria for determining significant correlation, a secondary time-series verification is used to achieve accurate screening. By leveraging the GRU model's ability to mine time-series trends in timestamp overlap, short-term correlation changes can be effectively predicted, avoiding the omission of potentially significant correlation data with low historical frequency but strengthening short-term correlations. This improves the completeness and accuracy of co-occurrence relationship data extraction, providing higher-quality feature data support for subsequent differentiated demand predictions and ensuring the reliability of the prediction results.
[0039] It should be added that, such as Figure 5 The hybrid framework diagram shown below, which integrates the LightGBM and GRU models, is divided into four core modules: multi-source data input and preprocessing, parallel prediction of the two models, prediction result fusion, and manual correction and closed-loop iteration. The workflow is as follows: The multi-source data input and preprocessing module is the starting point of the process, requiring the integration of two types of data: core sales data, including historical sales figures and holiday calendars; and causal auxiliary data, covering user behavior (such as browsing and adding to cart interactions), product attributes (such as static features like category and price), and external environment (such as weather and promotional activities). After data preprocessing (including cleaning, encoding, and normalization), this data is separated into the GRU input sequence (continuous data in time-series format) and the causal feature set (discrete / numerical feature combinations), which are then connected to the two sub-models respectively.
[0040] The dual-model parallel prediction module is the core modeling layer, with two sub-models working collaboratively: The GRU model, based on the input sequence, sequentially completes model structure construction (determining the number of layers and hidden units in the recurrent neural network), hyperparameter tuning (optimizing parameters such as learning rate and number of iterations), and model training, ultimately outputting a baseline prediction value (the time-series demand trend captured by the GRU model) and a time-series residual value (the error between the predicted value and the training data); The LightGBM model, taking a causal feature set as input, first performs feature filtering (removing redundant features), then completes model training, and outputs residual correction values and feature importance.
[0041] The prediction result fusion module is responsible for integrating the outputs of the two models: by using a fusion operator (usually a weighted summation or residual compensation logic), it combines the baseline prediction value and time-series residual value output by the GRU model with the residual correction value output by the LightGBM model to obtain the final demand prediction value; at the same time, based on the error distribution of the model, it calculates the 95% confidence interval (reflecting the reliability range of the prediction results).
[0042] The manual correction and closed-loop iteration module is crucial for ensuring continuous model optimization: First, human experience is introduced to adjust the final demand forecast based on actual sales data; then, through error calculation (quantifying the deviation between the forecast and the actual value) and error attribution (analyzing whether the error originates from the data, the model, or the features), model iteration is initiated (updating the parameters or structure of the GRU / LightGBM model); finally, the corrected results are synchronized to decision-making plans (such as inventory scheduling and marketing arrangements), while simultaneously completing the closed-loop optimization of the model to achieve continuous improvement in forecasting capabilities.
[0043] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the flow or function according to the embodiments of the present invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.
[0044] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0045] In various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0046] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0047] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for predicting apparel demand based on a hybrid modeling framework, characterized in that, The method includes: In a specific time-series data monitoring scenario, time-series feature decomposition is performed on the target dataset used for clothing demand prediction, and co-occurrence relationship data reflecting the degree of correlation between different data is obtained during the time-series feature decomposition process. The acquired co-occurrence relationship data is imported into a hybrid framework based on the fusion of the LightGBM model and the GRU model to perform differentiated demand forecasting, and output demand forecast values reflecting clothing demand corresponding to different time periods and different data dimensions. The scenario adaptation effect is evaluated based on the demand forecast. By monitoring the dynamic adaptation status of the Poisson distribution parameters of the demand sequence corresponding to different data dimensions and different time periods during the scenario adaptation effect evaluation process, it is determined whether to output the final demand forecast.
2. The apparel demand forecasting method based on a hybrid modeling framework as described in claim 1, characterized in that, The time-series feature decomposition is used to separate the periodic fluctuations, trend components, and random disturbance terms in the target dataset; The specific process for obtaining the co-occurrence relationship data is as follows: The collected clothing product data was smoothed using a sliding window filtering algorithm to obtain a stationary time series dataset. The stationary time series dataset was then decomposed in the frequency domain based on Fourier transform to obtain periodic feature data. By combining the least squares method in the time domain to perform trend fitting and component separation on periodic feature data, trend feature data is obtained; Based on the time window segmentation results of the stationary time series dataset, we filter the associated occurrence records corresponding to different trend feature data within the same time window, and further split them to obtain discrete co-occurrence data and non-discrete co-occurrence data; Calculate the time stamp overlap of discrete co-occurrence data and non-discrete co-occurrence data on the same time axis, and summarize the co-occurrence frequency of different dimensions of data in discrete co-occurrence data and non-discrete co-occurrence data within the same sliding time window to quantify the degree of correlation between different dimensions of data. All co-occurrence data with a frequency greater than the reference co-occurrence frequency are aggregated into co-occurrence data pairs and identified as having a significant correlation. These pairs are then classified according to a preset time granularity and data dimension hierarchy to obtain co-occurrence relationship data for the same time period and different data dimensions. Co-occurrence data with a common frequency no greater than the reference common frequency are aggregated into co-occurrence data pairs. Co-occurrence data pairs that are not significantly related are marked as abnormal co-occurrence relationships.
3. The apparel demand forecasting method based on a hybrid modeling framework as described in claim 2, characterized in that, The specific process for obtaining the co-occurrence relationship data also includes: If there are co-occurrence data whose historical co-occurrence frequency is no greater than the reference co-occurrence frequency, then first calculate the timestamp overlap of discrete co-occurrence data and non-discrete co-occurrence data on the same time axis, and use it as the input of the GRU model. Then, use the time series trend extrapolation algorithm to predict the short-term time series correlation trend and output the co-occurrence frequency of the corresponding co-occurrence data in the next time period. If the co-occurrence frequency does not meet the preset requirement for significant association, the judgment result that it is not significantly associated is maintained. Otherwise, it is judged as a co-occurrence data pair with significant association, and classified according to the preset time granularity and data dimension level to obtain co-occurrence relationship data of different time periods and different data dimensions.
4. The apparel demand forecasting method based on a hybrid modeling framework as described in claim 2 or 3, characterized in that, The differentiated demand forecasting includes: The acquired co-occurrence relationship data is differentiated into high-frequency co-occurrence data and low-frequency co-occurrence data, and corresponding demand forecasts are made accordingly. The high-frequency co-occurrence data refers to the co-occurrence relationship data in which different data dimensions appear together more frequently than a set threshold within a preset sliding time window. The low-frequency co-occurrence data refers to co-occurrence relationship data in which the frequency of different data dimensions appearing together is lower than a set threshold within a preset sliding time window.
5. The apparel demand forecasting method based on a hybrid modeling framework as described in claim 4, characterized in that, When the result of differential classification is that only high-frequency co-occurring data exists, the specific process of demand prediction is as follows: The timestamp overlap of high-frequency co-occurrence data within a sliding time window and the corresponding first-order difference slope are obtained. The first-order difference slope represents the first-order difference calculation result of the timestamp overlap of high-frequency co-occurrence data changing with the time series. Using timestamp overlap as the horizontal axis and the first-order difference slope as the vertical axis, the Pearson correlation coefficient corresponding to timestamp overlap and the first-order difference slope is introduced. After linear mapping and normalization, dynamic weight coefficients are obtained, generating a growth-time correlation coupling feature matrix for visualizing the growth trend and time correlation features of high-frequency co-occurrence data. The vectors in the generated growth-time correlation coupling feature matrix are used as inputs for demand prediction in high-frequency co-occurrence scenarios. Demand prediction is performed by relying on the collaborative fitting capabilities of the LightGBM and GRU models. The predicted demand values for different time periods and different data dimensions under high-frequency co-occurrence scenarios are output, and the real-time scenario adaptation effect is evaluated.
6. The apparel demand forecasting method based on a hybrid modeling framework as described in claim 4, characterized in that, When the result of differential classification is that only low-frequency co-occurrence data exists, the specific process of demand prediction is as follows: Obtain the demand sequence decay rate and corresponding timestamp overlap of low-frequency co-occurrence data within a sliding time window; Using the demand sequence decay rate as the vertical axis and the timestamp overlap as the horizontal axis, the Pearson correlation coefficient corresponding to the demand sequence decay rate and timestamp overlap is introduced. After linear mapping and normalization, a dynamic correction coefficient is obtained, generating a decay-time correlation coupling feature matrix for visualizing the decay trend and time correlation characteristics of low-frequency co-occurrence data. The vectors in the acquired decay-time correlation coupling feature matrix are used as inputs for demand prediction in low-frequency co-occurrence scenarios. Demand prediction is performed through the prediction logic of hierarchical fitting of LightGBM and GRU models. The predicted demand values for different time periods and different data dimensions under low-frequency co-occurrence scenarios are output, and the real-time scene adaptation effect is evaluated.
7. The apparel demand forecasting method based on a hybrid modeling framework as described in claim 4, characterized in that, When the differential classification result shows that both high-frequency and low-frequency co-occurrence data exist simultaneously, the specific process of demand forecasting is as follows: The vectors of the associated coupling feature matrices corresponding to the high-frequency and low-frequency co-occurrence data are obtained respectively. After standardization according to the feature dimension alignment rule, a dual-branch parallel input channel with high-frequency branch and low-frequency branch is formed. The LightGBM model is used to calculate the dynamic weight coefficients corresponding to the feature contribution of high-frequency and low-frequency co-occurring data in the dual-branch parallel input channel. The GRU model is used to capture the temporal linear evolution law of the two types of data, output the demand prediction value, and evaluate the real-time scene adaptation effect.
8. The apparel demand forecasting method based on a hybrid modeling framework as described in any one of claims 5 to 7, characterized in that, The specific process for evaluating the real-time scene adaptation effect is as follows: If the obtained demand forecast value is greater than the preset demand forecast value, the demand forecast in the corresponding scenario is deemed unqualified, and a prompt indicating that the model prediction accuracy is substandard is sent. If the obtained demand forecast value is not greater than the preset demand forecast value, the demand forecast in the corresponding scenario is deemed qualified, and the absolute value of the Poisson fitting residual and the proportion of time-series dimension features are obtained. A comprehensive judgment is then made on whether to output the final clothing demand forecast result.
9. The apparel demand forecasting method based on a hybrid modeling framework as described in claim 8, characterized in that, The determination of whether to output the final demand forecast value specifically involves: If the absolute value of the Poisson fitting residual and the proportion of time-series features are both within the corresponding allowable range, then the current model prediction accuracy and data fit are deemed to meet the standard, and the final required prediction value is directly output. If a single parameter in the absolute value of the Poisson fitting residual and the proportion of time-series dimension features is not within the corresponding allowable range, the time-series window length of the corresponding model is fine-tuned based on the degree of offset of the corresponding parameter. After fine-tuning, the differentiated demand forecasting process is re-executed. If the re-obtained absolute value of the Poisson fitting residual and the proportion of time-series dimension features are both within the corresponding allowable range, the final demand forecast value is output. If the absolute value of the Poisson fitting residual and the proportion of time-series features are both outside the corresponding allowable ranges, the current model prediction accuracy and data fit are deemed substandard, and an abnormal demand prediction alert is sent.
10. A clothing demand forecasting system based on a hybrid modeling framework, characterized in that, The system includes: The co-occurrence relationship data acquisition module is used to perform time-series feature decomposition on the target dataset for clothing demand prediction in a specific time-series data monitoring scenario, and to acquire co-occurrence relationship data that reflects the degree of correlation between different data during the time-series feature decomposition process. The differentiated demand forecasting module is used to import the acquired co-occurrence relationship data into a hybrid framework based on the fusion of the LightGBM model and the GRU model to perform differentiated demand forecasting and output demand forecast values that reflect clothing demand for different time periods and different data dimensions. The adaptation effect evaluation and judgment module is used to evaluate the scene adaptation effect based on the demand prediction value. By monitoring the dynamic adaptation status of the Poisson distribution parameters of the demand sequence corresponding to different data dimensions and different time periods during the scene adaptation effect evaluation process, it determines whether to output the final demand prediction value.
Citation Information
Patent Citations
Prediction method and system for clothing product demand
CN120410613A