Long-tail human movement prediction method based on adaptive hierarchical learning
Through a hierarchical learning framework based on Maslow's theory of human motivation, a multi-granularity hierarchical structure and Gumbel perturbation optimization method are adopted to solve the deviation problem of long-tail address distribution and improve the efficiency and applicability of human mobility prediction.
Patent Information
- Application Number
- CN202510666182.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-09-16
AI Technical Summary
Existing human mobility prediction models have biases when processing long-tail address distributions, resulting in a biased prediction of head addresses, making it difficult to effectively balance the learning of long-tail distributions and the applicability of existing models.
A hierarchical learning framework based on Maslow's theory of human motivation is adopted. Through multi-granularity hierarchical structure labels, cross-level label mapping, spatiotemporal perception embedding vectors and Gumbel perturbation adaptive hierarchical optimization methods, the hierarchical behavior modeling of human mobility and advanced prediction methods are decoupled to balance the learning of long-tail distribution.
It improves the efficiency of long-tail human mobility prediction and the applicability of existing models, achieves effective learning of head and tail addresses, and maintains the efficiency and versatility of the model.
Smart Images

Figure CN120653913A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of urban computing and long-tail mobility learning, and relates to a long-tail human mobility prediction method based on adaptive hierarchical learning. Background Art
[0002] The human mobility prediction task aims to predict an individual's next address based on historical trajectories and behavioral patterns. This prediction task plays a fundamental role in many fields, including urban planning, traffic management, and epidemic prevention. In urban planning, understanding human mobility trends can help design more reasonable public facilities and transportation networks to meet the needs of citizens. In traffic management, accurate prediction of human mobility can help optimize traffic signal control and reduce congestion, thereby improving traffic efficiency. In addition, in epidemic prevention, human mobility prediction can help public health departments identify potential epidemic transmission pathways and formulate effective intervention strategies. However, due to privacy restrictions, sparse device sampling, and user authorization bias, the address visit frequency obtained from the collected real human mobility data presents a significant long-tail distribution, which poses a major challenge to the establishment of a robust human mobility prediction model.
[0003] Existing research on human mobility prediction can be categorized into four paradigms: First, recurrent neural network-based methods process check-in sequences by gradually propagating hidden states, capturing local dependencies; second, graph neural network-based methods encode temporal and spatial relationships through graph neural networks; third, Transformer-based methods employ a self-attention mechanism to dynamically weigh interactions between tokens throughout the sequence, capturing global dependencies; and fourth, diffusion model-based methods learn the complex distribution of human mobility behavior through iterative denoising. Although these methods have made some progress in sequence modeling, they generally ignore the inherent long-tail distribution of address visits, resulting in a biased prediction of head addresses.
[0004] Long-tail learning has been extensively studied in the field of deep learning, particularly in computer vision and recommender systems. In computer vision, related methods primarily address the class imbalance problem through data balancing, loss function adjustment, or adjusting the logit. Recommender system methods utilize meta-learning or transfer learning to extract shared knowledge between items. Although these advanced methods rebalance the skewed distribution of categories at the data, model, or category level, they fail to fundamentally account for the spatiotemporal semantics between long-tail addresses. Existing long-tail learning methods in the field of mobile prediction often combine address representation with prediction, which limits the adaptability of various advanced mobile prediction models and, therefore, their broader applicability.
[0005] Therefore, the goal of the present invention is to develop a lightweight plug-and-play framework to support various mobility prediction models that can capture spatiotemporal semantic features beyond the long-tail address distribution. However, there are two major challenges in achieving this goal: one is how to effectively utilize the spatiotemporal semantics of addresses without inheriting the long-tail bias. Inspired by Maslow's theory of human motivation, the present invention adopts a large language model to capture high-order address relationships and the underlying mechanisms of human mobility. The second challenge is how to use lightweight multi-level semantic learning to explore knowledge beyond long-tail mobility data. This requires the design of a comprehensive method of multi-level semantic balance to effectively reduce distribution bias while maintaining the efficiency of the model.
[0006] In summary, designing a lightweight plugin that can fully leverage the learning of long-tail mobility data while decoupling from the address representation of existing advanced mobility prediction models has become an urgent challenge. This paper, proposed in this context, aims to implement an efficient and scalable long-tail human mobility prediction solution through a hierarchical learning framework based on Maslow's theory of human motivation. Summary of the Invention
[0007] To address the above issues, the present invention provides a long-tail human mobility prediction method based on adaptive hierarchical learning. This method decouples hierarchical behavioral modeling of human mobility from advanced human mobility prediction methods. It introduces coarse-grained semantic grouping via a hierarchical tree structure based on Maslow's theory of human motivation, rebalancing the optimization process in an architecture-independent manner. This method significantly improves the efficiency of long-tail human mobility prediction and the applicability of existing advanced mobility prediction models. The technical solution of the present invention is:
[0008] A long-tail human mobility prediction method based on adaptive hierarchical learning includes the following steps:
[0009] S1: Define multi-granularity hierarchical tags. Based on Maslow's theory of human motivation, human mobility is divided into a four-level tag system: need type, activity mode, address category, and physical address. The specific content of the hierarchical tags is defined based on Maslow's hierarchy of needs theory and prior knowledge of public data.
[0010] S2: Constructing cross-level label mappings. Based on Maslow's theory of human motivation, we designed a thinking chain prompt. We used a large language model with rich prior knowledge to characterize cross-granularity semantic relevance. Following the natural language annotation workflow, we had three domain experts review the mapping results and establish a probability transfer matrix from parent-level labels to child-level labels.
[0011] S3: Generate spatiotemporal-aware address embeddings. A deep learning model is used to fuse the spatiotemporal relationship of addresses with user mobility patterns, combined with the dwell time and visit cycle characteristics in the user's historical trajectory, to generate spatiotemporal-context-aware address embeddings.
[0012] S4: Calculate the predicted probability based on the Gumbel perturbation. A differentiable Gumbel-Softmax sampler is introduced at the physical address level. The temperature coefficient is used to adjust the gradient propagation strength for the head high-frequency addresses and the long tail low-frequency addresses. Prior distribution constraints are generated by combining the hierarchical probability transition matrix. The final probability of the hierarchical nodes is obtained from top to bottom using the chain rule of conditional probability.
[0013] S5: Perform adaptive hierarchical joint optimization. Adaptive hierarchical optimization is performed using node-level dynamic weights to perform multi-scale smoothing calibration of address prediction probabilities. This simultaneously optimizes both the physical address-level prediction loss and the upper-level activity pattern classification loss, achieving a balanced improvement in both head pattern capture and tail generalization capabilities under long-tail distributions.
[0014] In step S1, the user set included in the human mobility data is defined as U = {u i ,i∈|U|}, the address set is defined as P={l i ,i∈|P|}, where |U| and |P| are the number of users and addresses respectively. A mobile trajectory is defined as x={x t ,t∈|T|}, where |T| is the length of the trajectory. Each spacetime point x in the trajectory t = {l,cat,t} represents a visit record of user u, where cat is the category of the address. The complete set of human movement trajectories is defined as X = {x m ,m∈|M|}, where |M| is the number of moving trajectories. Given x 1:t ,The goal of the mobility prediction task is to generate multi-granularity labels for the next visit A ranked list of C h is the number of categories in the hth layer, H = 4. The specific steps to obtain multi-granularity hierarchical structure labels are as follows:
[0015] S1-1: Get the labels of physical address and address class level. In the hierarchical label tree, the label granularity increases as h becomes larger, i.e. C h-1 <C h When h=H, C H =P. For labels at the physical address level, y H ∈{l i |i∈[1,C H ]}. For address category level labels, y H-1 ∈{cati |i∈[1,C H-1 ]}.
[0016] S1-2: Obtain activity mode labels. Activity mode-level labels are derived from the publicly available taxonomy of Foursquare (https: / / docs.foursquare.com), which includes ten semantic categories: Arts & Entertainment, Business & Professional Services, Community & Government, Food & Beverage, Healthcare & Healthcare, Landmarks & Outdoors, Nightlife, Retail, Sports & Entertainment, and Travel & Transportation.
[0017] S1-3: Obtain need type labels. The need type hierarchy is based on Maslow's theory of human motivation, focusing on three fundamental human motivations: physiological needs, safety needs, and social needs. Due to the lack of empirical evidence in mobile data, higher-order needs, which are abstract and long-term, are excluded. The proposed hierarchical tree structure breaks away from the traditional strict order and implements Maslow's hierarchy of needs in a more flexible manner.
[0018] In step S2, the probability transfer matrix between adjacent level labels is constructed from bottom to top. h→h-1 The probability of mapping fine-grained labels at level h to coarse-grained labels at level h-1 is quantified. The specific steps to construct cross-level label mapping relationships are as follows:
[0019] S2-1: Construct a mapping from physical address to address category level. Since the original human movement trajectory contains the physical address and address category of each visit, the probability transfer matrix T from the Hth to the H-1th layer can be directly extracted from the original data. H→H-1 .
[0020] S2-2: Construct a mapping from address categories to activity mode hierarchies. Based on Maslow's needs design thinking chain prompts for human motivation, use an objective large language model to infer the mapping between address category labels and activity mode labels. H-1→H-2 This large language model-based approach not only improves mapping accuracy but also effectively addresses the challenges posed by the variability of category definitions in different urban contexts. Subsequently, three domain experts verified the mapping results generated by the large language model based on the annotation workflow in the field of natural language processing.
[0021] S2-3: Construct a mapping from activity patterns to requirement type hierarchies. H-2→H-3 The generation process of the radiation is the same as T H-1→H-2This hybrid mapping approach, combining large language model generation with manual verification, ensures reliability while minimizing labor costs. Ultimately, a hierarchical tree structure with four levels was constructed for each city.
[0022] In step S3, a deep learning model is used to capture the spatiotemporal correlation between the user's access preferences and the physical address. The specific steps for obtaining the spatiotemporal-aware address embedding vector are as follows:
[0023] S3-1: Obtain the predicted pairwise count for the candidate physical address set. Map the physical address labels in the human mobility data to a continuous vector space and encode them using one-hot vectors. Then, compute the embedding vectors for the physical addresses using a graph neural network or sequence model. Compute the pairwise counts predicted by the model for all physical addresses using message passing aggregation, gating mechanisms, attention calculations, or diffusion processes:
[0024] z=Backbone(x 1:t )={z1,z2,...,z |P|} (1)
[0025] Backbone(·) is a mobility prediction method. When the mobility prediction method is Graph-Flashback, a user-address knowledge graph with strong representational power, namely a spatiotemporal knowledge graph, is first constructed to learn the representation of each node and edge. Based on this, a similarity function is defined to construct an address transition graph based on the learned representations. Next, a network graph flashback recommendation mechanism is used to incorporate the learned graph structure into the sequence model. Specifically, the Graph-Flashback method applies a simplified graph convolutional network to the address transition graph to enhance the representation of each address. Furthermore, another similarity function is defined to consider the influence of spatiotemporal information and user preferences in the sequence rule modeling process. When the mobility prediction method is STHGCN, a hypergraph structure is used to capture granular trajectory information for a more detailed understanding of user mobility behavior. Furthermore, a hypergraph transformer is used to effectively combine the hypergraph structure encoding with spatiotemporal information to enhance the prediction of user behavior in dynamic environments. When the mobility method is MCLP, a topic model is first used to extract user preferences for different address types from historical trajectories to reveal user interests and needs. Secondly, a robust arrival time embedding is constructed through an arrival time estimator based on a multi-head attention mechanism to accurately reflect the user's arrival time at different addresses. Finally, the Transformer architecture is used to mine users' sequential patterns. When the mobility prediction method is Diff-POI, two tailored graph encoding modules are used to encode users' visit sequences and spatial features, ensuring that users' visit behaviors and their spatial distribution are fully captured. Next, a diffusion-based sampling strategy is adopted to deeply explore users' spatial visit trends. Sampling from the posterior distribution is performed through the diffusion process and its inverse form. This process not only reflects users' underlying behavioral patterns but also improves prediction accuracy by optimizing the corresponding scoring function.
[0026] In step S4, noise sampled from the Gumbel distribution is added to adjust the predicted probability at all physical addresses. The specific steps for calculating the predicted probability based on the Gumbel perturbation are as follows:
[0027] S4-1: Sampling Gumbel noise. To alleviate the biased optimization of head addresses in long-tail mobile data in deep learning models, Gumbel perturbation is introduced to enhance the exploration of human mobile knowledge. Gumbel perturbation injects randomness into the sampling process, allowing the model to consider different physical addresses instead of relying solely on high-probability predictions. Since the Gumbel distribution is a maximally stable distribution, the original probability distribution can be maintained even after adding noise. Sampling a from the uniform distribution Uniform(0,1) i , according to g i =-log(-log(ai ))Get the noise that conforms to the Gumbel distribution.
[0028] S4-2: Use Gumbel noise to smooth the initial probability distribution. The probability of the original physical address level is directly summed with the sampled Gumbel noise, and a temperature parameter is added to control the degree of smoothing:
[0029]
[0030] Among them, i is the label The subscript of , τ is the temperature parameter. Then, the initial hierarchical prediction results are obtained from bottom to top (i.e., from fine granularity to coarse granularity) through the hierarchical probability transfer matrix:
[0031]
[0032] Among them, T h→h-1 Is a size C h ×C h-1 The probability transfer matrix, T h→h-1 The value of each row of elements is between 0 and 1 and the sum of each row is 1.
[0033] S4-3: Calculate the final probability of the nodes in the hierarchical tree structure. In the hierarchical tree structure, the leaf nodes The probability of can be uniquely decomposed by the chain rule from top to bottom (from the root node to the leaf nodes):
[0034]
[0035] Where H is the depth of the node, Represents the conditional probability of a child node given a parent node. The probability of is equal to 1, so it is omitted here. The conditional probability is expressed as leaf node probability as follows:
[0036]
[0037] Where j is the H-th layer label C H The subscript of
[0038] In step S5, the specific process of performing the adaptive hierarchical joint optimization is as follows:
[0039] S5-1: Adaptive Weight Distribution. Due to the inherent long-tail distribution of nodes at the physical address level, the distribution of higher-level nodes is also uneven. To better explore dynamic mobility knowledge, node-adaptive weighting is used to optimize the model. To prevent granularity competition, coarse-grained levels are assigned lower weights. For simplicity, weights are initialized to [1, 0.75, 0.5, 0.25] from fine to coarse. Softplus activation function is used to ensure positive weight values.
[0040] S5-2: Adaptive layer-wise loss function. Based on the above process, the adaptive layer-wise loss function is defined as follows:
[0041]
[0042] in, is a learnable weight, and N is the total number of predictions. Optimizing the parameters using the adaptive layer-wise loss function described above penalizes misclassifications in a layer-aware manner, thereby enhancing the accuracy of classification at each layer.
[0043] S5-3: Comparison with the gradient of traditional cross entropy loss. For simplicity, only a single label is considered here. Instead of all samples X in the trajectory sequence. The optimization objectives of the standard cross entropy loss and the adaptive layer-wise loss are defined as follows:
[0044]
[0045] For the sake of clarity, we introduce Come aggregate The probability of a leaf node under the label:
[0046]
[0047] These two losses are related to the logit number z j The derivative of can be derived as:
[0048]
[0049] Among them, the superscript H represents the level of the physical address, and 1 represents the level of the demand type. It can be seen that the adaptive hierarchical loss function encapsulates the address in a competitive manner. This suggests that equal weights at different levels will lead to In addition, and is a coefficient used to stabilize the optimization to prevent gradient decreasing during the optimization process. The gradual reduction of weight initialization at different levels corresponds to the trend of shared semantic learning among long-tail addresses.
[0050] A second aspect of the present invention relates to a long-tail human mobility prediction system based on adaptive hierarchical learning, comprising a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the long-tail human mobility prediction method based on adaptive hierarchical learning of the present invention.
[0051] A third aspect of the present invention relates to a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the long-tail human mobility prediction method based on adaptive hierarchical learning of the present invention.
[0052] The advantages of the present invention are: decoupling hierarchical behavioral modeling of human mobility from advanced human mobility prediction methods, thereby performing long-tail mobility prediction in an open and exploratory manner. Based on Maslow's theory of human motivation, thinking chain prompts are designed, and a city-customized address hierarchy based on a large language model is constructed to explore the rich spatiotemporal semantics in human mobility data. By using Gumbel perturbation and node adaptive weighting in the hierarchical tree structure, address hierarchical prediction is explored. The above design ensures that the invention can achieve a good balance between head and tail address learning, thereby maintaining effectiveness and versatility in the long-tail human mobility prediction task. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flow chart of the method of the present invention.
[0054] Figure 2 It is a thought chain prompt word for constructing the mapping from address category to activity mode level in the present invention.
[0055] Figure 3 It is a thought chain prompt word for constructing the mapping from activity mode to requirement type level in the present invention.
[0056] Figure 4 It is a system schematic diagram of the present invention. DETAILED DESCRIPTION
[0057] The technical solution of the present invention is explained and described clearly and completely below in conjunction with the accompanying drawings.
[0058] Example 1
[0059] A long-tail human mobility prediction method based on adaptive hierarchical learning. The overall process is as follows Figure 1 , which includes the following steps:
[0060] S1: Define multi-granularity hierarchical structure labels. Based on Maslow's theory of human motivation, human mobility is divided into a four-level label system of demand type, activity mode, address category and physical address. The user collection contained in the human mobility data is defined as U = {u i,i∈|U|}, the address set is defined as P={l i ,i∈|P|}, where |U| and |P| are the number of users and addresses respectively. A mobile trajectory is defined as x={x t ,t∈|T|}, where |T| is the length of the trajectory. Each spacetime point x in the trajectory t = {l,cat,t} represents a visit record of user u, where cat is the category of the address. The complete set of human movement trajectories is defined as X = {x m ,m∈|M|}, where |M| is the number of moving trajectories. Given x 1:t ,The goal of the mobility prediction task is to generate multi-granularity labels for the next visit A ranked list of C h is the number of categories in the hth layer, H = 4. The specific steps to obtain multi-granularity hierarchical structure labels are as follows:
[0061] S1-1: Get the labels of physical address and address class level. In the hierarchical label tree, the label granularity increases as h becomes larger, i.e. C h-1 <C h When h=H, C H =P. For labels at the physical address level, y H ∈{l i |i∈[1,C H ]}. For address category level labels, y H-1 ∈{cat i |i∈[1,C H-1 ]}.
[0062] S1-2: Obtain activity mode labels. Activity mode-level labels are derived from the publicly available taxonomy of Foursquare (https: / / docs.foursquare.com), which includes ten semantic categories: Arts & Entertainment, Business & Professional Services, Community & Government, Food & Beverage, Healthcare & Healthcare, Landmarks & Outdoors, Nightlife, Retail, Sports & Entertainment, and Travel & Transportation.
[0063] S1-3: Obtain need type labels. The labels for the need type hierarchy are adapted from Maslow's theory of human motivation, focusing on three basic human motivations: physiological needs (survival necessities such as food and shelter), safety needs (safety-driven needs, including education and employment), and social needs (such as entertainment or social activities). Due to the lack of observable empirical evidence in mobile data, higher-order needs with abstract and long-term characteristics (such as self-esteem and self-actualization) were excluded. The proposed hierarchical tree structure breaks away from the traditional strict order and implements Maslow's hierarchy of needs theory in a more flexible manner.
[0064] S2: Construct the mapping relationship between cross-level labels. Based on Maslow's theory of human motivation, we design the thinking chain prompt words, use the large language model with rich prior knowledge to describe the cross-granularity semantic relevance, and construct the probability transfer matrix between adjacent level labels from bottom to top. Among them, each probability transfer matrix T h→h-1 The probability of mapping fine-grained labels at level h to coarse-grained labels at level h-1 is quantified. The specific steps to construct cross-level label mapping relationships are as follows:
[0065] S2-1: Construct a mapping from physical address to address category level. Since the original human movement trajectory contains the physical address and address category of each visit, the probability transfer matrix T from the Hth to the H-1th layer can be directly extracted from the original data. H→H-1 .
[0066] S2-2: Construct a mapping from address categories to activity patterns. Based on Maslow's needs design thinking chain prompts for human motivation, a large language model is used to infer the mapping between address category labels (the number of categories in different cities ranges from 241 to 330) and activity pattern labels (all cities cover 10 categories). H-1→H-2 This large language model-based approach not only improves mapping accuracy but also effectively addresses the challenges posed by the variability of category definitions in different urban contexts. Subsequently, three domain experts verified the mapping results generated by the large language model based on the annotation workflow in the field of natural language processing.
[0067] S2-3: Construct a mapping from activity patterns to requirement type hierarchies. H-2→H-3 The generation process of the radiation is the same as T H-1→H-2 This hybrid mapping approach, combining large language model generation with manual verification, ensures reliability while minimizing labor costs. Ultimately, a hierarchical tree structure with four levels was constructed for each city.
[0068] S3: Generate spatiotemporal-aware address embedding vectors. A deep learning model (such as a recurrent neural network, graph neural network, Transformer, or diffusion model) is used to fuse the spatiotemporal relationship of addresses with user mobility patterns. This is combined with the dwell time and visit cycle characteristics in the user's historical trajectory to generate a spatiotemporal-context-aware address embedding representation. The specific steps for obtaining spatiotemporal-aware address embedding vectors are as follows:
[0069] S3-1: Obtain the predicted pairwise count for the candidate physical address set. Map the physical address labels in the human mobility data to a continuous vector space and encode them using one-hot vectors. Then, compute the embedding vectors for the physical addresses using a graph neural network or sequence model. Compute the pairwise counts predicted by the model for all physical addresses using message passing aggregation, gating mechanisms, attention calculations, or diffusion processes:
[0070] z=Backbone(x 1:t )={z1,z2,...,z |P|} (1)
[0071] Among them, Backbone(·) is a mobility prediction method. Its characteristic is that when the mobility prediction method is Graph-Flashback, it first constructs a user-address knowledge graph with strong representation capabilities, namely a spatiotemporal knowledge graph, aiming to learn the representation of each node (user and address) and edge. Based on this, a similarity function is defined to construct an address transition graph based on the learned representations. Next, the network graph flashback recommendation mechanism is used to integrate the learned graph structure into the sequence model. Specifically, the graph flashback method applies a simplified graph convolutional network to the address transition graph to enhance the representation capabilities of each address. In addition, another similarity function is defined to consider the influence of spatiotemporal information and user preferences in the process of sequence rule modeling. Its characteristic is that when the mobility prediction method is STHGCN, a hypergraph structure is used to capture trajectory granular information to more carefully understand user mobility behavior. Furthermore, the hypergraph transformer is used to effectively combine the hypergraph structure encoding with spatiotemporal information to enhance the prediction ability of user behavior in dynamic environments. The feature is that when the mobility method is MCLP, a topic model is first used to extract users' preferences for different types of addresses from historical trajectories to reveal their interests and needs. Secondly, a robust arrival time embedding is constructed through an arrival time estimator based on a multi-head attention mechanism to accurately reflect the user's arrival time at different locations. Finally, the Transformer architecture is used to mine users' sequential patterns. The feature is that when the mobility prediction method is Diff-POI, two tailored graph encoding modules are used to encode users' visit sequences and spatial features to ensure that users' visit behaviors and their spatial distributions are fully captured. Then, a diffusion-based sampling strategy is adopted to deeply explore users' spatial visit trends, sampling from the posterior distribution through the diffusion process and its inverse form. This process not only reflects users' potential behavior patterns, but also improves prediction accuracy by optimizing the corresponding scoring function.
[0072] S4: Calculate the predicted probability based on Gumbel perturbation. A differentiable Gumbel-Softmax sampler is introduced at the physical address level, and the temperature coefficient is used to adjust the gradient propagation strength for the head high-frequency addresses and the long-tail low-frequency addresses. The prior distribution constraints are generated by combining the hierarchical probability transfer matrix. The final probability of the hierarchical nodes is obtained from top to bottom according to the chain rule of conditional probability. The specific steps for calculating the predicted probability based on Gumbel perturbation are as follows:
[0073] S4-1: Sampling Gumbel noise. To alleviate the biased optimization of head addresses in long-tail mobile data in deep learning models, Gumbel perturbation is introduced to enhance the exploration of human mobile knowledge. Gumbel perturbation injects randomness into the sampling process, allowing the model to consider different physical addresses instead of relying solely on high-probability predictions. Since the Gumbel distribution is a maximally stable distribution, the original probability distribution can be maintained even after adding noise. Sampling a from the uniform distribution Uniform(0,1) i , according to g i =-log(-log(a i ))Get the noise that conforms to the Gumbel distribution.
[0074] S4-2: Use Gumbel noise to smooth the initial probability distribution. The probability of the original physical address level is directly summed with the sampled Gumbel noise, and a temperature parameter is added to control the degree of smoothing:
[0075]
[0076] Among them, i is the label The subscript of , τ is the temperature parameter. Then, the initial hierarchical prediction results are obtained from bottom to top (i.e., from fine granularity to coarse granularity) through the hierarchical probability transfer matrix:
[0077]
[0078] Among them, T h→h-1 Is a size C h ×C h-1 The probability transfer matrix, T h→h-1 The value of each row of elements is between 0 and 1 and the sum of each row is 1.
[0079] S4-3: Calculate the final probability of the nodes in the hierarchical tree structure. In the hierarchical tree structure, the leaf nodes The probability of can be uniquely decomposed by the chain rule from top to bottom (from the root node to the leaf nodes):
[0080]
[0081] Where H is the depth of the node, Represents the conditional probability of a child node given a parent node. The probability of is equal to 1, so it is omitted here. The conditional probability is expressed as leaf node probability as follows:
[0082]
[0083] Where j is the H-th layer label C H The subscript of
[0084] S5: Perform adaptive hierarchical joint optimization. Adaptive hierarchical optimization is performed using node-level dynamic weights. Multi-scale smoothing calibration of address prediction probabilities is performed, and the physical address layer prediction loss and upper-layer activity pattern classification loss are simultaneously optimized to achieve a balanced improvement in head pattern capture and tail generalization capabilities under long-tail distributions. The specific process of performing adaptive hierarchical joint optimization is as follows:
[0085] S5-1: Adaptive Weight Distribution. Due to the inherent long-tail distribution of nodes at the physical address level, the distribution of higher-level nodes is also uneven. To better explore dynamic mobility knowledge, node-adaptive weighting is used to optimize the model. To prevent granularity competition, coarse-grained levels are assigned lower weights. For simplicity, weights are initialized to [1, 0.75, 0.5, 0.25] from fine to coarse. Softplus activation function is used to ensure positive weight values.
[0086] S5-2: Adaptive layer-wise loss function. Based on the above process, the adaptive layer-wise loss function is defined as follows:
[0087]
[0088] in, is a learnable weight, and N is the total number of predictions. Optimizing the parameters using the adaptive layer-wise loss function described above penalizes misclassifications in a layer-aware manner, thereby enhancing the accuracy of classification at each layer.
[0089] S5-3: Comparison with the gradient of traditional cross entropy loss. For simplicity, only a single label is considered here. Instead of all samples X in the trajectory sequence. The optimization objectives of the standard cross entropy loss and the adaptive layer-wise loss are defined as follows:
[0090]
[0091] For the sake of clarity, we introduce Come aggregate The probability of a leaf node under the label:
[0092]
[0093] These two losses are related to the logit number z j The derivative of can be derived as:
[0094]
[0095] Among them, the superscript H represents the level of the physical address, and 1 represents the level of the demand type. It can be seen that the adaptive hierarchical loss function encapsulates the address in a competitive manner. This suggests that equal weights at different levels will lead to In addition, and is a coefficient used to stabilize the optimization to prevent gradient decreasing during the optimization process. The gradual reduction of weight initialization at different levels corresponds to the trend of shared semantic learning among long-tail addresses.
[0096] To verify the effectiveness of the present invention, we conducted a series of experiments. Regarding the dataset, we used two real-world urban mobility datasets, namely JKT (Jakarta) and KLP (Kuala Lumpur). The proposed long-tail human mobility prediction method based on adaptive hierarchical learning was compared with the following baseline methods: (1) Graph-Flashback uses a recurrent neural network to capture the sequential patterns from the embedding of the user-POI knowledge graph and the address transition graph; (2) STHGCN combines a hypergraph transformer and spatiotemporal encoding to model trajectory dependencies within and between users; (3) MCLP integrates topic modeling for address preferences, an arrival time estimator for temporal embedding, and a transformer architecture for mining sequential patterns; (4) Diff-POI adopts a dual-graph encoder to process spatiotemporal features and enhances spatial trend prediction through a diffusion-based sampling method. The evaluation metric used in this paper is MRR@k: measuring the inverse of the ranking of the true labels in the top-k predictions. Specifically, k = {1, 5, 10}. The experimental results are shown in the following table. To save space, our method is represented as HiMob (Hierarchical Learning for Mobility):
[0097]
[0098] Table 1 Experimental results
[0099] Experiments show that HiMob exhibits significant performance improvements on different datasets, demonstrating the effectiveness of our proposed solution.
[0100] Example 2
[0101] Reference Figure 4 This embodiment relates to a long-tail human mobility prediction system based on adaptive hierarchical learning, including a memory and one or more processors. The memory stores executable code. When the one or more processors execute the executable code, they are used to implement the long-tail human mobility prediction method based on adaptive hierarchical learning of Example 1.
[0102] Example 3
[0103] This embodiment relates to a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the method for predicting long-tail human movement based on adaptive hierarchical learning of the present invention is implemented.
[0104] The contents described in the embodiments of this specification are merely an enumeration of the implementation forms of the inventive concept. The scope of protection of the present invention should not be regarded as limited to the specific forms described in the embodiments. The scope of protection of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.
Claims
1. A long-tail human mobility prediction method based on adaptive hierarchical learning, characterized by comprising the following steps: S1: Define multi-granularity hierarchical structure tags. Based on Maslow's theory of human motivation, divide human mobility into a four-level tag system: need type, activity mode, address category, and physical address. Define the specific content of the hierarchical tags based on Maslow's hierarchy of needs theory and prior knowledge of public data. S2: Construct a mapping relationship between cross-level labels. Based on Maslow's theory of human motivation, we design thinking chain prompts. We use a large language model with rich prior knowledge to characterize cross-granularity semantic relevance. Based on the annotation workflow in the natural language field, we have three domain experts verify the mapping results and establish a probability transfer matrix from parent-level labels to child-level labels. S3: Generate spatiotemporal-aware address embedding vectors. This uses a deep learning model to fuse the spatiotemporal relationship of addresses with user mobility patterns, and combines the dwell time and visit cycle characteristics in the user's historical trajectory to generate spatiotemporal-context-aware address embedding representations. S4: Calculate the predicted probability based on Gumbel perturbation; introduce a differentiable Gumbel-Softmax sampler at the physical address level, and adjust the gradient propagation strength for the head high-frequency addresses and the long-tail low-frequency addresses through the temperature coefficient; combine the hierarchical probability transfer matrix to generate prior distribution constraints, and obtain the final probability of the hierarchical nodes from top to bottom according to the chain rule of conditional probability; S5: Performs adaptive hierarchical joint optimization; adaptive hierarchical optimization is performed through node-level dynamic weights, multi-scale smoothing calibration of address prediction probabilities is performed, and the physical address layer prediction loss and upper-level activity pattern classification loss are simultaneously optimized to achieve a balanced improvement in head pattern capture and tail generalization capabilities under long-tail distribution.
2. The long-tail human mobility prediction method based on adaptive hierarchical learning according to claim 1, characterized in that: In S1, the user set included in the human mobility data is defined as U = {u i ,i∈|U|}, the address set is defined as P={l i ,i∈|P|}, where |U| and |P| are the number of users and addresses respectively; a mobile trajectory is defined as x={x t ,t∈|T|}, where |T| is the length of the trajectory; each space-time point x in the trajectory t = {l,cat,t} represents a visit record of user u, where cat is the category of the address; the complete set of human movement trajectories is defined as X = {x m ,m∈|M|}, where |M| is the number of moving trajectories; given x 1:t ,The goal of the mobility prediction task is to generate multi-granularity labels for the next visit A ranked list of C h is the number of categories in the hth layer, H = 4; the specific steps to obtain multi-granularity hierarchical structure labels are as follows: S1-1: Obtain labels at the physical address and address class levels; in the hierarchical label tree, the label granularity increases as h becomes larger, i.e., C h-1 <C h ; When h=H, C H =P; for the physical address level label, y H ∈{l i |i∈[1,C H ]}; For address category level labels, y H-1 ∈{cat i |i∈[1,C H-1 ]}; S1-2: Obtain activity mode labels; activity mode-level labels are derived from the public classification standards of Foursquare (https: / / docs.foursquare.com), including ten semantic categories: Arts and Entertainment, Business and Professional Services, Community and Government, Food and Beverage, Health and Medical, Landmarks and Outdoors, Nightlife, Retail, Sports and Entertainment, and Travel and Transportation; S1-3: Obtain need type labels; the need type hierarchy labels are adapted from Maslow's theory of human motivation, focusing on three basic human motivations: physiological needs, safety needs, and social needs. Due to the lack of observable empirical evidence in mobile data, high-order needs with abstract and long-term characteristics are excluded. The proposed hierarchical tree structure breaks through the traditional strict order and implements the application of Maslow's hierarchy of needs theory in a more flexible way.
3. The long-tail human mobility prediction method based on adaptive hierarchical learning according to claim 1, characterized in that: In S2, the probability transfer matrix between adjacent level labels is constructed from bottom to top; wherein each probability transfer matrix T h→h-1 The probability of mapping fine-grained labels at the hth level to coarse-grained labels at the h-1th level is quantified. The specific steps for constructing cross-level label mapping relationships are as follows: S2-1: Construct a mapping from physical address to address category level; since the original human movement trajectory contains the physical address and address category of each visit, the probability transfer matrix T from the Hth to the H-1th layer can be directly extracted from the original data H→H-1 ; S2-2: Construct a mapping from address categories to activity mode hierarchies; based on Maslow's needs design thinking chain prompts for human motivation, use an objective large language model to infer the mapping between address category labels and activity mode labels. H-1→H-2 This large language model-based approach not only improves mapping accuracy but also effectively addresses the challenges posed by the variability of category definitions across different urban contexts. Subsequently, three domain experts validated the mapping results generated by the large language model based on the annotation workflow in natural language processing. S2-3: Construct a mapping from activity patterns to requirement type hierarchies; H-2→H-3 The generation process of the radiation is the same as T H-1→H-2 This hybrid mapping approach, combining large language model generation with manual verification, ensures reliability while minimizing labor costs. Ultimately, a hierarchical tree structure with four levels is constructed for each city.
4. The long-tail human mobility prediction method based on adaptive hierarchical learning according to claim 1, characterized in that: In S3, a deep learning model is used to capture the spatiotemporal correlation between the user's access preferences and the physical address. The specific steps for obtaining a spatiotemporal-aware address embedding vector are as follows: S3-1: Obtain the predicted pairwise counts for the candidate physical address set; map the physical address labels in the human mobility data to a continuous vector space and encode them using one-hot vectors; then, compute the embedding vectors of the physical addresses using a graph neural network or sequence model; compute the pairwise counts predicted by the model for all physical addresses through message passing aggregation, gating mechanisms, attention calculations, or diffusion processes: z=Backbone(x 1:t )={z1,z2,...,z |P| } (1) Among them, Backbone(·) is a mobility prediction method; when the mobility prediction method is Graph-Flashback, first a user-address knowledge graph with strong representation ability, that is, a spatiotemporal knowledge graph, is constructed to learn the representation of each node and edge; on this basis, an address transition graph is constructed based on the learned representation by defining a similarity function; next, the network graph flashback recommendation mechanism is used to integrate the learned graph structure into the sequence model; specifically, the graph flashback method applies a simplified graph convolutional network on the address transition graph to enhance the representation ability of each address; in addition, another similarity function is defined to consider the influence of spatiotemporal information and user preferences in the process of sequence rule modeling; when the mobility prediction method is STHGCN, a hypergraph structure is used to capture trajectory granular information to understand the user's mobility behavior in more detail; on this basis, the hypergraph structure encoding is effectively combined with spatiotemporal information through the hypergraph Transformer , enhancing the ability to predict user behavior in dynamic environments; its characteristic is that, when the mobility method is MCLP, firstly, a topic model is used to extract users' preferences for different types of addresses from historical trajectories to reveal users' interests and needs; secondly, a robust arrival time embedding is constructed through an arrival time estimator based on a multi-head attention mechanism to accurately reflect the arrival time of users at different addresses; finally, the Transformer architecture is used to mine users' sequential patterns; when the mobility prediction method is Diff-POI, two tailored graph encoding modules are used to encode users' visit sequences and spatial features to ensure that users' access behaviors and their spatial distributions can be fully captured; then, a diffusion-based sampling strategy is adopted to deeply explore users' spatial access trends, sampling from the posterior distribution through the diffusion process and its inverse form; this process can not only reflect users' potential behavior patterns, but also improve the accuracy of prediction by optimizing the corresponding scoring function.
5. The long-tail human mobility prediction method based on adaptive hierarchical learning according to claim 1, characterized in that: In S4, noise sampled from the Gumbel distribution is added to adjust the prediction probability at all physical addresses. The specific steps for calculating the prediction probability based on the Gumbel perturbation are as follows: S4-1: Sampling Gumbel noise; To alleviate the biased optimization of head addresses in long-tail mobile data in deep learning models, Gumbel perturbation is introduced to enhance the exploration of human mobile knowledge; Gumbel perturbation injects randomness into the sampling process, allowing the model to consider different physical addresses instead of relying solely on high-probability predictions; Since the Gumbel distribution is a maximally stable distribution, it can maintain the original probability distribution even after adding noise; sampling a from the uniform distribution Uniform(0,1) i , according to g i =-log(-log(a i ))Get the noise that conforms to the Gumbel distribution; S4-2: Use Gumbel noise to smooth the initial probability distribution; directly sum the probability of the original physical address level with the sampled Gumbel noise, and add a temperature parameter to control the degree of smoothing: Among them, i is the label The subscript of , τ is the temperature parameter; then, the initial hierarchical prediction results are obtained from bottom to top (i.e., from fine-grained to coarse-grained) through the hierarchical probability transfer matrix: Among them, T h→h-1 Is a size C h ×C h-1 The probability transfer matrix, T h→h-1 The value of each row of elements is between 0 and 1 and the sum of each row is 1; S4-3: Calculate the final probability of the nodes in the hierarchical tree structure; in the hierarchical tree structure, the leaf nodes The probability of can be uniquely decomposed by the chain rule from top to bottom (from the root node to the leaf nodes): Where H is the depth of the node, Represents the conditional probability of a child node given a parent node; the root node The probability of is equal to 1, so it is omitted here; the conditional probability is expressed as follows using the leaf node probability: Where j is the H-th layer label C H The subscript of 6. The long-tail human mobility prediction method based on adaptive hierarchical learning according to claim 1, characterized in that: In S5, the specific process of performing the adaptive hierarchical joint optimization is as follows: S5-1: Adaptive weight distribution; Due to the inherent long-tail distribution of nodes at the physical address level, the distribution of high-level nodes is also uneven; To better explore dynamic mobility knowledge, node adaptive weights are used to optimize the model; To prevent granularity competition, coarse-grained levels are assigned lower weights; For simplicity, weights are initialized to [1, 0.75, 0.5, 0.25] from fine to coarse; Softplus activation function is used to ensure positive weight values; S5-2: Adaptive layer-wise loss function; Based on the above process, the adaptive layer-wise loss function is defined as follows: in, is a learnable weight, and N is the total number of predictions. Optimizing the parameters using the adaptive layered loss function can penalize misclassifications in a layer-aware manner, thereby enhancing the accuracy of classification at each layer. S5-3: Comparison with the gradient of traditional cross entropy loss; for simplicity, only a single label is considered here Instead of all samples X in the trajectory sequence, the optimization objectives of the standard cross entropy loss and the adaptive layer-wise loss are defined as follows: For the sake of clarity, we introduce Come aggregate The probability of a leaf node under the label: These two losses are related to the logit number z j The derivative of can be derived as: Among them, the superscript H represents the level of the physical address, and 1 represents the level of the demand type. It can be seen that the adaptive hierarchical loss function encapsulates the address in a competitive manner. This suggests that equal weights at different levels will lead to Degenerate optimization of ; In addition, and is a coefficient used to stabilize the optimization to prevent gradient decreasing during the optimization process; the gradual reduction of weight initialization at different levels corresponds to the trend of shared semantic learning among long-tail addresses.
7. A long-tail human mobility prediction system based on adaptive hierarchical learning, characterized by: The method comprises a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, the method is used to implement the long-tail human movement prediction method based on adaptive hierarchical learning according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that A program is stored thereon, and when the program is executed by a processor, the long-tail human movement prediction method based on adaptive hierarchical learning according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Few-sample hierarchical text classification method based on pre-training language model
CN121501999A
Few-shot hierarchical text classification method based on pre-trained language model
CN121501999B
TVDS anomaly detection method and system based on self-enhancement iteration
CN121858751A
A TVDS Anomaly Detection Method and System Based on Self-Reinforcing Iteration
CN121858751B