A user behavior driven e-commerce sales prediction inventory optimization method and system

CN122736484APending Publication Date: 2026-09-11SHENZHEN VAYI IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610742181.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-27
Publication Date
2026-09-11

AI Technical Summary

Technical Problem

此类方法在市场需求相对稳定、历史规律明显的场景下具有一定的有效性,但存在显著局限性,如预测滞后时间长、库存周转效率低等

Benefits of technology

[0017]The user behavior-driven e-commerce sales forecasting and inventory optimization method, employing the technical solution of this invention, includes: real-time collection of multimodal interaction behavior data of users on e-commerce platforms, including page dwell time, scrolling trajectory, frequency of repeated visits to product detail pages, add-to-cart and cancel operation sequences, and social sharing behavior; inputting the multimodal interaction behavior data into a pre-trained purchase intent quantification model, outputting an instant purchase intent intensity vector for each user for each SKU; performing time-series aggregation of the instant purchase intent intensity vectors of all users using a sliding time window, identifying abnormal rise inflection points of intent intensity, and defining these abnormal rise inflection points as demand precursor signals; fusing external dynamic context factors to weight and correct the demand precursor signals, forming a multi-source fusion demand precursor feature set; and constructing a two-level causal prediction model consisting of a category-level sales forecasting model and an SKU-level sales forecasting model. A two-level causal prediction model is driven by a multi-source fusion demand precursor feature set. The category-level sales prediction model outputs total trend constraints, while the SKU-level sales prediction model, under the total trend constraints, combines product attribute embedding vectors to output the confidence interval sales prediction value for each SKU. The difference between the upper and lower bounds of the confidence interval sales prediction value is used as a measure of demand uncertainty. Combined with the current supply chain response cycle and warehousing cost coefficient, the adaptive safety stock threshold for each SKU is dynamically calculated. When the real-time inventory level is lower than the threshold, a replenishment warning is triggered; when it is higher than the upper limit of the threshold, a slow-moving stock warning is triggered. The adaptive safety stock threshold, the geographical distribution of multiple warehouses, and the logistics timeliness matrix are used as constraints. With the goal of minimizing the sum of total holding costs and stockout losses, the optimal replenishment quantity and allocation plan for each SKU at each warehouse node are solved, and the decision results are written back to the inventory management module in real time. This solution places user behavior intent signals ahead of sales surges, enabling early perception of demand changes and significantly shortening the forecast lag window. The hierarchical causal forecasting architecture ensures logical consistency between category and SKU forecasts. The dynamic safety stock threshold adaptively contracts or expands with demand uncertainty, effectively balancing stockout risk and inventory backlog costs. Multi-warehouse collaborative optimization decisions further reduce end-to-end holding costs and improve overall inventory turnover efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122736484A_ABST
    Figure CN122736484A_ABST
Patent Text Reader

Abstract

This invention proposes a user behavior-driven e-commerce sales forecasting and inventory optimization method and system, comprising: collecting user interaction behavior data; obtaining a purchase intent intensity vector based on the interaction behavior data; identifying abnormal rises in the purchase intent intensity as demand precursor signals based on the purchase intent intensity vector; obtaining a demand precursor feature set based on the demand precursor signals; inputting the demand precursor feature set into a two-level causal prediction model to obtain total trend constraints and confidence interval sales forecast values ​​for each SKU; calculating an adaptive safety stock threshold for each SKU based on the confidence interval sales forecast values, the current supply chain response cycle, and warehousing cost coefficients; triggering a replenishment warning when the real-time inventory level is below the threshold and a slow-moving inventory warning when it is above the upper limit of the threshold; solving for the optimal replenishment quantity and allocation plan for each SKU at each warehouse node, and writing the decision results back to the inventory management module in real time. This invention can effectively balance stockout risk and inventory backlog costs, and improve inventory turnover efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, specifically to a user behavior-driven e-commerce sales forecasting and inventory optimization method and system. Background Technology

[0002] With the rapid development of e-commerce and increasingly fierce market competition, accurate sales forecasting and dynamic inventory optimization have become core elements for e-commerce companies to improve operational efficiency, reduce overall costs, and enhance customer satisfaction. Traditional sales forecasting methods mainly rely on time series analysis of historical sales data (such as moving averages and exponential smoothing) or statistical models based on product attributes and seasonal factors. These methods are effective to a certain extent in scenarios where market demand is relatively stable and historical patterns are obvious, but they have significant limitations, such as long forecast lag times and low inventory turnover efficiency. Summary of the Invention

[0003] Based on the above problems, this invention proposes a user behavior-driven e-commerce sales forecasting and inventory optimization method and system. Through this invention, early perception of demand changes can be achieved, the forecast lag window can be significantly shortened, the risk of stockouts and the cost of inventory backlog can be effectively balanced, and the overall inventory turnover efficiency can be improved.

[0004] In view of this, one aspect of the present invention proposes a user behavior-driven e-commerce sales forecasting and inventory optimization method, comprising: Real-time collection of multimodal interaction data of users on e-commerce platforms, including page dwell time, scrolling trajectory, frequency of repeated visits to product detail pages, add-to-cart and cancel operation sequences, and social sharing behavior; Multimodal interaction behavior data is input into a pre-trained purchase intent quantification model, which outputs an instant purchase intent intensity vector for each user for each SKU. By performing time-series aggregation on the real-time purchase intent intensity vector of all users using a sliding time window, we can identify the abnormal rise in intent intensity and define the abnormal rise inflection point as a demand precursor signal. By integrating external dynamic context factors, the demand precursor signals are weighted and corrected to form a multi-source fusion demand precursor feature set; Construct a two-level causal prediction model consisting of a category-level sales prediction model and a SKU-level sales prediction model; The two-level causal prediction model is driven by a multi-source fusion demand precursor feature set. The category-level sales prediction model outputs the total trend constraint, and the SKU-level sales prediction model outputs the confidence interval sales prediction value of each SKU under the total trend constraint and the product attribute embedding vector. The difference between the upper and lower bounds of the sales forecast value in the confidence interval is used as a measure of demand uncertainty. Combined with the current supply chain response cycle and warehousing cost coefficient, the adaptive safety stock threshold for each SKU is dynamically calculated. When the real-time inventory level is lower than the threshold, a replenishment warning is triggered. When it is higher than the upper limit of the threshold, a slow-moving stock warning is triggered. Using adaptive safety stock threshold, multi-warehouse geographical distribution, and logistics timeliness matrix as constraints, and taking the minimization of the sum of total holding cost and stockout loss as the objective function, the optimal replenishment quantity and allocation plan for each SKU at each warehouse node are solved, and the decision results are written back to the inventory management module in real time.

[0005] Optionally, the step of inputting multimodal interaction behavior data into a pre-trained purchase intent quantification model and outputting an instant purchase intent intensity vector for each user for each SKU includes: Multimodal interaction behavior data is structured and encoded according to event type to form multi-type behavior feature tuples for each user for each SKU; Using SKU identifiers and user identifiers as index keys, each type of feature in the multi-type behavioral feature tuple is projected onto a latent space of a unified dimension. The contribution weight of each type of feature to the purchase intention is calculated through an attention mechanism. After weighted fusion, the cross-modal fusion behavioral representation vector of each user-SKU pair is output. Long-term preference embedding vectors are extracted from users' historical interaction records and concatenated with cross-modal fusion behavior representation vectors as the complete input to the purchase intent quantification model, enabling the purchase intent quantification model to integrate users' personalized preference context on the basis of real-time behavior signals. The purchase intent quantification model performs forward reasoning on the concatenated input and outputs an instant purchase intent intensity vector for each user for each SKU. Each dimension of the instant purchase intent intensity vector corresponds to three types of intent components: short-term impulsive purchase tendency, price comparison decision tendency, and collection-delayed purchase tendency. These three intent components together constitute the basic unit for temporal aggregation in subsequent steps.

[0006] Optionally, the step of performing time-series aggregation of the real-time purchase intent intensity vector of all users using a sliding time window, identifying abnormal rise in inflection points of intent intensity, and defining the abnormal rise inflection points as demand precursor signals includes: To address different decision-making timeliness requirements, a dual-layer sliding time window with short and long cycles is constructed. The short-cycle window is used to capture immediate, impulsive fluctuations in intent, while the long-cycle window is used to depict persistent intent trends. The two windows slide synchronously, working together to affect the intensity vector of the immediate purchase intent of all users. Within each sliding step, the instant purchase intent intensity vectors in the short-period window and the long-period window are weighted and summed according to the SKU dimension. The weights are determined by the user activity level, with higher weights given to more active users. The aggregated intent intensity time series of each SKU under the two-layer window is output. For the same SKU, the short-cycle aggregation intent intensity time series and the long-cycle aggregation intent intensity time series are compared stepwise with long difference. When the short-cycle aggregation value continuously exceeds the long-cycle aggregation value and the exceedance exceeds the adaptive threshold, this moment is determined to be a candidate inflection point of abnormal rise in intent intensity. Continuous verification of candidate inflection points for abnormally rising intent intensity: requiring that the excess of short-cycle aggregation values ​​relative to long-cycle aggregation values ​​remain stable or continue to expand within a number of consecutive sliding steps; Candidate inflection points that pass continuous verification are confirmed as inflection points of abnormal increase in effective intent intensity; The SKU identifier corresponding to the inflection point of abnormal rise in effective intent intensity, the time of the inflection point, and the triplet of short-cycle and long-cycle aggregated intent intensity difference at the inflection point are encapsulated into a structured demand precursor signal and transmitted to the subsequent multi-source fusion processing stage.

[0007] Optionally, the step of fusing external dynamic context factors to weight and correct demand precursor signals to form a multi-source fused demand precursor feature set includes: Extract the holiday type labels and the number of days remaining until the holiday from the holiday calendar database to construct a time sensitivity feature vector; Real-time capture of price data for similar SKUs from competing platforms; calculation of the price difference ratio between the corresponding SKUs on this platform and those of competitors; formation of a competitor price pressure index. By collecting data on the popularity of topics, the percentage of positive sentiment, and the speed of dissemination related to the current SKU through social media APIs, a social sentiment momentum index is generated. The time sensitivity feature vector, competitor price pressure index and social sentiment momentum index are fed into independent factor importance assessment modules. Based on the explanatory contribution of each factor to the deviation of demand precursor signals within the historical window, their respective adaptive weighting coefficients are dynamically output. The demand precursor signals are weighted and superimposed using adaptive weighting coefficients, and the output is a multi-source fusion demand precursor feature set that integrates the three-dimensional external context of time, competition and emotion, which can be directly called by the two-level causal prediction model.

[0008] Optionally, the step of constructing a two-level causal prediction model consisting of a category-level sales prediction model and a SKU-level sales prediction model includes: Acquire historical multimodal interaction behavior data, and obtain a historical multi-source fusion demand precursor feature set based on the historical multimodal interaction behavior data; Using the sub-feature sequence aggregated by category dimension from the historical multi-source fusion demand precursor feature set as input, a causal convolutional neural network is selected as the basic architecture of the category-level sales prediction model. The masked convolutional kernel ensures that the model relies only on historical information and does not leak future data when inferring the current category sales trend. The model outputs the total sales trend distribution of each category within the prediction period. The total sales volume trend distribution of each category is compressed into a fixed-dimensional category trend context vector through a fully connected layer; Using the tensor obtained by splicing and fusing the sub-features at the SKU granularity corresponding to the historical multi-source fusion demand precursor feature set, the category trend context vector, and the product attribute embedding vector of each SKU as input, we construct an SKU-level sales prediction model with Transformer decoder as the core, and capture the demand competition and complementarity relationship between different SKUs in the same category through self-attention mechanism. In the output layer of the SKU-level sales forecasting model, a hierarchical consistency constraint gating unit is set. This unit dynamically adjusts the scaling ratio of the output sales of each SKU based on the category trend context vector, ensuring that the sum of the predicted sales of all SKUs in the same category does not deviate from the total trend distribution of the category-level model output. An alternating freeze joint training strategy is adopted for the category-level sales prediction model and the SKU-level sales prediction model: the category-level model is trained separately with the SKU-level model parameters fixed until convergence; the SKU-level model is trained separately with the category-level model parameters fixed, and the alternating iteration is performed until the prediction residuals of the two-level models are stably converged; the output is a two-level causal prediction model with hierarchical semantic alignment.

[0009] Optionally, the step of using a multi-source fusion demand precursor feature set as the driving input to a two-level causal prediction model, a category-level sales prediction model outputting a total trend constraint, and an SKU-level sales prediction model outputting the confidence interval sales prediction value for each SKU under the total trend constraint combined with the product attribute embedding vector includes: The multi-source demand precursor feature set is aggregated by category dimension and input into the category-level sales forecast model. The output is the total sales trend of each category within the forecast period and its upper and lower bounds of confidence interval, which serve as the total volume constraint for the forecast of the next-level SKU. For each SKU, its historical slow-moving rate, price elasticity coefficient, and category affiliation tag are extracted and encoded into SKU attribute embedding vectors through an embedding layer to capture the structural differences between SKUs; The sub-features at the SKU granularity corresponding to the multi-source fusion demand precursor feature set are concatenated and fused with the SKU attribute embedding vector. Within the limit of total volume constraints, the model is input into the SKU-level sales prediction model and outputs the confidence interval sales prediction value of each SKU. The prediction residuals of the category-level sales prediction model and the SKU-level sales prediction model are incorporated into the shared loss function for joint backpropagation training, so that the two models constrain each other during the parameter update process, ensuring that the sum of the SKU-level prediction values ​​and the category-level prediction total remain logically consistent. Check whether the sum of the sales forecast values ​​of all SKUs under each category falls within the category-level confidence interval range. If it exceeds the range, trigger the automatic correction mechanism to scale the SKU-level forecast values ​​proportionally and output the sales forecast values ​​of the confidence interval with consistent levels.

[0010] Optionally, the quantification of the purchase intent intensity vector is calculated using the following formula to determine the instantaneous purchase intent intensity score for each user for each SKU:

[0011] in, For users The score represents the intensity of immediate purchase intent for each SKU; B is the set of behavioral types (including dwell time, add-to-cart, revisit, sharing, etc.). The learnable weight for behavior type b reflects the strength of the behavior's contribution to purchase intention; For users The cumulative intensity value of behavior b occurring on SKU s; This is the time decay coefficient for behavior type b, which controls the rate at which the intent of this type of behavior decays over time. Let be the time interval between action b and the current moment; The Sigmoid normalization function compresses the score to the (0,1) interval; For users The purchasing power weight is calculated by the ratio of the average price of their historical orders to the average price of platform users, so that the intention signals of high-spending users contribute more to sales forecasting and suppress the noise impact of low-conversion user behavior. For users The consistency coefficient of the behavior sequence for behavior b of SKU s measures whether the behavior is consistent with the user's decision path for similar products in the past (such as habitually adding to cart before purchasing). The higher the consistency, the larger the coefficient, reflecting the credibility of the behavior signal.

[0012] Optionally, the multi-source external factor weighted correction of the demand precursor signal can be performed using the following formula:

[0013] in, The modified fusion demand precursor intensity value for SKUs s within the time window t; C represents the initial demand precursor signal value of SKU s within the time window t; C represents the set of external context factor types (including holidays, competitor prices, and social sentiment). This represents the original influence strength of factor type c on SKUs within time window t. The adaptive weighting coefficient of factor type c in time window t is dynamically learned from the explanatory contribution of the factor to the prediction bias in the historical window, reflecting the relative importance of different external factors to the demand driver in different periods. The category sensitivity coefficient of SKU s to external factor type c reflects the inherent difference in the intensity of response of different product categories to holidays, competitor prices or social sentiment (e.g., clothing is more sensitive to social sentiment than electronic accessories), and is obtained by offline fitting of historical data of the same category. Factor type and The interaction gain coefficient of SKU s captures the synergistic amplification or mutual inhibition effect produced when two types of external factors act simultaneously (such as the demand increase when holidays coincide with social media surges, which far exceeds the sum of the individual effects of the two factors).

[0014] Optionally, the SKU-level sales prediction model is trained in the following manner to output confidence intervals:

[0015] in, is the SKU-level joint training loss; Q is the set of quantiles (including upper and lower bound quantiles). The asymmetric pinball loss function corresponding to the quantile q; Let s be the predicted sales volume of SKU s at quantile q; This represents the actual sales volume of SKUs. The set of SKUs under category g; This is the upper bound of the confidence interval for category sales output by the category-level sales prediction model. The hierarchical consistency penalty coefficient controls the penalty intensity when the sum of SKU predicted values ​​exceeds the category upper bound. The prediction confidence weight of SKU s in time window t is obtained by normalizing the strength of the demand precursor signal. The stronger the precursor signal, the higher the training sample weight of the SKU, guiding the model to invest more fitting resources on SKUs with high confidence. SKUs within the same product category and The historical demand substitution rate between the two measures the degree of historical negative correlation in their sales. For SKU and The upper limit of demand capacity is estimated by the maximum combined percentage of the two in the historical peak sales of the category; To reduce the competitive pressure, the penalty coefficient is used to control the intensity of the demand substitution constraint among SKUs of the same product category.

[0016] Another aspect of the present invention provides a user behavior-driven e-commerce sales forecasting and inventory optimization system for executing a user behavior-driven e-commerce sales forecasting and inventory optimization method, comprising: a control processing module and an inventory management module. The control processing module is configured as follows: Real-time collection of multimodal interaction data of users on e-commerce platforms, including page dwell time, scrolling trajectory, frequency of repeated visits to product detail pages, add-to-cart and cancel operation sequences, and social sharing behavior; Multimodal interaction behavior data is input into a pre-trained purchase intent quantification model, which outputs an instant purchase intent intensity vector for each user for each SKU. By performing time-series aggregation on the real-time purchase intent intensity vector of all users using a sliding time window, we can identify the abnormal rise in intent intensity and define the abnormal rise inflection point as a demand precursor signal. By integrating external dynamic context factors, the demand precursor signals are weighted and corrected to form a multi-source fusion demand precursor feature set; Construct a two-level causal prediction model consisting of a category-level sales prediction model and a SKU-level sales prediction model; The two-level causal prediction model is driven by a multi-source fusion demand precursor feature set. The category-level sales prediction model outputs the total trend constraint, and the SKU-level sales prediction model outputs the confidence interval sales prediction value of each SKU under the total trend constraint and the product attribute embedding vector. The difference between the upper and lower bounds of the sales forecast value in the confidence interval is used as a measure of demand uncertainty. Combined with the current supply chain response cycle and warehousing cost coefficient, the adaptive safety stock threshold for each SKU is dynamically calculated. When the real-time inventory level is lower than the threshold, a replenishment warning is triggered. When it is higher than the upper limit of the threshold, a slow-moving stock warning is triggered. Using adaptive safety stock threshold, multi-warehouse geographical distribution, and logistics timeliness matrix as constraints, and taking the minimization of the sum of total holding cost and stockout loss as the objective function, the optimal replenishment quantity and allocation plan for each SKU at each warehouse node are solved, and the decision results are written back to the inventory management module in real time.

[0017] The user behavior-driven e-commerce sales forecasting and inventory optimization method, employing the technical solution of this invention, includes: real-time collection of multimodal interaction behavior data of users on e-commerce platforms, including page dwell time, scrolling trajectory, frequency of repeated visits to product detail pages, add-to-cart and cancel operation sequences, and social sharing behavior; inputting the multimodal interaction behavior data into a pre-trained purchase intent quantification model, outputting an instant purchase intent intensity vector for each user for each SKU; performing time-series aggregation of the instant purchase intent intensity vectors of all users using a sliding time window, identifying abnormal rise inflection points of intent intensity, and defining these abnormal rise inflection points as demand precursor signals; fusing external dynamic context factors to weight and correct the demand precursor signals, forming a multi-source fusion demand precursor feature set; and constructing a two-level causal prediction model consisting of a category-level sales forecasting model and an SKU-level sales forecasting model. A two-level causal prediction model is driven by a multi-source fusion demand precursor feature set. The category-level sales prediction model outputs total trend constraints, while the SKU-level sales prediction model, under the total trend constraints, combines product attribute embedding vectors to output the confidence interval sales prediction value for each SKU. The difference between the upper and lower bounds of the confidence interval sales prediction value is used as a measure of demand uncertainty. Combined with the current supply chain response cycle and warehousing cost coefficient, the adaptive safety stock threshold for each SKU is dynamically calculated. When the real-time inventory level is lower than the threshold, a replenishment warning is triggered; when it is higher than the upper limit of the threshold, a slow-moving stock warning is triggered. The adaptive safety stock threshold, the geographical distribution of multiple warehouses, and the logistics timeliness matrix are used as constraints. With the goal of minimizing the sum of total holding costs and stockout losses, the optimal replenishment quantity and allocation plan for each SKU at each warehouse node are solved, and the decision results are written back to the inventory management module in real time. This solution places user behavior intent signals ahead of sales surges, enabling early perception of demand changes and significantly shortening the forecast lag window. The hierarchical causal forecasting architecture ensures logical consistency between category and SKU forecasts. The dynamic safety stock threshold adaptively contracts or expands with demand uncertainty, effectively balancing stockout risk and inventory backlog costs. Multi-warehouse collaborative optimization decisions further reduce end-to-end holding costs and improve overall inventory turnover efficiency. Attached Figure Description

[0018] Figure 1 This is a flowchart of a user behavior-driven e-commerce sales forecasting and inventory optimization method provided in one embodiment of the present invention; Figure 2 This is a schematic block diagram of a user behavior-driven e-commerce sales forecasting and inventory optimization system provided in one embodiment of the present invention. Detailed Implementation

[0019] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0020] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0021] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0023] The following reference Figures 1 to 2 This invention describes a user behavior-driven e-commerce sales forecasting and inventory optimization method and system provided by some embodiments of the present invention.

[0024] like Figure 1 As shown, one embodiment of the present invention provides a user behavior-driven e-commerce sales forecasting and inventory optimization method, comprising: Real-time collection of multimodal interaction data of users on e-commerce platforms, including page dwell time, scrolling trajectory, frequency of repeated visits to product detail pages, add-to-cart and cancel operation sequences, and social sharing behavior; Multimodal interaction behavior data is input into a pre-trained purchase intent quantification model, which outputs an instant purchase intent intensity vector for each user for each SKU. By performing time-series aggregation on the real-time purchase intent intensity vector of all users using a sliding time window, we can identify the abnormal rise in intent intensity and define the abnormal rise inflection point as a demand precursor signal. By integrating external dynamic contextual factors (including holiday calendars, competitor price fluctuations, social media popularity indices, etc.), the pre-demand signals are weighted and corrected to form a multi-source integrated set of pre-demand features. Construct a two-level causal prediction model consisting of a category-level sales prediction model and a SKU-level sales prediction model; The two-level causal prediction model is driven by a multi-source fusion demand precursor feature set. The category-level sales prediction model outputs the total volume trend constraint, and the SKU-level sales prediction model outputs the confidence interval sales prediction value of each SKU under the total volume trend constraint, combined with the product attribute embedding vector (including price elasticity coefficient and historical unsold rate). Among them, the two-level causal prediction model achieves joint training by sharing a loss function to ensure prediction consistency; The difference between the upper and lower bounds of the sales forecast value in the confidence interval is used as a measure of demand uncertainty. Combined with the current supply chain response cycle and warehousing cost coefficient, the adaptive safety stock threshold for each SKU is dynamically calculated. When the real-time inventory level is lower than the threshold, a replenishment warning is triggered. When it is higher than the upper limit of the threshold, a slow-moving stock warning is triggered. Using adaptive safety stock threshold, multi-warehouse geographical distribution, and logistics timeliness matrix as constraints, and taking the minimization of the sum of total holding cost and stockout loss as the objective function, the optimal replenishment quantity and allocation plan for each SKU at each warehouse node are solved, and the decision results are written back to the inventory management module in real time.

[0025] The technical solution adopted in this embodiment places user behavior intent signals before sales surges, enabling early perception of demand changes and significantly shortening the forecast lag window; the hierarchical causal forecasting architecture ensures the logical consistency of category and SKU forecasts; the dynamic safety stock threshold adaptively shrinks or expands with demand uncertainty, effectively balancing stockout risk and inventory backlog costs; multi-warehouse collaborative optimization decisions further reduce end-to-end holding costs and improve overall inventory turnover efficiency.

[0026] In some possible embodiments of the present invention, the step of inputting multimodal interaction behavior data into a pre-trained purchase intent quantification model and outputting an instant purchase intent intensity vector for each user for each SKU includes: Multimodal interaction behavior data is structured and encoded according to event type (e.g., page dwell time and scroll trajectory are encoded as continuous time-series features, add-to-cart and cancel operation sequences are encoded as discrete state transition features, and repeat visit frequency and social sharing behavior are encoded as scalar count features), forming multi-type behavior feature tuples for each user for each SKU; Using SKU identifiers and user identifiers as index keys, each type of feature in the multi-type behavioral feature tuple is projected onto a latent space of a unified dimension. The contribution weight of each type of feature to the purchase intention is calculated through an attention mechanism. After weighted fusion, the cross-modal fusion behavioral representation vector of each user-SKU pair is output. Long-term preference embedding vectors are extracted from users' historical interaction records and concatenated with cross-modal fusion behavior representation vectors as the complete input to the purchase intent quantification model, enabling the purchase intent quantification model to integrate users' personalized preference context on the basis of real-time behavior signals. In this step, complete interaction records for each user within a scrolling long-term window are extracted from the user's historical interaction database. These records include historical purchase category sequences, favorites change records, review keywords, and return reason tags. The heterogeneous historical records are input into the user long-term preference encoder, which outputs a fixed-dimensional user long-term preference embedding vector. This vector captures the user's stable consumption tendencies and taste characteristics across sessions and categories. Using current session multimodal real-time behavior data (including page dwell time, scrolling trajectory, recurring visit frequency, and add-to-cart / cancel sequences) as input, corresponding features are extracted through temporal encoding and spatial behavior encoding branches, respectively. These features are then aligned and fused through a cross-modal attention fusion layer, outputting a cross-modal fused behavior representation vector reflecting the user's current session decision state. Finally, using the user long-term preference embedding vector as the query vector and the cross-modal fused behavior representation vector as the key-value pair, the result is processed by the preference-behavior gating alignment module. The semantic relevance weights of the two are calculated. Dimensions highly consistent with long-term preferences in the cross-modal fusion behavior representation vector are enhanced, while dimensions deviating from long-term preferences are suppressed, outputting a preference-calibrated aligned behavior representation vector. The user's long-term preference embedding vector and the aligned behavior representation vector are concatenated along the feature dimensions to form a complete user intent input tensor carrying both the user's stable preference context and the current session's immediate decision-making state. This tensor is fed into the purchase intent quantification model as the final driving input. The purchase intent quantification model takes the complete user intent input tensor as input and outputs an immediate purchase intent strength score for each SKU currently viewed by the user. SKUs in the complete user intent input tensor where the long-term preference dimension and the immediate behavior dimension point in the same direction are assigned a higher intent strength. The final output of the intent strength scores for each SKU is aggregated into a personalized immediate purchase intent strength vector, replacing the original output vector for subsequent use. The long-term preference embedding vector provides a personalized contextual anchor for the immediate behavior signal, and the gating alignment module filters out occasional behavioral noise inconsistent with user preferences, ensuring that the purchase intent quantification result takes into account both the user's stable preferences and the current decision-making state, improving the personalized accuracy of intent prediction.

[0027] The purchase intent quantification model performs forward reasoning on the concatenated input and outputs an instant purchase intent intensity vector for each user for each SKU. Each dimension of the instant purchase intent intensity vector corresponds to three types of intent components: short-term impulsive purchase tendency, price comparison decision tendency, and collection-delayed purchase tendency. These three intent components together constitute the basic unit for temporal aggregation in subsequent steps.

[0028] In this embodiment, cross-modal feature alignment and long-term preference injection enable the intent intensity vector to simultaneously capture user real-time behavioral signals and personalized purchasing patterns, thereby improving the accuracy and interpretability of intent quantification and providing a more reliable driving input for subsequent demand precursor signal extraction.

[0029] In some possible embodiments of the present invention, the step of performing time-series aggregation of the real-time purchase intent intensity vector of all users using a sliding time window, identifying abnormal rise in inflection points of intent intensity, and defining the abnormal rise inflection points as demand precursor signals includes: To address different decision-making timeliness requirements, a dual-layer sliding time window with short and long cycles is constructed. The short-cycle window is used to capture immediate, impulsive fluctuations in intent, while the long-cycle window is used to depict persistent intent trends. The two windows slide synchronously, working together to affect the intensity vector of the immediate purchase intent of all users. Within each sliding step, the instant purchase intent intensity vectors in the short-period window and the long-period window are weighted and summed according to the SKU dimension. The weights are determined by the user activity level, with higher weights given to more active users. The aggregated intent intensity time series of each SKU under the two-layer window is output. In this step, within the current sliding time window, all users are sorted in ascending order based on a weighted composite score of three indicators: session frequency, total number of effective behavioral events, and number of purchase conversions. Users whose ranking falls above the preset high activity percentile threshold are defined as high-active users, and the rest are defined as low-active users. The preset high activity percentile threshold is a configurable parameter of the system, which is pre-set and stored in the system configuration module by the platform operator based on the user scale and business scenario.

[0030] For the same SKU, the short-cycle aggregation intent intensity time series and the long-cycle aggregation intent intensity time series are compared stepwise with long difference. When the short-cycle aggregation value continuously exceeds the long-cycle aggregation value and the exceedance exceeds the adaptive threshold, this moment is determined to be a candidate inflection point of abnormal rise in intent intensity. Continuous verification of candidate inflection points for abnormally rising intent intensity: requiring that the excess of short-cycle aggregation values ​​relative to long-cycle aggregation values ​​remain stable or continue to expand within a number of consecutive sliding steps; Candidate inflection points that pass continuous verification are confirmed as inflection points of abnormal increase in effective intent intensity; The SKU identifier corresponding to the inflection point of abnormal rise in effective intent intensity, the time of the inflection point, and the triplet of short-cycle and long-cycle aggregated intent intensity difference at the inflection point are encapsulated into a structured demand precursor signal and transmitted to the subsequent multi-source fusion processing stage.

[0031] In this embodiment, the dual-layer sliding window differential mechanism effectively distinguishes between instantaneous noise and genuine intent boosting, while continuous verification further filters out false signals, thereby simultaneously improving the accuracy and timeliness of demand precursor signal identification and providing high-quality early driving input for subsequent sales forecasting.

[0032] In some possible embodiments of the present invention, the step of fusing external dynamic context factors to weight and correct demand precursor signals to form a multi-source fused demand precursor feature set includes: Extract the holiday type labels and the number of days remaining until the holiday from the holiday calendar database to construct a time sensitivity feature vector; Real-time capture of price data for similar SKUs from competing platforms; calculation of the price difference ratio between the corresponding SKUs on this platform and those of competitors; formation of a competitor price pressure index. By collecting data on the popularity of topics, the percentage of positive sentiment, and the speed of dissemination related to the current SKU through social media APIs, a social sentiment momentum index is generated. In this step, a preset sentiment polarity classification model is used to output sentiment polarity scores for each piece of social media text collected. Texts whose sentiment polarity scores fall within the preset positive sentiment score range are included in the positive sentiment item set, texts whose scores fall within the preset negative sentiment score range are included in the negative sentiment item set, and texts that fall outside the two ranges are considered neutral texts and are not included in either set. The percentage of positive sentiment is obtained by dividing the total number of items in the positive sentiment item set by the sum of the total number of items in the positive sentiment item set and the negative sentiment item set. The preset positive sentiment score range and the preset negative sentiment score range are configurable parameters of the system, which are preset by the platform operator according to the output value range of the sentiment polarity classification model used and stored in the system configuration module.

[0033] The time sensitivity feature vector, competitor price pressure index and social sentiment momentum index are fed into independent factor importance assessment modules. Based on the explanatory contribution of each factor to the deviation of demand precursor signals within the historical window, their respective adaptive weighting coefficients are dynamically output. In this step, as the sliding time window advances, the historical values ​​of the time sensitivity feature vector, competitor price pressure index, and social sentiment momentum index for each time step in several historical windows prior to the current window are extracted from the historical database. The historical demand precursor signal deviation sequence, composed of the difference between the actual value of the demand precursor signal and the actual sales value of the same period at the corresponding time step, serves as the training and inference data basis for the factor importance assessment module. For each of the three types of external factors, an independent single-factor deviation regression estimator is constructed, using the time sensitivity feature vector, competitor price pressure index, and social sentiment momentum index as single independent variables and the historical demand precursor signal deviation sequence as the dependent variable. Each estimator is fitted within the historical window, outputting the single-factor explained residual of each factor for the historical demand precursor signal deviation. The mean absolute value of each factor's single-factor explained residual is used as a measure of the factor's contribution to the deviation explanation within the current historical window. The smaller the contribution measure, the stronger the explanatory power of the factor for the historical demand precursor signal deviation, and the higher the corresponding factor's performance within the current prediction window. To achieve higher weighting coefficients, the deviation explanation contribution measures of the three types of factors are fed into the normalized weighting coefficient mapping layer. Normalization is performed based on the reciprocal of each factor's contribution measure, ensuring the sum of the adaptive weighting coefficients of the three types of factors remains a unit value. The adaptive weighting coefficients corresponding to each factor within the current prediction window are then output. The adaptive weighting coefficients of each factor, along with the current value of the corresponding factor, are written to the weighting coefficient cache module for direct use in the multi-source fusion requirement precursor feature set generation stage. Simultaneously, the preceding steps are re-executed after each sliding window advance, ensuring the adaptive weighting coefficients are continuously updated according to market changes. Independent evaluation of single factors avoids the interference of multi-factor collinearity in accurately estimating the explanation contribution; reciprocal normalization mapping automatically assigns higher weights to factors with strong explanatory power; and the sliding window rolling update mechanism ensures that the weighting coefficients are dynamically and adaptively adjusted according to the market environment.

[0034] The demand precursor signals are weighted and superimposed using adaptive weighting coefficients, and the output is a multi-source fusion demand precursor feature set that integrates the three-dimensional external context of time, competition and emotion, which can be directly called by the two-level causal prediction model.

[0035] In this embodiment, by dynamically weighting and fusing three heterogeneous external signals—holidays, competitor prices, and social sentiment—the demand precursor signals more accurately reflect the real market drivers, reduce noise interference from single signals, and improve the environmental adaptability of subsequent sales forecasts.

[0036] In some possible embodiments of the present invention, the step of constructing a two-level causal prediction model consisting of a category-level sales prediction model and a SKU-level sales prediction model includes: Acquire historical multimodal interaction behavior data (i.e., historical data including page dwell time, scrolling trajectory, frequency of repeated visits to product detail pages, add-to-cart and cancel operation sequences, and social sharing behavior), and obtain a historical multi-source fusion demand precursor feature set based on the historical multimodal interaction behavior data; Using the sub-feature sequence aggregated by category dimension from the historical multi-source fusion demand precursor feature set as input, a causal convolutional neural network is selected as the basic architecture of the category-level sales prediction model. The masked convolutional kernel ensures that the model relies only on historical information and does not leak future data when inferring the current category sales trend. The model outputs the total sales trend distribution of each category within the prediction period. The total sales volume trend distribution of each category is compressed into a fixed-dimensional category trend context vector through a fully connected layer; Among them, the category trend context vector, as a compressed representation of category-level macro information, is injected into each decoding step of the constructed SKU-level sales prediction model through a cross-attention mechanism, so that the SKU-level prediction always perceives the overall trend constraints of the category during the inference process. Using the tensor obtained by splicing and fusing the sub-features at the SKU granularity corresponding to the historical multi-source fusion demand precursor feature set, the category trend context vector, and the product attribute embedding vector of each SKU as input, we construct an SKU-level sales prediction model with Transformer decoder as the core, and capture the demand competition and complementarity relationship between different SKUs in the same category through self-attention mechanism. In the output layer of the SKU-level sales forecasting model, a hierarchical consistency constraint gating unit is set. This unit dynamically adjusts the scaling ratio of the output sales of each SKU based on the category trend context vector, ensuring that the sum of the predicted sales of all SKUs in the same category does not deviate from the total trend distribution of the category-level model output. An alternating freeze joint training strategy is adopted for the category-level sales prediction model and the SKU-level sales prediction model: the category-level model is trained separately with the SKU-level model parameters fixed until convergence; the SKU-level model is trained separately with the category-level model parameters fixed, and the alternating iteration is performed until the prediction residuals of the two-level models are stably converged; the output is a two-level causal prediction model with hierarchical semantic alignment.

[0037] In this embodiment, causal convolution ensures no data leakage in the prediction, the cross-attention mechanism enables SKU-level prediction to continuously perceive category constraints, the hierarchical consistency gating unit forces scale compatibility from the output end, and alternating freeze training avoids training instability caused by mutual interference between the gradients of the two-level models.

[0038] In some possible embodiments of the present invention, the step of using a multi-source fusion demand precursor feature set as the driving input to a two-level causal prediction model, a category-level sales prediction model outputting a total trend constraint, and a SKU-level sales prediction model outputting the confidence interval sales prediction value of each SKU under the total trend constraint combined with the product attribute embedding vector includes: The multi-source demand precursor feature set is aggregated by category dimension and input into the category-level sales forecast model. The output is the total sales trend of each category within the forecast period and its upper and lower bounds of confidence interval, which serve as the total volume constraint for the forecast of the next-level SKU. For each SKU, its historical slow-moving rate, price elasticity coefficient, and category affiliation tag are extracted and encoded into SKU attribute embedding vectors through an embedding layer to capture the structural differences between SKUs; The sub-features at the SKU granularity corresponding to the multi-source fusion demand precursor feature set are concatenated and fused with the SKU attribute embedding vector. Within the limit of total volume constraints, the model is input into the SKU-level sales prediction model and outputs the confidence interval sales prediction value of each SKU. The prediction residuals of the category-level sales prediction model and the SKU-level sales prediction model are incorporated into the shared loss function for joint backpropagation training, so that the two models constrain each other during the parameter update process, ensuring that the sum of the SKU-level prediction values ​​and the category-level prediction total remain logically consistent. In this step, the prediction residuals of the category-level sales prediction model and the SKU-level sales prediction model are incorporated into a shared loss function for joint backpropagation training. In each training iteration, the upper and lower bounds of the category sales confidence interval output by the category-level sales prediction model constitute the category prediction tolerance interval. The sum of the predicted sales values ​​of all SKUs in the same category is calculated. If the sum exceeds the upper bound of the category prediction tolerance interval or is lower than the lower bound, the hierarchical consistency penalty term in the shared loss function applies a gradient penalty proportional to the deviation magnitude to the SKU-level model parameters. When the sum of the SKU-level predicted values ​​of all categories falls within the corresponding category prediction tolerance interval, and the prediction residuals of both models are lower than the preset convergence threshold, the joint training is determined to have reached the hierarchical numerical compatibility convergence state. Training is terminated, and the final two-level causal prediction model is output, thereby enabling the two-level models to mutually constrain each other during parameter updates and ensuring that the sum of the SKU-level predicted values ​​remains logically consistent with the category-level predicted total.

[0039] Check whether the sum of the sales forecast values ​​of all SKUs under each category falls within the category-level confidence interval range. If it exceeds the range, trigger the automatic correction mechanism to scale the SKU-level forecast values ​​proportionally and output the sales forecast values ​​of the confidence interval with consistent levels.

[0040] In this embodiment, the two-level joint training and hierarchical consistency correction mechanism ensures that the category and SKU prediction logic is consistent and avoids the overflow of lower-level prediction values ​​into upper-level constraints. At the same time, the SKU attribute embedding vector improves the ability of fine-grained prediction to distinguish long-tail products.

[0041] In some possible embodiments of the present invention, the difference between the upper and lower bounds of the sales forecast value of the confidence interval is used as a measure of demand uncertainty. Combined with the current supply chain response cycle and warehousing cost coefficient, an adaptive safety stock threshold for each SKU is dynamically calculated. The steps of triggering a replenishment warning when the real-time inventory level is below this threshold and triggering a slow-moving inventory warning when it is above the upper limit of the threshold include: Extract the upper and lower bounds of the sales forecast values ​​of each SKU confidence interval, and calculate the difference between the two as the demand uncertainty measure for the SKU in the current forecast period. The larger the demand uncertainty measure, the higher the risk of sales fluctuation for the SKU, and the more sufficient safety buffer inventory needs to be configured. The current supply chain response cycle (i.e. the shortest time required from triggering replenishment to the goods being put into storage) of each SKU's corresponding supplier is read in real time from the supply chain management system. The current supply chain response cycle is multiplied and combined with the demand uncertainty measure to generate the replenishment buffer demand for that SKU (reflecting the maximum stockout exposure that may be caused by demand fluctuations during the response delay period). The warehousing cost coefficient of each SKU per unit time is read from the warehousing cost module. The replenishment buffer demand is adjusted by reverse reduction based on the warehousing cost coefficient. The higher the cost coefficient, the greater the reduction. An adaptive safety stock threshold that takes into account both stockout risk and holding cost is output. The sum of the adaptive safety stock threshold and the replenishment buffer demand is used as the corresponding upper limit of the adaptive safety stock threshold. In this step, the adaptive safety stock threshold constitutes the lower bound for replenishment triggering the inventory level, and the upper bound for slow-moving inventory warning constitutes the upper bound for the inventory level. Together, they define the reasonable holding range for the inventory level of each SKU.

[0042] The real-time inventory monitoring module continuously collects the current inventory level of each SKU and compares the inventory level with the adaptive safety stock threshold and the upper limit of the threshold in real time. When the inventory level is lower than the safety stock threshold, a replenishment warning signal carrying the SKU identifier and the shortage quantity is pushed to the replenishment module. When the inventory level remains above the upper limit of the threshold and the uncertainty of demand narrows simultaneously, the SKU is determined to be in a state of slow-moving risk. A slow-moving warning signal carrying the SKU identifier and excess inventory is pushed to the operation module, so that the inventory replenishment and adjustment collaborative optimization decision-making module can give priority to including it in the allocation and digestion plan.

[0043] In this embodiment, the safety stock threshold adaptively expands and contracts with real-time changes in demand uncertainty and supply chain response cycle, while being constrained by warehousing cost coefficients to avoid overstocking; the two-way early warning mechanism incorporates both stockout risk and unsold inventory risk into management, improving the dynamic accuracy of inventory control.

[0044] In some possible embodiments of the present invention, the step of using adaptive safety stock threshold, multi-warehouse geographical distribution, and logistics timeliness matrix as constraints, with the objective function of minimizing the sum of total holding cost and stockout loss, to solve for the optimal replenishment quantity and allocation plan for each SKU at each warehouse node, and writing the decision results back to the inventory management module in real time, includes: The geographical coordinates, current available capacity, and existing inventory level of each SKU of each warehouse node are read from the warehouse network management system. Combined with the logistics service provider interface, the transportation time and unit freight cost between each pair of warehouse nodes are updated in real time to construct a multi-warehouse logistics time matrix, which serves as the spatial constraint basis for subsequent optimization solutions. The adaptive safety stock threshold for each SKU is used as the lower bound constraint for the inventory level of each warehouse node, and the available capacity of each warehouse node is used as the upper bound constraint. At the same time, the upper limit of transportation timeliness in the multi-warehouse logistics timeliness matrix is ​​used as the allocation feasibility constraint, which together constitute a multi-dimensional inventory allocation constraint set. The total cost objective function is constructed by multiplying the unit holding cost of each SKU at each warehouse node by the sum of the holding quantities, and adding the estimated stockout losses due to the inventory level being lower than the safety stock threshold. Using the multidimensional inventory transfer constraint set as the feasible region, the heuristic optimization solver is called to jointly solve the replenishment quantity and cross-warehouse transfer quantity of each SKU at each warehouse node, and output the optimal replenishment and transfer scheme. The replenishment instructions in the optimal replenishment and transfer plan are pushed to the procurement module and the transfer instructions are pushed to the logistics execution module. At the same time, the expected inventory change of each warehouse node is written back to the inventory management module in real time, and the inventory level prediction value of each SKU at each warehouse node is updated. After the replenishment and transfer instructions are executed, the actual inbound and transfer quantities of each warehouse node are collected and compared with the expected values ​​of the optimal replenishment and transfer plan. The deviation results are used as feedback correction signals and sent back to the adaptive safety stock threshold calculation module and the SKU-level sales forecast model to drive the parameters of both to be updated adaptively, forming an end-to-end closed-loop optimization.

[0045] In this embodiment, multi-warehouse collaborative joint solution avoids cross-warehouse inventory imbalance caused by isolated decision-making in a single warehouse; the execution deviation feedback loop enables the prediction model and inventory threshold to continuously self-correct with real fulfillment data, thereby improving the overall inventory balance of the multi-warehouse network and the long-term adaptive capability of replenishment decisions.

[0046] In some possible embodiments of the present invention, the quantification of the purchase intent intensity vector is performed by calculating the instantaneous purchase intent intensity score for each user for each SKU using the following formula:

[0047] in, For users The score represents the intensity of immediate purchase intent for each SKU; B is the set of behavioral types (including dwell time, add-to-cart, revisit, sharing, etc.). The learnable weight for behavior type b reflects the strength of the behavior's contribution to purchase intention; For users The cumulative intensity value of behavior b occurring on SKU s; This is the time decay coefficient for behavior type b, which controls the rate at which the intent of this type of behavior decays over time. Let be the time interval between action b and the current moment; The Sigmoid normalization function compresses the score to the (0,1) interval; For users The purchasing power weight is calculated by the ratio of the average price of their historical orders to the average price of platform users, so that the intention signals of high-spending users contribute more to sales forecasting and suppress the noise impact of low-conversion user behavior. For users The consistency coefficient of the behavior sequence for behavior b of SKU s measures whether the behavior is consistent with the user's decision path for similar products in the past (such as habitually adding to cart before purchasing). The higher the consistency, the larger the coefficient, reflecting the credibility of the behavior signal.

[0048] In some possible embodiments of the present invention, the multi-source external factor weighted correction of the demand precursor signal is performed using the following formula:

[0049] in, The modified fusion demand precursor intensity value for SKUs s within the time window t; C represents the initial demand precursor signal value of SKU s within the time window t; C represents the set of external context factor types (including holidays, competitor prices, and social sentiment). This represents the original influence strength of factor type c on SKUs within time window t. The adaptive weighting coefficient of factor type c in time window t is dynamically learned from the explanatory contribution of the factor to the prediction bias in the historical window, reflecting the relative importance of different external factors to the demand driver in different periods. The category sensitivity coefficient of SKU s to external factor type c reflects the inherent difference in the intensity of response of different product categories to holidays, competitor prices or social sentiment (e.g., clothing is more sensitive to social sentiment than electronic accessories), and is obtained by offline fitting of historical data of the same category. Factor type and The interaction gain coefficient of SKUs captures the synergistic amplification or mutual inhibition effect produced when two types of external factors act simultaneously (such as the demand increase when holidays coincide with social media surges, which far exceeds the sum of the individual effects of the two factors).

[0050] In some possible embodiments of the present invention, the SKU-level sales prediction model is trained in the following manner to output confidence intervals:

[0051] in, is the SKU-level joint training loss; Q is the set of quantiles (including upper and lower bound quantiles). The asymmetric pinball loss function corresponding to the quantile q; Let s be the predicted sales volume of SKU s at quantile q; This represents the actual sales volume of SKUs. The set of SKUs under category g; This is the upper bound of the confidence interval for category sales output by the category-level sales prediction model. The hierarchical consistency penalty coefficient controls the penalty intensity when the sum of SKU predicted values ​​exceeds the category upper bound. The prediction confidence weight of SKU s in time window t is obtained by normalizing the strength of the demand precursor signal. The stronger the precursor signal, the higher the training sample weight of the SKU, guiding the model to invest more fitting resources on SKUs with high confidence. SKUs within the same product category and The historical demand substitution rate between the two measures the degree of historical negative correlation in their sales. For SKU and The upper limit of demand capacity is estimated by the maximum combined percentage of the two in the historical peak sales of the category; To reduce the competitive pressure, the penalty coefficient is used to control the intensity of the demand substitution constraint among SKUs of the same product category.

[0052] In some possible embodiments of the present invention, the adaptive safety stock threshold is dynamically calculated using the following formula:

[0053] in, The adaptive safety stock threshold for SKUs s within the time window t; and These are the upper and lower bounds of the sales forecast values ​​for the confidence interval of SKU s, respectively, and the difference between them constitutes a measure of demand uncertainty. The current supply chain response cycle (in days) for the supplier corresponding to SKU s reflects the length of time that the supplier is continuously exposed to demand fluctuations during the replenishment delay period. This represents the unit time warehousing cost coefficient for SKUs. This is the average of the warehousing cost coefficients for all SKUs currently in the warehouse, used for normalization; The intensity parameter for reducing inventory holding costs controls the extent to which safety stock is reduced for SKUs with high storage costs. The replenishment execution deviation correction factor for SKU s in time window t is calculated from the rolling average of the ratio of the actual replenishment quantity to the planned replenishment quantity in the historical feedback. When the historical execution deviation is large, the safety stock threshold is automatically increased to hedge against the risk of supply instability. The demand trend momentum sensitivity coefficient of SKU s is derived by fitting the response elasticity of the historical sales volume of the SKU to the rate of change of demand precursor signals, reflecting the ability of the SKU to follow the acceleration or deceleration of demand as market signals accelerate or decelerate. and These are the combined demand precursor strength values ​​for SKU s in the current and previous time windows, respectively. The ratio of the two values ​​describes the year-on-year change rate of the demand precursor signal. A positive value indicates accelerated demand, while a negative value indicates contracted demand.

[0054] In some possible embodiments of the present invention, the total cost objective function is constructed using the following formula:

[0055] Where N is the set of warehouse nodes; The decision replenishment quantity for SKU s at warehouse node n (optimization variable); The decision allocation amount (optimization variable) for SKU s to be transferred from warehouse node n to warehouse node m. This represents the current inventory level of SKU s at warehouse node n. This represents the unit warehousing cost coefficient for SKUs. This is the unit stockout loss coefficient for SKUs, reflecting the combined loss of revenue and user experience caused by stockouts; The unit transfer transportation cost from warehouse node n to warehouse node m is derived from the multi-warehouse logistics timeliness matrix; is the capacity elasticity coefficient of warehouse node n, which reflects the rate of change of marginal holding cost of the warehouse node as it continues to increase inventory under the current capacity utilization rate (the higher the utilization rate, the larger the coefficient). It makes the holding cost item grow non-linearly with the degree of congestion of the warehouse node, and automatically guides replenishment orders to prioritize warehouse nodes with ample capacity. It is the penalty coefficient for exceeding the time limit of the transfer between warehouse node n and warehouse node m. It takes a positive value when the actual transportation time between the two warehouses exceeds the target fulfillment time, and a zero value otherwise. It is derived from the timeliness compliance judgment of the multi-warehouse logistics timeliness matrix. The time sensitivity coefficient of SKU s is derived by fitting the order cancellation rate of the SKU in history due to delivery delays. It reflects the difference in the loss tolerance of different SKUs for exceeding the time limit of transfer. SKUs with high time sensitivity will automatically avoid slow inter-warehouse channels in the transfer route selection.

[0056] Please refer to Figure 2 Another embodiment of the present invention provides a user behavior-driven e-commerce sales forecasting and inventory optimization system for executing a user behavior-driven e-commerce sales forecasting and inventory optimization method, comprising: a control processing module and an inventory management module. The control processing module is configured as follows: Real-time collection of multimodal interaction data of users on e-commerce platforms, including page dwell time, scrolling trajectory, frequency of repeated visits to product detail pages, add-to-cart and cancel operation sequences, and social sharing behavior; Multimodal interaction behavior data is input into a pre-trained purchase intent quantification model, which outputs an instant purchase intent intensity vector for each user for each SKU. By performing time-series aggregation on the real-time purchase intent intensity vector of all users using a sliding time window, we can identify the abnormal rise in intent intensity and define the abnormal rise inflection point as a demand precursor signal. By integrating external dynamic context factors, the demand precursor signals are weighted and corrected to form a multi-source fusion demand precursor feature set; Construct a two-level causal prediction model consisting of a category-level sales prediction model and a SKU-level sales prediction model; The two-level causal prediction model is driven by a multi-source fusion demand precursor feature set. The category-level sales prediction model outputs the total trend constraint, and the SKU-level sales prediction model outputs the confidence interval sales prediction value of each SKU under the total trend constraint and the product attribute embedding vector. The difference between the upper and lower bounds of the sales forecast value in the confidence interval is used as a measure of demand uncertainty. Combined with the current supply chain response cycle and warehousing cost coefficient, the adaptive safety stock threshold for each SKU is dynamically calculated. When the real-time inventory level is lower than the threshold, a replenishment warning is triggered. When it is higher than the upper limit of the threshold, a slow-moving stock warning is triggered. Using adaptive safety stock threshold, multi-warehouse geographical distribution, and logistics timeliness matrix as constraints, and taking the minimization of the sum of total holding cost and stockout loss as the objective function, the optimal replenishment quantity and allocation plan for each SKU at each warehouse node are solved, and the decision results are written back to the inventory management module in real time.

[0057] It should be known that, Figure 2 The block diagram of the user behavior-driven e-commerce sales forecasting and inventory optimization system shown is for illustrative purposes only, and the number of modules shown does not limit the scope of protection of this invention. The user behavior-driven e-commerce sales forecasting and inventory optimization system provided in this embodiment can be used to execute various embodiments of the corresponding user behavior-driven e-commerce sales forecasting and inventory optimization methods. For specific implementation details, please refer to the descriptions of the respective method embodiments, which will not be repeated here.

[0058] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0059] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0060] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0061] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0062] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0063] If the integrated units described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0064] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0065] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

[0066] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can easily conceive of variations or substitutions without departing from the spirit and scope of the present invention, and various modifications and alterations can be made, including combinations of the different functions and implementation steps described above, as well as software and hardware implementation methods, all of which are within the protection scope of the present invention.

Claims

1. A user behavior-driven e-commerce sales forecasting and inventory optimization method, characterized in that, include: Real-time collection of multimodal interaction data of users on e-commerce platforms, including page dwell time, scrolling trajectory, frequency of repeated visits to product detail pages, add-to-cart and cancel operation sequences, and social sharing behavior; Multimodal interaction behavior data is input into a pre-trained purchase intent quantification model, which outputs an instant purchase intent intensity vector for each user for each SKU. By performing time-series aggregation on the real-time purchase intent intensity vector of all users using a sliding time window, we can identify the abnormal rise in intent intensity and define the abnormal rise inflection point as a demand precursor signal. By integrating external dynamic context factors, the demand precursor signals are weighted and corrected to form a multi-source fusion demand precursor feature set; Construct a two-level causal prediction model consisting of a category-level sales prediction model and a SKU-level sales prediction model; The two-level causal prediction model is driven by a multi-source fusion demand precursor feature set. The category-level sales prediction model outputs the total trend constraint, and the SKU-level sales prediction model outputs the confidence interval sales prediction value of each SKU under the total trend constraint and the product attribute embedding vector. The difference between the upper and lower bounds of the sales forecast value in the confidence interval is used as a measure of demand uncertainty. Combined with the current supply chain response cycle and warehousing cost coefficient, the adaptive safety stock threshold for each SKU is dynamically calculated. When the real-time inventory level is lower than the threshold, a replenishment warning is triggered. When it is higher than the upper limit of the threshold, a slow-moving stock warning is triggered. Using adaptive safety stock threshold, multi-warehouse geographical distribution, and logistics timeliness matrix as constraints, and taking the minimization of the sum of total holding cost and stockout loss as the objective function, the optimal replenishment quantity and allocation plan for each SKU at each warehouse node are solved, and the decision results are written back to the inventory management module in real time.

2. The user behavior-driven e-commerce sales forecasting and inventory optimization method according to claim 1, characterized in that, The step of inputting multimodal interaction behavior data into a pre-trained purchase intent quantification model and outputting an instant purchase intent intensity vector for each user for each SKU includes: Multimodal interaction behavior data is structured and encoded according to event type to form multi-type behavior feature tuples for each user for each SKU; Using SKU identifiers and user identifiers as index keys, each type of feature in the multi-type behavioral feature tuple is projected onto a latent space of a unified dimension. The contribution weight of each type of feature to the purchase intention is calculated through an attention mechanism. After weighted fusion, the cross-modal fusion behavioral representation vector of each user-SKU pair is output. Long-term preference embedding vectors are extracted from users' historical interaction records and concatenated with cross-modal fusion behavior representation vectors as the complete input to the purchase intent quantification model, enabling the purchase intent quantification model to integrate users' personalized preference context on the basis of real-time behavior signals. The purchase intent quantification model performs forward reasoning on the concatenated input and outputs an instant purchase intent intensity vector for each user for each SKU. Each dimension of the instant purchase intent intensity vector corresponds to three types of intent components: short-term impulsive purchase tendency, price comparison decision tendency, and collection-delayed purchase tendency. These three intent components together constitute the basic unit for temporal aggregation in subsequent steps.

3. The user behavior-driven e-commerce sales forecasting and inventory optimization method according to claim 2, characterized in that, The step of performing time-series aggregation of the real-time purchase intent intensity vector of all users using a sliding time window, identifying abnormal rise in intent intensity inflection points, and defining these abnormal rise inflection points as precursory signals of demand includes: To address different decision-making timeliness requirements, a dual-layer sliding time window with short and long cycles is constructed. The short-cycle window is used to capture immediate, impulsive fluctuations in intent, while the long-cycle window is used to depict persistent intent trends. The two windows slide synchronously, working together to affect the intensity vector of the immediate purchase intent of all users. Within each sliding step, the instant purchase intent intensity vectors in the short-period window and the long-period window are weighted and summed according to the SKU dimension. The weights are determined by the user activity level, with higher weights given to more active users. The aggregated intent intensity time series of each SKU under the two-layer window is output. For the same SKU, the short-cycle aggregation intent intensity time series and the long-cycle aggregation intent intensity time series are compared stepwise with long difference. When the short-cycle aggregation value continuously exceeds the long-cycle aggregation value and the exceedance exceeds the adaptive threshold, this moment is determined to be a candidate inflection point of abnormal rise in intent intensity. Continuous verification of candidate inflection points for abnormally rising intent intensity: requiring that the excess of short-cycle aggregation values ​​relative to long-cycle aggregation values ​​remain stable or continue to expand within a number of consecutive sliding steps; Candidate inflection points that pass continuous verification are confirmed as inflection points of abnormal increase in effective intent intensity; The SKU identifier corresponding to the inflection point of abnormal rise in effective intent intensity, the time of the inflection point, and the triplet of short-cycle and long-cycle aggregated intent intensity difference at the inflection point are encapsulated into a structured demand precursor signal and transmitted to the subsequent multi-source fusion processing stage.

4. The user behavior-driven e-commerce sales forecasting and inventory optimization method according to claim 3, characterized in that, The step of fusing external dynamic context factors to weight and correct demand precursor signals to form a multi-source fused demand precursor feature set includes: Extract the holiday type labels and the number of days remaining until the holiday from the holiday calendar database to construct a time sensitivity feature vector; Real-time capture of price data for similar SKUs from competing platforms; calculation of the price difference ratio between the corresponding SKUs on this platform and those of competitors; formation of a competitor price pressure index. By collecting data on the popularity of topics, the percentage of positive sentiment, and the speed of dissemination related to the current SKU through social media APIs, a social sentiment momentum index is generated. The time sensitivity feature vector, competitor price pressure index and social sentiment momentum index are fed into independent factor importance assessment modules. Based on the explanatory contribution of each factor to the deviation of demand precursor signals within the historical window, their respective adaptive weighting coefficients are dynamically output. The demand precursor signals are weighted and superimposed using adaptive weighting coefficients, and the output is a multi-source fusion demand precursor feature set that integrates the three-dimensional external context of time, competition and emotion, which can be directly called by the two-level causal prediction model.

5. The user behavior-driven e-commerce sales forecasting and inventory optimization method according to claim 4, characterized in that, The steps for constructing a two-level causal prediction model consisting of a category-level sales prediction model and a SKU-level sales prediction model include: Acquire historical multimodal interaction behavior data, and obtain a historical multi-source fusion demand precursor feature set based on the historical multimodal interaction behavior data; Using the sub-feature sequence aggregated by category dimension from the historical multi-source fusion demand precursor feature set as input, a causal convolutional neural network is selected as the basic architecture of the category-level sales prediction model. The masked convolutional kernel ensures that the model relies only on historical information and does not leak future data when inferring the current category sales trend. The model outputs the total sales trend distribution of each category within the prediction period. The total sales volume trend distribution of each category is compressed into a fixed-dimensional category trend context vector through a fully connected layer; Using the tensor obtained by splicing and fusing the sub-features at the SKU granularity corresponding to the historical multi-source fusion demand precursor feature set, the category trend context vector, and the product attribute embedding vector of each SKU as input, we construct an SKU-level sales prediction model with Transformer decoder as the core, and capture the demand competition and complementarity relationship between different SKUs in the same category through self-attention mechanism. In the output layer of the SKU-level sales forecasting model, a hierarchical consistency constraint gating unit is set. This unit dynamically adjusts the scaling ratio of the output sales of each SKU based on the category trend context vector, ensuring that the sum of the predicted sales of all SKUs in the same category does not deviate from the total trend distribution of the category-level model output. An alternating freeze joint training strategy is adopted for the category-level sales prediction model and the SKU-level sales prediction model: the category-level model is trained separately with the SKU-level model parameters fixed until convergence; the SKU-level model is trained separately with the category-level model parameters fixed, and the alternating iteration is performed until the prediction residuals of the two-level models are stably converged; the output is a two-level causal prediction model with hierarchical semantic alignment.

6. The user behavior-driven e-commerce sales forecasting and inventory optimization method according to claim 5, characterized in that, The steps of using a multi-source fusion demand precursor feature set as the driving input to a two-level causal prediction model, a category-level sales prediction model outputting a total volume trend constraint, and an SKU-level sales prediction model outputting the confidence interval sales prediction value for each SKU under the total volume trend constraint combined with product attribute embedding vectors include: The multi-source demand precursor feature set is aggregated by category dimension and input into the category-level sales forecast model. The output is the total sales trend of each category within the forecast period and its upper and lower bounds of confidence interval, which serve as the total volume constraint for the forecast of the next level SKU. For each SKU, its historical slow-moving rate, price elasticity coefficient, and category affiliation tag are extracted and encoded into SKU attribute embedding vectors through an embedding layer to capture the structural differences between SKUs; The sub-features at the SKU granularity corresponding to the multi-source fusion demand precursor feature set are concatenated and fused with the SKU attribute embedding vector. Within the limit of total volume constraints, the model is input into the SKU-level sales prediction model and outputs the confidence interval sales prediction value of each SKU. The prediction residuals of the category-level sales prediction model and the SKU-level sales prediction model are incorporated into the shared loss function for joint backpropagation training, so that the two models constrain each other during the parameter update process, ensuring that the sum of the SKU-level prediction values ​​and the category-level prediction total remain logically consistent. Check whether the sum of the sales forecast values ​​of all SKUs under each category falls within the category-level confidence interval range. If it exceeds the range, trigger the automatic correction mechanism to scale the SKU-level forecast values ​​proportionally and output the sales forecast values ​​of the confidence interval with consistent levels.

7. The user behavior-driven e-commerce sales forecasting and inventory optimization method according to claim 6, characterized in that, The purchase intent strength vector is quantified using the following formula to calculate the instantaneous purchase intent strength score for each user for each SKU: in, For users The score represents the intensity of immediate purchase intent for each SKU; B is the set of behavioral types (including dwell time, add-to-cart, revisit, sharing, etc.). The learnable weight for behavior type b reflects the strength of the behavior's contribution to purchase intention; For users The cumulative intensity value of behavior b occurring on SKU s; This is the time decay coefficient for behavior type b, which controls the rate at which the intent of this type of behavior decays over time. Let be the time interval between action b and the current moment; The Sigmoid normalization function compresses the score to the (0,1) interval; For users The purchasing power weight is calculated by the ratio of the average price of their historical orders to the average price of platform users, so that the intention signals of high-spending users contribute more to sales forecasting and suppress the noise impact of low-conversion user behavior. For users The consistency coefficient of the behavior sequence for behavior b of SKU s measures whether the behavior is consistent with the user's decision path for similar products in the past (such as habitually adding to cart before purchasing). The higher the consistency, the larger the coefficient, reflecting the credibility of the behavior signal.

8. The user behavior-driven e-commerce sales forecasting and inventory optimization method according to claim 7, characterized in that, The following formula is used to perform multi-source external factor weighting correction on the demand precursor signal: in, The modified fusion demand precursor intensity value for SKUs s within the time window t; C represents the initial demand precursor signal value of SKU s within the time window t; C represents the set of external context factor types (including holidays, competitor prices, and social sentiment). This represents the original influence strength of factor type c on SKUs within time window t. The adaptive weighting coefficient of factor type c in time window t is dynamically learned from the explanatory contribution of the factor to the prediction bias in the historical window, reflecting the relative importance of different external factors to the demand driver in different periods. The category sensitivity coefficient of SKU s to external factor type c reflects the inherent difference in the intensity of response of different product categories to holidays, competitor prices or social sentiment (e.g., clothing is more sensitive to social sentiment than electronic accessories), and is obtained by offline fitting of historical data of the same category. Factor type and The interaction gain coefficient of SKU s captures the synergistic amplification or mutual inhibition effect produced when two types of external factors act simultaneously (such as the demand increase when holidays coincide with social media surges, which far exceeds the sum of the individual effects of the two factors).

9. The user behavior-driven e-commerce sales forecasting and inventory optimization method according to claim 8, characterized in that, The SKU-level sales prediction model is trained in the following way to output confidence intervals: in, is the SKU-level joint training loss; Q is the set of quantiles (including upper and lower bound quantiles). The asymmetric pinball loss function corresponding to the quantile q; Let s be the predicted sales volume of SKU s at quantile q; This represents the actual sales volume of SKUs; The set of SKUs under category g; This is the upper bound of the confidence interval for category sales output by the category-level sales prediction model. The hierarchical consistency penalty coefficient controls the penalty intensity when the sum of SKU predicted values ​​exceeds the category upper bound. The prediction confidence weight of SKU s in time window t is obtained by normalizing the strength of the demand precursor signal. The stronger the precursor signal, the higher the training sample weight of the SKU, guiding the model to invest more fitting resources on SKUs with high confidence. SKUs within the same product category and The historical demand substitution rate between the two measures the degree of historical negative correlation in their sales. For SKU and The upper limit of demand capacity is estimated by the maximum combined percentage of the two in the historical peak sales of the category; To reduce the competitive pressure, the penalty coefficient is used to control the intensity of the demand substitution constraint among SKUs of the same product category.

10. A user behavior-driven e-commerce sales forecasting and inventory optimization system, used to execute the user behavior-driven e-commerce sales forecasting and inventory optimization method as described in any one of claims 1 to 9, characterized in that, include: Control processing module and inventory management module; The control processing module is configured as follows: Real-time collection of multimodal interaction data of users on e-commerce platforms, including page dwell time, scrolling trajectory, frequency of repeated visits to product detail pages, add-to-cart and cancel operation sequences, and social sharing behavior; Multimodal interaction behavior data is input into a pre-trained purchase intent quantification model, which outputs an instant purchase intent intensity vector for each user for each SKU. By performing time-series aggregation on the real-time purchase intent intensity vector of all users using a sliding time window, we can identify the abnormal rise in intent intensity and define the abnormal rise inflection point as a demand precursor signal. By integrating external dynamic context factors, the demand precursor signals are weighted and corrected to form a multi-source fusion demand precursor feature set; Construct a two-level causal prediction model consisting of a category-level sales prediction model and a SKU-level sales prediction model; The two-level causal prediction model is driven by a multi-source fusion demand precursor feature set. The category-level sales prediction model outputs the total trend constraint, and the SKU-level sales prediction model outputs the confidence interval sales prediction value of each SKU under the total trend constraint and the product attribute embedding vector. The difference between the upper and lower bounds of the sales forecast value in the confidence interval is used as a measure of demand uncertainty. Combined with the current supply chain response cycle and warehousing cost coefficient, the adaptive safety stock threshold for each SKU is dynamically calculated. When the real-time inventory level is lower than the threshold, a replenishment warning is triggered. When it is higher than the upper limit of the threshold, a slow-moving stock warning is triggered. Using adaptive safety stock threshold, multi-warehouse geographical distribution, and logistics timeliness matrix as constraints, and taking the minimization of the sum of total holding cost and stockout loss as the objective function, the optimal replenishment quantity and allocation plan for each SKU at each warehouse node are solved, and the decision results are written back to the inventory management module in real time.