POI recommendation method based on multi-modal time information fusion
Through the multi-modal time information fusion method, combined with the hypergraph neural network and GRU model, the user's spatiotemporal preference characteristics are dynamically captured, solving the problems of noise data and time scale in the existing technology, and improving the accuracy and timeliness of POI recommendation. .
Patent Information
- Application Number
- CN202410989997.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-07-23
AI Technical Summary
Existing POI recommendation algorithms are easily affected by noise data when obtaining users' preferences in the current period, and cannot effectively capture users' behavioral characteristics on different time scales, resulting in insufficient recommendation accuracy and timeliness.
Using the multi-modal time information fusion method, by constructing a time information model and a long-term and short-term preference model, combined with the hypergraph neural network and GRU model, the user's time and space preference characteristics are obtained, and the spatio-temporal information is fused through the gating mechanism to dynamically capture Users' interests change to improve recommendation accuracy.
It effectively improves the timeliness and accuracy of POI recommendations, can better understand users' behavior patterns and changes in interests, enhances the robustness of the recommendation system, and is suitable for areas such as user next destination recommendation and trajectory prediction.
Smart Images

Figure CN118779531A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer intelligence technology, and in particular to a POI recommendation method based on multi-modal time information fusion. Background Art
[0002] In modern society, with the acceleration of urbanization and the popularization of mobile Internet, location-based services (LBS) applications have become increasingly important. The next point of interest (POI) recommendation research aims to predict the next place a user will visit by analyzing the user's historical behavior data and geographic location information. This research not only has profound academic value, but also has broad significance in practical applications. From a technical perspective, POI recommendation research has promoted the development of fields such as data mining, machine learning, and artificial intelligence. How to extract useful information from massive data and how to improve the accuracy and real-time performance of recommendation algorithms are issues that deserve in-depth discussion and need to be solved urgently. From the perspective of research significance, first of all, accurate POI recommendations can significantly improve the convenience of users' lives and help them discover interesting places around them, such as restaurants, attractions, and shops. Users do not need to spend a lot of time searching to obtain location information that meets their interests and needs, thereby enhancing user experience, which is particularly important in the fast-paced modern life. Secondly, for merchants, the POI recommendation system can provide accurate marketing tools. By analyzing users' interests and behavior patterns, merchants can push relevant information to potential customers at the right time, attract more traffic, and improve sales performance. At the same time, this kind of precision marketing can also help businesses better manage and optimize resource allocation, reduce blind investment, and improve operational efficiency. In short, researching and developing the next POI recommendation technology can not only improve the quality of life of users, but also promote the intelligent development of society, which has important practical significance and broad application prospects.
[0003] At present, in order to recommend POI locations of interest to users from massive data, many researchers deeply mine the contextual information in the user's check-in sequence to obtain the user's location preference.
[0004] However, the current POI recommendation algorithm still has some limitations: on the one hand, when obtaining the user's current preferences, if the entire historical check-in sequence, including future check-in information, is considered, it is easily affected by noise data, thereby reducing the accuracy of the recommendation. On the other hand, the current methods generally rely on fixed time windows for long-term and short-term preference modeling, which may not capture the user's behavioral characteristics at different time scales. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention aims to propose a POI recommendation method based on multimodal time information fusion, which specifically includes the following steps:
[0006] Step 1: Get the dense vector of the point of interest POI and the encoding vector of the time interval and the spatially spaced encoding vector The points of interest are locations;
[0007] Step 2: Construct the temporal information model TIHN. Specifically, construct the temporal association matrix H in the temporal hypergraph neural network of temporal information t and the hyperedge weight matrix W t , the time information includes the POIs visited by the user within a preset time range, according to the time hypergraph neural network, and the time association matrix H in the time hypergraph neural network t and the hyperedge weight matrix W t , obtain the temporal feature X of the user visiting the POI t , X t Characterize the user's time preference;
[0008] Step 3: Construct a long-term and short-term preference model LSTN. Specifically, according to the user's check-in sequence information, construct multiple hypergraph neural networks based on long-term and short-term preferences. The check-in sequence information at least includes the arrangement order of the check-in records in the check-in sequence. The features X of the user's long-term and short-term preferences for visiting POIs are obtained through multiple hypergraph neural networks based on long-term and short-term preferences. a , X a Characterize users' long-term and short-term preferences;
[0009] Step 4: Construct the GRU model ST-GRU embedded with spatiotemporal gate
[0010] The features output by the TIHN model and the LSTHN model are combined to obtain the POI embedding features, which are specifically expressed by the following formula:
[0011]
[0012] Among them, ω e is a hyperparameter, X a is the feature output by the long-term and short-term preference model LSTN, X t is the feature output by the aggregated temporal information model TIHN; when ω e =1, represents the impact of long-term and short-term preferences on users’ POI visits; when ω e = 0, Indicates the impact of time information on users’ access to POIs;
[0013] Combining the time interval coding vector and the space interval coding vector, as well as the T-shift gating for the time interval coding vector and the S-shift gating for the space interval coding vector, the formulas of T-shift gating and S-shift gating are obtained, which are specifically expressed by the following formula:
[0014]
[0015] Among them, ω t is the weight of the time interval encoding vector, ω s is the weight of the spatial interval encoding vector, ω tx is the weight of the POI embedding feature in T-shift gating, ω sx is the weight of the POI embedding feature in S-shift gating, b t Indicates the bias introduced by T-shift gating, b s represents the bias introduced by S-shift gating, σ represents the Sigmoid activation function, Ts i is the output of T-shift gating, which indicates the influence of time interval encoding vector on POI embedding features, Ss i is the output of T-shift gating, which indicates the influence of spatial interval encoding vector on POI embedding features. express The lth POI embedding feature in ;
[0016] The output of the S-shift gate is combined with the output of the T-shift gate. Each POI embedding feature in is multiplied by the point, which is specifically expressed by the following formula:
[0017]
[0018] Among them, ω st represents the weight of the embedded feature in the ST-shift gating, where the ST-shift gating is the gating obtained by integrating the S-shift gating and the T-shift gating, b st represents the bias introduced into ST-shift gating, ⊙ represents element-by-element multiplication, is the output of the ST-shift gate, Represents features including time interval features and spatial interval features;
[0019] Will After controlling the reset R gate and the updated Z gate, the updated features of the gate are obtained, and the output of the ST-shift-GRU unit is obtained, which is specifically expressed by the following formula:
[0020]
[0021] Among them, ω R is the previous hidden state h in R gate i-1 The weight, ω Z is the previous hidden state h in Z gate i-1 The weight of b R is the previous hidden state h in R gate i-1 The bias, b Z is the previous hidden state h in Z gate i-1 The bias, ω Rx Embedding features for POI in R gating The weight, ω Zx Embed features for Z gating The weight of b Rx Embedding features for POI in R gating The bias, b Zx Embed features for Z gating The bias, h ′ is the candidate hidden state, ω hx Embedding features for POI The weight, ω h is the hidden state h i-1 The weight of b hx Embedding features for POI The bias, b h is the hidden state h i-1 Bias of
[0022] The sign-in sequence contains multiple sign-in records, each of which corresponds to an ST-shift-GRU unit. The hidden state h output by the ST-shift-GRU unit corresponding to the current sign-in record is i , passed to the ST-shift-GRU unit corresponding to the next sign-in record of the current sign-in record for calculation, and the ST-shift-GRU unit corresponding to the current sign-in record also outputs Y i f , Y i f Y is the node feature output by the i-th ST-shift-GRU unit in the f-th layer. i f Passed to the i+1th ST-shift-GRU unit of the fth layer, where Y i f It is expressed by the following formula:
[0023]
[0024] Among them, ST-shift-GRU Cellis a single ST-shift-GRU unit, is the hidden state of the i-1th ST-shift-GRU unit in the fth layer, represents the spatial interval encoding vector, represents the time interval encoding vector, Y i f-1 Represents the node features output by the i-th ST-shift-GRU unit in the f-1th layer;
[0025] The outputs of all ST-shift-GRU units in the last layer are concatenated, which is specifically expressed by the following formula:
[0026]
[0027] Among them, Concat() represents the connection operation, Y F Represents the output features of all ST-shift-GRU units in the Fth layer, which is the last layer. is the output feature of the first ST-shift-GRU unit in layer F, is the output feature of the second ST-shift-GRU unit in layer F, is the output feature of the nth ST-shift-GRU unit in the Fth layer;
[0028] Y F Perform nonlinear transformation and obtain the following formula:
[0029]
[0030] Among them, ω Y represents the weight matrix, b Y represents the bias vector; Indicates the user's preference for visiting POIs;
[0031] Step 5: Next POI prediction and model optimization
[0032] Predict the POI that the user will visit next and get the preference score of POIl at time t+1 It is specifically expressed by the following formula:
[0033]
[0034] Wherein, POI1 is the number of the POI, POI1 indicates the POI numbered 1, and POI1 is the POI to be predicted. represents the user's preference for visiting POI at time t, represents the transpose of the position matrix of POIl in the check-in sequence, Represents the preference score of the user visiting POI1 at time t+1.
[0035] Optionally, step 1 specifically includes the following steps:
[0036] Step 1.1: Encode the ID number of the POI and convert the encoding of the POI ID number into a P-dimensional dense vector;
[0037] Step 1.2: Obtain the encoding vector of the time interval and the encoding vector of the spatial interval between two adjacent check-in records in the user's check-in sequence, wherein the check-in sequence includes a plurality of check-in records arranged in chronological order, and the check-in records at least include the latitude and longitude of the POI where the user is located, and the check-in time when the user checks in at the POI;
[0038] Calculate the sign-in sequence S u Two adjacent sign-in records and Time interval It is calculated by the following formula:
[0039]
[0040] in, Represents the sign-in sequence S u The i-th sign-in record in Represents the sign-in sequence S u The i-1th sign-in record, express The corresponding check-in time, express The corresponding check-in time;
[0041] Calculate the sign-in sequence S u Two adjacent sign-in records and The space interval It is calculated by the following formula:
[0042]
[0043] Among them, haversine(·) is a function used to calculate the distance between two locations. express The longitude and latitude of the corresponding check-in location, express The latitude and longitude of the corresponding check-in location;
[0044] Set the time interval threshold Δt max and the spatial interval threshold Δd max , the formula is as follows:
[0045]
[0046] in, represents the time interval after the threshold is updated, Represents the spatial interval after threshold update;
[0047] calculate and The relative time interval between as well as and The relative space between It is calculated by the following formula:
[0048]
[0049] in, Indicates the time interval with the smallest value among multiple time intervals. Indicates the spatial interval with the smallest value among multiple spatial intervals;
[0050] right and The relative time interval between as well as and The relative space between Normalization is performed, and the specific formula is:
[0051]
[0052] in, Indicates the time interval with the largest value among multiple time intervals. Represents the spatial interval with the largest value among multiple spatial intervals. represents the normalized relative time interval, Represents the normalized relative spatial interval;
[0053] Will and By converting it into a P-dimensional vector in the form of equal encoding, we get and is the encoding vector of the time interval, representing the check-in sequence Sign-in sequence The transfer time difference between is a spatially spaced encoding vector representing a sign-in sequence Sign-in sequence The transfer space difference between them.
[0054] Optionally, step 2 specifically includes the following steps:
[0055] Step 2.1: Construct the temporal correlation matrix H in the hypergraph neural network with temporal information t and the hyperedge weight matrix W t , the time information includes POIs visited by the user within a preset time range;
[0056] Divide the time information into 24 time periods according to the hour and create a time correlation matrix H t , the time correlation matrix H t The formula is:
[0057]
[0058] Where v represents the node of POI in the hypergraph based on time information, e t represents the hyperedge in the hypergraph based on time information; h t (v,e t ) is a function representing the hyperedge e t Is there a node v, h on t (1,1) indicates whether hyperedge 1 is connected to node 1; h t (1,2) indicates whether hyperedge 2 connects node 1, h t (1,24) indicates whether hyperedge 24 connects node 1, h t (2,1) indicates whether hyperedge 1 connects node 2, h t (2,2) indicates whether hyperedge 2 is connected to node 2, h t (2,24) indicates whether hyperedge 24 connects node 2, h t (|L|,1) indicates whether hyperedge 1 connects node |L|, h t (|L|,2) indicates whether hyperedge 2 connects node |L|, h t (|L|,24) indicates whether hyperedge 24 connects node |L|;
[0059] When h t (v,e t )=1, indicating the hyperedge e t The node v connected to the POI; when h t (v,e t )=0, indicating the hyperedge e t Node v is not connected to POI;
[0060] Create a hyperedge weight matrix W based on time information t , the hyperedge weight matrix W based on time information t Represents the number of POIs visited by the user at each moment, and the hyperedge weight matrix W of the time information t After normalization, we get the following formula:
[0061]
[0062] Where diag represents a diagonal matrix, represents the number of nodes connected by hyperedge e1, represents the number of nodes connected by hyperedge e2, Represents the hyperedge e 24 The number of connected nodes, m represents the number of check-in records in the check-in sequence;
[0063] Step 2.2: Obtaining users’ time preferences through temporal hypergraph neural network
[0064] In order to obtain the time correlation matrix H t and the hyperedge weight W t After that, through the hypergraph convolution operation, the activation function is introduced to obtain the f-th layer hypergraph neural network, the formula is:
[0065]
[0066] Among them, RELU is a nonlinear activation function. Denotes the time-dependent matrix H t The transpose of is the node feature matrix of the fth layer of the temporal hypergraph neural network. When f = 0, represents the node feature matrix of the 0th layer of the temporal hypergraph neural network, X is a dense vector; D v,t The diagonal matrix representing the node degrees of the temporal hypergraph neural network, D e,t The diagonal matrix representing the hyperedge degree of the temporal hypergraph neural network, is the weight matrix of the f-th layer of the temporal hypergraph neural network;
[0067] Set the diagonal matrix D of the hyperedge degree e,t The constraints are expressed by the following formula:
[0068] D e,t =max{D e,t ,ξ};
[0069] Among them, ξ is the constraint condition and ξ is the preset value;
[0070] The multi-layer hypergraph neural network is aggregated through the aggregation function, which is expressed by the following formula:
[0071]
[0072] Among them, X t is the feature output by the aggregated temporal information model TIHN, X t Characterize the user's time preference.
[0073] Optionally, step 3 specifically includes the following steps:
[0074] Step 3.1: construct multiple hypergraph neural networks based on the user's sign-in sequence information, wherein the sign-in sequence information at least includes the arrangement order of the sign-in records in the sign-in sequence;
[0075] Since there are multiple check-in records in the check-in sequence that contain the same POI, the sequence interval between POIs is calculated to obtain the sequence interval matrix A, where the sequence interval is the interval between the positions of the check-in records corresponding to two different POIs in the check-in sequence. The sequence interval matrix A is specifically expressed by the following formula:
[0076]
[0077] Among them, l1 is the number of POI, l1 corresponds to POIl1; l2 is the number of POI, l2 corresponds to POIl2; l |L| is the number of the POI, l |L| Corresponding to POI1 |L| ; a(l1,l1) is used to calculate the minimum sequence interval between POIl1 and POIl1; a(l1,l2) is used to calculate the minimum sequence interval between POIl1 and POIl2; a(l1,l |L| ) is used to calculate POIl1 and POIl |L| The minimum sequence interval between POIl2 and POIl1; a(l2,l2) is used to calculate the minimum sequence interval between POIl2 and POIl2; a(l2,l |L| ) is used to calculate POIl2 and POIl |L| The minimum sequence interval between |L| ,l1) is used to calculate POIl |L| and POIl1; a(l |L| ,l2) is used to calculate POIl |L| The minimum sequence interval between POI1 and POI2; a(l |L| ,l |L| ) is used to calculate POIl |L| and POIl |L| The minimum sequence interval between
[0078] For the sign-in sequence, K different sequence spans are set. The sequence spans are used to construct the sequence association matrix. For the sign-in sequence of each sequence span, a hypergraph neural network is constructed to obtain K hypergraph neural networks, where the K sequence spans are: The weight of each hypergraph neural network is expressed as: {ω1,ω2,…,ω K},and
[0079] For each sign-in sequence with a sequence span, a hypergraph neural network is constructed according to the corresponding sequence span. Specifically, for the k-th sequence span, a k-level sequence association matrix is constructed. It is specifically expressed by the following formula:
[0080]
[0081] Among them, 1≤i≤|L|, is the node i of the hypergraph corresponding to the kth sequence span based on long-term and short-term preferences; 1≤j≤|L|, represents the hyperedge j of the hypergraph corresponding to the kth sequence span based on long-term and short-term preferences;
[0082] Represents a hyperedge Is there a node on when hour, Indicates POIl i and POIl j The minimum sequence interval between them is less than the set kth sequence span, and the user visits POIl i POI has been visited before j , Represents a hyperedge There are nodes on when hour, Indicates POIl i With another POIl j The minimum sequence interval between them is greater than the set kth sequence span, or the user visits POIl i Have not visited POIl before j , Represents a hyperedge The node does not exist on
[0083] Set the number of times a user visits a POI as a hypergraph Hyperedge weight matrix based on long-term and short-term preferences in Among them, the hyperedge weights of K different hypergraph neural networks are the same, and the hyperedge weight matrix for long-term and short-term preferences is After normalization, we get the following formula:
[0084]
[0085] Where diag represents a diagonal matrix, Indicates that the user accesses POIl i The frequency of, m represents the number of check-in records in the check-in sequence;
[0086] Step 3.2: Obtain users’ long-term and short-term preferences through multiple hypergraph neural networks
[0087] After getting the k-level sequence association matrix and hyperedge weights based on long-term and short-term preferences After that, through the hypergraph convolution operation, the RELU activation function is introduced to obtain the l-th layer hypergraph neural network corresponding to the k-th sequence span. The f-th layer hypergraph neural network is expressed by the following formula:
[0088]
[0089] in, Represents the k-level sequence association matrix The transpose of is the node feature matrix of the kth sequence span, is the node feature matrix of the fth layer, where the node feature matrix of the 0th layer is a dense vector; The diagonal matrix of node degrees of the hypergraph neural network representing the kth sequence span, The diagonal matrix representing the hyperedge degree of the hypergraph neural network for the kth sequence span, is the weight matrix of the f-layer hypergraph neural network;
[0090] The multi-layer hypergraph neural network that aggregates the k-th check-in sequence through the sum-pooling aggregation function is expressed by the following formula:
[0091]
[0092] in, is the feature output by the hypergraph neural network after aggregating the kth sequence span;
[0093] Through the layer weight ω k The features of the hypergraph neural network output of K sequence spans are stacked, which is specifically expressed by the following formula:
[0094]
[0095] Among them, X a It is the characteristics of the output of the long-term and short-term preference model LSTHN.
[0096] Optionally, the spatiotemporal gate embedded GRU model ST-GRU is optimized by a cross entropy loss function, and the formula for optimizing the cross entropy loss function is:
[0097]
[0098] Where J represents the loss function value, u represents user u, U represents all users, S(u) is the check-in sequence, i represents the number of the POI in the check-in sequence, is the prediction parameter of the GRU model ST-GRU embedded with the spatiotemporal gate, that is, the prediction output of the GRU model ST-GRU embedded with the spatiotemporal gate, represents the preference score of user u for POIi, POIi represents POI numbered i, λ is the regularization coefficient, and ||θ||2 represents the L2 regularization of all weight parameters of the GRU model ST-GRU embedded in the spatiotemporal gate.
[0099] The beneficial effects of adopting the above technical solution are:
[0100] A POI recommendation method with multimodal temporal information fusion has the following advantages over the existing working methods: First, the multimodal temporal information fusion model MTFNR (Multimodal temporalinformation fusion for next POI recommendation) obtains the features of POI through hypergraph neural network. This method of aggregating node feature information through the connection relationship of hyperedges can effectively capture the complex relationship between data; Second, considering that the user's behavioral preferences may change over time, the MTFNR model integrates the long-short term preferences model LSTN (long-short term preferences with hypergraph neural network) and the time information model TIHN (time informations with hypergraph neural network) to learn the changes in users' interest habits in different periods. Among them, the time information modeling can obtain the user's behavior patterns in different time periods and better understand the user's behavior rules; the long-short term preference modeling can dynamically capture the user's interest changes and increase the timeliness of POI recommendation; Finally, the MTFNR model adds the user's temporal and spatial interval information on the basis of the GRU model, effectively capturing the dependency of the check-in sequence, making the recommendation system more robust, thereby improving the overall performance of the model. In addition, the MTFNR model can capture the user's interest changes in a timely manner, provide users with more accurate POI recommendations, and help users quickly find places that meet their current interests and needs, saving time and energy. It has certain application value. This method can be applied to the user's next destination recommendation, trajectory prediction of mobile devices, and other future prediction and recommendation fields under known historical location trajectories. BRIEF DESCRIPTION OF THE DRAWINGS
[0101] Figure 1 A schematic flow chart of a POI recommendation method using multimodal time information fusion in an embodiment of the present invention;
[0102] Figure 2 A bar graph of ablation experiment results in an embodiment of the present invention;
[0103] Figure 3 A bar graph of a sequence interval research result in an embodiment of the present invention. DETAILED DESCRIPTION
[0104] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0105] In view of the problems existing in the prior art, a multimodal temporal information fusion for next POI recommendation (MTFNR) model is proposed. First, in order to obtain the user's preference habits in different periods, multiple hypergraph neural networks are constructed to analyze the user's behavior patterns in different periods respectively. In order to avoid introducing interference factors, only the check-in sequences visited in the current period are considered to reduce the impact of noise on the model recommendation performance. Secondly, the next POI recommendation task is carried out through temporal information and long-term and short-term preference fusion modeling to more comprehensively obtain the user's preference habits and improve the timeliness and accuracy of the recommendation. A large number of experiments on real LBSN datasets have demonstrated the superior performance of the MTFNR model. Experimental results show that the MTFNR model is superior to the current method in terms of recall rate. The POI recommendation method of multimodal temporal information fusion provided by the present invention, combined with Figure 1 , which may specifically include the following steps:
[0106] Step 1: Get the dense vector of the point of interest POI and the encoding vector of the time interval and the spatially spaced encoding vector The points of interest are places, such as stores, schools, etc.;
[0107] Step 1.1: Encode the ID number of the POI and convert the encoding of the POI ID number into a P-dimensional dense vector;
[0108] The encoding can be selected as Embedding encoding; the ID number of the POI can be 15487, 24586, 1254, and after encoding the POI ID number, it can be 0, 1, 2; the P-dimensional dense vector contains the characteristics of the POI node, so the node feature matrix is represented by X, X∈R N*P , where N is the number of POI nodes, R represents the dimension, and X∈R N*P Indicates that the dimension of the node feature matrix is N*P.
[0109] Step 1.2: Obtain the encoding vector of the time interval and the encoding vector of the spatial interval between two adjacent check-in records in the user's check-in sequence, wherein the check-in sequence includes multiple check-in records arranged in chronological order, and the check-in record includes at least the longitude and latitude of the POI where the user is located, and the check-in time when the user checks in at the POI. The check-in record may also include information such as the user ID and the POI ID.
[0110] Calculate the sign-in sequence S u Two adjacent sign-in records and Time interval It is calculated by the following formula:
[0111]
[0112] in, Represents the sign-in sequence S u The i-th sign-in record in Represents the sign-in sequence S u The i-1th sign-in record, express The corresponding check-in time, express The corresponding check-in time;
[0113] Calculate the sign-in sequence S u Two adjacent sign-in records and The space interval It is calculated by the following formula:
[0114]
[0115] Among them, haversine(·) is a function used to calculate the distance between two locations. express The longitude and latitude of the corresponding check-in location, express The latitude and longitude of the corresponding check-in location;
[0116] Considering that in the preference model, too large time-space interval information may cause redundancy problems, the present invention sets the time interval threshold Δt max and the spatial interval threshold Δd max , control the time-space interval within a certain range, the time interval threshold Δt max and the spatial interval threshold Δd max The formula is as follows:
[0117]
[0118]
[0119] in, represents the time interval after the threshold is updated, Represents the spatial interval after threshold update;
[0120] calculate and The relative time interval between as well as and The relative space between It is calculated by the following formula:
[0121]
[0122] in, Indicates the time interval with the smallest value among multiple time intervals. Indicates the spatial interval with the smallest value among multiple spatial intervals;
[0123] right and The relative time interval between as well as and The relative space between Normalization is performed, and the specific formula is:
[0124]
[0125] in, Indicates the time interval with the largest value among multiple time intervals. Represents the spatial interval with the largest value among multiple spatial intervals. represents the normalized relative time interval, Represents the normalized relative spatial interval;
[0126] Will and By converting it into a P-dimensional vector in the form of equal encoding, we get and is the encoding vector of the time interval, representing the check-in sequence Sign-in sequence The transfer time difference between express The dimension is P, is a spatially spaced encoding vector representing a sign-in sequence Sign-in sequence The transfer space difference between express The dimension is P;
[0127] Step 2: Construct the temporal information model TIHN. Specifically, construct the temporal association matrix H in the temporal hypergraph neural network of temporal information t and the hyperedge weight matrix W t , the time information includes the POIs visited by the user within a preset time range, according to the time hypergraph neural network, and the time association matrix H in the time hypergraph neural network t and the hyperedge weight matrix W t, obtain the temporal feature X of the user visiting the POI t , X t Characterize the user's time preference;
[0128] Step 2.1: Construct the temporal correlation matrix H in the hypergraph neural network HGNN with temporal information t and the hyperedge weight matrix W t , the time information includes POIs visited by the user within a preset time range;
[0129] The present invention creates a time association matrix H t When the time information is divided into 24 time periods according to the hour, the time association matrix H is created based on the statistics of whether the user has visited the POI at each time point. t , the time correlation matrix H t The formula is:
[0130]
[0131] Among them, H t ∈R N*24 , represents the time correlation matrix H t The dimension is N*24, v∈V t Represents the node of POI in the hypergraph based on time information, e t ∈E t represents a hyperedge in a hypergraph based on time information, which can also be understood as a certain moment; h t (v,e t ) is a function representing the hyperedge e t Is there a node v on it, which can also be understood as e t Whether the user has visited the POI corresponding to node v at the moment, h t (1,1) indicates whether hyperedge 1 is connected to node 1, which can also be understood as whether the user visited node 1 at point 1; h t (1,2) indicates whether hyperedge 2 is connected to node 1, which can also be understood as whether the user visited node 1 at point 2. t (1,24) indicates whether hyperedge 24 is connected to node 1, which can also be understood as whether the user visited node 1 at 24 o'clock. t (2,1) indicates whether hyperedge 1 is connected to node 2, which can also be understood as whether the user visited node 2 at point 1. t (2,2) indicates whether hyperedge 2 is connected to node 2, which can also be understood as whether the user visited node 2 at point 2. t (2,24) indicates whether hyperedge 24 is connected to node 2, which can also be understood as whether the user visited node 2 at 24 o'clock. t(|L|,1) indicates whether hyperedge 1 is connected to node |L|, which can also be understood as whether the user visited node |L| at point 1. t (|L|,2) indicates whether hyperedge 2 connects node |L|, h t (|L|,24) indicates whether hyperedge 24 connects node |L|, which can also be understood as whether the user visited node |L| at 24 o'clock;
[0132] When h t (v,e t )=1, indicating the hyperedge e t The node v connected to the POI can also be understood as the user in e t The POI corresponding to node v is visited at time h t (v,e t )=0, indicating the hyperedge e t A node v that is not connected to a POI can also be understood as a node in e t The POI corresponding to node v has not been visited at this moment.
[0133] In a hypergraph neural network, the weight matrix of a hyperedge usually represents the strength of association or weight ratio between hyperedges. When creating a temporal hypergraph neural network, the hyperedge weight matrix W based on temporal information is t represents the number of POIs visited by the user at each moment, so the time periodicity of the user's visit to POI can be better learned. At the same time, in order to help the model better capture the distribution characteristics of the data and improve the performance and generalization ability of the model, the hyperedge weight matrix W t After normalization, we get the following formula:
[0134]
[0135] Among them, W t ∈R 24*24 , indicating W t The dimension is 24*24; diag represents a diagonal matrix, It represents the number of nodes connected by hyperedge e1, which can also be understood as the total number of POIs visited by user u at time e1. It represents the number of nodes connected by hyperedge e2, which can also be understood as the total number of POIs visited by user u at time e2. Represents the hyperedge e 24 The number of nodes connected can also be understood as the number of nodes that user u has connected to. 24 The total number of POIs visited at the moment, m represents the number of check-in records in the check-in sequence;
[0136] Step 2.2: Obtaining users’ time preferences through temporal hypergraph neural network
[0137] In order to obtain the time correlation matrix H t and the hyperedge weight W t After that, through the hypergraph convolution operation, the activation function is introduced to obtain the f-th layer hypergraph neural network, the formula is:
[0138]
[0139] Among them, RELU is a nonlinear activation function. Denotes the time-dependent matrix H t The transpose of is the node feature matrix of the fth layer of the temporal hypergraph neural network, express The dimension is N*P, where N is the number of nodes and P is the number of features of each node. When f=0, represents the node feature matrix of the 0th layer of the temporal hypergraph neural network, X is a dense vector; D v,t The diagonal matrix representing the node degrees of the temporal hypergraph neural network, D e,t The diagonal matrix representing the hyperedge degree of the temporal hypergraph neural network is normalized to help reduce the impact of degree differences between different nodes or hyperedges on model training. is the weight matrix of the f-th layer of the temporal hypergraph neural network;
[0140] Since a user may not visit any POI at a certain moment, the hyper-edge degree matrix D e,t , there may be a problem of 0 in , which makes the inverse matrix of the hyperedge degree matrix undesirable and the hypergraph convolution operation cannot be performed. In this regard, by adding constraints to change D e,t The value of the diagonal matrix D e,t The constraints are expressed by the following formula:
[0141] D e,t =max{D e,t ,ξ};
[0142] Among them, ξ is the constraint condition and ξ is the preset value;
[0143] In order to help capture information at different levels, multiple hypergraph aggregation layers are stacked through aggregation functions to propagate and update node embeddings to obtain richer and more expressive feature representations. The formula for aggregating multiple layers of hypergraph neural networks through aggregation functions is as follows:
[0144]
[0145] Among them, X t is the feature output by the aggregated temporal information model TIHN, X t Characterize the user's time preference;
[0146] Step 3: Construct a long-term and short-term preference model LSTN. Specifically, according to the user's check-in sequence information, construct multiple hypergraph neural networks based on long-term and short-term preferences. The check-in sequence information at least includes the arrangement order of the check-in records in the check-in sequence. The features X of the user's long-term and short-term preferences for visiting POIs are obtained through multiple hypergraph neural networks based on long-term and short-term preferences. a , X a Characterize users' long-term and short-term preferences;
[0147] Step 3.1: construct multiple hypergraph neural networks HGNN according to the user's check-in sequence information, wherein the check-in sequence information at least includes the arrangement order of the check-in records in the check-in sequence;
[0148] Since there are multiple check-in records in the check-in sequence that contain the same POI, the sequence interval between POIs is calculated to obtain the sequence interval matrix A, where the sequence interval is the interval between the positions of the check-in records corresponding to two different POIs in the check-in sequence. The sequence interval matrix A is specifically expressed by the following formula:
[0149]
[0150] Among them, A∈R N*N , indicating that the dimension of A is N*N, l1 is the number of POI, l1 corresponds to POIl1; l2 is the number of POI, l2 corresponds to POIl2; l |L| is the number of the POI, l |L| Corresponding to POI1 |L| ; a(l1,l1) is used to calculate the minimum sequence interval between POIl1 and POIl1; a(l1,l2) is used to calculate the minimum sequence interval between POIl1 and POIl2; a(l1,l |L| ) is used to calculate POIl1 and POIl |L| The minimum sequence interval between POIl2 and POIl1; a(l2,l2) is used to calculate the minimum sequence interval between POIl2 and POIl2; a(l2,l |L| ) is used to calculate POIl2 and POIl |L| The minimum sequence interval between |L| ,l1) is used to calculate POIl |L| and POIl1; a(l |L| ,l2) is used to calculate POIl |L| The minimum sequence interval between POI1 and POI2; a(l |L| ,l |L|) is used to calculate POIl |L| and POIl |L| The minimum sequence interval between
[0151] The present invention only calculates the sequence intervals of other POIs that the user has visited before visiting a certain POI, that is, if the user visits the POI location l i POI has been visited before j , then it is considered that POIl i and POIl j There is a sequence interval between them, which needs to be calculated. i Have not visited POIl before j , POIl is not considered i and POIl j Because only the serial intervals between POIs that have been visited can be associated with user behavior and preferences. At the same time, this approach can also simplify the data processing and analysis process, making the analysis results clearer and more interpretable.
[0152] In order to learn users’ long-term and short-term preferences more comprehensively, K different sequence spans are set for the sign-in sequence. The sequence span is used to construct the sequence association matrix. For the sign-in sequence of each sequence span, a hypergraph neural network is constructed to obtain K hypergraph neural networks, where the K sequence spans are: The weight of each hypergraph neural network is expressed as: {ω1,ω2,…,ω K},and
[0153] For each sign-in sequence with a sequence span, a hypergraph neural network is constructed according to the corresponding sequence span. Specifically, for the k-th sequence span, a k-level sequence association matrix is constructed. It is specifically expressed by the following formula:
[0154]
[0155] in, express The dimension is N*N, 1≤i≤|L|, is the node i of the hypergraph corresponding to the kth sequence span based on long-term and short-term preferences; 1≤j≤|L|, represents the hyperedge j of the hypergraph corresponding to the kth sequence span based on long-term and short-term preferences;
[0156] Represents a hyperedge Is there a node on when hour, Indicates POIl i and POIl j The minimum sequence interval between them is less than the set kth sequence span, and the user visits POIl i POI has been visited before j , Represents a hyperedge There are nodes on when hour, Indicates POIl i With another POIl j The minimum sequence interval between them is greater than the set kth sequence span, or it means that the user is visiting POIl i Have not visited POIl before j , Represents a hyperedge The node does not exist on
[0157] Set the number of times a user visits a POI as a hypergraph Hyperedge weight matrix based on long-term and short-term preferences in Among them, the hyperedge weights of K different hypergraph neural networks are the same, and the hyperedge weight matrix for long-term and short-term preferences is After normalization, we get the following formula:
[0158]
[0159] in, express The dimension is N*N, diag represents a diagonal matrix, Indicates that the user accesses POIl i The frequency of, m represents the number of check-in records in the check-in sequence;
[0160] Step 3.2: Obtain users’ long-term and short-term preferences through multiple hypergraph neural networks
[0161] After getting the k-level sequence association matrix and hyperedge weights based on long-term and short-term preferences After that, through the hypergraph convolution operation, the RELU activation function is introduced to obtain the l-th layer hypergraph neural network corresponding to the k-th sequence span. The f-th layer hypergraph neural network is expressed by the following formula:
[0162]
[0163] in, Represents the k-level sequence association matrix The transpose of is the node feature matrix of the kth sequence span, and express The dimension is N*P, is the node feature matrix of the fth layer, where the node feature matrix of the 0th layer is a dense vector; The diagonal matrix of node degrees of the hypergraph neural network representing the kth sequence span, The diagonal matrix representing the hyperedge degree of the hypergraph neural network for the kth sequence span, is the weight matrix of the f-layer hypergraph neural network;
[0164] The multi-layer hypergraph neural network that aggregates the k-th check-in sequence through the sum-pooling aggregation function is expressed by the following formula:
[0165]
[0166] in, is the feature output by the hypergraph neural network after aggregating the kth sequence span;
[0167] In order to help capture information at different levels, the layer weight ω k The features of the hypergraph neural network output of K sequence spans are stacked, which is specifically expressed by the following formula:
[0168]
[0169] Among them, X a It is the characteristics of the output of the long-term and short-term preference model LSTHN.
[0170] Step 4: Construct the GRU model ST-GRU embedded with spatiotemporal gate
[0171] In order to obtain user preferences with enhanced time perception, the goal is to fuse the POI feature representation learned from the TIHN model and the LSTHN model. Therefore, after learning the POI node representation from the two models, the feature embedding of POI is obtained by element-wise addition, and the feature embedding is adjusted according to a hyperparameter ω e To control the influence of different aspects, so as to more accurately express the characteristics of POI, based on this, the features output by the TIHN model and the LSTHN model are fused to obtain the POI embedding features, which are specifically expressed by the following formula:
[0172]
[0173] Among them, ω e is a hyperparameter, X a is the feature output by the long-term and short-term preference model LSTN, X t is the feature output by the aggregated temporal information model TIHN; ω eis an adjustable parameter. e =1, represents the impact of long-term and short-term preferences on users’ POI visits; when ω e = 0, Indicates the impact of time information on users’ access to POIs;
[0174] According to experience, since users prefer to visit POIs that are closer to their current location, the smaller the transfer time and transfer space, the greater the probability of recommending the next location. t and ω s , adjust the impact of transfer time and transfer space, and design T-shift gating for time transfer features and S-shift gating for space transfer features respectively. These two gatings are used to improve the problem that nonlinear spatiotemporal information cannot be embedded in the GRU model.
[0175] Based on this, the present invention combines the time interval coding vector and the space interval coding vector, as well as the T-shift gating for the time interval coding vector and the S-shift gating for the space interval coding vector, to obtain the formulas of T-shift gating and S-shift gating, which are specifically expressed by the following formula:
[0176]
[0177] Among them, ω t is the weight of the time interval encoding vector, ω t ∈R P , which means ω t The dimension of is P; ω s is the weight of the spatial interval encoding vector, ω s ∈R P , which means ω s The dimension of is P; ω tx is the weight of the POI embedding feature in T-shift gating, ω tx ∈R P , which means ω tx The dimension of is P; ω sx is the weight of the POI embedding feature in the S-shift gating, ω sx ∈R P , which means ω sx The dimension of b is P; t Indicates the bias introduced by T-shift gating, b t ∈R P , indicating b t The dimension of b is P; s represents the bias introduced by S-shift gating, b s ∈RP , indicating b s The dimension is P; σ represents the Sigmoid activation function, Ts i is the output of T-shift gating, which indicates the influence of time interval encoding vector on POI embedding features, Ts i ∈R P , indicating Ts i The dimension is P; Ss i is the output of T-shift gating, indicating the influence of the spatial interval encoding vector on the POI embedding feature, Ss i ∈R P , indicating Ss i The dimension is P; express The lth POI embedding feature in ;
[0178] The output of the S-shift gate is combined with the output of the T-shift gate. Each POI embedding feature in is multiplied by a dot, so that the influence of the spatiotemporal transfer feature is loaded in each dimension, which is specifically expressed by the following formula:
[0179]
[0180] The ST-shift gating is a gating obtained by integrating the S-shift gating and the T-shift gating. st represents the weight of the embedded feature in ST-shift gating, ω st ∈R P , which means ω st The dimension of b is P; st Indicates the bias introduced into ST-shift gating, b st ∈R P , indicating b st The dimension is P; ⊙ represents element-by-element multiplication, is the output of the ST-shift gate, Represents features including time interval features and spatial interval features;
[0181] Will The R gate after control reset and the Z gate after control update, specifically, h is calculated by the reset attribute of the R gate ′ , through Z gate control update and forget, the gated updated features are obtained and passed to the hidden state of the next unit, and the output of the ST-shift-GRU unit is obtained, which is specifically expressed by the following formula:
[0182]
[0183] Among them, ω R is the previous hidden state h in R gate i-1 The weight, ω R ∈R P , which means ω R The dimension of is P; ω Z is the previous hidden state h in Z gate i-1 The weight, ω Z ∈R P , which means ω Z The dimension of b is P; R is the previous hidden state h in R gate i-1 The bias, ω Z ∈R P , which means ω Z The dimension of b is P; Z is the previous hidden state h in Z gate i-1 The bias, b Z ∈R P , indicating b Z The dimension of is P; ω Rx Embedding features for POI in R gating The weight, ω Rx ∈R P , which means ω Rx The dimension of is P; ω Zx Embed features for Z gating The weight, ω Zx ∈R P , which means ω Zx The dimension of b is P; Rx Embedding features for POI in R gating The bias, b Rx ∈R P , indicating b Rx The dimension of b is P; Zx Embed features for Z gating The bias, b Zx ∈R P , indicating b Zx The dimension is P; h ′ is the candidate hidden state, ω hx Embedding features for POI The weight, ω hx ∈R P , which means ω hx The dimension of is P; ω h is the hidden state h i-1 The weight, ω h ∈R P , which means ω h The dimension of b is P; hx Embedding features for POI The bias, b hx ∈R P , indicating b hx The dimension of b is P; h is the hidden state h i-1 The bias of h ∈R P , indicating b h The dimension of is P.
[0184] The sign-in sequence contains multiple sign-in records, each of which corresponds to an ST-shift-GRU unit. The hidden state h output by the ST-shift-GRU unit corresponding to the current sign-in record is i , passed to the ST-shift-GRU unit corresponding to the next sign-in record of the current sign-in record for calculation, and the ST-shift-GRU unit corresponding to the current sign-in record also outputs Y i f , Y i f Y is the node feature output by the i-th ST-shift-GRU unit in the f-th layer. i f Passed to the i+1th ST-shift-GRU unit of the fth layer, where Y i f It is expressed by the following formula:
[0185]
[0186] Among them, ST-shift-GRU Cell is a single ST-shift-GRU unit, is the hidden state of the i-1th ST-shift-GRU unit in the fth layer, represents the spatial interval encoding vector, represents the time interval encoding vector, Y i f-1 Represents the node features output by the i-th ST-shift-GRU unit in the f-1th layer;
[0187] In addition, in order to help the ST-GRU model better understand and learn complex feature representations and improve the model's performance and generalization capabilities, multiple layers of ST-shift-GRU units are connected and stacked, and the outputs of all ST-shift-GRU units in the last layer are concatenated, which is specifically expressed by the following formula:
[0188]
[0189] Among them, Concat() represents the connection operation, Y FRepresents the output features of all ST-shift-GRU units in the Fth layer, which is the last layer. is the output feature of the first ST-shift-GRU unit in layer F, is the output feature of the second ST-shift-GRU unit in layer F, is the output feature of the nth ST-shift-GRU unit in the Fth layer;
[0190] To improve the robustness of the model, F Perform nonlinear transformation and obtain the following formula:
[0191]
[0192] Among them, ω Y represents the weight matrix, b Y represents the bias vector; Indicates the user's preference for visiting POIs;
[0193] Finally, through the above steps, multiple ST-shift-GRU units are connected in series, the current node weight is updated and the parent hidden state is passed, and the memory features of the historical nodes are recursively transferred step by step to converge to the last node. By stacking multiple layers of ST-GRU, the effect of feature convergence and effective extraction is achieved.
[0194] Step 5: Next POI prediction and model optimization
[0195] In order to estimate the user's preference for the next POI to visit, the preference score of each candidate POI is calculated by the softmax function. The last node in is taken as the estimation object, because this node aggregates the features of all nodes. The timestamp of the last node is t. At timestamp t+1, the POI that the user will visit next is predicted to obtain the preference score of POIl at time t+1. It is specifically expressed by the following formula:
[0196]
[0197] Wherein, POI1 is the number of the POI, POI1 indicates the POI numbered 1, and POI1 is the POI to be predicted. represents the user's preference for visiting POI at time t, represents the transpose of the position matrix of POIl in the check-in sequence, represents the preference score of the user visiting POI1 at time t+1;
[0198] After obtaining the user preference estimate, the cross entropy loss function is used to optimize the objective function, and L2 regularization (also known as weight decay) is introduced to prevent overfitting problems and improve the generalization ability of the model. The formula for optimizing the cross entropy loss function is:
[0199]
[0200] Where J represents the loss function value, u represents user u, U represents all users, S(u) is the check-in sequence, i represents the number of the POI in the check-in sequence, is the prediction parameter of the GRU model ST-GRU embedded with the spatiotemporal gate, that is, the prediction output of the GRU model ST-GRU embedded with the spatiotemporal gate, represents the preference score of user u for POIi, POIi represents POI numbered i, λ is the regularization coefficient, and ||θ||2 represents the L2 regularization of all weight parameters of the GRU model ST-GRU embedded in the spatiotemporal gate.
[0201] In order to verify the technical effect of the method of the present invention, the present embodiment is tested and verified as follows:
[0202] (1) Dataset acquisition and preprocessing
[0203] Experiments were conducted on three public real-world datasets: Foursquare-NYC (NYC), Foursquare-TKY (TKY), and Gowalla (GOW), all of which were collected from location-based social media platforms. The NYC and TKY datasets collected check-ins in New York and Tokyo, covering a time span of about 10 months (from April 12, 2012 to February 16, 2013); the GOW dataset was collected in California and Nevada on the Gowalla platform, with a longer time period and wider geographical coverage. The dataset includes anonymized user IDs, POI location IDs with latitude and longitude information, POI location category IDs, and check-in timestamps.
[0204] During the preprocessing process, POIs and users with less than 5 historical visit records in the NYC and TKY datasets were filtered out, and POIs and users with less than 10 historical visit records in the GOW dataset were filtered out. Finally, all check-in records were sorted in chronological order. For users with n check-in records, the [1, n-2]th data was selected as the input of the training set data, and the n-1th data was the label of the training set; the [2, n-1]th data was selected as the input of the test set data, and the nth data was the label of the test set. The statistical results of the preprocessed data set are summarized in Table 1.
[0205] Table 1 Description of the dataset
[0206]
[0207] (2) Model parameter setting
[0208] The model was developed using the PyTorch framework. The Adam optimizer used the default beta value, the learning rate was 2e-3, and the maximum length of the sequence was 100. Dropout was used in the long-short term preferences with hypergraph neural network (LSTHN) model, the time informations with hypergraph neural network (TIHN) model, and the spatiotemporal gate embedded GRU (ST-GRU) model. Dropout was set to 0.3 in the LSTHN model and the TIHN model, and to 0.2 in the ST-GRU model. At the same time, the sequence span in the LSTHN model was set to {25, 50, 75, 100}.
[0209] (3) Baseline Model
[0210] MC: A common approach to solving recommendation problems, which learns latent representations of users and POIs via matrix factorization.
[0211] FPMC: A method that combines matrix factorization (MF) and Markov chains, and introduces the Bayesian Personalized Ranking (BPR) framework to learn model parameters for recommendation.
[0212] PRME: A personalized ranking metric embedding method that integrates ordinal information, personal preferences, and geographic influences.
[0213] STGN: An LSTM model that models the spatiotemporal intervals in the check-in sequence through a gating mechanism to capture users’ short-term and long-term preferences.
[0214] PLSPL: A model that combines users’ long-term and short-term preferences through their linear combination units.
[0215] STAN: A state-of-the-art model that learns regularities between non-adjacent locations and non-consecutive visits via a two-layer attention architecture.
[0216] GETNext: A model that enhances next POI prediction via a user-unknown global trajectory flow graph and a novel graph-augmented transformer.
[0217] (4) Experimental results and analysis
[0218] Experiments were conducted on three datasets to compare the performance of the proposed multimodal temporal information fusion for next POI recommendation (MTFNR) model and the baseline model, and the results on recall@k (k=5, 10) were obtained. The results are shown in Table 2.
[0219] Table 2 Performance comparison on three datasets
[0220]
[0221]
[0222] Among them, recall represents the recall rate, recall@k represents the top K recall rate, which can also be understood as the recall rate of the first K items.
[0223] As can be seen in the table, the evaluation indicators of the MTFNR model are better than the baseline model on the three datasets. In particular, the MTFNR model achieved an improvement of 2.32%, 15.46% and 63.78% in the Top-5 recall rate on the NYC, TKY and GOW datasets, and an improvement of 16.91%, 33.06% and 84.04% in the Top-10 recall rate, which proves the effectiveness of the MTFNR model and the accuracy of modeling through multimodal temporal information fusion. This improvement is mainly attributed to the following aspects: (1) The MTFNR model obtains the feature representation of POI through the hypergraph neural network (HGNN). Compared with the traditional graph neural network (GNN), HGNN aggregates the information of nodes through the connection relationship of hyperedges to achieve the update and propagation of node features. This method can more effectively capture the multivariate and deep relationships between data, so that the hypergraph can more naturally represent the complex relationships in the real world. (2) The MTFNR model takes into account that the user's behavior preferences may change over time, so it creates a time information model and a long-term and short-term preference model. The time information model can obtain the user's behavior patterns in different time periods and better understand the user's behavior patterns; the long-term and short-term preference model can dynamically capture the user's interest changes and increase the timeliness of POI recommendations. (3) The MTFNR model introduces the user's time and space interval information on the basis of the GRU model, effectively capturing the dependency of the check-in sequence, making the recommendation system more robust, thereby improving the overall performance of the model.
[0224] (5) Ablation experimental study
[0225] In order to verify the effectiveness of each component in the MTFNR model, ablation experiments are performed on the NYC, TKY and GOW datasets. Figure 2 As shown:
[0226] Among them, the no_TIHN and LSTHN variants delete the influence of temporal information modeling and user long-term and short-term preference modeling, and only represent the influence of the model by random embedding coding; no_LSTHN: This variant deletes the influence of long-term and short-term preference modeling and only considers the influence of temporal information modeling; no_TIHN: This variant deletes the influence of temporal information modeling and only considers the influence of long-term and short-term preference modeling.
[0227] From the results, (1) compared with the MTFNR model, the performance of the no_LSTHN variant and the no_TIHN variant has declined to a certain extent, which shows that temporal information modeling and user long-term and short-term preference modeling have an impact on the performance of the model and need to be fully modeled. In addition, in the TKY dataset, the performance of the no_LSTHN variant is better than that of the no_TIHN variant; while in the NYC and GOW datasets, the performance of the no_TIHN variant is better than that of the no_LSTHN variant, indicating that the importance of each component in different datasets is also different. (2) Compared with other variants, the recommendation performance of the no_TIHN and LSTHN variant has declined significantly, which shows that the user's historical check-in sequence contains rich contextual information data. Modeling the temporal information through the check-in timestamp and modeling the user's long-term and short-term preferences through the sequence interval can improve the recommendation effect of the model.
[0228] (6) Sequence interval study
[0229] In order to reflect the effectiveness of local serial interval modeling of user long-term and short-term preferences, the local serial interval and global serial interval are used to model user long-term and short-term preferences respectively. The results are as follows Figure 3 shown.
[0230] The local serial interval refers to the calculation of the serial interval of a certain POI, which only considers the check-in information before the POI, and does not consider the check-in information after the POI, while the global serial interval considers all the check-in information. The data in the figure shows that in the three data sets, the effect of modeling the user's long-term and short-term preference model through the local serial interval is better than the effect of modeling the user's long-term and short-term preference model through the global serial interval. This is because the local serial interval only considers part of the check-in information, making the calculated serial interval more dense and containing more useful information about user behavior; in contrast, the global serial interval needs to consider more check-in information, which may cause information sparsity and affect the accuracy of recommendations. In addition, the global serial interval includes all check-in information and may be disturbed by more noise and outliers, thereby affecting the accuracy of the recommendation results; the local serial interval only considers the most recent check-in information, which can better reflect the user's current interests and preferences, reduce the impact of noise, and improve the accuracy of recommendations.
[0231] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.
Claims
1. A POI recommendation method based on multimodal time information fusion, characterized in that: include: Step 1: Get the dense vector of the point of interest POI and the encoding vector of the time interval and the spatially spaced encoding vector The points of interest are locations; Step 2: Construct the temporal information model TIHN. Specifically, construct the temporal association matrix H in the temporal hypergraph neural network of temporal information t and the hyperedge weight matrix W t , the time information includes the POIs visited by the user within a preset time range, according to the time hypergraph neural network, and the time association matrix H in the time hypergraph neural network t and the hyperedge weight matrix W t , get the temporal feature X of the user visiting the POI t , X t Characterize the user's time preference; Step 3: Construct a long-term and short-term preference model LSTN. Specifically, according to the user's check-in sequence information, construct multiple hypergraph neural networks based on long-term and short-term preferences. The check-in sequence information at least includes the arrangement order of the check-in records in the check-in sequence. The features X of the user's long-term and short-term preferences for visiting POIs are obtained through multiple hypergraph neural networks based on long-term and short-term preferences. a , X a Characterize users' long-term and short-term preferences; Step 4: Construct the GRU model ST-GRU embedded with spatiotemporal gate The features output by the TIHN model and the LSTHN model are combined to obtain the POI embedding features, which are specifically expressed by the following formula: Among them, ω e is a hyperparameter, X a is the feature output by the long-term and short-term preference model LSTN, X t is the feature output by the aggregated temporal information model TIHN; when ω e =1, represents the impact of long-term and short-term preferences on users’ POI visits; when ω e = 0, Indicates the impact of time information on users’ access to POIs; Combining the time interval coding vector and the space interval coding vector, as well as the T-shift gating for the time interval coding vector and the S-shift gating for the space interval coding vector, the formulas of T-shift gating and S-shift gating are obtained, which are specifically expressed by the following formula: Among them, ω t is the weight of the time interval encoding vector, ω s is the weight of the spatial interval encoding vector, ω tx is the weight of the POI embedding feature in T-shift gating, ω sx is the weight of the POI embedding feature in S-shift gating, b t Indicates the bias introduced by T-shift gating, b s represents the bias introduced by S-shift gating, σ represents the Sigmoid activation function, Ts i is the output of T-shift gating, which indicates the influence of time interval encoding vector on POI embedding features, Ss i is the output of T-shift gating, which indicates the influence of spatial interval encoding vector on POI embedding features. express The lth POI embedding feature in ; The output of the S-shift gate is combined with the output of the T-shift gate. Each POI embedding feature in is multiplied by the point, which is specifically expressed by the following formula: Among them, ω st represents the weight of the embedded feature in the ST-shift gating, where the ST-shift gating is the gating obtained by integrating the S-shift gating and the T-shift gating, b st represents the bias introduced into ST-shift gating, ⊙ represents element-by-element multiplication, is the output of the ST-shift gate, Represents features including time interval features and spatial interval features; Will After controlling the reset R gate and the updated Z gate, the updated features of the gate are obtained, and the output of the ST-shift-GRU unit is obtained, which is specifically expressed by the following formula: Among them, ω R is the previous hidden state h in R gate i-1 The weight, ω Z is the previous hidden state h in Z gate i-1 The weight of b R is the previous hidden state h in R gate i-1 The bias, b Z is the previous hidden state h in Z gate i-1 The bias, ω Rx Embedding features for POI in R gating The weight, ω Zx Embed features for Z gating The weight of b Rx Embedding features for POI in R gating The bias, b Zx Embed features for Z gating The bias, h ′ is the candidate hidden state, ω hx Embedding features for POI The weight, ω h is the hidden state h i-1 The weight of b hx Embedding features for POI The bias, b h is the hidden state h i-1 Bias of The sign-in sequence contains multiple sign-in records, each of which corresponds to an ST-shift-GRU unit. The hidden state h output by the ST-shift-GRU unit corresponding to the current sign-in record is i , passed to the ST-shift-GRU unit corresponding to the next sign-in record of the current sign-in record for calculation, and the ST-shift-GRU unit corresponding to the current sign-in record also outputs Y i f , Y i f Y is the node feature output by the i-th ST-shift-GRU unit in the f-th layer. i f Passed to the i+1th ST-shift-GRU unit of the fth layer, where Y i f It is expressed by the following formula: Among them, ST-shift-GRU Cell is a single ST-shift-GRU unit, is the hidden state of the i-1th ST-shift-GRU unit in the fth layer, represents the spatial interval encoding vector, represents the time interval encoding vector, Y i f-1 Represents the node features output by the i-th ST-shift-GRU unit in the f-1th layer; The outputs of all ST-shift-GRU units in the last layer are concatenated, which is specifically expressed by the following formula: Among them, Concat() represents the connection operation, Y F Represents the output features of all ST-shift-GRU units in the Fth layer, which is the last layer. is the output feature of the first ST-shift-GRU unit in layer F, is the output feature of the second ST-shift-GRU unit in layer F, is the output feature of the nth ST-shift-GRU unit in the Fth layer; Y F Perform nonlinear transformation and obtain the following formula: Among them, ω Y represents the weight matrix, b Y represents the bias vector; Indicates the user's preference for visiting POIs; Step 5: Next POI prediction and model optimization Predict the POI that the user will visit next and get the preference score of POIl at time t+1 It is specifically expressed by the following formula: Wherein, POI1 is the number of the POI, POI1 indicates the POI numbered 1, and POI1 is the POI to be predicted. represents the user's preference for visiting POI at time t, represents the transpose of the position matrix of POIl in the check-in sequence, Represents the preference score of the user visiting POI1 at time t+1.
2. The POI recommendation method based on multimodal time information fusion according to claim 1, characterized in that: Step 1 specifically includes the following steps: Step 1.1: Encode the ID number of the POI and convert the encoding of the POI ID number into a P-dimensional dense vector; Step 1.2: Obtain the encoding vector of the time interval and the encoding vector of the spatial interval between two adjacent check-in records in the user's check-in sequence, wherein the check-in sequence includes a plurality of check-in records arranged in chronological order, and the check-in records at least include the latitude and longitude of the POI where the user is located, and the check-in time when the user checks in at the POI; Calculate the sign-in sequence S u Two adjacent sign-in records and Time interval It is calculated by the following formula: in, Represents the sign-in sequence S u The i-th sign-in record in Represents the sign-in sequence S u The i-1th sign-in record, express The corresponding check-in time, express The corresponding check-in time; Calculate the sign-in sequence S u Two adjacent sign-in records and The space interval It is calculated by the following formula: Among them, haversine(·) is a function used to calculate the distance between two locations. express The longitude and latitude of the corresponding check-in location, express The latitude and longitude of the corresponding check-in location; Set the time interval threshold Δt max and the spatial interval threshold Δd max , the formula is as follows: in, represents the time interval after the threshold is updated, Represents the spatial interval after threshold update; calculate and The relative time interval between as well as and The relative space between It is calculated by the following formula: in, Indicates the time interval with the smallest value among multiple time intervals. Indicates the spatial interval with the smallest value among multiple spatial intervals; right and The relative time interval between as well as and The relative space between Normalization is performed, and the specific formula is: in, Indicates the time interval with the largest value among multiple time intervals, d u max Represents the spatial interval with the largest value among multiple spatial intervals. represents the normalized relative time interval, Represents the normalized relative spatial interval; Will and By converting it into a P-dimensional vector in the form of equal encoding, we get and is the encoding vector of the time interval, representing the check-in sequence Sign-in sequence The transfer time difference between is a spatially spaced encoding vector representing a sign-in sequence Sign-in sequence The transfer space difference between them.
3. The POI recommendation method based on multimodal time information fusion according to claim 1, characterized in that: Step 2 specifically includes the following steps: Step 2.1: Construct the temporal correlation matrix H in the hypergraph neural network with temporal information t and the hyperedge weight matrix W t , the time information includes POIs visited by the user within a preset time range; Divide the time information into 24 time periods according to the hour and create a time correlation matrix H t , the time correlation matrix H t The formula is: Where v represents the node of POI in the hypergraph based on time information, e t represents the hyperedge in the hypergraph based on time information; h t (v,e t ) is a function representing the hyperedge e t Is there a node v, h on t (1,1) indicates whether hyperedge 1 is connected to node 1; h t (1,2) indicates whether hyperedge 2 connects node 1, h t (1,24) indicates whether hyperedge 24 connects node 1, h t (2,1) indicates whether hyperedge 1 connects node 2, h t (2,2) indicates whether hyperedge 2 is connected to node 2, h t (2,24) indicates whether hyperedge 24 connects node 2, h t (|L|,1) indicates whether hyperedge 1 connects node |L|, h t (|L|,2) indicates whether hyperedge 2 connects node |L|, h t (|L|,24) indicates whether hyperedge 24 connects node |L|; When h t (v,e t )=1, indicating the hyperedge e t The node v connected to the POI; when h t (v,e t )=0, indicating the hyperedge e t Node v that is not connected to POI; Create a hyperedge weight matrix W based on time information t , the hyperedge weight matrix W based on time information t Represents the number of POIs visited by the user at each moment, and the hyperedge weight matrix W of the time information t After normalization, we get the following formula: Where diag represents a diagonal matrix, represents the number of nodes connected by hyperedge e1, represents the number of nodes connected by hyperedge e2, Represents the hyperedge e 24 The number of connected nodes, m represents the number of check-in records in the check-in sequence; Step 2.2: Obtaining users’ time preferences through temporal hypergraph neural network In order to obtain the time correlation matrix H t and the hyperedge weight W t After that, through the hypergraph convolution operation, the activation function is introduced to obtain the f-th layer hypergraph neural network, the formula is: Among them, RELU is a nonlinear activation function. Denotes the time-dependent matrix H t The transpose of is the node feature matrix of the fth layer of the temporal hypergraph neural network. When f = 0, represents the node feature matrix of the 0th layer of the temporal hypergraph neural network, X is a dense vector; D v,t The diagonal matrix representing the node degrees of the temporal hypergraph neural network, D e,t The diagonal matrix representing the hyperedge degree of the temporal hypergraph neural network, is the weight matrix of the f-th layer of the temporal hypergraph neural network; Set the diagonal matrix D of the hyperedge degree e,t The constraints are expressed by the following formula: D e,t =max{D e,t ,ξ}; Among them, ξ is the constraint condition and ξ is the preset value; The multi-layer hypergraph neural network is aggregated through the aggregation function, which is expressed by the following formula: Among them, X t is the feature output by the aggregated temporal information model TIHN, X t Characterize the user's time preference.
4. The POI recommendation method based on multimodal time information fusion according to claim 1, characterized in that: Step 3 specifically includes the following steps: Step 3.1: construct multiple hypergraph neural networks based on the user's sign-in sequence information, wherein the sign-in sequence information at least includes the arrangement order of the sign-in records in the sign-in sequence; Since there are multiple check-in records in the check-in sequence that contain the same POI, the sequence interval between POIs is calculated to obtain the sequence interval matrix A, where the sequence interval is the interval between the positions of the check-in records corresponding to two different POIs in the check-in sequence. The sequence interval matrix A is specifically expressed by the following formula: Among them, l1 is the number of POI, l1 corresponds to POIl1; l2 is the number of POI, l2 corresponds to POIl2; l |L| is the number of the POI, l |L| Corresponding to POI1 |L| ; a(l1, l1) is used to calculate the minimum sequence interval between POIl1 and POIl1; a(l1, l2) is used to calculate the minimum sequence interval between POIl1 and POIl2; a(l1, l |L| ) is used to calculate POIl1 and POIl |L| The minimum sequence interval between POIl2 and POIl1; a(l2, l2) is used to calculate the minimum sequence interval between POIl2 and POIl2; a(l2, l |L| ) is used to calculate POIl2 and POIl |L| The minimum sequence interval between |L| , l1) is used to calculate POIl |t| and POIl1; a(l |L| , l2) is used to calculate POIl |L| The minimum sequence interval between POI1 and POI2; a(l |L| , l |L| ) is used to calculate POIl |L| and POIl |L| The minimum sequence interval between For the sign-in sequence, K different sequence spans are set. The sequence spans are used to construct the sequence association matrix. For the sign-in sequence of each sequence span, a hypergraph neural network is constructed to obtain K hypergraph neural networks, where the K sequence spans are: The weight of each hypergraph neural network is expressed as: {ω1, ω2, …, ω K },and For each sign-in sequence with a sequence span, a hypergraph neural network is constructed according to the corresponding sequence span. Specifically, for the k-th sequence span, a k-level sequence association matrix is constructed. It is specifically expressed by the following formula: Among them, 1≤i≤|L|, is the node i of the hypergraph corresponding to the kth sequence span based on long-term and short-term preferences; 1≤j≤|L|, represents the hyperedge j of the hypergraph corresponding to the kth sequence span based on long-term and short-term preferences; Represents a hyperedge Is there a node on when hour, Indicates POIl i and POIl j The minimum sequence interval between them is less than the set kth sequence span, and the user Ask POIl i POI has been visited before j , Represents a hyperedge There are nodes on when hour, Indicates POIl i With another POIl j The minimum sequence interval between them is greater than the set kth sequence span, or the user visits POIl i Have not visited POIl before j , Represents a hyperedge The node does not exist on Set the number of times a user visits a POI as a hypergraph Hyperedge weight matrix based on long-term and short-term preferences in Among them, the hyperedge weights of K different hypergraph neural networks are the same, and the hyperedge weight matrix for long-term and short-term preferences is After normalization, we get the following formula: Where diag represents a diagonal matrix, Indicates that the user accesses POIl i The frequency of, m represents the number of check-in records in the check-in sequence; Step 3.2: Obtain users’ long-term and short-term preferences through multiple hypergraph neural networks After getting the k-level sequence association matrix and hyperedge weights based on long-term and short-term preferences After that, through the hypergraph convolution operation, the RELU activation function is introduced to obtain the l-th layer hypergraph neural network corresponding to the k-th sequence span. The f-th layer hypergraph neural network is expressed by the following formula: in, Represents the k-level sequence association matrix The transpose of is the node feature matrix of the kth sequence span, is the node feature matrix of the fth layer, where the node feature matrix of the 0th layer is a dense vector; The diagonal matrix of node degrees of the hypergraph neural network representing the kth sequence span, The diagonal matrix representing the hyperedge degree of the hypergraph neural network for the kth sequence span, is the weight matrix of the f-layer hypergraph neural network; The multi-layer hypergraph neural network that aggregates the k-th check-in sequence through the sum-pooling aggregation function is expressed by the following formula: in, is the feature output by the hypergraph neural network after aggregating the kth sequence span; Through the layer weight ω k The features of the hypergraph neural network output of K sequence spans are stacked, which is specifically expressed by the following formula: Among them, X a It is the characteristics of the output of the long-term and short-term preference model LSTHN.
5. The POI recommendation method based on multimodal time information fusion according to claim 1, characterized in that: The GRU model ST-GRU embedded with the spatiotemporal gate is optimized by the cross entropy loss function, and the formula for optimizing the cross entropy loss function is: Where J represents the loss function value, u represents user u, U represents all users, S(u) is the check-in sequence, i represents the number of the POI in the check-in sequence, is the prediction parameter of the GRU model ST-GRU embedded with the spatiotemporal gate, that is, the prediction output of the GRU model ST-GRU embedded with the spatiotemporal gate, represents the preference score of user u for POIi, POIi represents POI numbered i, λ is the regularization coefficient, and ‖θ‖2 represents the L2 regularization of all weight parameters of the GRU model ST-GRU embedded in the spatiotemporal gate.
Citation Information
Patent Citations
Interest point recommendation method and device based on multi-modal knowledge graph
CN117609605A
Points of interest (POI) ranking based on mobile user related data
US20130262479A1
Cited By
Next interest point recommendation method based on multi-relation variational contrast learning
CN119311961A
Next point of interest recommendation method based on multi-relation variational contrastive learning
CN119311961B
Travel site selection method and system based on multi-modal fusion
CN119358987A
Multi-modal sequence recommendation method based on time interval perception
CN119415780A
Method and device for recommending POI at specific time and storage medium
CN121278190A
