A system for predicting pickup time for a courier
By using a prediction system based on attention mechanisms and long short-term memory networks, the problem of unpredictable delivery times for couriers has been solved, achieving accurate pickup time prediction and improving user experience and company revenue.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTHEAST UNIV
- Filing Date
- 2023-04-12
- Publication Date
- 2026-05-29
AI Technical Summary
Existing pickup time prediction systems cannot accurately predict when couriers will arrive, leading to increased user anxiety and the likelihood of order cancellations.
By collecting historical data on delivery personnel and utilizing attention-based neural networks and long short-term memory networks, the pickup time of delivery personnel can be predicted. Combined with the dynamic and static features of AOI (Agency Detection and Interaction), accurate door-to-door delivery time predictions can be generated.
It reduced users' waiting anxiety, improved user experience, reduced order cancellations, optimized delivery personnel's work schedules, and increased the company's user satisfaction and revenue.
Smart Images

Figure CN116644834B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information technology, and in particular to a system for predicting the pickup time of courier services. Background Technology
[0002] With the rapid development of the mobile internet, online-to-offline (O2O) business has injected tremendous vitality into the logistics industry over the past few years. Currently, the logistics industry employs tens of millions of people, delivering hundreds of millions of packages daily. To adapt to the times, the traditional logistics industry has also introduced personalized services to improve user experience. Similar to door-to-door pickup services, users don't leave their homes. They simply submit a request on the app, and a courier will pick up the package at their door. Due to the real-time nature and location uncertainty of pickup tasks, couriers cannot plan routes in advance. In addition to pickup tasks, couriers have nearly 200 delivery tasks to complete daily. Therefore, to ensure timely delivery, couriers find it difficult to respond immediately to pickup requests. Furthermore, due to business process requirements, users need to wait for the courier to inspect the package and verify their identity. Accurately estimating pickup time is crucial for reducing user anxiety and improving user experience.
[0003] Existing research on pickup time prediction includes Estimated Time of Arrival (ETA) in transportation systems and trajectory prediction applications in logistics. However, these works are not applicable to the problem of pickup time prediction because pickup time in last-mile logistics is affected by two heterogeneous tasks (i.e., delivery and pickup) due to timeliness and uncertainty, while existing transportation ETA research focuses on one task; pickup time prediction should simultaneously consider the dwell time of the delivered package and the outdoor route time on the road, while existing logistics research focuses on route prediction and route time on the road.
[0004] After initiating a pickup request, users need to wait for the courier to arrive. However, in most cases, it is difficult to determine the courier's arrival time, and even asking the courier may not yield an accurate arrival time. To alleviate users' anxiety while waiting after placing an order and to prevent potential order cancellations and losses, a system for predicting courier pickup times was designed. Summary of the Invention
[0005] To address the aforementioned issues, this invention discloses a system for predicting pickup times for couriers. This system aims to alleviate user anxiety while waiting after placing an order, thereby reducing potential order cancellations and losses for the company.
[0006] The present invention provides a system for predicting the pickup time of a courier, comprising the following steps: Step (1) collecting historical pickup and delivery data of couriers, as well as data on work completion and courier trajectories, and aggregating delivery orders into the AOI dimension based on the address of the delivery order and the behavior of the courier to obtain the embedded expression of the AOI.
[0007] Step (2) uses a neural network prediction based on the attention mechanism to input the courier's pickup order location, current location, and unfinished AOI into the network to predict the courier's next AOI visit;
[0008] Step (3) Based on the embedded representation of each AOI and the predicted AOI to be visited by the courier, input them into the Long Short-Term Memory network to obtain the final delivery time.
[0009] Furthermore, in step (1), the step of determining the AOI to which the order belongs based on the delivery order address is as follows: Based on geocoding services, the text address information of the order is converted into coordinates, and a mapping between the order and the AOI is established by matching the order coordinates with the boundary fence information of the AOI. Some order addresses are written vaguely and cannot output the correct coordinates; therefore, the AOI information is determined through behavioral analysis methods.
[0010] Furthermore, in step (1), through feature completion, for some orders lacking latitude and longitude information, couriers generally deliver according to AOI granularity during the delivery process. That is, they only return to the next AOI after completing the delivery of one AOI order. The courier reports the order completion information after completing the delivery. Although there is a difference from the actual completion time, the relative time is relatively accurate. That is, the reporting time of the same AOI is generally earlier than the reporting time of the next AOI. Based on this characteristic, orders with large GIS deviations are identified to their respective AOIs.
[0011] Further, in step (1), the AOI embedding representation is generated. The AOI embedding representation mainly integrates the dynamic features of the AOI, such as order information, and the static features of the AOI, such as whether there is an elevator. The specific steps for generating the AOI embedding representation are as follows: For any AOI, the dynamic order features of the AOI are integrated using an attention mechanism. Specifically, for each AOI's order sequence O = {O1, O2, ..., O...} n |O n ∈A i}, using h i This represents the characteristics of each order. Before updating the weight of each order, the weight coefficient e between any two orders is calculated using the following formula. ij :
[0012]
[0013] For any order i, calculate its attention coefficient with other orders using the formula above. The formula combines the features of two orders i and j. and The correlation coefficient score is calculated by concatenating the results, and then passed through a ReLU activation function to obtain the overall correlation score. Finally, all correlation scores calculated with order i are normalized using softmax to determine the importance of other orders to order i.
[0014]
[0015] This approach takes into account the influence of other nodes on the importance of node i when updating it. The node update is performed using the following formula. Furthermore, a multi-head attention mechanism is utilized to capture more relationships between orders. In the formula, K represents the number of attention heads.
[0016]
[0017] Finally, for each order, a new expression of its own weight is obtained using the above formula. Subsequently, the dynamic order features of each AOI are aggregated using the following formula to obtain a new feature expression for each AOI. The aggregation method is to sum and average all order features.
[0018]
[0019] The static and dynamic features of AOI are combined by splicing to obtain a new expression of AOI features.
[0020] Furthermore, in step (2), a neural network based on an attention mechanism predicts the courier's AOI-level trajectory information. Based on the AOI of the courier's current order and the AOIs the courier still needs to deliver to, the courier's next AOI-level trajectory information is predicted. Since pickup tasks have strict time constraints, a pickup time prediction module based on an attention mechanism was designed. The specific steps are as follows: Assume the courier is currently in AOI A... i (A i (Indicates the i-th AOI), the pickup task is located in A. j The deliveryman still needs to go to A next. n A m Two AOIs were used to complete the delivery mission. This represents the embedding representation of the courier's current state. A score is calculated using the embedding representation of the current state and the embedding representation of the AOI to be acquired next. The highest score represents the courier's next AOI acquisition. However, as the deadline for pickup orders approaches, the courier's decision on the next AOI becomes more significant. Therefore, after the calculation, it needs to be multiplied by a weighting coefficient [1, 1, K], where K represents the position of the AOI where the pickup occurred. That is...
[0021]
[0022]
[0023]
[0024] If the next decision does not involve collection, then the corresponding K value will become K when the next decision involves AOI. 2 .
[0025] Furthermore, in step (3), the embedded representation of each AOI and the predicted AOI to be visited by the courier are input into the Long Short-Term Memory (LSTM) network to obtain the final delivery time. The LTM network mainly consists of three gates: the forgetting gate... t 、Enter the door i t Output gate o t and unit state C t Composition. Forget Gate f t Based on the output h from the previous moment t-1 And input x t To determine whether to remember the data C from the previous moment. t-1 Entering the door i t Based on the output h from the previous moment t-1 and feature values that include information such as environment, time, and historical data. Obtain, used to determine new information Which information needs to be added to the cell state C? t Output gate o t Based on the output h of the previous module t-1 and feature values that include information such as environment, time, and historical data. Determine the output unit state C t What information is needed to obtain the output h? t A neural network structure for nonlinear computation is implemented using the sigmoid activation function and the tanh hyperbolic tangent activation function. The predicted courier AOI-level trajectory information is input into a long short-term memory network to obtain the final embedded representation, and then input into a multilayer perceptron to obtain the final prediction time.
[0026] The beneficial effects of this invention are:
[0027] 1. For the company, it improves the user experience. Previously, the pickup system lacked time prediction capabilities, leaving users to wait. Even when users called the courier, it was difficult to get an accurate pickup time. This new system can analyze historical data to identify patterns in courier delivery behavior, providing a more precise time prediction. This reduces order cancellations caused by waiting.
[0028] 2. For users, it reduces waiting anxiety and allows them to better manage their time. After placing an order, users can better plan their time according to the pickup time given by the system, avoiding situations where pickup fails because the courier arrives when the user is not home. Attached Figure Description
[0029] Figure 1 System architecture diagram of courier pickup and delivery time;
[0030] Figure 2 : AOI embedded expression generator module;
[0031] Figure 3 : Courier route prediction and time output module. Detailed Implementation
[0032] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. It should be noted that the terms "front," "rear," "left," "right," "up," and "down" used in the following description refer to directions in the accompanying drawings, and the terms "inner" and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.
[0033] like Figure 1 The diagram shows the overall architecture of the courier pickup system. In the current scenario, the work mainly consists of three steps: data preprocessing and generating the embedded representation of the AOI, predicting the courier's AOI-level trajectory, and predicting the courier's pick-up time.
[0034] The first step is data preprocessing, matching orders with their corresponding AOIs (Areas of Interest). First, using a geocoding service, the text address information of the orders is converted into coordinates. By matching the order coordinates with the boundary fence information of the AOIs, a mapping between orders and AOIs is established. Some order addresses are written vaguely, preventing the output of correct coordinates; behavioral analysis methods are used to determine the corresponding AOI information.
[0035] Due to the limited address database for geocoding, some orders may not have corresponding GIS data. Feature completion is used to address this. For orders lacking latitude and longitude information, couriers typically deliver orders at the AOI (Area of Interest) level, completing one AOI order before moving on to the next. Couriers report order completion information upon completion, which, while differing from the actual completion time, is relatively accurate; the reporting time for the same AOI generally precedes the reporting time for the next AOI. Based on this characteristic, orders with significant GIS discrepancies are identified by their respective AOIs.
[0036] After obtaining the order for each AOI, the next step is to perform AOI embedding and expression fusion. For example... Figure 2 The diagram shows the specific steps. The AOI embedding representation mainly integrates the dynamic features of the AOI, such as order information, and the static features of the AOI, such as whether there is an elevator. The specific steps for generating the AOI embedding representation are as follows: For any AOI, use an attention mechanism to fuse the dynamic order features of the AOI. Specifically, for each AOI's order sequence O = {O1, O2, ..., O...} n |O n ∈A i}, using h i This represents the characteristics of each order. Before updating the weight of each order, the weight coefficient e between any two orders is calculated using the following formula. ij :
[0037]
[0038] For any order i, calculate its attention coefficient with other orders using the formula above. The formula combines the features of two orders i and j. and The correlation coefficient score is calculated by concatenating the results, and then passed through a ReLU activation function to obtain the overall correlation score. Finally, all correlation scores calculated with order i are normalized using softmax to determine the importance of other orders to order i.
[0039]
[0040] This approach takes into account the influence of other nodes on the importance of node i when updating it. The node update is performed using the following formula. Furthermore, a multi-head attention mechanism is utilized to capture more relationships between orders. In the formula, K represents the number of attention heads.
[0041]
[0042] Finally, for each order, a new expression of its own weight is obtained using the above formula. Subsequently, the dynamic order features of each AOI are aggregated using the following formula to obtain a new feature expression for each AOI. The aggregation method is to sum and average all order features.
[0043]
[0044] The static features of an Area of Interest (AOI) include information such as whether the AOI is in a building with an elevator, the height of the AOI, and the number of rooms on each floor. By incorporating environmental factors such as weather, holidays, and traffic conditions as static features into the AOI's embedding and fusion representation, a static feature representation of the AOI is obtained.
[0045] The static and dynamic features of AOI are combined by splicing to obtain a new expression of AOI features.
[0046] After obtaining the representation of the Area of Interest (AOI), attention is used to predict the AOI-level trajectory information of the delivery person. Specifically, as follows... Figure 3 As shown. The system predicts the courier's trajectory information at the AOI level based on the AOI of the order the courier is currently in, and the AOIs the courier still needs to deliver to. Since pickup tasks have strict time limits, a pickup time prediction module based on an attention mechanism was designed. The specific steps are as follows: Assume the courier is currently in AOI A... i (A i (Indicates the i-th AOI), the pickup task is located in A. j The deliveryman still needs to go to A next. n A m Two AOIs were used to complete the delivery mission. This represents the embedding representation of the courier's current state. A score is calculated using the embedding representation of the current state and the embedding representation of the AOI to be acquired next. The highest score represents the courier's next AOI acquisition. However, as the deadline for pickup orders approaches, the courier's decision on the next AOI becomes more significant. Therefore, after the calculation, it needs to be multiplied by a weighting coefficient [1, 1, K], where K represents the position of the AOI where the pickup occurred. That is...
[0047]
[0048]
[0049]
[0050] If the next decision does not involve collection, then the corresponding K value will become K when the next decision involves AOI. 2By continuously penalizing unfulfilled pickup tasks, we can more accurately simulate the work decisions of delivery drivers, thereby achieving better results.
[0051] Based on the embedded representation of each AOI and the predicted AOI for subsequent visits by the courier, the data is input into a Long Short-Term Memory (LSTM) network to obtain the final delivery time. The LTM network mainly consists of three gates: the forgetting gate... t 、Enter the door i t Output gate o t and unit state C t Composition. Forget Gate f t Based on the output h from the previous moment t-1 And input x t To determine whether to remember the data C from the previous moment. t-1 Entering the door i t Based on the output h from the previous moment t-1 and feature values that include information such as environment, time, and historical data. Obtain, used to determine new information Which information needs to be added to the cell state C? t Output gate o t Based on the output h of the previous module t-1 and feature values that include information such as environment, time, and historical data. Determine the output unit state C t What information is needed to obtain the output h? t A neural network structure for nonlinear computation is implemented using the sigmoid activation function and the tanh hyperbolic tangent activation function. The predicted courier AOI-level trajectory information is input into a long short-term memory network to obtain the final embedded representation, and then input into a multilayer perceptron to obtain the final prediction time.
[0052] Experimental results show that, unlike other time prediction algorithms, this algorithm achieves an error range of less than seven minutes in predicting time, demonstrating a significant improvement over other algorithms and greatly reducing user anxiety during waits. Deploying this system alleviates user anxiety and reduces the workload for delivery personnel who are pressured by customers to pick them up at the door. From a company perspective, improved user experience can lead to more orders and increased revenue.
[0053] The technical means disclosed in this invention are not limited to those disclosed in the above embodiments, but also include technical solutions composed of any combination of the above technical features.
Claims
1. A system for predicting the pickup and delivery time of a courier, characterized in that: Includes the following steps, Step 1: Collect historical pickup and delivery data of couriers, as well as reported work completion data and courier trajectory data. Aggregate delivery orders to the AOI dimension based on the delivery order address and courier behavior to obtain the AOI's embedded representation. The specific steps for generating the AOI's embedded representation in Step 1 are as follows: For any AOI, an attention mechanism is used to fuse the dynamic order features of the AOI; specifically, for each AOI's order sequence... ,use This indicates the characteristics of each order; Before updating the weight of each order, use the following formula to calculate the weight coefficient between each pair of orders. : ; For any order i, the attention coefficient between it and other orders is calculated using the above formula; the formula combines the features of two orders i and j. and The correlation coefficient score is calculated by concatenating the data, and then passed through an activation function ReLU to obtain the correlation score. Then, all the correlation scores calculated with order i are normalized using softmax to obtain the importance of other orders to order i. ; This takes into account the influence of other nodes on its importance when updating node i; the node update is performed using the following formula; in order to capture more relationships between orders, a multi-head attention mechanism is also used; in the formula, K represents the number of attention heads; ; Finally, for each order, a new expression of its own weight is obtained using the above formula; subsequently, the following formula is used to aggregate the dynamic order features of each AOI to obtain a new feature expression for each AOI. The aggregation method involves summing all order features and taking the average. ; The dynamic and static features of AOI are concatenated to obtain a new representation of AOI features. Step 2: Next, an attention-based neural network is used to predict the courier's next AOI by inputting the courier's pickup order location, current location, and unfinished AOIs into the network; the trajectory information of the courier's AOI granularity is predicted by the attention-based neural network in step (2); the specific steps are as follows: Assuming the deliveryman is currently in ; This indicates that the i-th AOI is in the pickup task position. The deliveryman still has to go to Two AOIs were used to complete the delivery mission; This represents the embedding representation of the courier's current state. A score is calculated using the embedding representation of the current state and the embedding representation of the AOI to be acquired next. The highest score represents the courier's next AOI acquisition. However, as the deadline for pickup orders approaches, the courier's decision on the next AOI becomes more significant. Therefore, after the calculation, a weighting coefficient [1, 1, K] needs to be multiplied, where K represents the position of the AOI where the pickup is located. ; If the next decision does not involve acquisition, then the corresponding K value will become [value missing] when making the next decision to engage in AOI (Agency for Identification and Investment). ; Step 3: Based on the embedded representation of each AOI and the predicted AOI to be visited by the courier in the future, input them into the Long Short-Term Memory network to obtain the final delivery time.
2. The system for predicting the pickup and delivery time of a courier according to claim 1, characterized in that: In step 1, the step of determining the AOI to which the order belongs based on the address of the delivery order is as follows: Based on geocoding service, the text address information of the order is converted into coordinates, and the mapping between the order and the AOI is established by matching the order coordinates with the boundary fence information of the AOI. Some order addresses were written vaguely, resulting in incorrect coordinates not being output. Behavioral analysis methods were used to determine the AOI information to which the order belongs.
3. The system for predicting the pickup and delivery time of a courier according to claim 2, characterized in that: By using feature completion, for some orders lacking latitude and longitude information, couriers generally deliver according to AOI granularity during the delivery process. That is, they only go to the next AOI after completing the delivery of one AOI order. The courier will report the order completion information after the delivery is completed. Although there is a difference from the actual completion time, the relative time is relatively accurate. That is, the reporting time of the same AOI is generally earlier than the reporting time of the next AOI. Based on this characteristic, orders with large GIS deviations are identified to their respective AOIs.
4. The prediction system for predicting the pickup time of a courier as described in claim 1, characterized in that: In step (3), the embedded representation of each AOI and the predicted AOI to be visited by the courier are input into the Long Short-Term Memory (LSTM) network to obtain the final delivery time. The LTM network mainly consists of three gates: the forget gate and the forget gate. , Enter the door Output gate and unit state Composition; Forget Gate Based on the output of the previous time step And input To determine whether to memorize data from the previous moment. ; Enter the gate Based on the output of the previous time step and feature values that include environmental, temporal, and historical data information. Obtain, used to determine new information Which information needs to be added to the cell status? ; Output gate Based on the output of the previous module and feature values that include environmental, temporal, and historical data information. Determine the output unit status What information is needed to obtain the output? The sigmoid activation function and the tanh hyperbolic tangent activation function are used to solve the problem and realize a neural network structure for nonlinear operation. The predicted trajectory information of the courier AOI granularity is input into the long short-term memory network to obtain the final embedded expression, and then input into the multilayer perceptron to obtain the final prediction time.