Store commodity replenishment prediction method and device based on data analysis, equipment and storage medium
Through data analysis and multi-objective optimization technology, combined with face recognition, video surveillance and machine learning models, the traditional replenishment prediction method has solved the shortcomings of traditional replenishment prediction methods in capturing consumer diversity and market changes, and achieved more accurate inventory management and operation Improve efficiency.
Patent Information
- Application Number
- CN202411235278.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-11-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional replenishment forecasting methods are difficult to capture the diversity of consumer demand and market changes, resulting in overstock or shortage of inventory, and fail to effectively consider the complementary and substitution relationships between goods, affecting the operating effectiveness of retailers.
Using a data analysis-based method, customer behavior data is obtained through facial recognition and video surveillance, combined with K-means clustering, Eclat algorithm, Prophet time series model, Dirichlet regression model and XGBoost model, to predict customer traffic and product sales, and use NSGA-II multi-objective optimization algorithm formulates replenishment strategies and dynamically adjusts parameters to adapt to market changes.
It achieves more accurate demand forecasts, optimizes inventory structure, improves customer satisfaction and retail business operation efficiency, and significantly improves the accuracy and adaptability of replenishment decisions.
Smart Images

Figure CN119048154A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data processing technology, and specifically relates to a store commodity replenishment prediction method, device, equipment and storage medium based on data analysis. Background Art
[0002] In the retail industry, ensuring an effective merchandise replenishment strategy is crucial, which not only affects inventory costs, but is also directly related to customer satisfaction and sales efficiency. Traditional replenishment methods mainly rely on historical sales data to predict future demand, but this method often fails to capture immediate consumer demand in a rapidly changing market environment, especially during high demand periods such as promotions or holidays.
[0003] Existing replenishment forecasting techniques often ignore the diversity of consumer behavior and its changes over time, resulting in deviations between forecast results and actual demand. This deviation may lead to excess or shortage of inventory, thus affecting retailers' operating results. In addition, traditional models often fail to effectively consider the complementary and substitutive relationships between commodities, which are crucial for formulating more accurate replenishment strategies.
[0004] In view of this, there is an urgent need to develop a new replenishment forecasting method that can comprehensively consider the diversity of consumer behavior, market dynamics, and the complex relationships between commodities to achieve more accurate demand forecasting. Summary of the invention
[0005] The present invention provides a store commodity replenishment prediction method, device, equipment and storage medium based on data analysis, focusing on optimizing replenishment strategies by deeply analyzing consumer purchasing behavior, the complementary and substitutive relationship between commodities, and other important sales influencing factors. By applying multi-objective optimization technology, the method not only accurately adjusts the replenishment plan to adapt to market changes, but also optimizes inventory management and improves customer satisfaction, thereby significantly improving the operational efficiency and effectiveness of retail business.
[0006] To achieve these objectives, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a method for predicting store product replenishment based on data analysis, characterized in that it comprises the following steps:
[0008] S1. Customer identification and profile: Use facial recognition technology to identify the facial information of customers entering the store, and anonymously identify the customers based on the facial information, generating a unique identifier for each identified customer.
[0009] S2. Customer behavior data collection: Use video surveillance technology to obtain video data of customers' activities in the store, and then extract customer behavior data, where the behavior data includes customers' stay time, shopping routes, areas of interest, and product interaction behaviors.
[0010] S3. Customer group classification: Based on the behavioral data collected in step S2 and the stored historical consumption records, the K-means clustering algorithm is used to classify customers and assign feature labels to different categories.
[0011] S4. Product association analysis: Apply the Eclat algorithm to analyze the complementary and substitution relationships between products and generate a product association rule set.
[0012] S5. Customer flow forecasting: Prophet time series forecasting model is used to combine historical customer flow data, time information, weather data and promotional information to predict the number of store customers within a specified time period.
[0013] S6. Customer group composition prediction: Based on the customer classification results of step S3, historical group composition data and promotional activity information, the Dirichlet regression model is used to predict the proportion distribution of each category of customers within a specified time period. The model input includes time characteristics, historical group proportion data and related external factors, and the output is the proportion of each group within the predicted time period.
[0014] S7. Product sales forecast: Integrate the customer flow forecast results of step S5 and the group composition forecast results of step S6, and explicitly apply the product association analysis results of step S4, and use the XGBoost model to predict the sales of each product in the specified time period.
[0015] S8. Replenishment strategy optimization: Apply the NSGA-II multi-objective optimization algorithm to maximize expected profit and minimize out-of-stock risk, while explicitly integrating the commodity association relationship obtained in step S4 to formulate a replenishment strategy.
[0016] S9. Periodic evaluation and adjustment: Perform a system evaluation every 7 days, compare the forecast results with the actual sales situation, and calculate the mean absolute percentage error (MAPE); when the MAPE exceeds the preset threshold, dynamically adjust the parameters of each module.
[0017] In a second aspect, the present invention further provides a store commodity replenishment prediction device, comprising the following modules:
[0018] Customer identification module: responsible for using facial recognition technology to anonymously identify customers entering the store and generate a unique identifier for each customer.
[0019] Behavioral data collection module: responsible for using video surveillance technology to obtain customer behavior data in the store, including dwell time, shopping routes, areas of interest, and product interaction behaviors.
[0020] Customer group classification module: Based on the collected behavioral data and stored historical consumption records, the K-means clustering algorithm is used to classify customers and assign feature labels to different categories.
[0021] Product association analysis module: Use the Eclat algorithm to analyze the complementary and substitution relationships between products and generate a product association rule set.
[0022] Customer flow prediction module: It uses the Prophet time series prediction model, combined with historical customer flow data, time information, weather data and promotion information, to predict the number of store customers within a specified time period.
[0023] Customer group composition prediction module: Based on customer classification results, historical group composition data and promotional activity information, the Dirichlet regression model is used to predict the proportion distribution of each category of customers within a specified time period.
[0024] Product sales forecasting module: Integrate customer flow forecasting results, group composition forecasting results and product association analysis results, and use the XGBoost model to predict the sales of each product. It includes features construction, model training, forecasting and result adjustment functions.
[0025] Replenishment strategy optimization module: Apply the NSGA-II multi-objective optimization algorithm to maximize expected profits and minimize out-of-stock risks, while integrating commodity associations to formulate replenishment strategies. This includes objective function construction, demand function definition, constraint setting, and optimal solution selection.
[0026] Evaluation and adjustment module: Regularly compare the forecast results with the actual sales situation, calculate the forecast error, and when the error exceeds the preset threshold, dynamically adjust the parameters of each module to improve the system's forecast accuracy.
[0027] Data storage module: manages the storage and retrieval of various types of data, including customer profiles, behavioral data, product information, historical sales data, forecast results, and optimization plans.
[0028] Communication interface module: exchange data and synchronize information with other systems (such as store pricing system, store financial system, supply chain management system, store sales management system).
[0029] Security management module: ensures system data security and privacy protection, including data encryption, access control, audit logs, and anonymization processing functions.
[0030] In a third aspect, the present invention further provides a store commodity replenishment prediction device, characterized in that it includes:
[0031] Processing unit, storage unit, network communication unit, data acquisition unit, display output unit, input control unit, security protection unit and power management unit;
[0032] Wherein, the processing unit is configured as:
[0033] receiving customer identification information and behavior data from the data collection unit;
[0034] Based on the customer identification information and behavior data, perform customer classification operations;
[0035] Analyze product associations using a predetermined algorithm;
[0036] Predict the number of customers in future time periods based on historical data and external factors;
[0037] Predict customer group composition based on historical data and market trends;
[0038] Integrate customer quantity forecast, group composition forecast and product association analysis results to predict product sales;
[0039] Generate replenishment strategies based on predicted sales data and preset optimization goals;
[0040] Regularly evaluate forecast results and adjust relevant parameters when preset conditions are met.
[0041] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the steps of any one of the methods described in the first aspect.
[0042] Beneficial effects of the present invention:
[0043] Multi-dimensional demand forecasting: This invention combines the Prophet time series model and the Dirichlet regression model to predict customer flow and group composition respectively, improving the comprehensiveness and accuracy of demand forecasting. This multi-dimensional forecasting method can better capture market changes and customer behavior patterns.
[0044] Dynamic commodity association analysis: The Eclat algorithm is used to analyze the complementary and substitutive relationships between commodities, so that replenishment decisions can take into account the mutual influence between commodities. This dynamic analysis method optimizes the overall inventory structure and reduces inventory imbalances caused by commodity associations.
[0045] Multi-objective replenishment optimization: NSGA-II algorithm is used for multi-objective optimization, taking into account both profit maximization and out-of-stock risk minimization. This approach has made significant progress in balancing economic benefits and customer satisfaction, providing a more comprehensive replenishment strategy.
[0046] Adaptive adjustment mechanism: The system can continuously adapt to market changes through regular evaluation of forecast results and dynamic parameter adjustments. This mechanism significantly improves the long-term accuracy of the forecast model and the adaptability of decision-making.
[0047] Balance between privacy protection and data value: The use of anonymous identification technology effectively protects customer privacy while obtaining valuable data. This balance enables the system to maximize the analytical value of data on a compliance basis. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A flow chart of the method steps of the present invention is shown;
[0049] Figure 2 A schematic diagram showing the composition of a store commodity replenishment prediction device of the present invention is shown;
[0050] Figure 3 A schematic diagram showing the composition of a store merchandise replenishment prediction device according to the present invention is shown; DETAILED DESCRIPTION
[0051] Exemplary embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0052] Combination Figure 1 In a first aspect, the present invention provides a method for predicting store merchandise replenishment based on data analysis, comprising the steps of:
[0053] S1. Customer identification and profile: Use facial recognition technology to identify the facial information of customers entering the store. Based on the facial information, anonymous identification of customers is performed and a unique identifier is generated for each identified customer. Specifically, the processing process is as follows:
[0054] S1.1 Facial information collection:
[0055] The facial images of customers entering the store are obtained through the data collection unit installed at the store entrance.
[0056] S1.2 Face recognition processing:
[0057] The collected facial images are preprocessed and feature extracted to generate vectors representing customer characteristics.
[0058] S1.3 Customer Identification:
[0059] Based on the generated feature vector, determine whether the customer is visiting for the first time.
[0060] S1.4 Unique identifier generation:
[0061] For first-time customers, a new unique identifier is generated; for returning customers, their existing unique identifier is called.
[0062] S1.5 Data storage:
[0063] The unique identifier is stored in association with the corresponding feature vector, and the original image of the customer is not saved.
[0064] S1.6 Privacy Protection:
[0065] Take necessary privacy protection measures, including encrypted data storage and providing customer opt-out mechanisms.
[0066] S2. Customer behavior data collection: Use video surveillance technology to obtain video data of customers' activities in the store, and then extract customer behavior data, where the behavior data includes customers' stay time, shopping routes, areas of interest, and product interaction behaviors. Specifically, the processing process is as follows:
[0067] S2.1 Video data acquisition:
[0068] Through the data acquisition units arranged in the store, video data of customer activities in the store are continuously collected.
[0069] S2.2 Customer identification and tracking:
[0070] Individual customers are identified and tracked in the captured video data and associated with the unique identifier generated in step S1.
[0071] S2.3 Behavioral data extraction:
[0072] Analyze customers' movement within the store to determine shopping routes; calculate the time customers spend in specific areas; identify product areas that customers focus on; and detect customer interactions with products, such as picking up, checking, and putting back.
[0073] S2.4 Data structuring:
[0074] Convert the extracted behavioral data into a structured form, including:
[0075] Shopping route: represented by a coordinate sequence, such as [(x1, y1, t1), (x2, y2, t2), ...], where (x, y) represents the location coordinates and t represents the timestamp;
[0076] Residence time: expressed as a region-time pair, such as {region 1: time 1, region 2: time 2, ...};
[0077] Focus area: expressed as area-frequency pairs, such as {area A: frequency 1, area B: frequency 2, ...};
[0078] Product interaction: represented by product-behavior pairs, such as {product ID1: [behavior 1, behavior 2, ...], product ID2: [behavior 1, behavior 3, ...]}.
[0079] S2.5 Data Integration:
[0080] The structured behavior data is associated with the customer's unique identifier to form a customer behavior record in the following format:
[0081] {"CustomerID":"Unique Identifier",
[0082] "Access Time":"YYYY-MM-DD HH:MM:SS",
[0083] "Shopping route":[(x1,y1,t1),(x2,y2,t2),...],
[0084] "Dwell time":{"Area 1":Time 1,"Area 2":Time 2,...},
[0085] "Focus area":{"Area A":Frequency 1,"Area B":Frequency 2,...},
[0086] "Product interaction":{"Product ID1":["Pick up","Put back"],"Product ID2":["View"],...}}.
[0087] S2.6 Data Security Measures:
[0088] Implement necessary security protection measures for collected and stored behavioral data to ensure the security and privacy of the data.
[0089] S3. Customer group classification: Based on the behavior data collected in step S2 and the stored historical consumption records, the K-means clustering algorithm is used to classify customers and assign feature labels to different categories. Specifically, the processing process is as follows:
[0090] S3.1 Customer group data integration and preparation:
[0091] Define the eigenvector X = (x1, x2, ..., x n ),in:
[0092] x1: average residence time (unit: minutes, range: 0-∞);
[0093] x2: number of focus regions (unit: , range: 0-∞, integer);
[0094] x3: Product interaction frequency (unit: times / hour, range: 0-∞);
[0095] x4: Purchase frequency (unit: times / month, range: 0-∞);
[0096] x5: average consumption amount (unit: yuan, range: 0-∞);
[0097] x6~x 10 : Main purchase categories (binary code, 0 or 1);
[0098] n: total number of features. In this example, n=10. The actual number will be determined based on the store merchandise categories.
[0099] S3.2 Customer group data standardization:
[0100] For each numerical feature x i Apply Z-score normalization:
[0101] z=(x-μ) / σ
[0102] in:
[0103] x: original eigenvalue;
[0104] μ: feature x i The average value of
[0105] σ: characteristic x i The standard deviation of
[0106] z: Normalized eigenvalue, dimensionless, usually in the range of [-3,3].
[0107] S3.3 Determine the optimal number of clusters K:
[0108] Use the Elbow Rule:
[0109] For K∈[1,K max ]Calculate SSE (Sum of Squared Errors):
[0110] SSE(K)=∑ i Σ j ||x j -c i || 2
[0111] in:
[0112] K: number of clusters, range: [1, K max ];
[0113] K max: The maximum number of clusters considered, usually set to 20;
[0114] x j : the jth data point;
[0115] c i : The center of the i-th cluster;
[0116] ||·||: represents Euclidean distance;
[0117] SSE: sum of squared errors, range: [0,∞);
[0118] Draw the K-SSE curve and select the K value at the inflection point of the curve as the optimal number of clusters.
[0119] S3.4 performs K-means clustering:
[0120] Randomly initialize K cluster centers C = {c1, c2, ..., c k}
[0121] Repeat the following steps until convergence or the maximum number of iterations is reached:
[0122] a. Assignment step: For each data point x, calculate i = argmin i ||xc i || 2 , that is, find the value that makes x reach the cluster center c i The index i with the smallest squared distance is assigned to the i-th cluster, argmin i It means that ||xc i || 2 Minimize the index i.
[0123] b. Update steps:
[0124] c i =(1 / |S i |)∑ x ∈S i x
[0125] in:
[0126] K: optimal number of clusters, determined by S3.3;
[0127] c i : The center of the i-th cluster, with the same dimension as the feature vector;
[0128] S i : The set of all data points assigned to cluster i;
[0129] |S i |:S i The number of data points in ;
[0130] Maximum number of iterations: usually set to 100-300.
[0131] S3.5 Clustering result analysis:
[0132] For each cluster i, calculate its center c i And the within-cluster variance:
[0133] Var(S i )=(1 / |S i |)∑ x ∈S i ||xc i || 2
[0134] in:
[0135] Var(S i ): internal variance of cluster i, range: [0,∞);
[0136] |S i |, x, c i : Same meaning as S3.4.
[0137] S3.6 Feature labeling and group classification:
[0138] a) Feature level label assignment:
[0139] For each feature j of each cluster i, according to the cluster center value c ij Relationship with overall feature distribution, labelled as "low", "medium", and "high":
[0140] If c ij <μ j -σ j , then marked as "low";
[0141] If μ j -σ j ≤c ij ≤μ j +σ j , then it is marked as "medium";
[0142] If c ij >μ j +σ j , then it is marked as "high";
[0143] in:
[0144] c ij : The central value of cluster i on feature j;
[0145] μ j : The overall average of feature j;
[0146] σ j : The population standard deviation of feature j.
[0147] b) Group classification label generation:
[0148] Based on the combination of labels for each feature, a descriptive group classification label is generated for each cluster. For example:
[0149] Aggregate feature labels: Combine all feature labels for each cluster together.
[0150] For example: [Dwell time: high, Focus area: medium, Interaction frequency: high, Purchase frequency: medium, Average consumption: high, Main category: electronics]
[0151] Extract key features: Select 2-3 features that best represent the characteristics of the cluster.
[0152] For example: high dwell time, high interaction frequency, high average consumption
[0153] Generate group classification labels: Create concise and descriptive labels based on key characteristics.
[0154] For example: "Highly Engaged High Value Customers"
[0155] c) Description of group characteristics:
[0156] Generate detailed characteristic descriptions for each group, including the specific performance of each indicator and the main purchasing tendencies.
[0157] Example population classification results:
[0158] 1. Highly engaged and high-value consumers:
[0159] Tags: long stay, frequent interaction, high consumption
[0160] Characteristics: These customers stay in the store for a long time, interact with the products frequently, and spend a high amount of money on average. They tend to buy high-end electronic products.
[0161] 2. Quick decision-making consumers:
[0162] Tags: short stay, high purchase rate, medium consumption
[0163] Characteristics: This type of customer stays for a short time, but makes quick purchase decisions and buys frequently. They usually buy daily necessities and food.
[0164] 3. Browsing low-frequency consumers:
[0165] Tags: medium dwell time, low interaction, low purchase frequency
[0166] Characteristics: This type of customer likes to browse products but rarely makes a purchase. Targeted promotional strategies may be needed to increase conversion rates.
[0167] 4. Seasonal large-amount consumers:
[0168] Tags: low frequency, high amount, specific category
[0169] Characteristics: This type of customer does not purchase frequently, but spends a large amount of money on a single purchase. They tend to purchase specific categories of goods in specific seasons, such as holiday gifts or seasonal clothing.
[0170] 5. Daily necessities consumers:
[0171] Tags: high frequency, low amount, fixed category
[0172] Characteristics: This type of customer visits the store frequently but spends a small amount each time. They mainly buy daily necessities such as food and daily necessities.
[0173] S3.7 Result storage and update:
[0174] The clustering results, cluster features and customer classification information are associated with the customer unique identifier in S1 and stored in the database. A periodic update mechanism is set up to re-execute steps S3.1-S3.6 in each update period T, where T is the update period in days, usually set to 7-30 days.
[0175] S4. Commodity association analysis: Apply the Eclat algorithm to analyze the complementary and substitution relationships between commodities and generate a commodity association rule set. Specifically, the processing process is as follows:
[0176] S4.1 Preparation of commodity-related data:
[0177] Extract transaction data from the store sales system and construct a transaction data set T = {t1, t2, ..., t n},in:
[0178] t i : represents a single transaction, including a set of commodity items {i1,i2,...,i k};
[0179] n: total number of transactions, reflecting the amount of data analyzed;
[0180] i: Product item, which can be a single product or a product category, such as "milk" or "dairy products".
[0181] S4.2 Construct vertical data format:
[0182] Convert transaction data into vertical data format, that is, create a transaction ID (TID) set for each commodity item i:
[0183] tid(i)={t|i∈t,t∈T}, where tid(i) represents the set of all transaction IDs in which item i appears; for example, for the item "bread", tid(bread) may be {1,3,5,7}, indicating that bread appears in the 1st, 3rd, 5th, and 7th transactions.
[0184] S4.3 Setting the support threshold:
[0185] Define the minimum support threshold min_sup in the range [0,1]. For example, if min_sup = 0.02, it means that an item set must appear in at least 2% of transactions to be considered frequent.
[0186] Support calculation formula:
[0187] Where X is the itemset and |T| is the total number of transactions.
[0188] S4.4 Generate frequent itemsets:
[0189] Use the Eclat algorithm to generate all frequent itemsets:
[0190] a) Initialize the frequent item set L1 = {i||tid(i)|≥min_sup×|T|} with k = 1;
[0191] b) For k ≥ 2, generate k candidate item sets by self-joining k-1 frequent item sets;
[0192] c) For each candidate item set X, calculate the support: sup(X) = |∩{tid(i)|i∈X}| / |T|;
[0193] d) If sup(X)≥min_sup, then X is a frequent itemset;
[0194] e) Repeat steps bd until no new frequent item sets can be generated;
[0195] S4.5 Generate association rules:
[0196] For each frequent itemset X, generate all possible non-empty proper subsets (empty set), calculate the confidence:
[0197] conf(Y→X\Y)=sup(X) / sup(Y)
[0198] If conf(Y→X\Y)≥min_conf, then generate the association rule Y→X\Y.
[0199] in:
[0200] conf is the confidence level, which indicates the probability of purchasing X\Y when purchasing Y;
[0201] Y→X\Y: association rule, Y is the antecedent and X\Y is the consequent;
[0202] X\Y: set difference, representing the elements in X but not in Y;
[0203] For example, for the frequent item set {"milk, bread, eggs"}, the rules that may be generated include:
[0204] Milk, bread → eggs;
[0205] Milk, eggs → bread;
[0206] Bread, eggs → milk.
[0207] S4.6 Identify complementary and substitutive relationships:
[0208] Lift(A→B)=conf(A→B) / sup(B)
[0209] in:
[0210] Lift: Lift, which measures the strength of the correlation of the rule. Lift>1 indicates a positive correlation, which may be complementary products; Lift<1 indicates a negative correlation, which may be substitute products.
[0211] Identifying complements and substitutes is critical to developing replenishment strategies and recommendation systems. For example, bread and butter may be complementary goods, while Coke and Sprite may be substitutes.
[0212] S4.7 Rule evaluation and screening:
[0213] Evaluate and screen the generated association rules, considering the following indicators:
[0214] Support:
[0215] Confidence: conf(Y→X\Y)=sup(X) / sup(Y);
[0216] Lift: Lift(Y→X\Y)=conf(Y→X\Y) / sup(X\Y);
[0217] Leverage: lev(Y→X\Y)=sup(X)-sup(Y)×sup(X\Y);
[0218] Filter out rules that meet the following conditions:
[0219] sup(X)≥min_sup, where min_sup represents the minimum support threshold;
[0220] conf(Y→X\Y)≥min_conf, where min_conf represents the minimum confidence threshold;
[0221] Lift(Y→X\Y)>1;
[0222] lev(Y→X\Y)>min_lev, where min_lev represents the minimum leverage threshold;
[0223] These indicators reflect the frequency, reliability, relevance strength and importance of the rules. By setting thresholds for these indicators, the most valuable rules can be screened out.
[0224] S4.8 Rules storage and update:
[0225] The filtered association rules are stored in the database. For example, a stored rule may be:
[0226] {Antecedent: "bread", consequent: "butter", support: 0.05, confidence: 0.75, lift: 1.5, leverage: 0.02}
[0227] Establish a regular update mechanism to re-execute steps S4.1-S4.7 every T days (e.g., 7 days) to ensure that the rules can reflect the latest purchasing trends.
[0228] S5. Customer flow prediction: Prophet time series prediction model is used to combine historical customer flow data, time information, weather data and promotion information to predict the number of store customers within a specified time period. Specifically, the processing process is as follows:
[0229] S5.1 Customer flow data collection and integration:
[0230] Construct a time series dataset D = {(t i ,y i ,X i )|i=1,2,...,n}
[0231] in:
[0232] t i : timestamp;
[0233] y i : Number of customers, actual customer flow data obtained from steps S1 and S2;
[0234] X i: External feature vector, including time features (such as day of the week, whether it is a holiday), weather data (such as temperature, precipitation) and promotion information (such as discount strength);
[0235] n: Number of observations, usually daily data for the past 1-2 years.
[0236] S5.2 Customer flow data preprocessing:
[0237] a) Missing value processing: Apply the interpolation function f_interp(D)→D', including linear interpolation, polynomial interpolation, etc.;
[0238] b) Outlier detection: define Q1, Q3 as the quartiles of y, IQR = Q3-Q1
[0239] Outlier range: [Q1-1.5×IQR, Q3+1.5×IQR]
[0240] c) Feature Engineering: Applying Transformation Functions Including one-hot encoding, standardization and other processing.
[0241] S5.3 Prophet model configuration:
[0242] Define the Prophet model:
[0243] y(t)=g(t)+s(t)+h(t)+ε(t)
[0244] in:
[0245] g(t): trend term, used to describe long-term trends, g(t) = (k + δ·α(t) T )t+(m+γ·α(t) T ), where k is the basic growth rate, which determines the overall slope of the trend; δ is the growth rate change vector, which allows the growth rate to change in different time periods; m is the initial offset, which determines the starting position of the trend line; γ is the offset change vector, which allows the offset to be adjusted over time; α(t) indicates a function vector, which returns 1 at a specific time point (such as a change point) and 0 at other times, and is used to introduce nonlinear changes in the trend. T represents the matrix transpose;
[0246] s(t): Seasonal term, used to capture periodic changes, s(t) = ∑ n [a n cos(2πnt / P)+b n sin(2πnt / P)], where a n and b n represents the Fourier series coefficient, P is the seasonal cycle (e.g. 7 represents a weekly cycle);
[0247] h(t): Holiday effect, used to consider the impact of holidays on customer flow, h(t) = Z(t) × κ, where Z(t) is a design matrix, each row of which corresponds to an observation date t in the model, and each column corresponds to a specific holiday. For each observation date, if the date is a specific holiday, the column value corresponding to the holiday is 1, if not, the corresponding column value is 0. This layout allows the matrix to indicate whether each date belongs to a holiday; κ is a vector whose length is equal to the number of columns in Z(t) (i.e. the total number of holidays). Each element represents the increase or decrease in the impact of the corresponding holiday on the target variable (such as the number of customers). These parameters are usually estimated during the model training process;
[0248] ε(t): error term, random disturbance of the model, ε(t)~N(0,σ 2 ), σ 2 is the error variance, which controls the uncertainty range of the predicted value. A larger error variance indicates a higher uncertainty in the prediction.
[0249] S5.4 Model training:
[0250] The dataset D' is divided into a training set D_train and a validation set D_valid. The training set is used to train the Prophet model, and the model parameters are optimized by minimizing the prediction error (such as mean absolute error MAE and root mean square error RMSE). To verify the stability and accuracy of the model, the time series cross-validation method is used to simulate the actual prediction situation by gradually expanding the training window, and the model performance is tested on the validation sets of different time periods.
[0251] S5.5 Predict customer traffic
[0252] Use the trained Prophet model to predict the future time period T pred Make predictions and output the future customer flow prediction results and confidence intervals.
[0253] S6. Customer group composition prediction: Based on the customer classification results of step S3, historical group composition data and current market trends, the Dirichlet regression model is used to predict the proportion distribution of each category of customers within a specified time period. The model input includes time characteristics, historical group proportion data and related external factors, and the output is the proportion of each group within the predicted time period. Specifically, the processing process is as follows:
[0254] S6.1 Customer group composition data collection and integration
[0255] Collect customer classification results from step S3, including historical consumption patterns and behavior data of each category of customers; collect external data that affects the composition of customer groups, including holidays and seasonal changes; use forward filling methods to handle missing values in time series data to ensure continuity; standardize continuous variables (such as historical consumption amounts, purchase frequency, etc.) to eliminate magnitude differences between different features and ensure that the data is within the same range.
[0256] S6.2 Dirichlet regression model configuration
[0257] Select the Dirichlet regression model, which is specially used to process multi-category proportion data and is suitable for predicting the proportion distribution of different customer groups in the total customers; determine the regularization parameter of the model to avoid overfitting; set the L2 regularization parameter to 0.01 to balance the complexity and generalization ability of the model; use historical group proportion data (from S3), time features (such as month, day of the week), holiday indicators, seasonal features (such as quarter, temperature), and sales activity intensity (such as discount intensity) as input features.
[0258] S6.3 Model training and validation
[0259] Use the above selected features to train the model, and divide the data set into a training set (80%) and a validation set (20%); use the maximum likelihood estimation method to fit the Dirichlet regression model to ensure that the model can accurately reflect the changing trend of the proportion of customer groups; do not use cross-validation, and directly use the time series splitting method (time series stepwise validation) to gradually verify the performance of the model on unseen data; use the log-likelihood loss function to evaluate the model performance, which is a commonly used indicator in Dirichlet regression. The degree of fit of the model is evaluated by the log-likelihood loss value on the validation set; by comparing the loss values on the training set and the validation set, ensure that the model is not overfitted. If the loss value on the validation set is significantly higher than that on the training set, increase the regularization strength appropriately.
[0260] S6.4 Predicting customer group composition
[0261] Use the trained Dirichlet regression model to predict the proportion of customer groups in a specific time period in the future, and output the predicted proportions of different customer groups in the specified time period; the prediction results include the estimated proportion of each group (for example, the proportion of consumers who make quick decisions, the proportion of seasonal large-amount consumers, the proportion of consumers of daily necessities, etc.).
[0262] S7. Product sales forecast: Integrate the customer flow forecast results of step S5 and the group composition forecast results of step S6, and explicitly apply the product association analysis results of step S4, and use the XGBoost model to predict the sales of each product in the specified time period; specifically, the processing process is as follows:
[0263] S7.1 Construct a feature set, including historical sales, price, promotion information, customer flow, group composition, and product association features;
[0264] S7.2 train the XGBoost model;
[0265] S7.3 Use the trained model to predict sales;
[0266] S7.4 Adjust the forecast results based on the commodity association relationship;
[0267] S7.5 Verify the model prediction accuracy through historical data;
[0268] S8. Replenishment strategy optimization: Apply the NSGA-II multi-objective optimization algorithm to maximize expected profits and minimize out-of-stock risks. At the same time, explicitly integrate the commodity associations obtained in step S4 to formulate a replenishment strategy, including:
[0269] S8.1 Define the demand function
[0270] D i (x) represents the demand function of commodity i, taking into account the commodity association relationship, and is defined as:
[0271]
[0272] in:
[0273] Respectively represent the sales forecast of products i and j, obtained from the prediction results of the XGBoost model in step S7;
[0274] x i 、x j Represent the replenishment (order) quantity of goods i and j respectively;
[0275] α ij , β ij They are the complementary effect coefficient of commodity j on commodity i and the substitution effect coefficient of commodity j on commodity i, respectively. The calculation method is:
[0276] α ij =γ·(N ij ·N) / (N i ·N j )
[0277] β ij=δ·(N i -N ij )·N / N i ·(NN j )
[0278] in:
[0279] γ and δ represent the adjustment parameters of complementarity and substitution effects, respectively, which are real numbers in [0,1] and are set through historical data analysis and expert experience;
[0280] N represents the total number of transactions, which is calculated from store sales data;
[0281] N i Represents the number of transactions containing product i, a positive integer and N i ≤N, obtained from store sales data;
[0282] N j Represents the number of transactions involving product j, a positive integer and N j ≤N, obtained from store sales data;
[0283] N ij Represents the number of transactions that include both products i and j, a positive integer and N ij ≤min(N i ,N j ), which is calculated from store sales data;
[0284] S8.2 Constructing multi-objective optimization functions
[0285] Maximize expected profit:
[0286] maxf1(x)=∑ i (p i ·E[min(D i (x),x i )]-c i ·x i -h i ·E[(max(0,x i -D i (x)))])
[0287] Where: maxf1(x) represents maximizing expected profit; p i represents the unit price of the product, which is obtained from the store's pricing system; E[·]: expected value operator, which calculates the average value of the random variable; c i represents the unit purchase cost of commodity i, obtained from the store’s supply chain management system; x i represents the replenishment (order) quantity of commodity i; h i Represents the unit inventory holding cost of commodity i, calculated as: hi =(annual storage fee rate + capital cost rate)×c i ÷365); min(a,b) is the minimum function, which returns the smaller value of a and b; max(a,b) is the maximum function, which returns the larger value of a and b;
[0288] Minimize the risk of out-of-stock:
[0289] minf2(x)=Σ i w i ·E[max(0,D i (x)-x i ))] / D i (x)
[0290] Where: minf2(x) represents minimizing the risk of out-of-stock, w i The importance weight of product i, a real number in [0,1], and ∑w i =1, and its calculation method is: i =(profit margin of commodity i × sales volume of commodity i × strategic coefficient of commodity i) / ∑(profit margin × sales volume × strategic coefficient), profit margin and sales volume are obtained from the store sales management system, and strategic coefficient reflects the parameter of the strategic importance of commodities, which is used to adjust the weights of different commodities in replenishment decisions and is formulated by store operators according to business strategies;
[0291] S8.3 Setting constraints
[0292] Budget Constraint:
[0293] Σ i (c i ·x i )≤B
[0294] Among them, B is the total purchase budget, obtained from the store financial system;
[0295] Inventory capacity constraints:
[0296] Σ i (v i ·x i )≤V
[0297] Among them, v i is the unit volume of commodity i, obtained from the product specification database; V is the total inventory capacity, obtained from the store warehouse management system;
[0298] Service Level Constraints:
[0299] P(D i (x)≤x i )≥SL i ,
[0300] Where P(event) is a probability function that calculates the probability of the event in brackets occurring; SL i is the target service level for product i, a real number in [0,1] (usually between 0.9 and 0.99), set according to the store service strategy;
[0301] Product association constraints:
[0302] L ij ≤x i / x j ≤U ij ,
[0303] Among them, L ij , U ij is the lower and upper limits of the inventory ratio of goods i and j, a positive real number and L ij ij , obtained based on historical data analysis; R is a set of commodity pairs with strong associations, determined based on the results of the Eclat algorithm in step S4;
[0304] S8.4 Use the NSGA-II algorithm to solve the multi-objective optimization problem and obtain the Pareto optimal solution set;
[0305] S8.5 Select the most suitable solution from the Pareto solution set as the final replenishment strategy based on the current business focus;
[0306] S9. Periodic evaluation and adjustment: Perform a system evaluation every 7 days, compare the forecast results with the actual sales, and calculate the mean absolute percentage error (MAPE); when the MAPE exceeds the preset threshold, perform the following adjustments:
[0307] S9.1 performs grid search optimization on the K value of the K-means algorithm in S3;
[0308] S9.2 updates the support and confidence thresholds of the Eclat algorithm in S4, and regenerates the commodity association rule set;
[0309] S9.3 Make the following adjustments to the forecast model:
[0310] Update the parameters of the Prophet model in S5;
[0311] Retrain the Dirichlet regression model in S6;
[0312] Update or retrain the XGBoost model in S7;
[0313] S9.4 makes the following adjustments to the replenishment strategy optimization process in S8:
[0314] Update the commodity importance weight w according to the actual sales data i ;
[0315] Adjust constraints such as service levels and inventory limits based on actual inventory and sales data;
[0316] S9.5 re-executes steps S4 to S8 using the updated model, parameters, and constraints to obtain an updated replenishment strategy.
[0317] Combination Figure 2 In a second aspect, the present invention further provides a store commodity replenishment prediction device, comprising the following modules:
[0318] 1. Customer identification module: responsible for using facial recognition technology to anonymously identify customers entering the store and generate a unique identifier for each customer.
[0319] 2. Behavioral data collection module: responsible for using video surveillance technology to obtain customer behavior data in the store, including dwell time, shopping routes, areas of interest, and product interaction behaviors.
[0320] 3. Customer group classification module: Based on the collected behavioral data and stored historical consumption records, the K-means clustering algorithm is used to classify customers and assign feature labels to different categories.
[0321] 4. Product association analysis module: Use the Eclat algorithm to analyze the complementary and substitution relationships between products and generate a product association rule set.
[0322] 5. Customer flow prediction module: Prophet time series prediction model is used to combine historical customer flow data, time information, weather data and promotion information to predict the number of store customers within a specified time period.
[0323] 6. Customer group composition prediction module: Based on customer classification results, historical group composition data and current market trends, the Dirichlet regression model is used to predict the proportion distribution of each category of customers within a specified time period.
[0324] 7. Product sales forecasting module: Integrate customer flow forecasting results, group composition forecasting results and product association analysis results, and use the XGBoost model to predict the sales of each product. It includes features construction, model training, forecasting and result adjustment functions.
[0325] 8. Replenishment strategy optimization module: Apply the NSGA-II multi-objective optimization algorithm to maximize expected profits and minimize out-of-stock risks, while integrating commodity associations to formulate replenishment strategies. This includes objective function construction, demand function definition, constraint setting, and optimal solution selection.
[0326] 9. Evaluation and adjustment module: Regularly compare the forecast results with the actual sales situation, calculate the forecast error, and when the error exceeds the preset threshold, dynamically adjust the parameters of each module to improve the system's forecast accuracy.
[0327] 10. Data storage module: manages the storage and retrieval of various types of data, including customer profiles, behavioral data, product information, historical sales data, forecast results and optimization plans, etc.
[0328] 11. Communication interface module: exchange data and synchronize information with other systems (such as store pricing system, store financial system, supply chain management system, store sales management system).
[0329] 12. Security management module: ensures system data security and privacy protection, including data encryption, access control, audit logs and anonymization processing functions.
[0330] Combination Figure 3 In a third aspect, the present invention further provides a store commodity replenishment prediction device, characterized in that it includes:
[0331] Processing unit, storage unit, network communication unit, data acquisition unit, display output unit, input control unit, security protection unit and power management unit;
[0332] Wherein, the processing unit is configured as:
[0333] receiving customer identification information and behavior data from the data collection unit;
[0334] Based on the customer identification information and behavior data, perform customer classification operations;
[0335] Analyze product associations using a predetermined algorithm;
[0336] Predict the number of customers in future time periods based on historical data and external factors;
[0337] Predict customer group composition based on historical data and market trends;
[0338] Integrate customer quantity forecast, group composition forecast and product association analysis results to predict product sales;
[0339] Generate replenishment strategies based on predicted sales data and preset optimization goals;
[0340] Regularly evaluate forecast results and adjust relevant parameters when preset conditions are met.
[0341] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the steps of any one of the methods described in the first aspect.
[0342] Through the above-mentioned accompanying drawings, the present invention proposes a store commodity replenishment prediction method, device, equipment and storage medium based on data analysis, which optimizes the replenishment strategy by deeply analyzing the consumer's purchasing behavior, the complementary and substitutive relationship between commodities, and other key sales influencing factors. With the help of multi-objective optimization technology, this method can not only accurately adjust the replenishment plan to adapt to market changes, but also optimize inventory management and improve customer satisfaction, thereby significantly improving the operational efficiency and effectiveness of the retail business.
[0343] It should be noted that although some basic principles and conventional methods of load balancing and resource scheduling may not be elaborated in detail in this document, this is because these aspects follow the common practices and established standards in the field. For these common parts, we believe that they are well known in the technical field, so some descriptions are omitted.
[0344] Although this document shows the specific application of the present invention through specific embodiments, these embodiments are only for illustrative purposes and are not intended to limit the scope of protection of the present invention. The scope of protection of the present invention is not limited to the specific implementation methods described in the above embodiments. Equivalent deformations or modifications made by those skilled in the art based on the enlightenment of the present invention should be included in the scope of protection of the present invention as long as they do not depart from the spirit of the technical solution of the present invention.
Claims
1. A store product replenishment prediction method based on data analysis, It is characterized in that The following steps are involved: S1. Customer identification and profile: Use facial recognition technology to identify the facial information of customers entering the store, perform anonymous identification of customers based on facial information, and generate a unique identifier for each identified customer; S2. Customer behavior data collection: Use video surveillance technology to obtain video data of customers' activities in the store, and then extract customer behavior data, where the behavior data includes customers' stay time, shopping routes, areas of interest, and product interaction behaviors; S3. Customer group classification: Based on the behavior data collected in step S2 and the stored historical consumption records, use the K-means clustering algorithm to classify customers and assign feature labels to different categories; S4. Commodity association analysis: Apply the Eclat algorithm to analyze the complementary and substitution relationships between commodities and generate a commodity association rule set; S5. Customer flow forecasting: Using the Prophet time series forecasting model, combined with historical customer flow data, time information, weather data, and promotional activity information, the number of store customers within a specified time period is predicted; S6. Customer group composition prediction: Based on the customer classification results of step S3, historical group composition data and promotional activity information, the Dirichlet regression model is used to predict the proportion distribution of each category of customers within a specified time period. The model input includes time characteristics, historical group proportion data and related external factors, and the output is the proportion of each group within the predicted time period; S7. Product sales forecast: Integrate the customer flow forecast results of step S5 and the group composition forecast results of step S6, and explicitly apply the product association analysis results of step S4, and use the XGBoost model to predict the sales of each product in the specified time period; S8. Replenishment strategy optimization: Apply the NSGA-II multi-objective optimization algorithm to maximize expected profit and minimize out-of-stock risk, while explicitly integrating the commodity association relationship obtained in step S4 to formulate a replenishment strategy; S9. Periodic evaluation and adjustment: Perform a system evaluation every 7 days, compare the forecast results with the actual sales situation, and calculate the mean absolute percentage error (MAPE); when the MAPE exceeds the preset threshold, dynamically adjust the parameters of each module.
2. The method according to claim 1, It is characterized in that The replenishment strategy optimization in step S8 includes: a) Define the demand function D i (x) represents the demand function of commodity i, taking into account the commodity association relationship, and is defined as: in: Respectively represent the sales forecast of products i and j, obtained from the prediction results of the XGBoost model in step S7; x i 、x j Represent the replenishment (order) quantity of goods i and j respectively; min(a,b) is the minimum function, which returns the smaller value of a and b; max(a,b) is the maximum value function, which returns the larger value of a and b; α ij , β ij They are the complementary effect coefficient of commodity j on commodity i and the substitution effect coefficient of commodity j on commodity i, respectively. The calculation method is: a ij =γ·(N ij ·N) / (N i ·N j ) b ij =δ·(N i -N ij )·N / N i ·(NN j ) in: γ and δ represent the adjustment parameters of complementarity and substitution effects, respectively, which are real numbers in [0,1] and are set through historical data analysis and expert experience; N represents the total number of transactions, which is calculated from store sales data; N i Represents the number of transactions containing product i, a positive integer and N i ≤N, obtained from store sales data; N j Represents the number of transactions involving product j, a positive integer and N j ≤N, obtained from store sales data; N ij Represents the number of transactions that include both products i and j, a positive integer and N ij ≤min(N i ,N j ), which is calculated from store sales data; b) Constructing multi-objective optimization function Maximize expected profit: Where: maxf 1 (x) represents the maximization of expected profit; p i represents the unit price of the product, which is obtained from the store's pricing system; E[·]: expected value operator, which calculates the average value of the random variable; c i represents the unit purchase cost of commodity i, obtained from the store’s supply chain management system; x i represents the replenishment (order) quantity of commodity i; h i Represents the unit inventory holding cost of commodity i, calculated as: h i =(annual storage fee rate + capital cost rate)×c i ÷365); Minimize the risk of out-of-stock: Where: minf 2 (x) represents minimizing the risk of out-of-stock, w i The importance weight of product i, a real number in [0,1], and ∑w i =1, and its calculation method is: i =(profit margin of commodity i × sales volume of commodity i × strategic coefficient of commodity i) / ∑(profit margin × sales volume × strategic coefficient), profit margin and sales volume are obtained from the store sales management system, and strategic coefficient reflects the parameter of the strategic importance of commodities, which is used to adjust the weights of different commodities in replenishment decisions and is formulated by store operators according to business strategies; c) Set constraints Budget Constraint: ∑ i (c i ·x i )≤B Among them, B is the total purchase budget, obtained from the store financial system; Inventory capacity constraints: ∑ i (v i ·x i )≤V Among them, v i is the unit volume of commodity i, obtained from the product specification database; V is the total inventory capacity, obtained from the store warehouse management system; Service Level Constraints: Where P(event) is a probability function that calculates the probability of the event in brackets occurring; SL i is the target service level for product i, a real number in [0,1] (usually between 0.9 and 0.99), set according to the store service strategy; Product association constraints: Among them, L ij , U ij is the lower and upper limits of the inventory ratio of goods i and j, a positive real number and L ij ij , obtained based on historical data analysis; R is a set of commodity pairs with strong correlation, determined based on the result of the Eclat algorithm in step S4; d) Use the NSGA-II algorithm to solve the multi-objective optimization problem and obtain the Pareto optimal solution set; e) Based on the current business focus, select the most suitable solution from the Pareto solution set as the final replenishment strategy.
3. The method according to claim 1 or 2, It is characterized in that The dynamic adjustment of the parameters of each module in step S9 includes: a) Perform grid search optimization on the K value of the K-means algorithm in S3; b) Update the support and confidence thresholds of the Eclat algorithm in S4 and regenerate the product association rule set; c) Adjust the prediction model as follows: Update the parameters of the Prophet model in S5; Retrain the Dirichlet regression model in S6; Update or retrain the XGBoost model in S7; d) Make the following adjustments to the replenishment strategy optimization process in S8: Update the commodity importance weight w according to the actual sales data i ; Adjust constraints such as service levels and inventory limits based on actual inventory and sales data; e) Re-execute steps S4 to S8 using the updated model, parameters, and constraints to obtain an updated replenishment strategy.
4. A store commodity replenishment prediction device based on data analysis, It is characterized in that include: A customer identification module, used to perform step S1 of the method as claimed in claim 1; A behavior data collection module, used to execute step S2 of the method according to claim 1; A customer group classification module, used to perform step S3 of the method according to claim 1; A commodity association analysis module, used to execute step S4 of the method according to claim 1; A customer flow prediction module, used to execute step S5 of the method according to claim 1; A customer group composition prediction module, used to execute step S6 of the method according to claim 1; A commodity sales prediction module, used to execute step S7 of the method according to claim 1; A replenishment strategy optimization module, used to execute step S8 of the method according to claim 1; The evaluation and adjustment module is used to execute step S9 of the method according to claim 1.
5. The device according to claim 4, It is characterized in that Also includes: Data storage module, used to manage the storage and retrieval of various types of data; Communication interface module, used for data exchange and information synchronization with other systems; Security management module, used to ensure system data security and privacy protection.
6. A store merchandise replenishment prediction device, It is characterized in that include: Processing unit, storage unit, network communication unit, data acquisition unit, display output unit, input control unit, security protection unit and power management unit; Wherein, the processing unit is configured as: receiving customer identification information and behavior data from the data collection unit; Based on the customer identification information and behavior data, perform customer classification operations; Analyze product associations using a predetermined algorithm; Predict the number of customers in future time periods based on historical data and external factors; Predict customer group composition based on historical data and market trends; Integrate customer quantity forecast, group composition forecast and product association analysis results to predict product sales; Generate replenishment strategies based on predicted sales data and preset optimization goals; Regularly evaluate forecast results and adjust relevant parameters when preset conditions are met; The security protection unit is used to ensure data security and privacy protection.
7. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by the processor, the method for predicting store merchandise replenishment based on data analysis as claimed in claim 1 is implemented.
Citation Information
Patent Citations
Multi-factor sales prediction system for fast-consumer goods
CN116843374A
Multi-commodity management decision method and system based on SARIMA and genetic algorithm
CN117974190A
Method, device and system for predicting flow and sales volume of live broadcasting room and storage medium
CN118115198A
Systems and methods using inventory data to measure and predict availability of products and optimize assortment
US20230081051A1
Cited By
Vending machine automatic inventory management method based on image recognition
CN119539690A
Customer demand storage and elimination optimization management system adaptive to hotel operation management
CN120069753A
Jewelry inventory management method and system combined with retail data analysis
CN120125151A
Unmanned store customer behavior detection system based on machine vision and cloud computing
CN120599706A
