Urban area visitor dynamic prediction method based on hypergraph learning
Through the method based on hypergraph learning, a multi-level access situation hypergraph is constructed, and the hyper-edge features are extracted using multi-head attention mechanism and time factors, which solves the problems of insufficient mining of semantic information during the time period and insufficient modeling of high-order correlations, and achieves the following Accurate dynamic forecasts of visitor visitor in urban areas.
Patent Information
- Application Number
- CN202411352545.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-09-26
AI Technical Summary
In the dynamic prediction of visitor situation in urban areas, the period semantic information mining is insufficient and the period correlation modeling is insufficient, making it difficult to capture the high-order correlation between multiple periods, resulting in poor prediction results.
Using a method based on hypergraph learning, the hypergraph is constructed through visit event preprocessing and multi-level access situations, combining multi-head attention mechanism and time factors, super edge features are extracted, time-stage and point-level access features are generated, and multiple designs are designed. The model training optimization scheme for loss fusion enhances the robustness of features.
Effectively mine time-level semantic information, capture high-order correlations between multiple time periods, improve the accuracy and reliability of dynamic predictions of visitors in urban areas, and support fine-grained access situation prediction.
Smart Images

Figure CN119443345A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of perception and prediction of human activities in urban areas in the field of deep learning and spatiotemporal data mining, and relates to a method for dynamic prediction of visitors to urban areas based on hypergraph learning. Background Art
[0002] In today's technological context, the widespread use of mobile sensors and the popularity of user mobile phone GPS data have made it easier to obtain big data on urban human mobility behavior. In this context, the field of perception and prediction of human activities in urban areas has emerged. Through research such as human mobility behavior data collection and processing, pattern recognition and analysis, and prediction model construction, people's daily flow patterns in the city can be perceived, and the number of visitors or regional traffic in different functional areas can be predicted. The perception and prediction of human activities in urban areas can significantly improve urban management and service quality, and assist emergency response and management decision-making.
[0003] In the field of perception and prediction of human activities in urban areas, research and applications based on urban big data and human mobility behavior big data continue to emerge, promoting the development of smart cities. From the perspective of the core technologies used, recent research can be divided into two categories: algorithms based on optimization of specific problem scenarios and methods based on deep learning models. ① Algorithms based on optimization of specific problem scenarios focus on performance and effects in specific applications, make full use of 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 behavior purposes, interests and hobbies and location functions, many studies use clustering algorithms to mine location attributes and common functions based on points of interest to enrich spatial location semantics; use probability graphs or sparse matrices to simulate the relationship between geographic spatial points and large-scale crowd flow, and mine the spatiotemporal associations in human mobility behavior data; the core information of human mobility behavior perception comes from various spatiotemporal data, and in-depth consideration of external factors such as weather and holidays will help improve the accuracy and practicality of predictions. ② Methods based on deep learning models show great potential in the perception and prediction of human activities in urban areas. These methods rely on time series models such as RNN, LSTM, ConvLSTM and Transformer, and support crowd activity behavior prediction and traffic prediction through feature extraction driven by massive urban big data. Diverse urban human mobility behavior big data can be extracted into different data instances, such as sequences, graphs, two-dimensional matrices and three-dimensional tensors, according to data type differences to meet the needs of deep learning models. Based on carefully designed data preprocessing, the automatic feature representation learning ability and powerful function approximation ability of deep models on time series data and spatiotemporal data can be more flexibly utilized, thereby providing support for urban management and service optimization.
[0004] The performance and effect of existing research in specific applications have been fully verified. However, in new application scenarios that require dynamic prediction of visits to urban areas, cities contain multiple geographic spatial points, and it is necessary to construct visit features for specific points in order to dynamically predict the visit conditions of the points in combination with input time period information. In this scenario, there are still some challenges:
[0005] First, the mining of semantic information of time periods is insufficient. Data in different time periods may be affected by different factors and show different characteristics. Directly encoding the original time lacks the mining and application of semantic information at the time period level, and it is necessary to emphasize the division of time periods and feature mining. For example, 8:00-10:00 on weekdays is the peak working hours, and various workplaces are more likely to be visited by clocking in. Secondly, the modeling of correlation between time periods is insufficient. The correlation between diverse time periods is extremely strong, and they are not independent and unrelated. For example, the flow of people during working hours on multiple working days is periodic, but the modeling of the heterogeneity, periodicity and time series dynamic characteristics of the visit situation in different time periods is still insufficient. Finally, it is difficult to capture the high-order correlation between multiple time periods when constructing point features. The combination of visit situations in multiple different time periods can reflect the functional characteristics of the region. How to aggregate the visit situation features of multiple time periods in long-term historical visit data into complete point visit situation features and capture the high-order correlation between different time periods is a complex dynamic relationship problem that traditional time series models are difficult to solve.
[0006] In summary, in order to achieve dynamic prediction of visitors to urban areas, the existing methods are difficult to apply directly and need further research. Summary of the invention
[0007] 1. Purpose:
[0008] In the context of the dynamic prediction task of visitor conditions in urban areas, the technical problems to be solved by the present invention are as follows: 1. How to mine and apply the spatiotemporal characteristics of visit data in different time periods so as to more accurately reflect the semantic information at the time period level; 2. How to establish a model to capture the correlation between diverse time periods so as to enhance the robustness of visit situation features in different time periods; 3. How to capture the high-order correlation between multiple time periods so as to construct visit situation features for each point, so as to solve the complex dynamic relationship problems that are difficult to be handled by traditional time series models, thereby improving the overall prediction effect.
[0009] The problems to be solved by the technology of the present invention are: designing point visit event preprocessing and multi-level visit situation hypergraph construction to avoid missing time period semantic information and insufficient data hierarchy; introducing hyperedge feature extraction based on multi-head attention mechanism and time factor, capturing high-order correlation of visit features between multiple time periods by generating time period-level visit features and point-level visit features; 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 of urban area visitors.
[0010] (II) Technical solution:
[0011] The technical solution adopted by the present invention is: a method for dynamic prediction of visitors to urban areas based on hypergraph learning, comprising the following steps:
[0012] Step 1: Preprocessing of visit events and construction of hypergraph: Preprocessing of visit events and construction of a multi-level hypergraph of point visit conditions;
[0013] Step 2: Extraction of hyper-edge features of urban spatial points: Based on the multi-level hypergraph of point access, hyper-edge feature construction is carried out based on the multi-head attention mechanism and time factor;
[0014] Step 3: Perform model training optimization based on multi-loss fusion.
[0015] The beneficial effects of the present invention compared with the prior art are as follows:
[0016] (1) The present invention designs the preprocessing of point visit event data and the construction of a visit hypergraph. By dividing the visit data into time periods, the missing of time period semantic information and insufficient data hierarchy caused by the simple arrangement of original time information are avoided. Further construction of a multi-level visit hypergraph helps to effectively extract information from the visit data, explore time period characteristics, and capture complex dynamic relationships. This method provides data support for enhancing the ability to extract visit 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-period hyperedge features, the semantic information of the time period level is reflected; on the other hand, the access characteristics of spatial points are constructed to capture the high-order correlation between multiple time periods, further modeling complex dynamic relationships, and thus ensuring the accuracy and reliability of the prediction model.
[0018] (3) The present 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 multi-period hyperedge features is enhanced, the correlation between different time periods and the robustness of access features are improved; on the other hand, the accuracy and reliability of the final prediction results are ensured. This method optimizes the time period and point level access features, improves the overall performance of the dynamic prediction model of urban area visitors, and supports fine-grained visit situation prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic process diagram of a method for dynamically predicting visitors to an urban area based on hypergraph learning according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0020] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms, and the present disclosure should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0021] First, the overall design idea of the present invention is introduced:
[0022] Firstly, the original urban spatial point visit events are preprocessed, and a multi-level point visit hypergraph is constructed based on time period division; secondly, the multi-head attention mechanism with the introduction of time factor is used to construct hyperedge features, and the visit features at the time period level and spatial point level are generated; finally, a multi-loss fusion scheme is designed to guide the training optimization of the model, so as to improve the robustness of feature extraction and the accuracy of prediction results.
[0023] This method mainly includes three parts: visit event preprocessing and hypergraph construction, urban space point hyperedge feature extraction, and model training optimization based on multi-loss fusion. The process framework and implementation steps are as follows:
[0024] Step 1: Preprocessing of visit events and construction of hypergraph
[0025] The first step of the present invention is to pre-process the point visit events and construct a visit situation hypergraph, so as to provide data support for extracting visit features in different time periods and generating city point visit features for prediction.
[0026] For the analysis of urban regional characteristics, time division is particularly important. Data in different time periods may be affected by different factors and show different characteristics. By dividing more meaningful and explainable time periods, it is helpful to more intuitively display the temporal characteristics and periodic patterns of access data, and it is easier to identify the trends, mutation points and periodic changes of data. In the implementation process, first, the point visit events are preprocessed, grouped according to the points and arranged in ascending order by access time to form a list of access events for each point. Then, a multi-level point access hypergraph is constructed, and each layer of the graph contains a variety of heterogeneous nodes. A hyperedge of the hypergraph can connect multiple nodes, which helps to express the high-order correlation between the nodes, provide higher flexibility and expressiveness for modeling complex point access mechanisms, and capture complex dynamic relationships. Each point has an inherent association with the access events in its access list, which can form a "point-corresponding point access event" relationship. The 24 hours of the day are further divided into time periods according to the preset time period lengths, and a layer of intermediate nodes is added to form a multi-level hypergraph structure of "visit situation of the point in the time period involved - visit events of the corresponding point in the corresponding time period" and "overall visit situation of the point - visit situation of the point in the time period involved", which provides support for extracting the visit 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 the present invention is mainly based on the hyperedge feature construction of the multi-head attention mechanism and the time factor, and gradually generates the time period level access situation features and the spatial point level access situation features. The access features of multiple time periods reflect the semantic information of the time period level, and the point access features capture the high-order correlation between multiple time periods and model complex dynamic relationships.
[0029] For the access hypergraph containing two main levels, firstly, in the shallow "time period involved by the point - access events of the corresponding point in the corresponding time period", the access events are encoded to generate fixed-dimensional event node feature vectors. Then, for the time period involved by each point, node feature aggregation based on hypergraph learning is carried out, and the multi-head attention mechanism is used to capture the dependencies between many event nodes in the access list over a period of time. The first-stage multi-time period access features are generated by combining the access event node features with the fine-grained time factors within the time period. In the deep "point-time period involved by the point", the advantages of the hypergraph combined with the multi-head attention mechanism are also brought into play. In the calculation stage of the attention mechanism, coarse-grained time information such as hours and days of the week of each time period is introduced to capture the high-order correlations between multiple time periods with time series characteristics. Finally, the access features of multiple time periods are aggregated into the second-stage spatial point access features.
[0030] Step 3: Model training optimization based on multi-loss fusion
[0031] The dynamic prediction of the visitor situation in the urban area needs to combine the coding vector of the time period to be predicted with the visit characteristics of each point, so as to dynamically output the prediction results according to the input time period information, thereby flexibly providing the visitor situation of the urban space points in different time periods. The third step of the present invention is to carry out the training and optimization of the model based on multi-loss fusion. On the one hand, the loss is used to constrain the expression of multi-time period hyperedge features, enhance the correlation between diversified time periods and the robustness of the visit situation characteristics in different time periods; on the other hand, the loss is used to ensure the accuracy and reliability of the final prediction results.
[0032] In the two-layer hyperedge feature aggregation stage, in order to ensure the robustness of the time period-level visit situation features and the point-level visit situation features, the present invention designs two layers of losses respectively. First, in order to optimize the time period-level visit situation features, make full use of the type information of urban spatial points, and use the triple loss based on point type and time period characteristics to supervise the extraction of multi-point multi-time period features; secondly, in order to optimize the point-level visit features and support the final dynamic prediction of visitors to each point, the present invention designs a dynamic prediction loss to supervise the specific visitor prediction results; finally, through the weighted fusion of the two parts of the loss, the dynamic prediction model of visitors in the entire urban area is optimized and trained.
[0033] Reference below Figure 1 The specific process of the method of the present invention is described. Figure 1 FIG. 2 is a schematic process diagram of a method for dynamically predicting visitors to a city area based on hypergraph learning according to an embodiment of the present invention. Figure 1 As shown, the method for dynamic prediction of visitors to urban areas based on hypergraph learning proposed in the present invention mainly includes three parts: visit event preprocessing and hypergraph construction, urban space point hyperedge feature extraction, and model training optimization based on multi-loss fusion. The specific implementation method is as follows:
[0034] Step 1: Preprocessing of visit events and construction of hypergraph: Preprocess the visit events and construct a multi-level hypergraph of point visit conditions.
[0035] The set of urban spatial points can be expressed as ; The set of location function attributes involved in all points can be expressed as ; All access event data The set of visitors involved can be expressed as Each access event contains several key fields: , which means that the point p with functional attribute c is visited by visitor v at timestamp t, thus generating a visit event e.
[0036] In one embodiment, all visit event data Preprocessing includes: grouping by points and arranging in ascending order by access time to obtain a list of access events for each point ; Then execute the period division and access event table period level segmentation stage: first divide the 24 hours of a day into 8 periods according to the preset period length of 3 hours, ,in, Indicates time period, Represents the time of day in hours. The list of events will then be accessed Access event list divided into multiple time periods , for a certain period of time No access event points , and its corresponding list In the process of segmenting the access data into time periods, intermediate nodes are generated: that is, the access list of each point in the time period , which can reflect the access situation of a point in a certain period of time.
[0037] In one embodiment, constructing a multi-level point access situation hypergraph includes: based on the above symbol definition, in the multi-level point access situation hypergraph, a shallow time period hypergraph , where each point involves a time period , then the time period The access event of the corresponding point is the source node , time period hyperedge The features of can represent the access features of multiple time periods and can provide support for the introduction of semantic information at the time period level. , among which, the overall visit situation of the points , the time period involved in the point is the node From , point-level hypergraph It can guide the aggregation of point access features in different time periods.
[0038] Step 2: Extraction of hyper-edge features of urban spatial points: Based on the multi-level point access hypergraph, hyper-edge feature construction is carried out based on the multi-head attention mechanism and time factor.
[0039] Among them, by designing the time factor, the time information of the relationship between nodes and hyperedges is enriched and integrated into the message transmission (Message) and update mechanism (Propagate) process of the hypergraph. The whole process can be expressed by the formula:
[0040] ,
[0041] Among them, for the target node and source node ,gather Contains target node All the adjacent nodes involved, represents the representation vector of the target node i in the l+1th iteration, Represents the source node j in The wheel representation vector, Then it corresponds to the original feature of source node j, Represents the target node With source node The time factor acting on the relationship between the two nodes represents a vector. In a multi-level hypergraph structure, the roles of the target node and the source node are differentiated according to the different levels of the hypergraph. The time periods involved in each point As the target node of feature aggregation, the access event of the corresponding point in the time period is the source node . The period-level hyperedge generated by aggregation , which can represent the access features of multiple time periods and provide support for introducing semantic information at the time period level. The overall visit situation of the points Become the target node for feature aggregation, and the time period involved in the point It acts as a source node that provides information, thereby realizing the aggregation of point access features in different time periods.
[0042] In the process of message passing, the addition operator is used to combine nodes to represent vectors. With the time factor vector , get the message passing vector :
[0043] ,
[0044] In the process of updating node features, the multi-head attention mechanism commonly used in the Transformer architecture is introduced ( ) to evaluate the importance of each message, by setting Different attention heads capture the correlation between the source node and the target edge, making the city area visitor dynamic prediction model pay attention to information from multiple representation subspaces; then the neighborhood messages are aggregated by weighted summation of attention weights, and finally the updated representation vector is obtained. :
[0045] ,
[0046] ,
[0047] ,
[0048] in, , as well as It is The learnable parameter matrix of the attention head is and the representation vector of the target node Constructing the query for the attention head ,use , With message passing vector , construct keys and values , represents the feature dimension input to the multi-head attention mechanism, is the output of the nth attention head. Finally, the output of H heads is combined and normalized to obtain a new round of node feature aggregation results. .
[0049] The construction of the two layers of hyperedge features both use multi-head attention mechanism and time factor, but the design and construction of the time factor are slightly different, forming multi-level and multi-periodic time factors of different granularities. These time factors include fine-grained time information within the time period and coarse-grained time information between time periods.
[0050] Based on the above description of the fusion of the multi-head attention mechanism and the time factor, in one embodiment, the hyperedge features are extracted from the multi-level point access situation hypergraph described in step 1:
[0051] In the shallow multi-period access feature construction stage, the period representation is initialized by aggregating the access event messages in each period. First, the access event nodes at the bottom layer of the access situation hypergraph are Encode information and convert time information Decompose into the week, 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.
[0052] For point p, in the period The following events are involved in the formation of a list , the timestamps corresponding to each event can also form a list In order to capture the fine-grained time information between nodes and hyperedges in the shallow hypergraph, all times in the timestamp list are first calculated to obtain the starting value , mean and the end value , as a reference value. Secondly, for the time period event list For each event in the time domain, the minute-level time difference between its access time and the three reference values is calculated to form three difference values to describe the time difference of different access events. Subsequently, these three difference values are linearly encoded to obtain a fine-grained time information representation. , also called the time factor.
[0053] Combine the access event node features with the fine-grained time factor, and use the multi-head attention mechanism to capture the dependencies between many event nodes in the time period access list to generate multi-period hyperedge features. :
[0054] ,
[0055] ,
[0056] in, is the event node representation vector input at the initial stage, is the event node representation of the lth iteration, It represents the time factor obtained by accessing event j in the list during time period i.
[0057] In the deep point access feature construction stage, we also take advantage of the hypergraph learning combined with the multi-head attention mechanism. When calculating the attention mechanism, we introduce the coarse-grained time information of each time period, including the start time of the time period. , Deadline , the time difference between the starting time and midnight of the day , day of the week and whether it is a holiday , for coarse-grained time information Encode and concatenate to get the time factor , Indicates the time factor of time period j under target point i. In order to capture the high-order correlation between multiple time periods with time series characteristics, the access features of multiple time periods are aggregated into a complete point access feature. :
[0058] .
[0059] Step 3: Perform model training optimization based on multi-loss fusion.
[0060] In order to ensure the robustness of the time period-level visit characteristics and the point-level visit characteristics, and to provide support for the training and optimization of the dynamic prediction model of urban area visitors, the present invention designs two layers of loss.
[0061] First, in order to optimize the time-period-level visit situation characteristics and make full use of the type information of urban spatial points, the present invention designs a triple sample construction strategy based on point type and time-period characteristics. , select positive samples , in order to bring together the features of points with the same functional attributes in similar time periods, for example, to bring together the features of points with the same attributes in ±1 adjacent time periods (i.e., adjacent time periods before and after) on weekdays or holidays; at the same time, select negative samples , in order to push away the features of different functional attribute points in the same period. By calculating the triplet loss , providing support for the extraction of supervised multi-point and multi-time features:
[0062] ,
[0063] in, represents the cosine similarity between two features, Represents the boundary value hyperparameter used to control the distance between positive and negative samples.
[0064] In order to dynamically predict the number of visitors to a city area, it is necessary to combine the encoding vector of the time period to be predicted with the visit characteristics of each point, so as to dynamically generate prediction results based on the time period information. Specifically, through the embedding representation technology, the time period to be predicted is combined with the visit characteristics of each point. Convert to a learnable encoding vector , and then Characteristics of visits to each location Combined, the prediction results corresponding to the predicted period are finally output , combined with the target label constructed based on the actual visitor list , calculate the dynamic prediction loss :
[0065] ,
[0066] ,
[0067] in, and are learnable parameters in the prediction output stage, is the number of samples to be tested, represents the Sigmoid function used to convert the model output into probability, represents feature concatenation, Represents the normalized exponential function, which is used to convert a real number vector into a probability distribution vector.
[0068] In order to optimize the expression of model features, the present invention designs a multi-loss weighted fusion scheme, and the final loss obtained by multi-loss weighted fusion :
[0069] ,
[0070] in, and is a weighted hyperparameter, It can be used for parameter iteration and optimization of the dynamic prediction model of visitors in urban areas:
[0071] ,
[0072] ,
[0073] in, and Represents the parameters of the dynamic prediction model for visitors to urban areas, is the gradient operator, represents the gradient, By continuously optimizing the training model, we can achieve fine-grained access situation prediction and ensure the accuracy and reliability of the prediction results.
[0074] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0075] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is primarily selected for readability and instructional purposes, rather than for the purpose of explaining or limiting the subject matter of the present invention.
Claims
1. A method for dynamic prediction of visitors to urban areas based on hypergraph learning, characterized in that: The following steps are involved: Step 1: Preprocessing of visit events and construction of hypergraph: Preprocessing of visit events and construction of a multi-level hypergraph of point visit conditions; Step 2: Extraction of hyper-edge features of urban spatial points: Based on the multi-level hypergraph of point access, hyper-edge feature construction is carried out based on the multi-head attention mechanism and time factor; Step 3: Perform model training optimization based on multi-loss fusion.
2. The method for dynamic prediction of visitors to urban areas based on hypergraph learning according to claim 1 is characterized in that: Step one includes: The set of urban spatial points is represented as , the set of location function attributes involved in all points is expressed as , full amount of visit event data The set of visitors involved is represented as Each access event contains several key fields. ; For visit event data Preprocessing includes: grouping by points and arranging in ascending order by access time to obtain a list of access events for each point ; Then execute the period division and access event table period level segmentation stage: first divide the 24 hours of a day into 8 periods according to the preset period length of 3 hours, ,in, Indicates time period, represents the time of day, and will then access the list of events Access event list divided into multiple time periods , for a certain period of time No access event points , and its corresponding list In the process of segmenting the access data into time periods, intermediate nodes are generated: the access list of each point in the time period , which can reflect the access situation of points in a certain period of time; Constructing a multi-level point access hypergraph includes: Based on the above symbol definition, in the multi-level point access hypergraph, the shallow time period hypergraph , where each point involves a time period , then the time period The access event of the corresponding point is the source node , time period hyperedge The features represent the access features of multiple time periods, providing support for the introduction of semantic information at the time period level. , among which, the overall visit situation of the points , the time period involved in the point is the node From .
3. The method for dynamic prediction of visitors to urban areas based on hypergraph learning according to claim 2 is characterized in that: Integrate the time factor into the information transmission and update mechanism of the multi-level point access situation hypergraph: , Among them, for the target node and source node ,gather Include All the adjacent nodes involved, represents the representation vector of the target node i in the l+1th iteration, Represents the target node j in The wheel representation vector, Then the original feature corresponding to the target node j is represent and The time factor acting on the relationship represents a vector; Propagate represents the update mechanism algorithm, and Message represents the information transmission algorithm; In the process of message passing, the addition operator is used to combine nodes to represent vectors. With the time factor vector , get the message passing vector : , In the process of updating node features, the multi-head attention mechanism commonly used in the Transformer architecture is introduced to evaluate the importance of each message. Different attention heads capture the correlation between the source node and the target edge while making the model pay attention to information from multiple representation subspaces; then the neighborhood messages are aggregated by weighted summation of the attention weights, and finally the updated representation vector is obtained. : , , , in, , as well as It is The learnable parameter matrix of the attention head is and the representation vector of the target node Constructing the query for the attention head ,use , With message passing vector , construct keys and values , represents the feature dimension input to the multi-head attention mechanism, It is the output of the nth attention head. Finally, the outputs of H heads are concatenated and normalized to obtain a new round of node feature aggregation results.
4. The method for dynamic prediction of visitors to urban areas based on hypergraph learning according to claim 3 is characterized in that: In the shallow multi-period access feature construction stage, the period representation is initialized by aggregating the access event messages in each period. First, the access event node at the bottom layer of the access situation hypergraph Encode information and convert time information Decompose into the week, 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, in the period The following events are involved in the formation of a list , each event corresponds to a timestamp to form a list To capture the fine-grained time information between nodes and hyperedges in the shallow hypergraph, we first calculate the starting value of all times in the timestamp list. , mean and the end value , as a reference value, and secondly, for the time period event list For each event in the access time, the minute-level time difference between its access time and the three reference values is calculated to form three difference values to describe the time difference of different access events. Subsequently, these three difference values are linearly encoded to obtain a fine-grained time information representation. ; Combine the access event node features with the fine-grained time factor, and use the multi-head attention mechanism to capture the dependencies between many event nodes in the time period access list to generate multi-period hyperedge features. : , , in, is the event node representation vector input at the initial stage, is the event node representation of the lth iteration; In the deep point access feature construction stage, when calculating the attention mechanism, the coarse-grained time information of each time period is introduced, including the start time of the time period , Deadline , the time difference between the starting time and midnight of the day , day of the week and whether it is a holiday , for coarse-grained time information Encode and concatenate to get , aggregate multiple time period access features into complete point access features : 。 5. The method for dynamic prediction of visitors to urban areas based on hypergraph learning according to claim 3 is characterized in that: First, for the time period access characteristics as a benchmark , select positive samples , in order to bring the features of points with the same functional attributes closer in similar time periods, and at the same time, select negative samples , in order to push away the features of different functional attribute points in the same period, by calculating the triplet loss , providing support for the extraction of supervised multi-point and multi-time features: , in, represents the cosine similarity between two features, Represents the boundary value hyperparameter used to control the distance between positive and negative samples; The predicted time period for visitors to the urban area Convert to a learnable encoding vector , and then Characteristics of visits to each location Combined, the prediction results corresponding to the predicted period are finally output , combined with the target label constructed based on the actual visitor list , calculate the dynamic prediction loss : , , in, and are learnable parameters in the prediction output stage, is the number of samples to be tested, Represents the Sigmoid function used to convert the model output into probability; The final loss obtained by weighted fusion of multiple losses : , in, and is a weighted hyperparameter, Parameter iteration and optimization for the dynamic prediction model of visitors in urban areas: , , in, and represents the model parameters, is the gradient operator, represents the gradient, is the learning rate.
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
Multi-task learning urban crowd flow prediction method based on adaptive multi-graph fusion
CN117726070A
Information propagation prediction method of sequence hypergraph neural network based on common attention fusion
CN118364185A
Multimodal trajectory prediction method and device based on hypergraph neural network
CN118569305A
Cited By
Multi-technology fusion prediction method based on hypergraph modeling
CN121257872A