A method for dynamic prediction of urban area visitors based on hypergraph learning
By designing preprocessing and hypergraph construction for urban area visitation events, and combining multi-head attention mechanism and time factor, the problems of time period semantic information mining and high-order correlation in dynamic prediction of urban area visitation are solved, thereby improving the robustness and accuracy of the prediction model.
Patent Information
- Application Number
- CN202411352545.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-09-26
AI Technical Summary
Existing methods suffer from insufficient semantic information mining of time periods, inadequate modeling of inter-time period correlations, and difficulty in capturing high-order correlations between multiple time periods in dynamic prediction of urban visitation, resulting in poor prediction performance.
The design incorporates point visit event preprocessing and multi-level visit hypergraph construction, introduces multi-head attention mechanism and time factor hyperedge feature extraction, and combines multi-loss fusion model training optimization to improve feature robustness and prediction accuracy.
By employing a multi-level hypergraph structure and a multi-loss fusion scheme, the model effectively captures semantic information at different time periods and high-order correlations between multiple time periods, thereby improving the accuracy and reliability of the dynamic prediction model for urban visitors.
Smart Images

Figure CN119443345B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of perception and prediction of human activities in urban areas within the fields of deep learning and spatiotemporal data mining, and relates to a method for dynamic prediction of urban area visitors based on hypergraph learning. Background Technology
[0002] In today's technological context, the widespread application of mobile sensors and the ubiquity of GPS data from users' mobile phones have made it increasingly easy to acquire big data on urban human movement behavior. Against this backdrop, the field of urban human activity perception and prediction has emerged. Through research on human movement behavior data collection and processing, pattern recognition and analysis, and predictive model construction, it is possible to perceive people's daily flow patterns in cities and predict visitor patterns or regional traffic in different functional areas. The perception and prediction of urban human activity can significantly improve urban management and service quality, and assist in emergency response and management decision-making.
[0003] In the field of urban human activity perception and prediction, research and applications based on urban big data and human mobility behavior big data are constantly emerging, driving the development of smart cities. From the perspective of core technologies used, recent research can be mainly divided into two categories: algorithms optimized for specific problem scenarios and methods based on deep learning models. ① Algorithms optimized for specific problem scenarios focus on performance and effectiveness in specific applications, fully utilizing the advantages of traditional machine learning algorithms and statistical models, and can be customized and optimized according to the characteristics of specific problems. Considering the close relationship between human behavioral purposes, interests, and location functions, many studies use clustering algorithms to mine location attributes and common functions based on points of interest, enriching spatial location semantics; they use probabilistic graphs or sparse matrices to simulate the relationships between geographic locations and large-scale population flows, mining spatiotemporal correlations in human mobility behavior data; the core information for human mobility behavior perception comes from various spatiotemporal data, and in-depth consideration of external factors such as weather and holidays helps improve the accuracy and practicality of predictions. ② Methods based on deep learning models have shown great potential in urban human activity perception and prediction. These methods rely on time-series models such as RNNs, LSTMs, ConvLSTMs, and Transformers, leveraging feature extraction driven by massive urban big data to support population activity and traffic prediction. Diverse urban human mobility behavior big data can be extracted into different data instances based on data type differences, such as sequences, graphs, two-dimensional matrices, and three-dimensional tensors, to meet the needs of deep learning models. Based on carefully designed data preprocessing, the automatic feature representation learning capabilities and powerful function approximation capabilities of deep models on time-series and spatiotemporal data can be more flexibly utilized, thereby supporting urban management and service optimization.
[0004] Existing research has sufficiently validated the performance and effectiveness of its findings in specific applications. However, in new application scenarios requiring dynamic prediction of visitation patterns in urban areas, where cities comprise multiple geospatial locations, it is necessary to construct specific location visitation characteristics to dynamically predict visitation patterns in conjunction with input time-period information. This scenario still presents several challenges:
[0005] First, there is insufficient mining of semantic information across time periods. Data from different time periods may be influenced by different factors, exhibiting different characteristics. Directly encoding the raw time lacks the mining and application of semantic information at the time period level, necessitating emphasis on time period segmentation and feature mining. For example, 8:00-10:00 on weekdays is the peak commuting period, making various workplaces more susceptible to attendance tracking. Second, there is insufficient modeling of inter-time period correlations. The correlations between diverse time periods are extremely strong, not independent and unrelated. For example, the flow of people during commuting hours on multiple weekdays exhibits periodicity, but modeling the heterogeneity, periodicity, and temporal dynamics of access patterns across different time periods remains insufficient. Finally, it is difficult to capture high-order correlations between multiple time periods when constructing location features. The combination of access patterns from multiple different time periods can reflect the functional characteristics of a region. How to aggregate access features from multiple time periods in long-term historical access data into complete location access features and capture high-order correlations between different time periods is a complex dynamic relationship problem that traditional time-series models struggle to solve.
[0006] In conclusion, existing methods are difficult to apply directly in order to achieve dynamic prediction of visitor patterns in urban areas, and further research is needed. Summary of the Invention
[0007] (a) Purpose:
[0008] In the context of dynamic prediction of visitor information in urban areas, this invention addresses the shortcomings of existing methods, such as insufficient mining of semantic information across time periods, inadequate modeling of inter-time period correlations, and difficulty in capturing high-order correlations between multiple time periods when constructing location features. The technical problems to be solved are: 1. How to mine and apply the spatiotemporal features of visitor data from different time periods to more accurately reflect the semantic information at the time period level; 2. How to build a model to capture the correlations between diverse time periods to enhance the robustness of visitor information features across different time periods; 3. How to capture high-order correlations between multiple time periods to construct visitor information features for each location, solving the complex dynamic relationship problems that traditional time-series models struggle to handle, thereby improving the overall prediction performance.
[0009] The problems to be solved by this invention are: designing a preprocessing method for site visit events and constructing a multi-level hypergraph of visit situations to avoid missing semantic information of time periods and insufficient data hierarchy; introducing a hyperedge feature extraction based on multi-head attention mechanism and time factor to capture the high-order correlation of visit features between multiple time periods by generating time period-level and site-level visit features; and designing a model training optimization scheme based on multi-loss fusion to enhance the robustness of features and improve the overall performance of the dynamic prediction model for urban area visitors.
[0010] (II) Technical Solution:
[0011] The technical solution adopted in this invention is: a method for dynamic prediction of urban area visitors based on hypergraph learning, comprising the following steps:
[0012] Step 1: Preprocessing of Visit Events and Construction of Hypergraph: Preprocess visit events and construct a multi-level hypergraph of point visits;
[0013] Step 2: Extraction of hyperedge features for urban spatial locations: Construct hyperedge features based on multi-head attention mechanism and time factor around the hypergraph of multi-level location access.
[0014] Step 3: Perform model training optimization based on multi-loss fusion.
[0015] The beneficial effects of this invention compared to the prior art are as follows:
[0016] (1) This invention designs a preprocessing method for location visit event data and constructs a hypergraph of visitation status. By dividing the visitation data into time periods, it avoids the loss of semantic information and insufficient data hierarchy caused by the simple arrangement of the original time information. Furthermore, the construction of a multi-level hypergraph of visitation status helps to effectively extract information from the visitation data, explore the characteristics of different time periods, and capture complex dynamic relationships. This method provides data support for enhancing the ability to extract visitation features in different time periods.
[0017] (2) This invention introduces hyperedge feature extraction based on multi-head attention mechanism and time factor. The multi-level hypergraph structure effectively extracts access data and uses the time factor to introduce periodic time information of different granularities. On the one hand, by generating multi-time period hyperedge features, the semantic information of time period level is reflected; on the other hand, the access features of spatial points are constructed to capture the high-order correlation between multiple time periods, further model the complex dynamic relationship, and thus ensure the accuracy and reliability of the prediction model.
[0018] (3) This invention designs a multi-loss fusion scheme, which helps to enhance the robustness of features and benefit downstream tasks. Through multi-loss fusion, on the one hand, the expression of hyperedge features in multiple time periods is enhanced, improving the correlation between different time periods and the robustness of access features; on the other hand, it ensures the accuracy and reliability of the final prediction results. This method optimizes time-level and location-level access features, improves the overall performance of the dynamic prediction model for urban area visitors, and supports fine-grained prediction of access situations. Attached Figure Description
[0019] Figure 1 A schematic process diagram is shown for a method for dynamic prediction of urban area visitors based on hypergraph learning according to an embodiment of the present invention. Detailed Implementation
[0020] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0021] First, let's introduce the overall design concept of this invention:
[0022] First, the original urban spatial location visit events are preprocessed, and a multi-level hypergraph of location visit information is constructed based on time period division. Second, a multi-head attention mechanism with time factor is introduced to construct hyperedge features, generating time period-level and spatial location-level visit information features. Finally, a multi-loss fusion scheme is designed to guide the training and optimization of the model, so as to improve the robustness of feature extraction and the accuracy of prediction results.
[0023] This method mainly consists of three parts: visit event preprocessing and hypergraph construction, urban spatial point hyperedge feature extraction, and model training and optimization based on multi-loss fusion. The process framework and implementation steps are as follows:
[0024] Step 1: Preprocessing of Visit Events and Hypergraph Construction
[0025] The first step of this invention is to preprocess the site visit events and construct a hypergraph of the visit situation, so as to provide data support for extracting visit features at different time periods and generating urban site visit features for prediction.
[0026] For urban area characteristic analysis, time period segmentation is particularly important. Data from different time periods may be influenced by different factors, exhibiting different characteristics. By dividing the data into more meaningful and interpretable time periods, it is easier to intuitively display the temporal characteristics and periodic patterns of access data, and to more easily identify data trends, abrupt changes, and cyclical variations. In the implementation process, firstly, the site visit events are preprocessed, grouped according to the site, and arranged in ascending order of access time to form a list of access events for each site. Then, a multi-level hypergraph of site access is constructed, with each level containing various heterogeneous nodes. A hyperedge of the hypergraph can connect multiple nodes, thus helping to express higher-order correlations between nodes, providing greater flexibility and expressive power for modeling complex site access mechanisms, and capturing complex dynamic relationships. Each site has an inherent correlation with the access events in its access list, forming a "site-corresponding site access event" relationship. Further dividing the 24 hours of a day into time periods according to the preset time period length and adding an intermediate node can form a multi-level hypergraph structure of "access status of a location under the time period - access events of the corresponding location under the corresponding time period" and "overall access status of a location - access status of a location under the time period". This provides support for extracting access features of different time periods and introducing semantic information at the time period level.
[0027] Step 2: Extraction of Hyperedge Features of Urban Spatial Points
[0028] The second step of this invention is mainly based on the construction of hyperedge features using a multi-head attention mechanism and time factors, gradually generating time-segment level access features and spatial location level access features. Access features across multiple time periods reflect semantic information at the time-segment level, while location access features capture higher-order correlations between multiple time periods, modeling complex dynamic relationships.
[0029] For a hypergraph containing two main levels of access patterns, the first step is to encode access events in the shallow layer, "Time Periods Involved by Locations - Access Events of Corresponding Locations within the Corresponding Time Periods," generating fixed-dimensional event node feature vectors. Then, for the time periods involved by each location, hypergraph-based node feature aggregation is performed, utilizing a multi-head attention mechanism to capture the dependencies between numerous event nodes in the access list over a given period. The access event node features, combined with fine-grained time factors within the time periods, generate a first-stage multi-time period access feature. In the deeper layer, "Locations - Time Periods Involved by Locations," the advantages of the hypergraph combined with the multi-head attention mechanism are again leveraged. During the attention mechanism calculation stage, coarse-grained time information such as hours and days of the week for each time period is introduced to capture higher-order relationships between multiple time periods with temporal sequence characteristics. Finally, the access features from multiple time periods are aggregated into a second-stage spatial location access feature.
[0030] Step 3: Model Training and Optimization Based on Multi-Loss Fusion
[0031] Dynamic prediction of visitor information in urban areas requires combining the encoded vector of the time period to be predicted with the visitor characteristics of each location. This allows for dynamic output of prediction results based on the input time period information, thus flexibly providing visitor information for urban spatial locations at different time periods. The third step of this invention involves training and optimizing a model based on multi-loss fusion. On one hand, loss constraints are used to constrain the expression of hyperedge features across multiple time periods, enhancing the correlation between diverse time periods and the robustness of visitor characteristics across different time periods. On the other hand, loss is used to ensure the accuracy and reliability of the final prediction results.
[0032] In the two-layer hyperedge feature aggregation stage, to ensure the robustness of time-based and location-based visitor features, this invention designs two layers of loss. First, to optimize time-based visitor features, the type information of urban spatial locations is fully utilized, and a triplet loss based on location type and time-based characteristics is used to supervise the extraction of features from multiple locations and time periods. Second, to optimize location-based visitor features and support the final dynamic prediction of visitors at each location, this invention designs a dynamic prediction loss to supervise the prediction results of specific visitors. Finally, the dynamic prediction model for visitors to the entire urban area is optimized and trained by weighted fusion of the two loss components.
[0033] The following is for reference. Figure 1 The specific process of the method of the present invention is described. Figure 1 A schematic process diagram illustrating a method for dynamic prediction of urban area visitors based on hypergraph learning according to an embodiment of the present invention is shown. Figure 1 As shown, the proposed method for dynamic prediction of urban area visitors based on hypergraph learning mainly includes three parts: visit event preprocessing and hypergraph construction, urban spatial point hyperedge feature extraction, and model training and optimization based on multi-loss fusion. The specific implementation is as follows:
[0034] Step 1: Preprocessing of Visit Events and Construction of Hypergraph: Preprocess visit events and construct a multi-level hypergraph of point visits.
[0035] The set of urban spatial locations can be represented as The set of location functional attributes involved in all points can be represented as: All access event data The set of visitors involved can be represented as Each access event contains several key fields of information. This means that point p, which has functional attribute c, is visited by visitor v at timestamp t, thus generating visit event e.
[0036] In one embodiment, all visit event data Preprocessing includes: grouping by location and sorting by access time in ascending order to obtain a list of access events for each location. Then, the time period segmentation and access event table time period segmentation phase is executed: First, the 24 hours of a day are divided into 8 time periods with a preset time period length of 3 hours. ,in, Indicates the first Each period, This represents the time of day (in hours). Then, the list of access events will be displayed. Divided into multiple time-based access event lists For a certain period of time Points with no access events The corresponding list During the process of segmenting the access data by time period, intermediate nodes are generated: that is, the access lists of each location within the relevant time period. It can reflect the access status of a location at a certain time period.
[0037] In one embodiment, constructing a multi-level hypergraph of location access includes: based on the above symbol definitions, in the multi-level hypergraph of location access, a shallow time-level hypergraph... Among them, the time periods involved at each location Then the time period The access event of the corresponding point is the source node. Time-level super-edge The features can represent access characteristics across multiple time periods, supporting the introduction of time-level semantic information. Deep point-level hypergraphs Among them, the overall access status of the points The time period involved in the location is the node. Then from Point-level supermap It can guide the aggregation of location access characteristics at different time periods.
[0038] Step 2: Extraction of hyperedge features for urban spatial locations: Construct hyperedge features based on multi-head attention mechanism and time factor around the hypergraph of multi-level location access.
[0039] Specifically, by designing a time factor, the temporal information of the relationship between nodes and hyperedges is enriched and integrated into the hypergraph's message and propagate processes. The entire process can be expressed by the following formula:
[0040] ,
[0041] Among them, for the target node and source node ,gather Includes target node All adjacent nodes involved, This represents the representation vector of the target node i in the (l+1)th iteration. Represents the source node j at the th The vector representing the wheel. Then the original features corresponding to source node j, Represents the target node With source node The time factor representing the interaction on the relationship is a vector. In a multi-level hypergraph structure, the roles of the target node and the source node are distinguished according to the different levels of the hypergraph. In a shallow time-level hypergraph... In the middle, the time periods involved at each location The target node for feature aggregation is the node whose access events occur at the corresponding location within a given time period, while the source node is the node whose access events occur at the corresponding location within that time period. Time-level hyperedges generated through aggregation This allows for the representation of access characteristics across multiple time periods, supporting the introduction of time-level semantic information. In deep point-level hypergraphs... Overall visitor status of the locations The target node for feature aggregation is the location within the time period. It then serves as the source node for providing information, thereby enabling the aggregation of location access characteristics at different times.
[0042] During message passing, vectors are represented by combination nodes using addition operators. With time factor vector , obtain the message passing vector :
[0043] ,
[0044] During the node feature update process, the multi-head attention mechanism commonly used in the Transformer architecture is introduced. To assess the importance of each message, the settings are configured. Using different attention heads, the urban area visitor dynamic prediction model captures the correlation between the source node and the target edge, while also focusing on information from multiple representation subspaces. Then, neighborhood information is aggregated through a weighted summation of attention weights, ultimately yielding an updated representation vector. :
[0045] ,
[0046] ,
[0047] ,
[0048] in, , as well as It is the first The learnable parameter matrix of each attention head, using the matrix and the representation vector of the target node Constructing queries with attention heads ,use , With message passing vector Construct key and value , This represents the feature dimension input to the multi-head attention mechanism. This is the output of the nth attention head. Finally, by concatenating and combining the outputs of H heads, and after normalization, we obtain a new round of node feature aggregation results. .
[0049] Both layers of hyperedge features employ multi-head attention mechanisms and time factors in their construction, but differ slightly in the design and construction of the time factors, resulting in multi-level, multi-periodic time factors with varying granularities. These time factors include fine-grained time information within time periods and coarse-grained time information between time periods.
[0050] Based on the above description of the fusion of multi-head attention mechanism and time factor, in one embodiment, hyperedge features are extracted from the multi-level point access hypergraph described in step one:
[0051] In the shallow multi-time period access feature construction stage, the time period representation is initialized by aggregating access event messages from each time period. First, the access event nodes at the bottom layer of the access hypergraph are... Encode the information, including time information. Decompose the event into the weekday, hour, and minute corresponding to the timestamp, and expand the event field to... Each field is encoded to generate a representation vector, and these vectors are concatenated to generate a fixed-dimensional event node representation vector. ,in Let be the dimension of the event representation vector.
[0052] For point p, its time period The following events form a list. The timestamps corresponding to each event can also be used to form a list. To capture fine-grained temporal information between nodes and hyperedges in a shallow hypergraph, we first calculate the initial value by analyzing all times in the timestamp list. mean and termination value This serves as a reference value. Secondly, regarding the event list for the specified time period... For each event within the timeframe, the minute-level time difference between its access time and three reference values is calculated, forming three difference values to describe the time variations of different access events. Subsequently, these three differences are linearly encoded to obtain a fine-grained representation of the time information. It is also known as the time factor.
[0053] By combining access event node features with fine-grained time factors and utilizing a multi-head attention mechanism to capture the dependencies between numerous event nodes in the time-segment access list, multi-time-segment hyperedge features are generated. :
[0054] ,
[0055] ,
[0056] in, It is the event node representation vector input in the initial stage. This is the event node representation of the l-th iteration. This represents the time factor obtained by accessing event j in the access list during time period i.
[0057] In the deep location access feature construction stage, the advantages of hypergraph learning combined with multi-head attention mechanism are also utilized. When calculating the attention mechanism, coarse-grained temporal information for each time period is incorporated, including the start time of each period. Deadline The time difference between the start time and midnight of the day What day of the week? And whether it is a holiday For coarse-grained time information Encode and concatenate to obtain the time factor. , This represents the time factor of time period j at target location i. To capture higher-order correlations between multiple time periods with temporal characteristics, access features from multiple time periods are aggregated into complete location access features. :
[0058] .
[0059] Step 3: Perform model training optimization based on multi-loss fusion.
[0060] To ensure the robustness of time-based and location-based visit features and to support the training and optimization of dynamic prediction models for urban visitors, this invention designs a two-layer loss mechanism.
[0061] First, to optimize time-based access characteristics and fully utilize the type information of urban spatial locations, this invention designs a triplet sample construction strategy based on location type and time-based characteristics. Specifically, for the time-based access characteristics used as the baseline... Select positive samples This aims to narrow down the features of locations with the same functional attributes within similar time periods. For example, it aims to narrow down the features of locations with the same attributes within ±1 adjacent time periods (i.e., consecutive time periods) on weekdays or holidays. Simultaneously, negative samples are selected. This is used to extrapolate the characteristics of points with different functional attributes within the same time period. This is achieved by calculating the triplet loss. This provides support for supervising the extraction of features from multiple locations and time periods:
[0062] ,
[0063] in, The cosine similarity between two features is represented by... This represents the boundary hyperparameter used to control the distance between positive and negative samples.
[0064] To dynamically predict visitors to urban areas, the encoded vector of the time period to be predicted needs to be combined with the visitor characteristics of each location, so as to dynamically generate prediction results based on time period information. Specifically, embedding representation techniques are used to embed the encoded vector of the time period to be predicted... Convert into a learnable encoded vector Then Characteristics of visits at each location Combining these factors, the final output is the prediction result for the time period to be predicted. Combined with target labels constructed based on the list of actual visitors Calculate dynamic prediction loss :
[0065] ,
[0066] ,
[0067] in, and These are the learnable parameters in the output prediction stage. It is the number of samples to be tested. This represents the Sigmoid function used to convert model output into probabilities. Indicates feature splicing, This represents the normalization exponential function, used to transform a real number vector into a probability distribution vector.
[0068] To optimize the representation of model features, this invention designs a multi-loss weighted fusion scheme, and the final loss is obtained through multi-loss weighted fusion. :
[0069] ,
[0070] in, and It is a weighted hyperparameter. It can be used for parameter iteration and optimization in dynamic prediction models of urban visitors:
[0071] ,
[0072] ,
[0073] in, and Parameters of the dynamic prediction model for visitors to urban areas It is the gradient operator. Represents the gradient. This is the learning rate. By continuously optimizing the training model, fine-grained prediction of access patterns is achieved, ensuring the accuracy and reliability of the prediction results.
[0074] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0075] Although the invention has been described with respect to a limited number of embodiments, those skilled in the art will understand from the foregoing description that other embodiments are conceivable within the scope of the invention described herein. Furthermore, it should be noted that the language used in this specification has been chosen primarily for readability and instructional purposes, and not for the purpose of explaining or limiting the subject matter of the invention.
Claims
1. A method for dynamic prediction of urban area visitors based on hypergraph learning, characterized in that, Includes the following steps: Step 1: Preprocessing of Visit Events and Construction of Hypergraph: Preprocess visit events and construct a multi-level hypergraph of point visits; Step 2: Extraction of hyperedge features for urban spatial locations: Construct hyperedge features based on multi-head attention mechanism and time factor around the hypergraph of multi-level location access. Step 3: Perform model training optimization based on multi-loss fusion; Integrating the time factor into the information transmission and update mechanism of the multi-level point access hypergraph: , Among them, for the target node and source node ,gather Include All adjacent nodes involved, This represents the representation vector of the target node i in the (l+1)th iteration. Represents the target node j at the th The vector representing the wheel. Then the original features corresponding to target node j, represent and The time factor representing the interaction on the relation is a vector; Propagate represents the update mechanism algorithm, and Message represents the message passing algorithm. During message passing, vectors are represented by combining nodes using addition operators. With time factor vector , obtain the message passing vector : , During node feature updates, a multi-head attention mechanism commonly used in the Transformer architecture is introduced to evaluate the importance of each message. This is achieved by setting... Each attention head captures the correlation between the source node and the target edge, while also enabling the model to focus on information from multiple representation subspaces. Then, neighborhood information is aggregated through a weighted summation of attention weights, ultimately yielding an updated representation vector. : , , , in, , as well as It is the first The learnable parameter matrix of each attention head, using the matrix and the representation vector of the target node Constructing queries with attention heads ,use , With message passing vector Construct key and value , This represents the feature dimension input to the multi-head attention mechanism. It is the output of the nth attention head. Finally, by concatenating and combining the outputs of H heads, and normalizing, we obtain a new round of node feature aggregation results. Step three includes: First, regarding the time-based access characteristics used as a benchmark. Select positive samples To bring together the features of locations with similar functional attributes during similar time periods, negative samples were selected. To extrapolate the characteristics of points with different functional attributes during the same time period, the triplet loss is calculated. This provides support for supervising the extraction of features from multiple locations and time periods: , in, The cosine similarity between two features is represented by... This represents the boundary hyperparameter used to control the distance between positive and negative samples; Predictable time periods for visitors to urban areas Convert into a learnable encoded vector Then Characteristics of visits at each location Combining these factors, the final output is the prediction result for the time period to be predicted. Combined with target labels constructed based on the list of actual visitors Calculate dynamic prediction loss : , , in, and These are the learnable parameters in the output prediction stage. It is the number of samples to be tested. This represents the Sigmoid function used to convert the model output into probabilities; The final loss obtained through multi-loss weighted fusion : , in, and It is a weighted hyperparameter. Parameter iteration and optimization for a dynamic prediction model of visitors in urban areas: , , in, and Represents model parameters, It is the gradient operator. Represents the gradient. That is the learning rate.
2. The method for dynamic prediction of urban area visitors based on hypergraph learning according to claim 1, characterized in that, Step one includes: The set of urban spatial locations is represented as The set of location functional attributes involved in all points is represented as Full visit event data The set of visitors involved is represented as Each access event contains several key fields of information. ; Data on visit events Preprocessing includes: grouping by location and sorting by access time in ascending order to obtain a list of access events for each location. Then, the time period segmentation and access event table time period segmentation phase is executed: First, the 24 hours of a day are divided into 8 time periods with a preset time period length of 3 hours. ,in, Indicates the first Each period, Represent the time of day, then access the event list. Divided into multiple time-based access event lists For a certain period of time Points with no access events The corresponding list During the process of segmenting the access data by time period, intermediate nodes are generated: access lists for each location within the relevant time period. It can reflect the access status of a location at a certain time period; Constructing a multi-level hypergraph of location access includes: based on the above symbol definitions, in a multi-level hypergraph of location access, the shallow time-level hypergraph... Among them, the time periods involved at each location Then the time period The access event of the corresponding point is the source node. Time-level super-edge The features represent access characteristics across multiple time periods, supporting the introduction of time-level semantic information, and creating a deep point-level hypergraph. Among them, the overall access status of the points The time period involved in the location is the node. Then from .
3. The method for dynamic prediction of urban area visitors based on hypergraph learning according to claim 2, characterized in that, In the shallow multi-time period access feature construction stage, the time period representation is initialized by aggregating access event messages from each time period. First, the access event nodes at the bottom layer of the access status hypergraph are... Encode the information, including time information. Decompose the event into the weekday, hour, and minute corresponding to the timestamp, and expand the event field to... Each field is encoded to generate a representation vector, and these vectors are concatenated to generate a fixed-dimensional event node representation vector. ,in The dimension of the event representation vector; For point p, its time period The following events form a list A list is formed by the timestamps corresponding to each event. To capture fine-grained temporal information between nodes and hyperedges in a shallow hypergraph, we first calculate the initial value for all times in the timestamp list. mean and termination value As a reference value, secondly, for the list of events in the time period. For each event within the timeframe, the minute-level time difference between its access time and three reference values is calculated, forming three difference values to describe the time differences between different access events. Subsequently, these three differences are linearly encoded to obtain a fine-grained representation of time information. ; By combining access event node features with fine-grained time factors and utilizing a multi-head attention mechanism to capture the dependencies between numerous event nodes in the time-segment access list, multi-time-segment hyperedge features are generated. : , , in, It is the event node representation vector input in the initial stage. This represents the event node in the l-th iteration; In the deep location access feature construction stage, when calculating the attention mechanism, coarse-grained temporal information for each time period is introduced, including the start time of each time period. Deadline The time difference between the start time and midnight of the day What day of the week? And whether it is a holiday For coarse-grained time information Encode and concatenate to obtain Multiple time period access features are aggregated into complete location access features. : 。
Citation Information
Patent Citations
Hypergraph construction method and device and access site prediction method and device based on hypergraph
CN116484121A
Urban rail passenger flow prediction method based on dynamic multi-graph and multi-dimensional attention space-time neural network
CN117454119A