A next point of interest recommendation method based on multi-active region perception network
By employing a multi-active-region perception network approach, active regions and regional transfer maps are constructed. Combining graph convolutional networks and multi-head attention mechanisms, the problems of user trajectory variability and data sparsity in point-of-interest recommendation are addressed, thereby improving recommendation accuracy.
Patent Information
- Application Number
- CN202310454568.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2043-04-25
AI Technical Summary
Existing interest-based recommendation methods have failed to effectively address the issues of user trajectory variability, data sparsity, and user behavior trajectory clustering, resulting in low recommendation accuracy.
The Multi Active Region Aware Network (MARAN) method is adopted to construct directed graphs of active regions and region transfers by extracting users' historical behavior trajectories and region transfer trajectories. User preferences are learned by using graph convolutional networks and multi-head attention mechanisms, and interest points are predicted by combining LSTM to capture temporal order relationships.
It improves the accuracy of interest point recommendations, alleviates the data sparsity problem, and can better predict users' future behavior patterns.
Smart Images

Figure CN116401461B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of feature extraction and model construction, and particularly relates to a next point-of-interest recommendation method based on a multi-active region perception network. BACKGROUND
[0002] With the continuous development of location-based social networks, a large number of geotagged datasets such as Foursquare, Gowalla and Yelp provide a large amount of historical check-in information and other multi-modal information of users, and these massive data provide new opportunities for point-of-interest (POI) recommendation, which has gradually become an important topic in the field of recommendation systems. As an important part of smart city applications, point-of-interest recommendation can use the historical check-in information and other multi-modal information (such as check-in time, point-of-interest category, geographic location, social reputation, etc.) of users to learn the behavior characteristics and action rules of users, and thus recommend the places of interest to users.
[0003] Previous studies have researched the influencing factors of point-of-interest recommendation in view of the characteristics of the point-of-interest recommendation task, and have proposed many models. In early studies, researchers focused on using matrix decomposition and Markov chain methods to learn user behavior data. After that, models based on recurrent neural networks have been widely used by people. Although the current point-of-interest prediction methods are effective, the variability of user trajectories is not well addressed, and the aggregation of user behavior trajectories in space is not fully utilized. At the same time, the problem of data sparsity is becoming increasingly serious. In the face of millions of candidate objects, users often only visit a small number of places, and the data sparsity is strong.
[0004] Therefore, how to design a reasonable point-of-interest recommendation method for complex and diverse user behavior trajectories is a technical problem to be solved at present. SUMMARY
[0005] In order to overcome the shortcomings of the prior art, the present application provides a next point-of-interest recommendation method based on a multi-active region perception network, which can effectively solve the above problems.
[0006] The technical scheme specifically adopted by the present application is as follows:
[0007] A next point-of-interest recommendation method based on a multi-active region perception network, comprising the following steps:
[0008] S1, for the user historical behavior trajectory in the data set, respectively extract user ID, place ID, user access time and latitude and longitude GPS information; according to the user historical behavior trajectory and the geographical position information, the region transfer trajectory is extracted, and the historical behavior trajectory substring and the region transfer trajectory substring of each user are generated respectively, and the trajectory data set is constructed;
[0009] S2, for the historical behavior trajectory of each user in S1, the active center is determined according to the activity degree of the user, and a plurality of local active regions of the current user are demarcated according to the aggregation behavior of the user historical behavior trajectory in space, the central place direction is added on the basis of keeping the user historical behavior trajectory unchanged, and the user active region directed graph is established; at the same time, for the region transfer trajectory of each user in S1, the active center is determined according to the activity degree of the user, and the region transfer trajectory directed graph is directly constructed according to the region transfer trajectory;
[0010] S3, for the historical behavior trajectory substring and the region transfer trajectory substring of each user in S1, and the user active region directed graph and the region transfer trajectory directed graph constructed in S2, the model training set is constructed;
[0011] S4, the multiple active region-aware network (MARAN) is trained by using the training set constructed in S3, so as to obtain the next interest point recommendation model, which is used for inputting the historical behavior trajectory and the region transfer trajectory before the to-be-predicted time period, and predicting the interest point that the user may visit next time;
[0012] S5, for the target user, the historical behavior trajectory and the region transfer trajectory are input into the next interest point recommendation model, and the interest point that the target user may visit next time is predicted.
[0013] As preferred, the S1 specifically comprises the following substeps:
[0014] S11, obtaining a data set, which contains a user set and a point of interest POI set Each point of interest POI has an associated geographical position coordinate (lat, lon), and lat and lon represent its latitude and longitude respectively; a check-in behavior is represented as c=(u, l, t), which represents that the user u visits the place l at t time; the user historical behavior trajectory is a series of check-in behavior sequences sorted by the check-in time of the user, which is represented by S(u)=[c1, c2, …, cn], which represents the historical check-in behavior sequence of the user u, and n is the sequence length; the historical behavior trajectory S(u) of the user u is divided into a plurality of equal length substrings S(u)=[S1, S2, …, Sn], and each substring represents the historical behavior trajectory of the user u in a certain time period. n ] represents the historical check-in behavior sequence of the user ; the historical behavior trajectory S(u) of the user u is divided into a plurality of equal length substrings S(u)=[S1, S2, …, Sn], and each substring represents the historical behavior trajectory of the user u in a certain time period.k ], k∈[1,|S(u)| / m], where |S k | = m is a substring S k If a substring is less than m in length, it is padded with zeros at the end of the substring.
[0015] S12. Using the Geohash-5 method, the latitude and longitude coordinates of Points of Interest (POIs) are encoded to represent spatial location information, thus obtaining the spatial location information set G = {g1, g2, ..., g...} of all POIs. |G| Each point of interest (POI) has only one corresponding Geohash-5 location code. Based on the historical behavior trajectory S(u) in S11, the corresponding regional migration trajectory S is obtained according to the relationship between the locations in the trajectory and the Geohash-5 location codes. g (u)=[g1,g2,…,g n ] and its substrings in The length of the substring is m. If the length of the substring is less than m, it is padded with zeros at the end.
[0016] S13. The behavior trajectory substrings and regional transfer trajectory substrings of all users are used to construct the trajectory dataset.
[0017] Preferably, step S2 specifically includes the following sub-steps:
[0018] S21. Based on the user's historical behavior trajectory S(u), obtain the access frequency information of user u at each location l. freq And select all locations with access frequencies exceeding a set frequency to form an active regional center set. The screening process is represented as follows:
[0019]
[0020] Where |S(u)| represents the length of the current user's historical behavior trajectory; This represents the set of POIs currently accessed by the user; α is a preset hyperparameter, calculated based on the initially set α. Then take α as α / 2 and recalculate;
[0021] S22, Set of active region centers obtained in S21 Treat each location in the set as the center location of an active region, and calculate the center location of each active region in the set. Other non-central locations The Haversine distance between pq =Haversine (GPS) pGPS q ), according to the distance d pq each non-active region center point is divided into the nearest active region, thereby obtaining a user active region set
[0022] S23, according to the user region transfer trajectory S g (u), obtaining the access frequency information g freq of the user u in each region g, and screening out the regions with access frequency higher than the set frequency to form an active region set G c (u), and the screening process is represented as:
[0023] G c (u) = {g | g freq ≥ β | S g (u) |, g ∈ G(u)}
[0024] where |S g (u) | represents the length of the current user region transfer trajectory; G(u) represents the region set visited by the current user; β is a preset hyperparameter, and if |G c (u) | calculated according to the initial set β is 0, β is taken as β / 2 and recalculated;
[0025] S24, according to the active region center set obtained in S21 and S22 and the user active region set C(u), the non-center point in each active region is directed to the center point on the basis of keeping the user historical behavior trajectory unchanged, and a user active region directed graph is established where V is a node set, E is an edge set; in addition, for the geographical position relationship, the region transfer trajectory directed graph is directly constructed according to the region transfer trajectory S g (u)
[0026] As a preferred, the S3 specifically comprises the following sub-steps:
[0027] S31, for each user, the user historical behavior trajectory S(u) generated in S11 is divided according to a preset proportion to form a training set and a test set required for model training;
[0028] S32, the sample data in the training set and the test set are obtained from the trajectory data set, the user historical behavior trajectory substring and the region transfer trajectory substring generated in the steps S11 and S12, and the real labels corresponding to the two substrings are respectively generated and Then, obtain the directed graph of user activity areas and the directed graph of regional transfer trajectories established in step S2, and then construct them as labeled training samples in the training set and the test set.
[0029] Preferably, step S4 specifically includes the following sub-steps:
[0030] S41. When training the multi-active region perception network using the training set constructed in S3, first perform word embedding operations on users, POIs, and regions encoded with Geohash-5, to obtain user word vectors of dimension d. POI word vectors and regional word vectors
[0031] S42. Utilize the active region aggregation module to learn the spatial clustering features of user behavior trajectories to represent the unique local features of multiple active regions. The active region aggregation module specifically includes the following sub-steps:
[0032] S421. Use a graph convolutional network (GCN) to process the directed graph of the user activity region. Perform aggregation operations, where the input is a matrix composed of word vectors of graph nodes. The aggregation operation is as follows:
[0033]
[0034] Where σ is the activation function; A is the graph. The adjacency matrix, W is the degree matrix; h is the learnable parameter matrix; h is the number of recurrence layers; after aggregation, the active region center feature matrix is obtained.
[0035] Simultaneously, the same graph convolutional network (GCN) aggregation method is used to aggregate directed graphs of regional transfer trajectories. Perform aggregation operations, where the input is The aggregated active region feature matrix is obtained.
[0036] S422, Based on the active region feature matrix aggregated from S421 and active region feature matrix Each through active region center set and active region set G c (u) Filter the data and calculate the mean value of the central locations to obtain the user's preference information for POIs. and regional preference information And then splice the two together to obtain The calculation method is as follows:
[0037]
[0038] where denotes concatenation operation;
[0039] S423, capturing POI and region preference through multi-head attention mechanism The internal dependency relationship obtains an intermediate value Then the is sent into a fully connected layer, and the output result of the fully connected layer is concatenated with the user word vector e u to obtain a final user preference feature The calculation method is as follows:
[0040]
[0041] where denotes concatenation operation; is a user word vector feature; are all learnable parameter matrices; wherein Attention denotes a multi-head attention mechanism, and the calculation formula is expressed as:
[0042]
[0043] S424, active region center feature representation after aggregation according to S421 The user historical behavior trajectory is remapped to obtain a local region center corresponding to each place, and a local region center trajectory is generated Then the elements in the user historical behavior trajectory and the local region center trajectory are weighted and summed, and the user word vector feature e u is concatenated to obtain a behavior trajectory with region center information For each region center The calculation formula is as follows:
[0044]
[0045] where denotes concatenation operation; u and v are both learnable parameters and u+v=1; and σ is an activation function;
[0046] S43, obtaining time sequence relationship and context information in user check-in behavior through LSTM unit; taking a substring of the historical behavior trajectory S(u) of the user u and a region transfer trajectory substring corresponding thereto as input, and adding the user preference feature p uThe following is calculated by the LSTM unit:
[0047]
[0048] in and t o Time and t o-1 The hidden layer state at time step o, o∈[1,m]; the current user's behavioral features are obtained through a single-layer LSTM.
[0049] S44. Utilize attention mechanisms to analyze the current user's behavioral characteristics. Behavioral characteristics with regional center information The data is merged, and the time interval information of user access to POI is added. The calculation is as follows:
[0050]
[0051] in represents the time interval between the a-th and b-th visits; c is the context vector; the Attention mechanism in the equation is represented as:
[0052]
[0053] Finally, user behavioral characteristics The context vector c is fed into two fully connected layers, one for predicting the POI and the other for predicting the region where the POI is located, to obtain the probability that the user will visit each POI. and the probability of users traveling to each region
[0054]
[0055] Where b l ,b g W l W g All of these are learnable parameter matrices in fully connected layers;
[0056] S45. Utilizing a neighboring area perception sampling module, filter points of interest within the user's activity area to obtain richer sample information; specifically, for location l, select the region g where l is located and its 8 neighboring regions as the selection area N. l POIs within these 9 regions were selected as candidate POIs; considering potential missed check-ins and GPS location offsets, substrings of historical behavior trajectories were also used. The m Points of Interest (POIs) included are used to determine the final selection area. If the number of candidate POIs is less than the minimum number of candidate samples, they will be supplemented by random sampling.
[0057] S46. For the multi-active region perception network framework composed of S41 to S45, the cross-entropy loss function is used to calculate the region-level loss L during each round of model training. geo :
[0058]
[0059] in and They represent Tags and other POIs For L poi Then, based on S45, samples are selected and the cross-entropy loss function is used to calculate the loss:
[0060]
[0061] in and These represent the actual label of the POI and the label located in the selected area, respectively. Other POIs within; the final total loss function is:
[0062] L fin =L poi +ηL geo
[0063] Where η∈[0,1] is a hyperparameter to balance the POI prediction probability with the region prediction probability;
[0064] S47. With the goal of minimizing the total loss function, the multi-active region perception network framework is trained iteratively. When the iteration termination condition is reached, the training is stopped and the final next interest point recommendation model is output to predict the next interest point.
[0065] Preferably, in steps S11 and S12, the length m of the substring is 20.
[0066] Preferably, in step S21, the initial value of parameter α is 0.1, and in step S23, the initial value of parameter β is 0.1.
[0067] Preferably, in step S41, the word vector dimension d is 64, and in step S421, the number of GCN loop layers h is 3.
[0068] Preferably, in step S45, the minimum number of candidate samples is 1500.
[0069] Preferably, in step S46, the parameter η is set to 0.8.
[0070] The beneficial effects of the present application relative to the prior art are as follows:
[0071] The present application fully utilizes the geographical position relationship in the historical activity trajectory of the user, aggregates learning on the local active area, and combines the spatial structure and sequence correlation, so that it learns dynamic and static features at the same time. In view of the problem of data sparsity, the present application designs a negative sample sampling method based on neighbor area to alleviate the imbalance problem of positive and negative sampling. The present application has the characteristics of high accuracy and strong scalability, and can timely grasp the trend of user behavior, providing guidance for user behavior trajectory prediction personnel. BRIEF DESCRIPTION OF DRAWINGS
[0072] Figure 1 The figure is a multi-active area perception network architecture of the present application.
[0073] Figure 2 The figure is an active area aggregation module schematic diagram of the present application. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical scheme and advantages of the present application more clear and explicit, the present application will be further described in detail below in combination with the drawings. However, the present application covers any substitution, modification, equivalent method and scheme defined by the claims on the essence and scope of the present application. Further, in order to make the public have a better understanding of the present application, some specific details are described in detail in the following detailed description of the present application. The present application can also be completely understood without the description of these details by those skilled in the art.
[0075] In the description of the present application, it should be understood that the terms "first", "second" are only used for distinguishing description purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features.
[0076] As shown in Figure 1 The present application provides a next interest point recommendation method based on a multi-active area perception network, which first extracts user historical behavior trajectory and area transfer trajectory from a data set, and generates corresponding substring sequences respectively, constructs user active area directed graph and area transfer trajectory directed graph, and then extracts timing relationship information and spatial structure information respectively, trains a multi-active area perception network, and predicts the next interest point.
[0077] In a preferred embodiment of the present application, the above-mentioned next interest point recommendation method based on a multi-active area perception network specifically includes S1-S5 steps, and the specific implementation mode of each step is described below.
[0078] S1. For the user's historical behavior trajectory in the dataset, extract the user ID, location ID, user access time and GPS latitude and longitude information respectively; based on the user's historical behavior trajectory and geographical location information, extract the regional transfer trajectory, and generate the historical behavior trajectory substring and regional transfer trajectory substring for each user respectively, and construct the trajectory dataset.
[0079] In embodiments of the present invention, step S1 specifically includes the following sub-steps:
[0080] S11. Obtain the dataset, which includes a user set. and Points of Interest (POI) sets Each Point of Interest (POI) has an associated geographic coordinate (lat, lon), where lat and lon represent its latitude and longitude, respectively. A check-in action is represented as c = (u, l, t), representing user u visiting location l at time t. The user's historical behavior trajectory is a sequence of check-in actions ordered by check-in time, represented by S(u) = [c1, c2, ..., c...]. n [This indicates that] represents the user. The historical check-in behavior sequence, where n is the sequence length; the historical behavior trajectory S(u) of user u is divided into multiple substrings of equal length S(u) = [S1, S2, ..., S...]. k ], k∈[1,|S(u)| / m], where |S k | = m is a substring S k If a substring is less than m in length, it is padded with zeros at the end of the substring.
[0081] S12. Using the Geohash-5 method, the latitude and longitude coordinates of Points of Interest (POIs) are encoded to represent spatial location information, thus obtaining the spatial location information set G = {g1, g2, ..., g...} of all POIs. |G| Each point of interest (POI) has only one corresponding Geohash-5 location code. Based on the historical behavior trajectory S(u) in S11, the corresponding regional migration trajectory S is obtained according to the relationship between the locations in the trajectory and the Geohash-5 location codes. g (u)=[g1,g2,…,g n ] and its substrings in The length of the substring is m. If the length of the substring is less than m, it is padded with zeros at the end.
[0082] S13. The behavior trajectory substrings and regional transfer trajectory substrings of all users are used to construct the trajectory dataset.
[0083] In many data sets, the length of the historical behavior trajectory of different users is very different, which is not conducive to the model to learn the personalized characteristics of different users, therefore, in order to better learn the preference information contained in the user historical behavior trajectory, the historical behavior trajectory of the user is divided into a plurality of substrings with a length of m.
[0084] The length of the substring can be optimized and adjusted according to actual conditions, and in the embodiment, m is 20, so the trajectory of each user will be divided into a substring set with a length of 20.
[0085] The Geohash adopted in the application belongs to the prior art, and can be directly calculated by using the existing related functions or programs. The algorithm is an address coding method, which can encode two-dimensional spatial longitude and latitude data into a string, and the basic steps are: first, the longitude and latitude are converted into binary according to different accuracy requirements, then the longitude and latitude are combined, the longitude occupies the even number of bits, and the latitude occupies the odd number of bits, and finally the binary string is encoded according to Base32. The longer the code is, the smaller the range represented is, and the more accurate the position is. The specific value of the accuracy can be optimized and adjusted according to actual conditions, and in the embodiment, the accuracy is 5, that is, the code length is 5.
[0086] S2, for the historical behavior trajectory of each user in S1, the active center is determined according to the activity degree of the user, and a plurality of local active areas of the current user are delimited according to the clustering behavior of the user historical behavior trajectory in space, the central place direction is added on the basis of keeping the user historical behavior trajectory unchanged, and the directed graph of the user active area is established; meanwhile, for the region transfer trajectory of each user in S1, the active center is determined according to the activity degree of the user, and the directed graph of the region transfer trajectory is directly constructed according to the region transfer trajectory.
[0087] In the embodiment of the application, the above step S2 specifically comprises the following sub-steps:
[0088] S21, according to the user historical behavior trajectory S(u), the access frequency information l of the user u in each place l is obtained freq , and all places with an access frequency exceeding a set frequency are selected to form an active area center set The filtering process is represented as:
[0089]
[0090] Wherein |S(u)| represents the length of the current user historical behavior trajectory; represents the POI set visited by the current user; and α is a preset hyperparameter, if the calculated value of α according to the initial setting is Then α is taken as α / 2 and recalculated.
[0091] The initial value of the super parameter a of the active region center set can be optimized according to actual conditions. In an embodiment of the present application, the initial value of a is set to 0.1 after optimization.
[0092] S22, the active region center set obtained in S21 is processed to obtain a user active region center set C(u) Each location in the set is taken as a center location of an active region, and the center location of each active region in the set is calculated and other non-center locations The Haversine distance d between the non-center location and the center location of the nearest active region is calculated pq = Haversine(GPS p , GPS q ), according to the distance d pq The non-center location is divided into the nearest active region, thereby obtaining a user active region set C(u)
[0093] S23, according to the user region transfer trajectory S g (u), the access frequency information g of the user u in each region g is obtained freq , and the regions with an access frequency higher than a set frequency are screened to form an active region set G c (u), and the screening process is represented as:
[0094] G c (u) = {g | g freq ≥ β | S g (u) |, g ∈ G(u)}
[0095] Where |S g (u) | represents the length of the current user region transfer trajectory; G(u) represents the region set visited by the current user; β is a preset super parameter, and if |G c (u) | calculated according to the initial set β is 0, β is taken as β / 2 and recalculated.
[0096] The initial value of the super parameter β of the active region set can be optimized according to actual conditions. In an embodiment of the present application, the initial value of β is set to 0.1 after optimization.
[0097] S24, according to the active region center set obtained in S21 and S22 and the user active region set C(u), the non-center locations in each active region are directed to the center locations on the basis of keeping the user historical behavior trajectory unchanged, and a user active region directed graph is established Where V is a node set, E is an edge set; in addition, for the geographical position relationship, according to the region transfer trajectory S g(u) directly constructing a region transition trajectory directed graph
[0098] S3, for each user in S1, the historical behavior trajectory substring and the region transition trajectory substring, and the user active region directed graph and the region transition trajectory directed graph constructed in S2, a model training set is constructed.
[0099] In an embodiment of the present application, the above step S3 specifically comprises the following sub-steps:
[0100] S31, for each user, the user historical behavior trajectory S(u) generated in S11 is divided into a training set and a test set required for model training according to a preset proportion. In this embodiment, the first 80% of the data in the sequence is used as the training set, and the remaining 20% of the data is used as the test set;
[0101] S32, the sample data in the training set and the test set are obtained from the trajectory data set, the user historical behavior trajectory substring and the region transition trajectory substring generated in steps S11 and S12, and the true labels corresponding to the two substrings are generated respectively and The user active region directed graph and the region transition trajectory directed graph established in step S2 are further obtained, and then the training samples with labels for the training set and the test set are constructed.
[0102] S4, a multiple active region-aware network (MARAN) is trained using the training set constructed in S3, so as to obtain a next interest point recommendation model, which is used to predict the interest point that the user may visit at the next time by taking the historical behavior trajectory and the region transition trajectory before the to-be-predicted time period as input;
[0103] In an embodiment of the present application, the above step S4 specifically comprises the following sub-steps:
[0104] S41, when training the multiple active region-aware network using the training set constructed in S3, first, the user, the POI and the region encoded by the Geohash-5 position are subjected to a word embedding Embedding operation, to obtain a user word vector POI word vector and a region word vector
[0105] S42. The active region aggregation module is used to learn the aggregation features of the user behavior trajectory in space, to represent the unique local features of multiple active regions. The active region aggregation module specifically comprises the following S421-S424 sub-steps:
[0106] S421, using a graph convolution network GCN to aggregate the user active area directed graph The aggregation operation is as follows: input is a matrix composed of graph node word vectors The aggregation operation is as follows: input is a matrix composed of graph node word vectors
[0107]
[0108] Wherein σ is an activation function; A is the adjacency matrix of the graph , D is the degree matrix; W is a learnable parameter matrix; h is the number of recurrent layers (in this embodiment, the number of GCN recurrent layers h is 3); after aggregation, the active area center feature matrix is obtained At the same time, the same graph convolution network GCN aggregation method is used to aggregate the area transfer trajectory directed graph
[0109] The aggregation operation is as follows: input is a matrix composed of graph node word vectors The active area feature matrix after aggregation is obtained
[0110] S422, according to the active area feature matrix after aggregation in S421 And the active area feature matrix Respectively through the active area center set And the active area set G c (u) screening, calculating the mean value of the center position to obtain the user's preference information for POI And the area preference information And the two are spliced to obtain The calculation method is as follows:
[0111]
[0112] Wherein Indicates the splicing operation;
[0113] S423, capture POI and area preference through multi-head attention mechanism The internal dependency relationship is obtained to obtain the intermediate value Then send Into the full connection layer and splice the output result of the full connection layer with the user word vector e u To obtain the final user preference feature The calculation method is as follows:
[0114]
[0115] Wherein Indicates the splicing operation; Is the user word vector feature; are learnable parameter matrices; where Attention denotes multi-head attention mechanism, whose calculation formula is expressed as:
[0116]
[0117] S424, active area center feature representation after aggregation according to S421 user historical behavior trajectory is mapped to obtain a local area center corresponding to each place, and a local area center trajectory is generated Then, elements in the user historical behavior trajectory and the local area center trajectory are weighted and summed, and the user word vector feature e is spliced u to obtain a behavior trajectory with area center information For each area center , the calculation formula is as follows:
[0118]
[0119] where denotes a splicing operation; u and v are both learnable parameters and u+v=1; and σ is an activation function;
[0120] S43, the time sequence relationship and context information in the user check-in behavior are obtained through an LSTM unit; a substring of the historical behavior trajectory S(u) of the user u and a corresponding regional transition trajectory substring m] are taken as inputs, and the user preference feature p obtained in S423 is added, so as to be calculated by the LSTM unit as follows: u
[0121]
[0122] where and are the hidden layer states at t o and t o-1 moments respectively, and o∈[1, m]; the behavior feature of the current user is obtained through a single-layer LSTM
[0123] S44, the behavior feature of the current user is fused with the behavior feature with area center information , and time interval information of the user visiting POIs is added therein, and the calculation is as follows:
[0124]
[0125] where The time interval information representing the a-th visit and the b-th visit; c is the context vector; the Attention mechanism in the formula is represented as:
[0126]
[0127] Finally, the behavior characteristics of the user and the context vector c are input into two full connection layers respectively for predicting POI and the area where the POI is located, to obtain the probability of the user going to each POI and the probability of the user going to each area
[0128]
[0129] where b l ,b g ,W l ,W g are all learnable parameter matrices in the full connection layer;
[0130] S45, using the sampling module of the neighbor area perception, screening the POI in the activity area of the user to obtain sample information with more abundant information; wherein, for a place l, the area g where l is located and its 8 neighbor areas are selected as the selected area N l , and the POI in the 9 areas is selected as the candidate POI; meanwhile, considering the problem of possible missing check-in and GPS positioning offset of the user, the m POIs contained in the sub-string of the historical behavior trajectory are used to determine the final selected area If the number of candidate POIs is lower than the minimum candidate sample number (in this embodiment, the minimum candidate sample number is 1500), the random sampling method is used for supplement;
[0131] S46, for the multi-active area perception network framework composed of S41-S45, in each round of model training process, the cross entropy loss function is used to calculate the area level loss L geo :
[0132]
[0133] wherein and represent the label of and other POIs For L poi , according to S45, the sample selection is performed and the cross entropy loss function is used to calculate the loss:
[0134]
[0135] wherein and These represent the actual label of the POI and the label located in the selected area, respectively. Other POIs within; the final total loss function is:
[0136] L fin =L poi +ηL geo
[0137] Where η∈[0,1] is a hyperparameter to balance the POI prediction probability and the region prediction probability. In this embodiment, the parameter η is taken as 0.8.
[0138] S47. With the goal of minimizing the total loss function, the multi-active region perception network framework is trained iteratively. When the iteration termination condition is reached, the training is stopped and the final next interest point recommendation model is output to predict the next interest point.
[0139] S5. For the target user, input their historical behavior trajectory and regional transfer trajectory into the next point of interest recommendation model to predict the points of interest that the target may visit in the next moment.
[0140] It should be noted that step S5 above is a prediction under actual application conditions. In this embodiment, its input data is the user's historical behavior trajectory, and the prediction output is the point of interest at the next moment.
[0141] Furthermore, based on the same inventive concept as the next point of interest recommendation method based on a multi-active region sensing network provided in the above embodiments, another preferred embodiment of the present invention provides a next point of interest recommendation system based on a multi-active region sensing network, which includes the following functional modules:
[0142] The dataset construction module is used to extract user ID, location ID, user access time and GPS latitude and longitude information from the user's historical behavior trajectory in the dataset; based on the user's historical behavior trajectory and geographical location information, it extracts the regional transfer trajectory and generates user behavior trajectory substrings and regional transfer trajectory substrings respectively to construct the trajectory dataset.
[0143] The trajectory directed graph construction module is used to determine the activity center based on the user's activity level for the historical behavior trajectory of each user in the dataset construction module, and to delineate multiple local active regions of the current user based on the spatial clustering behavior of the user's historical behavior trajectory. While keeping the user's historical behavior trajectory unchanged, it adds the center location pointer to build a directed graph of user active regions. For the regional transfer trajectory of each user in the dataset construction module, it determines the activity center based on the user's activity level, and directly builds a directed graph of regional transfer trajectory based on the regional transfer trajectory.
[0144] a training set construction module, configured to construct a model training set according to the historical behavior trajectory sub-strings and the region transition trajectory sub-strings of each user in the data set construction module, and the user active region directed graph and the region transition trajectory directed graph constructed in the trajectory directed graph construction module;
[0145] a model training module, configured to train a Multiple Active Region-Aware Network (MARAN) according to the training set constructed in the training set construction module, so as to obtain a next interest point recommendation model, which is configured to take the historical behavior trajectory before a to-be-predicted time period as an input to predict the interest point that the user is likely to visit at the next time;
[0146] a prediction module, configured to take the next interest point recommendation model to predict the interest point that the user is likely to visit at the next time for any user.
[0147] Since the problem-solving principle of the above-mentioned next interest point recommendation method based on the Multiple Active Region-Aware Network is similar to that of the next interest point recommendation method system based on the Multiple Active Region-Aware Network of the above-mentioned embodiments of the present application, the specific implementation forms of the modules of the system in this embodiment can also be seen in the specific implementation forms of the methods S1-S5 described above, and the repeated parts will not be described again.
[0148] In addition, it should be noted that in the system provided in the above-mentioned embodiments, each module is equivalent to a program module executed in sequence when executed, and therefore it is essentially a process of executing data processing. Moreover, those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-mentioned system can be referred to the corresponding process in the foregoing method embodiments, which will not be described again herein. In each embodiment provided in the present application, the division of steps or modules in the method and system is only a logical functional division, and another division mode can be used in actual implementation, for example, multiple modules or steps can be combined or integrated together, or a module or a step can be split.
[0149] In the following, the present application will further demonstrate the detailed implementation process of the next interest point recommendation method based on the Multiple Active Region-Aware Network in the above-mentioned embodiments in a specific example, so as to facilitate the understanding of the essence of the present application.
[0150] Embodiment
[0151] The steps and the specific implementation manner of this embodiment are the same as the foregoing S1-S5, which will not be described again herein.
[0152] In the following, part of the implementation process and the implementation results will be demonstrated:
[0153] The original data used in this embodiment are two widely used real-scene datasets: Foursquare and Gowalla. In the Gowalla dataset, there are 52979 users with 3300986 check-in behaviors in a total of 121851 locations; in the Foursquare dataset, there are 46065 users with 9447873 check-in behaviors in a total of 69005 locations. According to the method, the user behavior trajectory substring and the region transfer trajectory substring are constructed. Then, the check-in data is input into the model for training according to the method, and finally the trained model is used for prediction of the next interest point.
[0154] In the experiment, the method is compared with several traditional prediction methods, and MARAN is a multi-active region aware network proposed in the application. In this embodiment, the parameters of MARAN are selected as follows: the substring length m is 20, the initial value of the hyperparameter a is 0.1, the initial value of the hyperparameter b is 0.1, the word vector dimension d is 64, the GCN cycle layer number h is 3, the minimum number of candidate samples is 1500, and the hyperparameter η is 0.2 and 0.8 in the Foursquare dataset and the Gowalla dataset respectively. The iteration termination condition set during model training is that the iteration round reaches 50 times or the loss function value converges.
[0155] In addition, the existing methods for comparison are as follows: (1) FPMC: a personalized Markov chain is constructed for the behavior of each user; (2) RNN: a recurrent neural network that learns the temporal relationship between POI check-in sequences; (3) DeepMove: a multi-modal recurrent neural network that fuses attention information and captures sequence relationships; (4) STGN: an extension of LSTM, adding time gates and space gates to capture spatio-temporal relationship information; (5) STAN: a space-time attention network that aggregates temporal and distance relationships through a double-layer attention architecture; (6) Flashback: an RNN-based method that finds similar context information in the past hidden layer to the current state; (7) Graph-Flashback: a method that constructs a space-time knowledge graph to learn the transfer relationship between POIs. In this embodiment, the average accuracy (Acc@K) and the average reciprocal rank (MRR) are used as the evaluation indicators of the prediction model. Acc@K calculates the ratio of true positive samples in the top K predicted samples. In this paper, we set K = {1, 5, 10}. MRR can reflect the overall performance of the recommendation and emphasizes the prediction ranking. The calculation formula of MRR is as follows:
[0156]
[0157] where rank urepresents the ranking of the true label of the current user u in the prediction result.
[0158] The experimental results are shown in Table 1. The method MARAM of the present application achieves better experimental results on both Gowalla and Foursquare datasets compared with the Baseline which performs best. Specifically, on the Gowalla dataset, MARAM improves over the best Baseline by 14.55%, 12.47%, 11.72% and 12.96% on the metrics of Acc@1, Acc@5, Acc@10 and MRR respectively. On the Foursquare dataset, MARAM improves over the best Baseline by an average of 6.85%. It can be seen that the next POI recommendation method based on multi-active region perception network proposed in the present application is effective.
[0159] Table 1 Comparison of experimental results of the present application and the control method
[0160]
[0161] The above-described embodiments are only a preferred scheme of the present application, and are not intended to limit the present application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application. Therefore, all technical solutions obtained by equivalent replacement or equivalent transformation fall within the protection scope of the present application.
Claims
1. A method for recommending next points of interest based on multi-active region-aware network, characterized in that, The method comprises the following steps: S1, for the user historical behavior trajectory in the data set, the user ID, the place ID, the user access time and the latitude and longitude GPS information are extracted respectively; according to the user historical behavior trajectory and the geographical position information, the region transfer trajectory is extracted, and the historical behavior trajectory substring and the region transfer trajectory substring of each user are generated respectively, and the trajectory data set is constructed; S2, for the historical behavior trajectory of each user in S1, the active center is determined according to the activity degree of the user, and a plurality of local active regions of the current user are demarcated according to the spatial aggregation behavior of the user historical behavior trajectory, the central place direction is added on the basis of keeping the user historical behavior trajectory unchanged, and the user active region directed graph is established; meanwhile, for the region transfer trajectory of each user in S1, the active center is determined according to the activity degree of the user, and the region transfer trajectory directed graph is directly constructed according to the region transfer trajectory; S3, for the historical behavior trajectory substring and the region transfer trajectory substring of each user in S1, and the user active region directed graph and the region transfer trajectory directed graph constructed in S2, a model training set is constructed; S4, the multiple active region-aware network (MARAN) is trained by using the training set constructed in S3, so that the next interest point recommendation model is obtained, which is used for inputting the historical behavior trajectory and the region transfer trajectory before the to-be-predicted time period to predict the interest point that the user may visit at the next moment; S5, for the target user, the historical behavior trajectory and the region transfer trajectory are input into the next interest point recommendation model to predict the interest point that the target may visit at the next moment; The S4 specifically comprises the following sub-steps: S41, when training the multi-active area perception network by using the training set constructed in S3, first performing a word embedding Embedding operation on the user, the POI and the region encoded by the Geohash-5 position, to obtain a user word vector with a dimension of d POI word vector and a region word vector S42, the active region aggregation module is used to learn the aggregation characteristics of the user behavior trajectory in space to represent the unique local characteristics of the plurality of active regions, and the active region aggregation module specifically comprises the following sub-steps: S421、using a graph convolutional network, GCN, on the user active area directed graph performing an aggregation operation, where the input is a matrix of graph node word vectors The aggregation operation is as follows: where σ is an activation function; A is the adjacency matrix of the graph is the degree matrix; W is a learnable parameter matrix; h is the number of recurrent layers; and the active region center feature matrix is obtained after aggregation Meanwhile, the same graph convolution network GCN aggregation method is used for the region transfer trajectory directed graph performing an aggregation operation, where the input is obtaining the active region feature matrix after aggregation S422, active region feature matrix after aggregation according to S421 and active region feature matrix respectively through active region center set and active region set G c (u) screening, calculating the mean of the center position to obtain user preference information for POI and region preference information and splicing the two to obtain The calculation method is as follows: wherein represents a splicing operation; S423、Capture POI and area preferences through multi-head attention mechanism Internal dependencies yield intermediate values The output of the fully connected layer is then fed into a fully connected layer and the output of the fully connected layer is compared to the user word vector e u concatenated to obtain the final user preference feature The calculation method is as follows: wherein denotes a concatenation operation; is a user word vector feature; are learnable parameter matrices; wherein Attention denotes a multi-head attention mechanism, whose computation is expressed as: S424, active region center feature representation after aggregation according to S421 The user historical behavior trajectory feature matrix is obtained The local region center corresponding to each place is obtained by remapping, and a local region center trajectory matrix is generated Then, the elements in the user historical behavior trajectory and the local region center trajectory are weighted and summed, and the user word vector feature e is spliced u , to obtain a behavior trajectory with region center information For each region center The calculation formula is as follows: wherein denotes a concatenation operation; u, v are both learnable parameters and u + v = 1; σ is an activation function; S43, obtain the time sequence relationship and context information in the user check-in behavior through the LSTM unit; obtain the substring of the historical behavior track S(u) of the user u and the corresponding regional transfer track substring As input, plus the user preference feature p obtained by S423 u , calculated by the LSTM unit as follows: wherein and are the hidden layer states at time t o and t o-1 , o ∈ [1, m]; the behavior features of the current user are obtained by a single-layer LSTM S44, using attention mechanism on the current user's behavior features with the region center information fusion, and in which the user access POI time interval information is added, calculated as follows: wherein denotes the time interval information of the a-th visit and the b-th visit; c is a context vector; the Attention mechanism in the formula is represented as: Finally, the behavior features of the user and the context vector c are fed into two fully connected layers for predicting the POI and the region where the POI is located, respectively, to obtain the probability of the user going to each POI and the probability of the user going to each region where b l ,b g ,W l ,W g are the learnable parameter matrices in the fully connected layers; S45, using the sampling module of the neighbor area perception, filtering the points of interest in the activity area of the user, obtaining sample information with more abundant information; wherein, for a location l, selecting the area g where l is located and its 8 neighbor areas as the selection area N l The POIs in these 9 areas are used as candidate POIs; meanwhile, considering the problems of possible missing check-in and GPS positioning offset of the user, the sub-strings of the historical behavior track The m POIs contained are used to determine the final selection area If the number of candidate POIs is lower than the minimum number of candidate samples, the number is supplemented in a random sampling manner; S46, for the multi-active area perception network framework constituted by S41-S45, in each round of model training process, the cross entropy loss function is used to calculate the loss L of the region level geo : wherein and respectively denote the label and other POI for L poi Then, according to S45, sample selection is performed and the loss is calculated using a cross-entropy loss function: where and denote the true labels of POIs and other POIs located within the selected region respectively; and the final total loss function is: L fin = L poi + ηL geo Wherein η ∈ [0, 1] is a hyperparameter to balance the POI prediction probability and the region prediction probability; S47, the multiple active region-aware network framework is continuously iterated and trained to minimize the total loss function, and when the iteration termination condition is reached, the training is stopped to output the final next interest point recommendation model for predicting the next interest point. 2.The next point of interest recommendation method based on multi-active zone-aware network of claim 1, wherein, The S1 specifically comprises the following sub-steps: S11. Obtain the dataset, which contains a user set. and Points of Interest (POI) sets Each Point of Interest (POI) has an associated geographic coordinate (lat, lon), where lat and lon represent its latitude and longitude, respectively. A check-in action is represented as c = (u, l, t), representing user u visiting location l at time t. The user's historical behavior trajectory is a sequence of check-in actions ordered by check-in time, represented by S(u) = [c1, c2, ..., c...]. n This indicates that it represents the user. The historical check-in behavior sequence, where n is the sequence length; the historical behavior trajectory S(u) of user u is divided into multiple substrings of equal length [S1, S2, ..., S...]. k ], k∈[1,|S(u)| / m], where |S k | = m is a substring S k If a substring is less than m in length, it is padded with zeros at the end of the substring. S12. Using the Geohash-5 method, the latitude and longitude coordinates of Points of Interest (POIs) are encoded to represent spatial location information, thus obtaining the spatial location information set G = {g1, g2, ..., g...} of all POIs. |G| Each point of interest (POI) has only one corresponding Geohash-5 location code. Based on the historical behavior trajectory S(u) in S11, the corresponding regional migration trajectory S is obtained according to the relationship between the locations in the trajectory and the Geohash-5 location codes. g (u)=[g1,g2,…,g n ] and its substrings in The length of the substring is m. If the length of the substring is less than m, it is padded with zeros at the end. S13, the behavior trajectory substring and the region transfer trajectory substring of all users are constructed to form the trajectory data set. 3.The next point of interest recommendation method based on multi-active zone-aware network of claim 1, wherein, The S2 specifically comprises the following sub-steps: S21, according to the user historical behavior trajectory S(u), the access frequency information l of the user u in each place l is obtained freq And all places with access frequency exceeding the set frequency are screened out to form the active area center set The screening process is represented as: where |S(u)| represents the length of the current user historical behavior trajectory; represents the set of POIs visited by the current user; a is a preset hyperparameter. If the value of a calculated according to the initial setting is then take a as a / 2 and recalculate. S22, obtaining the set of active region centers from S21 For each location in the set, calculate the Haversine distance d between the location and each of the active region centers pq = Haversine(GPS p , GPS q ), and divide each non-active region center to the nearest active region according to the distance d pq , thus obtaining the set of user active regions S23, according to the user region transfer trajectory S g (u), obtaining the access frequency information g of the user u in each region g freq , and screening out the regions with access frequency higher than the set frequency to form an active region set G c (u), the screening process is represented as: G c (u) = {g | g freq ≥ β | S g (u) | g G (u)} where |S g (u) denotes the length of the current user's region transition trajectory; G(u) denotes the set of regions visited by the current user; β is a preset hyperparameter, and if |G c (u) = 0, then β is taken as β / 2 and recalculated. S24, the active region center set obtained in S21 and S22 and the user active region set C(u), on the basis of keeping the user historical behavior track unchanged, the non-center place in each active region is pointed to the center place, and the user active region directed graph is established wherein V is a node set, E is an edge set; In addition, for the geographical position relationship, according to the region transfer trajectory S g (u) Directly constructing the region transfer trajectory directed graph 4.The next point of interest recommendation method based on multi-active zone-aware network of claim 2, wherein, The S3 specifically comprises the following sub-steps: S31, for each user, the user historical behavior trajectory S(u) generated in S11 is divided into a training set and a test set required for model training according to a preset proportion; S32, obtaining the sample data in the training set and the test set from the user historical behavior trajectory substring and the region transfer trajectory substring generated in the S11 and S12 steps of the trajectory data set, and generating the real labels corresponding to the two substrings respectively and Further, the user active region directed graph and the region transfer trajectory directed graph established in the S2 step are obtained, and then the training samples with labels in the training set and the test set are constructed. 5.The next point of interest recommendation method based on multi-active region-aware network according to claim 2, characterized in that In steps S11 and S12, the substring length m is 20. 6.The next point of interest recommendation method based on multi-active region-aware network according to claim 3, characterized in that In step S21, the initial value of the parameter α is 0.1, and the initial value of the parameter β in step S23 is 0.
1. 7.The next point of interest recommendation method based on multi-active region-aware network according to claim 1, characterized in that In step S41, the word vector dimension d is 64, and the GCN cycle layer number h in step S421 is 3. 8.The next point of interest recommendation method based on multi-active region-aware network according to claim 1, characterized in that In step S45, the minimum number of candidate samples is 1500. 9.The next point of interest recommendation method based on multi-active region-aware network according to claim 1, characterized in that In step S46, the parameter η is 0.8.
Citation Information
Patent Citations
Network request processing method and device, equipment, storage medium and program product
CN114357319A
POI (Point of Interest) prediction method based on space-time perception and in combination with local and global preferences
CN115510333A