Spatial correlation interest point recommendation method, system, equipment, product and medium
By constructing position vector pre-training network and trajectory coding network, combined with multi-objective learning methods, the shortcomings of the point of interest recommendation model in the existing technology in terms of geographical correlation and objectivity are solved, and a more accurate reflection of users' geographical preferences is achieved. Improved results of recommendation points of interest.
Patent Information
- Application Number
- CN202411076682.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing point-of-interest recommendation model lacks geographical correlation and objectivity when capturing user preferences, and cannot effectively reflect the high spatial correlation between the points of interest visited by the user and the points of interest that were not visited.
By constructing a position vector pre-training network and a trajectory encoding network, the interest point position vector and trajectory slice vector are generated, and combined with the multi-objective learning method, the interest point preference scores of the user's access target and spatially related target are calculated, thereby realizing interest point recommendations.
It improves the accuracy and effectiveness of point-of-interest recommendations, can better capture the spatial clustering mode of users' preferences, and improves the reflection of users' geographical preferences.
Smart Images

Figure CN119149807A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data mining technology, and in particular to a method, system, device, product and medium for recommending spatially related points of interest. Background Art
[0002] As most smartphones are equipped with a global satellite navigation system (GPS), which has positioning capabilities, users can upload their locations anytime and anywhere through smartphones or mobile devices containing GPS, and can share their POI check-in data in location-based social networks. In recent years, more and more studies have begun to focus on using a large amount of user check-in data in location-based social networks to model user preferences, thereby presenting recommendation results for POIs that users have not visited. However, check-in data is an implicit feedback that reflects the user's positive preference for specific POIs, but not visiting certain places does not necessarily mean that the user does not like these places.
[0003] In the task of recommending points of interest, the geographical influence factor is the most significant, so it is used as an important modeling object for mining user preferences by most point of interest recommendation models. Since users tend to visit points of interest that are geographically close to the center of user activities, users are more inclined to visit new points of interest near points of interest they have checked in before. Therefore, enhancing the modeling of geographical correlations between points of interest in user preference learning can improve the accuracy of understanding user preferences.
[0004] In terms of geographic feature representation, the geographic features in current POI recommendation models are usually represented by regular grid domains or uniform probability distributions to determine the spatial correlation between POIs. These methods often rely on artificial constraints, and the granularity of geographic area division is not fine enough, lacking objectivity and completeness in capturing the spatial relationship between all candidate POIs. Secondly, spatial correlation has never been used as a learning goal, making it impossible to make the model sensitive to other POIs that are highly spatially correlated with POIs that users have visited. Summary of the invention
[0005] The present invention aims to solve at least one of the technical problems existing in the related art. To this end, the present invention provides a method, system, device, product and medium for recommending spatially related points of interest, so as to improve the effect of recommending points of interest.
[0006] The present invention provides a method for recommending spatially related points of interest, comprising: S1: Obtain the points of interest in the training samples, build a position vector pre-training network, and train the position vectors of the points of interest through the position vector pre-training network; S2: Divide the user's historical check-in data into track slices with weekly intervals; S3: Establishing a trajectory encoding network, fusing the trajectory slice and the trained position vector through the trajectory encoding network to obtain a trajectory slice vector, constructing a softmax function to transform the trajectory slice vector, and obtaining the interest point preference scores of all the interest points in the trajectory slice; S4: determining the user visit target in each of the trajectory slices and generating a spatially associated target set corresponding to each user visit target, obtaining the interest point preference scores of the user visit target and the spatially associated target set, calculating the loss value of the user visit target and the spatially associated target set, and iterating until the loss value converges to realize the training of the trajectory encoding network; S5: Calculate the position preference score of each of the trajectory slices through the trained trajectory encoding network, and obtain the POI recommendation result by weighted addition of the position preference scores.
[0007] According to a method for recommending spatially related points of interest provided by the present invention, step S1 further comprises: S11: Acquire the points of interest in the training sample, and convert the location information of the points of interest in the training sample into an OLC sequence; S12: Randomly sample paired OLC sequences from all OLC sequences to form OLC sequence pairs, and calculate the true spatial correlation score of the OLC sequence pairs; S13: construct a position vector pre-training network, bring in the real space correlation score to calculate the mean square error loss value, and iterate the position vector pre-training network until the mean square error loss value converges; S14: Train the interest point using the position vector pre-training network to obtain the position vector of the interest point.
[0008] According to a method for recommending spatially related points of interest provided by the present invention, step S13 further includes: S131: Convert each character of each OLC sequence in the OLC sequence pair into a first embedding vector; S132: constructing a twin GRU network as the position vector pre-training network, and the two OLC sequences in each OLC sequence pair respectively use a GRU network in the position vector pre-training network to update the first embedding vector; S133: extracting the first embedding vector updated by the position vector pre-training network on the last bit of each OLC sequence as the feature first embedding vector, calculating the semantic relevance of the two feature first embedding vectors by using Manhattan distance, and calculating the mean square error loss value by using the semantic relevance and the real space relevance score; S134: Iterate several times in all the training samples until the mean square error loss value of the position vector pre-training network converges.
[0009] According to a method for recommending spatially related points of interest provided by the present invention, step S3 further comprises: S31: constructing a long short-term memory network as the trajectory encoding network, fusing the user's historical check-in data and the position vector in the trajectory slice to obtain a second embedding vector, and using the trajectory encoding network to update the second embedding vector in each trajectory slice; S32: Calculate the average position information in each trajectory slice, and concatenate the average position information with the sum of all second embedded vectors in the current trajectory slice to obtain the trajectory slice vector; S33: construct a softmax function, transform the trajectory slice vector through a linear network and multiply it with the candidate interest point representation, and perform a softmax transformation on the trajectory slice vector and the interest point representation through a softmax function to obtain the interest point preference scores of all the interest points.
[0010] According to a spatially related point of interest recommendation method provided by the present invention, step S4 further comprises: S41: Determine the points of interest in the user's historical check-in data that appear in the five trajectory slices that are located after the current trajectory slice in each trajectory slice as a user visit target set; S42: determining the user access target and the space-associated target set from the user access target set; S43: Determine the set of interest point preference scores in the user visit target and space associated target set of each trajectory slice as a characteristic interest point preference score set, substitute the characteristic interest point preference score set and use the multi-target cross entropy fused with weak labels to calculate the multi-target loss value of the user visit target and space associated target set; S44: Iterate several times in all the training samples until the multi-target loss value of the user access target and the spatial associated target set of the trajectory encoding network converges.
[0011] According to a method for recommending spatially related points of interest provided by the present invention, step S42 further includes: S421: In the user access target set corresponding to the current trajectory slice, the coarse-grained position information of all the points of interest is used as a first spatially related OLC set of the trajectory slice; S422: Counting the first spatial correlation OLC sets of all trajectory slices; S423: determining a user access target in the current trajectory slice, and finding a set of all spatially relevant OLCs containing coarse-grained location information of the user access target from the first spatially relevant OLC set as a second spatially relevant OLC set; S424: Determine the points of interest corresponding to all the second spatially-related OLC sets as the spatially-related target set corresponding to the user's visit target.
[0012] The present invention also provides a spatially related point of interest recommendation system, which is used to execute a spatially related point of interest recommendation method as described in any one of the above items, comprising: Position vector pre-training module: used to obtain points of interest in training samples, build a position vector pre-training network, and train the position vectors of the points of interest through the position vector pre-training network; User historical check-in data preprocessing module: used to divide the user historical check-in data into track slices with weekly intervals; Trajectory coding network establishment module: used to establish a trajectory coding network, fuse the trajectory slice and the trained position vector through the trajectory coding network to obtain a trajectory slice vector, construct a softmax function to transform the trajectory slice vector, and obtain the interest point preference scores of all the interest points in the trajectory slice; Trajectory coding network training module: used to determine the user visit target in each of the trajectory slices and generate a spatially associated target set corresponding to each user visit target, obtain the interest point preference scores of the user visit target and the spatially associated target set, calculate the loss value of the user visit target and the spatially associated target set, and iterate until the loss value converges to realize the training of the trajectory coding network; Point of interest recommendation module: used to calculate the location preference score of each of the trajectory slices through the trained trajectory encoding network, and obtain the point of interest recommendation result by weighted addition of the location preference scores.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for recommending spatially related points of interest as described in any one of the above items is implemented.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for recommending spatially related points of interest as described in any one of the above items is implemented.
[0015] The present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a spatially related point of interest recommendation method as described in any one of the above items.
[0016] The above one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects: The present invention provides a method for recommending spatially related points of interest. The point of interest position vectors generated by the position vector pre-training network can not only enable each point of interest to have a unique vector representation for describing the absolute position, but also capture the relative distance relationship between any two pre-trained position vectors and the corresponding points of interest, thereby achieving an accurate description of the geographical location correlation semantics. The multi-objective learning method combines the user access goals and the spatial correlation goals to jointly calculate the model training loss, which can enable the user trajectory representation to not only describe the user's preferences, but also actively pay attention to other points of interest that have a high geographical correlation with the points of interest visited by the user himself, thereby achieving the capture of the spatial clustering pattern reflected by the user's preferences. The spatial correlation modeling method of the user access goals and spatial correlation goals designed by the present invention jointly promotes the effect of point of interest recommendation.
[0017] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A flowchart of a method for recommending spatially related points of interest provided by the present invention.
[0020] Figure 2 The figure shows the comparison of the recall rate results of the present invention in the ablation experiment.
[0021] Figure 3 The figure shows the comparison of the normalized discounted cumulative gain results in the ablation experiment of the present invention.
[0022] Figure 4 The figure is a comparison of the hit rate results of the present invention in the ablation experiment.
[0023] Figure 5 A schematic diagram of the structure of a spatially related point of interest recommendation system provided by the present invention.
[0024] Figure 6 A schematic diagram of the structure of a device for recommending spatially related points of interest provided by the present invention.
[0025] Attached figure numbers: 100, position vector pre-training module; 200, user history check-in data pre-processing module; 300, trajectory coding network establishment module; 400, trajectory coding network training module; 500, point of interest recommendation module; 810, processor; 820, communication interface; 830, memory; 840, communication bus. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme in the present invention will be clearly and completely described below. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present invention. The following embodiments are used to illustrate the present invention, but cannot be used to limit the scope of the present invention.
[0027] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0028] Combine the following Figure 1 Embodiments of the present invention are described.
[0029] Figure 1 The flowchart of a method for recommending spatially related points of interest is shown in FIG. The present invention preferably adopts an embodiment, and the specific implementation process of the embodiment is divided into five steps, wherein S1 is to construct a position vector pre-training network, and use the position vector pre-training network to train the position vector; S2 is to divide the user's historical check-in data into track slices with weekly intervals; S3 to S5 are to construct and train the track encoding network and obtain the position preference score of each track slice, and recommend points of interest according to the position preference score.
[0030] The present invention provides a method for recommending spatially related points of interest, comprising: S1: Obtain the points of interest in the training samples, build a position vector pre-training network, and train the position vectors of the points of interest through the position vector pre-training network; Furthermore, the purpose of this stage is to construct a position vector pre-training network to vectorize the position information of the points of interest, and obtain a position vector for representing the position information of the points of interest for subsequent calculations. In this embodiment, the position data of the points of interest in the location-based social network Gowalla (hereinafter referred to as the first social network) and Foursquare (hereinafter referred to as the second social network), that is, the position information of the points of interest, are used as training samples for the position vector pre-training network. Among them, the first social network data set contains 32,510 points of interest, and the second social network data set contains 28,593 points of interest.
[0031] Wherein, step S1 further comprises: S11: Acquire the points of interest in the training sample, and convert the location information of the points of interest in the training sample into an OLC sequence; S12: Randomly sample paired OLC sequences from all OLC sequences to form OLC sequence pairs, and calculate the true spatial correlation score of the OLC sequence pairs; S13: construct a position vector pre-training network, bring in the real space correlation score to calculate the mean square error loss value, and iterate the position vector pre-training network until the mean square error loss value converges; Wherein, step S13 specifically includes: S131: Convert each character of each OLC sequence in the OLC sequence pair into a first embedding vector; S132: constructing a twin GRU network as the position vector pre-training network, and the two OLC sequences in each OLC sequence pair respectively use a GRU network in the position vector pre-training network to update the first embedding vector; S133: extracting the first embedding vector updated by the position vector pre-training network on the last bit of each OLC sequence as the feature first embedding vector, calculating the semantic relevance of the two feature first embedding vectors by using Manhattan distance, and calculating the mean square error loss value by using the semantic relevance and the real space relevance score; S134: Iterate several times in all the training samples until the mean square error loss value of the position vector pre-training network converges.
[0032] S14: Train the interest point using the position vector pre-training network to obtain the position vector of the interest point.
[0033] With respect to the above steps, the specific implementation methods in this embodiment are as follows: First, the location information of the interest point is converted into an OLC sequence: an interest point is obtained from the training sample, and its location information includes longitude and latitude information ,in Indicates longitude information. Indicates latitude information. According to the coding rules of the Open Location Code system developed by Google, Code is converted into a 10-bit OLC sequence , thereby achieving the description of multi-granularity hierarchical position information. The specific value of the kth bit in the OLC sequence is calculated as follows: in, means round down, mod means modulus operation, represents the first intermediate OLC sequence value of the k-th OLC sequence, represents the second intermediate OLC sequence value of the k-th OLC sequence, Indicates the specific value of the k-th OLC sequence.
[0034] Furthermore, a large number of paired OLC sequences are randomly sampled from the set of OLC sequences including all interest points to form OLC sequence pairs, and the true spatial correlation scores of the OLC sequence pairs are calculated: A large number of paired OLC sequences are randomly sampled in , its spatial correlation score The calculation method is as follows: in, Indicates OLC sequence Corresponding points of interest Longitude information, Indicates OLC sequence Corresponding points of interest The latitude information, represents the radius of the earth, here it is 6371km, Represented as points of interest and The real distance between Represented as points of interest and The relative distance between and They represent the maximum and minimum distances in the set of interest point pairs obtained by set sampling, respectively.
[0035] Furthermore, each character of each OLC sequence in the OLC sequence pair is converted into a first embedding vector; a twin GRU network is constructed as the position vector pre-training network, and the two OLC sequences in each OLC sequence pair respectively use a GRU network in the position vector pre-training network to update the first embedding vector; and the first embedding vector updated by the position vector pre-training network on the last bit of each OLC sequence is extracted as the feature first embedding vector.
[0036] Furthermore, the semantic relevance of the first embedding vectors of the two features is calculated using the Manhattan distance, and the mean square error loss value is generated together with the real space relevance score ,Right now: in Indicates In the OLC sequence pairs, the last character vector in an OLC sequence is updated by the position vector pre-training network. Indicates In an OLC sequence pair, the character vector of the last digit in another OLC sequence updated by the position vector pre-training network; represents L1 norm regularization; is the true spatial correlation score between the sample pairs calculated in step S12, and n represents the number of OLC sequence pairs.
[0037] Furthermore, the process is iterated several times in all training samples until the position vector pre-training network converges, that is, the mean square error loss value is less than a certain threshold.
[0038] Finally, the position vector pre-training network is used to train the interest point position vector, that is, the interest point pre-training position vector: for any interest point , using any GRU network in the trained position vector pre-training network to update the first embedding vector corresponding to the OLC sequence of the interest point, and extract the feature first embedding vector As the position vector of the point of interest S2: Divide the user's historical check-in data into trajectory slices with weekly intervals; Furthermore, in this stage, each user's historical check-in data in each data set is divided into trajectory slices with weekly intervals for subsequent calculations. Among them, the data set of the first social network contains 18,737 users, involving 1,278,274 user check-in data; the data set of the second social network contains 24,941 users, involving 1,196,248 user check-in data. In the two data sets, the training set, validation set, and test set required for the POI recommendation model are divided for each user's historical check-in data, and the proportions are 70%, 10%, and 20%, respectively. The representation of check-in time is to divide the time into 24*7=168 time slots based on a weekly period, map the specific access time in the user's historical check-in data to the time slot, and represent the check-in time with the corresponding time slot ID. The historical check-in data of each user in each training sample is divided into multiple trajectory slices that are continuous in chronological order, recorded as .in Indicates Users, express The number of trajectory slices.
[0039] S3: Establishing a trajectory encoding network, fusing the trajectory slice and the trained position vector through the trajectory encoding network to obtain a trajectory slice vector, constructing a softmax function to transform the trajectory slice vector, and obtaining the interest point preference scores of all the interest points in the trajectory slice; Furthermore, in this stage, a trajectory encoding network is constructed to convert the user's historical check-in data in the trajectory slice into a second embedding vector, thereby generating a trajectory slice vector, and then converting each trajectory slice into an interest point preference score for training the trajectory encoding network.
[0040] Wherein, step S3 further comprises: S31: constructing a long short-term memory network as the trajectory encoding network, fusing the user's historical check-in data and the position vector in the trajectory slice to obtain a second embedding vector, and using the trajectory encoding network to update the second embedding vector in each trajectory slice; S32: Calculate the average position information in each trajectory slice, and concatenate the average position information with the sum of all second embedded vectors in the current trajectory slice to obtain the trajectory slice vector; S33: construct a softmax function, transform the trajectory slice vector through a linear network and multiply it with the candidate interest point representation, and perform a softmax transformation on the trajectory slice vector and the interest point representation through a softmax function to obtain the interest point preference scores of all the interest points.
[0041] With respect to the above steps, the specific implementation methods in this embodiment are as follows: First, the check-in record in each trajectory slice is converted into a second embedding vector, which is formed by concatenating the interest point embedding vector, the time embedding vector and the linearly processed position vector. Then, the second embedding vector in each trajectory slice is updated using the long short-term memory network. , the process is as follows: in, represents the long short-term memory network, and Represent the interest point embedding vector and time vector corresponding to the current check-in record in turn; Indicates point of interest The corresponding position vector; and They represent the interest point embedding vector matrix and the corresponding position vector matrix respectively ( and In turn, they are expressed and The vector dimension of Indicates the size of the interest point set); , The number of check-in records for the current track slice; represents the linear network coefficient; Represents the concatenation of vectors along the last dimension.
[0042] Furthermore, in order to further highlight the spatial clustering pattern of user mobility behavior, the trajectory slice further integrates the average location information of all points of interest involved in the historical check-in data of all users in the current trajectory slice. Obtained through: in, represents the average position long short-term memory network, and m represents the number of check-in records in the current trajectory slice; then, the average position information is concatenated with the sum of all second embedding vectors in the current trajectory slice to obtain the trajectory slice vector : Finally, generate the POI preference score. First, transform the trajectory slice vector through a linear network; then multiply it with the candidate POI representation, which is obtained by concatenating the POI embedding vectors of all candidate POIs and the corresponding position vectors of all candidate POIs; and obtain the user preference score after softmax transformation, i.e., the POI preference score. , the process is as follows: in, represents the linear network parameters used to process trajectory slices, where express The vector dimension of .
[0043] S4: determining the user visit target in each of the trajectory slices and generating a spatially associated target set corresponding to each user visit target, obtaining the interest point preference scores of the user visit target and the spatially associated target set, calculating the loss value of the user visit target and the spatially associated target set, and iterating until the loss value converges to realize the training of the trajectory encoding network; Furthermore, this stage generates a corresponding set of user-visited targets and spatially associated targets for each trajectory slice in the dataset, and uses the improved multi-target cross entropy function fused with weak labels to generate loss values based on the interest point preference scores to realize the training of the trajectory encoding network.
[0044] Wherein, step S4 further comprises: S41: Determine the points of interest in the user's historical check-in data that appear in the five trajectory slices that are located after the current trajectory slice in each trajectory slice as a user visit target set; S42: determining the user access target and the space-associated target set from the user access target set; Wherein, step S42 specifically includes: S421: In the user access target set corresponding to the current trajectory slice, the coarse-grained position information of all the points of interest is used as a first spatially related OLC set of the trajectory slice; S422: Counting the first spatial correlation OLC sets of all trajectory slices; S423: determining a user access target in the current trajectory slice, and finding a set of all spatially relevant OLCs containing coarse-grained location information of the user access target from the first spatially relevant OLC set as a second spatially relevant OLC set; S424: Determine the points of interest corresponding to all the second spatially-related OLC sets as the spatially-related target set corresponding to the user's visit target.
[0045] S43: Determine the set of interest point preference scores in the user visit target and space associated target set of each trajectory slice as a characteristic interest point preference score set, substitute the characteristic interest point preference score set and use the multi-target cross entropy fused with weak labels to calculate the multi-target loss value of the user visit target and space associated target set; S44: Iterate several times in all the training samples until the multi-target loss value of the user access target and the spatial associated target set of the trajectory encoding network converges.
[0046] With respect to the above steps, the specific implementation methods in this embodiment are as follows: First, the user access goals and space-related goals are divided for each trajectory slice. , the points of interest in the check-in records that appear in the 5 trajectory slices after the current trajectory slice are taken as the user's visit target set .
[0047] Furthermore, in the current trajectory slice The corresponding user access target set The coarse-grained position information of all points of interest involved (specifically, the first 6 bits of each OLC sequence are used as coarse-grained position information) is used as the trajectory slice The first spatially related OLC set .
[0048] Furthermore, the first spatial correlation OLC set of all trajectory slices is counted and recorded as .
[0049] Further, a user access target is determined in the current trajectory slice ,from Find all the Coarse-grained location information All spatially related OLC sets of are taken as the second spatially related OLC set, denoted as .
[0050] Further, among the candidate coarse-grained location information, find all the coarse-grained location information that meets the requirements. Points of interest as A collection of spatially related targets .
[0051] Furthermore, the multi-target loss is calculated by combining the user access target and the spatially related target set. User access target and space-related target collection , substitute the characteristic interest point preference score set and use the multi-objective cross entropy fused with weak labels to calculate the multi-objective loss value loss of the user's access target and spatially associated target set, that is, calculate the user's multi-objective learning loss, as follows: in, represents a characteristic interest point preference score in a characteristic interest point preference score set; express The corresponding one-hot vector; express The corresponding multi-hot vector; express The number of spatially related targets in ; and They represent the importance of user access targets and space-related targets respectively. Indicates the number of the current track slice, Indicates the number of trajectory slices.
[0052] Finally, iterate several times in all collected training samples, that is, repeat steps S3 and S4 until the trajectory encoding network converges, that is, the multi-target loss value of the user's visited targets and spatially associated target sets is less than a certain threshold.
[0053] S5: Calculate the position preference score of each of the trajectory slices through the trained trajectory encoding network, and obtain the POI recommendation result by weighted addition of the position preference scores.
[0054] Furthermore, in this stage, for each user in each data set, multiple trajectory slices corresponding to each user are recommended using the trained trajectory encoding network. For each user's multiple trajectory slices, the user interest point preference score of each trajectory slice is generated respectively, and the final recommendation result is formed by weighted addition. The process is as follows: in, Indicates user No. The interest point score corresponding to each trajectory slice; Indicates user The number of trajectory slices; Indicates for The weight coefficient, Indicates the final recommendation result.
[0055] The present invention also verifies the effectiveness of a spatially related point of interest recommendation method. The present invention conducts a point of interest recommendation experiment on two public location-based social network data sets, the first social network and the second social network. The experiment achieves: generating a point of interest preference score for each user, sorting them from high to low, and outputting a set of unvisited points of interest as the recommendation result. Each experiment compares 14 point of interest recommendation models. Experiment 1 groups the prediction results and evaluates the prediction results using three evaluation indicators: Recall (abbreviated as Rec), Normalized Discounted Cumulative Gain (abbreviated as nDCG), and Hit Rate (abbreviated as HR). Where Rec@5 represents the proportion of points of interest actually visited by the user among the top 5 recommended points of interest, and Rec@20 represents the proportion of points of interest actually visited by the user among the top 20 recommended points of interest; nDCG@5 represents the result when 5 points of interest are recommended to the user in the normalized discounted cumulative revenue, and nDCG@20 represents the result when 20 points of interest are recommended to the user in the normalized discounted cumulative revenue; HR@5 represents the proportion of points of interest actually visited by the user among the top 5 recommended points of interest in the sum of points of interest actually visited by the user and points of interest not recommended but actually visited by the user, and HR@20 represents the proportion of points of interest actually visited by the user among the top 20 recommended points of interest in the sum of points of interest actually visited by the user and points of interest not recommended but actually visited by the user. The results of Experiment 1 are shown in Tables 1 and 2, where Table 1 shows the comparison of the results of the present invention and other methods on the point of interest recommendation task in the first social network, and Table 2 shows the comparison of the results of the present invention and other methods on the point of interest recommendation task in the first social network. GeoCo is a model using the method proposed by the present invention.
[0056] Table 1 Comparison of results of the present invention and other methods on the POI recommendation task in the first social network
[0057] Table 2 Comparison of results of the present invention and other methods on the POI recommendation task in the second social network
[0058] The results of Experiment 1 show that the method proposed in this invention surpasses the previous methods and achieves the best results in all three evaluation indicators.
[0059] Tables 3 and 4 show the recommendation results under different user groups in Experiment 2, where Table 3 shows the comparison of the recommendation results of points of interest of the present invention and other methods in different user groups in the first social network, and Table 4 shows the comparison of the recommendation results of points of interest of the present invention and other methods in different user groups in the second social network. The users of each data set are divided into 5 groups. In the first social network, the 5 groups of users represent the user groups whose number of points of interest visited by users is "<15", "15-30", "30-50", "50-100" and ">100" respectively; in the second social network, the 5 groups of users represent the user groups whose number of points of interest visited by users is "<10", "10-20", "20-30", "30-50" and ">50" respectively. The comparison of the results of Experiment 2 is shown in Tables 3 and 4, where GeoCo is the model using the method proposed by the present invention.
[0060] Table 3 Comparison of POI recommendation results of the present invention and other methods in different user groups in the first social network
[0061] Table 4 Comparison of POI recommendation results of the present invention and other methods in different user groups in the second social network
[0062] The results of Experiment 2 show that the method proposed in the present invention achieves the best results on all user groups, proving that the method can achieve good recommendation effects not only for users with more check-in records, but also for cold start users. Figure 2 , Figure 3 , Figure 4 The comparison results of recall rate, normalized discounted cumulative return and hit rate of all models including all methods used in the present invention and models without geographic location vector and without multi-objective learning are shown in turn. It can be seen from the results that after canceling each condition, the prediction effect of the model has decreased to varying degrees, indicating that both location vector and multi-objective learning have played a positive role in improving the recommendation effect. The above results fully demonstrate that the method proposed in the present invention has achieved ideal results in POI recommendation.
[0063] In summary, the present invention provides a method for recommending spatially related points of interest. The point of interest position vector generated by the position vector pre-training network can not only use the vector to represent the location information of the point of interest, but also obtain the relative distance relationship between the points of interest, thereby accurately expressing the geographical location correlation. The multi-objective learning method combines the user's access target and the spatially related target set to jointly calculate the model training loss, which can enable the user trajectory representation to describe the user's preferences while also taking into account other points of interest that are highly geographically related to the points of interest that the user has visited, thereby accurately recommending points of interest that the user may be interested in, thereby improving the effect of point of interest recommendation.
[0064] A spatially-related point of interest recommendation system provided by the present invention is described below. The spatially-related point of interest recommendation system described below and the spatially-related point of interest recommendation method described above can be referred to each other.
[0065] Figure 5 The following is a schematic diagram of the structure of a spatially related point of interest recommendation system. Figure 5 As shown, the method for performing the above-mentioned spatially related POI recommendation method includes: Position vector pre-training module 100: used to obtain interest points in training samples, build a position vector pre-training network, and train the position vectors of the interest points through the position vector pre-training network; User history check-in data preprocessing module 200: used to divide the user history check-in data into track slices with weekly intervals; Trajectory coding network establishment module 300: used to establish a trajectory coding network, fuse the trajectory slice and the trained position vector through the trajectory coding network to obtain a trajectory slice vector, construct a softmax function to transform the trajectory slice vector, and obtain the interest point preference scores of all the interest points in the trajectory slice; The trajectory coding network training module 400 is used to determine the user visit target in each of the trajectory slices and generate a spatially associated target set corresponding to each user visit target, obtain the interest point preference scores of the user visit target and the spatially associated target set, calculate the loss value of the user visit target and the spatially associated target set, and iterate until the loss value converges to realize the training of the trajectory coding network; The interest point recommendation module 500 is used to calculate the position preference score of each of the trajectory slices through the trained trajectory encoding network, and obtain the interest point recommendation result by weighted addition of the position preference scores.
[0066] on the other hand, Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute a method for recommending spatially related points of interest, the method comprising: S1: Obtain the points of interest in the training samples, build a position vector pre-training network, and train the position vectors of the points of interest through the position vector pre-training network; S2: Divide the user's historical check-in data into track slices with weekly intervals; S3: Establishing a trajectory encoding network, fusing the trajectory slice and the trained position vector through the trajectory encoding network to obtain a trajectory slice vector, constructing a softmax function to transform the trajectory slice vector, and obtaining the interest point preference scores of all the interest points in the trajectory slice; S4: determining the user visit target in each of the trajectory slices and generating a spatially associated target set corresponding to each user visit target, obtaining the interest point preference scores of the user visit target and the spatially associated target set, calculating the loss value of the user visit target and the spatially associated target set, and iterating until the loss value converges to realize the training of the trajectory encoding network; S5: Calculate the position preference score of each of the trajectory slices through the trained trajectory encoding network, and obtain the POI recommendation result by weighted addition of the position preference scores.
[0067] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0068] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, the computer can execute a method for recommending spatially related points of interest provided by the above methods, the method comprising: S1: Obtain the points of interest in the training samples, build a position vector pre-training network, and train the position vectors of the points of interest through the position vector pre-training network; S2: Divide the user's historical check-in data into track slices with weekly intervals; S3: Establishing a trajectory encoding network, fusing the trajectory slice and the trained position vector through the trajectory encoding network to obtain a trajectory slice vector, constructing a softmax function to transform the trajectory slice vector, and obtaining the interest point preference scores of all the interest points in the trajectory slice; S4: determining the user visit target in each of the trajectory slices and generating a spatially associated target set corresponding to each user visit target, obtaining the interest point preference scores of the user visit target and the spatially associated target set, calculating the loss value of the user visit target and the spatially associated target set, and iterating until the loss value converges to realize the training of the trajectory encoding network; S5: Calculate the position preference score of each of the trajectory slices through the trained trajectory encoding network, and obtain the POI recommendation result by weighted addition of the position preference scores.
[0069] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform a method for recommending spatially related points of interest provided by the above methods, the method comprising: S1: Obtain the points of interest in the training samples, build a position vector pre-training network, and train the position vectors of the points of interest through the position vector pre-training network; S2: Divide the user's historical check-in data into track slices with weekly intervals; S3: Establishing a trajectory encoding network, fusing the trajectory slice and the trained position vector through the trajectory encoding network to obtain a trajectory slice vector, constructing a softmax function to transform the trajectory slice vector, and obtaining the interest point preference scores of all the interest points in the trajectory slice; S4: determining the user visit target in each of the trajectory slices and generating a spatially associated target set corresponding to each user visit target, obtaining the interest point preference scores of the user visit target and the spatially associated target set, calculating the loss value of the user visit target and the spatially associated target set, and iterating until the loss value converges to realize the training of the trajectory encoding network; S5: Calculate the position preference score of each of the trajectory slices through the trained trajectory encoding network, and obtain the POI recommendation result by weighted addition of the position preference scores.
[0070] The above described system, device, product and medium embodiments are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. Ordinary technicians in this field can understand and implement them without creative work.
[0071] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for recommending spatially related points of interest, characterized in that: include: S1: Obtain the points of interest in the training samples, build a position vector pre-training network, and train the position vectors of the points of interest through the position vector pre-training network; S2: Divide the user's historical check-in data into track slices with weekly intervals; S3: Establishing a trajectory encoding network, fusing the trajectory slice and the trained position vector through the trajectory encoding network to obtain a trajectory slice vector, constructing a softmax function to transform the trajectory slice vector, and obtaining the interest point preference scores of all the interest points in the trajectory slice; S4: determining the user visit target in each of the trajectory slices and generating a spatially associated target set corresponding to each user visit target, obtaining the interest point preference scores of the user visit target and the spatially associated target set, calculating the loss value of the user visit target and the spatially associated target set, and iterating until the loss value converges to realize the training of the trajectory encoding network; S5: Calculate the position preference score of each of the trajectory slices through the trained trajectory encoding network, and obtain the POI recommendation result by weighted addition of the position preference scores.
2. A method for recommending spatially related points of interest according to claim 1, characterized in that: Step S1 further comprises: S11: Acquire the points of interest in the training sample, and convert the location information of the points of interest in the training sample into an OLC sequence; S12: Randomly sample paired OLC sequences from all OLC sequences to form OLC sequence pairs, and calculate the true spatial correlation score of the OLC sequence pairs; S13: construct a position vector pre-training network, bring in the real space correlation score to calculate the mean square error loss value, and iterate the position vector pre-training network until the mean square error loss value converges; S14: Train the interest point using the position vector pre-training network to obtain the position vector of the interest point.
3. A method for recommending spatially related points of interest according to claim 2, characterized in that: Step S13 also includes: S131: Convert each character of each OLC sequence in the OLC sequence pair into a first embedding vector; S132: constructing a twin GRU network as the position vector pre-training network, and the two OLC sequences in each OLC sequence pair respectively use a GRU network in the position vector pre-training network to update the first embedding vector; S133: extracting the first embedding vector updated by the position vector pre-training network on the last bit of each OLC sequence as the feature first embedding vector, calculating the semantic relevance of the two feature first embedding vectors by using Manhattan distance, and calculating the mean square error loss value by using the semantic relevance and the real space relevance score; S134: Iterate several times in all the training samples until the mean square error loss value of the position vector pre-training network converges.
4. The method for recommending spatially related points of interest according to claim 1, characterized in that: Step S3 further comprises: S31: constructing a long short-term memory network as the trajectory encoding network, fusing the user's historical check-in data and the position vector in the trajectory slice to obtain a second embedding vector, and using the trajectory encoding network to update the second embedding vector in each trajectory slice; S32: Calculate the average position information in each trajectory slice, and concatenate the average position information with the sum of all second embedded vectors in the current trajectory slice to obtain the trajectory slice vector; S33: construct a softmax function, transform the trajectory slice vector through a linear network and multiply it with the candidate interest point representation, and perform a softmax transformation on the trajectory slice vector and the interest point representation through a softmax function to obtain the interest point preference scores of all the interest points.
5. The method for recommending spatially related points of interest according to claim 1, characterized in that: Step S4 further comprises: S41: Determine the points of interest in the user's historical check-in data that appear in the five trajectory slices that are located after the current trajectory slice in each trajectory slice as a user visit target set; S42: determining the user access target and the space-associated target set from the user access target set; S43: Determine the set of interest point preference scores in the user visit target and space associated target set of each trajectory slice as a characteristic interest point preference score set, substitute the characteristic interest point preference score set and use the multi-target cross entropy fused with weak labels to calculate the multi-target loss value of the user visit target and space associated target set; S44: Iterate several times in all the training samples until the multi-target loss value of the user access target and the spatial associated target set of the trajectory encoding network converges.
6. A method for recommending spatially related points of interest according to claim 5, characterized in that: Step S42 also includes: S421: In the user access target set corresponding to the current trajectory slice, the coarse-grained position information of all the points of interest is used as a first spatially related OLC set of the trajectory slice; S422: Counting the first spatial correlation OLC sets of all trajectory slices; S423: determining a user access target in the current trajectory slice, and finding a set of all spatially relevant OLCs containing coarse-grained location information of the user access target from the first spatially relevant OLC set as a second spatially relevant OLC set; S424: Determine the points of interest corresponding to all the second spatially-related OLC sets as the spatially-related target set corresponding to the user's visit target.
7. A spatially related point of interest recommendation system, used to execute a spatially related point of interest recommendation method according to any one of claims 1 to 6, characterized in that: include: Position vector pre-training module: used to obtain points of interest in training samples, build a position vector pre-training network, and train the position vectors of the points of interest through the position vector pre-training network; User historical check-in data preprocessing module: used to divide the user historical check-in data into track slices with weekly intervals; Trajectory coding network establishment module: used to establish a trajectory coding network, fuse the trajectory slice and the trained position vector through the trajectory coding network to obtain a trajectory slice vector, construct a softmax function to transform the trajectory slice vector, and obtain the interest point preference scores of all the interest points in the trajectory slice; Trajectory coding network training module: used to determine the user visit target in each of the trajectory slices and generate a spatially associated target set corresponding to each user visit target, obtain the interest point preference scores of the user visit target and the spatially associated target set, calculate the loss value of the user visit target and the spatially associated target set, and iterate until the loss value converges to realize the training of the trajectory coding network; Point of interest recommendation module: used to calculate the location preference score of each of the trajectory slices through the trained trajectory encoding network, and obtain the point of interest recommendation result by weighted addition of the location preference scores.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of a method for recommending spatially related points of interest as described in any one of claims 1 to 6 are implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a method for recommending spatially related points of interest as described in any one of claims 1 to 6 are implemented.
10. A computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, characterized in that: When the program instructions are executed by a computer, the computer can execute the steps of a method for recommending spatially related points of interest as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Space-time dynamic perception interest point recommendation method and system and storage medium
CN117435819A
Fine-grained interest point recommendation method and device based on few-sample knowledge graph
CN117609631A
Point of interest recommendation method based on time sequence knowledge graph, medium and electronic equipment
CN118377979A
Pre-training method and model fine-tuning method for geographical pre-training model
WO2023168909A1
Cited By
Natural language-based itinerary planning method, system, equipment, product and medium
CN119539450A
Itinerary planning method, system, device, product and medium based on natural language
CN119539450B
Method and device for recommending next interest point based on fusion of interactive features and associated features
CN120045798A
