A place recommendation method based on hypergraph neural network and diffusion model

By constructing an interest point recommendation model based on hypergraph neural networks and diffusion models, the problems of dynamic changes in user intent and noise influence in existing technologies are solved, and more accurate interest point recommendations are achieved.

CN119441636BActive Publication Date: 2026-02-13CHONGQING UNIV

Patent Information

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

AI Technical Summary

Technical Problem

Existing interest point recommendation models struggle to accurately capture the dynamic changes and complexity of user intent, neglect the multidimensional characteristics of user behavior, and fail to effectively utilize changes across time and space regions. Noisy data also negatively impacts prediction performance.

Method used

An interest point recommendation model is constructed using a hypergraph neural network and diffusion model approach, including a local trajectory flow hypergraph module, spatiotemporal feature encoding, multidimensional feature fusion network, global hypergraph representation learning module, feature optimization module, aggregation layer and frequency domain learning layer. The intention representation is enhanced through multi-level trajectory representation and diffusion model.

Benefits of technology

It improves the accuracy of point-of-interest recommendations, better captures changes in user behavior patterns and multi-dimensional features, effectively removes noise interference, and enhances prediction performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441636B_ABST
    Figure CN119441636B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of place recommendation method based on hypergraph neural network and diffusion model, interest point recommendation model is constructed, interest point recommendation model successively includes local trajectory flow hypergraph module, space-time feature coding, multi-dimensional feature fusion network, global hypergraph representation learning module, feature optimization module, aggregation layer, frequency domain learning layer and linear prediction layer.Analysis of the long trajectory of user, and it is divided into space-time region, constructs three global hypergraphs, aims at comprehensively capturing the overall behavior pattern of user.In order to better optimize trajectory intention representation, propose feature optimization module based on improved diffusion model.Introduce multi-dimensional global representation to ensure a more stable and controllable reverse process, and use feature normalization and improved Transform network, enhanced diffusion model is more suitable for recommendation system.Loss function is designed to train interest point recommendation model, and the interest point recommendation model trained is used to recommend next interest point for new user.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of point of interest recommendation, and particularly relates to a place recommendation method based on a hypergraph neural network and a diffusion model. BACKGROUND

[0002] With the development of location-based social networks (LBSNs) and the surge in the use of their applications, users' check-in data is widely collected. Therefore, researchers' interest in point of interest (POI) recommendation models, which aim to reveal users' visiting habits by analyzing check-in history, is also increasing. The main goal of next-POI recommendation is to recommend the location that a user is most likely to visit next time.

[0003] Unlike traditional recommendation methods, POI recommendation requires in-depth analysis of users' spatio-temporal features and their intentions to help make the most appropriate prediction. Currently, researchers are increasingly focusing on deep learning-based methods to model sequential data. In order to effectively capture long-term periodicity 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 take advantage of 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 transition and location relationship between POIs because they can capture the interaction between neighbors and model complex relationships.

[0004] Although the above method has shown relatively advanced performance, the present application believes that the current work has limitations, which limit the performance of the POI recommendation recommendation model. First, most existing researches use complete check-in history to model to infer user intent, however, this method often ignores the dynamic changes and complexity of user intent in the trajectory. In POI recommendation, user intent is usually influenced by multiple factors such as category, spatial distance, time, etc. However, current graph or hypergraph-based methods focus more on static or global patterns, and fail to fully consider the fine-grained and multi-dimensional features of user behavior, making it difficult to accurately capture the complex user intent in the trajectory. Second, many existing methods are difficult to capture user long-term preferences while effectively utilizing changes across spatio-temporal regions. Accurately grasping user 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 movement behavior of the same user within a shorter period of time and a specific spatial region usually has similar patterns, but between different spatio-temporal regions, the movement behavior patterns often change. The difference in user behavior patterns and their spatio-temporal correlation pose challenges to next interest point recommendation. Third, in POI recommendation, user behavior data mainly comes from implicit feedback (visiting a certain place), rather than explicit feedback (such as rating or review). User visits to a place may just be a casual pass-by, and does not represent their true interest in the place, thus inevitably bringing noise. Many existing methods, such as transformer-based models, although introducing attention mechanisms, still have difficulty in effectively distinguishing noise data. Certain noise data can make it difficult for the model to learn a high-quality representation of user intent, thus directly affecting prediction performance. SUMMARY

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

[0006] To solve the above technical problems, the present application adopts the following technical solution: a place recommendation method based on hypergraph neural network and diffusion model, a POI recommendation model is constructed, the POI recommendation model sequentially includes a local trajectory flow hypergraph module, a spatio-temporal 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.

[0007] S1: obtain a category-aware user intent representation X using a local trajectory flow hypergraph module l : obtain a plurality of user trajectory sequences to form a data set, and construct a POI-based hypergraph G for each user's trajectory sequence p = (V p , Ep ) and POI category hypergraph G based on POI location categories c =(V c E c ), where V p Representing G p The meeting point for the sign-in, V c Representing G c The set of check-in location categories, E p and E c Representing G respectively p and G c The set of hyperedges represents the weighted incidence matrix of the two hypergraphs. and The definition is as follows:

[0008]

[0009] Where r represents the number of times a POI is checked in on the hyperedge, and n represents the number of times a POI appears on the hyperedge under the sliding window.

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

[0011] 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 intent representation X corresponding to each trajectory sequence. f ;

[0013] Each user's trajectory sequence is segmented into shorter trajectories bounded by 24-hour intervals. A global short trajectory interaction hypergraph G is constructed based on multiple short trajectories from all users. tra =(V tra E tra ). Among them, V tra E represents the set of nodes in the hypergraph. tra It is a set of hyperedges. It represents the incidence matrix of the hypergraph's topological structure. The definition is as follows:

[0014]

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

[0016] A global hypergraph convolution network is designed to calculate the user's intention representation γ tra in the global perspective of each track, and self-attention mechanism is used to fuse e f , γ tra and X l to obtain X f .

[0017] S2: Obtain the final global end representation X globel using the global hypergraph representation learning module.

[0018] A global user interaction hypergraph G g = (V g , E g ) is constructed, where V g represents the node set of the hypergraph, that is, the set of check-in places. E g is the user's hyperedge set. Using the same operating mechanism as calculating γ tra , the user's behavior pattern representation X g is obtained.

[0019] The G tra is divided according to the time threshold of 24 hours, so as to obtain the global time hypergraph representation X tem .

[0020] A global spatial hypergraph based on a spatial threshold is constructed, and the spatial distance Δs between points is calculated using the Haversine Formula. When Δs is less than the spatial threshold, it means that two check-in points are on a hyperedge, thereby constructing a 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. And E spa is the hyperedge set of spatial regions. Using the same mechanism of computation γ tra , we get the global spatial hypergraph representation X spa .

[0021] Finally, we embed the user representation by the embedding layer according to the user ID and fuse it into X g , X tem , X spa and X user to get the final global representation X globel for each trajectory sequence, as shown in the formula:

[0022]

[0023] where, represents the vector concatenation operation, and ω globel is the learnable weight matrix.

[0024] S3: In the feature optimization module, we use the improved diffusion model to get the optimized intention representation X dif for each trajectory sequence.

[0025] S4: In the aggregation layer, we add X dif , X globel and X l to get the comprehensive representation X final for each trajectory sequence:

[0026]

[0027] S5: In the frequency domain learning layer, we convert X final to the frequency domain to get the sequence representation and encode to get Take as the input of the linear prediction layer, and the output is the predicted next interest point of the user corresponding to each trajectory sequence, the access time of the interest point and the category of the interest point

[0028] Calculate the loss and update all parameters in the interest point recommendation model according to . When the loss no longer decreases, the optimal interest point 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 interest point recommendation model, and output the next interest point that the new user is likely to visit, the visit time of the next interest point and the category of the next interest point.

[0030] Further, in S1, X l is calculated as follows:

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

[0032] The POI locations in the data set are embedded by a shallow neural network, and an embedding layer E is used to map the input POI locations into an embedding vector X τ with a dimension of d n , and the representation of the hyperedge is initialized by the following formula to obtain the initialized feature of the hyperedge

[0033]

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

[0035] The hypergraph convolution operation of the two-stage propagation is started, and the first is the "node to hyperedge" process, and the operation mechanism is as follows:

[0036]

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

[0038] Secondly, along the "hyperedge to node" path, the high-level intention information is propagated to each node, and the node representation is updated using global information, and the high-order user intention collaborative signal contained in the node is enriched, and the process is as follows:

[0039]

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

[0041] The POI place and POI category intention representation are obtained through N-layer hypergraph convolution calculation, and then the two are connected to obtain the preliminary user intention representation X corresponding to the trajectory sequence cv As follows:

[0042]

[0043] Wherein X c represents the intention representation of the POI category;

[0044] The importance of each POI in a user trajectory sequence is modeled by using a soft attention mechanism based on reverse position coding to obtain a location-aware user intention representation X l .

[0045]

[0046] Wherein is a feature transformation matrix, W4, is a feature transformation matrix, W5 is a feature transformation matrix, is a bias term, and tanh is used as an activation function. P t-i+1 represents the position embedding corresponding to the i-th time step, represents the intention representation of the last POI, represents the intention representation of the i-th POI.

[0047] Further, in the S1, the spatio-temporal representation e f of each trajectory sequence is calculated as follows:

[0048] For time information, Time2Vector is used to encode the time in the trajectory sequence, and for space information, a simple linear method is used, and the two are connected:

[0049]

[0050] Wherein is a learnable matrix, Time2Vec is a time encoding method, v time is the time information, v distance is the space information, and v is the POI, S u is the trajectory sequence.

[0051] Further, in the S1, the process of calculating X f is as follows:

[0052] First, the shallow neural network embedding of the places in the data set is performed, and the embedding matrix The set of locations with length |V| is embedded into a feature space with dimension d, and the location embedding of the first layer of the input hypergraph neural network is Then the operation mechanism of the global hypergraph convolutional network is as follows:

[0053]

[0054] where 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, is the transpose of H tra , 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] For normalization operation, the representation X tra of the trajectory is obtained The user intention representation γ tra of the trajectory under the global perspective is obtained by using the operation of accumulating and averaging all location representations on the hyperedge

[0056] Three learnable weight matrices are used to learn the query vector Q, the key vector K and the 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 an activation function.

[0061]

[0062] where d k is a scale parameter with the same value as d τ , and σ is a Softmax function.

[0063] Further, in the S3, calculate X dif as follows:

[0064] Diffusion phase:

[0065] First, the local trajectory intention representation X f is normalized to obtain The specific implementation is shown in formula (15).

[0066]

[0067] where σ(X f ) 2 represents the variance of X f , and μ(X f ) represents the mean of X f .

[0068] Randomly select a set of diffusion steps Then, in each diffusion step t, sample Gaussian noise and calculate the noise data

[0069] Set to represent the trainable parameters for performing dimension transformation and as the 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 f θ ;

[0071] Output: diffusion loss

[0072] Select t from s:

[0073] 1) Calculate the representation after dimension conversion

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

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

[0076]

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

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

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

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

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

[0082]

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

[0084] 8) Repeat steps 2) through 7) until... No longer changing;

[0085] The reverse process is as follows:

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

[0087] Output:

[0088] Ⅰ) Calculate the representation after dimensional transformation

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

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

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

[0092] V) Calculate the embedding representation e of t t =E T (t);

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

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

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

[0096]

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

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

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

[0100] After restoring the original data, a feature inverse normalization operation was used to inversely transform the data distribution back to its original distribution, as shown in Equation (20). The result obtained is a diffusion-enhanced intention representation X that incorporates global features and is restored through diffusion. dif .

[0101]

[0102] in, Is seeking mean Is seeking Variance, λ, is a hyperparameter representing the temperature coefficient.

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

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

[0105]

[0106] After filtering out noise in the frequency domain, the sequence representation is obtained. right Encode:

[0107]

[0108] where and are learnable weight vectors, 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 are learnable parameters, b p , b t , b c are corresponding biases.

[0111] Further, in the S5, the process of calculating is as follows:

[0112]

[0113] where μ is a hyperparameter used to balance the optimization objective.

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

[0115] (1) The existing methods often ignore the problem that the user intention changes constantly and complexly within the trajectory, which limits their ability to accurately capture multi-dimensional user intention representation. To solve this problem, the present application designs a local trajectory intention extraction module, which integrates multi-level trajectory representation and enhances the understanding of user intention.

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

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

[0118] Figure 1 is the overall architecture of the point of interest recommendation model of the present application.

[0119] Figure 2 is the improved Transformer network. FTTB represents the fine-tuned Transformer module, and FTB represents the fine-tuned module.

[0120] Figure 3 is the performance result of different networks.

[0121] Figure 4 Results of the ablation experiments.

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

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

[0124] A new HGDRec model is proposed in the present application to solve the three challenges proposed in the background art. See 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) spatio-temporal encoder and (a.3) multi-dimensional feature fusion network; (b) global hypergraph representation learning module; (c) feature optimization module. To solve the first limitation in the background art, the model of the present application extracts the user's intention on this trajectory by fully considering the multi-dimensional interaction between the user and the POI. Specifically, first, the intention representation on each trajectory is extracted by the POI and POI category based trajectory flow hypergraph. Subsequently, the spatio-temporal feature encoder is used to obtain the spatio-temporal representation on this trajectory. Finally, the trajectory representation under the global perspective of this trajectory obtained by the global trajectory hypergraph is fused by the multi-dimensional feature fusion network to obtain the comprehensive intention representation of this trajectory. To solve the second limitation, the present application comprehensively analyzes the complex global interaction, time and space of the user and the POI to better understand the overall behavior pattern of the user. Specifically, the present application constructs a global user long trajectory hypergraph by analyzing the user's long trajectory data, so that the model can better understand the user's comprehensive behavior. And in order to more accurately capture the changes in the user's behavior pattern, the present application divides the user's long trajectory into multiple spatio-temporal regions. Each spatio-temporal region represents the user's behavior within a specific time period and geographical area. A global spatio-temporal hypergraph is constructed to capture the changes in user behavior. To solve the third limitation, a diffusion model is introduced for feature denoising optimization. By introducing the disturbance caused by random Gaussian noise in the diffusion process, we aim to enhance the intention representation, and thus promote the recommendation model to learn more abstract and deep interaction information. Specifically, we combine feature normalization and improved Transformer network, so that the improved diffusion model is more suitable for recommendation systems. And multi-dimensional global representation is introduced in the diffusion model to effectively resist the disturbance of random Gaussian noise, which ensures the stability and controllability of the diffusion process and the reverse process.

[0125] To solve the limitations of existing methods in capturing complex user intentions, the present application proposes a new method for extracting short trajectory intentions. By integrating multi-level trajectory information representation, the present application enhances the understanding of user intentions, thereby achieving a comprehensive multi-dimensional description of user behavior.

[0126] To effectively address the challenges posed by the complexity of user behavior patterns and spatio-temporal correlations in real-world scenarios, we extract multi-level spatio-temporal information from trajectories and construct a global hypergraph structure across spatio-temporal regions, aiming to comprehensively capture user behavior patterns.

[0127] To optimize trajectory intention representation, the present application proposes a method based on an improved diffusion model. By incorporating multi-dimensional global representations of stable inverse processes, as well as feature normalization and improved Transformer networks, the diffusion model enhances the denoising optimization of noisy feature representations.

[0128] A location recommendation method based on hypergraph neural networks and diffusion models, a point of interest recommendation model is constructed, which sequentially includes a local trajectory flow hypergraph module, a spatio-temporal 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.

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

[0130] In the construction of hypergraphs, to better represent the user's intention corresponding to each trajectory, the present application defines a weighted association matrix in the hypergraph by considering the user's repeated check-in to alleviate the loss of information in past hypergraph learning. The weighted association matrix takes into account the user's repeated check-in, where different weights reflect the user's check-in frequency at different locations, thereby more accurately depicting user behavior and intentions. And here, in order to more accurately capture the user's intention on each trajectory, a sliding window is used to dynamically analyze the user's behavior within each time period when constructing hyperedges, thereby capturing changes in the time dimension. This allows observation of the user's activity patterns within a specific time period and a more accurate understanding of the user's intention evolution over time. The data generated by each time window is used to update the weighted association matrix, ensuring that the model reflects recent user behavior and preference changes.

[0131] S1: a.1 Obtain class-aware user intention representation X using the local trajectory flow hypergraph module l : Obtain trajectory sequences of a number of users to form a dataset, and construct a POI-based hypergraph G for each user's trajectory sequencep = (V p , E p ) and POI category hypergraph G c = (V c , E c ) based on POI location categories, where V p represents the set of check-in locations of G p , V c represents the set of check-in location categories in G c , E p and E c represent the set of hyper-edges in G p and G c respectively, and W p and W v represent the weighted association matrices of the two hypergraphs. and are defined as follows:

[0132]

[0133] where r represents the number of check-ins of POIs in a hyper-edge, and n represents the number of times that a POI location appears on a hyper-edge under a sliding window. Although the hyper-edges constructed by the sliding window can capture user intentions with various granularities, they may not effectively capture dependencies in a longer time range. Therefore, a hyper-edge is added to each local trajectory stream hypergraph, which aims to describe long-term dependencies in a local trajectory by connecting all POI locations (or categories) in the same trajectory.

[0134] The POI hypergraph G p is calculated by using a two-stage information propagation aggregation calculation method to calculate the intention representation X v of POIs, and the POI category hypergraph G c is calculated to calculate the intention representation X c of POI categories; then X v and X c are used to calculate the preliminary user intention representation X cv corresponding to each trajectory sequence, and finally the location-aware user intention representation X l corresponding to each trajectory sequence is calculated.

[0135] Specifically, the process of calculating X l is as follows:

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

[0137] By employing a two-stage information transfer and aggregation method—from node to hyperedge and from hyperedge to node—the hyperedge not only facilitates the aggregation of node information within itself but also propagates node information across hyperedges. First, this invention embeds a shallow neural network into the POI locations in the dataset, mapping the input POI locations to a d-dimensional neural network through an embedding layer E. τ Embedded vector X n Meanwhile, the hyperedge features are initialized by initializing the hyperedge representation using the following formula.

[0138]

[0139] Where |e v | represents each hyperedge e∈E p According to formula (2), the number of nodes on a hyperedge is such that POI nodes that appear multiple times in a hyperedge have a greater weight in the initial representation of the hyperedge. Hyperedge embedding can be regarded as the target user's preference for a specific POI.

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

[0141]

[0142] in X is a feature transformation matrix, using LeakyReLU as the activation function, and the softmax function is used to normalize the coefficients of all nodes in the hyperedge. e This represents the hyperedge embedding representation. By incorporating information about repeated user clicks into the hypergraph convolution operation, high-quality hyperedge embeddings can be learned to represent multi-layered and multi-granular user intents.

[0143] Secondly, high-level intent information is learned and propagated to each node along the "hyperedge to node" path. The node representation is updated using global information, enriching the collaborative signals of high-order user intent contained in the nodes. The process is as follows:

[0144]

[0145] Where E(v) is the set of hyperedges containing all points v of interest (POI). Given a feature transformation matrix, LeakyReLU was used as the activation function, and the softmax function was applied to the feature matrix containing node v. i Normalize all hyperedges.

[0146] The same two-stage message passing aggregation calculation method is used to calculate the intent representation X of the POI category hypergraph. c ;

[0147] Through N-layer hypergraph convolution calculation, the intention representation of the POI place and the POI category is obtained preliminarily, and then the two are connected to obtain the preliminary user intention representation X corresponding to the trajectory sequence cv As follows:

[0148]

[0149] Wherein X c represents the intention representation of the POI category;

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

[0151]

[0152] Wherein is a feature transformation matrix, W4, is a feature transformation matrix, is a feature transformation matrix, is a bias term, and tanh is used as an activation function. P t-i+1 represents the location embedding corresponding to the i-th time step, represents the intention representation of the last POI, represents the intention representation of the i-th POI.

[0153] a.2 Use the spatiotemporal feature encoding to calculate the spatiotemporal representation e f of each trajectory sequence. Specifically, the process of calculating the spatiotemporal representation e f of each trajectory sequence 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 the representation. The application proposes a spatiotemporal feature encoder to process spatiotemporal information and explore the temporal and spatial patterns of trajectory sequences. For the temporal information, Time2Vector is used to encode the time in the trajectory sequence, and for the spatial information, a simple linear method is used, and the two are connected:

[0155]

[0156] Wherein is a learnable matrix, Time2Vec is a time encoding method, v time is time information, v distance is spatial information, v is POI, S u is the trajectory sequence.

[0157] a.3 Obtain the final user intention representation X f of each trajectory sequence by using a multi-dimensional feature fusion network.

[0158] Divide each user's trajectory sequence into short trajectories bounded by 24 hours, and construct a global short trajectory interaction hypergraph G tra = (V tra , E tra ) based on multiple short trajectories of all users. Where V tra represents the node set of the hypergraph, and E tra is the hyperedge set. The association matrix A representing the topology of the hypergraph is defined as follows:

[0159]

[0160] Where the actual meaning of the element 1 in the association matrix is that the place represented by the row appears in the short trajectory represented by the column. For the hyperedge e E tra representing the user's trajectory, its degree is the number of nodes connected by the hyperedge, which represents the number of places covered by the user's trajectory, and is represented as The degrees of all hyperedges constitute the diagonal hyperedge degree matrix D trae . Assign a weight W e to each hyperedge, and all hyperedge weights together constitute a diagonal matrix W Where each node v V tra , the degree of the node is obtained by matrix multiplication of the diagonal matrix and the hyperedge weight matrix The degrees of all nodes constitute the diagonal node degree matrix D trav .

[0161] Design a global hypergraph convolution network to calculate the user intention representation γ tra of each trajectory in the global perspective, and use the self-attention mechanism to fuse e f , γ tra and X l to obtain X f .

[0162] Specifically, the process of calculating X f is as follows:

[0163] Then a global hypergraph convolution network is designed to capture the collaborative signals between short trajectories of users to iteratively mine complex and high-order POI transition relationships. Through the aggregation of information transmission in two stages of node to hyperedge and hyperedge to node, the hyperedge not only promotes the aggregation of node information within the hyperedge, but also transmits node information across hyperedges. First, the shallow neural network embedding of the locations in the dataset is performed, and the embedding matrix The location set with a length of |V| is embedded into a feature space with a dimension of d, and the location embedding of the first layer of the input hypergraph neural network is Then the operation mechanism of the global hypergraph convolution network is as follows:

[0164]

[0165] Among them, represents the location embedding vector of the k+1 layer of the global short trajectory interaction hypergraph. H tra is the incidence matrix of the hypergraph, is the transpose of H tra , 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 k layer, is the normalized node degree matrix.

[0166] For normalization operation, the representation X tra of the trajectory is obtained. The user intention representation γ tra of the trajectory under the global perspective is obtained by accumulating and averaging the representations of all locations on the hyperedge.

[0167] The specific operation of information transmission and aggregation is as follows: is the process of node feature convergence to hyperedge, and after the short trajectory information of the user corresponding to the hyperedge is aggregated, it is transmitted back to the node representation by , the node representation is updated using global information, and the high-order collaborative signals between short trajectories contained in the node are enriched, wherein is the normalization operation, so that the representation X tra of the trajectory can be obtained. Finally, the user intention representation γ tra of the trajectory under the global perspective can be obtained by accumulating and averaging the representations of all locations on the hyperedge.

[0168] The self-attention mechanism is used to fuse multi-dimensional features, and three learnable weight matrices ​Drop the query vector Q, the key vector K and the 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. By calculating the local user intention representation in the value vector V and the spatio-temporal pattern information of the query vector Q and the intention feature of the user under the global perspective of the key vector K, the access intention relationship between the user's short-term location transfer pattern and the spatio-temporal pattern is extracted. The last step of the fusion process on the short trajectory is:

[0173]

[0174] where d k is a scale parameter with the same value as d τ , and σ is a Softmax function. This fusion mechanism not only fuses local information to mine the patterns of short sequences, but also incorporates the representation of the user's intention under the global perspective of the short sequence.

[0175] S2: b. Obtain the final global end representation X globel using the global hypergraph representation learning module.

[0176] Each user's trajectory sequence is divided into short trajectories bounded by 24 hours, and the trajectory intention feature is obtained by using the short trajectory intention extraction module in S1. Although the global short trajectory interaction hypergraph is used in the multi-dimensional feature fusion network to obtain the user intention representation under 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 long 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 can be captured, such as long-term user behavior patterns.

[0177] Construct a global user interaction hypergraph G g = (V g , Eg ), where V g The set of nodes representing the hypergraph is also the set of check-in locations. And E g It is the set of user hyperedges. Use the calculation of γ tra Using the same operating mechanism, we obtain user behavior pattern representation X. g .

[0178] In real-world scenarios, user check-in behavior is not continuous. This means that when the space or time interval between two check-in records is large, a user's movement preferences may change significantly. Therefore, dividing trajectory sequences into different spatiotemporal regions based on spatiotemporal thresholds can better help recommendation models capture users' personalized movement preferences. Therefore, based on this, a global spatiotemporal hypergraph is constructed to better reflect users' personalized preferences.

[0179] G as described in S1a.3 tra The global temporal hypergraph representation X is obtained by dividing the time frame into 24-hour periods based on this time threshold. tem .

[0180] A global hypergraph based on a spatial threshold is constructed, and the spatial distance Δs between points is calculated using the Haversine Formula. When Δs is less than the spatial threshold, it indicates that two check-in points are on the same hyperedge, thus constructing the global hypergraph G. spa =(V spa E spa ), where V spa The set of nodes representing the hypergraph is also the set of check-in locations. And E spa It is the set of hyperedges of a spatial region. Using the calculation of γ... tra The same operating mechanism yields the user's global space hypergraph representation X. spa .

[0181] Finally, the user representation is embedded based on the user ID through the embedding layer. Then merge into X g X tem X spa and X user Obtain 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 Learnable weight matrix, concatenated 4D τ 2D vector fusion τ The final global representation of dimension X globelThe fusion mechanism fuses global information with lower complexity.

[0184] S3: Obtain the intention representation X corresponding to each trajectory sequence using the improved diffusion model in the feature optimization module dif .

[0185] Specifically, the process of calculating X dif is as follows:

[0186] Feature normalization and Transformer network design:

[0187] The diffusion model can learn the original data distribution with fine granularity by applying random Gaussian noise and training a neural network for denoising, thereby enhancing its image generation capability. In image data, the difference between pixel values and Gaussian noise is large, making the distribution relatively insensitive to noise. Therefore, even if noise is introduced, the overall distribution is basically not affected, which enables the diffusion model to operate stably and effectively while maintaining data integrity. However, in POI recommendation, the original distribution of X f is noise-sensitive, causing a large shift in the original distribution with a small amount of Gaussian noise, making it difficult for the diffusion model to train stably in such noise-sensitive data distribution. To solve this problem, feature normalization and inverse normalization are used for X f , as shown in the formula:

[0188]

[0189] In the diffusion model, the present application designs a Fine-Tuning Transformer network f θ , which is expected to achieve fine-grained optimization of user intention representation X globel using global features X f . The network design is as follows: Figure 2 The figure shows an improved Transformer network design, where FTTB (Fine-Tuning Transformer Block) is a stack of multiple Fine-Tuning Transformer modules. By introducing multi-head attention mechanism, normalization, and multi-layer perceptron, it effectively captures the dependencies in the input representation. 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, normalize the local trajectory intention representation X f to obtain The specific implementation is shown in formula (15).

[0192]

[0193] Where σ(X) f ) 2 Expressing the search for X f The variance, μ(X) f ) represents finding X f The mean.

[0194] Randomly select a set of diffusion steps Then, Gaussian noise sampling is performed at each diffusion step t. And calculate 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 disrupted into an anisotropic Gaussian distribution, causing the recovered original data to lose the user's personalized preferences—this invention introduces global features into the diffusion model as an auxiliary signal for representing local trajectory intentions, thereby mitigating the loss caused by the introduction of Gaussian noise.

[0196] set up Represents the trainable parameters used to perform dimensionality transformation and As the temporal embedding matrix, the training process during diffusion is as follows:

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

[0198] Output: Diffusion loss

[0199] Select t from s:

[0200] 1) Calculate the representation after dimensional transformation

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

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

[0203]

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

[0205] 4) Calculate the embedding representation e of t t T (t);

[0206] 5) Add e t and e t to obtain c; 6) Predict the noise at time t by f θ

[0207]

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

[0209]

[0210] where is the variational lower bound function, denotes expectation, ε θ denotes the predicted noise, is the Gaussian noise at diffusion step t. By reparameterization technique, the trained network f θ can be used to recover the original data. By introducing random Gaussian noise in the diffusion flow, it is hoped that the recommended model can learn more abstract interactions in the trajectory sequence by resisting these random disturbances.

[0211] 8) Loop 2) to 7) until no longer changes;

[0212] The purpose of the reverse process is to recover the distribution of the original data from the noise data. It should be noted here that the present application does not recover the original sequence representation from pure noise in order to retain some personalized information. The flow of the reverse process is as follows:

[0213] Input: diffusion step T, X globel and f θ ;

[0214] Output:

[0215] I) Calculate the representation after dimension conversion

[0216] II) Sample the random Gaussian noise ε at time T T ;

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

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

[0219] V) Calculate the embedding representation e t of t T :

[0220] VI) Add e t and e θ to obtain c :

[0221] VII) Predict the noise at time t by f t :

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

[0223]

[0224] where is the mean, is the variance, and ε represents the predicted noise.

[0225] VIII) Sample a random Gaussian noise ε t at time t

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

[0227] After recovering the original data, a feature inverse normalization operation is used to inversely transform the data distribution to the original distribution, as shown in formula (20). The result obtained by this is the diffusion-enhanced intention representation X dif that is fused with global features recovered by diffusion.

[0228]

[0229] where, is the mean, is the variance, and λ is the temperature coefficient as a hyperparameter. S4: At the aggregation layer, add X dif , X globel , and X l to obtain the comprehensive representation X final corresponding to each trajectory sequence:

[0230]

[0231]

[0232] S5: the X is converted into a sequence representation in the frequency domain by the frequency domain learning layer final After conversion into the frequency domain, a sequence representation is obtained and is encoded to obtain as input to a linear prediction layer, and the output is the next interest point of the user corresponding to each predicted trajectory sequence the visiting time of the interest point and the category of the interest point

[0233] Specifically, the process of calculating and is as follows:

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

[0235]

[0236] After filtering noise in the frequency domain, a sequence representation is obtained is encoded:

[0237]

[0238] wherein and are learnable weight vectors, GELU Gaussian Error Linear Unit is used as an 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 interest point and its time and category. This method effectively integrates time and category information, adopts a multi-task learning strategy, and predicts the next interest point from multiple dimensions to capture the complex behavior patterns of users.

[0239]

[0240] wherein W poi , W time , W cat are learnable parameters, b p , b t , b c are corresponding biases.

[0241] The loss is calculated and all parameters in the interest point recommendation model are updated according to when the loss no longer decreases, the optimal interest point recommendation model is obtained.

[0242] ​​​Specifically, the process of calculating the next point of interest and its category takes cross-entropy to calculate, and the root mean square loss is used to calculate for time, and since the processing for time has been standardized, the final total loss part is multiplied by ten so as not to be ignored.

[0243]

[0244] where mu 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 is likely to 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 experimental setup of the present application will be introduced below, and the empirical results of the present application will be given. The experiments of the present application aim to answer the following research questions:

[0248] Question 1: Is the model HGDRec of the present application better than the most advanced baseline in the next POI recommendation task?

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

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

[0251] Question 4: How does the performance of the model HGDRec of the present application change with the key model hyperparameters?

[0252] 1. Dataset

[0253] The present application evaluates the performance of the proposed model on two real-world datasets, and the Tokyo (TKY) and New York (NYC) check-in datasets of the Foursquare platform are selected for the experiment, and the collection time spans from April 2012 to February 2013. Before model training, key preprocessing steps are performed on the dataset: the check-in records of places with less than 10 records are removed, and the users with less than 5 check-in times are removed. Further, the check-in point data of the user is arranged in chronological order, and the sequence is cropped at 24-hour intervals. After extracting multiple sub-sequences of the user, all the sub-sequences are randomly sorted, and the sub-dataset is divided into 80% training set, 10% validation set and 10% test set. The 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 model HGDRec of the present application 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 is used as the hardware platform, and development and testing are carried out based on the PyTorch deep learning framework. Except that the dropout rate of the diffusion model and the trajectory flow hypergraph module is set to 0.1, all other dropout rates are 0.5. The global hypergraph convolution layer is set to 4, the local trajectory flow hypergraph convolution layer is set to 2, and the embedding dimension d τ =128. The time and space embedding dimension d ω =32, and the user embedding dimension is also d τ , and finally the 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 iteration number 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 application carefully adjusts the hyperparameters according to the original paper. The present application selects two indicators, accuracy (Acc@k) and mean reciprocal rank (MRR)

[0260] 4. Results and analysis

[0261] (1) Recommendation performance (question 1)

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

[0263]

[0264] The performance comparison results of each model on the two datasets of NYC and TKY can be observed from Table 2, and the best performance under the same index is indicated in bold, and the second best performance is indicated in underline. From the experimental results, it can be seen that for the evaluation indexes of Acc@5 / 10 / 20 and MRR, the model proposed in the present research is superior to all baseline models on the two datasets of NYC and TKY. For the evaluation index of Acc@1, the model proposed in the present research achieves the second best result on the two datasets. Compared with the best baseline on the NYC dataset, the model HGDRec of the present research realizes improvements of 2.9%, 1.15% and 4.19% in ACC@5, ACC@10 and ACC@20, respectively. On the TKY dataset, the improvements are more obvious, and the improvements of ACC@5, ACC@10 and ACC@20 are 10.05%, 12.06% and 12.2%, respectively.

[0265] In the comparative experiment, it can be seen that the graph-based methods DRAN and GETNext are superior to the models relying only on sequence modeling on all datasets. The MSTHN model using hypergraph for point of interest recommendation achieves good results, which effectively helps the model to predict with higher accuracy by revealing the complex high-order collaborative signals of user group trajectories through hypergraph. However, MSTHN ignores the role of sequence modeling and simply constructs a global interaction hypergraph, so it is lower than some more advanced models in evaluation indexes. POIGDE proposes to use graph differential equations to simulate the continuous change of user interest and develops a novel time series graph model. However, this method has certain limitations in capturing the immediate preferences and local behavior patterns of users, resulting in unsatisfactory results. DiffuRec achieves competitive results in all evaluation indexes, and its excellent performance proves the great potential of the diffusion model in the sequence recommendation task, but it does not consider the spatiotemporal information. MTNet proposes a new hierarchical structure - mobility tree, which can distinguish the behavior and preference of users in different time periods more finely by integrating multi-granularity time slot nodes, so as to better understand the behavior patterns of users, but it lacks the multidimensional and complex interaction between users and POIs, resulting in no better results.

[0266] (2) Improvement of the Transformer network (question 2)

[0267] As mentioned earlier, one of the important parts of the feature optimization model is the improved Transformer network. The present research compares the Transformer structure used in DiffRec, the multi-layer MLP structure in DSDRec, and the improved SU-Net structure in DiffuASR. As shown in Table 3, the improved SU-Net structure in DiffuASR has the best performance on all evaluation indexes, and the performance of the Transformer structure used in DiffRec is the second best. The multi-layer MLP structure in DSDRec is the worst. Figure 3As shown, the model of the present application has achieved leading performance in various 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 features that need to be optimized. Although the SU-Net network in DiffuASR optimizes U-Net to not lose sequence information, U-Net network is mainly designed for image field, and compared with the improved Transformer-based network of the present application, the performance is still insufficient.

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

[0269] Ablation experiments were performed on the key modules in HGDRec to evaluate the contribution and influence of different modules on the overall performance. In the ablation experiment, the influence of 6 modules on the model was focused on: (1) local trajectory flow hypergraph module (LTM), (2) spatial encoding (SE), (3) temporal encoding (TE), (4) global spatio-temporal hypergraph (GSTH), (5) global user interaction hypergraph (GTH) and (6) diffusion model (DM). The experimental results are shown in Figure 4 , where "w / o" means removing the corresponding module. The results show that the complete model achieves optimal 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 local trajectory users, resulting in a decline in the overall performance of the model. And for time encoding and space encoding, removing them will cause different degrees of performance decline, confirming the necessity of incorporating spatio-temporal information into POI recommendation as described in the foregoing. For the global hypergraph neural network module, removing this part will cause the learning of user group behavior and continuous place access patterns to fail, resulting in a decline in model performance. And removing the diffusion model will also cause the overall performance to decline. This result also shows that the diffusion model can indeed perform fine-grained optimization on the original features in the model of the present application. 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 application.

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

[0272] The local trajectory flow module and the global hypergraph module are used in the present application, and therefore, reasonable setting of the number of layers of local and global hypergraph convolution is crucial for information aggregation and representation learning on the hypergraph. Increasing the number of hypergraph convolution layers can improve the understanding and characterization ability of the model for user behavior to a certain extent, and can also capture the high-order collaborative signal of group wisdom behavior to the place. More layers mean that the model can consider more extensive user global and local behavior information and capture more similar behaviors between users, thereby obtaining more comprehensive and fine-grained user and place representations. However, increasing the number of layers to a certain number may cause over-smoothing, and the local and global representations may be excessively averaged to become similar, losing distinguishability and information, resulting in a decrease in model performance. The convolutional layer of the local trajectory flow hypergraph module focuses on capturing the user intent on a specific trajectory, and therefore, a smaller number of layers can capture more accurate user intent. In contrast, the global hypergraph convolution layer involves the entire hypergraph and focuses on more extensive user behavior and complex relationships between places, and therefore, more layers are needed for effective information integration and high-order feature learning. Therefore, through multiple experiments, as shown in Table 3, the horizontal coordinate represents the number of convolutional layers of the local trajectory flow hypergraph module, and different color lines represent the number of convolutional layers of the global hypergraph. In summary, the optimal performance is obtained when the number of local convolutional layers is 2 and the number of global convolutional layers is 4. Figure 5

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

[0274]

[0275] The performance of hyperparameters T and μ on the NYC dataset is shown in Table 3. In the diffusion model, in order to preserve some personalized information, the present application does not recover the original representation from pure noise, but introduces global features to help the diffusion model diffuse. This strategy helps to balance performance and computation, and the best results are obtained when T = 10. μ is the proportion of controlling the diffusion loss, and it is found through experiments that the best results can be obtained when μ = 1. It can be found that when the value of μ decreases, the performance of the model decreases to different degrees except for ACC@20, mainly because the diffusion model lacks fine-grained optimization of features. When the value increases, the model also decreases, 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 explained that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit it, although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions of the present application, and they should be covered in the scope of the claims of the present application.​

Claims

1. A place recommendation method based on a hypergraph neural network and a diffusion model, characterized in that: The interest point recommendation model comprises, in sequence, a local trajectory flow hypergraph module, a spatiotemporal 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. S1: Obtain class-aware user intention representation X by using local trajectory flow hypergraph module l : Obtain trajectory sequences of a plurality of users to constitute a data set, and construct a POI-based hypergraph G for each user's trajectory sequence p =(V p ,E p ) and a POI category hypergraph G c =(V c ,E c ) based on POI categories, wherein V p represents a set of check-in locations of G p , V c represents a set of check-in location categories in G c , E p and E c represent a set of hyperedges in G p and G c respectively, and W and are defined as follows: Wherein, r represents the number of check-ins of POI in the hyperedge, and n represents the number of times that the POI site appears on the hyperedge under the sliding window. A two-stage information transmission aggregation calculation method is used to calculate the POI hypergraph G p The intention representation X of the POI is calculated v The POI category hypergraph G c The intention representation X of the POI category is calculated c ; and then the X v and X c The preliminary user intention representation X corresponding to each trajectory sequence is calculated cv , and finally the location-aware user intention representation X corresponding to each trajectory sequence is calculated l ; The spatial-temporal feature encoding is used to calculate the spatial-temporal representation e corresponding to each trajectory sequence f ; adopting a multi-dimensional feature fusion network to obtain a final user intention representation X corresponding to each trajectory sequence f ; segmenting the trajectory sequence of each user into short trajectories bounded by 24 hours, constructing a global short trajectory interaction hypergraph G based on the multiple short trajectories of all users tra = (V tra , E tra ) ; wherein V tra represents the node set of the hypergraph, and E tra is the hyperedge set, representing the association matrix of the hypergraph topology is defined as follows: Where the actual meaning of the element in the incidence matrix is 1, the place represented by the row appears on the short track represented by the column; for the super edge e E tra representing the user's track, its degree is the number of nodes connected by the super edge, which represents the number of places covered by the user's track, so it is represented as The degrees of all super edges constitute the diagonal super edge degree matrix D trae ; Assign a weight W e to each super edge, and all super edge weights together constitute a diagonal matrix Where each node v V tra , the degree of the node is obtained by matrix multiplication of the diagonal matrix and the super edge weight matrix The degrees of all nodes constitute the diagonal node degree matrix D trav ; A global hypergraph convolution network is designed to calculate a user intention representation gamma of each trajectory in a global perspective tra , and e f , gamma tra and X l are fused using a self-attention mechanism to obtain X f ; In the S1, calculate X l The process is as follows: For the POI hypergraph, a two-stage information propagation aggregation calculation method is used to calculate the intention representation X of the POI v ; The POI locations in the data set are embedded by a shallow neural network, and the input POI locations are mapped into an embedding vector X with a dimension of d through an embedding layer E τ n At the same time, the hyperedge initialization feature is obtained by initializing the hyperedge representation through the following formula ​ where |e v denotes the number of nodes on each hyperedge e E p denotes the number of nodes on each hyperedge e E The hypergraph convolution operation of the two-stage propagation is started, and firstly, the "node-to-hyperedge" process is operated as follows: wherein is a feature transformation matrix, LeakyReLU is used as the activation function, and the coefficients of all nodes in the hyperedge are normalized using the softmax function, X e represents a hyperedge embedding representation; Secondly, the advanced intention information learned along the "hyperedge-to-node" path is propagated to each node, and the node representation is updated by using the global information, so as to enrich the collaborative signal of the high-order user intention contained in the node, and the process is as follows: where E(v) is the set of hyper-edges containing all POI points v, is a feature transformation matrix, LeakyReLU is used as the activation function, and softmax function is used to normalize all hyper-edges containing node v i ; Through N-layer hypergraph convolution calculation, the intention representation of POI place and POI category is obtained preliminarily, and then the two are connected to obtain the preliminary user intention representation X corresponding to the trajectory sequence cv As follows: wherein X c represents an intended representation of the POI category; The importance of each POI in a user trajectory sequence is modeled by using a soft attention mechanism based on reverse position encoding to obtain a location-aware user intention representation X l ; wherein is a feature transformation matrix, is a feature transformation matrix, is a feature transformation matrix, is a bias term, using tanh as the activation function; P t-i+1 denotes the position embedding corresponding to the i-th time step, denotes the intention representation of the last POI, denotes the intention representation corresponding to the i-th POI. In the S1, calculate the spatio-temporal representation e corresponding to each trajectory sequence f The process is as follows: For the time information, the Time2Vector method is used to encode the time in the trajectory sequence, and for the space information, the simple linear method is used, and the two are connected: wherein is a learnable matrix, Time2Vec is a time encoding method, v time is time information, v distance is spatial information, v is a POI, S u is a trajectory sequence; S2: obtaining a final global end representation X globel using a global hypergraph representation learning module Constructing global user interaction hypergraph G g = (V g , E g ), where V g represents the node set of the hypergraph, i.e., the set of check-in locations; and E g is the user's hyperedge set; using the same operating mechanism as γ tra , the user's behavior pattern representation X g is obtained; The G tra According to the time threshold 24 hours, the global time hypergraph representation X is obtained tem ; A global spatial hypergraph is constructed based on spatial threshold, and the spatial distance between two points is calculated by Haversine Formula. When the spatial distance is less than the spatial threshold, it means that the two check-in points are on a hyperedge, thus the global spatial hypergraph G is constructed spa = (V spa , E spa ), where V spa represents the node set of the hypergraph, i.e. the set of check-in points; and E spa is the hyperedge set of the spatial region; using the same operation mechanism as calculating γ tra , the global spatial hypergraph representation X spa of the user is obtained. Finally, the user representation is embedded according to the user ID through an embedding layer Then fused into X g , X tem , X spa and X user to obtain the final global representation X corresponding to each trajectory sequence globel As shown in the formula: wherein, represents an operation of vector concatenation, ω globel learnable weight matrix; S3: Obtain the intention representation X corresponding to each trajectory sequence using the improved diffusion model in the feature optimization module dif ; S4: In the aggregation layer, X dif is added with X globel and X l to obtain the comprehensive representation X final corresponding to each trajectory sequence. S5: X will be learned in the frequency domain learning layer final After conversion to the frequency domain, the sequence representation is obtained. And on Encode to obtain Will As input to the linear prediction layer, the output is the user's next point of interest corresponding to each predicted trajectory sequence. Access time of points of interest and categories of points of interest Compute the loss and according to Update all parameters in the point of interest recommendation model, and when the loss no longer decreases, the optimal point of interest recommendation model is obtained; S6: For a new user, the historical trajectory sequence of the new user is obtained, the historical trajectory sequence of the new user is input into the optimal interest point recommendation model, and the output is the next interest point that the new user is likely to visit, the visit time of the next interest point and the category of the next interest point.

2. The place recommendation method based on hypergraph neural network and diffusion model according to claim 1, characterized in that: In the S1, calculate X f The process is as follows: First, the locations in the dataset are embedded by a shallow neural network, and the embedding matrix is The set of locations of length |V| is embedded into a feature space of dimension d, and the location embedding input to the first layer of the hypergraph neural network is The mechanism of the global hypergraph convolutional network is as follows: wherein represents the place embedding vector of the global short trajectory interaction hypergraph k+1 layer; H tra is the incidence matrix of the hypergraph, is the transpose of H tra , W tra is the hyperedge weight diagonal matrix, D trae is the hyperedge degree matrix, D trav is the node degree matrix, is the place embedding vector of the k layer, is the normalized node degree matrix; To perform the normalization operation, the representation X of the trajectory is obtained tra by accumulating and averaging all the representations of the locations on the hyperedge The user intent representation γ of the trajectory is obtained in the global perspective tra ; Using three learnable weight matrices unlearning the query vector Q, the key vector K, and the value vector V; Q = Drop(LeakyReLu(e f W Q )) (10) K = Drop(LeakyReLu(γ tra W K )) (11) V = Drop(LeakyReLu((ω l X l )W V )) (12) is a learnable weight matrix, and LeakyReLu is an activation function. where d k is a scale parameter of the same value as d τ and σ is a Softmax function.

3. The place recommendation method based on hypergraph neural network and diffusion model according to claim 2, characterized in that: In the S3, calculate X dif The process is as follows: Diffusion stage: First, the local trajectory intention representation X f Feature normalization is performed to obtain The specific implementation is shown in formula (15); where σ(X f ) 2 denotes the variance of X f , μ(X f ) denotes the mean of X f ; A set of diffusion steps is randomly selected Gaussian noise samples are then taken at each diffusion step t and the noisy data is computed Setting representing trainable parameters for performing dimension transformation and as a temporal embedding matrix; the training process during diffusion is as follows: Input: normalized representation Set of diffusion steps s, X globel Neural network f θ ; Output: Diffusion loss Select t from s: 1) computing the dimensionally transformed representation 2) sample a random Gaussian noise ε at diffusion step t t ; 3) Calculate the noise data x at time t by equation (16) t : wherein α t = 1 - β t , x t is the noise data at time t, x0is the normalized representation, β t denotes a noise planning factor for controlling the proportion of noise added in each diffusion step, denotes a cumulative factor from step 1 to step t, I is an identity matrix; 4) Compute the embedding representation e of t t = E T (t); 5) adding and e t to obtain c; 6) by f θ predicting noise at time t 7) Calculate loss by equation (17) wherein is a variational lower bound function, denotes expectation, ε θ denotes predicted noise, is a Gaussian noise at diffusion step t; 8) cyclically performing 2) - 7) until No change; The reverse process is as follows: Output: diffusion steps T, X globel and f θ ; Output: I) computing the dimensionally transformed representation II) a random Gaussian noise ε at the sampling time T T ; III) calculating noise data x at time T T ; Ⅳ) t = T-1,...,1; V) Compute the embedding representation e of t t = E T (t); VI) adding and e t to obtain c; VII) by f θ predicting the noise at time t IX) Calculate x by equation (18) t the mean μ θ (x t ,t) : wherein is the mean, is the variance, and ε represents the noise of the prediction; VIII) a random Gaussian noise ε at the sampling time t t ; X) calculating the data distribution x at time t-1 t-1 = μ θ (x t ,t)+β t ε t ; After the original data is recovered, a feature inverse normalization operation is used to inversely transform the data distribution to the original distribution, as shown in equation (20); the result obtained thereby is the diffusion-enhanced intention representation X fused with global features recovered through diffusion dif ; where is the mean variance, λ as a temperature coefficient is a hyperparameter. is the mean variance, λ as a temperature coefficient is a hyperparameter.

4. The place recommendation method based on hypergraph neural network and diffusion model according to claim 3, characterized in that: In S5, the calculation and is performed as follows: Given learnable matrix Frequency domain learning modeling is: After filtering out the noise in the frequency domain, the sequence representation is obtained Encoding is performed on : wherein and is a learnable weight vector, using GELU Gaussian Error Linear Unit as the activation function, d δ denotes the final sequence representation dimension; where W poi , W time , W cat are parameters that can be learned, b p , b t , b c are corresponding biases.

5. The place recommendation method based on hypergraph neural network and diffusion model according to claim 4, characterized in that: In the S5, the calculation is performed as follows: Wherein, μ is a hyperparameter used to balance the optimization target.

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

Cited By

  • Drug response prediction method based on multi-level interpretable hypergraph neural network

    CN122417472A