Reliable travel recommendation method based on loopback perception prediction

By introducing Transformer and loop-aware prediction technology into travel recommendations, the guidance matrix and drift mechanism are used to solve the problems of trajectory generation accuracy and repeated generation in the existing technology, achieving more reliable and diverse recommendation results.

CN118606546AActive Publication Date: 2024-09-06UNIV OF ELECTRONICS SCI & TECH OF CHINA

Patent Information

Application Number
CN202410657715.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-04-16
Filing Date
2024-05-26
Publication Date
2024-09-06
Estimated Expiration
2044-05-26

AI Technical Summary

Technical Problem

Existing travel recommendation methods have poor generalization capabilities when faced with complex and diverse recommendation tasks, making it difficult to ensure the accuracy of generated trajectories, and easily lead to repeated generation of points of interest.

Method used

A transformer-based loop-back awareness prediction method is adopted, by using the guidance matrix and drift mechanism as penalty conditions in the training phase, and using a restricted random adjustment strategy in the decoding phase to ensure the accuracy of the generated trajectory and avoid repeated generation.

Benefits of technology

It effectively improves the accuracy and reliability of trajectory recommendation, reduces the rate of repeated generation of interest points, and improves the model's generalization ability and the diversity of the generation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118606546A
    Figure CN118606546A
Patent Text Reader

Abstract

The invention belongs to the technical field of trajectory prediction, and relates to a reliable travel recommendation method based on loopback perception prediction, which comprises the following steps of: constructing input data based on travel query of a user; inputting the input data into the trained Transform encoder to obtain potential information distribution of a predicted target interest sequence; according to potential information distribution of a predicted target interest sequence, converting the potential information distribution into probability distribution of interest point classification, and reconstructing the probability distribution of interest point classification based on a position guide matrix; and according to the defined confidence score, decoding the probability distribution of the reconstructed interest point classification through a decoder to obtain a final recommendation result. On the premise of ensuring the accuracy of the generated track, the phenomenon of repeated track generation can be relieved, so that a reliable track sequence is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of neural network in machine learning, and relates to a trajectory prediction method based on deep learning, mainly to a reliable travel recommendation method using a transform neural network (Transformer) and cycle-aware prediction (Cycle-awarePrediction) technology. Background Art

[0002] Travel recommendation (also known as trajectory recommendation) is a technology based on historical data analysis. It generates recommended routes that conform to actual scenarios and personal preferences by studying users' mobility patterns and travel intentions. The main goal of this technology is to deeply explore the complex and diverse social knowledge of the crowd to reason and predict social relationships. In practical applications, travel recommendations not only play a key role in areas such as urban planning and traffic diversion, but also provide strong support for social governance issues such as criminal tracking.

[0003] With the rise of location-based social networks (LBSNs) around the world, applications such as WeChat, TikTok, and Weibo provide users with rich functions, including text sharing, video publishing, and social interaction. Users can publish content with timestamps and location tags and exchange information with others. These spatiotemporal data contain rich social knowledge, and their management and mining have broad application prospects. Trajectory, as an important representative of them, is a collection of geographically visited points of interest (POI) arranged in order based on time. Travel recommendation technology is committed to providing personalized travel route customization for future users based on fully mining the high-order interactive features of historical trajectories. However, the trajectory generated by existing methods is not accurate, and the traditional model based on recurrent neural network frequently generates repeated generation in trajectory generation, which does not conform to the actual movement pattern of passengers in real scenarios.

[0004] Traditional travel recommendation methods can generally be divided into three types: the first method is based on statistical optimization, which generates trajectories by solving the optimal planning problem under the premise of following specific constraint signals (such as POI popularity, user preferences, etc.). These constraint signals are prior knowledge statistically obtained from the initial social knowledge; the other method relies on simple machine learning techniques to extract the fusion features of each POI from spatiotemporal data as a ranking, or to construct a local transfer matrix between POIs as an association to obtain more accurate results; the last method uses deep learning technology to encode spatiotemporal data into a query sequence that can be learned by the model, and uses the architecture of a recurrent neural network to mine high-order relationships between POIs. However, when faced with complex and diverse recommendation tasks, the above three methods have poor generalization capabilities, the accuracy of the generated trajectories is difficult to guarantee, and they are prone to the problem of repeated generation of POIs.

[0005] With the continuous advancement of machine learning technology, deep neural networks (DNNs) have shown more flexibility and generalization capabilities, enabling them to handle more complex and diverse recommendation tasks. To this end, the present invention utilizes the attention mechanism in Transformer to perceive information such as contextual consistency and diversity of trajectory sequences. At the same time, the loop perception prediction technology is further introduced to not only ensure the accuracy of the generated trajectory, but also further alleviate the problem of repeated generation of POIs by the trajectory, thus realizing reliable recommendation of the trajectory. Summary of the invention

[0006] The purpose of the present invention is to address the above-mentioned problems existing in the prior art and provide a reliable travel recommendation method based on loop closure-aware prediction, which uses the powerful generation capability of Transformer to obtain more accurate results and introduces loop closure-aware structures from the two stages of training and decoding to alleviate the problem of repeated generation in the generation process of the prediction model. By using two penalty conditions in the training stage and a restricted random adjustment strategy in the decoding stage, the reliability of the travel recommendation generation process is achieved.

[0007] The basic idea of ​​the present invention is to use the fused temporal coding information as the input of the Transformer, and use additional guiding matrices and drifting mechanisms as penalty conditions in the model training stage, on this basis to stimulate the loop perception ability of the model; then, in the decoding process, a constrained random adaptation strategy is used to obtain reliable prediction results according to probability.

[0008] Based on the above invention ideas, the reliable travel recommendation method based on loop 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 potential information distribution of the predicted target interest sequence;

[0011] S3 transforms the potential information distribution of the predicted target interest sequence into the probability distribution of interest point classification, and reconstructs the probability distribution of interest point classification based on the guidance matrix of the position;

[0012] S4 decodes the probability distribution of the reconstructed POI classification through a decoder according to the defined confidence score to obtain the final recommendation result.

[0013] In the above step S1, the tourist's travel query is a five-tuple where p s and t s represents the starting point of interest and the corresponding timestamp, p e and t e Represents the destination POI and the corresponding timestamp, and n represents the number of POIs (including the first and last endpoints) that the user expects to visit. The middle area between the starting POI and the destination POI is masked and embedded, and then fused with the starting POI and the destination POI after time-aware encoding to obtain the input data of the Transformer encoder.

[0014] In step S2 above, the training process of the Transformer encoder uses the guiding and drifting training penalty strategies, including the following steps:

[0015] L1 processes all trajectories used for training and constructs input data;

[0016] L2 inputs the input data into the Transformer encoder to obtain the potential information distribution of the predicted target interest sequence;

[0017] L3 transforms the potential information distribution of the predicted target interest sequence into the probability distribution of interest point classification, and reconstructs the probability distribution of interest point classification based on the guidance matrix of the position;

[0018] L4 performs a drift operation on the probability distribution of the reconstructed POI classification to construct an optimization target;

[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 uses the total loss to optimize the Transformer encoder parameters;

[0022] Repeat the above steps L2-L7 until the Transformer encoder converges.

[0023] In the above step L1, the middle area between the starting interest point and the destination interest point in each trajectory is masked and embedded, and then fused with the starting interest point and the destination interest point after time-aware encoding to obtain the input data of the Transformer encoder; the specific operation is: extract the interest point p from each trajectory T for training i and access timestamp t i After that, the middle area without endpoints is masked and embedded ε p (·) and ε t (·) to get X p ′ and X t ′ , realize the feature fusion operation of loop-aware penalty network

[0024] X m =ε p (p 1 ,[mask],…,[mask],p m )+ε t (t 1 ,[mask],…,[mask],t m )

[0025] in, # is the dimension of the embedding vector, and [mask] represents the embedding value of the corresponding mask. Then position encoding is used The input of the Transformer layer is obtained as follows: Where #&%p%'t represents the operation of randomly discarding neurons during training, and the discard ratio is set to 0.1.

[0026] In the above step L2, the input data X ′ m Input Transformer encoder:

[0027]

[0028] in, It is the potential information distribution for predicting the target interest point sequence.

[0029] In the above step L3, for the above obtained Use a fully connected layer as the prediction head Convert it into the probability distribution of POI classification:

[0030]

[0031] in, Represents the number of all POIs; for the obtained distribution The guidance and drift loop perception tasks are used as new optimization objectives of the model. First, the position-based guidance matrix is ​​defined Note $ = From the historical space-time trajectory set According to statistics, m mBC represent The longest trajectory in . Each element in the guidance matrix is ​​calculated as 2 of them iD represents the frequency of the Hth POI number appearing at the Ith position, 2 i Representatives in The total frequency of the Hth POI in the POI, so that the frequency information of POI can be used as a guide The basis of distribution.

[0032] Therefore, the present invention uses $ = Refactoring The expression is:

[0033]

[0034] in, is the reconstructed potential distribution, represents the transpose of the steering matrix truncated at length m.

[0035] In the above step L4, in order to maximize the difference in the classification probability corresponding to each position, the present invention Each of Drift operation is performed between to define new optimization objectives

[0036]

[0037] Among them, Z is called the drift coefficient, which is used to control the drift distance; $&(·) represents the After normalization, the cosine similarity is calculated. In the formula, the greater the difference between the two drifts, the better the model optimization.

[0038] In the above step L5, calculate and the actual trajectory sequence The cross entropy loss function (CrossEntropy, CE).

[0039] In the above step L6, the reconstructed output distribution obtained above is Two types of optimization objectives are used. One is the cross entropy loss function, and the other is the optimization objective corresponding to the above drift operation Therefore, the final optimization form (i.e., total loss) is:

[0040]

[0041] Among them, \=1.0 is a predefined hyperparameter used to control the weight of the two types of loss functions.

[0042] In the above step L7, the total loss is used to optimize the Transformer encoder parameters through the Adam optimization algorithm.

[0043] The present invention uses the stabilization of total loss or the number of iterative training as the convergence condition of the Transformer encoder.

[0044] The above step S3 is the same as the step L3 in the previous Transformer encoder training process.

[0045] In the above step S4, the decoder adopts a random decoding method based on a kernel sampling strategy. According to the defined confidence score, the threshold is reconstructed; then, according to the reconstructed threshold, the probability distribution of the reconstructed POI classification is decoded through the kernel sampling strategy to obtain the final recommendation result.

[0046] Using the travel query Q as input, after steps S2 and S3, we get the corresponding potential distribution The present invention defines a confidence score To constrain the subsequent random decoding process:

[0047]

[0048] in, represents the guidance matrix $ = In other words, the more POIs are 0 in a certain location, the more candidate distributions in the historical trajectory tend to be certain, so the recommendation should have a higher confidence value. The present invention adopts the confidence score defined by the above formula and combines it with kernel sampling (see the term explanation below) to form a constrained random adjustment structure

[0049] According to the expected length n in the travel query Q, the above definition To truncate, the operation is For any recommended position k, Index value, get Next, we get the threshold of the reconstruction confidence constraint From the candidate sequence of POI According to the probability distribution Perform random decoding. Where p = 0.8 represents the threshold of core sampling. The decoder is defined as:

[0050]

[0051] The above decoding result is the real track point. The present invention performs splicing according to the expected length of the expected query, and the final recommendation result is:

[0052]

[0053] At this point, a reliable travel recommendation method based on loop perception technology has been realized.

[0054] Compared with the existing technology, the air compressor fault prediction and health evaluation method and system based on graph neural network provided by the present invention have the following beneficial effects:

[0055] 1. The present invention effectively controls and alleviates the problem of repeated generation in trajectory recommendation. The two accuracy indicators in the experimental results are improved by 8.2% on average, and the trajectory repetition rate indicator is reduced by 22.4% (both compared with the results of the suboptimal solution, see Table 1). This proves that the present invention can alleviate the phenomenon of repeated generation of trajectories while ensuring the accuracy of generated trajectories, so as to obtain a reliable trajectory sequence;

[0056] 2. The present invention adopts the basic architecture of Transformer, making the model a sequence-to-sequence (Seq2Seq) generation structure, which avoids the implicit query encoding of traditional recurrent neural networks and ensures explicit use of uncorrupted query information;

[0057] 3. The present invention constructs three loop perception methods from the two perspectives of training and decoding. These strategies are not only applicable to the task of travel recommendation, but also to other tasks of time series recommendation; therefore, the present invention has universality and transferability. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 It is a schematic diagram of the principle of the reliable travel recommendation method based on loop perception prediction of the present invention;

[0059] Figure 2 A schematic diagram of the Transformer encoder training process provided by the present invention;

[0060] Figure 3 The figure is a flow chart of a reliable travel recommendation method based on loop perception prediction of the present invention.

[0061] Explanation of terms

[0062] Transformer encoder, or Transformer Neural Network (Transformer), is a deep learning model that uses a self-attention mechanism. It is widely used in natural language, time series data, recommendation systems, and other fields. Unlike RNN, Transformer is a sequence-to-sequence model that can process all input data at once. Its main structure consists of multi-head self-attention, position encoding $%s(·), feedforward neural network ttu(·) with pqrs(·) activation function, layer normalization, #&%p%'t discard strategy, and residual connection unit.

[0063] Decoding is mainly divided into two methods: deterministic decoding and random decoding. Traditional travel recommendations mainly use deterministic greedy decoding (GreedySearch), which limits the representation ability of the model and the diversity and accuracy of the output. Currently, the commonly used random decoding methods are Top-K and kernel sampling (Top-P) methods (see [HoltzmanA, Buys J, Du L, et al. The curious case of neural text degeneration [J]. arXiv preprint arXiv: 1904.09751, 2019.]). These methods can not only increase accuracy, but also increase diversity, which makes the sequence no longer confined to a monotonous repetitive generation pattern. DETAILED DESCRIPTION

[0064] The present invention is further described in conjunction with the accompanying drawings.

[0065] Example 1

[0066] Individual points of interest can be identified by their geographic identifiers. i" and longitude and latitude (p v ,p B ) is represented as a tuple in is the collection of all points of interest information. They can then be sorted according to the order of their check-in to obtain the historical space-time trajectory. Where m represents the current trajectory length, (p i ,t i ) indicates that at timestamp t i Geographical points of interest visited i , Represents all historical trajectory information. Subsequently, this study defines a tourist's travel query as a five-tuple where p s and t s represents the starting point of interest and the corresponding timestamp, p e and t e represents the destination point of interest and the corresponding timestamp, and n represents the number of points of interest (including the first and last endpoints) that the user expects to visit.

[0067] The present invention is divided into a training process and a decoding process. In the training process, the pre-processed spatiotemporal trajectory in the training set is subjected to feature fusion operation. And through the above two types of loop-aware penalty networks To predict the corresponding true trajectory value of the training set

[0068]

[0069] in y represents all learnable parameters of the penalty network.

[0070] In the decoding process, the five-tuple Q is first converted into the input form of model training After the feature fusion operation, a constrained random adjustment structure is used Refactoring to generate values:

[0071]

[0072] in is the final recommended value of the travel trajectory, and satisfies the condition that the first and last endpoints are aligned and ^%n represents the constraints imposed.

[0073] Based on the above analysis, if Figure 1 and Figure 2 As shown, this embodiment first uses the guiding and drifting training penalty strategies to train a pre-trained Transformer encoder through the following steps:

[0074] L1 processes all trajectories used for training and constructs input data.

[0075] Mask the middle area between the starting interest point and the destination interest point in each trajectory, perform embedding operation, and then fuse it with the starting interest point and the destination interest point after time-aware encoding to obtain the input data of the Transformer encoder; the specific operation is: extract the interest point p from each trajectory T for training i and access timestamp t i After that, the middle area without endpoints is masked and embedded ε p(·) and ε t (·) to get X p ′ and X t ′, realize the feature fusion operation of loop-aware penalty network

[0076] X m =ε p (p 1 ,[mask],…,[mask],p m )+ε t (t 1 ,[mask],…,[mask],t m ) (3)

[0077] in, # is the dimension of the embedding vector, and [mask] represents the embedding value of the corresponding mask. Then position encoding is used The input of the Transformer layer is obtained as follows: Where #&%p%'t represents the operation of randomly discarding neurons during training, and the discard ratio is set to 0.1.

[0078] L2 feeds the input data into the Transformer encoder to obtain the potential information distribution of the predicted target interest sequence.

[0079] The input data X′ m Input Transformer encoder:

[0080]

[0081] in, It is the potential information distribution for predicting the target interest point sequence.

[0082] L3 transforms the potential information distribution of the predicted target interest sequence into the probability distribution of interest point classification, and reconstructs the probability distribution of interest point classification based on the position guidance matrix.

[0083] For the above obtained Use a fully connected layer as the prediction head Convert it into the probability distribution of POI classification:

[0084]

[0085] in, Represents the number of all POIs; for the obtained distribution Guiding and drifting are two loop perception tasks used as new optimization objectives of the model. First, the position-based guidance matrix is ​​defined Note $ = From the historical space-time trajectory set According to statistics, m mBC represents the longest trajectory in A. Each element in the guidance matrix is ​​calculated as 2 of them iD represents the frequency of the Hth POI number appearing at the Ith position, 2 i Representatives in The total frequency of the Hth POI in the POI, so that the frequency information of POI can be used as a guide The basis of distribution.

[0086] Therefore, this embodiment uses $ = Refactoring The expression is:

[0087]

[0088] in, is the reconstructed potential distribution, represents the transpose of the steering matrix truncated at length m.

[0089] L4 performs a drift operation on the probability distribution of the reconstructed POI classification to construct an optimization target.

[0090] get After that, in order to maximize the difference in the probability of classification corresponding to each position, Each of Drift operation is performed between to define new optimization objectives

[0091]

[0092] Among them, Z is called the drift coefficient, which is used to control the drift distance; $&(·) represents the After normalization, the cosine similarity is calculated. In the formula, the greater the difference between the two drifts, the better the model optimization.

[0093] L5 constructs a cross entropy loss function based on the probability distribution of the reconstructed interest point classification and the true trajectory sequence.

[0094] calculate and the actual trajectory sequence The cross entropy loss function (Cross Entropy, CE).

[0095] L6 constructs the total loss based on the optimization objective and the cross entropy loss function.

[0096] The reconstructed output distribution obtained above is Two types of optimization objectives are used. One is the cross entropy loss function, and the other is the optimization objective corresponding to the above drift operation Therefore, the final optimization form (i.e., total loss) is:

[0097]

[0098] Where \ = 1.0 is a predefined hyperparameter used to control the weight of the two types of loss functions.

[0099] L7 uses the total loss to optimize the Transformer encoder parameters.

[0100] The total loss is used to optimize the Transformer encoder parameters using the Adam optimization algorithm.

[0101] Repeat the above steps L2-L7 until the Transformer encoder converges.

[0102] In this embodiment, the total loss tends to be stable or the number of iterative training is used as the convergence condition of the Transformer encoder.

[0103] This embodiment further uses the 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 query travel query.

[0105] A tourist's travel query is a five-tuple where p s and t s represents the starting point of interest and the corresponding timestamp, p e and t e Represents the destination POI and the corresponding timestamp, and n represents the number of POIs (including the first and last endpoints) that the user expects to visit. The middle area between the starting POI and the destination POI is masked and embedded, and then fused with the starting POI and the destination POI after time-aware encoding to obtain the input data of the Transformer encoder.

[0106] Feature fusion operation

[0107] X j =ε p (p1 ,[mask],…,[mask],p c )+ε t (t 1 ,[mask],…,[mask],t j )

[0108] in, # is the dimension of the embedding vector, and [mask] represents the embedding value of the corresponding mask. Then position encoding is used The input of the Transformer layer is obtained as follows: Where #&%p%'t represents the operation of randomly discarding neurons during training, and the discard ratio is set to 0.1.

[0109] S2 feeds the input data into the trained Transformer encoder to obtain the potential information distribution of the predicted target interest sequence.

[0110] Input data X ′ j Input the Transformer encoder and get:

[0111]

[0112] in, It is the potential information distribution for predicting the target interest point sequence.

[0113] S3 transforms the potential information distribution of the predicted target interest sequence into the probability distribution of interest point classification, and reconstructs the probability distribution of interest point classification based on the guidance matrix of the position.

[0114] For the above obtained According to the above formulas (5) and (6), we can reconstruct The expression is:

[0115]

[0116] in, is the reconstructed potential distribution, Represents the transpose of the steering matrix truncated at length n.

[0117] S4 decodes the probability distribution of the reconstructed POI classification through a decoder according to the defined confidence score to obtain the final recommendation result.

[0118] The decoder uses a random decoding method based on a kernel sampling strategy. According to the defined confidence score, the threshold is reconstructed; then, according to the reconstruction threshold, the probability distribution of the reconstructed POI classification is decoded through the kernel sampling strategy to obtain the final recommendation result.

[0119] Using the travel query Q as input, after steps S2 and S3, we get the corresponding potential distribution The present invention defines a confidence score (ConfidenceScore) To constrain the subsequent random decoding process:

[0120]

[0121] in, represents the guidance matrix $ = In other words, the more POIs are 0 in a certain location, the more candidate distributions in the historical trajectory tend to be certain, so the recommendation should have a higher confidence value. The present invention adopts the confidence score defined by the above formula and combines it with kernel sampling (see the term explanation below) to form a constrained random adjustment structure

[0122] According to the expected length n in the travel query Q, the above definition The confidence score is truncated, and the operation is For any recommended position k, Index value, get Next, we get the threshold of the reconstruction confidence constraint From the candidate sequence of POI According to the probability distribution Perform random decoding. Where p = 0.8 represents the threshold of core sampling. The decoder is defined as:

[0123]

[0124] The above decoding result is the real track point. The present invention performs splicing according to the expected length of the expected query, and the final recommendation result is:

[0125]

[0126] At this point, a reliable travel recommendation method based on loop perception technology has been realized.

[0127] This example evaluates the method of the present invention on trajectory datasets of three different cities (Edinburgh, Glasgow, and Toronto) segmented from the Flickr social network. Photos and videos are collected from the geography-based social platform Flickr, and meta information such as the user, shooting date / time, geographic location classification, and latitude and longitude coordinates are included to form the initial spatiotemporal dataset.

[0128] The initial spatiotemporal dataset is preprocessed according to the following steps:

[0129] (1) Clean the initial spatiotemporal dataset according to different data properties and feature categories to obtain attribute knowledge related to each user check-in record, including: ID values ​​(identification information) of users, trajectories, and points of interest visited, access timestamps (UTC, in the format of “year-month-day hour: minute: second”), the length of the trajectory, and the latitude and longitude of the points of interest;

[0130] (2) Based on the above check-in records, the same trajectory ID is used as the key value, and other corresponding attributes are merged according to the trajectory length. The final input data is: trajectory ID, user ID, historical trajectory (interest point ID cluster), trajectory history timestamp (hourly statistics in UTC time), and trajectory longitude and latitude information.

[0131] (3) Use the serial number to identify the trajectory ID and obtain the index of the training and test data sets according to the random seed and the ratio of the training set to the test set.

[0132] In order to fully evaluate the overall performance of the model and ensure data coverage, the leave-one-out method is adopted. That is, in training and testing, one trajectory is selected as the validation set according to the index each iteration, and the other trajectories are trained as historical trajectories. The method of the present invention is compared with 9 popular baselines, including 3 statistical optimization methods, 2 machine learning methods, and 4 deep learning methods. Regarding the parameter setting of training, the learning rate of the three data sets in the present invention is set to 0.01, the hidden layer of Transformer is set to 32, and the threshold of kernel sampling is set to 0.8. In order to comprehensively evaluate the accuracy and repeatability of the proposed method of the present invention, three evaluation indicators are used: t 1 and $aH&st 1 (hereinafter referred to as $t 1 ) score is used to measure the accuracy, and the average repetition rate p_$of the recommended trajectory is used to measure the trajectory loopback. 1 , $t 1 , a lower p_$represents a better result. In addition, some statistical optimization and simple machine learning do not have repeated loops due to the particularity of their tasks, so the corresponding results are represented by a placeholder (-). The best results are marked 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 as follows:

[0137] Among the statistical optimization and machine learning methods, the PersTour method uses additional constraints such as timestamp and distance of POI, which can be found in 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 will be 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 the RankSVM classifier to sort POIs; the Markov-Rank method is a fusion method of the above-mentioned Markov and POIRank, taking into account both statistical characteristics and machine learning performance.

[0138] All four deep learning methods are based on Recurrent Neural Networks (RNNs). DeepTrip sets up an additional generative adversarial network (GANs) as a discriminator to perform zero-sum game to improve performance. Please refer to 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 combined contrastive learning (CL) methods to learn useful representations of data. Please refer to Gao Q, Wang W, Zhang K, et al. Self-supervised representation learning for trip recommendation [J]. Knowledge-Based Systems, 2022, 247: 108791; CTLTR adopts a multi-layer RNN structure and uses two contrastive learning tasks as pre-training. Please refer to 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 language pre-training task, and uses the Transformer-based model Bert as the basic skeleton for prediction tasks. Please refer to the literature 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] From the experimental results in Table 1, it can be seen that the loop perception structure implemented by the present invention can obtain more reliable results in travel recommendations in real scenarios. By using Transformer as the basic architecture of sequence recommendation and adopting a two-stage fusion strategy of penalty training and random decoding, the model has the loop repetition perception ability for the sequence. Compared with other methods, the present invention can effectively reduce the p_$ index while improving accuracy, and finally obtain a more ideal recommendation result.

[0140] In summary, the present invention can effectively reduce the common repeated generation phenomenon in the recommendation results while using historical user geographic data to generate accurate trajectories, thereby improving the reliability of the recommendation results. Specifically, the following steps are included: first, the spatiotemporal data information and historical user interactions are used to construct a fusion coding representation of travel history queries; second, the basic structure of loop perception is constructed from the two perspectives of model training (Training) and decoding (Decoding); then, two additional penalty conditions are introduced in the training stage to stimulate the model's ability to perceive and correct loop repeated generation; finally, a constrained random adjustment strategy is used in the decoding process to obtain the final recommendation results. The present invention can not only effectively alleviate the problem of frequent loops in trajectory recommendation results, but also improve the accuracy of predictions and achieve reliable travel recommendation results.

[0141] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.

Claims

1. A reliable travel recommendation method based on loop perception prediction, characterized in that: The following steps are involved: S1 constructs input data based on tourists’ travel queries; S2 inputs the input data into the trained Transformer encoder to obtain the potential information distribution of the predicted target interest sequence; S3 transforms the potential information distribution of the predicted target interest sequence into the probability distribution of interest point classification, and reconstructs the probability distribution of interest point classification based on the guidance matrix of the position; S4 decodes the probability distribution of the reconstructed POI classification through a decoder according to the defined confidence score to obtain the final recommendation result.

2. The reliable travel recommendation method based on loop perception prediction according to claim 1 is characterized in that: In step S1, the tourist's travel query is a five-tuple where p s and t s represents the starting point of interest and the corresponding timestamp, p e and t e Represents the destination POI and the corresponding timestamp, and n represents the number of POIs the user expects to visit. The middle area between the starting POI and the destination POI is masked and embedded, and then fused with the starting POI and the destination POI after time-aware encoding to obtain the input data of the Transformer encoder.

3. The reliable travel recommendation method based on loop perception prediction according to claim 1 is characterized in that: In step S2, the training steps of the Transformer encoder are as follows: L1 processes all trajectories used for training and constructs input data; L2 inputs the input data into the Transformer encoder to obtain the potential information distribution of the predicted target interest sequence; L3 transforms the potential information distribution of the predicted target interest sequence into the probability distribution of interest point classification, and reconstructs the probability distribution of interest point classification based on the guidance matrix of the position; L4 performs a drift operation on the probability distribution of the reconstructed POI classification to construct an optimization target; 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 uses the total loss to optimize the Transformer encoder parameters; Repeat the above steps L2-L7 until the Transformer encoder converges.

4. The reliable travel recommendation method based on loop perception prediction according to claim 3 is characterized in that: In step L1, the middle area between the starting interest point and the destination interest point in each trajectory is masked and embedded, and then fused with the starting interest point and the destination interest point after time-aware encoding to obtain the input data of the Transformer encoder; the specific operation is: extract the interest point p from each trajectory T for training i and access timestamp t i After that, the middle area without endpoints is masked and embedded ε p (·) and ε t (·) to get X p ′ and X t ′ , realize the feature fusion operation of loop-aware penalty network X m =ε p (p1,[mask],…,[mask],p m )+ε t (t1,[mask],…,[mask],t m ) in, d is the dimension of the embedding vector, [mask] represents the embedding value of the corresponding mask; position encoding is then used The input of the Transformer layer is obtained as follows: Among them, dropout represents the operation of randomly discarding neurons during training; In the above step L2, the input data X′ m Input Transformer encoder: in, It is the potential information distribution for predicting the target interest point sequence; In the above step L3, for the above obtained Use fully connected layers as prediction heads Convert it into the probability distribution of POI classification: in, Represents the number of all POIs; Defining the position-based guidance matrix m m=> represent The longest trajectory in ; each element in the guidance matrix is ​​calculated as 1≤j≤m m=> ), where f i@ represents the frequency of the i-th POI number appearing at the j-th position, f i Representatives in The total frequency of the i-th POI in ; Therefore, refactoring with P9 The expression is: in, is the reconstructed potential distribution, represents the transpose of the steering matrix truncated at length m.

5. The reliable travel recommendation method based on loop perception prediction according to claim 4 is characterized in that: In step L4, in order to maximize the difference in the probability of classification corresponding to each position, Each of Drift operation is performed between to define new optimization objectives Among them, ω is called the drift coefficient, which is used to control the drift distance; Pr(·) represents the After normalization, the cosine similarity is calculated; In the above step L5, calculate and the actual trajectory sequence The cross entropy loss function In the above step L6, the total loss is: Here, α is a predefined hyperparameter.

6. The reliable travel recommendation method based on loop perception prediction according to any one of claims 1 to 5, characterized in that: In step S4, the decoder adopts a random decoding method based on a kernel sampling strategy; reconstructs a threshold according to a defined confidence score; and decodes the probability distribution of the reconstructed POI classification through a kernel sampling strategy according to the reconstructed threshold to obtain a final recommendation result.

7. The reliable travel recommendation method based on loop perception prediction according to claim 6 is characterized in that: Defining Confidence Score in, represents the number of 0s at the jth position in the steering matrix P9; According to the expected length n in the travel query Q, the above definition To truncate, the operation is For any recommended position k, Index value, get Next, we get the threshold of the reconstruction confidence constraint From the candidate sequence of POI According to the probability distribution Perform random decoding; the decoder is defined as: According to the expected length of the expected query, the decoding 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

Cited By

  • E-commerce platform personalized commodity recommendation system based on user behavior sequence

    CN122415194A