A digital twin-based prediction method for the arrival of small packages at logistics transfer stations
By building a digital twin logistics network, collecting package and truck information in real time and using the LSTM model for prediction, the shortcomings of traditional prediction methods in logistics transfer stations are solved, high-precision and efficient package arrival prediction is achieved, and logistics sorting efficiency is improved.
Patent Information
- Application Number
- CN202510455061.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-04-11
AI Technical Summary
Traditional package arrival prediction methods in logistics transfer stations have problems such as insufficient data real-time performance, poor dynamic adaptability, and limited prediction accuracy, which affect the sorting efficiency of logistics transfer stations.
By building a logistics network based on digital twins, collecting package and truck information in real time, synchronizing multi-source data using message queues, and combining long-short-term memory network models to predict package arrival time, quantity, and distribution, we can achieve real-time data, dynamic adaptability, and high-precision prediction.
It improves the real-time and prediction accuracy of the arrival of small packages at logistics transfer stations, and improves logistics sorting efficiency.
Smart Images

Figure CN119962771B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of logistics, and in particular to a method for predicting the arrival of small packages at a logistics transfer station based on digital twins. Background Art
[0002] With the rapid development of e-commerce and the logistics industry, parcel sorting efficiency at logistics transfer stations has become a key factor affecting logistics timeliness. Traditional methods for predicting parcel arrival rely primarily on historical data statistics or simple time series models. These methods suffer from deficiencies such as insufficient real-time data availability, poor dynamic adaptability, and limited prediction accuracy, severely restricting the sorting efficiency of logistics transfer stations. In recent years, the application of digital twin technology in the logistics field has provided a new solution for real-time monitoring and accurate prediction. However, combining real-time data with artificial intelligence algorithms to accurately predict parcel arrival time, volume, and distribution remains a pressing technical challenge. Summary of the Invention
[0003] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a prediction method for the arrival of small packages at logistics transfer stations based on digital twins.
[0004] The purpose of the present invention is achieved through the following technical solution: a method for predicting the arrival of small packages at a logistics transfer station based on digital twin, comprising the following steps:
[0005] S1. For the inclusion A package, Networks and The logistics network of the logistics transfer station is defined as follows: , and ;
[0006] S2. Each branch collects package information in real time through the logistics information system and uploads it to the logistics network's digital twin platform at preset intervals.
[0007] S3. Assume that there are Trucks travel back and forth between various outlets and logistics transfer stations, collecting truck information in real time and transmitting it to the digital twin platform via the vehicle network;
[0008] S4. The digital twin platform receives data from network points and trucks in real time using a message queue method. It then uses timestamp alignment technology to synchronize multi-source data to the same timeline, generating a fused feature vector.
[0009] S5. After receiving all the data, the digital twin platform preprocesses the data and builds a long-short-term memory network model to predict truck arrival time, package volume, and destination distribution.
[0010] The beneficial effects of the present invention are: the present invention provides a digital twin small package arrival prediction method for the important core component of small packages in the logistics transfer station, which has high real-time performance, dynamic adaptability and prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 Flow chart of the method of the present invention. DETAILED DESCRIPTION
[0012] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings, but the protection scope of the present invention is not limited to the following.
[0013] like Figure 1 As shown in FIG, a method for predicting the arrival of small packages at a logistics transfer station based on digital twins includes the following steps:
[0014] S1. For the inclusion A package, Networks and The logistics network of the logistics transfer station is defined as follows: , and ;
[0015] S2. Each branch collects package information in real time through the logistics information system and uploads it to the logistics network's digital twin platform at preset intervals.
[0016] First, each branch collects the package's destination, weight, volume, and other information in real time through the logistics information system and uploads it to the logistics network's digital twin platform at preset intervals. The package's specific information is as follows:
[0017] (1) Package destination: The destination of each package is represented as a vector using one-hot encoding , there is only one element in the vector that is 1, and Indicates that the destination of the package is A logistics transfer station.
[0018] (2) Package attributes: Networks at time Sent to The weight set and volume set of the packages in a logistics transfer station are expressed as and ,in and Respectively represent the first The weight and volume of the package, Indicates the number of packages in this batch. , , .
[0019] (3) Package flow: Nodes in the time window Send within The number of packages in a logistics transfer station is established as a parameter Poisson distribution, that is ,in For unit time, The network is sent to The average number of packages per logistics transfer station.
[0020] Define the probability mass function of the destination, which means the package is sent by m The network flows to the n The probability of a logistics transfer station is recorded as:
[0021] (1).
[0022] S3. Assume that there are Trucks travel back and forth between various outlets and logistics transfer stations, collecting truck information in real time and transmitting it to the digital twin platform via the vehicle network;
[0023] Assume that there are Trucks travel back and forth between various outlets and logistics transfer stations. For ease of description, the truck set is defined as To collect dynamic data from each truck, each truck is equipped with a GPS system and onboard sensors to collect real-time information such as departure time, travel time, route, location, and speed. This information is then transmitted to the digital twin platform via the onboard network. The specific information about the trucks is shown below:
[0024] (1) Basic properties of trucks: Trucks at time The position and velocity information are recorded as and , and record its route as .
[0025] (2) Truck departure time: Truck No. The departure time at each station is recorded as , and modeled as ,in Expressed as a normal or empirical distribution.
[0026] (3) Truck driving time: The truck was Drive to the first point The travel time of a logistics transfer station is recorded as , and modeled as a lognormal distribution, i.e. ,in and Obtained from historical data.
[0027] S4. The digital twin platform receives data from network points and trucks in real time through a message queue method and synchronizes the multi-source data to the same timeline using timestamp alignment technology. The feature vector after data fusion is recorded as:
[0028] (2)
[0029] in, For the Parcel attribute data for each outlet, including the parcel quantity , average weight and average volume , expressed as ; Indicates that it comes from Time data for trucks, including departure times , driving time , speed information , location information , and driving routes , expressed as:
[0030] .
[0031] S5. After receiving all the data, the digital twin platform preprocesses the data and builds a long-short-term memory network model to predict truck arrival time, package volume, and destination distribution.
[0032] To ensure the validity of the data, the digital twin platform preprocesses the data after receiving it. The main process is as follows:
[0033] (1) Data cleaning: The interquartile range method is used to detect and identify outliers in package weight and volume, and linear interpolation is used to supplement missing truck travel data.
[0034] (2) Data standardization: Z-score normalization is performed on numerical values such as the number of packages, truck travel time, weight, and volume, and the destination is uniquely encoded as an input feature for subsequent models.
[0035] (3) Time series feature matrix: Construction , contains all the data for packages and trucks, where is the number of time steps, is the feature dimension of the data fusion vector.
[0036] Next, we build a long short-term memory (LSTM) network model to predict truck arrival time, package volume, and destination distribution. The network architecture consists of an input layer, a bidirectional LSTM layer, an attention mechanism layer, and a fully connected layer:
[0037] The constructing of the long short-term memory network model includes:
[0038] (1) Input layer: From the time series feature matrix Extract the data for each time step ;
[0039] (2) Bidirectional LSTM layer: Use forward LSTM and backward LSTM to capture the dependency between past time steps and future time steps respectively. The specific calculation formula is:
[0040] (3)
[0041] (4)
[0042] in, and down arrow Represent the input received by the forward LSTM and the backward LSTM at the tth time step, respectively. They are only formal representations and are numerically the same as same, and The forward LSTM and the backward LSTM are respectively The hidden state of contains important information from the beginning of the sequence to the current time step and is updated as the time step progresses, merging the two dependencies into a bidirectional hidden state:
[0043] (5)
[0044] (3) Attention mechanism layer: calculating time steps and The attention weight between , the specific calculation formula is:
[0045] (6)
[0046] (7)
[0047] in, and Whether to indicate the time step and The bidirectional hidden state of is a learnable weight matrix, is a vector of science departments used to calculate the attention score , calculate the following vector based on the attention weight:
[0048] (8)
[0049] (4) Fully connected layer: First, the truck dynamic data features are integrated and output through the linear layer As the prediction of truck arrival time, Indicates the predicted The arrival time of the trucks; secondly, the weight and volume features are combined and output through a fully connected layer with a ReLu activation function To get the package quantity forecast, where Indicates the predicted arrival time The calculation formula for the number of parcels per transfer station is:
[0050] (9)
[0051] in, is the weight matrix, is the bias term; finally, the probability distribution of the destination is output through the Softmax layer :
[0052] (10)
[0053] in, is the output of the fully connected layer, is the attention coefficient; It is a discrete probability distribution with M elements, each element represents the probability that the package comes from the mth network point;
[0054] Forecast truck arrival times, package volumes, and destination distribution:
[0055] A1. Design the loss function as shown in formula (11)
[0056] (11)
[0057] in, is the weight coefficient, and denote the actual and predicted truck arrival times, The real The arrival time of the truck, and Represent the actual and predicted number of parcel arrivals, Indicates the real arrival The number of parcels at the transfer station, and denote the true and predicted destination probability distributions respectively; here, and Respectively represent the minimum mean square error function and the cross entropy function, and their expressions are:
[0058] (12)
[0059]
[0060] in, , , and represent the true value and the predicted value respectively, For the i The real time step 、 、 The vector , For the i Time step prediction 、 、 The vector ; Represents the time step length of the vector;
[0061] In the embodiment of the present application, it is necessary to combine the cosine annealing learning rate scheduling method to standardize the prediction results and restore them to actual physical quantities;
[0062] A2. Use the feedback loop of the long short-term memory network model (the feedback loop refers to the backpropagation process in the LSTM network) to update the parameters in the digital twin model in real time, forming a closed-loop optimization.
[0063] A3. Repeat steps A1 to A2 until the loss function If the value is less than the set threshold, the model converges and a trained prediction model is obtained;
[0064] A4. Input the Z time step data fusion vector into the trained prediction model to obtain the prediction result.
[0065] The foregoing description is a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein and should not be construed as excluding other embodiments. Instead, the present invention can be used in other combinations, modifications, and environments and can be modified within the scope of the concept described herein through the above teachings or techniques or knowledge in the relevant field. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention are intended to be protected by the appended claims.
Claims
1. A method for predicting the arrival of small packages at a logistics transfer station based on digital twins, characterized by: The following steps are involved: S1. For the inclusion A package, Networks and The logistics network of the logistics transfer station is defined as follows: , and ; S2. Each branch collects package information in real time through the logistics information system and uploads it to the logistics network's digital twin platform at preset intervals. S3. Assume that there are a total of Trucks travel back and forth between various outlets and logistics transfer stations, collecting truck information in real time and transmitting it to the digital twin platform via the vehicle network; S4. The digital twin platform receives data from network points and trucks in real time using a message queue method. It then uses timestamp alignment technology to synchronize multi-source data to the same timeline, generating a fused feature vector. S5. After receiving all the data, the digital twin platform preprocesses it and builds a long-short-term memory network model to predict truck arrival times, package volume, and destination distribution. The data preprocessing in step S5 includes: Data cleaning: We use the interquartile range method to detect and identify outliers in package weight and volume, and use linear interpolation to supplement missing truck travel data. Data normalization: Z-score normalization is performed on numerical parameters such as parcel quantity, truck travel time, weight, and volume; Time series feature matrix: construction , contains all the data for packages and trucks, where is the number of time steps, is the feature dimension of the data fusion vector; The input of the long short-term memory network model is the time series feature matrix Extract the data for each time step , the output is the truck arrival time , parcel volume forecast and the probability distribution of the destination ;in Indicates the predicted The arrival time of the truck, ; Indicates the predicted arrival time The number of parcels at the transfer station, ;Will 、 、 The vector is the output of the long short-term memory network model.
2. The method for predicting the arrival of small packages at a logistics transfer station based on digital twins according to claim 1 is characterized by: The package information in step S2 includes: Package destination: The destination of each package is represented as a vector using one-hot encoding , there is only one element in the vector that is 1, and Indicates that the destination of the package is logistics transfer stations; Package attributes: Networks at time Sent to The weight set and volume set of the packages in a logistics transfer station are expressed as and ,in and Respectively represent Networks at time Sent to The first package in the logistics transfer station The weight and volume of the package, Indicates the Networks at time Sent to The number of packages at the logistics transfer station, , , ; Package flow: Nodes in the time window Send within The number of packages in a logistics transfer station is established as a parameter Poisson distribution, that is ,in For unit time, The network is sent to The average number of packages in the logistics transfer station; define the probability mass function of the destination, which means the package is transferred from the first m The network flows to the n The probability of a logistics transfer station is recorded as: (1)。 3. The method for predicting the arrival of small packages at a logistics transfer station based on digital twins according to claim 1 is characterized by: The truck information in step S3 includes: Basic properties of trucks: Trucks at time The speed and position information are recorded as and , and record its route as ; Truck departure time: Truck No. The departure time at each station is recorded as , and modeled as ,in Expressed as a normal or empirical distribution; Truck driving time: The truck was Drive to the first point The travel time of a logistics transfer station is recorded as , and modeled as a lognormal distribution, i.e. ,in and Obtained from historical data, for ease of representation, a travel time set is constructed .
4. The method for predicting the arrival of small packages at a logistics transfer station based on digital twins according to claim 1 is characterized by: The data fusion vector described in step S4 is recorded as: (2) in, For the Parcel attribute data for each outlet, including the parcel quantity , weight set and volume collection , expressed as: ; Indicates that it comes from Time data for trucks, including departure times , driving time , speed information , location information , and driving routes , expressed as: 。 5. The method for predicting the arrival of small packages at a logistics transfer station based on digital twins according to claim 1 is characterized by: The prediction of truck arrival time, package volume, and destination distribution includes: A1. Design the loss function as shown in formula (11) (11) in, is the weight coefficient, and denote the actual and predicted truck arrival times, The real The arrival time of the truck, and Represent the actual and predicted number of parcel arrivals, Indicates the real arrival The number of parcels at the transfer station, and denote the true and predicted destination probability distributions respectively; here, and Respectively represent the minimum mean square error function and the cross entropy function, and their expressions are: (12) in, , , and represent the true value and the predicted value respectively, For the i The real time step 、 、 The vector , For the Time step prediction 、 、 The vector ; Represents the time step length of the vector; A2. Update the parameters of the digital twin model in real time through the feedback loop of the long short-term memory network model, forming a closed-loop optimization; A3. Repeat steps A1 to A2 until the loss function If the value is less than the set threshold, the model converges and a trained prediction model is obtained; A4. Input the Z time step data fusion vector into the trained prediction model to obtain the prediction result.
Citation Information
Patent Citations
Knowledge graph-based packaging paper digital twin production line construction method
CN117057751A
Data processing method and device, equipment and storage medium
CN118536883A