Supply chain demand prediction method based on artificial intelligence
By collecting and analyzing consumer multimodal behavior data and population structure characteristics, a supply chain demand forecasting model based on deep learning and ensemble learning was constructed, which solved the problem of the population proportion not being considered in detail, and achieved more accurate regional demand forecasting and inventory management.
Patent Information
- Application Number
- CN202511158205.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-11-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing supply chain demand forecasting methods fail to take into account population proportions in detail, leading to inaccurate regional demand forecasts, misjudgments of product category demand, increased inventory costs, and decreased consumer satisfaction. Furthermore, they fail to effectively address the impacts of population aging and declining birth rates.
By collecting multimodal behavioral data of consumers and the characteristics of the surrounding population structure, a demand prediction model is constructed using deep learning algorithms and ensemble learning models. Combined with federated learning client and operator data, comprehensive population structure data is formed, and features are extracted and weighted to achieve real-time demand prediction.
It significantly improves the accuracy of regional demand forecasting in the supply chain, reduces forecasting errors, enables rapid response to factors such as holidays and sudden weather changes, reduces the risk of stockouts and overstocking, and improves the efficiency of inventory management and customer satisfaction.
Smart Images

Figure CN121032541A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of supply chain demand prediction of artificial intelligence, and particularly relates to a supply chain demand prediction method based on artificial intelligence. BACKGROUND
[0002] In China application No. CN202310340116.9, a supply chain demand prediction method is provided. The application obtains sample data, pre-processes the sample data, extracts features from information data related to commodity demand, and constructs a feature set. The training data set is fitted with different features to train multiple prediction models. The trained prediction models are tested using a test data set to correct the prediction model parameters. The related prediction model is matched according to the current features and input into the prediction model to obtain the supply chain demand prediction value.
[0003] Although in the field of data analysis, the application proposes a supply chain demand prediction method that considers the data features of the extracted information to effectively improve the accuracy of supply chain demand prediction, it fails to consider the population proportion in more detail. In the current situation of accelerated population aging and reduced fertility rate, population proportion is one of the important factors affecting supply chain proportion. Traditional supply chain demand prediction only targets online browsing behavior, social media interaction, purchase history, and evaluation content, and fails to consider the population proportion in detail, resulting in inaccurate regional demand prediction, misjudgment of product category demand, increased inventory cost and capital occupation, decreased consumer satisfaction, and ineffective supply chain risk warning. Therefore, there is an urgent need for a supply chain demand prediction method based on artificial intelligence, which collects multi-modal behavior data of consumers, introduces surrounding population structure features, pre-processes and extracts features from the collected multi-modal behavior data and surrounding population structure features, uses deep learning algorithms to identify consumer shopping behavior and trends, and then combines an ensemble learning model to analyze market demand changes in real time and predict future supply chain demand. SUMMARY
[0004] The application provides a supply chain demand prediction method based on artificial intelligence, which collects multi-modal behavior data of consumers, introduces surrounding population structure features, pre-processes and extracts features from the collected multi-modal behavior data and surrounding population structure features, uses deep learning algorithms to identify consumer shopping behavior and trends, and then combines an ensemble learning model to analyze market demand changes in real time and predict future supply chain demand.
[0005] The technical solution adopted by the application to solve the above technical problems is as follows: a supply chain demand prediction method based on artificial intelligence, comprising:
[0006] The multi-modal behavior data and demographic data of consumers are collected by deploying a federated learning client locally; the scale of permanent population and the number of floating population are confirmed by cooperating with operators to form comprehensive population structure data;
[0007] The collected multi-modal behavior data of consumers and comprehensive population structure data are preprocessed; feature extraction is performed on the preprocessed data;
[0008] The data after feature extraction is analyzed by using a deep learning algorithm; a subnetwork is constructed based on the multi-modal behavior features and population structure features of consumers after feature extraction; an attention fusion formula is constructed to weight and combine the subnetwork, and the weighted and combined multi-modal behavior of consumers is input into a time sequence encoder according to time steps to obtain a time sequence hidden state for prediction;
[0009] A demand prediction model is constructed based on the time sequence hidden state: the time sequence hidden state is mapped; a supervised loss function is constructed; a total loss function is constructed based on the supervised loss function; the parameter set of the demand prediction model is updated by using an adaptive first-order algorithm; the output of the basic predictor is weighted and fused, and the population structure is differentially weighted.
[0010] As a preferred embodiment, the specific steps of collecting the multi-modal behavior data and demographic data of consumers by deploying a federated learning client locally are as follows:
[0011] The multi-modal behavior data of consumers are collected by the deployed federated learning client, and the collected multi-modal behavior data of consumers are encrypted and desensitized; the latest demographic data of the region is pulled from the government or enterprise internal database in a special data integration process in the local federated learning client.
[0012] As a preferred embodiment, the specific steps of confirming the scale of permanent population and the number of floating population by cooperating with operators are as follows:
[0013] By cooperating with operators, the desensitized and summarized mobile communication signaling data are obtained to confirm the scale of permanent population and the number of floating population; the latest demographic data and the scale of permanent population and the number of floating population confirmed by the operators are fused in the local federated learning client to form comprehensive population structure data.
[0014] As a preferred embodiment, the specific steps of feature extraction on the preprocessed data are as follows:
[0015] The feature extraction of the multi-modal behavior data of the consumer includes: extracting the consumption tendency and focus of the consumer by applying natural language processing to the behavior, likes and shares, and evaluation text of the consumer on the social platform; extracting the visual preference of the consumer by applying image recognition technology to the evaluation pictures of the consumer, identifying the visual features and brand identification of the pictures; dividing the online browsing behavior of the consumer according to the number of continuous clicks, page dwell time and sliding time interval, calculating the attention intensity of the consumer to various categories based on the frequency and trend of the access of the consumer; mapping the keywords searched by the consumer to three predefined categories of purchase intention, information query and brand comparison by an intent classifier, and analyzing similar intent clusters of the three predefined categories by using a next vector embedding and clustering algorithm; extracting the historical purchase behavior, historical purchase frequency and historical consumption amount of the consumer by a value evaluation and hierarchical analysis method based on the historical transaction behavior of the customer, which is not limited to online, but also includes offline entity store consumption data and product purchase frequency of the consumer.
[0016] As a preferred embodiment, the specific steps of the feature extraction of the preprocessed data further include:
[0017] The feature extraction of the comprehensive population structure data includes: eliminating the dimensional difference by normalizing the population structure data; confirming the static population structure features by encoding the regional static population structure; confirming the change rate of the floating population by holiday backflow data; confirming the activity of the regional permanent population by the active days of the mobile terminal in the region; confirming the features of the dynamic population structure by obtaining the population growth trend from the natural growth rate of two adjacent statistical periods; splicing the static population structure features and the features of the dynamic population structure according to the geographical coding to obtain a preliminary high-dimensional vector; reducing the dimension of the obtained high-dimensional vector by principal component analysis to remove redundancy and extract the most representative population structure principal components; mapping the behavior features of the consumer to the same space by outputting the population structure principal components after dimension reduction to the attention fusion layer; and automatically learning the importance of the population structure features in different regions by using attention weights, thereby completing the joint feature mapping of the consumer behavior, the positioning region and the population structure.
[0018] As a preferred embodiment, the specific steps of the consumer multi-modal behavior feature and population structure feature construction subnetwork based on feature extraction are:
[0019] The subnetwork is constructed based on the extracted consumer multi-modal behavior features and population structure features, and the subnetwork includes: constructing a text subnetwork C txt , an image subnetwork C Bph , and a behavior subnetwork C behaviorand the population structure sub-network C pop ; by setting an output alignment module in each sub-network, the output of each sub-network is mapped to the system hidden space dimension through projection, and normalization processing and time sequence alignment operation are performed; by setting an attention-based fusion layer, the constructed sub-networks are weighted combined, and the attention fusion formula is:
[0020]
[0021] A f is the attention weight of the modal m, f is the modal index, A is the attention weight, exp is the exponential function and the denominator , g is the summation index, B is the query vector representing the current task, B · is the transpose of the query vector B, tanh is the hyperbolic tangent activation function, D f represents a learnable transformation matrix that maps the fth modal feature to the scoring space, D is a learnable projection matrix of the fth modal, C (f) represents the feature vector obtained by the fth modal through the sub-network, C is the same representation vector after multi-modal fusion, E f represents a learnable matrix that projects the fth modal value, E is a learnable matrix that projects.
[0022] As a preferred embodiment, the specific steps of inputting the weighted combined consumer multi-modal behavior to the time sequence encoder according to time steps are as follows:
[0023] The formula of the time sequence hidden state is:
[0024]
[0025] H i represents the time sequence hidden state at time i, i represents the time index, H represents the time sequence hidden state, and φ is a nonlinear activation function, is the number of parallel convolution branches, and the summation subscript range is is the index of the th convolution branch, is the dilation rate of the th convolution branch, is the convolution kernel of the th convolution branch, J is the value of the convolution kernel, C is the same representation vector after multi-modal fusion, represents the bias vector of the th convolution branch, and k is the bias vector.
[0026] As a preferred embodiment, the specific steps of mapping the time sequence hidden state are as follows:
[0027] The mapping formula is:
[0028]
[0029] is a prediction value of the demand prediction result at time i based on existing information, and the future is the δth time step, is a prediction result, Q δ is a mapping function, H i represents a time sequence hidden state at time i, i represents a time index, H is obtained by a time sequence hidden state, phi is a nonlinear activation function, delta is a prediction step, and lambda is a prediction step set.
[0030] As a preferred embodiment, the specific steps of constructing the supervised loss function are:
[0031] The formula of the supervised loss function is:
[0032]
[0033] M AIM is a loss function value, |beta| is the total amount of samples, is summed at the beginning of time i, is summed for the prediction step set H, y i+δ is a true label representing the actual demand at time chi+delta, y is the actual actual demand, is a demand prediction result, is a prediction result, delta is a prediction step representing the time span of the current time, lambda is a prediction step set, and i represents a time index.
[0034] As a preferred embodiment, the specific steps of constructing the supervised loss function are:
[0035] The collected consumer multi-modal behavior data and population data structure are independently trained by two or more base predictors to obtain candidate prediction results of a preset future step; the population structure features and scene features are obtained by full connection and normalization through a gate control network to obtain a fusion weight vector; the fusion weight vector is constrained by using softmax, so that the fusion weight vector is non-negative and the sum is one; finally, the results of the base predictor are linearly weighted according to the fusion weight vector.
[0036] The beneficial effects of the present application are:
[0037] 1. By combining government statistics and enterprise internal population data, and jointly confirming static and dynamic population structures, the joint characteristics of consumption behavior, positioning area and population structure characteristics are mapped, which significantly improves the demand prediction of supply chain regionalization.
[0038] 2. By using inflation convolution type time series encoding, long-term demand, seasonality and short-term fluctuations of the supply chain can be predicted, thereby reducing prediction error.
[0039] 3. By online fine-tuning, the flow of holiday crowds and weather mutations and other factors can be quickly responded to, thereby reducing the risk of out-of-stock and congestion.
[0040] Legend
[0041] Figure 1 It is a supply chain demand prediction method flowchart based on artificial intelligence. DETAILED DESCRIPTION
[0042] In order to make the technical means, creative features, purposes and effects realized by the present application easy to understand, the following specific embodiments are further described, but the following embodiments are only preferred embodiments of the present application, not all. Based on the embodiments in the embodiments, other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application. Unless otherwise specified, the experimental methods in the following examples are all conventional methods, and the materials, reagents, etc. used in the following examples can be obtained from commercial channels unless otherwise specified.
[0043] Example 1 as Figure 1 A supply chain demand prediction method flowchart based on artificial intelligence, comprising: collecting multi-modal behavior data of consumers and introducing surrounding population structure data; feature extraction is performed on the collected data and surrounding population structure data; deep learning algorithm is used to analyze the data after feature extraction; demand prediction model is constructed according to the analysis result; the following is the specific implementation steps:
[0044] Step 1, collect multi-modal behavior data of consumers and introduce surrounding population structure data;
[0045] Step 2, feature extraction is performed on the collected data and surrounding population structure data;
[0046] Step 3, deep learning algorithm is used to analyze the data after feature extraction;
[0047] Step 4, demand prediction model is constructed according to the analysis result;
[0048] Specifically, the local deployment of the federated learning client securely trains and exchanges the parameters of the global model by adopting a federated protocol, thereby protecting the privacy of the consumer without uploading the multi-modal behavior data of the consumer; the multi-modal behavior data of the consumer is collected by the deployed federated learning client, and the collected multi-modal behavior data of the consumer is subjected to data encryption and desensitization processing; the latest demographic data of the region is pulled from the government or enterprise internal database in a timely manner through a special data integration process in the local federated learning client; through cooperation with the operator, desensitized and aggregated mobile communication signaling data is obtained to confirm the size of the permanent population and the number of floating population; the latest demographic data obtained and the size of the permanent population and the number of floating population confirmed by the operator are fused in the local federated learning client, thereby forming comprehensive population structure data; the comprehensive population structure obtained is fused to the global model in a federated aggregation manner; under the premise of ensuring that any personal identity information is not disclosed, the global model of the local federated learning client is sent to the central server for secure aggregation to form a joint feature mapping of consumer behavior, positioning area and population structure characteristics.
[0049] Specifically, the federated learning client is a local lightweight program deployed by training a local global model copy and uploading parameter updates to participate in the aggregation of the global model, thereby achieving the protection of consumer privacy without sharing the consumer's multi-modal behavior data; the global model copy represents that after the central server completes the aggregation of the federated client parameters, the aggregated global model parameters are distributed to each local client, facilitating the subsequent optimization of the global copy model; the federated protocol is a distributed learning framework that cooperatively improves the performance of the global model without sharing the consumer's multi-modal behavior data; the consumer's multi-modal behavior data includes: online browsing records of shopping software, social media interactions, search keywords, purchase history, evaluation text and pictures, etc.; data encryption means that by applying encryption algorithms to the consumer's multi-modal behavior data, valuable data cannot be decrypted and viewed even if the disk is accessed illegally or intercepted during network transmission; data desensitization means that the personal identity information and direct identification features are blurred without affecting the effect of the global model; the data integration process means that the latest population statistics data of the region is pulled from the government or enterprise internal database at regular intervals, and the pulled data is cleaned, which means that the latest population statistics data is denoised, errors are corrected, missing values are filled, duplicate records are deleted, and formats are unified; the population structure data includes: the proportion of population in each age group, the proportion of gender, the distribution of family house type, population density, local birth rate and aging rate; the global model means that the federated server aggregates the model parameter updates obtained by training each local federated learning client by proportion weighting; federated aggregation aggregates local global model parameters through distributed cooperation to achieve global model training while protecting data privacy; secure aggregation at the central server is achieved by receiving the encrypted model parameter increments of the local federated client, using the weighted average algorithm for aggregation, and generating a new global model; the weighted average algorithm means that the local federated client input values are weighted and summed according to their importance; mobile communication signaling data means the metadata generated by the mobile terminal and the base station in the process of maintaining communication and switching, including signaling messages such as location update and call establishment and release, thereby reflecting the flow trend of the real-time distribution of mobile users in the region.
[0050] Specifically, the collected consumer multi-modal behavior data is pre-processed by cleaning, denoising, removing outliers and synchronizing timestamps of the consumer multi-modal behavior data and the population structure; feature extraction is performed on the pre-processed data, and the specific steps are as follows: the feature extraction of the multi-modal behavior data of the consumer includes: the consumer's consumption tendency and focus are extracted by applying natural language processing (NLP) to the comments, likes and sharing behaviors, and evaluation texts of the consumer on the social platform; the visual preference of the consumer is extracted by applying image recognition technology to the evaluation pictures of the consumer to identify the visual features and brand identification of the pictures; the online browsing behavior of the consumer is divided according to the number of continuous clicks, page dwell time and sliding time interval, and the attention intensity of the consumer to various categories is calculated based on the access frequency and trend of the consumer; the keywords searched by the consumer are mapped to three predefined categories of purchase intention, information query and brand comparison by an intent classifier, and the three predefined categories are analyzed for similar intent clusters by using vector embedding and clustering algorithms; the historical purchase behavior, historical purchase frequency and historical consumption amount of the consumer are extracted by a Recency Frequency Monetary (RFM) value evaluation and hierarchical analysis method based on the historical transaction behavior of the customer, which is not limited to online, but also includes offline entity store consumption data and product purchase frequency; the feature extraction of the comprehensive population structure data includes: the dimension difference is eliminated by normalizing the population structure data; the static population structure is encoded to confirm the static population structure features, including age stratification vector, resident population activity and population growth trend; the change rate of floating population is confirmed by holiday backflow data; the activity of regional resident population is confirmed by the number of active days in the area of the mobile phone terminal; the growth trend of the population growth trend is obtained by using the natural growth rate of two adjacent statistical periods, thereby confirming the features of the dynamic population structure; the static population structure features and the features of the dynamic population structure are spliced according to the region code to obtain a preliminary high-dimensional vector; the high-dimensional vector is reduced by principal component analysis to remove redundancy and extract the most representative population structure principal components; the population structure principal components after dimension reduction are output to the attention fusion layer to map the behavior features of the consumer to the same space; the importance of the population structure features in different regions is automatically learned by using attention weight, thereby completing the joint feature mapping of consumer behavior, positioning area and population structure.
[0051] Specifically, denoising is to make the signal smoother and closer to the true value by reducing the impact of random errors on the data; outlier rejection means identifying and rejecting samples that are significantly inconsistent with the overall distribution; natural language processing converts human unstructured text into machine computable structured information, so that the system can extract the gist and make decisions that match it; image recognition technology extracts features from images or videos through computer vision and deep learning algorithms, and converts pixel data into structured semantic information, so as to analyze the visual preferences of consumers; consumer visual preferences represent the selection tendency of consumers on visual elements such as color, style, layout and pattern; the intent classifier maps the consumer's input such as search words, comments, conversations, etc. to the preset intent label model, and the intent label model automatically maps the consumer's text or voice input to the preset intent label, such as purchase, consultation, comparison, price sensitivity, return and exchange, after-sales complaint, etc. The model outputs the probability of each intent label; the next vector embedding is used to map semantically similar expressions to a comparable numerical space, and similar semantics are automatically merged into the same category in the numerical space through clustering algorithm to form sub-intent clusters, further improving the accuracy of recognition and decision-making; RFM is based on the consumer's historical purchase behavior, historical purchase frequency and historical consumption amount, and realizes precise marketing, customer management and replenishment optimization of the supply chain by quantifying and stratifying consumers; stratify consumers according to consumption amount; normalization is to eliminate dimension so as to improve the comparability of population characteristics in different regions and time periods, thereby avoiding the dominance of large numerical features in the model; regional static population structure represents the number of permanent residents in the region, which is stable; regional dynamic population structure represents the size, age layer and gender ratio of permanent and floating population in different time periods in the region; principal component analysis projects the high-dimensional vector spliced by linear transformation to a few orthogonal principal components with maximum variance, thereby realizing dimension reduction and facilitating visualization; the attention fusion layer is a network layer for allocating dynamic weights and weighted synthesis; the attention weight is a non-negative value calculated by the attention mechanism, and is normalized by softmax to obtain the coefficient; the attention mechanism is a calculation method for adaptively allocating weights to different inputs and suppressing secondary information according to the previous context; softmax means mapping any real number score to a non-negative probability distribution whose sum is 1.
[0052] Specifically, the data after feature extraction is analyzed by using a deep learning algorithm, and the specific steps are: based on the consumer multi-modal behavior features and population structure features extracted in step two, a subnetwork is constructed, which includes: constructing a text subnetwork C txt , an image subnetwork C Bph , a behavior subnetwork C behavior and a population structure subnetwork C popBy setting an output alignment module in each subnetwork, the outputs of each subnetwork are projected into the system hidden space dimension and normalized and time alignment operations are performed, so that the subnetworks have weighted computability and stability; a fusion layer based on attention is set to weight and combine the constructed subnetworks, and the attention fusion formula is:
[0053]
[0054] A f is the attention weight of the modal m, f is the modal index, the modal index is a unified identifier set for text, image, behavior, population, etc., A is the attention weight representing the normalized importance coefficient allocated by the demand prediction model to each input element, the demand prediction model learns the time sequence rule based on historical sales and multi-source features such as price, promotion, behavior, population and seasonal factors, thereby predicting the demand point value of each period in the future, thereby supporting replenishment and scheduling decisions, exp is the The normalization operation is performed on all modal scores, which means that any real number is mapped to a positive number, ensuring that the sum of all modal weights is 1, g is the summation index, indicating that all modes are traversed in the normalization, B is the query vector representing the current task, B · is the transpose of the query vector B, tanh is the hyperbolic tangent activation function, which compresses real inputs smoothly to (-1, 1) and is centered at 0, thereby providing a differentiable nonlinear function, a differentiable linear function represents a local approximation of a nonlinear relationship as a linear mapping, D f represents a learnable transformation matrix that maps the fth modal feature to the scoring space, D is a learnable projection matrix of the fth modal, the learnable projection matrix represents a linear mapping that updates the weight through gradient during training, which projects the feature to a representation space that is more discriminative for the task, C (f) represents the feature vector obtained by the fth modal through the subnetwork, C is the same representation vector after multi-modal fusion, E f represents a learnable matrix for projecting the fth modal value, E is a learnable matrix for projection, which transforms different modal features into a common fusion space to rescale the size.
[0055] By inputting the fused consumer multi-modal behavior according to the time step into the time sequence encoder, the time sequence hidden state for prediction is obtained, the time sequence encoding is performed using the dilated convolution (Temporal Convolutional Network, TCN), and the formula of the time sequence hidden state is:
[0056]
[0057] H idenotes the temporal hidden state at time i, i represents the time index, H is to obtain the temporal hidden state, and φ is a nonlinear activation function. By introducing nonlinearity between layers, the TCN breaks through the linear mapping restriction, is the number of parallel convolution branches, the convolution branch represents a sub-path for extracting local spatio-temporal features by a convolution kernel, and the summation subscript range is is the index of the th convolution branch, is the dilation rate of the th convolution branch, the dilation rate is used to control the interval of the sampling points of the convolution kernel, is the convolution kernel of the th convolution branch, J is the value of the convolution kernel, and C is the same representation vector after multi-modal fusion. denotes the bias vector of the th convolution branch, k is the bias vector, and the bias vector represents a learnable constant term after linear transformation.
[0058] Specifically, the deep learning algorithm outputs a high-order representation that can be used for demand prediction by sending the extracted multi-modal features into deep learning for fusion and temporal modeling, thereby further improving the accuracy and robustness. Fusion aligns the features of different modalities, such as text, image, behavior, and population, in the same time window and dimension. Temporal modeling is a process of learning the dependence, trend, and periodicity of data over time. The text subnetwork converts consumer reviews or social text into semantic vectors to extract consumer sentiment and attribute opinions. The image subnetwork extracts visual features such as style, brand identification, and usage scenarios from consumer reviews or product images. The behavior subnetwork encodes consumer browsing, searching, staying, and purchasing sequences to depict the intention strength of consumers shopping. The population structure subnetwork structures the regional population features and divides them according to age proportion, aging, and flow, thereby providing scene constraints. Scene constraints limit the prediction model weights and output by taking specific environments, such as geographical regions, population, time periods, and resources, as boundary conditions and priori. The alignment template unifies different sources of data into a standardized collection on the same field, thereby enabling direct comparison, fusion, and training of different sources of data in the same coordinate system.
[0059] The hidden space dimension is the vector length used in the latent representation of the demand forecasting model; the latent representation demand forecasting model maps the multi-modal behavior data and demographic data of consumers into a compressed representation in an abstract vector space; the time step makes the time series encoder capture behavior changes at an appropriate temporal resolution by regulating the pace of data sampling and model updating, making the prediction more forward-looking; the time series encoder provides useful temporal representations for the subsequent supervised loss function by compressing the fused features organized by the time step into hidden states that can depict sequence dependencies and trends; the sequence representation is a set of observations arranged in chronological order, such as a consumer's browsing and search records every five minutes; the prediction-oriented time series hidden state representation is a compressed vector extracted by the time series encoder from the historical sequence at the current time, which compresses the trend change information most useful for future demand forecasting; the time series encoding uses TCN to capture long and short-term dependencies in parallel by inserting holes between the sampling points of the convolution kernel, thereby improving multi-step prediction results while maintaining computational complexity and temporal resolution; the inserted holes leave out spaces that do not participate in calculation by leaving fixed intervals between the sampling points of the convolution kernel, so that the convolution kernel covers a longer time; the long and short-term dependency relationship represents the seasonal and periodic trend of demand; the convolution kernel represents a small learnable weight window that slides with the input, extracting periodic or seasonal trend features by weighted aggregation of local neighborhoods.
[0060] Specifically, after obtaining the prediction-oriented time series hidden state, a demand forecasting model is constructed based on the time series hidden state, and the pre-construction step is: by mapping the time series hidden state, the future trend and inflection point are identified in advance, thereby reducing the shortage and overstock of the supply chain end, improving the turnover level of the service, and the mapping formula is:
[0061]
[0062] is the demand forecasting result, is the prediction value of the future δth time step based on existing information at time i, is the prediction result, Qδ is the mapping function, and the time series hidden state H i of the time series encoder is mapped into a prediction value with a step length of δ, H i represents the time series hidden state at time i, i represents the time index, H is obtained by the time series encoder, φ is a nonlinear activation function, δ is the prediction step, and λ is the prediction step set;
[0063] After mapping the prediction-oriented time series hidden state, in order to reduce the prediction error, the demand forecasting model and the real sales of the supply chain are converted into an optimizable signal, thereby reducing the demand forecasting bias, and the formula of the supervised loss function is:
[0064]
[0065] M AIM is the loss function value, |β| is the total number of samples, is the sum over time starting point i, by traversing all historical time points available for intervention prediction, is the sum over the prediction step set H, y i+δ is the actual demand represented by the true label at χ+δ time point, y is the actual actual demand, is the demand prediction result, is the prediction result, at time point i, based on existing information, the prediction value of the future δth time step, δ is the prediction step representing the time span of the current time point, the forward-looking range of the demand prediction model, λ is the prediction step set, i represents the time index;
[0066] After constructing the supervised loss function, the total loss function is output, and the formula of the total loss function is:
[0067]
[0068] M all is the total loss function, M AIM is the loss function value, Θ is the parameter set of the demand prediction model, is the L2 regularization term used to constrain the parameters to prevent the parameters from being too large, thereby reducing the fitting and improving the generalization, η is the regularization coefficient used to control the parameters of the L2 regularization term, the larger η is, the smoother the model is, but it may lack fitting, and too small has insufficient effect;
[0069] By constructing the total loss function, the prediction error, risk and business cost are unified into an optimization target, thereby further improving the accuracy of demand prediction, thereby reducing the comprehensive cost of the supply chain end.
[0070] Specifically, after completing the construction of the total loss function, the adaptive first-order algorithm Adam is used to update the parameter set Θ of the demand prediction model; after completing the parameter optimization update, the outputs of the base predictors are weighted and fused, and the population structure is combined for differential weighting, the specific steps are: through two or more base predictors, the collected consumer multi-modal behavior data and population data structure are independently trained to obtain the candidate prediction results of the preset future step; through the gate control network, the population structure characteristics and the scene characteristics are connected and normalized to obtain the fusion weight vector; the fusion weight vector is constrained by using softmax, so that the fusion weight vector is non-negative and the sum is one; finally, the results of the base predictor are linearly weighted according to the fusion weight vector; by applying sparse regularization to the gate control network, the weight is avoided to be evenly distributed, and the inaccuracy of the model is calibrated; an end-to-end joint training method is used for training, the bottom layer representation is shared, and the parameters of the base predictor and the gate network are jointly optimized; and a rollback strategy is set, when the population of the sample area is insufficient or the population characteristics are missing, the gate network returns to the last stable version; the trained prediction model is encapsulated and deployed to the federal client; in the scenario of the federal client, only the model parameters are returned for updating, and the server side is aggregated to a new global model, the global model is fine-tuned online every week, thereby realizing the demand for privacy compliance and regional personalized prediction, accurately predicting the future supply chain demand end in different regions according to different population structures, and generating personalized decision suggestions for different regions.
[0071] Specifically, by mapping the time sequence hidden state, the hidden state generated by the time sequence encoder is converted into demand prediction output of each period in the future through the mapping layer; the regularization term improves the generalization and training stability by penalizing excessively large parameters in the loss function; the adaptive first-order algorithm Adam is used to estimate the demand prediction model parameter set to adaptively adjust the learning rate of each parameter, thereby accelerating convergence and improving training stability, reducing parameter tuning difficulty; the demand prediction model parameter set mainly includes: the weights and biases of each subnetwork, the attention projection matrix, the convolution of the time sequence encoder, and the total loss function; the base predictor represents a single model trained independently in the integrated framework, such as TCN and Long Short-Term Memory (LSTM); LSTM is an improved recurrent neural network; the candidate prediction result of the preset future step represents the future demand value given by the base predictor through a preset prediction step set; the preset prediction step set is, for example: +1, +6, +24 hours; the gate control network receives context features and outputs normalized weights for weighting multiple base predictors, thereby realizing scene-adaptive fusion and routing of LSTM; the context features are used to assist the demand prediction model in understanding and predicting according to the current scene state information; the population structure features and scene features are linearly projected and dimensionally mixed through full connection and normalization representation, thereby extracting more task-specific representations for subsequent stable work of the gate control network; the heterogeneous population structure features include age distribution, aging rate, and return index; the scene features include holidays, weather, and price promotions; the fusion weight vector is a set of normalized coefficients output by the gate control network, used to weight and combine the outputs of multiple base predictors; the results of the base predictors are linearly weighted according to the fusion weight vector, thereby reducing variance and improving the accuracy and robustness of overall prediction; the end-to-end joint training method realizes distributed joint learning while protecting privacy; distributed joint learning means protecting data privacy and integrating global knowledge, thereby reducing single-point computing load; single-point computing load is achieved through federated aggregation, thereby avoiding performance bottlenecks and improving overall system efficiency; sparse regularization means using the end-to-end joint training method to jointly optimize the entire flow from input to output as a differentiable whole, thereby avoiding intermediate error accumulation and reducing manual rule intervention; shared bottom-level representation reduces parameters and repeated learning by reusing the same feature backbone for multiple tasks; the feature backbone represents a shared backbone network that extracts general representations from raw input; the rollback strategy automatically switches to the last stable version in the case of insufficient samples or online index degradation, thereby ensuring service continuity and stability and reducing risks.In the scenario of federal client, it can be inferred and fine-tuned on site without uploading the original data, thus meeting the needs of privacy compliance and regional personalized prediction at the same time. Personalized decision suggestions include adjusting inventory, making procurement plans and promotion strategies, etc. for reasons of population structure characteristics and seasonality.
[0072] Embodiment 2: An AI-based supply chain demand prediction method based on Embodiment 1, specifically as follows:
[0073] Specifically, multi-source data is extracted, cleaned and standardized through the extraction, transformation and loading process; the multi-source data is standardized to the same field through the alignment module, so as to eliminate the dimensional difference; the supply chain knowledge graph is constructed based on the aligned multi-source data, which is uniformly encoded in the form of triple and is attached with a timestamp; by using tokenization mapping, the association of regional or store identifiers across data sources is realized, so as to ensure that personal information is not exposed; the population flow matrix T of the region is calculated by using the population mobility data provided by the operator, thus obtaining the time-varying graph adjacency matrix S and graph Laplacian matrix O; by writing the population stratification indicators of government statistics and enterprise internal statistics into the node attributes of the SKG, it is used for subsequent spatio-temporal smoothing and prior constraint, and constitutes the regional population structure vector P; by normalizing the population structure vector P and the population flow matrix T, the dimensional difference is eliminated; the alignment template unifies different sources of data to the same field specification set, so that data from different sources can be directly compared, fused and trained in the same coordinate system.
[0074] Specifically, the multi-source data is extracted, converted and loaded through the extraction, conversion and loading process, and then loaded into the target storage for analysis and modeling after standardization; cleaning means denoising, correcting errors, filling missing values, deleting duplicate records, and uniformly processing formats; multi-source data includes: sales, price, weather, holidays, government population statistics, enterprise internal master data and operator desensitization mobility; the supply chain knowledge graph structures entities and their relationships into a unified semantic network for data alignment, relationship reasoning and interpretable prediction; the structured entities and their relationships represent the subjects in the multi-source data; triples are composed of subjects, relationships and objects, such as consumers, regions and aging; token mapping uses hash mapping, which is irreversible, thereby ensuring that personal information is not exposed when transmitting data; the population flow matrix describes the population migration intensity between regions in a given period; the graph adjacency matrix records whether the nodes are connected and the weight of the matrix; the graph Laplacian matrix is composed of the degree matrix and the graph adjacency matrix; the degree matrix is a diagonal matrix composed of node degrees; the population stratification index is stratified according to age, gender, family structure and mobility; the SKG node structures entities and their relationships of multi-source data into a unified semantic network for data alignment, relationship reasoning and interpretable prediction.
[0075] Specifically, the generalized linear state space model LINE is constructed for regions, stores, categories and time; sparse regularization is used for LINE to improve the stability of cross-regional small samples; the graph Laplace regularization is introduced to constrain the LINE in space and time, and the population flow relationship is converted into a space-time constraint.
[0076] Specifically, the generalized linear state space model is used to describe the time-varying law and uncertainty by combining dynamic hidden states with generalized linear observations; the dynamic hidden state evolves with time and is used to carry the potential trend of the system and drive the generation of observation data; the generalized linear observation maps the dynamic hidden state and the exogenous feature to the parameter of the observation distribution through a link function; the exogenous feature is used to explain changes such as price and promotion, weather, holidays, population and macro indicators; the link function maps the linear combination of hidden states to the legal value range of the observation distribution parameter, and the value range is [0, 1]; sparse regularization adds sparse penalty to LINE to make most of the weights tend to zero, achieving automatic feature selection and enhancing interpretability and robustness; the graph Laplace regularization adds a smoothing term to the generalized linear state space model to encourage the parameters of adjacent nodes on the graph to be similar, thereby improving the generalization ability; the smoothing term constrains the parameter variation range in the generalized linear state space model, making the estimation of adjacent samples more continuous and consistent; the space-time smoothing constraint converts the population flow relationship into a space-time constraint.
[0077] Specifically, by jointly evaluating the parameters and dynamic hidden states of the demand prediction model through the inference engine, only sufficient statistics need to be uploaded to complete the training, thereby avoiding the transmission of details and protecting the privacy information of consumers; by setting a drift trigger to monitor the demand prediction model, the stability of the demand prediction model is improved; by encapsulating the alignment template, the inference engine and the distributionally robust optimization decision maker (DRO) as an inference service and deploying it to the edge node.
[0078] Specifically, the inference engine estimates the parameters of the data of the demand prediction model and updates the parameters of the hidden state, generates prediction and uncertainty evaluation, and supports online incremental update; the demand prediction model learns the time series rule based on historical sales and multi-source features such as price, promotion, behavior, population and seasonal factors, thereby predicting the demand point value of each period in the future, thereby supporting replenishment and scheduling decisions; statistics support inference and decision making by compressing sample data into meaningful data; the drift trigger monitors abnormal changes in data distribution and automatically triggers model rollback mechanism when the threshold is exceeded, switching to the last more stable demand prediction model, thereby responding to distribution drift in a timely manner; when the demand prediction model has distribution drift, the DRO selects the decision of ordering through the worst-case robust criterion, thereby minimizing the loss such as shortage and overstock, and converts the prediction distribution into a robust and executable strategy.
[0079] The above shows and describes the basic principles, main features and advantages of the present application. Those skilled in the art should understand that the present application is not limited to the above-mentioned embodiments, and the above-mentioned embodiments and descriptions in the specification are only preferred examples of the present application and are not intended to limit the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of protection of the present application is defined by the appended claims and their equivalents.
Claims
1. A supply chain demand forecasting method based on artificial intelligence, characterized in that: By deploying federated learning clients locally, multimodal behavioral data and demographic data of consumers are collected; by cooperating with operators, the size of the resident population and the number of the floating population are confirmed, forming comprehensive population structure data; Preprocess the collected multimodal behavioral data of consumers and comprehensive demographic data; Feature extraction is performed on the preprocessed data; The data after feature extraction is analyzed using deep learning algorithms; Subnetworks are constructed based on feature-extracted consumer multimodal behavior features and demographic features; An attention fusion formula is constructed to weight and combine the sub-networks. The weighted and combined consumer multimodal behavior is then input into the temporal encoder according to the time step to obtain the temporal hidden state for prediction. The demand forecasting model is constructed based on temporal hidden states: the temporal hidden states are mapped; a supervised loss function is constructed; a total loss function is constructed based on the supervised loss function; an adaptive first-order algorithm is used to update the parameters of the demand forecasting model parameter set; the outputs of the basic predictors are weighted and fused, and differentiated weighting is performed in combination with population structure.
2. The supply chain demand forecasting method based on artificial intelligence according to claim 1, characterized in that: The specific steps for collecting multimodal behavioral data and demographic data of consumers by deploying a federated learning client locally are as follows: Multimodal behavioral data of consumers is collected through the deployed federated learning client, and the collected multimodal behavioral data is encrypted and anonymized; through a dedicated data integration process in the local federated learning client, the latest population statistics of the region are periodically pulled from the government or enterprise internal database.
3. The supply chain demand forecasting method based on artificial intelligence according to claim 1, characterized in that: The specific steps for confirming the size of the resident population and the number of the floating population through cooperation with operators are as follows: By collaborating with operators to obtain anonymized and aggregated mobile communication signaling data, the size of the resident population and the number of migrant workers are confirmed. By integrating the latest demographic data and the resident population size and migrant worker numbers confirmed by operators in the local federated learning client, comprehensive population structure data is formed.
4. The supply chain demand forecasting method based on artificial intelligence according to claim 1, characterized in that: The specific steps for feature extraction from the preprocessed data are as follows: Feature extraction from multimodal consumer behavior data includes: extracting consumer consumption tendencies and concerns by applying natural language processing to consumers' comments, likes, and shares on social media platforms and their evaluation texts; extracting consumers' visual preferences by applying image recognition technology to consumer evaluation images to identify visual features and brand logos; classifying consumers' online browsing behavior according to the number of consecutive clicks, page dwell time, and swipe time interval, and calculating the intensity of consumers' attention to various product categories based on the frequency and trends of consumer visits; mapping consumers' search keywords to three predefined categories—purchase intent, information query, and brand comparison—using an intent classifier to analyze similar intent clusters among these three predefined categories; and extracting consumers' historical purchase behavior, historical purchase frequency, and historical spending amount through a value assessment and hierarchical analysis method based on customers' historical transaction behavior, including not only online data but also offline physical store consumption data and product purchase frequency.
5. The supply chain demand forecasting method based on artificial intelligence according to claim 4, characterized in that: The specific steps for feature extraction from the preprocessed data also include: Feature extraction from comprehensive population structure data includes: normalizing the population structure data to eliminate dimensional differences; encoding the static population structure of a region to confirm its characteristics; confirming the rate of change of the floating population through holiday return data; confirming the activity level of the resident population of a region through the number of active days in the region on the mobile device; confirming the characteristics of the dynamic population structure by using the natural growth rate of two adjacent statistical periods to obtain the population growth trend; concatenating the static and dynamic population structure features according to regional coding to obtain a preliminary high-dimensional vector; reducing the dimensionality of the obtained high-dimensional vector through principal component analysis to remove redundancy and extract the most representative principal components of the population structure; outputting the dimensionality-reduced principal components of the population structure to an attention fusion layer to map consumer behavior features to the same space; and automatically learning the importance of population structure features in different regions using attention weights to complete the joint feature mapping of consumer behavior, location region, and population structure.
6. The supply chain demand forecasting method based on artificial intelligence according to claim 1, characterized in that: The specific steps for constructing a sub-network based on feature extraction of consumer multimodal behavior features and demographic structure features are as follows: A subnetwork is constructed based on the extracted multimodal consumer behavior features and demographic features. The subnetwork includes: a text subnetwork C. txt Image Subnetwork C Bph Behavioral subnetwork C behavior and population structure subnetwork C pop By setting up output alignment modules in each sub-network, the outputs of each sub-network are projected and mapped to the system's hidden space dimension, and then normalized and temporally aligned. An attention-based fusion layer is used to weight and combine the constructed sub-networks; the attention fusion formula is as follows: A f Here, A is the attention weight for mode m, f is the mode index, A is the attention weight, and exp is the exponential function and denominator. Normalize all modality scores, where g is the summation index and B is the query vector representing the current task. · It is the transpose of query vector B, tanh is the hyperbolic tangent activation function, and D f Let D be the learnable transformation matrix that maps the f-th modality feature to the scoring space, and C be the learnable projection matrix of the f-th modality. (f) Let E represent the feature vector obtained by the f-th mode through the sub-network, C be the same representation vector after multimodal fusion, and E be the feature vector obtained by the sub-network. f Let E represent the learnable matrix for projecting onto the f-th modal value, where E is the learnable matrix for the projection.
7. The supply chain demand forecasting method based on artificial intelligence according to claim 1, characterized in that: The specific steps for inputting the weighted combined consumer multimodal behavior into the timing encoder according to the time step are as follows: The formula for the temporal hidden state is: H i Let represent the temporal hidden state at time i, where i represents the time index, H is the method for obtaining the temporal hidden state, and φ is the nonlinear activation function. This represents the number of parallel convolution branches, and the range of summation indices is... It is the first The index of each convolutional branch, It is the first The dilation rate of each convolutional branch, It is the first one The convolutional kernel of the convolutional branch, J is the value of the convolutional kernel, and C is the same representation vector after multimodal fusion. Indicates the first The bias vector of the convolution branch, k is the bias vector.
8. The supply chain demand forecasting method based on artificial intelligence according to claim 1, characterized in that: The specific steps for mapping the temporal hidden state are as follows: The mapping formula is: It is the demand forecast result at time i, based on existing information, for the next δ-th time step in the future. It is the prediction result, Qδ is the mapping function, and H is the prediction result. i Let H represent the temporal hidden state at time i, where i represents the time index, H is the obtained temporal hidden state, φ is the nonlinear activation function, δ is the prediction step size, and λ is the set of prediction step sizes.
9. The supply chain demand forecasting method based on artificial intelligence according to claim 1, characterized in that: The specific steps for constructing the supervised loss function are as follows: The formula for the supervised loss function is: M AIM This is the loss function value, where |β| is the total sample size. It sums the results over time starting point i. The summation of the predicted step size set H, y i+δ y represents the actual demand at time χ+δ, where y is the actual demand. It is the result of demand forecasting. δ is the prediction result, δ is the prediction step size representing the time span of the prediction forward from the current moment, λ is the set of prediction step sizes, and i represents the time index.
10. The supply chain demand forecasting method based on artificial intelligence according to claim 1, characterized in that: The specific steps for weighted fusion of the outputs of the basic predictors and differentiated weighting based on population structure are as follows: Two or more base predictors are used to independently train the collected consumer multimodal behavior data and population data structure to obtain candidate prediction results for a preset future step size. Population structure features and context features are processed through a gated network, and then normalized to obtain a fusion weight vector. The fusion weight vector is constrained by softmax to ensure that the fusion weight vector is non-negative and sums to one. Finally, the results of the base predictors are linearly weighted according to the fusion weight vector.
Citation Information
Patent Citations
Supply chain demand prediction method
CN116308494A
