A reliable travel recommendation method based on loop-aware prediction
Patent Information
- Application Number
- CN202410657715.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-04-16
- Filing Date
- 2024-05-26
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2044-05-26
AI Technical Summary
然而上述三种方法在面临复杂和多样化的推荐任务时,泛化能力较差,生成轨迹的准确性难以保证,且容易导致重复生成POI的问题,
[0055]1、本发明有效控制和缓解了轨迹推荐中出现的重复生成问题,实验结果中的两个准确性指标平均提升了8.2%,轨迹重复率指标降低了22.4%(均比较次优方案的结果,见表1),证明了本发明在确保生成轨迹准确的前提下,还能够缓解轨迹重复生成的现象,以得到可靠的轨迹序列;
Smart Images

Figure CN118606546B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of neural network technology in machine learning, and relates to a trajectory prediction method based on deep learning. It mainly involves a reliable travel recommendation method using Transformer neural network and Cycle-aware Prediction technology. Background Technology
[0002] Travel recommendation (also known as trajectory recommendation) is a technology based on historical data analysis. It generates recommended routes that match the actual scenario and individual preferences by studying users' movement patterns and travel intentions. The main goal of this technology is to deeply mine the complex and diverse social knowledge of people to infer and predict social relationships. In practical applications, travel recommendation plays a crucial role not only in urban planning and traffic management but also provides strong support for social governance issues such as criminal tracking.
[0003] With the rise of location-based social networks (LBSNs) globally, applications such as WeChat, Douyin, and Weibo offer users a wealth of features, including text sharing, video posting, and social interaction. Users can publish content with timestamps and location tags and exchange information with others. This spatiotemporal data contains rich social knowledge, and its management and mining have broad application prospects. Trajectories, as an important representative, are a collection of geographically ordered points of interest (POIs) arranged in time. Travel recommendation technology aims to provide personalized travel route customization for future users by fully mining the high-order interaction features of historical trajectories. However, the accuracy of trajectory generation by existing methods is not high, and traditional models based on recurrent neural networks frequently exhibit repetitive generation in trajectory generation, which does not conform to the actual movement patterns of travelers in real-world scenarios.
[0004] Traditional travel recommendation methods can generally be divided into three types: The first is based on statistical optimization, which generates trajectories by solving an optimal planning problem under specific constraints (such as the popularity of POIs, user preferences, etc.). These constraints are prior knowledge statistically derived from initial social knowledge. Another method relies on simple machine learning techniques, extracting fusion features of each POI from spatiotemporal data for ranking, or constructing local transition matrices between POIs as correlations to obtain more accurate results. The last method employs deep learning techniques, encoding spatiotemporal data into query sequences that the model can learn, and using recurrent neural network architectures to mine higher-order relationships between POIs. However, when faced with complex and diverse recommendation tasks, these three methods exhibit poor generalization ability, making it difficult to guarantee the accuracy of generated trajectories, and are prone to generating duplicate POIs.
[0005] With the continuous advancement of machine learning technology, deep neural networks (DNNs) have demonstrated greater flexibility and generalization capabilities, enabling them to handle more complex and diverse recommendation tasks. Therefore, this invention utilizes the attention mechanism in Transformers to perceive information such as the contextual consistency and diversity of trajectory sequences. Furthermore, it introduces loop closure awareness prediction technology, which not only ensures the accuracy of generated trajectories but also further alleviates the problem of repetitive point-of-interest (POI) generation, achieving reliable trajectory recommendation. Summary of the Invention
[0006] The purpose of this invention is to address the aforementioned problems in existing technologies by providing a reliable travel recommendation method based on loop closure-aware prediction. This method leverages the powerful generative capabilities of the Transformer to obtain more accurate results and introduces loop closure-aware structures in both the training and decoding stages to alleviate the problem of repetitive generation in the prediction model. By employing two penalty conditions in the training stage and a restricted stochastic adjustment strategy in the decoding stage, the reliability of the travel recommendation generation process is achieved.
[0007] The basic idea of this invention is to use the fused temporal coding information as input to the Transformer, and to use an additional guiding matrix and drifting mechanism as penalty conditions during the model training phase to stimulate the model's loop closure awareness; then, during the decoding process, a constrained stochastic adaptation strategy is used to obtain reliable prediction results according to probability.
[0008] Based on the above-mentioned inventive concept, the reliable travel recommendation method based on loop closure perception prediction provided by the present invention includes the following steps:
[0009] S1 constructs input data based on tourists' travel queries;
[0010] S2 inputs the input data into the trained Transformer encoder to obtain the latent information distribution of the predicted target interest sequence;
[0011] S3 transforms the potential information distribution of the predicted target interest sequence into a probability distribution of interest point classification, and reconstructs the probability distribution of interest point classification based on the guiding matrix of the position.
[0012] Based on the defined confidence score, S4 decodes the probability distribution of the reconstructed interest point classification through a decoder to obtain the final recommendation result.
[0013] In step S1 above, the tourist's travel query is a 5-tuple. Where p s and t s p represents the starting point of interest and the corresponding timestamp. e and t e This represents the target point of interest and its corresponding timestamp, where n represents the number of points of interest (including the start and end points) that the user expects to access. The intermediate region between the starting point of interest and the target point of interest is masked and embedded, then time-aware encoded and fused with the starting and target points of interest to obtain the input data for the Transformer encoder.
[0014] In step S2 above, the training process of the Transformer encoder uses a guidance and drifting training penalty strategy, including the following steps:
[0015] L1 processes all the trajectories used in training to construct the input data;
[0016] L2 inputs the input data into the Transformer encoder to obtain the latent information distribution of the predicted target interest sequence;
[0017] L3 transforms the potential information distribution of the predicted target interest sequence into a probability distribution of interest point classification, and reconstructs the probability distribution of interest point classification based on the guiding matrix of the location.
[0018] L4 performs a drift operation on the probability distribution of the reconstructed interest point classification to construct an optimization objective;
[0019] L5 constructs a cross-entropy loss function based on the probability distribution of the reconstructed interest point classification and the true trajectory sequence;
[0020] L6 constructs the total loss based on the optimization objective and the cross-entropy loss function;
[0021] L7 optimizes the Transformer encoder parameters using the total loss;
[0022] Repeat steps L2-L7 above until the Transformer encoder converges.
[0023] In step L1 above, the intermediate region between the starting interest point and the target interest point in each trajectory is masked and embedded. Then, after time-aware encoding, it is fused with the starting and target interest points to obtain the input data for the Transformer encoder. Specifically, the interest point p is extracted from each training trajectory T. i and access timestamp t i Then, the intermediate regions excluding the endpoints are masked and embedded using the ε operation. p (·) and ε t (·) to obtain X p ′ and X t ′ To realize feature fusion operation of loop-pass perception penalty network
[0024] X m =ε p (p1,[mask],…,[mask],p m )+ε t (t1,[mask],…,[mask],t m )
[0025] in, # represents the dimension of the embedding vector, and [mask] represents the embedding value of the corresponding mask. Positional encoding is then used. The input to the Transformer layer is obtained in the following way: Where #&%p%'t represents the operation of randomly discarding neurons during training, with the discard ratio set to 0.1.
[0026] In step L2 above, the input data X is... ′ m Input Transformer encoder:
[0027]
[0028] in, It is the distribution of potential information that predicts the sequence of target points of interest.
[0029] In step L3 above, regarding the results obtained above... Use a fully connected layer as the prediction head. The probability distribution for converting it into a POI category is as follows:
[0030]
[0031] in, Represents the total number of POIs; for the resulting distribution Two loop closure sensing tasks, guidance and drift, are used as new optimization objectives for the model. First, a position-based guidance matrix is defined. Note that $ = From the historical time and space trajectory set According to statistics, m mBC represent The longest trajectory. Each element in the guiding matrix is calculated as follows: Among them 2 iD This represents the frequency of the H-th POI number appearing at the i-th position, 2 i Representative at The total frequency of the Hth POI is used to determine the frequency of POI occurrences, which can then be used as a guide. The basis for the distribution.
[0032] Therefore, the present invention uses $ = Refactoring The expression is:
[0033]
[0034] in, For the reconstructed potential distribution, This represents the transpose of the guiding matrix that has been truncated at length m.
[0035] In step L4 above, in order to maximize the difference in classification probability corresponding to each position, the present invention will... Each of them Drift operations are performed between these points to define new optimization objectives.
[0036]
[0037] Where Z is called the drift coefficient, used to control the drift distance; $&(·) represents the distance between the drift coefficient and the drift distance. After normalization, cosine similarity is calculated. In this formula, the greater the difference between the two drifting terms, the better the model optimization.
[0038] In step L5 above, the calculation is performed. and the actual trajectory sequence The cross-entropy loss function (CrossEntropy, CE).
[0039] In step L6 above, the reconstructed output distribution obtained above... Two types of optimization objectives are employed. The first is the cross-entropy loss function, and the second is the optimization objective corresponding to the aforementioned drift operation. Therefore, the final optimized form (i.e., the total loss) is:
[0040]
[0041] Here, \=1.0 is a predefined hyperparameter used to control the weights of the two types of loss functions.
[0042] In step L7 above, the Transformer encoder parameters are optimized using the Adam optimization algorithm with the total loss.
[0043] This invention uses the total loss stabilizing or the number of iterations for training as the convergence condition for the Transformer encoder.
[0044] Step S3 above is the same as step L3 in the previous Transformer encoder training process.
[0045] In step S4 above, the decoder employs a random decoding method based on a kernel sampling strategy. Based on the defined confidence score, a threshold is reconstructed; then, based on the reconstructed threshold, the probability distribution of the reconstructed interest point classification is decoded using the kernel sampling strategy to obtain the final recommendation result.
[0046] Using the travel query Q as input, the corresponding latent distribution is obtained after two steps, S2 and S3. The output of this invention is a confidence score. To constrain the subsequent random decoding process:
[0047]
[0048] in, Represents the guiding matrix $ = The number of 0s at the i-th position in the trajectories. In other words, the more 0s there are at a certain position, the more certain the candidate distribution in the historical trajectory tends to be, and therefore a higher confidence score should be given when making recommendations. This invention uses the confidence score defined by the above formula, combined with kernel sampling (see terminology explanation below) to construct a constrained stochastic adjustment structure.
[0049] Based on the expected length n in the travel query Q, the above definition... To truncate, the operation is as follows: For any recommended position k, for the above Get the index value. Next, we obtain the threshold for reconstructing the confidence constraint. From POI candidate sequences According to probability distribution Perform random decoding. Here, p = 0.8 represents the kernel sampling threshold. The decoder is defined as follows:
[0050]
[0051] The decoding result above is the actual trajectory point. This invention concatenates the data according to the expected length of the query to obtain the final recommendation result:
[0052]
[0053] Thus, a reliable travel recommendation method based on loopback sensing technology has been realized.
[0054] Compared with existing technologies, the air compressor fault prediction and health assessment method and system based on graph neural networks provided by this invention have the following beneficial effects:
[0055] 1. This invention effectively controls and alleviates the problem of repeated generation in trajectory recommendation. The two accuracy indicators in the experimental results are improved by an average of 8.2%, and the trajectory repetition rate is reduced by 22.4% (both compared with the results of the suboptimal solution, see Table 1). This proves that this invention can alleviate the phenomenon of repeated trajectory generation while ensuring the accuracy of the generated trajectory, so as to obtain a reliable trajectory sequence.
[0056] 2. This invention adopts the basic architecture of Transformer, making the model a sequence-to-sequence (Seq2Seq) generating structure. This avoids the implicit query encoding of traditional recurrent neural networks and ensures that the undisturbed query information is used explicitly.
[0057] 3. This invention constructs three methods for loop closure perception from the perspectives of training and decoding. These strategies are applicable not only to travel recommendation tasks but also to other time-series recommendation tasks; therefore, this invention has universality and transferability. Attached Figure Description
[0058] Figure 1 This is a schematic diagram illustrating the principle of the reliable travel recommendation method based on loop closure perception prediction of the present invention.
[0059] Figure 2 This is a schematic diagram of the Transformer encoder training process provided by the present invention;
[0060] Figure 3 This is a schematic diagram of the reliable travel recommendation method based on loop closure perception prediction according to the present invention.
[0061] Terminology Explanation
[0062] The Transformer encoder, or Transformer Neural Network, is a deep learning model that employs a self-attention mechanism. It is widely used in natural language processing, time-series data processing, and recommender systems. Unlike RNNs, the Transformer is a sequence-to-sequence model, capable of processing all input data at once. Its main structure consists of multi-head self-attention, positional encoding (*), a feedforward neural network (*ttu*) with pqrs(*) activation function, layer normalization, a dropout policy (*&*p*t), and residual connection units.
[0063] Decoding is mainly divided into two types: deterministic decoding and stochastic decoding. Traditional travel recommendation primarily uses deterministic greedy decoding, which limits the model's representational power and the diversity and accuracy of its output. Currently, commonly used stochastic decoding methods are Top-K and Top-P kernel sampling (see reference [Holtzman A, Buys J, Du L, et al. The curious case of neural text degeneration[J]. arXivpreprint arXiv:1904.09751,2019.]). These methods not only increase accuracy but also increase diversity, allowing sequences to move beyond monotonous repetitive generation patterns. Detailed Implementation
[0064] The present invention will be further described with reference to the accompanying drawings.
[0065] Example 1
[0066] A single point of interest can be identified by its geographic ID p i" and latitude and longitude (p v ,p B ) represents a tuple in This is a collection of all points of interest information. They can then be sorted according to the order in which they were checked in to obtain their historical spatiotemporal trajectory. Where m represents the current trajectory length, (p i ,t i ) indicates at timestamp t i Visited geographic points of interest p i , This represents all historical trajectory information. Subsequently, this study defines a tourist's travel query as a quintuple. Where ps and t s p represents the starting point of interest and the corresponding timestamp. e and t e This represents the target interest point and its corresponding timestamp, where n represents the number of interest points (including the first and last endpoints) that the user expects to access.
[0067] This invention consists of a training process and a decoding process. During the training process, the pre-processed spatiotemporal trajectories in the training set are subjected to feature fusion. And through the above two types of loop-passing perception penalty networks To predict the corresponding true trajectory values of the training set.
[0068]
[0069] in y represents the penalty for all learnable parameters of the network.
[0070] During the decoding process, the quintet Q is first transformed according to the input format used in model training. After feature fusion, a constrained stochastic adjustment structure is used. Reconstructed generated values:
[0071]
[0072] in It is the final recommended value for the travel trajectory, and it satisfies the condition of alignment between the beginning and end endpoints. and ^%n represents the imposed constraint.
[0073] Based on the above analysis, such as Figure 1 and Figure 2 As shown, this embodiment first uses guidance and drifting to train the penalty policy, and obtains a pre-trained Transformer encoder through the following steps:
[0074] L1 processes all the trajectories used in training to construct the input data.
[0075] The intermediate region between the starting interest point and the target interest point in each trajectory is masked, embedded, and then fused with the starting and target interest points after time-aware encoding to obtain the input data for the Transformer encoder. Specifically, the interest point p is extracted from each training trajectory T. i and access timestamp t i Then, the intermediate regions excluding the endpoints are masked and embedded using the ε operation. p (·) and εt (·) to obtain X p ′ and X t To implement feature fusion operations in a loop-passing perception penalty network.
[0076] X m =ε p (p1,[mask],…,[mask],p m )+ε t (t1,[mask],…,[mask],t m (3)
[0077] in, # represents the dimension of the embedding vector, and [mask] represents the embedding value of the corresponding mask. Positional encoding is then used. The input to the Transformer layer is obtained in the following way: Where #&%p%'t represents the operation of randomly discarding neurons during training, with the discard ratio set to 0.1.
[0078] L2 inputs the input data into the Transformer encoder to obtain the latent information distribution of the predicted target interest sequence.
[0079] Input data X′ m Input Transformer encoder:
[0080]
[0081] in, It is the distribution of potential information that predicts the sequence of target points of interest.
[0082] L3 transforms the latent information distribution of the predicted target interest sequence into a probability distribution for interest point classification, and reconstructs the probability distribution for interest point classification based on the guiding matrix of the location.
[0083] Regarding the above results Use a fully connected layer as the prediction head. The probability distribution for converting it into a POI category is as follows:
[0084]
[0085] in, Represents the total number of POIs; for the resulting distribution Two loop closure sensing tasks, guidance and drifting, are adopted as new optimization objectives for the model. First, a position-based guidance matrix is defined. Note that $= From the historical time and space trajectory set According to statistics, m mBC This represents the longest trajectory in A. Each element in the guiding matrix is calculated as follows: Among them 2 iD This represents the frequency of the H-th POI number appearing at the i-th position, 2 i Representative at The total frequency of the Hth POI is used to determine the frequency of POI occurrences, which can then be used as a guide. The basis for the distribution.
[0086] Therefore, this embodiment uses $ = Refactoring The expression is:
[0087]
[0088] in, For the reconstructed potential distribution, This represents the transpose of the guiding matrix that has been truncated at length m.
[0089] L4 performs a drift operation on the probability distribution of the reconstructed interest point classification to construct an optimization objective.
[0090] get Then, in order to maximize the difference in classification probability corresponding to each position, Each of them Drift operations are performed between these points to define new optimization objectives.
[0091]
[0092] Where Z is called the drift coefficient, used to control the drift distance; $&(·) represents the distance between the drift coefficient and the drift distance. After normalization, cosine similarity is calculated. In this formula, the greater the difference between the two drifting terms, the better the model optimization.
[0093] L5 constructs a cross-entropy loss function based on the probability distribution of the reconstructed point of interest classification and the true trajectory sequence.
[0094] calculate and the actual trajectory sequence The Cross Entropy (CE) loss function.
[0095] L6 constructs the total loss based on the optimization objective and the cross-entropy loss function.
[0096] The reconstructed output distribution obtained above Two types of optimization objectives are employed. The first is the cross-entropy loss function, and the second is the optimization objective corresponding to the aforementioned drift operation. Therefore, the final optimized form (i.e., the total loss) is:
[0097]
[0098] Where \ = 1.0 is a predefined hyperparameter used to control the weights of the two types of loss functions.
[0099] L7 optimizes the Transformer encoder parameters using total loss.
[0100] The Transformer encoder parameters are optimized using the Adam optimization algorithm with the total loss.
[0101] Repeat steps L2-L7 above until the Transformer encoder converges.
[0102] In this embodiment, the convergence condition of the Transformer encoder is that the total loss tends to stabilize or the number of iterations is reached.
[0103] This embodiment further utilizes a trained Transformer encoder to provide a reliable travel recommendation method based on loop closure perception prediction, such as... Figure 1 and Figure 3 It includes the following steps:
[0104] S1 constructs input data based on user-defined travel queries.
[0105] The tourist's travel query is a quintuple. Where p s and t s p represents the starting point of interest and the corresponding timestamp. e and t e This represents the target point of interest and its corresponding timestamp, where n represents the number of points of interest (including the start and end points) that the user expects to access. The intermediate region between the starting point of interest and the target point of interest is masked and embedded, then time-aware encoded and fused with the starting and target points of interest to obtain the input data for the Transformer encoder.
[0106] Feature fusion operation
[0107] X j =ε p (p1,[mask],…,[mask],p c )+ε t (t1,[mask],…,[mask],t j )
[0108] in, # represents the dimension of the embedding vector, and [mask] represents the embedding value of the corresponding mask. Positional encoding is then used. The input to the Transformer layer is obtained in the following way: Where #&%p%'t represents the operation of randomly discarding neurons during training, with the discard ratio set to 0.1.
[0109] S2 inputs the input data into the trained Transformer encoder to obtain the latent information distribution of the predicted target interest sequence.
[0110] Input data X ′ j Inputting the Transformer encoder yields:
[0111]
[0112] in, It is the distribution of potential information that predicts the sequence of target points of interest.
[0113] S3 transforms the potential information distribution of the predicted target interest sequence into a probability distribution of interest point classification, and reconstructs the probability distribution of interest point classification based on the guiding matrix of the location.
[0114] Regarding the above results The reconstruction is obtained according to the above formulas (5) and (6). The expression is:
[0115]
[0116] in, For the reconstructed potential distribution, This represents the transpose of the guiding matrix that has been truncated at length n.
[0117] Based on the defined confidence score, S4 decodes the probability distribution of the reconstructed interest point classification through a decoder to obtain the final recommendation result.
[0118] The decoder employs a random decoding method based on a kernel sampling strategy. A threshold is reconstructed based on the defined confidence score; then, based on the reconstructed threshold, the probability distribution of the reconstructed interest point classification is decoded using the kernel sampling strategy to obtain the final recommendation result.
[0119] Using the travel query Q as input, the corresponding latent distribution is obtained after two steps, S2 and S3. The output of this invention is a confidence score. To constrain the subsequent random decoding process:
[0120]
[0121] in, Represents the guiding matrix $ = The number of 0s at the i-th position in the trajectories. In other words, the more 0s there are at a certain position, the more certain the candidate distribution in the historical trajectory tends to be, and therefore a higher confidence score should be given when making recommendations. This invention uses the confidence score defined by the above formula, combined with kernel sampling (see terminology explanation below) to construct a constrained stochastic adjustment structure.
[0122] Based on the expected length n in the travel query Q, the above definition... The confidence score is truncated, and the operation is as follows: For any recommended position k, for the above Get the index value. Next, we obtain the threshold for reconstructing the confidence constraint. From POI candidate sequences According to probability distribution Perform random decoding. Here, p = 0.8 represents the kernel sampling threshold. The decoder is defined as follows:
[0123]
[0124] The decoding result above is the actual trajectory point. This invention concatenates the data according to the expected length of the query to obtain the final recommendation result:
[0125]
[0126] Thus, a reliable travel recommendation method based on loopback sensing technology has been realized.
[0127] This embodiment evaluates the method of the present invention on trajectory datasets (Edinburgh, Glasgow, and Toronto) segmented from the Flickr social network, covering three different cities. Photos and videos were collected from the geo-based social platform Flickr, including metadata such as the user, shooting date / time, geographic location classification, and latitude and longitude coordinates, to form an initial spatiotemporal dataset.
[0128] The initial spatiotemporal dataset is preprocessed according to the following steps:
[0129] (1) Data cleaning is performed on the initial spatiotemporal dataset according to different data properties and feature categories to obtain attribute knowledge related to each user check-in record. This includes: the ID value (identification) of the user, trajectory, and visited point of interest, the access timestamp (Coordinated Universal Time UTC, time format "year-month-day hour:minute:second"), the length of the trajectory, and the latitude and longitude of the point of interest;
[0130] (2) Based on the above check-in records, the same trajectory ID is used as the key, and other corresponding attributes are merged according to the trajectory length to obtain the final input data as follows: trajectory ID, user ID, historical trajectory (interest point ID cluster), trajectory historical timestamp (statistical information in UTC time by hour), and trajectory latitude and longitude information.
[0131] (3) Use serial numbers to identify the trajectory IDs, and obtain the indexes of the training and test datasets according to the ratio of random seed, training set and test set.
[0132] To fully evaluate the overall performance of the model and ensure data coverage, a leave-one-out validation method was adopted. That is, in each iteration of training and testing, one trajectory is selected as the validation set according to its index, while the other trajectories are used as historical training trajectories. The method of this invention was compared with nine popular baselines, including three statistical optimization methods, two machine learning methods, and four deep learning methods. Regarding the training parameter settings, the learning rate of the three datasets in this invention was set to 0.01, the hidden layers of the Transformer were set to 32, and the kernel sampling threshold was set to 0.8. To comprehensively evaluate the accuracy and repetition rate of the proposed method, three evaluation metrics were used: t1 and $aH&st1 (hereinafter referred to as $t1) scores were used to measure accuracy, and the average repetition rate p_$ of the recommended trajectories was used to measure the loop closure of the trajectories. Higher t1 and $t1, and lower p_$ represent better results. Furthermore, some statistical optimization and simple machine learning methods do not exhibit loop closure due to the specificity of their tasks; therefore, the corresponding results are represented by placeholders (-). The optimal results are highlighted in bold, and the results are shown in Table 1.
[0133] Table 1: Results of trajectory recommendation on three datasets
[0134]
[0135]
[0136] The remaining methods in the table are described below:
[0137] Among the statistical optimization and machine learning methods, the PersTour method uses additional constraints such as timestamps and distances for POIs. See Lim KH, Chan J, Leckie C, et al. Personalized tour recommendation based on user interests and points of interest visit durations [C] / / Twenty-fourth international joint conference on artificial intelligence. 2015. The implementation process of the remaining four methods can be found in Chen D, Ong CS, Xie L. Learning points and routes to recommend trajectories [C] / / Proceedings of the 25th ACM international on conference on information and knowledge management. 2016:2227-2232. Among them, the Popularity method makes travel recommendations based on the popularity information of POIs, and places with high popularity are recommended first; the Markov method constructs a Markov transition matrix between POIs and makes recommendations by maximizing the transition probability; the POIRank method integrates multiple features of POIs and uses a RankSVM classifier to rank POIs; the Markov-Rank method is a fusion of the above Markov and POIRank methods, which takes into account both statistical features and machine learning performance.
[0138] All four deep learning methods are based on recurrent neural networks (RNNs). DeepTrip employs additional Generative Adversarial Networks (GANs) as discriminators to improve performance through zero-sum game theory. See Gao Q, Zhou F, Zhang K, et al. Adversarial human trajectory learning for trip recommendation [J]. IEEE Transactions on Neural Networks and Learning Systems, 2021. SelfTrip uses self-supervised and combinatorial contrastive learning (CL) to learn useful representations of the data. See Gao Q, Wang W, Zhang K, et al. Self-supervised representation learning for trip recommendation [J]. Knowledge-Based Systems, 2022, 247:108791. CTLTR uses a multi-layered RNN structure and two contrastive learning tasks as pre-training. See Zhou F, Wang P, Xu X, et al. Contrastive trajectory learning for tour recommendation [J]. ACM Transactions on Intelligent Systems and... Technology (TIST), 2021, 13(1): 1-25; Bert-Trip defines the trajectory recommendation problem as a pre-training task of language and uses the Transformer-based model Bert as the basic skeleton for the prediction task. See Kuo AT, Chen H, Ku WS. BERT-Trip: Effective and Scalable Trip Representation using Attentive Contrast Learning [C] / / 2023 IEEE 39th International Conference on Data Engineering (ICDE). IEEE Computer Society, 2023: 612-623.
[0139] As can be seen from the experimental results in Table 1, the loop closure sensing structure implemented in this invention achieves more reliable results in travel recommendations in real-world scenarios. By using Transformer as the basic architecture for sequence recommendation and employing a two-stage strategy that combines penalized training and random decoding, the model gains the ability to detect loop closures and repetitions in sequences. Compared to other methods, this invention improves accuracy while effectively reducing the p-value, ultimately achieving more ideal recommendation results.
[0140] In summary, this invention, while generating accurate trajectories using historical user geographic data, effectively mitigates the common phenomenon of repeated generation in recommendation results, thereby improving the reliability of the recommendations. Specifically, it includes the following steps: First, a fusion encoding representation of travel history queries is constructed using spatiotemporal data and historical user interactions; second, a basic structure for loop closure awareness is built from both training and decoding perspectives; then, two additional penalty conditions are introduced during the training phase to stimulate the model's ability to perceive and correct repeated loop generation; finally, a constrained stochastic adjustment strategy is employed during the decoding process to obtain the final recommendation result. This invention not only effectively alleviates the problem of frequent loops in trajectory recommendation results but also improves prediction accuracy, achieving reliable travel recommendation results.
[0141] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.
Claims
1. A reliable travel recommendation method based on loop closure perception prediction, characterized in that, Includes the following steps: S1 Constructs input data based on tourists' travel queries; a tourist's travel query is a 5-tuple. ,in and This represents the starting point of interest and its corresponding timestamp. and Represents the point of interest and its corresponding timestamp. This represents the number of points of interest that the user expects to access; the intermediate region between the starting point of interest and the destination point of interest is masked and embedded, and then fused with the starting point of interest and the destination point of interest after time-aware encoding to obtain the input data of the Transformer encoder; S2 inputs the input data into the trained Transformer encoder to obtain the latent information distribution of the predicted target interest sequence; the training steps of the Transformer encoder are as follows: L1 processes all the trajectories used in training to construct the input data; L2 inputs the input data into the Transformer encoder to obtain the latent information distribution of the predicted target interest sequence; L3 transforms the potential information distribution of the predicted target interest sequence into a probability distribution of interest point classification, and reconstructs the probability distribution of interest point classification based on the guiding matrix of the location. L4 performs a drift operation on the probability distribution of the reconstructed interest point classification to construct an optimization objective; L5 constructs a cross-entropy loss function based on the probability distribution of the reconstructed interest point classification and the true trajectory sequence; L6 constructs the total loss based on the optimization objective and the cross-entropy loss function; L7 optimizes the Transformer encoder parameters using the total loss; Repeat steps L2-L7 above until the Transformer encoder converges; S3 transforms the potential information distribution of the predicted target interest sequence into a probability distribution of interest point classification, and reconstructs the probability distribution of interest point classification based on the guiding matrix of the location. S4 uses the defined confidence score to decode the probability distribution of the reconstructed interest point classification through a decoder to obtain the final recommendation result.
2. The reliable travel recommendation method based on loop closure perception prediction according to claim 1, characterized in that, In step L1, the intermediate region between the starting interest point and the target interest point in each trajectory is masked and embedded. Then, after time-aware encoding, it is fused with the starting and target interest points to obtain the input data for the Transformer encoder. Specifically, the interest points are extracted from each training trajectory T. and access timestamp Then, the middle regions excluding the endpoints are masked and embedded. To obtain To realize feature fusion operation of loop-pass perception penalty network : ; in, , The dimension of the embedded vector. This represents the embedding value of the corresponding mask; then positional encoding is used. The input to the Transformer layer is obtained in the following way: ,in, This represents the operation of randomly discarding neurons during training; In step L2 above, the input data will be... Input Transformer encoder: ; in, It is the distribution of potential information in the prediction of the target interest point sequence; In step L3 above, regarding the results obtained above... Using fully connected layers as prediction heads The probability distribution for converting it into a POI category is as follows: ; in, Represents the total number of POIs; Define a position-based guiding matrix , represent The longest trajectory; the calculation method for each element in the guiding matrix is as follows: ,in , , Representing the The POI number in the Frequency of occurrence of each position Representative at The first one appeared in the middle Total frequency of each POI; Therefore, using Refactoring The expression is: ; in, For the potential distribution to be reconstructed, Represents length The transpose of the truncated guiding matrix.
3. The reliable travel recommendation method based on loop closure perception prediction according to claim 2, characterized in that, In step L4, to maximize the difference in classification probabilities corresponding to each position, Each of them Drift operations are performed between these points to define new optimization objectives. : ; in, It is called the drift coefficient and is used to control the drift distance; Representative to After normalization, cosine similarity is calculated. In step L5 above, the calculation is performed. and the actual trajectory sequence Cross-entropy loss function ; In step L6 above, the total loss is: ; in, It is a predefined hyperparameter.
4. The reliable travel recommendation method based on loop closure perception prediction according to claim 2 or 3, characterized in that, In step S4, the decoder uses a random decoding method based on a kernel sampling strategy; it reconstructs the threshold based on the defined confidence score; and then, based on the reconstructed threshold, it decodes the probability distribution of the reconstructed interest point classification using a kernel sampling strategy to obtain the final recommendation result.
5. The reliable travel recommendation method based on loop closure perception prediction according to claim 4, characterized in that, Define confidence score : , ; in, Represents the guiding matrix The first in The number of 0s in each position; Based on the expected length n in the travel query Q, the above definition... To truncate, the operation is as follows: For any recommended position k, for the above Get the index value. Next, we obtain the threshold for reconstructing the confidence constraint. Candidate sequences from POI According to probability distribution Perform random decoding; the decoder is defined as: ; Based on the expected length of the query, the decoded results are concatenated to obtain the final recommendation result: 。
Citation Information
Patent Citations
Next POI recommendation method based on user preference and spatio-temporal context information
CN117194763A
Interest point recommendation method combining discontinuity and multi-level periodicity
CN117828197A