Multi-granularity graph learning system for cross-city logistics demand prediction
By designing a user-level invariant representation module and a dynamic edge-enhanced area update module in cross-city logistics demand forecasting, combined with meta-learning methods, the problems of data sparsity and dynamic behavior modeling are solved, improving forecast accuracy and improving the logistics system. resource scheduling efficiency.
Patent Information
- Application Number
- CN202410748225.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-10
AI Technical Summary
There is a problem of data sparsity in cross-city logistics demand forecasting. Existing methods are difficult to effectively model the invariant representation of seed users in logistics platforms and the dynamic behavior between users, resulting in insufficient forecast accuracy and reliability.
A user-level invariant representation module and a dynamic edge-enhanced region update module are designed to obtain invariant user representation through Gaussian embedding and Monte Carlo sampling methods, and combine the graph attention network and exponential decay method to integrate dynamic edge information to enhance user embedding. ; In the prediction stage, a meta-learning method is used to adjust knowledge to adapt to the spatiotemporal characteristics of the target city, and model parameters are shared among multiple cities through adaptive parameter update learning.
It improves the accuracy and reliability of logistics demand prediction in target cities. Experimental results show that compared with the state-of-the-art methods on the logistics package collection data sets of Beijing, Shanghai, Zhengzhou and other cities, the performance is improved by 7.36%, 13.67%, and 5.61%, and Improved accuracy of courier allocation and resource scheduling.
Smart Images

Figure CN118627675A
Abstract
Description
Technical Field
[0001] The present invention relates to a multi-granularity graph learning system for cross-city logistics demand forecasting, and belongs to the technical field of computer intelligent computing and application. Background Art
[0002] Logistics platforms have become a key link between buyers and sellers. Accurately predicting regional logistics demand is essential to optimize delivery resources, improve service quality, and further increase revenue. Logistics demand is divided into the pickup and delivery of goods, corresponding to the collection and delivery services that need to be provided. However, a major problem arises when dealing with different business users across multiple cities, such as retailers, manufacturers, and online sellers. The different market shares of logistics platforms between cities lead to significant differences in the sparsity of the obtained logistics data. This difference directly affects the accuracy and reliability of logistics demand prediction. Cross-city methods have emerged to address the problem of data sparsity and have been widely used in the industry, such as traffic flow prediction, cross-domain recommendation. However, there are still challenges when applied to cross-city logistics demand prediction. First, the same user may have logistics needs in different cities, because some users may have branches or warehouses in multiple cities. Second, the logistics demand of a region depends on the user group in the region. The demand for providing or delivering services is closely related to user behavior. Third, by leveraging feature adaptation of seed users, the structural knowledge of the user graph is transferred from the source city to the target city, achieving feature enhancement, especially when the user profiles in the target city are sparse. Logistics demand forecasting is a typical multi-granularity graph prediction problem, considering the hierarchical relationship between users and regions in logistics platforms. In recent years, multi-granularity graph learning has attracted widespread attention in various fields, including computer vision and urban computing. However, these works mainly rely on the assumption that node features are rich and consistent, and since most studies focus on data in the same field, it is difficult to adapt to the situation where only sparse labels are available. To overcome this limitation, researchers have explored cross-city prediction transfer learning methods. However, these methods have difficulties in effectively modeling the invariant representation of seed users and the dynamic behaviors between users in logistics platforms. Summary of the invention
[0003] To improve the accuracy of demand forecasting in target cities, it is critical to understand how these factors affect demand and create city-adaptive knowledge sharing that considers the unique characteristics of target cities. Specifically, to obtain invariant user representations, in the adaptation phase, a user-level invariant representation module is designed to obtain the feature representation of seed users and merge seed users from different cities into a unified and invariant representation. In addition, to incorporate dynamic user behaviors, a region update strategy with user-edge dynamic enhancement is proposed, which combines dynamic edge information (such as logistics behavior) with static edges to enhance user embedding. In the prediction phase, to achieve accurate prediction of the target city, a meta-learning-based multi-city knowledge transfer module is designed to fine-tune the meta-knowledge using data from the target city to ensure that the obtained meta-knowledge captures the unique characteristics of the target city's data distribution.
[0004] A multi-granularity graph learning system for cross-city logistics demand forecasting includes an adaptation phase and a prediction phase.
[0005] The adaptation phase aims to establish consistent and invariant seed user embeddings between the source and target domains, and effectively capture the dynamics of the logistics relationships between users, integrate the changing logistics relationships between users and update the region embeddings to enhance the user graph;
[0006] The prediction phase aims to adjust the meta-knowledge to make it consistent with the spatiotemporal characteristics of the target city, to effectively utilize the meta-knowledge when data is scarce, and to learn model parameters shared among multiple cities through adaptive parameter updates;
[0007] As an improvement of the present invention, the adaptation stage includes a user-level invariant representation module and a dynamic edge enhancement region update module.
[0008] The user-level invariant representation module aims to fully integrate logistics information and preserve the uncertainty and periodic characteristics of user behavior in the initial user embedding. First, the user's sequence and attributes are encoded, and the uncertainty is preserved through the Gaussian distribution representation of the expected embedding matrix and the covariance embedding matrix. Specifically, four embedding matrices U, P, V, and Q are initialized, each with a size of R m×d , respectively represent the Gaussian mean vector and variance vector of sequence encoding and attribute encoding. In order to obtain the Gaussian embedding and attribute encoding of the demand sequence, the Monte Carlo sampling method is used. t The calculation is as follows:
[0009]
[0010] Where ELU(·) represents the exponential linear unit function, h tis the logistics demand sequence code, δ is the auxiliary noise variable, Then use the same method to encode the logistics attributes h a After processing, we get g a ,Finally, the initial user embedding is represented as Where |u| is the number of users.
[0011] For logistics demand sequence encoding h t , using an encoder from the node logistics demand sequence d = {d1, d2, ..., d n} to extract multi-scale features:
[0012]
[0013] Here, γ takes two values: s and l, corresponding to the number of dilated convolution operations for short-term and long-term features, respectively, and W s and W t is a learnable weight matrix, and is the bias term, defined as for and The splicing of
[0014] For logistics attribute encoding h a , user attributes are divided into static attributes and dynamic attributes. In the last mile logistics, dynamic attributes refer to the extraction and delivery information, while static attributes include industry attributes related to users. To encode these attributes, for user i, the static representation is obtained by using a One-Hot encoder. For the dynamic attribute set It is related to the user and his / her n Specifically, As a marker, used to generate a set of probability values for dynamic representation As shown below:
[0015]
[0016] The attribute with the highest probability is selected as the representative value of the dynamic attribute, that is, Finally, the encoded dynamic attributes are concatenated with the static attributes to obtain the final user attribute encoding h a ∈R d , where d is the dimension of the vector.
[0017] Next, we use a Graph Attention Network (GAT) to perform convolution operations on the user graph constructed by users from different city domains, ensuring that the representation of seed users takes into account multi-hop neighbor relationships and achieves a more aligned embedding distribution of the same seed users in different city domains. Specifically, for For each user in, their initial embedding set In order to capture the impact of multi-hop neighbors on user embedding, we propose an invariant user alignment method that uses GAT to embed The nodes are embedded and integrated. The attention coefficient is calculated as follows
[0018]
[0019] in, represents the set of neighbor nodes in the user graph. The fused embedding is expressed as where σ(·) represents the activation function, and is a learnable weight matrix. Then the maximum mean difference in embedding between two seed users in the source city and the target city is calculated as follows:
[0020]
[0021] Here, φ(·) is the Gram matrix of all possible kernels in the data space, and a Gaussian kernel is used. and Set of node embeddings representing different cities.
[0022] As an improvement of the present invention, in the dynamic edge enhancement region update module, firstly, the set of all static edges in a city is represented as A s , the set of dynamic edges is represented as in Indicates t n The dynamic edge matrix at time.
[0023] To enhance user embeddings, their dynamic edges are exploited to gain a deeper understanding of user interactions and behavior patterns. In a dynamic user graph, the graph sequence distances between time t n The closer it is, the more accurately it can reflect the current state of the user node. Therefore, an exponential decay method is used to enhance dynamic edges. The weight of each dynamic edge is determined by an exponential decay function that takes into account the time difference between the arrival time and the current time. If a dynamic edge is k Arrived, then at the current time point t n The weight w dDefined as w(t k ,t n )=expy-λ(t n -t k )|, where λ is a hyperparameter that controls the decay rate, and λ is set to 0.3. For each static edge, the weights of all the dynamic edges connected to it are accumulated to obtain the new weight of the updated static edge:
[0024]
[0025] in, is the updated adjacency matrix of the user graph. Subsequently, GAT is used to recompute the node embeddings to obtain the final representation Reflects the enhancement of dynamic logistics information.
[0026] In order to capture the correlation and consistency between multi-granularity nodes and achieve unified embedding of urban areas, this paper proposes a regional update method based on differentiable pooling, which uses differentiable pooling to generate embeddings, captures the characteristics of the corresponding regions, and realizes the aggregation and transmission of complex patterns and information from users to regions, so that regions can globally interpret users. Specifically, the clustering assignment matrix from users to regions is recorded as It uses the embedding representation of user nodes and the adjacency matrix Initialize. Each row of S corresponds to n u user nodes, each column of S corresponds to n z region nodes. Given the adjacency matrix of the user graph and embed calculate Coarsen the input graph and generate a new rough adjacency matrix and the new embedding matrix H for each node / cluster in this rough graph z :
[0027]
[0028] In order to ensure the rationality of the learning process of the aggregation matrix S, supervision information is incorporated from the original spatial distribution matrix of each region. Specifically, the aggregation loss is calculated using the cross entropy function:
[0029]
[0030] As an improvement of the present invention, the prediction stage includes multi-city knowledge transfer and model training and prediction.
[0031] The multi-city knowledge transfer aims to refine the meta-knowledge using a model-independent meta-learning method to make it consistent with the spatiotemporal characteristics of the target city, so as to effectively utilize the meta-knowledge in the case of sparse data. The parameter θ is initially set based on multiple source cities to minimize Average generalization loss over all source cities.
[0032]
[0033] In the above formula, α represents the learning rate, Represents the task set. Accurate spatiotemporal prediction relies on city-specific spatiotemporal patterns that reflect the spatial characteristics of each urban area. However, limited data may hinder pattern capture due to missing values or special events in the target urban area. Therefore, the present invention utilizes a dynamic graph convolutional network to extract long-term spatiotemporal patterns to fine-tune the target urban area and improve prediction accuracy. At each moment in the past time τ, the regional atlas of the target urban area The spatial features of the nodes are extracted through GCN, and the temporal features are extracted through LSTM. Then, the extracted spatiotemporal features of the target urban area are combined with meta-knowledge using a residual mechanism to obtain spatiotemporal meta-parameters. The feature extraction module usually includes convolution and linear networks, and the method of generating parameters at each layer has been fully confirmed.
[0034] As an improvement of the present invention, the model training and prediction learns the model parameters shared among multiple cities through adaptive parameter update. In order to consider domain adaptation, user alignment and regional update are utilized while minimizing the loss function. The specific steps are as follows:
[0035]
[0036] in, represents the user alignment loss function in the adaptation phase, represents the loss function of regional updates in the adaptation phase, λ1 and λ2 are hyperparameters for user alignment and regional level updates. In the fine-tuning phase of the prediction task for the target city, the mean square error (MSE) is used as the objective function, in is the predicted value and y2 is the true value.
[0037] Beneficial effects: The present invention studies the work of cross-city logistics demand prediction, proposes the idea of learning invariant representations in dynamic user graphs, and demonstrates progress in cross-city logistics demand modeling. In order to obtain invariant user representations, a novel user alignment network is developed, which uses Gaussian embedding to fuse multi-type features and align seed users. In order to solve the problem of dynamic user behavior embedding, a regional update method is designed to integrate dynamic edge information into static edges through user-edge dynamic enhancement, thereby obtaining meta-knowledge that can be used for cross-city transfer. The present invention collects real logistics service data and conducts a large number of experiments. By comparing the symmetric mean absolute percentage error (SMAPE) indicator, the prediction results show that in the SMAPE indicator, the present invention improves the performance of logistics collection data sets in Beijing, Shanghai, and Zhengzhou by 7.36%, 13.67%, and 5.61% respectively compared with the most advanced methods. The advanced prediction performance of the present invention can be used to predict the logistics needs of hundreds of specific cities every day. The prediction results are used for courier allocation and resource scheduling in the logistics system, which improves the accuracy of courier scheduling in the last mile logistics system. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is a detailed framework diagram of a multi-granularity graph learning method for cross-city logistics demand forecasting in the present invention. DETAILED DESCRIPTION
[0039] The present invention will be further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0040] Embodiment 1: A multi-granularity graph learning system for cross-city logistics demand forecasting, including an adaptation phase and a forecasting phase.
[0041] The adaptation phase aims to establish consistent and invariant seed user embeddings between the source and target domains, and effectively capture the dynamics of the logistics relationships between users, integrate the changing logistics relationships between users and update the region embeddings to enhance the user graph;
[0042] The prediction phase aims to adjust the meta-knowledge to make it consistent with the spatiotemporal characteristics of the target city, to effectively utilize the meta-knowledge when data is scarce, and to learn model parameters shared among multiple cities through adaptive parameter updates;
[0043] Wherein, the adaptation stage includes a user-level invariant representation module and a dynamic edge enhancement region update module.
[0044] The user-level invariant representation module aims to fully integrate logistics information and preserve the uncertainty and periodic characteristics of user behavior in the initial user embedding. First, the user's sequence and attributes are encoded, and the uncertainty is preserved through the Gaussian distribution representation of the expected embedding matrix and the covariance embedding matrix. Specifically, four embedding matrices U, P, V, and Q are initialized, each with a size of R m×d , respectively represent the Gaussian mean vector and variance vector of sequence encoding and attribute encoding. In order to obtain the Gaussian embedding and attribute encoding of the demand sequence, the Monte Carlo sampling method is used. t The calculation is as follows:
[0045]
[0046] Where ELU(·) represents the exponential linear unit function, h t is the logistics demand sequence code, δ is the auxiliary noise variable, Then use the same method to encode the logistics attributes h a After processing, we get g a ,Finally, the initial user embedding is represented as Where |u| is the number of users.
[0047] For logistics demand sequence encoding h t , using an encoder from the node logistics demand sequence d = {d1, d2, ..., d n} to extract multi-scale features:
[0048]
[0049] Here, γ takes two values: s and l, corresponding to the number of dilated convolution operations for short-term and long-term features, respectively, and W s and W t is a learnable weight matrix, and is the bias term, defined as for and The splicing of
[0050] For logistics attribute encoding h a , user attributes are divided into static attributes and dynamic attributes. In the last mile logistics, dynamic attributes refer to the extraction and delivery information, while static attributes include industry attributes related to users. To encode these attributes, for user i, the static representation is obtained by using a One-Hot encoder. For the dynamic attribute set It is related to the user and his / her nSpecifically, As a marker, used to generate a set of probability values for dynamic representation As shown below:
[0051]
[0052] The attribute with the highest probability is selected as the representative value of the dynamic attribute, that is, Finally, the encoded dynamic attributes are concatenated with the static attributes to obtain the final user attribute encoding h a ∈R d , where d is the dimension of the vector.
[0053] Next, we use a Graph Attention Network (GAT) to perform convolution operations on the user graph constructed by users from different city domains, ensuring that the representation of seed users takes into account multi-hop neighbor relationships and achieves a more aligned embedding distribution of the same seed users in different city domains. Specifically, for For each user in, their initial embedding set In order to capture the impact of multi-hop neighbors on user embedding, we propose an invariant user alignment method that uses GAT to embed The nodes are embedded and integrated. The attention coefficient is calculated as follows
[0054]
[0055] in, represents the set of neighbor nodes in the user graph. The fused embedding is expressed as where σ(·) represents the activation function, and is a learnable weight matrix. Then the maximum mean difference in embedding between two seed users in the source city and the target city is calculated as follows:
[0056]
[0057] Here, φ(·) is the Gram matrix of all possible kernels in the data space, and a Gaussian kernel is used. and Set of node embeddings representing different cities.
[0058] In the dynamic edge enhancement region update module, the set of all static edges in a city is first represented as A s , the set of dynamic edges is represented as in Indicates t n The dynamic edge matrix at time.
[0059] To enhance user embeddings, their dynamic edges are exploited to gain a deeper understanding of user interactions and behavior patterns. In a dynamic user graph, the graph sequence distances between time t n The closer it is, the more accurately it can reflect the current state of the user node. Therefore, an exponential decay method is used to enhance dynamic edges. The weight of each dynamic edge is determined by an exponential decay function that takes into account the time difference between the arrival time and the current time. If a dynamic edge is k Arrived, then at the current time point t n The weight w d Defined as w(t k ,t n )=expy-λ(t n -t k )|, where λ is a hyperparameter that controls the decay rate, and λ is set to 0.3. For each static edge, the weights of all the dynamic edges connected to it are accumulated to obtain the new weight of the updated static edge:
[0060]
[0061] in, is the updated adjacency matrix of the user graph. Subsequently, GAT is used to recompute the node embeddings to obtain the final representation Reflects the enhancement of dynamic logistics information.
[0062] In order to capture the correlation and consistency between multi-granularity nodes and achieve unified embedding of urban areas, this paper proposes a regional update method based on differentiable pooling, which uses differentiable pooling to generate embeddings, captures the characteristics of the corresponding regions, and realizes the aggregation and transmission of complex patterns and information from users to regions, so that regions can globally interpret users. Specifically, the clustering assignment matrix from users to regions is recorded as It uses the embedding representation of user nodes and the adjacency matrix Initialize. Each row of S corresponds to n u user nodes, each column of S corresponds to n z region nodes. Given the adjacency matrix of the user graph and embed calculate Coarsen the input graph and generate a new rough adjacency matrix and the new embedding matrix H for each node / cluster in this rough graph z :
[0063]
[0064] In order to ensure the rationality of the learning process of the aggregation matrix S, supervision information is incorporated from the original spatial distribution matrix of each region. Specifically, the aggregation loss is calculated using the cross entropy function:
[0065]
[0066] The prediction stage includes multi-city knowledge transfer and model training and prediction.
[0067] The multi-city knowledge transfer aims to refine the meta-knowledge using a model-independent meta-learning method to make it consistent with the spatiotemporal characteristics of the target city, so as to effectively utilize the meta-knowledge in the case of sparse data. The parameter θ is initially set based on multiple source cities to minimize Average generalization loss over all source cities.
[0068]
[0069] In the above formula, α represents the learning rate, Represents the task set. Accurate spatiotemporal prediction relies on city-specific spatiotemporal patterns that reflect the spatial characteristics of each urban area. However, limited data may hinder pattern capture due to missing values or special events in the target urban area. Therefore, the present invention utilizes a dynamic graph convolutional network to extract long-term spatiotemporal patterns to fine-tune the target urban area and improve prediction accuracy. At each moment in the past time τ, the regional atlas of the target urban area The spatial features of the nodes are extracted through GCN, and the temporal features are extracted through LSTM. Then, the extracted spatiotemporal features of the target urban area are combined with meta-knowledge using a residual mechanism to obtain spatiotemporal meta-parameters. The feature extraction module usually includes convolution and linear networks, and the method of generating parameters at each layer has been fully confirmed.
[0070] The model training and prediction learns the model parameters shared among multiple cities through adaptive parameter update. In order to consider domain adaptation, user alignment and regional update are used while minimizing the loss function. The specific steps are as follows:
[0071]
[0072] in, represents the user alignment loss function in the adaptation phase, represents the loss function of regional updates in the adaptation phase, λ1 and λ2 are hyperparameters for user alignment and regional level updates. In the fine-tuning phase of the prediction task for the target city, the mean square error (MSE) is used as the objective function, in is the predicted value and y2 is the true value.
[0073] Example 2: A cross-city logistics demand forecasting system that learns invariant representations in dynamic user graphs, such as Figure 1 As shown, it includes the following stages:
[0074] Module 1: Adaptation phase. Encode the sequence and attributes of users, and retain uncertainty through Gaussian distribution representation of expected embedding matrix and covariance embedding matrix. Secondly, encode the logistics demand sequence and logistics attributes, and then use the graph attention network to perform convolution operations on the user graph constructed by users from different urban areas, and calculate the maximum mean difference in embedding between two seed users in the source city and the target city. At the same time, a contrastive learning strategy is adopted. The embeddings of seed users formed in different cities are regarded as positive samples, while the embeddings of non-seed users formed in different cities are regarded as negative samples. In addition, an exponential decay method is used to enhance dynamic edges, and a regional-level update method based on differentiable pooling is proposed to capture the correlation and consistency between multi-granularity nodes and achieve unified embedding of urban areas.
[0075] Module 2: Prediction phase. Meta-knowledge is refined to be consistent with the spatiotemporal characteristics of the target city, and then model-independent meta-learning is used to learn models on various tasks, and improved performance is achieved on new tasks after several iterations to effectively adjust parameters to adapt to the target city. Parameters are initially set based on multiple source cities to minimize the average generalization loss over all source cities. Finally, the model parameters shared between multiple cities are updated by adaptive parameters combined with user alignment and regional updates.
[0076] This case studies the cue learning on dynamic graphs for multi-task spatiotemporal prediction, including node-level, edge-level, and subgraph-level tasks, and proposes a cross-city logistics demand forecasting system that includes two stages of learning invariant representations in dynamic user graphs. 1) In the adaptation stage, consistent and invariant seed user embeddings are established between the source and target domains, and the dynamics of logistics relationships between users are effectively captured, and the changing logistics relationships between users are integrated and the regional embeddings are updated to enhance the user graph. 2) In the prediction stage, the meta-knowledge is aimed at adjusting it to be consistent with the spatiotemporal characteristics of the target city, so as to effectively utilize the meta-knowledge in the case of data scarcity, and the model parameters shared among multiple cities are learned through adaptive parameter updates. In future work, it will be beneficial to further incorporate the feedback of the system decision results into the prediction model for practical business applications. In addition, the present invention has played a role in promoting the development of logistics systems and effectively promoted the use of prediction results in logistics scheduling and courier scheduling.
[0077] It should be noted that the above content merely illustrates the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. For ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications all fall within the protection scope of the claims of the present invention.
Claims
1. A multi-granularity graph learning system for cross-city logistics demand forecasting, characterized by: It includes the adaptation phase and the prediction phase. The adaptation phase aims to establish consistent and invariant seed user embeddings between the source and target domains, and effectively capture the dynamics of the logistics relationships between users, integrate the changing logistics relationships between users and update the region embeddings to enhance the user graph; The prediction phase aims to adjust the meta-knowledge to make it consistent with the spatiotemporal characteristics of the target city, to effectively utilize the meta-knowledge when data is scarce, and to learn model parameters shared among multiple cities through adaptive parameter updates.
2. A multi-granularity graph learning system for cross-city logistics demand forecasting as claimed in claim 1, characterized in that: The adaptation stage includes a user-level invariant representation module and a dynamic edge enhancement region update module. The user-level invariant representation module aims to comprehensively integrate logistics information and preserve the uncertainty and periodicity characteristics of user behavior in the initial user embedding. The proposed dynamic edge-enhanced region update module aims to capture the correlation and consistency between multi-granularity nodes and achieve unified embedding of urban areas, using a region-level update method based on differentiable pooling to capture the characteristics of the corresponding regions.
3. A multi-granularity graph learning system for cross-city logistics demand forecasting as claimed in claim 2, characterized in that: The user-level invariant representation module first encodes the user's sequence and attributes, and retains uncertainty through the Gaussian distribution representation of the expected embedding matrix and the covariance embedding matrix. Specifically, four embedding matrices U, P, V and Q are initialized, each with a size of R m×# , respectively represent the Gaussian mean vector and variance vector of sequence encoding and attribute encoding. In order to obtain the Gaussian embedding and attribute encoding of the demand sequence, the Monte Carlo sampling method is used. $ The calculation is as follows: Where ELU(·) represents the exponential linear unit function, h t is the logistics demand sequence code, δ is the auxiliary noise variable, Then use the same method to encode the logistics attributes h a After processing, we get g ( ,Finally, the initial user embedding is represented as Where |u| is the number of users, For logistics demand sequence encoding h t , using an encoder from the node's logistics demand sequence d = {d * ,d + ,…,d - } to extract multi-scale features: Here, γ takes two values: s and l, corresponding to the number of dilated convolution operations for short-term and long-term features, respectively, and W / and W $ is a learnable weight matrix, and is the bias term, defined for and The splicing of For logistics attribute encoding h a ,User attributes are divided into static attributes and dynamic attributes. In the last mile logistics, dynamic attributes refer to the extraction and delivery information, while static attributes include industry attributes related to users. In order to encode these attributes, for user i, the static representation is obtained by using a One-Hot encoder, for the dynamic attribute set It is related to users and their * to - The corresponding frequency value is associated with As a marker, used to generate a set of probability values for dynamic representation As shown below: The attribute with the highest probability is selected as the representative value of the dynamic attribute, that is, Finally, the encoded dynamic attributes are concatenated with the static attributes to obtain the final user attribute encoding h ( ∈R # , where d is the dimension of the vector, Next, we use the Graph Attention Network (GAT) to perform convolution operations on the user graph constructed by users from different city domains, ensuring that the representation of seed users takes into account multi-hop neighbor relationships and achieves a more aligned embedding distribution of the same seed users in different city domains. For each user in, their initial embedding set In order to capture the impact of multi-hop neighbors on user embedding, we propose an invariant user alignment method that uses GAT to embed The node embedding of the user graph is integrated The attention coefficient is calculated as follows in, represents the set of neighbor nodes in the user graph, and the fused embedding is expressed as where σ(·) represents the activation function, and is a learnable weight matrix, and then the maximum mean difference in embedding between two seed users in the source city and the target city is calculated as follows: where φ(·) is the Gram matrix of all possible kernels in the data space, and a Gaussian kernel is used. and The set of node embeddings representing different cities.
4. A multi-granularity graph learning system for cross-city logistics demand forecasting as claimed in claim 2, characterized in that: In the dynamic edge enhancement region update module, the set of all static edges in a city is first represented as A / , the set of dynamic edges is represented as in Indicates t - The dynamic edge matrix at time, In a dynamic user graph, the graph sequence distance time t - The closer it is, the more accurately it can reflect the current state of the user node. Therefore, the exponential decay method is used to enhance the dynamic edge. The weight of each dynamic edge is determined by the exponential decay function, which takes into account the time difference between the arrival time and the current time. If the dynamic edge arrives at time t8, then its weight at the current time point t - The weight w # Defined as w(t8,t - )=expy-λ(t - -t8)|, where λ is a hyperparameter that controls the decay rate. For each static edge, the weights of all the dynamic edges connected to it are accumulated to obtain the new weight of the updated static edge: in, is the updated adjacency matrix of the user graph. Subsequently, GAT is used to recompute the node embeddings to obtain the final representation Reflects the enhancement of dynamic logistics information, The clustering assignment matrix from users to regions is recorded as It uses the embedding representation of user nodes and the adjacency matrix Initialize, each row of S corresponds to n ) user nodes, each column of S corresponds to n L region nodes, given the adjacency matrix of the user graph and embed ,calculate Coarsen the input graph and generate a new rough adjacency matrix and the new embedding matrix H for each node / cluster in this rough graph L : In order to ensure the rationality of the learning process of the aggregation matrix S, the supervision information is incorporated from the original spatial distribution matrix of each region, and the aggregation loss uses the cross entropy function Perform calculations.
5. The multi-granularity graph learning system for cross-city logistics demand forecasting as claimed in claim 1, characterized in that: The prediction phase includes multi-city knowledge transfer and model training and prediction. The multi-city knowledge transfer aims to refine the meta-knowledge using a model-independent meta-learning method to make it consistent with the spatiotemporal characteristics of the target city, so as to effectively utilize the meta-knowledge in the case of sparse data. The model training and prediction aims to learn model parameters shared across multiple cities while leveraging user alignment and region updates to minimize the average generalization loss over all source cities.
6. A multi-granularity graph learning system for cross-city logistics demand forecasting as claimed in claim 5, characterized in that: The multi-city knowledge transfer operation utilizes a model-independent meta-learning method to effectively adjust parameters to adapt to the target city. The parameters θ are initially set based on multiple source cities to minimize The average generalization loss over all source cities, In the above formula, α represents the learning rate, Representing the task set, accurate spatiotemporal prediction relies on city-specific spatiotemporal patterns, which reflect the spatial characteristics of each urban area. However, limited data may hinder pattern capture due to missing values or special events in the target urban area. A dynamic graph convolutional network is used to extract long-term spatiotemporal patterns to fine-tune the target urban area and improve the prediction accuracy. At each moment in the past time τ, the regional atlas of the target urban area The spatial features of nodes are extracted through GCN, and the temporal features are extracted through long short-term memory networks. Then, the extracted spatiotemporal features of the target urban area are combined with meta-knowledge using a residual mechanism to obtain spatiotemporal meta-parameters. The feature extraction module usually includes convolution and linear networks, and the method of generating parameters at each layer has been fully confirmed.
7. A multi-granularity graph learning system for cross-city logistics demand forecasting as claimed in claim 5, characterized in that: The model training and prediction learns the model parameters shared among multiple cities through adaptive parameter updates. In order to consider domain adaptation, user alignment and regional updates are used while minimizing the loss function. The specific steps are as follows: in, represents the user alignment loss function in the adaptation phase, represents the loss function of the region update in the adaptation phase, λ * and λ + are the hyperparameters for user alignment and region-level updates, In the fine-tuning phase of the prediction task for the target city, the mean square error (MSE) is used as the objective function. in is the predicted value and y2 is the true value.
Citation Information
Cited By
Logistics demand prediction method and device based on multi-scale space-time diagram convolutional network
CN118917627A
Multi-category material demand prediction system under emergent public health event
CN119378849A
Online and offline convenience facility site selection optimization method based on knowledge graph
CN119721658A
Urban area dynamic representation learning method based on context representation learning
CN120317401A
A method for learning dynamic representations of urban areas based on contextual representation learning.
CN120317401B
