Interest point recommendation method based on knowledge graph

By constructing a multi-level interest knowledge graph and using graph attention mechanism model in a location-based social network, combining the graph translation model and geographic information gating graph neural network, the data sparse and cold start problems in interest recommendation are solved, and the problem of data sparseness and cold start is improved. Recommended accuracy.

CN119226599APending Publication Date: 2024-12-31YANGTZE DELTA REGION INST OF UNIV OF ELECTRONICS SCI & TECH OF CHINE (HUZHOU)

Patent Information

Application Number
CN202410809536.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In the prior art, in the location-based social network, there are sparse data and cold start problems in point-of-interest recommendations, making it difficult to effectively utilize context information, resulting in low recommendation accuracy.

Method used

Using the knowledge graph-based interest point recommendation method, by obtaining user check-in data, building a multi-level interest point knowledge graph, using a graph translation model and a geographic information gated graph neural network, combining the graph attention mechanism model, integrating user social, geography and Space-time characteristics, recommendations for points of interest.

Benefits of technology

It improves the accuracy of point-of-interest recommendations, alleviates data sparsity and cold start problems, and improves the performance of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226599A_ABST
    Figure CN119226599A_ABST
Patent Text Reader

Abstract

The invention discloses an interest point recommendation method based on a knowledge graph, and relates to the technical field of computers, and the method comprises the following steps: obtaining user sign-in data to obtain user information, respectively dividing according to interest points and time to obtain interest areas and a plurality of time slots, calculating user similarity, and performing spectral clustering according to the user similarity to obtain user groups, and according to the user group, the time slot and the region of interest, constructing a multi-level point-of-interest knowledge graph fused with context information. Preliminarily learning an interest point knowledge graph based on a graph translation model to obtain an embedded vector, and using a gating graph neural network introduced with geographic information for a plurality of sign-in sequences to obtain interest point representation with spatio-temporal characteristics; through the graph attention mechanism model, the sign-in relation with user group features and interest area features is fused, user preferences are spread, possible interest point preferences of a single user are mined and predicted, user requirements can be more effectively met, and a more highly personalized recommendation service is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method for recommending points of interest based on a knowledge graph. Background Art

[0002] With the rapid development of mobile technology and social media platforms, location-based social networks have penetrated into many aspects of human social life. In the location-based social network environment, users frequently share their personal life in real time through various forms such as geographic location, text, images, videos, etc., which generates a large amount of interactive information between users and locations, such as the user's check-in time, location and category, etc., which together constitute the social network check-in data containing rich multidimensional information. Points of interest are geographical entities that can be abstracted as geographic coordinate points, such as restaurants, hotels, parks, etc. Points of interest recommendation is a hot topic in the current research field of recommendation systems. In real life scenarios, people inevitably face the choice of things. For data providers, how to enable users to quickly obtain valuable information from massive resources will provide huge economic benefits to service providers. For users, being able to find the information they want to obtain in a timely manner can increase the efficiency of users' lives. Points of interest recommendation analyzes user behavior and efficiently filters the massive geographic information data in location-based social networks, effectively helping users filter out a large amount of non-target information, thereby significantly reducing users' selection costs and improving life efficiency.

[0003] Context-Aware Point-of-Interest Recommendation Based on Similar User Clustering and Tensor Factorization mentions a method for calculating user similarity. Different from this paper, this method has significant differences in principle and core innovation. In principle, this method uses graph neural networks in the field of deep learning, knowledge graphs, graph translation embedding technology, etc. to complete the recommendation, which is different from the matrix decomposition technology used in the paper. In addition, this method improves the user clustering process, introduces spectral clustering and other clustering methods suitable for graph data, obtains similar user groups, simplifies the calculation logic, and is different from the similar user clustering method used in the paper.

[0004] In general, after acquiring data such as similar user groups, time slots, and interest point areas, this method proposes and constructs a knowledge graph of interest points. On this basis, it completes the knowledge graph translation embedding, builds a deep learning graph neural network, and finally completes the recommendation. Different from the literature that uses similar user groups, time slots and other results to construct tensor information, this method directly performs tensor decomposition to obtain recommendation results.

[0005] Compared with traditional recommendation tasks, location-based social networks involve user behavior data and check-in data with different representation forms. Data collected from well-known foreign LBSN platforms Foursqure and Yelp show that LBSN contains a large number of user nodes and location nodes, which show significant mutual correlation between users, between users and places, and between places. In this context, knowledge graph (KG) has been proven to be an effective way to accurately characterize the correlation between these data. Knowledge graph relies on entities, attributes, and relationships to depict the correlation between nodes. As a graphical expression, knowledge graph can express the correlation of entities in a clear way based on node attributes and node relationships. Combining knowledge graph with recommendation methods is conducive to deep mining of information between users and points of interest, and improving the data sparsity and cold start problems commonly found in recommendation systems. Points of interest recommendation based on knowledge graphs uses the complex relationships between users, users and points of interest, and points of interest to further enhance the semantic information of data and improve the accuracy of recommendations.

[0006] Therefore, there is an urgent need for a POI recommendation method based on knowledge graph to improve the accuracy of recommendation. Summary of the invention

[0007] To solve the above problems, the present application provides a method for recommending points of interest based on a knowledge graph, comprising the following steps: S1, obtaining user check-in data, analyzing the user check-in data to obtain user personal information, user social information, user point of interest information, user context information and user spatiotemporal information, wherein the spatiotemporal information includes region and time;

[0008] S2. Divide the region according to the points of interest to obtain the region of interest, and organize the region of interest to obtain the region of interest node R i , according to the time division, several time slots are obtained, several sign-in sequences are constructed in several time slots, user similarity is calculated, spectral clustering is performed according to user similarity to obtain user groups, and user groups are sorted to obtain user group nodes U i ;

[0009] S3, construct a multi-level knowledge graph of points of interest that integrates contextual information based on user groups, time slots, and interest areas;

[0010] S4. Preliminary learning of the POI knowledge graph based on the graph translation model to obtain user embedding vector representation, POI embedding inward representation, and relationship embedding vector representation;

[0011] S5, constructing a gated graph neural network that introduces geographic information, and sequentially applying the gated graph neural network that introduces geographic information to several check-in sequences to obtain a representation of points of interest with spatiotemporal characteristics;

[0012] S6. Through the graph attention mechanism model GraphAttentionNetwork, GAT, the check-in relationship with user group characteristics and interest area characteristics is integrated to propagate all user preferences on social network relationships, and to mine and predict the possible interest point preferences of a single user.

[0013] Preferably, in S2, the specific method of dividing the region according to the interest points to obtain the interest region includes:

[0014] Based on the Euler distance function of longitude and latitude, the geographical correlation between points of interest is calculated, and spatial clustering is performed to obtain several regions of interest (ROI).

[0015] Among them, the expression for calculating the geographical correlation between points of interest is:

[0016]

[0017] Among them, p i =(x i ,y i ) is the geographic location coordinates of the point of interest i, p j =(x i ,y i ) is the geographical location coordinate of interest point j, k(i,j) is the geographical correlation between interest point i and interest point j;

[0018] Determine the number of clusters c, that is, divide the interest point set P into c ROIs, that is, P = {R1, R2, R3, ..., R c}, where R1, R2, R3, ..., R c It is the area of ​​interest node in the knowledge graph.

[0019] Preferably, in S2, a number of time slots are obtained according to time division, and a specific method of constructing a number of sign-in sequences in the number of time slots includes:

[0020] Use binary code to encode the user's check-in time T Slot Divided into 96 discrete time slots, namely T Slot ={T1,T2,T3,...,T 96};

[0021] Map the user's check-in time information to the corresponding time slot to capture the time characteristics of the user's check-in behavior;

[0022] The time characteristics include the user's check-in preferences and periodic characteristics during a specific period of time;

[0023] Each time slot T i Users visit points of interest p successively i and p j ;

[0024] Points of Interest i and p j An edge, i.e. a sign-in sequence, will be established between them.

[0025] Preferably, in step S2, user similarity is calculated, and spectral clustering is performed based on the user similarity to obtain the specific content of the user group as follows:

[0026] The Jaccard coefficient is used to evaluate the social similarity between users in location social networks;

[0027] The expression for calculating social similarity is:

[0028]

[0029] Among them, simu u-v represents the social similarity between user u and user v, U u , U v Represents the friend sets of user u and user v respectively, |U u ∩U v | represents the common friends set of user u and user v, |U u ∪U v | represents the set of all friends of user u and user v, simu u-v ∈[0,1];

[0030] Calculate the number of times users check in at different ROIs to obtain the similarity of users’ check-in locations;

[0031] The expression for calculating the similarity of user check-in locations is:

[0032]

[0033] Among them, siml u-v represents the similarity of the check-in locations of user u and user v, represents the number of check-ins of user u in ROI i, represents the number of check-ins of user v in ROI i, R u is the ROI set that user u has checked in to, R v is the set of ROIs that user v has checked in to. When user u and user v have checked in to the same area of ​​interest i, R u ∩R vNot empty, when the check-in behaviors of two users have no intersection, siml u-v is 0,siml u-v ∈[0,1];

[0034] Calculate the number of times users check in at different time slots to get the similarity of user check-in times;

[0035] The expression for calculating the similarity of user check-in time is:

[0036]

[0037] Among them, simt u-v represents the similarity of the check-in time between user u and user v, represents the number of check-ins of user u in time slot i, represents the number of check-ins of user v in time slot j, T u is the set of time slots that user u has checked in, T v is the set of time slots that user v has checked in. When user u and user v have a check-in record in the same time slot i, T u∩ T v is not empty. When the check-in behaviors of two users have no intersection, simt u-v is 0, simt u-v ∈[0,1];

[0038] Assign weights to social similarity, user check-in location similarity, and user check-in time similarity to obtain user comprehensive similarity;

[0039] The expression for calculating the comprehensive similarity of users is:

[0040]

[0041] Among them, α is the weight of social similarity in the calculation of user comprehensive similarity, β is the weight of user check-in location similarity in the calculation of user comprehensive similarity, and e ij For user u i and u j The comprehensive similarity between

[0042] The social relationship graph Q(U,E) is used to represent the social relationship between users. U is the total number of users (u1,u2,u3,…,u M ) set, E is the weight of the edge e ij gather;

[0043] Construct the user similarity matrix W, where M is the total number of users, e i,j Represented as user u i and user u j The similarity between

[0044] Among them, the expression of the user similarity matrix W is as follows:

[0045]

[0046] Calculate the sum of the weights of the user and all edges connected to the user in the social relationship graph Q(U,E) to obtain the degree of each user's node;

[0047] The degree of each user's node is represented by a matrix, and an M×M degree matrix D is obtained. The matrix D is a diagonal matrix, and the value of the diagonal corresponds to the value of the degree of the i-th user node in the i-th row;

[0048] The expression of the degree of each user's node is:

[0049]

[0050] Normalize the matrix D to get the standardized Laplace matrix L Sysm ,in,

[0051] Calculate L Sysm The eigenvalue of and the corresponding eigenvector

[0052] L Sysm Arrange the eigenvalues ​​from large to small to obtain a new set of eigenvalues;

[0053] Calculate the eigengap sequence E = {e1, e2, .., e k1 |e i =λ i -λ i+1 , i<k1}, the subscript corresponding to the first maximum value in the intrinsic gap sequence is the number of clusters k;

[0054] Treat each row as a new user with k features and apply clustering to obtain user grouping results;

[0055] Output the user set U according to the category, that is, the user group node U = {U1,U2,U3,...,U k}.

[0056] Preferably, the specific contents of the user embedding vector, the interest point embedding vector, and the relationship embedding vector obtained by preliminarily learning the interest point knowledge graph based on the graph translation model are:

[0057] The original triples (h, r, t) are defined as the original triples of user, check-in, and interest point, the triples of user, friend, and user, and the original triples of interest point, check-in sequence, and interest point;

[0058] The user group node and the interest area node are jointly represented as the check-in relationship between the user and the interest point, and a triple of user, group check-in in a certain area, and interest point is obtained;

[0059] The first triple plus the user, friend, user original triple and interest point, check-in sequence, interest point original triple together constitute the embedded triple;

[0060] The process expression for forming the embedding triples is as follows:

[0061] r c ={(U i ,R j )∪r|U i ∈U,R j ∈P};

[0062] Project the head entity h and the tail entity t from the entity space to the relational space and calculate the entity projection vector, where the entity projection vector is represented as, h r,c =M r h, t r,c =M r t, where M r For the relationship c The introduced projection matrix, M r ∈R k×d ;

[0063] The objective function expression for calculating the entity projection vector is:

[0064]

[0065] Among them, ||h||2≤1, ||t||2≤1, ||r||2≤1, ||h r,c ||2≤1,||t r,c ||2≤1.

[0066] Define an integral margin-based loss function for multi-level knowledge graphs;

[0067] The expression of the integral margin-based loss function is:

[0068]

[0069] Among them, S is the set of correct triplets, S' is the set of incorrect triplets obtained by negative sampling of correct triplets, and γ is a positive boundary value used to control the distance between positive examples and negative examples.

[0070] Preferably, in step S5, the specific contents of constructing a gated graph neural network that introduces geographic information are:

[0071] Build a gated graph neural network (GGNN) and use it to iteratively update the embedding of learning nodes;

[0072] The iterative update function of GGNN is:

[0073]

[0074] where x v is the feature vector of the interest point node v, is the initial state of node v, Represents the sign-in sequence of the current user. Represented as the in-degree adjacency matrix A in A row corresponding to node v, Represented as the out-degree adjacency matrix A out For a row corresponding to node v, the adjacency matrix A = [A in ,A out ],W in , W out is the parameter matrix, is the input vector at time step t, What is saved is the vector of the previous time step t-1, and the result is is the hidden state of the interest point v at time t;

[0075] Use the embeddings of all nodes to express the check-in sequence graph;

[0076] The gated graph neural network GGNN is improved according to the temporal and spatial features to obtain the spatiotemporal gated graph neural network.

[0077] Preferably, the gated graph neural network with geographic information is used for several check-in sequences in sequence to obtain the specific content of the interest point representation with spatiotemporal characteristics:

[0078] At the temporal level, the check-in sequence of POIs is modeled separately for each user in the time slot;

[0079] At the spatial level, the message propagation layer of GGNN integrates geographic information. For each location node in the POI check-in sequence graph, the weights of its input and output edges are adjusted based on the geographic distance;

[0080] Generate a POI check-in sequence diagram containing spatial information;

[0081] Based on the check-in data of user u, the check-in sequence S is obtained u ;

[0082] The sign-in sequence S u The expression is:

[0083]

[0084] in is a time point of user u in time slot T Visited POIs,|S| is the total number of POIs visited during time slot T;

[0085] Perform an update calculation on the adjacency matrix in the sign-in sequence subgraph, the update calculation includes: i The input edge weight calculation, location node e i The output edge weight of

[0086] The location node e i The calculation expression of the input edge weight is:

[0087]

[0088] The location node e i The calculation expression of the output edge weight is:

[0089]

[0090] Among them, v i is the location node i, v j is the location node j, Represented as location node e i The input edge weight, W(v i ,v j ) represents the position node v i and position node v j The position interval weight between in (i) represents the location node v i The forward node set of Represented as location node e i The output edge weight, N out (i) is represented by the position node v i The backward node set, p vi is the position node v i The position coordinates, p vj is the position node v j The position coordinates, Δl is the proportional factor of the control distance, W(v i ,v j )∈(0,1];

[0091] Among them, the position node v i and position node v j The expression of the position interval weight between is:

[0092]

[0093] Calculate each sequence to get the adjacency matrix W of the sign-in sequence subgraph S A, where W S A=[W S A in ,W S A out ],W S A in represents the in-degree connection matrix, W S A out is the out-degree connection matrix;

[0094] Based on the introduction of geographic information, the adjacency matrix W is calculated. S A;

[0095] Calculate the input vector corresponding to the i-th position node of user u in the check-in sequence S

[0096] The expression for the input vector is:

[0097]

[0098] in, represents the updated in-degree connection matrix row i, Represented as the updated out-degree connection matrix row i, is the sign-in activity sequence vector of user u in time slot T, |S| is the number of sign-ins in the sign-in sequence, and is the parameter matrix.

[0099] Modify the node update function of GGNN to obtain the node update function of STGGNN;

[0100] The expression of the node update function of STGGNN is:

[0101]

[0102] in represents the graph input vector of the i-th node in the sequence graph, is the graph input vector corresponding to the i-th position node of user u in the check-in sequence S, represents the hidden state of the i-th position node at time slot T at time t-1, r i t and is the result after the node passes through the reset gate and the update gate. is the candidate hidden state of the position node at time t, is the hidden state of the position node at time t, W * is the parameter matrix;

[0103] The interest point embedding vector obtained by CKGE is input into STGGNN as input data to obtain the output matrix V p ={x p1 ,x p2 ,x p3 ,...x pN}, where x pi is the point of interest node p i The final learned result vector.

[0104] Preferably, in step S6, the specific content of integrating the check-in relationship with user group characteristics and interest area characteristics through the graph attention mechanism model GraphAttention Network, GAT is:

[0105] Through the GAT model, it calculates the vector x after fusing the edge information ij , according to the vector x after fusion of edge information ij Calculate the attention coefficient between nodes;

[0106] Calculate the fused vector x ij The expression is:

[0107] x ij =W n h i ||W n h j ||W r r ij ;

[0108] Calculate the attention coefficient a between nodes ij The expression is:

[0109]

[0110] Among them, W n and W r is the learnable weight matrix, r ij is the feature vector of the edge between node i and node j, || represents the vector connection operation, that is, for each pair of nodes i and j, their features and the feature vectors of the edge connecting them are spliced ​​together end to end, c T is a learnable weight vector, and LeakyReLU is a nonlinear activation function;

[0111] After introducing the edge feature, the information aggregation function is adjusted to obtain the updated information aggregation function;

[0112] The expression of the update information aggregation function is:

[0113]

[0114] Where Wh and W r are the parameter matrices of node features and relationship features respectively;

[0115] Construct a message aggregation model to achieve message aggregation;

[0116] The expression of the message aggregation model is:

[0117]

[0118] Where W1 and W2 represent trainable parameter matrices, ⊙ represents vector multiplication, and the representation h of node i is aggregated by message aggregation. i Representation of aggregation with its first-order neighbor nodes Aggregate into a new current node representation;

[0119] By stacking more propagation layers to capture high-order connection information, specifically, in the l-th step, the representation of the entity is recursively updated to the following form:

[0120]

[0121] in is the feature vector of its l-1 hop neighbor node j. The l-1 hop neighbor information from node i is aggregated after adding the attention mechanism and expressed as

[0122] After recursively completing the lth layer, the target node obtains the final feature information from the lth-order neighbor;

[0123] After L layers of information transmission and aggregation, multiple representations of user node u propagated at different levels are obtained. And multiple representations of the node of interest p: Since the outputs of different layers emphasize connectivity information of different orders;

[0124] A layer aggregation mechanism is used to concatenate the output representations of each layer into a single vector;

[0125] The expression for a single vector is:

[0126]

[0127] Among them, || indicates a connection operation. is the vector representation of user node u, is the vector representation of the interest point node p, and L represents the number of layers performing the aggregation operation;

[0128] Perform the inner product of the user vector and the point of interest vector to obtain the predicted matching score of user u for point of interest p

[0129] The expression for the inner product of the user vector and the interest point vector is:

[0130]

[0131] Optimize the graph attention mechanism model and set the binary cross entropy loss function;

[0132] The expression of the binary cross entropy loss function is:

[0133]

[0134] Among them, y (u,p) represents the actual check-in of user u at point of interest p, represents the probability of user u visiting point of interest p predicted by the model.

[0135] In summary, compared with the interest point recommendation technology, the interest point recommendation method based on knowledge graph of the present invention targets the interest point recommendation needs in location-based social network (LBSN), takes into account the diversity of check-in data and its multidimensional characteristics, deeply studies the core factors affecting user check-in behavior, and constructs an interest point knowledge graph integrating contextual information from three dimensions: user social network, time series and geographic location. The interest point recommendation method based on knowledge graph learning is studied, which effectively overcomes the problem of insufficient utilization of contextual information in traditional interest point recommendation, helps to alleviate the high sparsity and weak semantics of user check-in data, and improves the accuracy of interest point recommendation.

[0136] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0137] Figure 1 A technical framework diagram of a method for recommending points of interest through learning a knowledge graph according to the present invention;

[0138] Figure 2 It is a hierarchical structure diagram of the interest point knowledge graph of the present invention;

[0139] Figure 3 It is a framework diagram of the time slot division rule of the present invention;

[0140] Figure 4 The comparison results of the interest point recommendation method based on knowledge graph of the present invention and other three recommendation algorithms;

[0141] Figure 5 This is the POI distribution map of the Brightkite dataset of the present invention;

[0142] Figure 6 These are the results of ablation experiments on a knowledge graph-based POI recommendation method of the present invention and three other algorithms. DETAILED DESCRIPTION

[0143] The technical solution of the present invention is further described below by means of the accompanying drawings and embodiments. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values ​​described in these embodiments do not limit the scope of the present application.

[0144] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.

[0145] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0146] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0147] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.

[0148] like Figure 1 As shown, the present invention provides a method for recommending points of interest based on knowledge graph, which specifically includes the following steps: S1, obtaining user check-in data, analyzing the user check-in data to obtain user personal information, user social information, user point of interest information, user context information and user spatiotemporal information, wherein the spatiotemporal information includes area and time.

[0149] S2. Divide the region according to the points of interest to obtain the region of interest, and organize the region of interest to obtain the region of interest node R i ,like Figure 3 As shown in the figure, several time slots are obtained according to time division, several sign-in sequences are constructed in several time slots, user similarity is calculated, spectral clustering is performed according to user similarity to obtain user groups, and user groups are sorted to obtain user group nodes U i .

[0150] In S2, the specific method of dividing the region according to the points of interest to obtain the regions of interest includes calculating the geographical correlation between the points of interest based on the Euler distance function of longitude and latitude, and performing spatial clustering to obtain a number of regions of interest, ROI.

[0151] Among them, the expression for calculating the geographical correlation between points of interest is:

[0152]

[0153] Among them, p i =(x i ,y i ) is the geographic location coordinates of the point of interest i, p j =(x i ,y i ) is the geographic location coordinate of interest point j, and k(i,j) is the geographic correlation between interest point i and interest point j.

[0154] Determine the number of clusters c, that is, divide the interest point set P into c ROIs, that is, P = {R1, R2, R3, ..., R c}, where R1, R2, R3, ..., R c It is the area of ​​interest node in the knowledge graph.

[0155] In S2, a number of time slots are obtained according to time division, and a specific method for constructing a number of sign-in sequences in a number of time slots includes: using binary coding to convert the user's sign-in time T Slot Divided into 96 discrete time slots, namely T Slot ={T1,T2,T3,...,T 96}.

[0156] Map the user's check-in time information to the corresponding time slot to capture the time characteristics of the user's check-in behavior.

[0157] The time characteristics include the user's check-in preference and periodic characteristics in a specific time period.

[0158] Each time slot T i Users visit points of interest p successively i and p j .

[0159] Points of Interest i and p j An edge, i.e. a sign-in sequence, will be established between them.

[0160] In step S2, user similarity is calculated, and spectral clustering is performed according to user similarity to obtain the specific contents of user groups as follows: the Jaccard coefficient is used to evaluate the social similarity between users in the location social network.

[0161] The expression for calculating social similarity is:

[0162] Among them, simu u-v represents the social similarity between user u and user v, U u , U v Represents the friend sets of user u and user v respectively, |U u ∩U v| represents the common friends set of user u and user v, |U u ∪U v | represents the set of all friends of user u and user v, simu u-v ∈[0,1].

[0163] Calculate the number of times users check in at different ROIs and obtain the similarity of user check-in locations.

[0164] The expression for calculating the similarity of user check-in locations is:

[0165] Among them, siml u-v represents the similarity of the check-in locations of user u and user v, represents the number of check-ins of user u in ROI i, represents the number of check-ins of user v in ROI i, R u is the ROI set that user u has checked in to, R v is the set of ROIs that user v has checked in to. When user u and user v have checked in to the same area of ​​interest i, R u ∩R v Not empty, when the check-in behaviors of two users have no intersection, siml u-v is 0,siml u-v ∈[0,1].

[0166] Calculate the number of times users check in at different time slots to get the similarity of user check-in times.

[0167] The expression for calculating the similarity of user check-in time is:

[0168] Among them, simt u-v represents the similarity of the check-in time between user u and user v, represents the number of check-ins of user u in time slot i, represents the number of check-ins of user v in time slot j, T u is the set of time slots that user u has checked in, T v is the set of time slots that user v has checked in. When user u and user v have a check-in record in the same time slot i, T u ∩T v Not empty, when the check-in behaviors of two users have no intersection, simt u-v is 0, simt u-v ∈[0,1].

[0169] Weights are configured for social similarity, user check-in location similarity, and user check-in time similarity to obtain user comprehensive similarity.

[0170] The expression for calculating the comprehensive similarity of users is:

[0171]

[0172] Among them, α is the weight of social similarity in the calculation of user comprehensive similarity, β is the weight of user check-in location similarity in the calculation of user comprehensive similarity, and e ij For user u i and u j The comprehensive similarity between .

[0173] The social relationship graph Q(U,E) is used to represent the social relationship between users. U is the total number of users (u1,u2,u3,…,u M ) set, E is the weight of the edge e ij gather.

[0174] Construct the user similarity matrix W, where M is the total number of users, e i,j Represented as user u i and user u j The similarity between .

[0175] Among them, the expression of the user similarity matrix W is as follows:

[0176]

[0177] Calculate the sum of the weights of the user and all edges connected to the user in the social relationship graph Q(U,E) to obtain the degree of each user's node.

[0178] The degree of each user's node is represented in a matrix to obtain an M×M degree matrix D, where the matrix D is a diagonal matrix, and the diagonal value corresponds to the value of the degree of the i-th user node in the i-th row.

[0179] The expression of the degree of each user's node is,

[0180] Normalize the matrix D to get the standardized Laplace matrix L Sysm ,in,

[0181] Calculate L Sysm The eigenvalue of and the corresponding eigenvector

[0182] L Sysm The eigenvalues ​​of are arranged from large to small to obtain a new set of eigenvalues.

[0183] Calculate the intrinsic gap sequence The subscript corresponding to the first maximum value in the intrinsic gap sequence is the number of clusters k.

[0184] Treat each row as a new user with k features and apply clustering to obtain user grouping results.

[0185] Output the user set U according to the category, that is, the user group node U = {U1,U2,U3,...,U k}.

[0186] like Figure 2 As shown, S3, a multi-level POI knowledge graph integrating contextual information is constructed based on user groups, time slots and interest areas.

[0187] S4. Based on the graph translation model, the knowledge graph of interest points is preliminarily learned to obtain the user embedding vector representation, interest point embedding inward representation, and relationship embedding vector representation.

[0188] The specific content of the embedded vector representation obtained by preliminarily learning the interest point knowledge graph based on the graph translation model in step S4 is to define the original triples (h, r, t) as user, check-in, interest point original triples, user, friend, user triples and interest point, check-in sequence, interest point original triples.

[0189] The user group node and the interest area node are jointly represented as the check-in relationship between the user and the interest point, and a triple of user, group check-in in a certain area and interest point is obtained.

[0190] The first triple plus the user, friend, user original triple and interest point, check-in sequence, interest point original triple together constitute the embedded triple.

[0191] The process expression for forming the embedded triple is as follows, c ={(U i ,R j )∪r|U i ∈U,R j ∈P}.

[0192] Project the head entity h and the tail entity t from the entity space to the relational space and calculate the entity projection vector, where the entity projection vector is represented as, h r,c =M r h, t r,c =M r t, where M r For the relationship c The introduced projection matrix, M r ∈R k×d .

[0193] The objective function expression for calculating the entity projection vector is:

[0194] Among them, ||h||2≤1, ||t||2≤1, ||r||2≤1, ||h r,c ||2≤1,||t r,c ||2≤1.

[0195] Define an integral margin-based loss function for multi-level knowledge graphs.

[0196] The expression of the integral margin-based loss function is:

[0197]

[0198] Among them, S is the set of correct triplets, S' is the set of incorrect triplets obtained by negative sampling of correct triplets, and γ is a positive boundary value used to control the distance between positive examples and negative examples.

[0199] S5. Construct a gated graph neural network that introduces geographic information, and use the gated graph neural network that introduces geographic information on several check-in sequences in turn to obtain a representation of points of interest with spatiotemporal characteristics.

[0200] In step S5, the specific content of constructing a gated graph neural network that introduces geographic information is to construct a gated graph neural network GGNN, and use GGNN to iteratively update the embedding of learning nodes.

[0201] The iterative update function of GGNN is

[0202]

[0203] where x v is the feature vector of the interest point node v, is the initial state of node v, Represents the sign-in sequence of the current user. Represented as the in-degree adjacency matrix A in A row corresponding to node v, Represented as the out-degree adjacency matrix A out For a row corresponding to node v, the adjacency matrix A = [A in ,A out ],W in , W out is the parameter matrix, is the input vector at time step t, What is saved is the vector of the previous time step t-1, and the result is is the hidden state of the interest point v at time t.

[0204] The check-in sequence graph is expressed using the embeddings of all nodes.

[0205] The gated graph neural network GGNN is improved according to the temporal and spatial features to obtain the spatiotemporal gated graph neural network.

[0206] In step S5, a gated graph neural network with geographic information is used in turn for several check-in sequences to obtain a representation of points of interest with spatiotemporal characteristics. Specifically, at the time level, a check-in sequence of points of interest is modeled separately for each user in a time slot.

[0207] At the spatial level, the message propagation layer of GGNN that integrates geographic information adjusts the weights of its input and output edges based on the geographic distance for each location node in the POI check-in sequence graph.

[0208] Generate a POI check-in sequence diagram containing spatial information.

[0209] Based on the check-in data of user u, the check-in sequence S is obtained u .

[0210] The sign-in sequence S u The expression of is,

[0211] in is a time point of user u in time slot T Visited POIs, |S| is the total number of POIs visited during time slot T.

[0212] Perform an update calculation on the adjacency matrix in the sign-in sequence subgraph, the update calculation includes: i The input edge weight calculation, location node e i The output edge weights of .

[0213] The location node e i The calculation expression of the input edge weight is:

[0214] The location node e i The calculation expression of the output edge weight is:

[0215] Among them, v i is the location node i, v j is the location node j, Represented as location node e i The input edge weight, W(v i ,v j ) represents the position node v i and position node v j The position interval weight between in (i) represents the location node v i The forward node set of Represented as location node e i The output edge weight, N out (i) is represented by the position node v i The backward node set of is the position node v i The location coordinates of is the position node v j The position coordinates, Δl is the proportional factor of the control distance, W(v i ,v j )∈(0,1].

[0216] Among them, the position node v i and position node v j The expression of the position interval weight between is,

[0217]

[0218] Calculate each sequence to get the adjacency matrix W of the sign-in sequence subgraph S A, where W S A=[W S A in ,W S A out ],W S A in represents the in-degree connection matrix, W S A out is the out-degree connection matrix.

[0219] Based on the introduction of geographic information, the adjacency matrix W is calculated. S A.

[0220] Calculate the input vector corresponding to the i-th position node of user u in the check-in sequence S

[0221] The expression of the input vector is,

[0222]

[0223] in, represents the updated in-degree connection matrix row i, Represented as the updated out-degree connection matrix row i, is the sign-in activity sequence vector of user u in time slot T, |S| is the number of sign-ins in the sign-in sequence, and is the parameter matrix.

[0224] The node update function of GGNN is modified to obtain the node update function of STGGNN.

[0225] The expression of the node update function of STGGNN is:

[0226] in represents the graph input vector of the i-th node in the sequence graph, is the graph input vector corresponding to the i-th position node of user u in the check-in sequence S, represents the hidden state of the i-th position node at time slot T at time t-1, and is the result after the node passes through the reset gate and the update gate. is the candidate hidden state of the position node at time t, is the hidden state of the position node at time t, W * is the parameter matrix.

[0227] The interest point embedding vector obtained by CKGE is input into STGGNN as input data to obtain the output matrix in is the point of interest node p i The final learned result vector.

[0228] S6. Through the graph attention mechanism model GraphAttentionNetwork, GAT, the check-in relationship with user group characteristics and interest area characteristics is integrated to propagate all user preferences on social network relationships, and to mine and predict the possible interest point preferences of a single user.

[0229] In step S6, the specific content of fusing the check-in relationship with user group characteristics and interest area characteristics through the graph attention mechanism model GraphAttention Network, GAT, is that the GAT model is used to calculate the vector x after fusing the edge information. ij , according to the vector x after fusion of edge information ij Calculate the attention coefficient between nodes.

[0230] Calculate the fused vector x ij The expression of x is: ij =W n h i ||W n h j ||W r r ij .

[0231] Calculate the attention coefficient a between nodes ij The expression is:

[0232]

[0233] Among them, W n and W r is the learnable weight matrix, r ij is the feature vector of the edge between node i and node j, || represents the vector connection operation, that is, for each pair of nodes i and j, their features and the feature vectors of the edge connecting them are spliced ​​together end to end, c T is a learnable weight vector and LeakyReLU is a nonlinear activation function.

[0234] After introducing edge features, the information aggregation function is adjusted to obtain an updated information aggregation function.

[0235] The expression of the update information aggregation function is:

[0236] Where W h and W r They are the parameter matrices of node features and relationship features respectively.

[0237] Build a message aggregation model to implement message aggregation.

[0238] The expression of the message aggregation model is:

[0239]

[0240] Where W1 and W2 represent trainable parameter matrices, ⊙ represents vector multiplication, and the representation h of node i is aggregated by message aggregation. i Representation of aggregation with its first-order neighbor nodes Aggregate into the new current node representation.

[0241] By stacking more propagation layers to capture high-order connection information, specifically, in the l-th step, the representation of the entity is recursively updated to the following form,

[0242]

[0243] in is the feature vector of its l-1 hop neighbor node j. The l-1 hop neighbor information from node i is aggregated after adding the attention mechanism and expressed as

[0244] After recursively completing the l-th layer, the target node obtains the final feature information from the l-th order neighbors.

[0245] After L layers of information transmission and aggregation, multiple representations of user node u propagated at different levels are obtained. And multiple representations of the node of interest p: Because the outputs of different layers emphasize connectivity information of different orders.

[0246] A layer aggregation mechanism is used to concatenate the output representations of each layer into a single vector.

[0247] The expression for a single vector is:

[0248]

[0249] Among them, || indicates a connection operation. is the vector representation of user node u, is the vector representation of the interest point node p, and L represents the number of layers performing the aggregation operation.

[0250] Perform the inner product of the user vector and the point of interest vector to obtain the predicted matching score of user u for point of interest p

[0251] The expression for the inner product of the user vector and the interest point vector is:

[0252] Optimize the graph attention mechanism model and set the binary cross entropy loss function.

[0253] In order to optimize the model, this application first uses a margin-based ranking loss function to correctly represent the knowledge graph nodes and vectors. In order to minimize the distance difference between the correct triple representation vector and the incorrect triple representation vector, the integral margin (margin-based) loss function is as follows.

[0254]

[0255] Among them, S is the set of correct triplets, S' is the set of incorrect triplets obtained by negative sampling of correct triplets (for example, replacing the head entity or the tail entity), and γ is a positive boundary value used to control the distance between positive examples and negative examples.

[0256] Next, in order to optimize the loss of recommendation, this application chooses the binary cross entropy loss function. This loss function is suitable for binary classification tasks. It can help the model learn how to accurately distinguish user preferences from user behavior, and can more effectively understand and predict user behavior based on implicit feedback. The loss function is defined as follows:

[0257]

[0258] Among them, y (u,p) represents the actual check-in of user u at the point of interest p (1 means the user has checked in at this point of interest, 0 means no check-in), represents the probability of user u visiting point of interest p predicted by the model.

[0259] Finally, the integral boundary loss function and the binary cross entropy loss function of the recommendation task are combined. The expression of the binary cross entropy loss function is:

[0260] Among them, y (u,p) represents the actual check-in of user u at point of interest p, represents the probability of user u visiting point of interest p predicted by the model.

[0261] Four advanced POI recommendation methods, MGMPFM, RGCN, KGAT, and ATST-LSTM, are selected for comparison with the method of this application.

[0262] MGMPFM is a POI recommendation method based on matrix factorization. RGCN is an extension of the graph convolutional network (GCN) and is specifically designed to handle heterogeneous relationships in graphs. The KGAT model is a knowledge graph enhancement model designed specifically for recommendation systems. Its main purpose is to make full use of the rich structured information in the knowledge graph to improve the accuracy of recommendations. ATST-LSTM focuses on learning the sequence characteristics of user check-in behavior and proposes a spatiotemporal long short-term memory (ST-LSTM) network model. It integrates spatiotemporal information based on the LSTM network and selectively focuses on relevant historical check-in records through the attention mechanism. It effectively captures and learns the sequence pattern of user check-in behavior, thereby improving the accuracy and personalization of the next POI recommendation.

[0263] In order to verify the effectiveness of each module in the knowledge graph-based POI recommendation method proposed in this application, three baseline methods were designed:

[0264] CKGL-KG: Ignore the complex relationships in the knowledge graph, that is, ignore the complex relationships modeled between users and points of interest, and keep the other parts unchanged.

[0265] CKGL-ST: Ignore the sequential relationship established at the level of interest points in the knowledge graph, and do not use the STGGNN network to learn the sequential features of user check-ins, while keeping the other parts unchanged.

[0266] CKGL-Social: Ignore the user-user friendship relationship in the knowledge graph, do not use the GAT model to propagate user preferences, and keep other parts unchanged.

[0267] like Figure 4 As shown in Figure 1, the comparison results of the proposed method and the other four recommendation algorithms are shown in Figure 2. This paper randomly selects the check-in records of 20% of users and compares the distribution of POIs that users actually check in and POIs recommended by the proposed method. Figure 5 As shown in Figure 1. The red dots are the points of interest that users actually checked in to in the test set, and the green crosses are the points of interest recommended by the method proposed in this paper. Figure 6 The experimental results of the algorithm in this paper and its baseline method are shown. It can be observed that on the two datasets, the experimental results of the five algorithms are ranked as CKGL>ATST-LSTM>KGAT>RGCN>MGMPFM.

[0268] like Figure 6 As shown, it can be observed that CKGL performs significantly better than the other three baseline methods on Foursquare and Gowalla.

[0269] The experimental results of the four algorithms are ranked as CKGL>CKGL-Social>CKGL-ST>CKGL-KG. According to the contribution of different modules to the recommendation effect of interest points, they can be ranked from large to small as follows: knowledge graph embedding, influence of interest point spatiotemporal characteristics, social and user preference propagation influence. The difference between CKGL and CKGL-KG is the largest, indicating that the knowledge graph embedding module plays a key role in this paper. When constructing the interest point knowledge graph, this paper not only refines the relationship between users and interest points, but also utilizes the features at the user and interest point levels. When the recommendation algorithm uses the attention mechanism to propagate preference propagation, this part of the feature vector is introduced to obtain users' preferences for different degrees of relationships and deepen the influence of this part.

[0270] The effect of CKGL-KG is slightly lower than that of CKGL-ST, indicating that the spatiotemporal features of POIs also have a significant effect on user check-in behavior. User check-in behavior shows a certain time period pattern. Reasonable use of this feature helps to improve the accuracy of recommendation. Compared with other baseline methods, the performance of CKGL-Social is not significantly reduced, which means that CKGL-Social does not rely heavily on social relationships. There may be two reasons for this: on the one hand, it may be related to the method of constructing the knowledge graph of POIs. In constructing the knowledge graph, this paper uses social relationships to calculate the similarity between users, effectively capturing the correlation between related users in social and check-in behaviors. On the other hand, this paper completes the modeling of spatiotemporal sequence features before recommending users. This feature helps to understand the behavioral characteristics of users, and the influence of social relationships on user choices in recommendations is not significant. Finally, from the trend of recommendation performance changes of the two datasets, it can be seen that the change of the Gowalla dataset is significantly greater than that of the Brightkite dataset, indicating that the method proposed in this paper helps to process more sparse check-in data.

[0271] Table 1 Experimental results of POI recommendation on Gowalla dataset

[0272]

[0273] Table 2 Experimental results of interest point recommendation on Brightkite dataset

[0274]

[0275] The detailed experimental results are shown in Table 1 and Table 2. Due to the diversity of user behaviors in real life and the sparsity of spatiotemporal data in LBSN, the average indicators of the POI recommendation algorithm in terms of accuracy and recall are less than 0.06. In the Gowalla dataset, the experimental results of CKGL in Precision@10 and Recall@10 are 0.0456 and 0.0403 respectively, which are better than ATST-LSTM's 0.0407 and 0.0367, and the accuracy is improved by 10.7% and the recall is improved by 8.9%; in the Brightkite dataset, the results of CKGL in Precision@10 and Recall@10 are 0.0511 and 0.0474 respectively, which are better than ATST-LSTM's 0.0464 and 0.0423, and the accuracy is improved by 9.1% and the recall is improved by 10.7%.

[0276] In summary, the method for recommending points of interest based on knowledge graph in the present invention has the following advantages over the previous point of interest recommendation technology:

[0277] (1) By constructing a knowledge graph of points of interest that integrates contextual information, a large amount of user behavior data, geographic location information, and social network information is integrated, and the relationship information of users' check-in points of interest is refined. The knowledge graph is used to provide a richer semantic information graph structure, which not only alleviates the data sparsity problem, but also provides a certain degree of explainability for the recommendation results.

[0278] (2) This method takes into account the spatiotemporal characteristics of user check-in behavior. By analyzing the check-in patterns of users at the temporal and spatial levels and using the STGGNN network to fuse spatiotemporal information, it effectively captures the complex dependencies between POI nodes, enabling the recommendation system to better understand the sequential characteristics and periodic patterns of user check-ins, and thus recommend POIs that better meet user needs.

[0279] (3) Preference information is propagated in user social networks through graph neural networks. The check-in relationship in the knowledge graph integrates rich user group and interest area features. On this basis, the graph attention mechanism model that integrates relationship features is used to aggregate information, effectively capturing the law of interest preference propagation in social networks. This efficient information propagation and aggregation mechanism can learn accurate user representations from complex social network structures, further improving the accuracy of recommendations.

[0280] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for recommending points of interest based on knowledge graph, characterized in that: The following steps are involved: S1. Obtain user sign-in data, analyze the user sign-in data to obtain user personal information, user social information, user point of interest information, user context information and user spatiotemporal information, where the spatiotemporal information includes region and time; S2. Divide the region according to the points of interest to obtain the region of interest, and organize the region of interest to obtain the region of interest node R i , according to the time division, several time slots are obtained, several sign-in sequences are constructed in several time slots, user similarity is calculated, spectral clustering is performed according to user similarity to obtain user groups, and user groups are sorted to obtain user group nodes U i ; S3, construct a multi-level knowledge graph of points of interest that integrates contextual information based on user groups, time slots, and interest areas; S4. Preliminary learning of the POI knowledge graph based on the graph translation model to obtain user embedding vectors, POI embedding vectors, and relationship embedding vectors; S5, constructing a gated graph neural network that introduces geographic information, and sequentially applying the gated graph neural network that introduces geographic information to several check-in sequences to obtain a representation of points of interest with spatiotemporal characteristics; S6. Through the graph attention mechanism model Graph Attention Network (GAT), the check-in relationship with user group characteristics and interest area characteristics is integrated to propagate all user preferences on social network relationships, and to mine and predict the possible interest point preferences of a single user.

2. The method for recommending points of interest based on knowledge graph according to claim 1, characterized in that: In S2, the specific method of dividing the region according to the interest point to obtain the interest region includes: Based on the Euler distance function of longitude and latitude, the geographical correlation between points of interest is calculated, and spatial clustering is performed to obtain several regions of interest (ROIs). Among them, the expression for calculating the geographical correlation between points of interest is: Among them, p i =(x i ,y i ) is the geographic location coordinates of the point of interest i, p j =(x i ,y i ) is the geographical location coordinate of interest point j, k(i,j) is the geographical correlation between interest point i and interest point j; Determine the number of clusters c, that is, divide the interest point set P into c ROIs, that is, P = {R1, R2, R3, ..., R c }, where R1, R2, R3, ..., R c It is the area of ​​interest node in the knowledge graph.

3. The method for recommending points of interest based on knowledge graph according to claim 1, characterized in that: In S2, a number of time slots are obtained according to time division, and a specific method of constructing a number of sign-in sequences in the number of time slots includes: Use binary code to encode the user's check-in time T Slot Divided into 96 discrete time slots, namely T Slot ={T1,T2,T3,...,T 96 }; Map the user's check-in time information to the corresponding time slot to capture the time characteristics of the user's check-in behavior; The time characteristics include the user's check-in preferences and periodic characteristics during a specific period of time; Each time slot T i Users visit points of interest p successively i and p j ; Points of Interest i and p j An edge, i.e. a sign-in sequence, will be established between them.

4. The method for recommending points of interest based on knowledge graph according to claim 3, characterized in that: In step S2, user similarity is calculated, and spectral clustering is performed based on user similarity to obtain the specific contents of the user group as follows: The Jaccard coefficient is used to evaluate the social similarity between users in location social networks; The expression for calculating social similarity is: Among them, simu u-v represents the social similarity between user u and user v, U u , U v Represents the friend sets of user u and user v respectively, |U u ∩U v | represents the common friends set of user u and user v, |U u ∪U v | represents the set of all friends of user u and user v, simu u-v ∈[0,1]; Calculate the number of times users check in at different ROIs to obtain the similarity of users’ check-in locations; The expression for calculating the similarity of user check-in locations is: Among them, siml u-v represents the similarity of the check-in locations of user u and user v, represents the number of check-ins of user u in ROI i, represents the number of check-ins of user v in ROI i, R u is the ROI set that user u has checked in to, R v is the set of ROIs that user v has checked in to. When user u and user v have checked in to the same area of ​​interest i, R u ∩R v Not empty, when the check-in behaviors of two users have no intersection, siml u-v is 0,siml u-v ∈[0,1]; Calculate the number of times users check in at different time slots to get the similarity of user check-in times; The expression for calculating the similarity of user check-in time is: Among them, simt u-v represents the similarity of the check-in time between user u and user v, represents the number of check-ins of user u in time slot i, represents the number of check-ins of user v in time slot j, T u is the set of time slots that user u has checked in, T v is the set of time slots that user v has checked in. When user u and user v have a check-in record in the same time slot i, T u ∩T v Not empty, when the check-in behaviors of two users have no intersection, simt u-v is 0, simt u-v ∈[0,1]; Assign weights to social similarity, user check-in location similarity, and user check-in time similarity to obtain user comprehensive similarity; The expression for calculating the comprehensive similarity of users is: Among them, α is the weight of social similarity in the calculation of user comprehensive similarity, β is the weight of user check-in location similarity in the calculation of user comprehensive similarity, and e ij For user u i and u j The comprehensive similarity between The social relationship graph Q(U,E) is used to represent the social relationship between users. U is the total number of users (u1,u2,u3,...,u M ) set, E is the weight of the edge e ij gather; Construct the user similarity matrix W, where M is the total number of users, e i,j Represented as user u i and user u j The similarity between Among them, the expression of the user similarity matrix W is as follows: Calculate the sum of the weights of the user and all edges connected to the user in the social relationship graph Q(U,E) to obtain the degree of each user's node; The degree of each user's node is represented by a matrix, and an M×M degree matrix D is obtained. The matrix D is a diagonal matrix, and the value of the diagonal corresponds to the value of the degree of the i-th user node in the i-th row; The expression of the degree of each user's node is: Normalize the matrix D to get the standardized Laplace matrix L Sysm ,in, Calculate L Sysm The eigenvalue of and the corresponding eigenvector L Sysm Arrange the eigenvalues ​​from large to small to obtain a new set of eigenvalues; Calculate the intrinsic gap sequence The subscript corresponding to the first maximum value in the intrinsic gap sequence is the number of clusters k; Treat each row as a new user with k features and apply clustering to obtain user grouping results; Output the user set U according to the category, that is, the user group node U = {U1,U2,U3,...,U k }.

5. The method for recommending points of interest based on knowledge graph according to claim 4, characterized in that: Based on the graph translation model, the specific contents of the user embedding vector, the interest point embedding vector, and the relationship embedding vector are obtained by preliminarily learning the interest point knowledge graph: The original triples (h, r, t) are defined as the original triples of user, check-in, and interest point, the triples of user, friend, and user, and the original triples of interest point, check-in sequence, and interest point; The user group node and the interest area node are jointly represented as the check-in relationship between the user and the interest point, and a triple of user, group check-in in a certain area, and interest point is obtained; The first triple plus the user, friend, user original triple and interest point, check-in sequence, interest point original triple together constitute the embedded triple; The process expression for forming the embedding triples is as follows: r c ={(U i ,R j )∪r|U i ∈U,R j ∈P}; Project the head entity h and the tail entity t from the entity space to the relational space and calculate the entity projection vector, where the entity projection vector is represented as, h r,c =M r h, t r,c =M r t, where M r For the relationship c The introduced projection matrix, M r ∈R k×d ; The objective function expression for calculating the entity projection vector is: Among them, ||h||2≤1, ||t||2≤1, ||r||2≤1, ||h r,c ||2≤1,||t r,c ||2≤1; Define an integral margin-based loss function for multi-level knowledge graphs; The expression of the integral margin-based loss function is: Among them, S is the set of correct triplets, S' is the set of incorrect triplets obtained by negative sampling of correct triplets, and γ is a positive boundary value used to control the distance between positive examples and negative examples.

6. The method for recommending points of interest based on knowledge graph according to claim 1, characterized in that: In step S5, the specific contents of constructing a gated graph neural network that introduces geographic information are as follows: Build a gated graph neural network (GGNN) and use it to iteratively update the embedding of learning nodes; The iterative update function of GGNN is: where x v is the feature vector of the interest point node v, is the initial state of node v, Represents the sign-in sequence of the current user. Represented as the in-degree adjacency matrix A in A row corresponding to node v, Represented as the out-degree adjacency matrix A out For a row corresponding to node v, the adjacency matrix A = [A in ,A out ],W in , W out is the parameter matrix, is the input vector at time step t, What is saved is the vector of the previous time step t-1, and the result is is the hidden state of the interest point v at time t; Use the embeddings of all nodes to express the check-in sequence graph; The gated graph neural network GGNN is improved according to the temporal and spatial features to obtain the spatiotemporal gated graph neural network.

7. The method for recommending points of interest based on knowledge graph according to claim 6, characterized in that: The gated graph neural network with geographic information is used on several check-in sequences in turn, and the specific content of the interest point representation with spatiotemporal characteristics is obtained as follows: At the temporal level, the check-in sequence of POIs is modeled separately for each user in the time slot; At the spatial level, the message propagation layer of GGNN integrates geographic information. For each location node in the POI check-in sequence graph, the weights of its input and output edges are adjusted based on the geographic distance; Generate a POI check-in sequence diagram containing spatial information; Based on the check-in data of user u, the check-in sequence S is obtained u ; The sign-in sequence S u The expression is: in is a time point of user u in time slot T Visited POIs,|S| is the total number of POIs visited during time slot T; Perform an update calculation on the adjacency matrix in the sign-in sequence subgraph, the update calculation includes: i The input edge weight calculation, location node e i The output edge weight of The location node e i The calculation expression of the input edge weight is: The location node e i The calculation expression of the output edge weight is: Among them, v i is the location node i, v j is the location node j, Represented as location node e i The input edge weight, W(v i ,v j ) represents the position node v i and position node v j The position interval weight between in (i) represents the location node v i The forward node set of Represented as location node e i The output edge weight, N out (i) is represented by the position node v i The backward node set of is the position node v i The location coordinates of is the position node v j The position coordinates, Δl is the proportional factor of the control distance, W(v i ,v j )∈(0,1]; Among them, the position node v i and position node v j The expression of the position interval weight between is: Calculate each sequence to get the adjacency matrix W of the sign-in sequence subgraph S _A, where W S _A=[W S _A in ,W S _A out ],W S _A in represents the in-degree connection matrix, W S _A out is the out-degree connection matrix; Based on the introduction of geographic information, the adjacency matrix W is calculated. S _A; Calculate the input vector corresponding to the i-th position node of user u in the check-in sequence S The expression for the input vector is: in, represents the updated in-degree connection matrix row i, Represented as the updated out-degree connection matrix row i, is the sign-in activity sequence vector of user u in time slot T, |S| is the number of sign-ins in the sign-in sequence, and is the parameter matrix. Modify the node update function of GGNN to obtain the node update function of STGGNN; The expression of the node update function of STGGNN is: in represents the graph input vector of the i-th node in the sequence graph, is the graph input vector corresponding to the i-th position node of user u in the check-in sequence S, represents the hidden state of the i-th position node at time slot T at time t-1, r i t and is the result after the node passes through the reset gate and the update gate. is the candidate hidden state of the position node at time t, is the hidden state of the position node at time t, W * is the parameter matrix; The interest point embedding vector obtained by CKGE is input into STGGNN as input data to obtain the output matrix in is the point of interest node p i The final learned result vector.

8. The method for recommending points of interest based on knowledge graph according to claim 1, characterized in that: In step S6, the specific content of the check-in relationship with user group characteristics and interest area characteristics is integrated through the graph attention mechanism model Graph Attention Network, GAT: Through the GAT model, it calculates the vector x after fusing the edge information ij , according to the vector x after fusing the edge information ij Calculate the attention coefficient between nodes; Calculate the fused vector x ij The expression is: x ij =W n h i ||W n h j ||W r r ij ; Calculate the attention coefficient a between nodes ij The expression is: Among them, W n and W r is the learnable weight matrix, r ij is the feature vector of the edge between node i and node j, || represents the vector connection operation, that is, for each pair of nodes i and j, their features and the feature vectors of the edge connecting them are spliced ​​together end to end, c T is the learnable weight vector, LeakyReLU is a nonlinear activation function; After introducing the edge feature, the information aggregation function is adjusted to obtain the updated information aggregation function; The expression of the update information aggregation function is: Where W h and W r They are the parameter matrices of node features and relationship features respectively; Construct a message aggregation model to achieve message aggregation; The expression of the message aggregation model is: Where W1 and W2 represent trainable parameter matrices, ⊙ represents vector multiplication, and the representation h of node i is aggregated by message aggregation. i Representation of aggregation with its first-order neighbor nodes Aggregate into a new current node representation; By stacking more propagation layers to capture high-order connection information, specifically, in the l-th step, the representation of the entity is recursively updated to the following form: in is the feature vector of its l-1 hop neighbor node j. The l-1 hop neighbor information from node i is aggregated after adding the attention mechanism and expressed as After recursively completing the lth layer, the target node obtains the final feature information from the lth-order neighbor; After L layers of information transmission and aggregation, multiple representations of user node u propagated at different levels are obtained. And multiple representations of the node of interest p: Since the outputs of different layers emphasize connectivity information of different orders; A layer aggregation mechanism is used to concatenate the output representations of each layer into a single vector; The expression for a single vector is: Among them, || indicates a connection operation. is the vector representation of user node u, is the vector representation of the interest point node p, and L represents the number of layers performing the aggregation operation; Perform the inner product of the user vector and the point of interest vector to obtain the predicted matching score of user u for point of interest p The expression for the inner product of the user vector and the interest point vector is: Optimize the graph attention mechanism model and set the binary cross entropy loss function; The expression of the binary cross entropy loss function is: Among them, y (u,p) represents the actual check-in of user u at point of interest p, represents the probability of user u visiting point of interest p predicted by the model.

Citation Information

Patent Citations

  • Interest point recommendation method and system based on STA-TCN neural network framework

    CN113158038A

  • Interest point recommendation method and system

    CN114385930A

  • Interest point recommendation method, device and system based on user sign-in data and medium

    CN115033810A

  • Point of interest recommendation method based on time sequence gating graph neural network

    CN116049578A

  • Knowledge graph recommendation method and system based on improved KGAT model

    WO2023097929A1

Cited By

  • Interest point recommendation method based on spatio-temporal knowledge graph attention network

    CN119922232A

  • A point of interest recommendation method based on spatiotemporal knowledge graph attention network

    CN119922232B

  • Deep learning-based crowd portrait interest map enhanced modeling method

    CN120541402A

  • Deep Learning-Based Approach to Enhance Interest Graph Modeling for User Profiles

    CN120541402B

  • Recommendation method and device for interest area of user dependency relationship embedded adaptive meta-path

    CN120821908A