Method for recommending next interest point by fusing multi-factor user preferences

By constructing a knowledge graph and a Transformer module, and combining interest points, categories, and regional preferences for modeling, the problem of capturing multiple user preferences in existing technologies is solved, and more accurate recommendations for the next point of interest are achieved.

CN120929663APending Publication Date: 2025-11-11JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511023637.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing next point of interest recommendation algorithms struggle to effectively capture the spatiotemporal shift patterns and deep-seated category preferences inherent in user movement behavior. Especially in cases of sparse data, they fail to comprehensively capture users' multiple preferences, leading to recommendation results that deviate from users' actual needs.

Method used

By constructing a knowledge graph and combining it with the Transformer module, user interest preferences, category preferences, and region preferences are modeled respectively. TransR is used to initialize the vectors of entities and relationships, and the model parameters are optimized through a loss function. Multi-factor user preferences are then integrated for recommendation.

Benefits of technology

It improves the accuracy of next point of interest recommendations, better understands users' multiple preferences, alleviates data sparsity problems, enhances model interpretability, and improves the cold start problem.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929663A_ABST
    Figure CN120929663A_ABST
Patent Text Reader

Abstract

The invention discloses a next interest point recommendation method fusing multi-factor user preferences, and belongs to the technical field of recommendation methods, and the method comprises the following steps: data preprocessing: preprocessing sign-in data; knowledge graph construction: constructing a knowledge graph according to the preprocessed session sequence; embedding a knowledge graph, and performing vector initialization on entities and relationships in the positive example and the negative example; carrying out interest point preference modeling, and adding embedded vectors output through knowledge graph embedding to obtain a vector ei; performing category preference modeling, converting positions into corresponding categories in the sign-in sequence of the user, and further extracting a category sequence; carrying out regional preference modeling, converting the longitude and latitude of the site i into a radian, and converting the radian into a three-dimensional coordinate (x, y, z) on a unit spherical surface; and prediction is carried out, the interest point preference yp, the category preference yc and the region preference ya are connected, and the method has the advantages of relieving data sparseness and cold start, utilizing high-order semantics, improving geographic efficiency, enhancing recommendation accuracy and individuation and being high in expandability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of recommendation methods, specifically to a method for recommending the next point of interest by integrating multiple factors of user preferences. Background Technology

[0002] In recent years, graph-based models have demonstrated powerful modeling capabilities in next point of interest (POI) recommendation tasks. Methods represented by Graph Neural Networks (GNNs) have been widely applied due to their excellent representation capabilities of graph structures. For example, the Adaptive Dynamic Query Graph Neural Network (ADQ-GNN) utilizes GNNs to capture complex interaction relationships between different POIs, while also considering users' short-term and long-term preferences and spatial interests. Based on the dual graph structure analysis of user-POI graphs and POI-POI graphs, researchers use GNNs to model node associations to achieve next location prediction. Furthermore, the Global Spatiotemporal Attention Graph Neural Network (GSTA-GNN) generates global representations of POIs through GNNs to capture general patterns in user check-in behavior; such transfer patterns help model common user behaviors. Building upon graph neural networks, Graph Convolutional Networks (GCNs) introduce convolutional operations, which can efficiently aggregate features from local neighborhood nodes. For example, the Graph Fusion User Context Model (GFUC) uses GCN modules to obtain optimal representations of users and POIs, and combines user social relationships and contextual information to alleviate data sparsity problems. Multichannel Memory Graph Network (MCMG) mines general and specific user preferences through Generative Networks (GCNs); similarly, Multiscale Attention Recurrent Convergence Network (MARAN) extracts regular user movement patterns and short-term preferences from a centralized graph. To better capture continuous changes in user interests, the Point of Interest Graph Differential Equation Model (POIGDE) achieves dynamic interest modeling by solving differential equations on the user interaction behavior graph.

[0003] Historical user check-in data often exhibits uneven spatiotemporal distribution and dynamic changes. Traditional static modeling methods can only capture long-term user preference patterns but cannot effectively identify dynamic behavioral characteristics exhibited at different time periods and geographical locations. Because user activity trajectories are influenced by time factors such as weekdays and holidays, daytime and nighttime, as well as spatial factors such as urban functional area distribution and transportation convenience, simple sequence modeling methods struggle to accurately predict users' real-time movement intentions. While current mainstream methods based on recurrent neural networks can handle time-series data, their predictive performance significantly degrades when faced with sudden changes in user behavior or long-term pattern transitions. Especially in areas with low user access frequency, the sparse check-in data makes it difficult for models to learn meaningful transition patterns.

[0004] User behavior is often influenced by multiple factors simultaneously, making it difficult to fully grasp a user's true intentions using a single-level modeling approach. Traditional recommendation systems typically focus only on user access records to specific points of interest (POIs), neglecting the implicit category semantic information behind these locations, resulting in recommendations lacking a deep understanding of user intent. While current mainstream recommendation algorithms can identify interaction patterns between users and POIs, they cannot effectively distinguish whether a user is attracted by a specific location or stems from a general preference for a certain type of place. Especially in situations with sparse data, single-level modeling often leads to recommendations that deviate from the user's true needs.

[0005] User check-in data in low-frequency access areas is extremely scarce, making it difficult for traditional models to learn effective features. Furthermore, locations within each area often share similar functions or surrounding facilities. Ignoring this rich geographical information may lead to user preferences that deviate from the user's true intent. Current next point of interest (POI) recommendation algorithms often overlook the regional semantic information of POIs, which can enhance model interpretability and alleviate the cold start problem to some extent.

[0006] In research on next-point-of-interest (POI) recommendation systems, traditional methods often struggle to effectively capture the spatiotemporal transition patterns and deep-seated category and region preferences inherent in user movement behavior. While existing recommendation algorithms can mine certain behavioral patterns based on users' historical check-in data, they still have significant shortcomings in handling complex spatiotemporal dynamics and multi-layered user preferences. This is mainly because users' movement decisions are simultaneously influenced by specific location characteristics, category preferences, and region preferences, and existing methods often fail to comprehensively capture information across all dimensions. Existing POI recommendation algorithms, such as those employing recurrent neural networks, self-attention networks, and graph methods, can address issues related to data sparsity and cold-start conditions to some extent, but they still have significant limitations in capturing the dynamic transition relationships between user points of interest and users' category preferences for those points. While recurrent neural networks can handle sequential data, their inherent gradient vanishing problem limits their ability to capture long-distance spatiotemporal dependencies. Self-attention networks perform well in handling long sequences, but lack explicit modeling of geospatial constraints. Graph-based methods can construct relationship networks between users and POIs, but most studies only focus on static associations and fail to effectively incorporate spatiotemporal dynamic features. Summary of the Invention

[0007] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a method for recommending the next point of interest by integrating multiple factors of user preferences, so as to solve the problems in the background technology.

[0008] To achieve the above objectives, the present invention provides the following technical solution:

[0009] A method for recommending the next point of interest by integrating multiple factors of user preferences includes the following steps:

[0010] Step 1: Data preprocessing. The check-in data is preprocessed. First, locations with fewer than 10 visits are removed. Then, each user's check-in record is divided into multiple sessions according to a 24-hour time window.

[0011] Step 2: Knowledge graph construction. A knowledge graph is constructed based on the preprocessed conversation sequence. The constructed knowledge graph consists of check-in triples and spatiotemporal transition triples.

[0012] Step 3: Knowledge Graph Embedding. TransR separates the entity and relation spaces and introduces dynamic projection. It initializes the entities and relations in the positive and negative examples with vectors, projects the entity vectors to the relation space, and calculates the scores for positive and negative examples respectively.

[0013] Step 4: Modeling of interest point preferences, the embedding vectors output from the knowledge graph embedding are summed to obtain vector e. i For each e i Add positional encoding; all 'e's with positional encoding i The vector formed by these vectors serves as the input to the Transformer module, P. u After being input into the Transformer module, the data passes through an attention layer, a feedforward neural network, a normalization operation, and a dropout layer to obtain the user's interest point preference y. p .

[0014] Step 5: Category preference modeling. The user's check-in sequence is converted into corresponding categories. Further category sequences are extracted and embedded. The sequence is initialized with a uniform distribution and randomized. After passing through the Transformer module, the user's category preference y is obtained. c During training, if the model makes an incorrect prediction, the gradient will propagate back to the embedding layer through the loss function, adjusting the values ​​of the corresponding training parameters.

[0015] Step Six: Regional Preference Modeling, assigning latitude and longitude coordinates to location i. Convert to radians radian Convert the coordinates to three-dimensional coordinates (x, y, z) on a unit sphere, calculate the dot product of these coordinates with the normal vector of each face of the icosahedron, select the index f of the face with the largest dot product, and then apply the product to the selected hexagonal face v. w Above, recursively subdivide the hexagonal mesh, using level 5 and the selected hexagonal face number v. wThe sub-hexagonal path (r1, r2, r3, r4, r5) is encoded as a 64-bit integer and represented in hexadecimal, resulting in the region code a of level 5 (H3) for location i. i After embedding the sequence of regions accessed by the user and randomly initializing it, the sequence is input into the Transformer module to obtain the user's region preference y. a ;

[0016] Step 7: Predict the interest point preference y p Category preference y c and regional preferences y a Connect them, perform a softmax operation to obtain the probability distribution of the user visiting the next location. From this, we recommend the top K points of interest that the user is likely to visit.

[0017] As a further aspect of the present invention, the check-in data in step one includes user ID, location ID, latitude and longitude of the location, category of the location, and access time.

[0018] As a further aspect of the present invention, step one includes removing sessions with fewer than 3 check-ins and filtering out users with fewer than 5 sessions.

[0019] As a further embodiment of the present invention, the check-in triplet in step two includes user ID, access time and location ID, and the spatiotemporal transition triplet includes the ID of location 1, the ID of location 2 and the time interval and geographical interval between them.

[0020] As a further aspect of the present invention, the formula for calculating the check-in triplet in step three is as follows:

[0021]

[0022] In the formula e u and e p These represent the user vector and check-in location vector in the check-in time vector r, respectively. t The projection on the surface represents, f represents the calculation of the squared Euclidean distance for positive triples. KG The score is small, and the negative triplet f KG For triples with higher scores, use the following loss function to train them:

[0023]

[0024] In the formula e p′ This indicates that after negative sampling, the tail entity e is randomly replaced. p The resulting negative examples are processed. The parameters are updated using the Adam optimizer, and this process is repeated until the loss converges, outputting the embedding vector e. u rt e p .

[0025] As a further aspect of the present invention, the formula for calculating the spatiotemporal transition triple in step three is as follows:

[0026]

[0027] In the formula and The vectors r represent the spatiotemporal transition relationship between two location vectors visited by the user in sequence. st The projection representation on the surface. Triples are trained using the following loss function:

[0028]

[0029] In the formula This indicates that the tail entity was randomly replaced after negative sampling. For the obtained negative examples, update the parameters using the Adam optimizer, repeat until the loss converges, and output the embedding vector. r st .

[0030] As a further aspect of the present invention, the vector e in step four... i The calculation formula is as follows:

[0031]

[0032] In the formula, D represents the dimension of the embedding vector set in the experiment. n represents the length of a user's check-in trajectory, which is e per unit length. i Add positional encoding; all 'e's with positional encoding i The resulting vector serves as the input to the Transformer module:

[0033]

[0034] P u After being input into the Transformer module, the data passes through an attention layer, a feedforward neural network, a normalization operation, and a dropout layer to obtain the user's interest point preference y. p ;

[0035] First, the embedding vector undergoes an attention mechanism to output...

[0036]

[0037] After the Dropout layer and normalization operation, the result is the output that will be input into the feedforward neural network.

[0038]

[0039] The user's interest preferences (y) are obtained through a feedforward neural network and a Dropout layer. p :

[0040]

[0041] In the formula Z Q Z K Z V These are the Query, Key, and Value matrices in the attention mechanism, and softmax is the activation function.

[0042] As a further aspect of the present invention, the category embedding vector C obtained by the embedding operation in step five... u As input to the Transformer module:

[0043]

[0044] Similar to the computation process of the Transformer module in interest point preference modeling, the class embedding vectors undergo an attention mechanism to output...

[0045]

[0046] After the Dropout layer and normalization operation, the result is the output that will be input into the feedforward neural network.

[0047]

[0048] User category preference y is obtained after passing through a feedforward neural network and a Dropout layer. c :

[0049]

[0050] As a further aspect of the present invention, in step six, the region encoding a i The calculation formula is:

[0051]

[0052] In the formula, λ is the longitude. The specific calculation steps for region H3, based on latitude, are as follows:

[0053] (1) Determine the latitude and longitude of location i Convert to radians radian Transform into three-dimensional coordinates (x, y, z) on a unit sphere:

[0054]

[0055] (2) Calculate the dot product of the three-dimensional coordinates (x, y, z) with the normal vector of each face of the icosahedron, and select the face index f with the largest dot product. The predefined data of the icosahedron is the normal vector coordinates of the 20 faces.

[0056] f = argmax i∈{0,1,…,19} (v i ·(x,y,z)) (18)

[0057] In the formula v i Let f be the normal vector of the i-th face, f be the maximum value among the 20 calculated results, and the corresponding hexagonal face is the selected face with face number v. w ;

[0058] (3) On the selected hexagonal surface v w The process recursively subdivides the hexagonal mesh, dividing each hexagon into 7 sub-hexagons: a central hexagon and 6 surrounding sub-hexagons. The directional angle of the 3D coordinates (x, y, z) of location i relative to the central hexagon is calculated, indicating which sub-hexagon it points to. This pointed sub-hexagon is then used as the new selected hexagonal face. Since there are 5 levels, this process is repeated five times, ultimately resulting in the selected hexagonal face v. w On the hexagonal surface v w The path (r1, r2, r3, r4, r5) of the selected sub-hexagon is chosen. Where r... i (i = 1, 2, ..., 5) represents the index of the selected sub-hexagon at each level, r i ∈{1,2,…,6};

[0059] (4) Select the hexagon face number v at level 5. w The sub-hexagonal path (r1, r2, r3, r4, r5) is encoded as a 64-bit integer and represented in hexadecimal for storage and transmission, resulting in the level 5 region code a of H3 to which location i belongs. i ;

[0060] At this point, the user's region sequence can be obtained based on the user's location check-in sequence:

[0061]

[0062] The region sequence is embedded to obtain a region embedding vector, which is then used as input to the Transformer module to obtain the region preference y. a .

[0063] As a further aspect of the present invention, the probability distribution in step seven... The calculation formula is:

[0064]

[0065] In the formula W p The weight matrix is ​​used, and the recommendation model is optimized using the Adam optimizer. The loss function of the recommendation model is L. POI as follows:

[0066]

[0067] The total loss is L, which is the loss during knowledge graph training. KG The loss L during recommendation model training POI Add:

[0068] L loss =L KG +L POI (twenty two)

[0069]

[0070] In summary, the embodiments of the present invention have the following beneficial effects compared with the prior art:

[0071] Location-based social networks (LBSNs) acquire users' geographic location data through mobile device positioning technologies (such as GPS, Wi-Fi, etc.) and combine it with social functions to provide users with location-based sharing, interaction, and services. They solve the problem of extracting the spatiotemporal transfer relationship between points of interest and model user preferences from three aspects: fine-grained point of interest preferences, higher-level point of interest category preferences, and point of interest region preferences, for more accurate next point of interest recommendations.

[0072] To more clearly illustrate the structural features and effects of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. Attached Figure Description

[0073] Figure 1 This is a flowchart illustrating an embodiment of the invention.

[0074] Figure 2 This is a diagram illustrating the data preprocessing process in an embodiment of the invention.

[0075] Figure 3 This is a flowchart illustrating the knowledge graph construction process in an embodiment of the invention.

[0076] Figure 4 This is a flowchart illustrating the knowledge graph embedding process in an embodiment of the invention.

[0077] Figure 5 This is a flowchart illustrating the interest point preference modeling process in an embodiment of the invention.

[0078] Figure 6This is a flowchart illustrating the category preference modeling process in an embodiment of the invention.

[0079] Figure 7 This is a flowchart illustrating the regional preference modeling process in an embodiment of the invention.

[0080] Figure 8 This is a subdivided hexagonal grid diagram in an embodiment of the invention.

[0081] Figure 9 This is a flowchart illustrating the prediction process in an embodiment of the invention.

[0082] Figure 10 This is a performance comparison chart of eight algorithms on the NYC dataset in the embodiments of the invention.

[0083] Figure 11 This is a performance comparison chart of eight algorithms on the TKY dataset in the embodiments of the invention. Detailed Implementation

[0084] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0085] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.

[0086] In one embodiment, a next point of interest recommendation method that integrates multiple factors of user preferences is described in [reference needed]. Figures 1 to 11 This includes the following steps:

[0087] Step 1: Data preprocessing. The check-in data is preprocessed. First, locations with fewer than 10 visits are removed. Then, each user's check-in record is divided into multiple sessions according to a 24-hour time window.

[0088] Step 2: Knowledge graph construction. A knowledge graph is constructed based on the preprocessed conversation sequence. The constructed knowledge graph consists of check-in triples and spatiotemporal transition triples.

[0089] Step 3: Knowledge Graph Embedding. TransR separates the entity and relation spaces and introduces dynamic projection. It initializes the entities and relations in the positive and negative examples with vectors, projects the entity vectors to the relation space, and calculates the scores for positive and negative examples respectively.

[0090] Step 4: Modeling of interest point preferences, the embedding vectors output from the knowledge graph embedding are summed to obtain vector e. i For each e i Add positional encoding; all 'e's with positional encoding i The vector formed by these vectors serves as the input to the Transformer module, P.u After being input into the Transformer module, the data passes through an attention layer, a feedforward neural network, a normalization operation, and a dropout layer to obtain the user's interest point preference y. p .

[0091] Step 5: Category preference modeling. The user's check-in sequence is converted into corresponding categories. Further category sequences are extracted and embedded. The sequence is initialized with a uniform distribution and randomized. After passing through the Transformer module, the user's category preference y is obtained. c During training, if the model makes an incorrect prediction, the gradient will propagate back to the embedding layer through the loss function, adjusting the values ​​of the corresponding training parameters.

[0092] Step Six: Regional Preference Modeling, assigning latitude and longitude coordinates to location i. Convert to radians radian Convert the coordinates to three-dimensional coordinates (x, y, z) on a unit sphere, calculate the dot product of these coordinates with the normal vector of each face of the icosahedron, select the index f of the face with the largest dot product, and then apply the product to the selected hexagonal face v. w Above, recursively subdivide the hexagonal mesh, using level 5 and the selected hexagonal face number v. w The sub-hexagonal path (r1, r2, r3, r4, r5) is encoded as a 64-bit integer and represented in hexadecimal, resulting in the region code a of level 5 (H3) for location i. i After embedding the sequence of regions accessed by the user and randomly initializing it, the sequence is input into the Transformer module to obtain the user's region preference y. a ;

[0093] Step 7: Predict the interest point preference y p Category preference y c and regional preferences y a Connect them, perform a softmax operation to obtain the probability distribution of the user visiting the next location. From this, we recommend the top K points of interest that the user is likely to visit.

[0094] Further, see Figures 1 to 11 The check-in data in step one includes user ID, location ID, latitude and longitude of the location, category of the location, and access time.

[0095] Further, see Figures 1 to 11 The first step of the process involves removing sessions with fewer than 3 check-ins and filtering out users with fewer than 5 sessions.

[0096] Further, see Figures 1 to 11The check-in triplet in step two includes user ID, access time, and location ID. The spatiotemporal transition triplet includes the ID of location 1, the ID of location 2, and the time interval and geographical interval between them.

[0097] Further, see Figures 1 to 11 The formula for calculating the check-in triplet in step three is as follows:

[0098]

[0099] In the formula e u and e p These represent the user vector and check-in location vector in the check-in time vector r, respectively. t The projection on the surface represents, f represents the calculation of the squared Euclidean distance for positive triples. KG The score is small, and the negative triplet f KG For triples with higher scores, use the following loss function to train them:

[0100]

[0101] In the formula e p′ This indicates that after negative sampling, the tail entity e is randomly replaced. p The resulting negative examples are processed. The parameters are updated using the Adam optimizer, and this process is repeated until the loss converges, outputting the embedding vector e. u r t e p .

[0102] Further, see Figures 1 to 11 The formula for calculating the spatiotemporal transition triple in step three is as follows:

[0103]

[0104] In the formula and The vectors r represent the spatiotemporal transition relationship between two location vectors visited by the user in sequence. st The projection representation on the surface. Triples are trained using the following loss function:

[0105]

[0106] In the formula This indicates that the tail entity was randomly replaced after negative sampling. For the obtained negative examples, update the parameters using the Adam optimizer, repeat until the loss converges, and output the embedding vector. r st .

[0107] Further, see Figures 1 to 11 The vector e in step fouri The calculation formula is as follows:

[0108]

[0109] In the formula, D represents the dimension of the embedding vector set in the experiment. n represents the length of a user's check-in trajectory, which is e per unit length. i Add positional encoding; all 'e's with positional encoding i The resulting vector serves as the input to the Transformer module:

[0110]

[0111] P u After being input into the Transformer module, the data passes through an attention layer, a feedforward neural network, a normalization operation, and a dropout layer to obtain the user's interest point preference y. p ;

[0112] First, the embedding vector undergoes an attention mechanism to output...

[0113]

[0114] After the Dropout layer and normalization operation, the result is the output that will be input into the feedforward neural network.

[0115]

[0116] The user's interest preferences (y) are obtained through a feedforward neural network and a Dropout layer. p :

[0117]

[0118] In the formula Z Q Z K Z V These are the Query, Key, and Value matrices in the attention mechanism, and softmax is the activation function.

[0119] Further, see Figures 1 to 11 The category embedding vector C obtained by the embedding operation in step five u As input to the Transformer module:

[0120]

[0121] Similar to the computation process of the Transformer module in interest point preference modeling, the class embedding vectors undergo an attention mechanism to output...

[0122]

[0123] After the Dropout layer and normalization operation, the result is the output that will be input into the feedforward neural network.

[0124]

[0125] User category preference y is obtained after passing through a feedforward neural network and a Dropout layer. c :

[0126]

[0127] Further, see Figures 1 to 11 In step six, the region encoding a i The calculation formula is:

[0128]

[0129] In the formula, λ is the longitude. The specific calculation steps for region H3, based on latitude, are as follows:

[0130] (1) Determine the latitude and longitude of location i Convert to radians radian Convert to three-dimensional coordinates (x, y, z) on a unit sphere:

[0131]

[0132] (2) Calculate the dot product of the three-dimensional coordinates (x, y, z) with the normal vector of each face of the icosahedron, and select the face index f with the largest dot product. The predefined data of the icosahedron is the normal vector coordinates of the 20 faces.

[0133] f = argmax i∈{0,1,…,19} (v i ·(x,y,z)) (18)

[0134] In the formula v i Let f be the normal vector of the i-th face, f be the maximum value among the 20 calculated results, and the corresponding hexagonal face is the selected face with face number v. w ;

[0135] (3) On the selected hexagonal surface v wThe process recursively subdivides the hexagonal mesh, dividing each hexagon into 7 sub-hexagons: a central hexagon and 6 surrounding sub-hexagons. The directional angle of the 3D coordinates (x, y, z) of location i relative to the central hexagon is calculated, indicating which sub-hexagon it points to. This pointed sub-hexagon is then used as the new selected hexagonal face. Since there are 5 levels, this process is repeated five times, ultimately resulting in the selected hexagonal face v. w On the hexagonal surface v w The path (r1, r2, r3, r4, r5) of the selected sub-hexagon is chosen. Where r... i (i = 1, 2, ..., 5) represents the index of the selected sub-hexagon at each level, r i ∈{1,2,…,6};

[0136] (4) Select the hexagon face number v at level 5. w The sub-hexagonal path (r1, r2, r3, r4, r5) is encoded as a 64-bit integer and represented in hexadecimal for storage and transmission, resulting in the level 5 region code a of H3 to which location i belongs. i ;

[0137] At this point, the user's region sequence can be obtained based on the user's location check-in sequence:

[0138]

[0139] The region sequence is embedded to obtain a region embedding vector, which is then used as input to the Transformer module to obtain the region preference y. a .

[0140] Further, see Figures 1 to 11 The probability distribution in step seven The calculation formula is:

[0141]

[0142] In the formula W p The weight matrix is ​​used, and the recommendation model is optimized using the Adam optimizer. The loss function of the recommendation model is L. POI as follows:

[0143]

[0144] The total loss is L, which is the loss during knowledge graph training. KG The loss L during recommendation model training POI Add:

[0145] L loss =L KG +L POI (twenty two)

[0146]

[0147] In this embodiment, the overall flowchart is as follows: Figure 1 As shown.

[0148] 1. Data Preprocessing

[0149] Data preprocessing process such as Figure 2 As shown. Each user's check-in data includes user ID, location ID, location latitude and longitude, location category, and access time. The check-in data is preprocessed. First, locations with fewer than 10 visits are removed. Then, each user's check-in record is divided into multiple sessions according to a 24-hour time window. Sessions with fewer than 3 check-ins are removed, and users with fewer than 5 sessions are filtered out.

[0150] 2 Knowledge Graph Construction

[0151] The knowledge graph construction process is as follows Figure 3 As shown, a knowledge graph is constructed based on the preprocessed session sequence. The constructed knowledge graph consists of two types of triples: check-in triples (user ID, access time, location ID), indicating that a user accesses a location at a certain time; and spatiotemporal transition triples (location 1 ID, (time interval, geographical interval), location 2 ID), indicating the time required for a user to move from location 1 to location 2 and the distance traveled. The time interval is represented by the difference in access time between the two locations, and the geographical interval is obtained by calculating the Euclidean distance using the latitude and longitude values ​​of the two locations.

[0152] 3. Knowledge Graph Embedding

[0153] The process of embedding knowledge graphs using the TransR method is as follows: Figure 4 As shown, TransR significantly improves the semantic expressiveness of knowledge graph embedding by separating the entity and relation spaces and introducing dynamic projection. Triples in the knowledge graph (KG) are positive examples, and these triples are negatively sampled (randomly replacing the tail entity) to obtain negative examples. Vectors are initialized for the entities and relations in both positive and negative examples, and the entity vectors are projected onto the relation space. The scores for positive and negative examples are calculated separately using the following formulas:

[0154] (1) Check-in Trio:

[0155]

[0156] In the formula e u and e p These represent the user vector and check-in location vector in the check-in time vector r, respectively. t The projection on the surface represents, This represents the calculation of the squared Euclidean distance (L2 norm squared). The positive triplet f KG The score is small, and the negative triplet f KG The score is relatively high. The triplet is trained using the following loss function:

[0157]

[0158] In the formula e p′ This indicates that after negative sampling, the tail entity e is randomly replaced. p The resulting negative examples are processed. The parameters are updated using the Adam optimizer, and this process is repeated until the loss converges, outputting the embedding vector e. u (User embedding vector), r t (Check-in time embedding vector), e p (Check-in location embedding vector).

[0159] (2) Spatiotemporal transition triples:

[0160]

[0161] In the formula and The vectors r represent the spatiotemporal transition relationship between two location vectors visited by the user in sequence. st The projection representation on the surface. Triples are trained using the following loss function:

[0162]

[0163] In the formula This indicates that the tail entity was randomly replaced after negative sampling. The resulting negative examples are processed. The parameters are updated using the Adam optimizer, and this process is repeated until the loss converges, outputting the embedding vector. (Embedded vectors of check-in locations visited sequentially by the user), r st (Spatiotemporal transition embedding vector).

[0164] 4. Interest Point Preference Modeling

[0165] The process of modeling user interest preferences is as follows: Figure 5 As shown. The embedding vector (user embedding vector e) output after knowledge graph embedding is... u , sign-in time embedding vector r t , Check-in location embedding vector e p Spatiotemporal transition embedding vector r st Adding them together yields vector e. i :

[0166]

[0167] In the formula, D represents the dimension of the embedding vector set in the experiment. n represents the length of a user's check-in trajectory. For each e... i Add positional encoding; all 'e's with positional encoding i The resulting vector serves as the input to the Transformer module:

[0168]

[0169] P u After inputting into the Transformer module, the data passes through an attention layer, a feedforward neural network (FFN), a normalization operation (LayerNorm), and a dropout layer to obtain the user's interest point preference y. p .

[0170] First, the embedding vector undergoes an attention mechanism to output...

[0171]

[0172] After the Dropout layer and normalization operation, the result is the output that will be input into the feedforward neural network.

[0173]

[0174] The user's interest preferences (y) are obtained through a feedforward neural network and a Dropout layer. p :

[0175]

[0176] In the formula Z Q Z K Z V These represent the Query, Key, and Value matrices in the attention mechanism, with softmax being the activation function. Dropout layers are a regularization technique to prevent overfitting in deep neural networks; they increase the model's generalization ability by randomly shutting down some neurons during training.

[0177] 5-category preference modeling

[0178] The process of class preference modeling is as follows Figure 6 As shown. From the user's check-in sequence, the location is converted into the corresponding category, further extracting the category sequence and performing embedding operations. Uniformly distributed random initialization is used, and backpropagation optimization is performed during training (during training, if the model predicts incorrectly, the gradient will backpropagate to the embedding layer through the loss function, adjusting the values ​​of the corresponding trainable parameters). The obtained category embedding vector C uAs input to the Transformer module:

[0179]

[0180] Similar to the computation process of the Transformer module in interest point preference modeling, the class embedding vectors undergo an attention mechanism to output...

[0181]

[0182] After the Dropout layer and normalization operation, the result is the output that will be input into the feedforward neural network.

[0183]

[0184] User category preference y is obtained after passing through a feedforward neural network and a Dropout layer. c :

[0185]

[0186] 6. Regional Preference Modeling

[0187] The process of regional preference modeling is as follows Figure 7 As shown. The latitude and longitude values ​​of location i are used. The root region partitioning algorithm H3 calculates the region code a of level 5 in H3 to which location i belongs. i :

[0188]

[0189] In the formula, λ is the longitude. The latitude is used. The specific calculation steps for region division H3() are as follows:

[0190] (1) Determine the latitude and longitude of location i Convert to radians radian Transform into three-dimensional coordinates (x, y, z) on a unit sphere:

[0191]

[0192] (2) Calculate the dot product of the three-dimensional coordinates (x, y, z) with the normal vectors of each face of the icosahedron, and select the face index f with the largest dot product. The predefined data of the icosahedron consists of the normal vector coordinates of the 20 faces, which can be obtained by looking up a table.

[0193] f = argmax i∈{0,1,…,19} (v i ·(x,y,z)) (18)

[0194] In the formula v i Let f be the normal vector of the i-th face, f be the maximum value among the 20 calculated results, and the corresponding hexagonal face is the selected face with face number v. w .

[0195] (3) On the selected hexagonal surface v w Above, recursively subdivide the hexagonal grid. Subdivision rule: Each hexagon is divided into 7 sub-hexagons, a central hexagon and 6 surrounding sub-hexagons (e.g., ...). Figure 7 (As shown). Calculate the directional angle of the three-dimensional coordinates (x, y, z) of location i relative to the central hexagon, i.e., which sub-hexagon it points to (index 1-6). Repeat the above operation with the pointed-to sub-hexagon as the new selected hexagonal face. Since the level is 5, the above steps will be repeated five times. Finally, we obtain: the selected hexagonal face v. w On the hexagonal surface v w The path (r1, r2, r3, r4, r5) of the selected sub-hexagon is chosen. Where r... i (i = 1, 2, ..., 5) represents the index of the selected sub-hexagon at each level, r i ∈{1,2,…,6}. A subdivided hexagonal mesh diagram is shown below. Figure 8 As shown.

[0196] (4) Select the hexagon face number v at level 5. w The sub-hexagonal path (r1, r2, r3, r4, r5) is encoded as a 64-bit integer and represented in hexadecimal for storage and transmission, resulting in the level 5 region code a of H3 to which location i belongs. i .

[0197] At this point, the user's region sequence can be obtained based on the user's location check-in sequence:

[0198]

[0199] The region sequences are embedded to obtain region embedding vectors, which are then used as input to the Transformer module. The specific method is similar to that used to calculate class preferences. The resulting γ'(x) is the region preference y. a .

[0200] 7 Predictions

[0201] Prediction process as follows Figure 9 As shown. The interest point preference y p Category preference y c and regional preferences y a Connect them, perform a softmax operation to obtain the probability distribution of the user visiting the next location. From this, we recommend the top K points of interest that the user is likely to visit.

[0202]

[0203] In the formula W p The weight matrix is ​​used, and the recommendation model is also optimized using the Adam optimizer. The loss function of the recommendation model is L. POI as follows:

[0204]

[0205] The total loss is L, which is the loss during knowledge graph training. KG The loss L during recommendation model training POI Add:

[0206] L loss =L KG +L POI (twenty two)

[0207]

[0208] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for recommending the next point of interest by integrating multiple factors of user preferences, characterized in that, Includes the following steps: Step 1: Data preprocessing. The check-in data is preprocessed. First, locations with fewer than 10 visits are removed. Then, each user's check-in record is divided into multiple sessions according to a 24-hour time window. Step 2: Knowledge graph construction. A knowledge graph is constructed based on the preprocessed conversation sequence. The constructed knowledge graph consists of check-in triples and spatiotemporal transition triples. Step 3: Knowledge Graph Embedding. TransR separates the entity and relation spaces and introduces dynamic projection. It initializes the entities and relations in the positive and negative examples with vectors, projects the entity vectors to the relation space, and calculates the scores for positive and negative examples respectively. Step 4: Modeling of interest point preferences, the embedding vectors output from the knowledge graph embedding are summed to obtain vector e. i For each e i Add positional encoding; all 'e's with positional encoding i The vector formed by these vectors serves as the input to the Transformer module, P. u After being input into the Transformer module, the data passes through an attention layer, a feedforward neural network, a normalization operation, and a dropout layer to obtain the user's interest point preference y. p ; Step 5: Category preference modeling. The user's check-in sequence is converted into corresponding categories. Further category sequences are extracted and embedded. The sequence is initialized with a uniform distribution and randomized. After passing through the Transformer module, the user's category preference y is obtained. c During training, if the model makes an incorrect prediction, the gradient will propagate back to the embedding layer through the loss function, adjusting the values ​​of the corresponding training parameters. Step Six: Regional Preference Modeling, assigning latitude and longitude coordinates to location i. Convert to radians radian Convert the coordinates to three-dimensional coordinates (x, y, z) on a unit sphere, calculate the dot product of these coordinates with the normal vector of each face of the icosahedron, select the index f of the face with the largest dot product, and then apply the product to the selected hexagonal face v. w Above, recursively subdivide the hexagonal mesh, using level 5 and the selected hexagonal face number v. w The sub-hexagonal path (r1, r2, r3, r4, r5) is encoded as a 64-bit integer and represented in hexadecimal, resulting in the region code a of level 5 (H3) for location i. i The sequence of regions accessed by the user is embedded and input into the Transformer module to obtain the user's region preference y. a ; Step 7: Predict the interest point preference y p Category preference y c and regional preferences y a Connect them, perform a softmax operation to obtain the probability distribution of the user visiting the next location. From this, we recommend the top K points of interest that the user is likely to visit.

2. The next point of interest recommendation method based on multi-factor user preferences according to claim 1, characterized in that, The check-in data in step one includes user ID, location ID, latitude and longitude of the location, category of the location, and access time.

3. The next point of interest recommendation method based on multi-factor user preferences according to claim 2, characterized in that, The removal process in step one includes sessions with fewer than 3 check-ins and filtering out users with fewer than 5 sessions.

4. The next point of interest recommendation method based on multi-factor user preferences according to claim 1, characterized in that, The check-in triplet in step two includes the user ID, access time, and location ID. The spatiotemporal transition triplet includes the ID of location 1, the ID of location 2, and the time interval and geographical interval between them.

5. The next point of interest recommendation method based on multi-factor user preferences according to claim 1, characterized in that, The formula for calculating the check-in triplet in step three is as follows: In the formula e u and e p These represent the user vector and check-in location vector in the check-in time vector r, respectively. t The projection on the surface represents, f represents the calculation of the squared Euclidean distance for positive triples. KG The score is relatively small, and the negative triplet f KG For triples with higher scores, use the following loss function to train them: In the formula e p′ This indicates that after negative sampling, the tail entity e is randomly replaced. p For the obtained negative examples, update the parameters using the Adam optimizer, repeating this process until the loss converges, and outputting the embedding vector e. u r t e p .

6. The next point of interest recommendation method based on multi-factor user preferences according to claim 5, characterized in that, The formula for calculating the spatiotemporal transition triplet in step three is as follows: In the formula and The vectors r represent the spatiotemporal transition relationship between two location vectors visited by the user in sequence. st The projection representation on the vector is used to train triples using the following loss function: In the formula This indicates that the tail entity was randomly replaced after negative sampling. For the negative examples obtained, update the parameters using the Adam optimizer, repeat until the loss converges, and output the embedding vector.

7. The next point of interest recommendation method based on multi-factor user preferences according to claim 1, characterized in that, The vector e in step four i The calculation formula is as follows: In the formula, D represents the dimension of the embedding vector set in the experiment, n represents the length of a user's check-in trajectory, and e is the length of each e i Add positional encoding; all 'e's with positional encoding i The resulting vector serves as the input to the Transformer module: P u After being input into the Transformer module, the data passes through an attention layer, a feedforward neural network, a normalization operation, and a dropout layer to obtain the user's interest point preference y. p ; First, the embedding vector undergoes an attention mechanism to output... After the Dropout layer and normalization operation, the result is the output that will be input into the feedforward neural network. The user's interest preferences (y) are obtained through a feedforward neural network and a Dropout layer. p : In the formula Z Q Z K Z V These are the Query, Key, and Value matrices in the attention mechanism, and softmax is the activation function.

8. The next point of interest recommendation method based on multi-factor user preferences according to claim 1, characterized in that, The class embedding vector C obtained in step five is u As input to the Transformer module: Similar to the computation process of the Transformer module in interest point preference modeling, the class embedding vectors undergo an attention mechanism to output... After the Dropout layer and normalization operation, the result is the output that will be input into the feedforward neural network. User category preference y is obtained after passing through a feedforward neural network and a Dropout layer. c :

9. The next point of interest recommendation method based on multi-factor user preferences according to claim 1, characterized in that, In step six, the region encoding a i The calculation formula is: In the formula, λ is the longitude. The specific calculation steps for region H3, based on latitude, are as follows: (1) Determine the latitude and longitude of location i Convert to radians radian Convert to three-dimensional coordinates (x, y, z) on a unit sphere: (2) Calculate the dot product of the three-dimensional coordinates (x, y, z) with the normal vector of each face of the icosahedron, and select the face index f with the largest dot product. The predefined data of the icosahedron is the normal vector coordinates of the 20 faces. f=argmax i∈{0,1,…,19} (v i ·(x,y,z)) (18) In the formula v i Let f be the normal vector of the i-th face, f be the maximum value among the 20 calculated results, and the corresponding hexagonal face is the selected face with face number v. w ; (3) On the selected hexagonal surface v w The process recursively subdivides the hexagonal mesh, dividing each hexagon into 7 sub-hexagons: a central hexagon and 6 surrounding sub-hexagons. The directional angle of the 3D coordinates (x, y, z) of location i relative to the central hexagon is calculated, indicating which sub-hexagon it points to. This pointed sub-hexagon is then used as the new selected hexagonal face. Since there are 5 levels, this process is repeated five times, ultimately resulting in the selected hexagonal face v. w On the hexagonal surface v w The path (r1, r2, r3, r4, r5) of the selected sub-hexagon is given, where r i (i = 1, 2, ..., 5) represents the index of the selected sub-hexagon at each level, r i ∈{1,2,…,6}; (4) Select the hexagon face number v at level 5. w The sub-hexagonal path (r1, r2, r3, r4, r5) is encoded as a 64-bit integer and represented in hexadecimal for storage and transmission, resulting in the level 5 region code a of H3 to which location i belongs. i ; At this point, the user's region sequence can be obtained based on the user's location check-in sequence: The region sequence is embedded to obtain a region embedding vector, which is then used as input to the Transformer module to obtain the region preference y. a .

10. The next point of interest recommendation method based on multi-factor user preferences according to claim 1, characterized in that, The probability distribution in step seven The calculation formula is: In the formula W p The weight matrix is ​​used, and the recommendation model is optimized using the Adam optimizer. The loss function of the recommendation model is L. POI as follows: The total loss is L, which is the loss during knowledge graph training. KG The loss L during recommendation model training POI Add: L loss L KG +L POI (22)