Logistics demand prediction method and system based on artificial intelligence
By calculating the change in prediction error of logistics order volume and reconstructing attention weights, and combining long short-term memory networks and historical trajectory statistical confidence interval boundaries, the problem of insufficient capture of nonlinear fluctuation characteristics in logistics demand forecasting is solved, and accurate prediction is achieved in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN HUARUI INTELLIGENT EQUIPMENT CO LTD
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-01
AI Technical Summary
Existing logistics demand forecasting technologies struggle to capture nonlinear fluctuations under the influence of complex market factors, resulting in delayed responses to sudden trend changes and failing to guarantee the accuracy of inventory scheduling and capacity planning at logistics distribution centers.
By calculating the magnitude of the prediction error in logistics order volume, the attention weight allocation of historical logistics data is reconstructed. The nonlinear temporal correlation in the weighted features is deeply mined using long short-term memory networks. The prediction curve is then corrected by regression based on the boundary of the historical trajectory statistical confidence interval, thus generating logistics demand prediction results.
In complex and volatile environments, it enhances the adaptive correction capability and accuracy of logistics demand forecasting, accurately captures the inherent laws of dynamic changes in logistics demand, and eliminates noise interference from invalid orders.
Smart Images

Figure CN121961135A_ABST
Abstract
Description
Artificial Intelligence-Based Logistics Demand Forecasting Methods and Systems Technical Field
[0001] This invention relates to the field of machine learning technology, and in particular to a method and system for predicting logistics demand based on artificial intelligence. Background Technology
[0002] The field of machine learning technology refers to a system of computational methods that use sample data to build generalizable predictive or discriminative relationships to support automated decision-making. This includes data collection and labeling, feature construction and representation, training sample partitioning, loss function setting, model parameter optimization, model calibration and validation, and iterative updates after deployment. Common methods covered include supervised learning regression and classification, time series modeling, ensemble learning and probabilistic prediction.
[0003] Logistics demand forecasting methods refer to technical methods that estimate the demand for a certain period in the future, given conditions such as commodity categories and regional outlets, based on time series data such as historical outbound volume and order volume, combined with influencing factors such as holidays and promotional activities. Typically, order and shipping records are first summarized on a daily or weekly basis, and missing data is filled and anomalies are removed. Then, input items such as the lagging demand moving average growth rate and holiday markers are constructed. Subsequently, linear regression is used to fit the input items with the target demand, or exponential smoothing is used to recursively derive the next period's forecast value based on the most recent demand. Alternatively, time series decomposition is used to break down the demand into trend, seasonal, and residual items, and then parameters are estimated separately and superimposed in the forecasting stage to obtain the future demand series.
[0004] Existing logistics demand forecasting technologies mostly use linear regression to linearly fit historical order data, ignoring the nonlinear fluctuation characteristics of logistics demand under the influence of complex market factors. They assume that the influence of historical data on future trends is evenly distributed or simply decays over time, making it difficult to distinguish the real differences in the contribution of data from different historical nodes to the evolution of future demand. This leads to biases when the model processes local abnormal fluctuation data, and it is unable to dynamically focus on the most valuable historical periods. As a result, the forecast results are slow to respond to trend changes when facing a volatile logistics market environment, making it difficult to ensure the accuracy of inventory scheduling and capacity planning in logistics distribution centers. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by proposing an artificial intelligence-based method and system for predicting logistics demand.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: an artificial intelligence-based logistics demand forecasting method, comprising the following steps: S1: collecting logistics order volumes from a logistics distribution center at multiple consecutive historical time points, marking each historical time point's logistics order volume as a historical logistics lagging demand volume, and assigning a logistics demand contribution intensity identifier; S2: arranging each historical logistics lagging demand volume according to the magnitude of the logistics demand contribution intensity identifier, and setting a corresponding logistics demand attention weight; S3: performing a product operation on each historical logistics lagging demand volume and the corresponding logistics demand attention weight to obtain weighted logistics demand features, and determining the logistics demand state code of all weighted logistics demand features; S4: inputting the logistics demand state code into a long short-term memory network model, performing feature extraction on the logistics demand state code and extrapolating the future trend of logistics order volume changes to generate a logistics forecasting strategy trajectory identifier; S5: collecting historical logistics forecasting strategy trajectory identifiers corresponding to multiple consecutive historical time periods, comparing them with the current logistics forecasting strategy trajectory identifier, performing regression correction, and obtaining the logistics demand forecasting result.
[0007] The present invention improves upon the following: the logistics demand contribution intensity identifier is specifically a deviation magnitude value calculated by the difference between the first prediction error and the second prediction error; the logistics demand attention weight is specifically an attention coefficient obtained by mapping and transforming the arrangement position index of the logistics demand contribution intensity identifier; the logistics demand state code includes weighted logistics demand features and a multi-dimensional feature vector of all weighted logistics demand features; the logistics prediction strategy trajectory identifier is specifically the path gradient change rate obtained after performing differential calculation and quantization processing on the preliminary logistics demand prediction output path; and the logistics demand prediction result is specifically the future logistics order volume after regression correction of the preliminary prediction path magnitude based on the consistency interval boundary of the logistics prediction strategy trajectory.
[0008] The present invention is improved in that step S1 specifically comprises: S101: collecting logistics order volumes from the logistics distribution center at multiple consecutive historical time points, arranging the logistics order volumes according to time sequence to construct a historical logistics order volume sequence, marking each logistics order volume in the historical logistics order volume sequence as a historical logistics lagging demand volume, and simultaneously performing trend extrapolation calculation on the historical logistics order volume sequence to estimate the logistics order volume at the next moment, marking it as the first estimated logistics order volume, calculating the difference between the first estimated logistics order volume and the actual logistics order volume at the next moment, and obtaining the first prediction error value; S102: selecting from the historical logistics order volume sequence corresponding to each historical time point in time sequence. Using the historical logistics lag demand at the interval as the target object, a processed historical logistics order volume sequence excluding the target object is constructed. Trend extrapolation calculation is performed again on the processed historical logistics order volume sequence to estimate the logistics order volume at the next moment, and it is marked as the second estimated logistics order volume. The difference between the second estimated logistics order volume and the actual logistics order volume at the next moment is calculated to obtain the second prediction error value. The difference operation is performed on the first prediction error value and the second prediction error value to generate the prediction deviation amplitude value; S103: The importance level of the target object is mapped according to the magnitude of the prediction deviation amplitude value, and a corresponding logistics demand contribution intensity identifier is assigned to each target object according to the importance level.
[0009] The present invention is improved in that step S2 is specifically as follows: S201: Sort all corresponding historical logistics lag demand quantities in descending order according to the magnitude of the logistics demand contribution intensity identifier, reconstruct the arrangement order of historical logistics lag demand quantities, and generate a logistics demand prediction influence order sequence; S202: Detect the position of each historical logistics lag demand quantity in the logistics demand prediction influence order sequence, and extract the sort number corresponding to the position as the arrangement position index; S203: Convert the arrangement position index into a numerical weight coefficient, calculate the numerical weight ratio of each historical logistics lag demand quantity, and set the corresponding logistics demand attention weight.
[0010] The present invention is improved in that step S3 specifically comprises: S301: obtaining each historical logistics lag demand quantity and the corresponding logistics demand attention weight, performing a product operation on the historical logistics lag demand quantity and the logistics demand attention weight to obtain a weighted logistics demand feature value; S302: performing a vector concatenation operation on all the weighted logistics demand feature values according to the order of arrangement in the logistics demand prediction influence sequence to generate a multidimensional feature vector; S303: identifying each weighted logistics demand feature value constituting the multidimensional feature vector, calculating the statistical mean and standard deviation of all the weighted logistics demand feature values and performing numerical standardization calculation, mapping the standardized weighted logistics demand feature values to a numerical coordinate system of a preset dimension to generate a logistics demand status code.
[0011] The present invention is improved in that step S4 is specifically as follows: S401: The logistics demand state code is input into the Long Short-Term Memory network model, and the logistics order volume at each time point in the future time domain is calculated. The logistics order volumes at multiple future time points obtained by the calculation are connected in chronological order to construct a continuous numerical curve reflecting the evolution trend of logistics order volume over time. The trajectory coordinate set of the continuous numerical curve in the time coordinate system is extracted and defined as the preliminary logistics demand prediction output path; S402: The first-order differential calculation is performed on the curve trajectory of the preliminary logistics demand prediction output path on the time axis to obtain the tangent slope of the preliminary logistics demand prediction output path at each time point. The tangent slope is defined as the path gradient value. The path gradient values are arranged in chronological order and the path gradient change rate between adjacent time points is calculated; S403: The continuous path gradient change rate is mapped to a state symbol representing the evolution direction and intensity of the logistics order volume prediction trend to generate a logistics prediction strategy trajectory identifier.
[0012] The present invention is improved in that step S5 is specifically as follows: S501: Collect historical logistics prediction strategy trajectory identifiers corresponding to multiple consecutive historical time periods, count the occurrence frequency of each historical logistics prediction strategy trajectory identifier, calculate the proportion of each occurrence frequency to the total number of collected historical logistics prediction strategy trajectory identifiers, construct a probability distribution, and filter the distribution range of historical logistics prediction strategy trajectory identifiers whose cumulative probability reaches a preset statistical confidence threshold according to the probability distribution to obtain the statistical confidence interval of the logistics prediction strategy trajectory; S502: Determine whether the current logistics prediction strategy trajectory identifier falls within the range of the statistical confidence interval of the logistics prediction strategy trajectory. If the determination result is that it exceeds the statistical confidence interval of the logistics prediction strategy trajectory, extract the boundary value of the statistical confidence interval of the logistics prediction strategy trajectory as a constraint condition to obtain the interval boundary constraint parameter; S503: Extract the trajectory coordinate set that constitutes the preliminary logistics demand prediction output path, use the interval boundary constraint parameter to perform numerical adjustment calculation on the logistics order volume at future times in the trajectory coordinate set, correct the numerical trend of the logistics order volume in the trajectory coordinate set over time, and generate the logistics demand prediction result.
[0013] An AI-based logistics demand forecasting system includes: a logistics demand collection and labeling module, which collects logistics order volumes from a logistics distribution center at multiple consecutive historical time points, labels each historical time point's logistics order volume as a historical lagging demand volume, and assigns a logistics demand contribution intensity identifier; an attention weight allocation module, which sorts each historical lagging demand volume according to the magnitude of the logistics demand contribution intensity identifier and sets a corresponding logistics demand attention weight; a logistics demand state encoding module, which performs a product operation on each historical lagging demand volume and its corresponding logistics demand attention weight to obtain weighted logistics demand features and determines the logistics demand state encoding for all weighted logistics demand features; a logistics demand trend forecasting module, which inputs the logistics demand state encoding into a long short-term memory network model, performs feature extraction on the logistics demand state encoding, and performs inference on the future trend of logistics order volume changes to generate a logistics forecasting strategy trajectory identifier; and a forecasting result correction module, which collects the historical logistics forecasting strategy trajectory identifiers corresponding to multiple consecutive historical time periods, compares them with the current logistics forecasting strategy trajectory identifiers, performs regression correction, and obtains the logistics demand forecasting result.
[0014] Compared with existing technologies, the advantages and positive effects of this invention are as follows: In this invention, the contribution intensity at each moment is quantified by calculating the change in prediction error before and after removing specific historical order data, the attention weight allocation of historical logistics data is reconstructed to highlight key demand characteristics, the nonlinear temporal correlation in the weighted features is deeply mined using long short-term memory networks and the preliminary order change trend is deduced, differential calculation and gradient quantization are performed on the prediction path, and the evolution trend of the prediction curve is corrected by regression based on the confidence interval boundary of historical trajectory statistics. Thus, while eliminating the noise interference of invalid orders, the inherent laws of dynamic changes in logistics demand are accurately captured, effectively improving the adaptive correction capability and result accuracy of logistics demand prediction in complex and volatile environments. Attached Figure Description
[0015] Figure 1 is a flowchart of the method of the present invention; Figure 2 is a detailed flowchart of step S1 of the present invention; Figure 3 is a detailed flowchart of step S2 of the present invention; Figure 4 is a detailed flowchart of step S3 of the present invention; Figure 5 is a detailed flowchart of step S4 of the present invention; Figure 6 is a detailed flowchart of step S5 of the present invention; Figure 7 is a system module diagram of the present invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0017] Please refer to Figure 1. This invention provides a technical solution: a logistics demand forecasting method based on artificial intelligence, comprising the following steps: S1: Collecting logistics order volumes from a logistics distribution center at multiple consecutive historical time points, marking each historical time point's logistics order volume as a historical logistics lagging demand volume, and assigning a logistics demand contribution intensity identifier; S2: Arranging each historical logistics lagging demand volume according to the magnitude of the logistics demand contribution intensity identifier, and setting a corresponding logistics demand attention weight; S3: Performing a product operation on each historical logistics lagging demand volume and its corresponding logistics demand attention weight to obtain weighted logistics demand features, and determining the logistics demand state code of all weighted logistics demand features; S4: Inputting the logistics demand state code into a long short-term memory network model, performing feature extraction on the logistics demand state code and extrapolating the future trend of logistics order volume changes to generate a logistics forecasting strategy trajectory identifier; S5: Collecting historical logistics forecasting strategy trajectory identifiers corresponding to multiple consecutive historical time periods, comparing them with the current logistics forecasting strategy trajectory identifier, performing regression correction, and obtaining the logistics demand forecasting result.
[0018] The logistics demand contribution intensity identifier is specifically the deviation magnitude value calculated by the difference between the first prediction error and the second prediction error. The logistics demand attention weight is specifically the attention coefficient obtained by mapping and transforming the arrangement position index of the logistics demand contribution intensity identifier. The logistics demand status code includes weighted logistics demand features and a multi-dimensional feature vector of all weighted logistics demand features. The logistics forecasting strategy trajectory identifier is specifically the path gradient change rate obtained after performing differential calculation and quantization processing on the preliminary logistics demand forecast output path. The logistics demand forecast result is specifically the future logistics order volume after regression correction of the preliminary forecast path magnitude based on the consistency interval boundary of the logistics forecasting strategy trajectory.
[0019] Please refer to Figure 2. Step S1 is as follows: S101: Collect the logistics order volume of the logistics distribution center at multiple consecutive historical time points, arrange the logistics order volume according to the time sequence, construct a historical logistics order volume sequence, mark each logistics order volume in the historical logistics order volume sequence as the historical logistics lagging demand volume, and perform trend extrapolation calculation on the historical logistics order volume sequence to estimate the logistics order volume at the next moment, and mark it as the first estimated logistics order volume. Calculate the difference between the first estimated logistics order volume and the actual logistics order volume at the next moment to obtain the first prediction error value. First, establish a communication connection with the warehouse management database of the logistics distribution center, and retrieve the total logistics order volume data of the past 30 consecutive working days through the data extraction command. After data extraction, perform preprocessing operations: for missing data points caused by network fluctuations, use the arithmetic mean of the values at adjacent time points to complete them; for abnormal fluctuation points, calculate the mean and standard deviation within the sliding window, and remove outliers exceeding 3 times the standard deviation to ensure the continuity and authenticity of the input data, and all original data involving order volume must be kept in integer form. Subsequently, the 30 cleaned data points were arranged into a historical logistics order volume sequence according to the chronological order length. The order value for each specific date in this sequence was defined as the historical logistics lagged demand. During trend extrapolation, a weighted decreasing logic was used to fit the entire sequence. Specifically, the order volume for the three most recent time steps was extracted and assigned decay weights of 0.5, 0.3, and 0.2, respectively. These weights were determined by calculating the correlation decay curve of recent data's influence on the future in historical data; that is, autocorrelation analysis was performed on one year's worth of data, calculating the correlation coefficients for lags of one, two, and three periods, and then normalizing the results. The predicted value for the next time step was derived through a weighted summation operation. If the result contained a decimal, it was rounded to the nearest integer to conform to the physical characteristic that order volume is an integer, and this rounded result was marked as the first estimated logistics order volume. For example, if the order volumes for the last three time points were 1000, 1100, and 1200 respectively, the calculation process for the first estimated logistics order volume would be as follows: The system then collects the actual number of logistics orders at the next moment (e.g., 1150 orders) and calculates the absolute difference between the two to obtain the first prediction error value. one.
[0020] S102: Select the historical logistics lagging demand corresponding to each historical time point from the historical logistics order volume sequence in chronological order as the target object, construct a processed historical logistics order volume sequence that does not contain the target object, perform trend extrapolation calculation again on the processed historical logistics order volume sequence to estimate the logistics order volume at the next time moment, and mark it as the second estimated logistics order volume, calculate the difference between the second estimated logistics order volume and the actual logistics order volume at the next time moment to obtain the second prediction error value, and perform difference calculation on the first prediction error value and the second prediction error value to generate the prediction deviation magnitude value; traverse each data point in the historical logistics order volume sequence as the target object. In each round of traversal, perform the "leave one" operation, that is, temporarily remove the current target object from the sequence and construct a processed historical logistics order volume sequence that does not contain that point. Perform the above weighted decreasing trend extrapolation calculation again on the processed sequence to obtain the second estimated logistics order volume, and similarly round the result and calculate its difference with the same actual logistics order volume to obtain the second prediction error value. This process is repeated until each point in the sequence has been removed as a target object and tested once. For example, if after removing data from a certain day, the model refits the data based on the remaining data, and the resulting second estimated logistics order volume becomes 1180 orders, then the calculation process for the second prediction error value is as follows: Then, the difference between the first prediction error value 20 and the second prediction error value 30 is calculated, and the absolute value is used to generate the prediction deviation magnitude value. The larger this value, the more critical the removed target object is to maintaining the overall prediction accuracy; its absence will lead to a significant increase in prediction error.
[0021] S103: Map the importance level of the target object based on the magnitude of the prediction deviation, and assign a corresponding logistics demand contribution intensity label to each target object according to the importance level. The process of mapping the importance level of the target object based on the magnitude of the prediction deviation is as follows: Collect the prediction deviation magnitude values calculated for all target objects, construct a set of deviation values for all prediction deviation magnitude values, identify the maximum value in the deviation value set as the upper limit of the distribution, identify the minimum value in the deviation value set as the lower limit of the distribution, calculate the difference between the upper and lower limits of the distribution to determine the global span of the deviation value distribution; divide the numerical interval step of the level based on the global span, and use the lower limit of the distribution as the starting benchmark to calculate the lower limit of the distribution and the single multiple. The sum of the value interval steps yields the first boundary. The sum of the distribution lower bound and the double value interval step size yields the second boundary. For each target object, the prediction deviation magnitude value corresponding to the target object is compared with both the first and second boundaries. When the prediction deviation magnitude value is greater than or equal to the second boundary, the corresponding target object is marked as level one. When the prediction deviation magnitude value is less than the second boundary but greater than or equal to the first boundary, the corresponding target object is marked as level two. When the prediction deviation magnitude value is less than the first boundary, the corresponding target object is marked as level three. The prediction deviation magnitude values for all target objects are counted to form a set of deviation values. The largest value in the set is identified as the upper limit of the distribution, and the smallest value is identified as the lower limit. The difference between the upper and lower limits is calculated by subtraction to determine the global span. Based on the global span, the value interval step size for level division is set; here, the value interval step size is set to one-third of the global span. Using the lower bound of the distribution as the starting point, three judgment intervals are constructed: the first boundary point is the sum of the lower bound of the distribution and the single numerical interval step size; the second boundary point is the sum of the lower bound of the distribution and the double numerical interval step size. There are three possibilities for the classification judgment: First possibility, if the prediction deviation amplitude of an object is greater than or equal to the second boundary point, it indicates that the historical data point has a significant impact on the prediction trend, and its importance level is marked as first level; second possibility, if the value is less than the second boundary point but greater than or equal to the first boundary point, it is marked as second level; third possibility, if the value is less than the first boundary point, it indicates that the point has a weak impact on the trend, and it is marked as third level. Assuming that statistical calculations show the deviation value set contains 5 sample data points with prediction deviation amplitudes of 5, 60, 25, 2, and 55 respectively, and the lower bound of the distribution is identified as 2 and the upper bound as 60, then the global span is calculated as follows: The numerical interval step size is calculated as follows: The first boundary is calculated as follows: The second boundary is calculated as follows: Based on this boundary, the prediction bias of sample T2 is 60, because... Therefore, it is classified as the first level; the prediction bias of sample T3 is 25, because Therefore, it is classified as the second level; the prediction bias of sample T1 is 5, because Therefore, it is classified as the third level.
[0022] Please refer to Figure 3. Step S2 is as follows: S201: Based on the magnitude of the logistics demand contribution intensity indicator, sort all corresponding historical logistics lagging demand quantities in descending order, reconstruct the order of historical logistics lagging demand quantities, and generate a logistics demand prediction impact order sequence; call the logistics demand contribution intensity indicator and sort all corresponding historical logistics lagging demand quantities in descending order according to their level. The specific sorting logic is set as follows: the first level is superior to the second level, and the second level is superior to the third level; for multiple historical logistics lagging demand quantities within the same level, further sort them in a secondary descending order based on their corresponding prediction deviation magnitude value. That is, the larger the deviation magnitude value, the higher the ranking in the sequence. Through this dual sorting mechanism, the physical order of historical logistics lagging demand quantities is reconstructed, generating a logistics demand prediction impact order sequence that reflects the decreasing importance of data. The purpose of constructing this sequence is to allow the model to prioritize key data points that have been proven by sensitivity tests to have a significant impact on future predictions. According to the deviation magnitude values sorted in the first embodiment, the order of the logistics demand forecast impact sequence should be: T2 (magnitude 60, first level), T5 (magnitude 55, first level), T3 (magnitude 25, second level), T1 (magnitude 5, third level), T4 (magnitude 2, third level).
[0023] S202: Detect the position of each historical delayed logistics demand in the logistics demand forecast influence sequence, and extract the corresponding ranking number as the ranking index; traverse the reconstructed logistics demand forecast influence sequence, and detect the specific row number position of each original historical delayed logistics demand in the current sequence. This row number represents the ranking of the data point's contribution to future predictions, and is extracted and defined as the ranking index. The smaller the index value, the higher the position of the data point in the reconstructed sequence, and the higher its importance. This step transforms the abstract importance ranking into a concrete numerical identifier for subsequent mathematical weight mapping. The corresponding ranking indexes are as follows: T2 index is 1, T5 index is 2, T3 index is 3, T1 index is 4, and T4 index is 5.
[0024] S203: Convert the permutation position index into numerical weight coefficients, calculate the numerical weight ratio of each historical logistics lag demand, and set the corresponding logistics demand attention weight; use a numerical mapping algorithm based on the Zipf-Mandbrot distribution law to convert the permutation position index into numerical weight coefficients. This algorithm introduces two adjustment parameters to adapt to the long-tail distribution characteristics under different logistics scenarios. The specific calculation formula is as follows: In the formula, Indicates the first in the sequence The logistics demand attention weight assigned to each data point; the larger the value, the more important the corresponding location index. This represents the index of the permutation position corresponding to the data point, and its value is a positive integer; This represents the total amount of historical logistics lag demand contained in the sequence. This represents the smoothing displacement parameter, used to prevent excessive concentration of high-ranking weights. The larger the value of this parameter, the lower the weight of the data points with higher rankings, and the smoother the distribution. This represents the decay rate index, which controls how quickly the weight decreases as the ranking decreases. The larger the value of this parameter is set, the more severe the weight decay of data points ranked lower, and the more obvious the head effect. For summation, subscript The loop variable is used for summation, representing the accumulation from the first term to the second. The calculation logic is as follows: First, obtain the total number of sequences. In the current embodiment, to simplify calculations and match the harmonic series distribution, a smoothing displacement parameter is set based on the statistical characteristics of the long-tail distribution of logistics demand. decay rate exponent Substitute the parameters and their corresponding permutation indexes directly into the formula for calculation. T2 position index The weight calculation process is as follows: T5 location index The weight calculation process is as follows: T3 location index The weight calculation process is as follows: T1 position index The weight calculation process is as follows: T4 location index The weight calculation process is as follows: .
[0025] Please refer to Figure 4. Step S3 specifically involves: S301: Obtaining each historical logistics lag demand quantity and its corresponding logistics demand attention weight; performing a product operation on the historical logistics lag demand quantity and its logistics demand attention weight to obtain a weighted logistics demand feature value; retrieving each historical logistics lag demand quantity and its calculated logistics demand attention weight from the memory. For each data pair at each time point, a product operation is performed. Specifically, the original order value of the historical logistics lag demand quantity is multiplied by the corresponding logistics demand attention weight. The physical meaning of this operation is to perform importance-based amplitude modulation on the original signal to generate a weighted logistics demand feature value. It should be noted that although the order quantity is an integer, the weighted feature value, as a model input parameter, is allowed to retain decimals to maintain the accuracy of mathematical calculations. In this way, highly important data points (i.e., those that perform well in sensitivity tests) are amplified in their feature values, while noise or irrelevant data points are suppressed. For example, if the original order volume at a certain historical moment is 1000 orders, and the corresponding logistics demand attention weight is 0.4386, then the weighted logistics demand feature value at that moment is calculated as follows: .
[0026] S302: Based on the order of influence in the logistics demand forecast sequence, perform vector concatenation on all weighted logistics demand feature values to generate a multi-dimensional feature vector; sequentially extract all calculated weighted logistics demand feature values. Concatenate these scalar values sequentially, end-to-end, and perform vector concatenation to generate a multi-dimensional feature vector that represents the current historical state of logistics. The dimension of this vector equals the number of historical time points involved in the calculation. This process integrates discrete time-point data into a unified mathematical object, which not only contains the original order volume information but also implicitly includes the importance structure information of time points encoded by weights.
[0027] S303: Identify each weighted logistics demand feature value constituting the multidimensional feature vector, calculate the statistical mean and standard deviation of all weighted logistics demand feature values, and perform numerical standardization. Map the standardized weighted logistics demand feature values to a numerical coordinate system of a preset dimension to generate a logistics demand state code. Since the weighted feature values may be distributed across different numerical magnitudes, direct input into the model may lead to computational instability; therefore, standardization is required. Identify each weighted logistics demand feature value constituting the multidimensional feature vector and calculate the statistical mean and standard deviation of these feature values. Subtract the statistical mean from each weighted logistics demand feature value, and divide the difference by the standard deviation to obtain the standardized weighted logistics demand feature value. After standardization, perform a mapping operation to generate a logistics demand state code. Map the standardized vector to a numerical coordinate system of a preset dimension. This process uses a set of neural connection layers to perform dimensional transformation, projecting the feature vector onto the latent feature space. Assume that after preprocessing, a simplified 3-dimensional feature vector sequence is obtained, with values of 438.6, 219.3, and 100.0. First, calculate the statistical mean: To calculate the standard deviation: First, calculate the sum of the squares of the differences between each value and the mean, i.e. The first item is calculated as follows: The second item is calculated as follows: The third item is calculated as follows: The sum of squares is The variance is The standard deviation is Perform standardized calculations: the first value is calculated as... The second value is calculated as follows: The third value is calculated as follows: The final generated logistics demand status code has a base vector form of 1.326, -0.238, and -1.088.
[0028] Please refer to Figure 5. Step S4 is as follows: S401: Input the logistics demand state code into the Long Short-Term Memory (LSTM) network model, perform extrapolation calculations on the logistics order volume at each time point in the future time domain, connect the extrapolated logistics order volumes at multiple future time points in chronological order to construct a continuous numerical curve reflecting the evolution trend of logistics order volume over time, extract the trajectory coordinate set of the continuous numerical curve in the time coordinate system, and define the trajectory coordinate set as the preliminary logistics demand prediction output path; construct and initialize a LSM network model. This model specifically includes an input layer, two stacked hidden layers, and an output layer. The hidden layer internal structure includes a forget gate, an input gate, and an output gate: the forget gate uses a sigmoid nonlinear activation function to process the hidden state of the previous time point and the input of the current time point, outputting a value between 0 and 1 to determine which historical information to discard; the input gate combines the sigmoid nonlinear activation function and the hyperbolic tangent activation function to update the unit state; the output gate finally generates the hidden state of the current time point based on the updated unit state through the hyperbolic tangent activation function. Input the logistics demand state code generated in step S3 into the model. Set the future time domain to the next 5 time steps. The model uses forward propagation iterative calculations to extrapolate the predicted logistics order volume for each future time point. Since the order volume must be a discrete integer, the model output layer includes a rounding function. These predicted integer values are concatenated in chronological order to construct a continuous numerical curve. The time coordinates and order volume coordinates of each point on this curve are extracted to form a trajectory coordinate set, which is the initial logistics demand prediction output path.
[0029] S402: Perform first-order differential calculation on the curve trajectory of the preliminary logistics demand forecast output path on the time axis to obtain the tangent slope of the preliminary logistics demand forecast output path at each time point. Define the tangent slope as the path gradient value, arrange the path gradient values in chronological order, and calculate the path gradient rate of change between adjacent time points. Perform numerical first-order differential calculation on the curve trajectory on the time axis to obtain the tangent slope of each forecast time point relative to the previous time point, and define it as the path gradient value. For example, if the forecast value at time T+1 is 1200 and the forecast value at time T is 1150, then the path gradient value is calculated as follows: Next, a second difference process is performed on the path gradient values arranged in chronological order, that is, the ratio of the path gradient values at adjacent time points is calculated to obtain the path gradient change rate. This change rate reflects the acceleration of demand changes, and the calculation logic is: the difference between the current gradient value and the previous gradient value, divided by the absolute value of the previous gradient value. This indicator can keenly detect whether logistics demand is in a state of accelerated growth, decelerated growth, or reversal and decline.
[0030] S403: Mapping continuous path gradient change rates to state symbols representing the evolution direction and intensity of logistics order volume prediction trends generates logistics prediction strategy trajectory identifiers; the specific process of mapping continuous path gradient change rates to state symbols representing the evolution direction and intensity of logistics order volume prediction trends is as follows: setting positive and negative judgment thresholds, constructing three continuous numerical segment intervals centered on the zero point and combining the positive and negative judgment thresholds; defining the range of values greater than the positive judgment threshold as the positive abrupt change interval, defining the range of values less than the negative judgment threshold as the negative abrupt change interval, and defining the numerical interval... The range between the negative and positive decision thresholds is considered a smooth transition interval. Three different discrete characters are pre-configured, establishing mapping relationships between these characters and the positive, negative, and smooth transition intervals, respectively, thus defining the discrete characters as state symbols. Each path gradient change rate in the sequence is traversed, and the magnitude of the path gradient change rate is detected to determine the corresponding numerical segment interval. Based on the determination result, the corresponding numerical segment interval is matched, and a state symbol mapping the numerical segment interval is established, replacing the path gradient change rate. First, positive and negative decision thresholds are set. These thresholds are obtained by statistically analyzing the gradient change rate data of all order volume predictions over the past year, calculating the standard deviation of this dataset, and setting the positive decision threshold to 1.5 times the positive standard deviation and the negative decision threshold to 1.5 times the negative standard deviation. For example, if the calculated standard deviation is 0.1, then the positive decision threshold is set to 0.15 and the negative decision threshold to -0.15. Centered on the value 0, three intervals are constructed by combining these two thresholds: the positive abrupt change interval is the value... The negative abrupt change range is a numerical value. The smooth transition range is defined as a value between [value range missing]. and Between. A discrete character set is pre-configured: character A maps to the positive abrupt change interval, character B maps to the smooth transition interval, and character C maps to the negative abrupt change interval. Each path gradient change rate in the sequence is traversed, its corresponding interval is determined, and it is replaced with the corresponding character to generate a logistics prediction strategy trajectory identifier. Assuming that after differential calculation, the path gradient value sequence for the next 5 time points is 50, 60, 55, 40, and 80. The path gradient change rate is calculated: the first change rate is calculated as... The second rate of change is calculated as follows: The third rate of change is calculated as follows: The fourth rate of change is calculated as follows: Substitute the above calculation results into the threshold determination: It falls into the positive abrupt change region and is mapped to character A; It falls into a smooth transition range and is mapped to character B; , falls into the negative abrupt change interval, and is mapped to the character C; , it falls into the positive cataclysmic interval and is mapped to character A. The finally generated logistics prediction strategy trajectory identification sequence is character A, character B, character C, character A.
[0031] Please refer to Figure 6. Step S5 is specifically as follows: S501: Collect historical logistics prediction strategy trajectory identifications corresponding to multiple consecutive historical periods, count the occurrence frequency of each historical logistics prediction strategy trajectory identification, calculate the proportion of each occurrence frequency to the total number of collected historical logistics prediction strategy trajectory identifications, construct a probability distribution, and screen the distribution range of historical logistics prediction strategy trajectory identifications with a cumulative probability reaching the preset statistical confidence threshold according to the probability distribution to obtain the logistics prediction strategy trajectory statistical confidence interval; first access the historical database and collect historical logistics prediction strategy trajectory identifications generated in multiple consecutive historical periods in the past year. Count the occurrence frequency of each specific identification sequence. Calculate the proportion of each occurrence frequency to the total number of collected historical identifications to obtain the empirical probability distribution. According to this probability distribution, accumulate in descending order of probability. When the cumulative probability reaches the preset statistical confidence threshold, stop accumulating. The setting basis of the statistical confidence threshold is: count the proportion of patterns covered in historical prediction success cases, usually taking a value of 95%, which means only retaining those fluctuation patterns that have repeatedly occurred in history and have been verified as reasonable. Define all the identification sequences participating in the accumulation as normal patterns, and the set formed is the logistics prediction strategy trajectory statistical confidence interval.
[0032] S502: Determine whether the current logistics prediction strategy trajectory identification falls within the range of the logistics prediction strategy trajectory statistical confidence interval. If the judgment result is that it exceeds the logistics prediction strategy trajectory statistical confidence interval, extract the boundary values of the logistics prediction strategy trajectory statistical confidence interval as constraint conditions to obtain interval boundary constraint parameters; compare the generated current logistics prediction strategy trajectory identification with the sequences within the statistical confidence interval. If the current identification exists within the interval, the prediction is considered reasonable; if the judgment result is that it exceeds the logistics prediction strategy trajectory statistical confidence interval, that is, a currently predicted extremely rare fluctuation pattern, trigger the correction mechanism. At this time, extract the numerical features corresponding to the sequence most similar to the current identification on the confidence interval boundary as constraint conditions to obtain interval boundary constraint parameters. The determination logic of the most similar sequence is: calculate the character difference degree (such as edit distance) between the current identification sequence and all sequences within the confidence interval, and select the sequence with the smallest difference degree. For example, if the sequence character A, character B, character C, character A is not within the confidence interval, and the boundary sequence with the smallest difference degree within the interval is character A, character B, character B, character A, then extract the historical average gradient change rate corresponding to character A, character B, character B, character A as the constraint parameter.
[0033] S503: Extract the set of trajectory coordinates that make up the output path of the preliminary logistics demand forecast. Use the interval boundary constraint parameters to perform numerical adjustment calculations on the logistics order volume at future times in the set of trajectory coordinates, correct the numerical trend of the logistics order volume evolving over time in the set of trajectory coordinates, and generate the logistics demand forecast result; extract the set of trajectory coordinates of the generated output path of the preliminary logistics demand forecast. Use the interval boundary constraint parameters to perform numerical adjustment on the logistics order volume at future times in the set of trajectory coordinates. The specific calculation logic is as follows: Keep the starting point value unchanged, use the gradient change rate in the constraint parameters to re-derive the gradient values at subsequent time points. After calculating the new gradient values, round them to the nearest integer and then accumulate them to obtain the corrected order volume. Continuing with the data of the fourth embodiment: The identifiers generated by the preliminary prediction are characters A, B, C, A, and the corresponding gradient change rates are 0.20, -0.083, -0.272, 1.00. Suppose after statistical determination, this sequence is an abnormal sequence, exceeding the 95% confidence interval. Select the confidence interval boundary sequence characters A, B, B, A as the correction reference. After querying the historical database, the standard gradient change rate parameters corresponding to this reference sequence are 0.20, -0.05, -0.05, 0.20. Perform the correction calculation: Keep the gradient at T1 unchanged at 50. Correct the gradient at T2: Calculate using the standard change rate of 0.20, , and the result is an integer, so use it directly. Correct the gradient at T3: Calculate using the standard change rate of -0.05 (corresponding to the second character B), , and the result is an integer, so use it directly. Correct the gradient at T4: Calculate using the standard change rate of -0.05 (corresponding to the third character B), , round it to the nearest integer to get 54. Correct the gradient at T5: Calculate using the standard change rate of 0.20 (corresponding to the fourth character A), and maintain the accuracy based on the unrounded calculation flow , round it to the nearest integer to get 65. Reconstruct the order volume based on the corrected and rounded gradients (assuming the order volume at T0 is 1150): Calculate the corrected order volume at T1 as ; calculate the corrected order volume at T2 as ; calculate the corrected order volume at T3 as ; calculate the corrected order volume at T4 as ; calculate the corrected order volume at T5 as .
[0034] Please refer to Figure 7. The AI-based logistics demand forecasting system includes: a logistics demand collection and labeling module, which collects logistics order volumes from logistics distribution centers at multiple consecutive historical time points, labels each historical time point as a historical logistics lagging demand volume, and assigns a logistics demand contribution intensity identifier; an attention weight allocation module, which sorts each historical logistics lagging demand volume according to the magnitude of the logistics demand contribution intensity identifier and sets a corresponding logistics demand attention weight; a logistics demand state coding module, which performs a product operation on each historical logistics lagging demand volume and its corresponding logistics demand attention weight to obtain weighted logistics demand features and determine the logistics demand state code for all weighted logistics demand features; a logistics demand trend forecasting module, which inputs the logistics demand state code into a long short-term memory network model, performs feature extraction on the logistics demand state code, and performs inference on the future trend of logistics order volume changes to generate a logistics forecasting strategy trajectory identifier; and a forecasting result correction module, which collects historical logistics forecasting strategy trajectory identifiers corresponding to multiple consecutive historical time periods, compares them with the current logistics forecasting strategy trajectory identifiers, performs regression correction, and obtains the logistics demand forecasting result.
[0035] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A logistics demand forecasting method based on artificial intelligence, characterized in that, Includes the following steps: S1: Collect logistics order volume of logistics distribution center at multiple consecutive historical time points, mark the logistics order volume of each historical time point as historical logistics lagging demand volume, and assign logistics demand contribution intensity indicators. S2: Arrange each historical logistics lag demand based on the magnitude of the logistics demand contribution intensity indicator, and set a corresponding logistics demand attention weight; S3: Perform a product operation on each historical logistics lag demand and the corresponding logistics demand attention weight to obtain weighted logistics demand features, and determine the logistics demand status code of all weighted logistics demand features; S4: Input the logistics demand status code into the Long Short-Term Memory network model, perform feature extraction on the logistics demand status code and perform inference on the changing trend of future logistics order volume to generate logistics prediction strategy trajectory identifiers; S5: Collect the historical logistics prediction strategy trajectory identifiers corresponding to multiple consecutive historical periods, compare them with the current logistics prediction strategy trajectory identifiers, perform regression correction, and obtain the logistics demand prediction result.
2. The logistics demand forecasting method based on artificial intelligence according to claim 1, characterized in that, The logistics demand contribution intensity identifier is specifically a deviation magnitude value calculated by the difference between the first prediction error and the second prediction error. The logistics demand attention weight is specifically an attention coefficient obtained by mapping and transforming the arrangement position index of the logistics demand contribution intensity identifier. The logistics demand state code includes weighted logistics demand features and a multi-dimensional feature vector of all weighted logistics demand features. The logistics prediction strategy trajectory identifier is specifically the path gradient change rate obtained after performing differential calculation and quantization processing on the preliminary logistics demand prediction output path. The logistics demand prediction result is specifically the future logistics order volume after regression correction of the preliminary prediction path magnitude based on the consistency interval boundary of the logistics prediction strategy trajectory.
3. The logistics demand forecasting method based on artificial intelligence according to claim 1, characterized in that, Step S1 specifically comprises: S101: Collecting logistics order volumes from the logistics distribution center at multiple consecutive historical time points, arranging the logistics order volumes according to time sequence to construct a historical logistics order volume sequence, marking each logistics order volume in the historical logistics order volume sequence as a historical logistics lag demand, and simultaneously performing trend extrapolation calculations on the historical logistics order volume sequence to estimate the logistics order volume at the next moment, marking it as the first estimated logistics order volume, calculating the difference between the first estimated logistics order volume and the actual logistics order volume at the next moment, and obtaining the first prediction error value; S102: Selecting historical logistics order volumes corresponding to each historical time point from the historical logistics order volume sequence in chronological order. Using the historical logistics lagging demand as the target object, a processed historical logistics order volume sequence excluding the target object is constructed. Trend extrapolation calculation is performed again on the processed historical logistics order volume sequence to estimate the logistics order volume at the next moment, and it is marked as the second estimated logistics order volume. The difference between the second estimated logistics order volume and the actual logistics order volume at the next moment is calculated to obtain the second prediction error value. The difference operation is performed on the first prediction error value and the second prediction error value to generate the prediction deviation amplitude value; S103: The importance level of the target object is mapped according to the magnitude of the prediction deviation amplitude value, and a corresponding logistics demand contribution intensity identifier is assigned to each target object according to the importance level.
4. The logistics demand forecasting method based on artificial intelligence according to claim 1, characterized in that, Step S2 specifically comprises: S201: Sort all corresponding historical logistics lag demand quantities in descending order according to the magnitude of the logistics demand contribution intensity identifier, reconstruct the arrangement order of historical logistics lag demand quantities, and generate a logistics demand prediction influence order sequence; S202: Detect the position of each historical logistics lag demand quantity in the logistics demand prediction influence order sequence, and extract the sort number corresponding to the position as the arrangement position index; S203: Convert the arrangement position index into a numerical weight coefficient, calculate the numerical weight ratio of each historical logistics lag demand quantity, and set the corresponding logistics demand attention weight.
5. The logistics demand forecasting method based on artificial intelligence according to claim 1, characterized in that, Step S3 specifically comprises: S301: Obtaining the historical logistics lag demand quantity and the corresponding logistics demand attention weight for each historical logistics lag demand quantity and the logistics demand attention weight, and performing a product operation on the historical logistics lag demand quantity and the logistics demand attention weight to obtain a weighted logistics demand feature value; S302: According to the arrangement order in the logistics demand prediction influence order sequence, performing a vector concatenation operation on all the weighted logistics demand feature values to generate a multi-dimensional feature vector; S3 03: Identify each weighted logistics demand feature value that constitutes the multidimensional feature vector, calculate the statistical mean and standard deviation of all weighted logistics demand feature values and perform numerical standardization calculation, map the standardized weighted logistics demand feature values to a numerical coordinate system of a preset dimension, and generate a logistics demand status code.
6. The logistics demand forecasting method based on artificial intelligence according to claim 1, characterized in that, Step S4 specifically comprises: S401: Inputting the logistics demand state code into the Long Short-Term Memory network model, performing extrapolation calculations on the logistics order volume at each moment in the future time domain, connecting the extrapolated logistics order volumes at multiple future moments in chronological order to construct a continuous numerical curve reflecting the evolution trend of logistics order volume over time, extracting the trajectory coordinate set of the continuous numerical curve in the time coordinate system, and defining the trajectory coordinate set as the preliminary logistics demand prediction output path; S402: Performing first-order differential calculations on the curve trajectory of the preliminary logistics demand prediction output path on the time axis, obtaining the tangent slope of the preliminary logistics demand prediction output path at each time point, defining the tangent slope as the path gradient value, arranging the path gradient values in chronological order, and calculating the path gradient change rate between adjacent time points; S403: Mapping the continuous path gradient change rate as a state symbol representing the evolution direction and intensity of the logistics order volume prediction trend, generating a logistics prediction strategy trajectory identifier.
7. The logistics demand forecasting method based on artificial intelligence according to claim 1, characterized in that, Step S5 specifically comprises: S501: Collecting historical logistics forecasting strategy trajectory identifiers corresponding to multiple consecutive historical time periods, counting the occurrence frequency of each historical logistics forecasting strategy trajectory identifier, calculating the proportion of each occurrence frequency to the total number of collected historical logistics forecasting strategy trajectory identifiers, constructing a probability distribution, and filtering the distribution range of historical logistics forecasting strategy trajectory identifiers whose cumulative probability reaches a preset statistical confidence threshold based on the probability distribution, thereby obtaining the statistical confidence interval of the logistics forecasting strategy trajectory; S502: Determining whether the current logistics forecasting strategy trajectory identifier falls within the range of the statistical confidence interval of the logistics forecasting strategy trajectory. If the determination result is that it exceeds the statistical confidence interval of the logistics forecasting strategy trajectory, extracting the boundary value of the statistical confidence interval of the logistics forecasting strategy trajectory as a constraint condition, and obtaining the interval boundary constraint parameter; S503: Extracting the trajectory coordinate set that constitutes the preliminary logistics demand forecast output path, using the interval boundary constraint parameter to perform numerical adjustment calculations on the logistics order volume at future times in the trajectory coordinate set, correcting the numerical trend of the logistics order volume in the trajectory coordinate set over time, and generating the logistics demand forecast result.
8. The logistics demand forecasting method based on artificial intelligence according to claim 3, characterized in that, The process of mapping the importance level of a target object based on the magnitude of the predicted deviation amplitude is as follows: The predicted deviation amplitude values calculated for all target objects are statistically analyzed to construct a set of deviation values for all predicted deviation amplitude values. The maximum value in the set is identified as the upper limit of the distribution, and the minimum value is identified as the lower limit. The difference between the upper and lower limits is calculated to determine the global span of the deviation value distribution. Based on the global span, the numerical interval step size for classifying the levels is determined. Using the lower limit as the starting benchmark, the sum of the lower limit and a single numerical interval step size is calculated to obtain the first... The first boundary is determined by summing the lower limit of the distribution with a step size of twice the numerical interval. The second boundary is then calculated. For each target object, the prediction deviation magnitude is compared to both the first and second boundaries. If the prediction deviation magnitude is greater than or equal to the second boundary, the corresponding target object is marked as level one. If the prediction deviation magnitude is less than the second boundary but greater than or equal to the first boundary, the corresponding target object is marked as level two. If the prediction deviation magnitude is less than the first boundary, the corresponding target object is marked as level three.
9. The logistics demand forecasting method based on artificial intelligence according to claim 6, characterized in that, The process of mapping the continuous path gradient change rate to a state symbol representing the evolution direction and intensity of the logistics order volume prediction trend is as follows: Set positive and negative judgment thresholds, and construct three continuous numerical segment intervals centered on the zero point, combining the positive and negative judgment thresholds; define the range where the value is greater than the positive judgment threshold as the positive abrupt change interval, the range where the value is less than the negative judgment threshold as the negative abrupt change interval, and the range where the value is between the negative and positive judgment thresholds as the smooth transition interval; pre-configure three different discrete characters, establish mapping relationships between the discrete characters and the positive abrupt change interval, negative abrupt change interval, and smooth transition interval, and establish the discrete characters as state symbols; traverse each path gradient change rate in the sequence, detect the magnitude of the path gradient change rate, and determine the numerical segment interval to which the corresponding path gradient change rate belongs. Based on the judgment result, match the corresponding numerical segment interval, establish the state symbol that maps to the numerical segment interval, and replace the path gradient change rate.
10. An artificial intelligence-based logistics demand forecasting system, characterized in that, The system, executed according to any one of claims 1-9, comprises: a logistics demand acquisition and labeling module, which acquires the logistics order volume of a logistics distribution center at multiple consecutive historical time points, labels the logistics order volume at each historical time point as historical logistics lagging demand, and assigns a logistics demand contribution intensity identifier; an attention weight allocation module, which performs sorting processing on each historical logistics lagging demand based on the magnitude of the logistics demand contribution intensity identifier, and sets a corresponding logistics demand attention weight; a logistics demand state encoding module, which performs a product operation on each historical logistics lagging demand and the corresponding logistics demand attention weight to obtain weighted logistics demand features, and determines the logistics demand state encoding of all weighted logistics demand features; a logistics demand trend prediction module, which inputs the logistics demand state encoding into a long short-term memory network model, performs feature extraction on the logistics demand state encoding and performs inference on the changing trend of future logistics order volume, and generates a logistics prediction strategy trajectory identifier; and a prediction result correction module, which acquires the historical logistics prediction strategy trajectory identifiers corresponding to multiple consecutive historical time periods, compares them with the current logistics prediction strategy trajectory identifiers, performs regression correction, and obtains the logistics demand prediction result.