Location recommendation method based on hypergraph neural network and diffusion model

By adopting hypergraph neural network and diffusion model in the point-of-interest recommendation model, the problem of dynamic changes in user intentions and multi-dimensional feature capture is solved, the accuracy and performance of recommendations are improved, and noise data is effectively processed.

CN119441636AActive Publication Date: 2025-02-14CHONGQING UNIV

Patent Information

Application Number
CN202411489641.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-14
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

Existing point-of-interest recommendation models are difficult to accurately capture the dynamic changes and multi-dimensional features of user intentions, and it is difficult to find a balance between long-term preferences and spatial and temporal changes, and there is also the problem of noisy data.

Method used

Using the location recommendation method based on hypergraph neural network and diffusion model, we construct a point of interest recommendation model, including local trajectory flow hypergraph module, spatiotemporal feature coding, multi-dimensional feature fusion network, global hypergraph characterization learning module, feature optimization module, and aggregation layer , frequency domain learning layer and linear prediction layer.

Benefits of technology

By more accurately capturing the multi-dimensional characteristics and dynamic changes of user intentions, the accuracy and performance of point-of-interest recommendations are improved, the noise data is effectively distinguished, and the prediction ability of the model is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441636A_ABST
    Figure CN119441636A_ABST
Patent Text Reader

Abstract

The invention relates to a place recommendation method based on a hypergraph neural network and a diffusion model, and the method comprises the steps: constructing an interest point recommendation model; the interest point recommendation model sequentially comprises a local trajectory flow hypergraph module, spatial-temporal feature coding, a multi-dimensional feature fusion network, a global hypergraph representation learning module, a feature optimization module, an aggregation layer, a frequency domain learning layer and a linear prediction layer. A long track of a user is analyzed and divided into space-time regions, three global hypergraphs are constructed, and the purpose is to comprehensively capture an overall behavior pattern of the user. In order to better optimize trajectory intention characterization, a feature optimization module based on an improved diffusion model is provided. A more stable and controllable reverse process is ensured by introducing multi-dimensional global representation, and an enhanced diffusion model is more suitable for a recommendation system by using a feature normalization and improved Transform network. And designing a loss function to train an interest point recommendation model, wherein the trained interest point recommendation model is used for recommending a next interest point to a new user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of point of interest recommendation, and in particular to a location recommendation method based on a hypergraph neural network and a diffusion model. Background Art

[0002] With the development of location-based social networks (LBSNs) and the surge in the usage of their applications, users' check-in data are widely collected. As a result, researchers have shown increasing interest in point-of-interest (POI) recommendation models, which aim to reveal users' visit habits by analyzing their check-in histories. The main goal of next POI recommendation is to recommend the locations that users are most likely to visit next time.

[0003] Unlike traditional recommendation methods, POI recommendation requires in-depth analysis of user spatiotemporal features and their intentions to help make the most appropriate predictions. Currently, researchers are paying more and more attention to deep learning-based methods to model sequence data. In order to effectively capture long-term cycles and short-term features in user trajectories and extract key information from trajectories, recurrent neural networks (RNNs) and their variants and self-attention mechanisms are widely used. Unfortunately, these sequence-based methods do not utilize collaborative information from other users. In recent years, with the development of graph neural networks (GNNs), many GNN methods or hypergraph neural network (HGNN) methods have been used to describe the transformation and location relationships between POIs due to their ability to capture interactions between neighbors and model complex relationships.

[0004] Although the above methods have shown relatively advanced performance, the present invention believes that there are limitations in the current work, which restricts the performance of the recommendation model for POI recommendation. First, most existing studies use the complete check-in history to model and infer user intentions, but this method often ignores the dynamic changes and complexity of user intentions in the trajectory. In POI recommendation, user intentions are usually affected by multidimensional factors such as category, spatial distance, and time. However, current graph- or hypergraph-based methods focus more on static or global patterns, and fail to fully consider the fine-grained and multidimensional characteristics of user behavior, making it difficult to accurately capture complex user intentions in trajectories. Second, many existing methods have difficulty in effectively utilizing changes across spatiotemporal regions while capturing users' long-term preferences. Accurately grasping users' behavior patterns, especially long-term behavior patterns that reflect how users interact with locations over time, is crucial for accurate modeling and recommendation. However, these limitations hinder the ability to effectively model such patterns. Specifically, different users exhibit their own unique behavior patterns. The mobility behavior of the same user in a short period of time and a specific spatial area usually has similar patterns, but between different spatiotemporal regions, their mobility behavior patterns often change. This difference in user behavior patterns and their spatiotemporal correlations pose a challenge to the next POI recommendation. Third, in POI recommendation, user behavior data mainly comes from implicit feedback (visiting a place) rather than explicit feedback (such as ratings or comments). A user may visit a place by chance, which does not mean that he or she has a real interest in the place, so it is inevitable to bring noise. Many existing methods, such as transformer-based models, although they introduce attention mechanisms, still have difficulty in effectively distinguishing noisy data. Some noisy data will make it difficult for the model to learn high-quality user intent representations, which directly affects the prediction performance. Summary of the invention

[0005] In view of the above problems existing in the prior art, the technical problem to be solved by the present invention is: how to predict the next point of interest more accurately.

[0006] To solve the above technical problems, the present invention adopts the following technical solutions: a place recommendation method based on a hypergraph neural network and a diffusion model, constructing a point of interest recommendation model, which sequentially includes a local trajectory flow hypergraph module, spatiotemporal feature encoding, a multidimensional feature fusion network, a global hypergraph representation learning module, a feature optimization module, an aggregation layer, a frequency domain learning layer and a linear prediction layer.

[0007] S1: Using the local trajectory flow hypergraph module to obtain category-aware user intent representation X l :Get the trajectory sequences of several users to form a data set, and build a POI-based hypergraph G for each user's trajectory sequence p =(V p ,Ep ) and the POI category hypergraph G based on POI location categories c =(V c ,E c ), where V p Represents G p The collection of check-in locations, V c Represents G c The collection of check-in location categories in E p and E c Represents G p and G c The set of hyperedges in the graph represents the weighted association matrix of the two hypergraphs. and is defined as follows:

[0008]

[0009] Among them, r represents the number of check-ins of the POI in the hyperedge, and n represents the number of times the POI location appears on the hyperedge under the sliding window.

[0010] A two-stage information transfer aggregation calculation method is used to calculate the POI hypergraph G p Calculate the intent representation X of POI v , for the POI category hypergraph G c Calculate the intent representation X of the POI category c ; Then through X v and X c Calculate the preliminary user intention representation X corresponding to each trajectory sequence cv Finally, the position-aware user intention representation X corresponding to each trajectory sequence is calculated l .

[0011] The spatiotemporal feature encoding is used to calculate the spatiotemporal representation e corresponding to each trajectory sequence. f ;

[0012] A multi-dimensional feature fusion network is used to obtain the final user intention representation X corresponding to each trajectory sequence. f ;

[0013] Each user's trajectory sequence is divided into short trajectories with a boundary of 24 hours, and a global short trajectory interactive hypergraph G is constructed based on multiple short trajectories of all users. tra =(V tra ,E tra ). Where V tra represents the node set of the hypergraph, and E tra is a set of hyperedges. The incidence matrix representing the topological structure of the hypergraph is is defined as follows:

[0014]

[0015] The actual meaning of an element 1 in the association matrix is ​​that the location represented by the row appears on the short trajectory represented by the column. For the hyperedge e∈E representing the user's trajectory tra , its degree is the number of nodes connected by the hyperedge, which represents the number of locations covered by the user trajectory, so it is expressed as The degrees of all hyperedges form the diagonal hyperedge degree matrix D trae . Assign weight W e For each hyperedge, all hyperedge weights together form a diagonal matrix Among them, each node v∈V tra , the degree of the node is obtained by matrix multiplication of the diagonal matrix and the hyperedge weight The degrees of all nodes form the diagonal node degree matrix D trav .

[0016] Design a global hypergraph convolutional network to calculate the user intention representation γ from the global perspective of each trajectory tra , use the self-attention mechanism to f , γ tra and X l Fusion to get X f .

[0017] S2: Use the global hypergraph representation learning module to obtain the final global end representation X globel :

[0018] Constructing a global user interaction hypergraph G g =(V g ,E g ), where V g The node set representing the hypergraph is also the set of check-in locations. g is the user’s hyperedge set. Use γ tra The same operating mechanism is used to obtain the user's behavior pattern representation X g .

[0019] The G tra According to the time threshold of 24 hours, the global time hypergraph representation X is obtained. tem .

[0020] A global spatial hypergraph based on spatial threshold is constructed, and the spatial distance Δs between points is calculated using Haversine Formula. When Δs is less than the spatial threshold, it means that the two check-in points are on a hyperedge, thus constructing the global spatial hypergraph G spa =(V spa ,E spa ), where V spaThe node set representing the hypergraph is also the set of check-in locations. spa is the set of hyperedges in the spatial region. Use γ tra The same operation mechanism is used to obtain the user's global spatial hypergraph representation X spa .

[0021] Finally, the embedding layer embeds the user representation according to the user ID Then merge into X g , X tem , X spa and X user Get the final global representation X corresponding to each trajectory sequence globel , as shown in the formula:

[0022]

[0023] in, Represents the vector concatenation operation, ω globel Learnable weight matrix.

[0024] S3: The improved diffusion model is used in the feature optimization module to obtain the intent representation X corresponding to each trajectory sequence after optimization using the global representation feature. dif .

[0025] S4: At the aggregation layer, X dif With X globel and X l Add together to get the comprehensive representation X corresponding to each trajectory sequence final :

[0026]

[0027] S5: In the frequency domain learning layer, X final After conversion to the frequency domain, the sequence representation is obtained And Encode to get Will As the input of the linear prediction layer, the output is the next point of interest of the user corresponding to each trajectory sequence Visiting time of the point of interest and categories of points of interest

[0028] Calculating Losses And according to Update all parameters in the POI recommendation model, and when the loss no longer decreases, the optimal POI recommendation model is obtained.

[0029] S6: For a new user, obtain the historical trajectory sequence of the new user, input the historical trajectory sequence of the new user into the optimal point of interest recommendation model, and output the next point of interest that the new user may visit, the visit time of the next point of interest, and the category of the next point of interest.

[0030] Furthermore, in S1, X is calculated l The process is as follows:

[0031] For the POI hypergraph, a two-stage information transfer aggregation calculation method is used to calculate the POI intention representation X v ;

[0032] The POI locations in the dataset are embedded in a shallow neural network, and the input POI locations are mapped into a dimension d through an embedding layer E. τ The embedding vector X n At the same time, the hyperedge representation is initialized by the following formula to obtain the hyperedge initialization feature

[0033]

[0034] where |e v | represents each hyperedge e∈E p The number of nodes on .

[0035] The hypergraph convolution operation of the two-stage propagation begins with the "node to hyperedge" process. The operation mechanism is as follows:

[0036]

[0037] in is a feature transformation matrix, LeakyReLU is used as the activation function, and the softmax function is used to normalize the coefficients of all nodes in the hyperedge. e represents the hyperedge embedding representation.

[0038] Secondly, propagate the learned high-level intent information to each node along the “hyperedge to node” path, use global information to update the node representation, and enrich the collaborative signals of high-level user intent contained in the node. The process is as follows:

[0039]

[0040] Where E(v) is the set of hyperedges containing all POI points v, is a feature transformation matrix, LeakyReLU is used as the activation function, and the softmax function is used to include the node v i All hyperedges are normalized.

[0041] Through N-layer hypergraph convolution calculation, we can initially obtain the intention representation of POI location and POI category, and then connect the two to obtain the preliminary user intention representation X corresponding to the trajectory sequence cv , as shown below:

[0042]

[0043] Where X c Intent representation of POI category;

[0044] The soft attention mechanism based on reverse position encoding is used to model the importance of each POI in a user trajectory sequence to obtain the location-aware user intention representation X l .

[0045]

[0046] in is a feature transformation matrix, W 4 , is a feature transformation matrix, W 5 ∈ is a feature transformation matrix, is the bias term, and tanh is used as the activation function. t-i+1 represents the position embedding corresponding to the i-th time step, Indicates the intent representation of the last POI, The intent representation corresponding to the i-th POI.

[0047] Furthermore, in S1, the spatiotemporal representation e corresponding to each trajectory sequence is calculated f The process is as follows:

[0048] For temporal information, we use the Time2Vector method to encode the time in the trajectory sequence. For spatial information, we use a simple linear method and connect the two:

[0049]

[0050] in is a matrix that can be learned, Time2Vec is a time encoding method, v time is the time information, v distance is the spatial information, v is the POI, S u is a trajectory sequence.

[0051] Furthermore, in S1, X is calculated f The process is:

[0052] First, embed the locations in the dataset with a shallow neural network, using the embedding matrix The location set of length |V| is embedded into the feature space of dimension d. At this time, the location embedding input to the first layer of the hypergraph neural network is Then the operation mechanism of the global hypergraph convolutional network is as follows:

[0053]

[0054] in Represents the location embedding vector of the k+1th layer of the global short trajectory interaction hypergraph. tra is the incidence matrix of the hypergraph, Yes H tra The transpose of W tra is the hyperedge weight diagonal matrix, D trae is the hyperedge degree matrix, D trav is the node degree matrix, is the location embedding vector of the kth layer, is the normalized node degree matrix.

[0055] To perform the normalization operation, we get the representation X of the trajectory tra , using the operation of accumulating and averaging all the location representations on the hyperedge Get the user intention representation γ of this trajectory from a global perspective tra .

[0056] Using three learnable weight matrices To learn the query vector Q, key vector K and value vector V.

[0057] Q=Drop(LeakReLu(e f W Q )) (10)

[0058] K = Drop(LeakReLu(γ tra W K )) (11)

[0059] V=Drop(LeakyReLu((ω l X l )W V )) (12)

[0060] is a learnable weight matrix and LeakyReLu is the activation function.

[0061]

[0062] where d k is with d τhave the same value of the scale parameter, σ is the Softmax function.

[0063] Furthermore, in S3, X is calculated dif The process is as follows:

[0064] Diffusion stage:

[0065] First, characterize the local trajectory intention X f Normalize the features to get The specific implementation is shown in formula (15).

[0066]

[0067] Where σ(X f ) 2 Indicates the request for X f The variance of f ) means to find X f The mean of .

[0068] Randomly select a set of diffusion steps Then Gaussian noise sampling is performed at each diffusion step t And calculate the noise data

[0069] set up represents the trainable parameters used to perform the dimensionality transformation and As a time embedding matrix. The training process in the diffusion process is as follows:

[0070] Input: Normalized representation Diffusion step set s, X globel , neural network θ ;

[0071] Output: Diffusion loss

[0072] Select t from s:

[0073] 1) Calculate the representation after dimension conversion

[0074] 2) Sample a random Gaussian noise ε at diffusion step t t ;

[0075] 3) Calculate the noise data x at time t using formula (16): t :

[0076]

[0077] in α t =1-β t, x t is the noise data at time t, x 0 is the normalized representation, β t Represents the noise planning factor, which is used to control the proportion of noise added in each diffusion step. represents the cumulative factor from step 1 to step t, and I is an identity matrix.

[0078] 4) Calculate the embedded representation e of t t =E T (t);

[0079] 5) and e t Add them together to get c;

[0080] 6) Through f θ Predict the noise at time t

[0081] 7) Calculate the loss using formula (17)

[0082]

[0083] in is the variational lower bound function, represents expectation, ε θ represents the predicted noise, ε t ~N(0,I) is the Gaussian noise at diffusion step t.

[0084] 8) Loop through 2) to 7) until No longer changing;

[0085] The reverse process works as follows:

[0086] enter: Diffusion step T, X globel and f θ ;

[0087] Output:

[0088] Ⅰ) Compute the representation after dimension conversion

[0089] II) Random Gaussian noise ε at sampling time T T ;

[0090] III) Calculate the noise data x at time T T ;

[0091] IV) t = T-1, ..., 1;

[0092] V) Compute the embedded representation e of t t=E T (t);

[0093] VI) and e t Add them together to get c;

[0094] VII) Through f θ Predict the noise at time t

[0095] IX) Calculate x by formula (18) t The mean μ θ (x t ,t):

[0096]

[0097] in is the mean, is the variance and ε represents the noise of the prediction.

[0098] VIII) Random Gaussian noise ε at sampling time t t ;

[0099] Ⅹ) Calculate the data distribution x at time t-1 t-1 =μ θ (x t ,t)+β t ε t ;

[0100] After restoring the original data, the feature inverse normalization operation is used to transform the data distribution back to the original distribution, as shown in formula (20). The result is the diffusion-enhanced intent representation X that integrates the global features through diffusion recovery. dif .

[0101]

[0102] in, is to ask Mean, is to ask Variance, λ as temperature coefficient is a hyperparameter.

[0103] Furthermore, in S5, the calculation and The process is as follows:

[0104] Given a learnable matrix Frequency domain learning is modeled as:

[0105]

[0106] After filtering out the noise in the frequency domain, we get the sequence representation right To encode:

[0107]

[0108] in as well as is a learnable weight vector, using GELU Gaussian error linear unit as the activation function, d δ Represents the final sequence representation dimension;

[0109]

[0110] Where W poi , W time , W cat is a learnable parameter, b p , b t , b c is the corresponding bias.

[0111] Furthermore, in S5, the calculation The process is as follows:

[0112]

[0113] Among them, μ is a hyperparameter used to balance the optimization objective.

[0114] Compared with the prior art, the present invention has at least the following advantages:

[0115] (1) Existing methods often ignore the problem that user intentions are constantly changing and complex within trajectories, which limits their ability to accurately capture multi-dimensional user intention representations. To address this problem, this paper designs a local trajectory intention extraction module that integrates multi-level trajectory representations and enhances the understanding of user intentions.

[0116] (2) The global hypergraph representation learning module effectively addresses the challenges brought by the complexity of user behavior patterns and spatiotemporal correlations in real-world scenarios by integrating multiple hypergraphs.

[0117] (3) This paper develops a feature optimization module based on a diffusion model to enhance trajectory intention representation. BRIEF DESCRIPTION OF THE DRAWINGS

[0118] Figure 1 This is the overall architecture of the POI recommendation model of the present invention.

[0119] Figure 2 It is an improved Transformer network. FTTB stands for fine-tuning Transformer module, and FTB stands for fine-tuning module.

[0120] Figure 3Performance results for different networks.

[0121] Figure 4 The results of the ablation experiment.

[0122] Figure 5 Performance comparison of different local and global hypergraph convolutional layers. DETAILED DESCRIPTION

[0123] The present invention is described in further detail below.

[0124] The present invention proposes a new HGDRec model for next POI recommendation to solve the three challenges mentioned in the background technology. Figure 1 , HGDRec consists of three main components: (a) local trajectory intention extraction module, which includes three parts: (a.1) local trajectory flow hypergraph module, (a.2) spatiotemporal encoder and (a.3) multi-dimensional feature fusion network; (b) global hypergraph representation learning module; (c) feature optimization module. In order to solve the first limitation in the background technology, the model of the present invention extracts the user's intention on this trajectory by fully considering the multi-dimensional interaction relationship between the user and POI. Specifically, first, the intention representation on each trajectory is extracted by the trajectory flow hypergraph based on POI and POI category. Subsequently, the spatiotemporal representation on this trajectory is obtained by using the spatiotemporal feature encoder. Finally, the trajectory representation of this trajectory from a global perspective obtained by combining the global trajectory hypergraph is obtained by fusion through a multi-dimensional feature fusion network to obtain a comprehensive intention representation of this trajectory. In order to solve the second limitation, the present invention comprehensively analyzes the complex global interaction, time and space between users and POIs to better understand the overall behavior pattern of users. Specifically, the present invention constructs a global user long trajectory hypergraph by analyzing the long trajectory data of users so that the model can better understand the comprehensive behavior of users. And in order to more accurately capture the changes in user behavior patterns, the present invention divides the user's long trajectory into multiple space-time regions. Each space-time region represents user behavior in a specific time period and geographical area. In this way, a global space-time hypergraph is constructed to capture changes in user behavior. In order to address the third limitation, a diffusion model is introduced to perform feature denoising optimization. By introducing the disturbance caused by random Gaussian noise in the diffusion process, we aim to enhance the intent representation, thereby promoting the recommendation model to learn more abstract and deep interactive information. Specifically, we combine feature normalization and improved Transformer networks to make the improved diffusion model more suitable for recommendation systems. In addition, multi-dimensional global representations are introduced in the diffusion model to effectively combat the disturbance of random Gaussian noise. These multi-dimensional representations ensure the stability and controllability of the diffusion process and the reverse process.

[0125] In order to address the limitations of existing methods in capturing complex user intentions, this paper proposes a new method for extracting short trajectory intentions. By integrating multi-level trajectory information representation, this paper enhances the in-depth understanding of user intentions, thereby achieving a comprehensive multi-dimensional description of user behavior.

[0126] To effectively address the challenges brought by the complexity of user behavior patterns and spatiotemporal correlations in real-world scenarios, we extract multi-level spatiotemporal information from trajectories and construct a global hypergraph structure across spatiotemporal regions, with the goal of comprehensively capturing users' behavior patterns.

[0127] In order to optimize the trajectory intention representation, this paper proposes a method based on an improved diffusion model. The diffusion model is enhanced to denoise and optimize the noisy feature representation by combining a multi-dimensional global representation of the stable reverse process, feature normalization and an improved Transformer network.

[0128] A place recommendation method based on a hypergraph neural network and a diffusion model constructs a point of interest recommendation model, which sequentially includes a local trajectory flow hypergraph module, spatiotemporal feature encoding, a multidimensional feature fusion network, a global hypergraph representation learning module, a feature optimization module, an aggregation layer, a frequency domain learning layer and a linear prediction layer.

[0129] Hypergraphs extend traditional graphs, allowing edges to connect multiple nodes and express high-order relationships. This enables them to effectively capture users' trajectory information. Therefore, the present invention constructs a dual hypergraph structure based on POIs and POI categories for each user's trajectory sequence.

[0130] In the construction of the hypergraph, in order to better represent the user intention corresponding to each trajectory, the present invention defines the weighted association matrix in the hypergraph by considering the user's repeated check-ins to alleviate the problem of information loss in the past hypergraph learning. The weighted association matrix takes into account the user's repeated check-ins, where the difference in weights reflects the user's check-in frequency at different locations, thereby more accurately depicting the user's behavior and intention. And here, in order to more accurately capture the user's intention on each trajectory, when constructing the hyperedge, a sliding window is used to dynamically analyze the user's behavior in each period of time, thereby capturing changes in the time dimension, so that the user's activity pattern in a specific time period can be observed, and the user's intention evolution over time can be more accurately understood. The data generated by each time window is used to update the weighted association matrix to ensure that the model reflects recent changes in user behavior and preferences.

[0131] S1: a.1 Use the local trajectory flow hypergraph module to obtain category-aware user intent representation X l :Get the trajectory sequences of several users to form a data set, and build a POI-based hypergraph G for each user's trajectory sequencep =(V p ,E p ) and the POI category hypergraph G based on POI location categories c =(V c ,E c ), where V p Represents G p The collection of check-in locations, V c Represents G c The collection of check-in location categories in E p and E c Represents G p and G c The set of hyperedges in the graph represents the weighted association matrix of the two hypergraphs. and is defined as follows:

[0132]

[0133] Where r represents the number of check-ins of the POI in the hyperedge, and n represents the number of times the POI location appears on the hyperedge under the sliding window. Although the hyperedges constructed by sliding windows can capture user intentions with various granularities, they may not be able to effectively capture dependencies over a longer time frame. Therefore, a hyperedge is added to each local trajectory flow hypergraph in order to describe the long-term dependencies in the local trajectory by connecting all POI locations (or categories) in the same trajectory.

[0134] A two-stage information transfer aggregation calculation method is used to calculate the POI hypergraph G p Calculate the intent representation X of POI v , for the POI category hypergraph G c Calculate the intent representation X of the POI category c ; Then through X v and X c Calculate the preliminary user intention representation X corresponding to each trajectory sequence cv Finally, the position-aware user intention representation X corresponding to each trajectory sequence is calculated l .

[0135] Specifically: Calculate X l The process is as follows:

[0136] For the POI hypergraph, a two-stage information transfer aggregation calculation method is used to calculate the POI intention representation X v :

[0137] Through the dual-stage information transmission aggregation method from node to hyperedge and from hyperedge to node, the hyperedge not only promotes the aggregation of node information within the hyperedge, but also propagates node information across hyperedges. First, the present invention embeds the POI locations in the dataset with a shallow neural network, and maps the input POI locations into a dimension d through an embedding layer E. τ The embedding vector X n At the same time, the hyperedge representation is initialized by the following formula to obtain the hyperedge initialization feature

[0138]

[0139] where |e v | represents each hyperedge e∈E p According to formula (2), POI nodes that appear multiple times in a hyperedge have a greater weight for the initialization representation of the hyperedge. The hyperedge embedding can be regarded as the target user’s preference for a specific POI.

[0140] After obtaining the initial representation of POI nodes and hyperedges, the two-stage propagation hypergraph convolution operation begins. The first is the "node to hyperedge" process, and the operating mechanism is as follows:

[0141]

[0142] in is a feature transformation matrix, LeakyReLU is used as the activation function, and the softmax function is used to normalize the coefficients of all nodes in the hyperedge. e Representing hyperedge embedding representations. By introducing the information of repeated user clicks in the hypergraph convolution operation, high-quality hyperedge embeddings can be learned to represent multi-level and multi-granular user intentions.

[0143] Secondly, propagate the learned high-level intent information to each node along the “hyperedge to node” path, use global information to update the node representation, and enrich the collaborative signals of high-level user intent contained in the node. The process is as follows:

[0144]

[0145] Where E(v) is the set of hyperedges containing all POI points v, is a feature transformation matrix, LeakyReLU is used as the activation function, and the softmax function is used to include the node v i All hyperedges are normalized.

[0146] For the POI category hypergraph, the same two-stage information transfer aggregation calculation method is used to calculate the intention representation X of the POI category c ;

[0147] Through N-layer hypergraph convolution calculation, we can initially obtain the intention representation of POI location and POI category, and then connect the two to obtain the preliminary user intention representation X corresponding to the trajectory sequence cv , as shown below:

[0148]

[0149] Where X c Intent representation of POI category;

[0150] Considering the importance of location information in trajectory sequences, this paper adopts a soft attention mechanism based on reverse position encoding to model the importance of each POI in a user trajectory sequence to obtain a location-aware user intention representation X l This position encoding method provides accurate position embedding for the nearest participating POI locations, which helps alleviate the performance degradation that may be caused by inconsistent trajectory lengths in the forward position encoding. The specific implementation is as follows:

[0151]

[0152] in is a feature transformation matrix, W 4 , is a feature transformation matrix, is a feature transformation matrix, is the bias term, and tanh is used as the activation function. t-i+1 represents the position embedding corresponding to the i-th time step, Indicates the intent representation of the last POI, The intent representation corresponding to the i-th POI.

[0153] a.2 Use spatiotemporal feature coding to calculate the spatiotemporal representation e corresponding to each trajectory sequence f Specifically, the spatiotemporal representation e corresponding to each trajectory sequence is calculated f The process is as follows:

[0154] For the next POI recommendation task, one of the main challenges is how to incorporate spatiotemporal information into the model and enhance the generalization ability of representation. This paper proposes a spatiotemporal feature encoder for processing spatiotemporal information to explore the temporal and spatial patterns of trajectory sequences. For temporal information, the Time2Vector method is used to encode the time in the trajectory sequence. For spatial information, a simple linear method is used and the two are connected:

[0155]

[0156] in is a matrix that can be learned, Time2Vec is a time encoding method, v time is the time information, v distance is the spatial information, v is the POI, S u is a trajectory sequence.

[0157] a.3 Use a multi-dimensional feature fusion network to obtain the final user intention representation X corresponding to each trajectory sequence f ;

[0158] Each user's trajectory sequence is divided into short trajectories with a boundary of 24 hours, and a global short trajectory interactive hypergraph G is constructed based on multiple short trajectories of all users. tra =(V tra ,E tra ). Where V tra represents the node set of the hypergraph, and E tra is a set of hyperedges. The incidence matrix representing the topological structure of the hypergraph is is defined as follows:

[0159]

[0160] The actual meaning of an element 1 in the association matrix is ​​that the location represented by the row appears on the short trajectory represented by the column. For the hyperedge e∈E representing the user's trajectory tra , its degree is the number of nodes connected by the hyperedge, which represents the number of locations covered by the user trajectory, so it is expressed as The degrees of all hyperedges form the diagonal hyperedge degree matrix D trae . Assign weight W e For each hyperedge, all hyperedge weights together form a diagonal matrix Among them, each node v∈V tra , the degree of the node is obtained by matrix multiplication of the diagonal matrix and the hyperedge weight The degrees of all nodes form the diagonal node degree matrix D trav .

[0161] Design a global hypergraph convolutional network to calculate the user intention representation γ from the global perspective of each trajectory tra , use the self-attention mechanism to f , γ tra and X l Fusion to get X f .

[0162] Specifically, calculate X f The process is:

[0163] Then, a global hypergraph convolutional network is designed to capture the collaborative signals between users' short trajectories to iteratively mine complex, high-order interest point transfer relationships. Through the dual-stage information transfer aggregation from node to hyperedge and from hyperedge to node, the hyperedge not only promotes the aggregation of node information within the hyperedge, but also propagates node information across hyperedges. First, the locations in the dataset are embedded with a shallow neural network, and the embedding matrix The location set of length |V| is embedded into the feature space of dimension d. At this time, the location embedding input to the first layer of the hypergraph neural network is Then the operation mechanism of the global hypergraph convolutional network is as follows:

[0164]

[0165] in Represents the location embedding vector of the k+1th layer of the global short trajectory interaction hypergraph. tra is the incidence matrix of the hypergraph, Yes H tra The transpose of W tra is the hyperedge weight diagonal matrix, D trae is the hyperedge degree matrix, D trav is the node degree matrix, is the location embedding vector of the kth layer, is the normalized node degree matrix.

[0166] To perform the normalization operation, we get the representation X of the trajectory tra , using the operation of accumulating and averaging all the location representations on the hyperedge Get the user intention representation γ of this trajectory from a global perspective tra .

[0167] The specific operations of information transmission and aggregation are as follows: is the process of node features converging to the hyperedge. After the short trajectory information of the user corresponding to the hyperedge is aggregated, The global information is used to update the node representation and enrich the collaborative signals between the high-order short trajectories contained in the nodes. To perform normalization, we can get the representation X of the trajectory tra Finally, we use the operation of accumulating and averaging all the location representations on the hyperedge We can get the user intention representation γ of this trajectory from a global perspective tra .

[0168] Use the self-attention mechanism to fuse multi-dimensional features and use three learnable weight matrices To learn the query vector Q, key vector K and value vector V.

[0169] Q = Drop(LeakyReLu(e f W Q )) (10)

[0170] K = Drop(LeakyReLu(γ tra W K )) (11)

[0171] V=Drop(LeakyReLu((ω l X l )W V )) (12)

[0172] In the process of constructing Q, K, V vectors, is a learnable weight matrix, and LeakyReLu is an activation function. The user's intention features under this trajectory are calculated from the global perspective of the key vector K through the local user intention representation in the value vector V and the spatiotemporal pattern information of the query vector Q, and the user's short-term location transfer pattern and the access intention relationship of the spatiotemporal pattern are extracted. So far, the last step of the fusion process on the short trajectory is:

[0173]

[0174] where d k is with d τ The scale parameters have the same value, σ is the Softmax function. This fusion mechanism not only fuses local information and mines the patterns of short sequences, but also incorporates the representation of the intent of short sequences from a global perspective.

[0175] S2: b. Use the global hypergraph representation learning module to obtain the final global end representation X globel :

[0176] Each user's trajectory sequence is divided into short trajectories with a boundary of 24 hours. In S1, the short trajectory intention extraction module has been used to deeply analyze and obtain the trajectory intention features. Although the global short trajectory interaction hypergraph is used in the multi-dimensional feature fusion network to obtain the user intention representation from the global perspective of each trajectory, the features obtained by this method are not comprehensive. This is mainly because short trajectories may not be able to fully capture the behavior patterns and connections across a longer time range, while long trajectories can provide a wider time window to help understand the long-term trends and periodic changes in user behavior. By analyzing long trajectories, information that may be missed in short trajectory analysis, such as long-term user behavior patterns, can be captured.

[0177] Construct a global user interaction hypergraph G g =(V g ,Eg ), where V g The node set representing the hypergraph is also the set of check-in locations. g is the user’s hyperedge set. Use γ to calculate tra The same operating mechanism is used to obtain the user's behavior pattern representation X g .

[0178] In actual scenarios, users' check-in behaviors are not continuous, that is, when the space or time interval between two check-in records is large, the user's mobility preferences may change greatly. Therefore, dividing the trajectory sequence into different spatiotemporal regions according to the spatiotemporal threshold can better help the recommendation model capture the user's personalized mobility preferences. Therefore, on this basis, a global spatiotemporal hypergraph is constructed to better reflect the user's personalized preferences.

[0179] G as described in S1a.3 tra According to the time threshold of 24 hours, the global time hypergraph representation X is obtained. tem .

[0180] A global spatial hypergraph based on spatial threshold is constructed, and the spatial distance Δs between points is calculated using Haversine Formula. When Δs is less than the spatial threshold, it means that the two check-in points are on a hyperedge, thus constructing the global spatial hypergraph G spa =(V spa ,E spa ), where V spa The node set representing the hypergraph is also the set of check-in locations. spa is the set of hyperedges in the spatial region. Use γ tra The same operation mechanism is used to obtain the user's global spatial hypergraph representation X spa .

[0181] Finally, the embedding layer embeds the user representation according to the user ID Then merge into X g , X tem , X spa and X user Get the final global representation X corresponding to each trajectory sequence globel , as shown in the formula:

[0182]

[0183] in, Represents the vector concatenation operation, ω globel The learnable weight matrix will be the spliced ​​4d τ dimensional vector fusion to 2d τ The final global representation of the dimension X globelThis fusion mechanism fuses global information with lower complexity.

[0184] S3: The improved diffusion model is used in the feature optimization module to obtain the intent representation X corresponding to each trajectory sequence after optimization using the global representation feature. dif .

[0185] Specifically, calculate X dif The process is as follows:

[0186] Feature normalization and Transformer network design:

[0187] The diffusion model can learn the distribution of raw data with fine granularity and enhance its image generation ability by applying random Gaussian noise and training a neural network for denoising. In image data, the difference between pixel values ​​and Gaussian noise is large, making its distribution relatively insensitive to noise. Therefore, even if noise is introduced, the overall distribution is basically unaffected, which enables the diffusion model to operate stably and effectively while maintaining data integrity. However, in POI recommendation, X f The original distribution of X is noise-sensitive, which causes a small amount of Gaussian noise to cause a huge deviation from the original distribution. Therefore, it is difficult for the diffusion model to be stably trained in such noise-sensitive data distribution. f Use feature normalization and inverse normalization, as shown in the formula:

[0188]

[0189] In the diffusion model, the present invention designs a Fine-Tuning Transformer network f θ , we hope to use the global feature X through this implementation globel Representing user intent X f Fine-grained optimization, network design such as Figure 2 The figure shows an improved Transformer network design. The FTTB (Fine-Tuning Transformer Block) shown in the figure is a stack of multiple fine-tuning Transformer modules. By introducing a multi-head attention mechanism, normalization, and a multi-layer perceptron, the dependencies in the input representation are effectively captured. At the same time, FTB (Fine-Tuning Block) serves as a further fine-tuning mechanism to make more detailed adjustments to the embedded features.

[0190] Diffusion stage:

[0191] First, characterize the local trajectory intention X f Normalize the features to get The specific implementation is shown in formula (15).

[0192]

[0193] Where σ(X f ) 2 Indicates the request for X f The variance of f ) means to find X f The mean of .

[0194] Randomly select a set of diffusion steps Then Gaussian noise sampling is performed at each diffusion step t And calculate the noise data

[0195] Considering that the original diffusion model is uncontrollable, that is, as the number of diffusion steps increases, the distribution of the original data will be destroyed into anisotropic Gaussian distribution, resulting in the recovery of the original data to lose the user's personalized preferences. The present invention introduces global features into the diffusion model as auxiliary signals for local trajectory intention characterization to mitigate the loss caused by the introduction of Gaussian noise.

[0196] set up represents the trainable parameters used to perform the dimensionality transformation and As a time embedding matrix. The training process in the diffusion process is as follows:

[0197] Input: Normalized representation Diffusion step set s, X globel , neural network θ ;

[0198] Output: Diffusion loss

[0199] Select t from s:

[0200] 1) Calculate the representation after dimension conversion

[0201] 2) Sample a random Gaussian noise ε at diffusion step t t ;

[0202] 3) Calculate the noise data x at time t using formula (16): t :

[0203]

[0204] in α t =1-β t , x t is the noise data at time t, x 0 is the normalized representation, β tRepresents the noise planning factor, which is used to control the proportion of noise added in each diffusion step. represents the cumulative factor from step 1 to step t, and I is an identity matrix.

[0205] 4) Calculate the embedded representation e of t t =E T (t);

[0206] 5) and e t Add them together to get c;

[0207] 6) Through f θ Predict the noise at time t

[0208] 7) Calculate the loss using formula (17)

[0209]

[0210] in is the variational lower bound function, represents expectation, ε θ represents the predicted noise, is the Gaussian noise at diffusion step t. By re-parameterization technique, the trained network f θ To restore the original data. By introducing random Gaussian noise into the diffusion flow, we hope that the recommendation model can learn more abstract interactions in the trajectory sequence by adversarial these random perturbations.

[0211] 8) Loop through 2) to 7) until No longer changing;

[0212] The purpose of the reverse process is to recover the distribution of the original data from the noise data. It should be noted that the present invention retains some personalized information and does not recover the original sequence representation from the pure noise. The reverse process is as follows:

[0213] enter: Diffusion step T, X globel and f θ ;

[0214] Output:

[0215] Ⅰ) Compute the representation after dimension conversion

[0216] II) Random Gaussian noise ε at sampling time T T ;

[0217] III) Calculate the noise data x at time T T;

[0218] IV) t = T-1, ..., 1;

[0219] V) Compute the embedded representation e of t t =E T (t);

[0220] VI) and e t Add them together to get c;

[0221] VII) Through f θ Predict the noise at time t

[0222] IX) Calculate x by formula (18) t The mean μ θ (x t ,t):

[0223]

[0224] in is the mean, is the variance and ε represents the noise of the prediction.

[0225] VIII) Random Gaussian noise ε at sampling time t t ;

[0226] Ⅹ) Calculate the data distribution x at time t-1 t-1 =μ θ (x t ,t)+β t ε t ;

[0227] After restoring the original data, the feature inverse normalization operation is used to transform the data distribution back to the original distribution, as shown in formula (20). The result is the diffusion-enhanced intent representation X that integrates the global features through diffusion recovery. dif .

[0228]

[0229] in, is to ask Mean, is to ask Variance, λ as temperature coefficient is a hyperparameter.

[0230] S4: At the aggregation layer, X dif With X globel and X l Add together to get the comprehensive representation X corresponding to each trajectory sequence final :

[0231]

[0232] S5: In the frequency domain learning layer, X final After conversion to the frequency domain, the sequence representation is obtained And Encode to get Will As the input of the linear prediction layer, the output is the next point of interest of the user corresponding to each trajectory sequence Visiting time of the point of interest and categories of points of interest

[0233] Specifically, calculate and The process is as follows:

[0234] Given a learnable matrix Frequency domain learning is modeled as:

[0235]

[0236] After filtering out the noise in the frequency domain, we get the sequence representation right To encode:

[0237]

[0238] in as well as is a learnable weight vector, using GELU Gaussian error linear unit as the activation function, d δ Represents the final sequence representation dimension. After obtaining the final sequence representation, the model will use these representations to predict the next point of interest and its time and category. This method effectively integrates time and category information and adopts a multi-task learning strategy to predict the next point of interest from multiple dimensions to capture the user's complex behavior patterns.

[0239]

[0240] Where W poi , W time , W cat is a learnable parameter, b p , b t , b c is the corresponding bias.

[0241] Calculating Losses And according to Update all parameters in the POI recommendation model, and when the loss no longer decreases, the optimal POI recommendation model is obtained.

[0242] Specifically, calculate The process is as follows: the cross entropy is used to calculate the prediction of the next point of interest and its category, and the root mean square loss is used to calculate the time. Since the time processing has been standardized, the final total loss is multiplied by ten so that it is not ignored.

[0243]

[0244] Among them, μ is a hyperparameter used to balance the optimization objective.

[0245] S6: For a new user, obtain the historical trajectory sequence of the new user, input the historical trajectory sequence of the new user into the optimal point of interest recommendation model, and output the next point of interest that the new user may visit, the visit time of the next point of interest, and the category of the next point of interest.

[0246] Experiment and analysis

[0247] The following will introduce the experimental setup of the present invention and give the empirical results of the present invention. The experiments of the present invention are intended to answer the following research questions:

[0248] Question 1: Does our proposed model HGDRec outperform the state-of-the-art baseline in the next POI recommendation task?

[0249] Question 2: Is the improved Transformer network in the feature optimization model proven to be effective?

[0250] Question 3: Are the components and methods of the model valid?

[0251] Question 4: How does the performance of our model HGDRec vary with key model hyperparameters?

[0252] 1. Dataset

[0253] The present invention experimentally evaluates the performance of the proposed model on two real-world datasets. The experiment uses the Tokyo (TKY) and New York (NYC) check-in datasets of the Foursquare platform, which were collected from April 2012 to February 2013. Before model training, the dataset was subjected to key preprocessing steps: locations with less than 10 check-in records and users with less than 5 check-ins were eliminated. The user's check-in point data were further arranged in chronological order, and the sequence was cropped at intervals of 24 hours. After extracting multiple subsequences of the user, all subsequences were randomly sorted, and the sub-datasets were divided into 80% training set, 10% validation set and 10% test set. Detailed statistical information of the dataset is shown in Table 1.

[0254] Table 1 Detailed information of the dataset

[0255]

[0256] 2. Baseline Model

[0257] The proposed model HGDRec is compared with the following baselines: SASRec, STAN, DRAN, GETNext, MSTHN, POIGDE, DiffuRec, MTNet.

[0258] 3. Experimental Setup

[0259] In this experiment, NVIDIA RTX 3060 GPU was used as the hardware platform, and the development and testing were based on the PyTorch deep learning framework. Except for the diffusion model and the trajectory flow hypergraph module, the dropout rate of all other dropouts was set to 0.1. The global hypergraph convolution layer was set to 4, the local trajectory flow hypergraph convolution layer was set to 2, and the embedding dimension was d. τ = 128. The time and space embedding dimensions are d ω =32, the user embedding dimension is also d τ , the final sequence recommendation representation dimension d δ =320. In the diffusion model module, the diffusion step number T=10, and the loss weight μ=1. During the model training process, the Adam optimizer is used, the learning rate is set to 1e-3, and the weight decay is 9e-4. The batch size is set to 20, the number of iterations is 100, and the model performance of each epoch is recorded during the training process, and the best record is selected as the result. For all baselines, the present invention carefully adjusts the hyperparameters according to the original paper. The present invention selects two indicators: accuracy (Acc@k) and mean reciprocal rank (MRR)

[0260] 4. Results and Analysis

[0261] (1) Recommended performance (Question 1)

[0262] Table 2 Performance comparison of baselines and HGDREC on two datasets

[0263]

[0264] Table 2 shows the performance comparison results of each model on the NYC and TKY datasets. The bold indicates the best performance under the same indicator, and the underline indicates the second best performance. From the experimental results, it can be seen that for the evaluation indicators Acc@5 / 10 / 20 and MRR, the model proposed in this study outperforms all baseline models on both the NYC and TKY datasets. For the evaluation indicator Acc@1, the model proposed in this study achieved suboptimal results in both datasets. Compared with the best baseline on the NYC dataset, the model HGDRec of the present invention achieved 2.9%, 1.15% and 4.19% improvements in ACC@5, ACC@10 and ACC@20, respectively. On the TKY dataset, the improvement is more obvious, with improvements of 10.05%, 12.06% and 12.2% in ACC@5, ACC@10 and ACC@20, respectively.

[0265] In the comparative experiments, it can be seen that the graph-based methods DRAN and GETNext outperform the models that rely solely on sequence modeling on all data sets. The MSTHN model that uses hypergraphs for POI recommendation has achieved good results. It effectively helps the model predict with higher accuracy by revealing the complex high-order collaborative signals of user group trajectories through hypergraphs. However, MSTHN ignores the role of sequence modeling and simply constructs a global interactive hypergraph, so it is lower than some more advanced models in evaluation indicators. POIGDE proposes to use graph differential equations to simulate the continuous changes of user interests and develops a novel time series graph model. However, this method has certain limitations in capturing users' immediate preferences and local behavior patterns, resulting in unsatisfactory results. DiffuRec has achieved competitive results in all evaluation indicators. Its outstanding performance proves the great potential of diffusion models in sequence recommendation tasks, but it does not consider spatiotemporal information. MTNet proposed a new hierarchical structure, the mobility tree, which can more finely distinguish users' behaviors and preferences in different time periods by integrating multi-granularity time slot nodes, thereby better understanding users' behavior patterns. However, it lacks the multi-dimensional and complex interactions between users and POIs, resulting in no better results.

[0266] (2) The impact of improving the Transformer network (Question 2)

[0267] As mentioned above, an important part of the feature optimization model is the improved Transformer network. The present invention compares the Transformer structure used in DiffRec, the multi-layer MLP structure in DSDRec, and the improved SU-Net structure in DiffuASR. Figure 3As shown, the model of the present invention has achieved leading performance in all indicators. The Transformer structure in DiffRec does not consider the introduction of additional features, and the multi-layer MLP in DSDRec simply fuses multiple features without fine-grained optimization of the features that need to be optimized. Although the SU-Net network in DiffuASR optimizes U-Net in order not to lose sequence information, the U-Net network is mainly designed for the image field. Compared with the improved Transformer-based network of the present invention, the performance is still insufficient.

[0268] (3) Ablation experiment (Question 3)

[0269] Ablation experiments are performed on the key modules in HGDRec to evaluate the contribution and impact of different modules on the overall performance. In the ablation experiments, we focus on the impact of six modules on the model: (1) Local Trajectory Flow Hypergraph Module (LTM), (2) Spatial Encoding (SE), (3) Temporal Encoding (TE), (4) Global Space-Time Hypergraph (GSTH), (5) Global User Interaction Hypergraph (GTH) and (6) Diffusion Model (DM). The experimental results are shown in Figure 2. Figure 4 As shown in the figure, “w / o” means the corresponding module is removed. The results show that the complete model achieves the best performance and all the above modules contribute to the model performance to varying degrees.

[0270] For the trajectory flow hypergraph module, removing this part will not be able to deeply extract the intention of the local trajectory user, resulting in a decline in the overall performance of the model. For time coding and space coding, removing them will lead to varying degrees of performance degradation, confirming the necessity of incorporating spatiotemporal information into POI recommendations as mentioned above. For the global hypergraph neural network module, removing this part will lead to the failure of learning user group behavior and continuous location access patterns, resulting in a decline in model performance. Removing the diffusion model will also lead to a decline in overall performance. This result also shows that the diffusion model can indeed perform fine-grained optimization of the original features in the model of the present invention. Therefore, the removal of any module will cause varying degrees of damage to the performance of the model, fully verifying the effectiveness of each module proposed in the present invention.

[0271] (4) Hyperparameter study (Question 4)

[0272] The present invention uses a local trajectory flow module and a global hypergraph module, so it is crucial to reasonably set the number of local and global hypergraph convolution layers for information aggregation and representation learning on the hypergraph. Increasing the number of hypergraph convolution layers can improve the model's ability to understand and characterize user behavior to a certain extent, and can also capture the high-order collaborative signals that group intelligence behavior brings to the location. More layers mean that the model can consider a wider range of user global and local behavior information, capture more similar behaviors between users, and thus obtain a more comprehensive and detailed representation of users and locations. However, increasing the number of layers to a certain number may bring about the problem of over-smoothing. The local and global representations may be over-averaged and become similar, losing their distinctiveness and information, resulting in a decrease in model performance. In addition, the convolution layer of the local trajectory flow hypergraph module focuses on capturing user intentions on specific trajectories, so setting a smaller number of layers can capture more accurate user intentions. In contrast, the global hypergraph convolution layer involves the entire hypergraph, focusing on a wider range of user behaviors and complex relationships between locations, so more layers are needed for effective information synthesis and high-order feature learning. Therefore, after multiple experiments, such as Figure 5 As shown in the figure, the horizontal axis represents the number of convolutional layers of the local trajectory flow hypergraph module, and the lines of different colors represent the number of convolutional layers of the global hypergraph. Overall, the best performance is achieved when the local convolution is 2 and the global convolution layer is 4.

[0273] Table 3 Performance comparison of hyperparameters T and μ

[0274]

[0275] Table 3 shows the performance of hyperparameters T and μ on the NYC dataset. In the diffusion model, in order to retain some personalized information, the present invention does not restore the original representation from pure noise, but introduces global features to help the diffusion model diffuse. This strategy helps balance performance and computation, and the best results are achieved when T=10. μ is the ratio that controls the diffusion loss. Experiments have shown that the best results can be achieved when μ=1. It can also be found that when the value of μ decreases, the performance of the model decreases to varying degrees except for ACC@20, mainly due to the lack of fine-grained optimization of features by the diffusion model. When the value of increases, there will also be a decrease, because the model pays too much attention to the role of the diffusion model and ignores other more important modules such as the local trajectory flow hypergraph module and the global hypergraph representation learning module.

[0276] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.

Claims

1. A location recommendation method based on a hypergraph neural network and a diffusion model, characterized in that: Constructing a point of interest recommendation model, which includes a local trajectory flow hypergraph module, spatiotemporal feature encoding, a multi-dimensional feature fusion network, a global hypergraph representation learning module, a feature optimization module, an aggregation layer, a frequency domain learning layer, and a linear prediction layer in sequence; S1: Using the local trajectory flow hypergraph module to obtain category-aware user intent representation X l :Get the trajectory sequences of several users to form a data set, and build a POI-based hypergraph G for each user's trajectory sequence p =(V p ,E p ) and the POI category hypergraph G based on POI location categories c =(V c ,E c ), where V p Represents G p The collection of check-in locations, V c Represents G c The collection of check-in location categories in E p and E c Represents G p and G c The set of hyperedges in the graph represents the weighted association matrix of the two hypergraphs. and is defined as follows: Among them, r represents the number of check-ins of the POI in the hyperedge, and n represents the number of times the POI location appears on the hyperedge under the sliding window; A two-stage information transfer aggregation calculation method is used to POI hypergraph G p Calculate the intent representation X of POI v , for the POI category hypergraph G c Calculate the intent representation X of the POI category c ; Then through X v and X c Calculate the preliminary user intention representation X corresponding to each trajectory sequence cv Finally, the position-aware user intention representation X corresponding to each trajectory sequence is calculated l ; The spatiotemporal feature encoding is used to calculate the spatiotemporal representation e corresponding to each trajectory sequence. f ; A multi-dimensional feature fusion network is used to obtain the final user intention representation X corresponding to each trajectory sequence. f ; Each user's trajectory sequence is divided into short trajectories with a boundary of 24 hours, and a global short trajectory interactive hypergraph G is constructed based on multiple short trajectories of all users. tra =(V tra ,E tra );V tra represents the node set of the hypergraph, and E tra is a set of hyperedges, representing the incidence matrix of the hypergraph topology is defined as follows: Among them, the actual meaning of an element 1 in the association matrix is ​​that the location represented by the row appears on the short trajectory represented by the column; for the hyperedge e∈E representing the user's trajectory tra , its degree is the number of nodes connected by the hyperedge, which represents the number of locations covered by the user trajectory, so it is expressed as The degrees of all hyperedges form the diagonal hyperedge degree matrix D trae ; Assign weight W e For each hyperedge, all hyperedge weights together form a diagonal matrix Among them, each node v∈V tra , the degree of the node is obtained by matrix multiplication of the diagonal matrix and the hyperedge weight The degrees of all nodes form the diagonal node degree matrix D trav ; Design a global hypergraph convolutional network to calculate the user intention representation γ from the global perspective of each trajectory tra , use the self-attention mechanism to f , γ tra and X l Fusion to get X f ; S2: Use the global hypergraph representation learning module to obtain the final global end representation X globel : Construct a global user interaction hypergraph G g =(V g ,E g ), where V g The node set representing the hypergraph is also the set of check-in locations; and E g is the user's hyperedge set; use γ to calculate tra The same operating mechanism is used to obtain the user's behavior pattern representation X g ; The G tra According to the time threshold of 24 hours, the global time hypergraph representation X is obtained. tem ; A global spatial hypergraph based on spatial threshold is constructed, and the spatial distance Δs between points is calculated using Haversine Formula; when Δs is less than the spatial threshold, it means that the two check-in points are on a hyperedge, thus constructing the global spatial hypergraph G spa =(V spa ,E spa ), where V spa The node set representing the hypergraph is also the set of check-in locations; and E spa is the set of hyperedges in the spatial region; use the calculation γ tra The same operation mechanism is used to obtain the user's global spatial hypergraph representation X spa ; Finally, the embedding layer embeds the user representation according to the user ID Then merge into X g , X tem , X spa and X user Get the final global representation X corresponding to each trajectory sequence globel , as shown in the formula: X globel =ω globel (X g ⊕X spa ⊕X tem ⊕X user ) (14) Among them, ⊕ represents the operation of vector concatenation, ω globel Learnable weight matrix; S3: The improved diffusion model is used in the feature optimization module to obtain the intent representation X corresponding to each trajectory sequence after optimization using the global representation feature. dif ; S4: At the aggregation layer, X dif With X globel and X l Add together to get the comprehensive representation X corresponding to each trajectory sequence final : X final =X globel ⊕X l +X diff (21) S5: In the frequency domain learning layer, X final After conversion to the frequency domain, the sequence representation is obtained And Encode to get Will As the input of the linear prediction layer, the output is the next point of interest of the user corresponding to each trajectory sequence Visiting time of the point of interest and categories of points of interest Calculating Losses And according to Update all parameters in the POI recommendation model. When the loss stops decreasing, the optimal POI recommendation model is obtained. S6: For a new user, obtain the historical trajectory sequence of the new user, input the historical trajectory sequence of the new user into the optimal point of interest recommendation model, and output the next point of interest that the new user may visit, the visit time of the next point of interest, and the category of the next point of interest.

2. The location recommendation method based on a hypergraph neural network and a diffusion model as claimed in claim 1, characterized in that: In S1, calculate X l The process is as follows: For the POI hypergraph, a two-stage information transfer aggregation calculation method is used to calculate the POI intention representation X v ; The POI locations in the dataset are embedded in a shallow neural network, and the input POI locations are mapped into a dimension d through an embedding layer E. τ The embedding vector X n At the same time, the hyperedge representation is initialized by the following formula to obtain the hyperedge initialization feature where |e v | represents each hyperedge e∈E p The number of nodes on ; The hypergraph convolution operation of the two-stage propagation begins with the "node to hyperedge" process. The operation mechanism is as follows: in is a feature transformation matrix, LeakyReLU is used as the activation function, and the softmax function is used to normalize the coefficients of all nodes in the hyperedge. e Represents hyperedge embedding representation; Secondly, propagate the learned high-level intent information to each node along the "hyperedge to node" path, use global information to update the node representation, and enrich the collaborative signals of high-level user intent contained in the node. The process is as follows: Where E(v) is the set of hyperedges containing all POI points v, is a feature transformation matrix, LeakyReLU is used as the activation function, and the softmax function is used to include the node v i Normalize all hyperedges of ; Through N-layer hypergraph convolution calculation, we can initially obtain the intention representation of POI location and POI category, and then connect the two to obtain the preliminary user intention representation X corresponding to the trajectory sequence cv , as shown below: Where X c Intent representation of POI category; The soft attention mechanism based on reverse position encoding is used to model the importance of each POI in a user trajectory sequence to obtain the location-aware user intention representation X l ; in is a feature transformation matrix, is a feature transformation matrix, is a feature transformation matrix, is the bias term, and tanh is used as the activation function; p t-i+1 represents the position embedding corresponding to the i-th time step, Indicates the intent representation of the last POI, The intent representation corresponding to the i-th POI.

3. The location recommendation method based on a hypergraph neural network and a diffusion model as claimed in claim 2, characterized in that: In S1, the spatiotemporal representation e corresponding to each trajectory sequence is calculated f The process is as follows: For temporal information, we use the Time2Vector method to encode the time in the trajectory sequence. For spatial information, we use a simple linear method and connect the two: and f =In st (Time2Vec(v time )⊕(In s ×v distance )),v∈S u (7) in is a matrix that can be learned, Time2Vec is a time encoding method, v time is the time information, v distance is the spatial information, v is the POI, S u is a trajectory sequence.

4. The location recommendation method based on a hypergraph neural network and a diffusion model as claimed in claim 3, characterized in that: In S1, calculate X f The process is: First, embed the locations in the dataset with a shallow neural network, using the embedding matrix The location set of length |V| is embedded into the feature space of dimension d. At this time, the location embedding input to the first layer of the hypergraph neural network is Then the operation mechanism of the global hypergraph convolutional network is as follows: in Represents the location embedding vector of the k+1th layer of the global short trajectory interaction hypergraph; H tra is the incidence matrix of the hypergraph, Yes H tra The transpose of W tra is the hyperedge weight diagonal matrix, D trae is the hyperedge degree matrix, D trav is the node degree matrix, is the location embedding vector of the kth layer, is the normalized node degree matrix; To perform the normalization operation, we get the representation X of the trajectory tra , using the operation of accumulating and averaging all the location representations on the hyperedge Get the user intention representation γ of this trajectory from a global perspective tra ; Using three learnable weight matrices To learn the query vector Q, key vector K and value vector V; Q=Drop(LeakyReLu(e f W Q )) (10) K=Drop(LeakyReLu(γ tra IN K )) (11) V=Drop(LeakyReLu(ω l X l )IN V )) (12) is a learnable weight matrix, and LeakyReLu is an activation function; where d k is with d τ have the same value of the scale parameter, σ is the Softmax function.

5. The location recommendation method based on a hypergraph neural network and a diffusion model as claimed in claim 4, characterized in that: In S3, calculate X dif The process is as follows: Diffusion stage: First, characterize the local trajectory intention X f Normalize the features to get The specific implementation is shown in formula (15); Where σ(X f ) 2 Indicates the request for X f The variance of f ) means to find X f The mean of Randomly select a set of diffusion steps Then Gaussian noise sampling is performed at each diffusion step t And calculate the noise data set up represents the trainable parameters used to perform the dimensionality transformation and As a time embedding matrix; the training process in the diffusion process is as follows: Input: Normalized representation Diffusion step set s, X globel , neural network θ ; Output: Diffusion loss Select t from s: 1) Calculate the representation after dimension conversion 2) Sample a random Gaussian noise ε at diffusion step t t ; 3) Calculate the noise data x at time t using formula (16): t : in α t =1-β t , x t is the noise data at time t, x0 is the normalized representation, β t Represents the noise planning factor, which is used to control the proportion of noise added in each diffusion step. represents the cumulative factor from step 1 to step t, I is an identity matrix; 4) Calculate the embedded representation e of t t =E T (t); 5) and e t Add them together to get c; 6) Through f θ Predict the noise at time t 7) Calculate the loss using formula (17) in is the variational lower bound function, represents expectation, ε θ represents the predicted noise, is the Gaussian noise at diffusion step t; 8) Loop through 2) to 7) until No longer changing; The reverse process works as follows: enter: Diffusion step T, X globel and f θ ; Output: Ⅰ) Compute the representation after dimension conversion II) Random Gaussian noise ε at sampling time T T ; III) Calculate the noise data x at time T T ; IV) t = T-1, ..., 1; V) Compute the embedded representation e of t t =E T (t); VI) and e t Add them together to get c; VII) Through f θ Predict the noise at time t IX) Calculate x by formula (18) t The mean μ θ (x t ,t): in is the mean, is the variance, ε represents the noise of the prediction; VIII) Random Gaussian noise ε at sampling time t t ; Ⅹ) Calculate the data distribution x at time t-1 t-1 =μ θ (x t ,t)+β t ε t ; After restoring the original data, the feature inverse normalization operation is used to transform the data distribution back to the original distribution, as shown in formula (20); the result is the diffusion-enhanced intent representation X that integrates the global features through diffusion recovery dif ; in, is to ask Mean, is to ask Variance, λ as temperature coefficient is a hyperparameter.

6. The location recommendation method based on a hypergraph neural network and a diffusion model as claimed in claim 5, characterized in that: In S5, calculation and The process is as follows: Given a learnable matrix Frequency domain learning is modeled as: After filtering out the noise in the frequency domain, we get the sequence representation right To encode: in as well as is a learnable weight vector, using GELU Gaussian error linear unit as the activation function, d δ Represents the final sequence representation dimension; Where W poi , W time , W cat is a learnable parameter, b p , b t , b c is the corresponding bias.

7. The location recommendation method based on a hypergraph neural network and a diffusion model as claimed in claim 6, characterized in that: In S5, calculation The process is as follows: Among them, μ is a hyperparameter used to balance the optimization objective.

Citation Information

Patent Citations

  • Relation mining-oriented interest point recommendation method based on joint neural network

    CN113268669A

  • Recommendation method based on adaptive graph contrast learning

    CN117390271A

  • User-topic interestingness evaluation method based on hypergraph convolution in social network

    CN118210984A

  • Location recommendation method based on semantic enhancement

    CN118760800A

  • Dynamic graph node embedding via light convolution

    WO2022061170A1

Cited By

  • Location social network service recommendation method based on trajectory collaborative filtering and Mama

    CN120256746A

  • A location-based social network service recommendation method based on trajectory collaborative filtering and Mamba

    CN120256746B

  • Chained diffusion remote sensing hyperspectral image super-resolution system and method

    CN120318077A

  • Chain diffusion remote sensing hyperspectral image super-resolution system and method

    CN120318077B

  • Regional perception dynamic hypergraph and double-layer modeling-based interest point recommendation method

    CN120429503A