Coding method for user track interest points
Through contrastive learning and relationship distillation of interest point embedding matrices, and an encoding network that combines category and time information, the noise problem during multi-factor fusion is solved, and the accuracy of user trajectory interest point encoding and the performance of the recommendation system are improved.
Patent Information
- Application Number
- CN202410745578.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-24
AI Technical Summary
When existing user trajectory interest point encoding methods combine multiple factors, the factors interfere with each other and cause noise.
The interest point embedding matrix is used to update the interest point embedding matrix through contrastive learning and relationship distillation, combining positive and negative samples, and introduces a coding network for category and time information, and integrates different information through an aggregation network to reduce noise and improve representation.
It effectively reduces the introduction of noise, improves the accuracy and richness of interest point representation, can more accurately capture the complex relationship between users and interest points, and enhances the performance of the recommendation system.
Smart Images

Figure CN118690168A
Abstract
Description
Technical Field
[0001] The present invention relates to a user trajectory coding technology, and in particular to a method for coding user trajectory interest points. Background Art
[0002] Due to the popularity of mobile devices and location-aware sensor systems, a large amount of location tracking data has been generated, making it possible to collect time-related trajectory datasets. Many researchers are committed to discovering valuable knowledge from these trajectories and applying them to specific applications. However, due to the large amount and sparsity of sign-in data, the encoding method of sign-in data often becomes the key to hindering the progress of downstream tasks.
[0003] In existing recommendation systems, although traditional collaborative filtering methods have achieved certain results, they face problems such as data sparsity and cold start. In addition, since the relationships between users and points of interest are complex and diverse, and are affected by many factors (such as geographic location, social relationships, time period, etc.), traditional point-based recommendation methods often find it difficult to accurately capture these relationships. Therefore, how to effectively represent and model these complex relationships has become the key to improving the performance of recommendation systems.
[0004] Based on the encoding method of a single factor, early interest point embedding technology mainly borrowed from natural language processing related technologies, such as word2vec [“Identifying human mobility via trajectory embeddings.” in IJCAI, vol. 17, 2017, pp. 1689–1695.], and injected contextual information into interest points through training. However, such methods only focus on the context of spatiotemporal trajectories and cannot fully reflect the complex relationship between users and interest points. Therefore, it is difficult to overcome the sparsity of interest points themselves.
[0005] In order to more comprehensively capture the relationship between users and points of interest, more work has begun to explore the embedding representation of multi-factor fusion in recent years. In these studies, not only geographic location and social relationships are considered, but also time periods, user behaviors, etc. are integrated. For example, PLSPL [“Personalized long-and short-term preference learning for next poi recommendation,” IEEE Transactions on Knowledge and Data Engineering, vol. 34, no. 4, pp. 1944–1957, 2020] integrates multiple information, but the factors interfere with each other and also bring noise. With the widespread application of graph learning in the field of spatiotemporal mining, many graph-based embedding methods have also been proposed. Among them, the more classic ones such as node2vec design a flexible neighbor sampling strategy, which enables the search of nodes to be regulated between depth-first search and breadth-first search, achieving better results. In addition, with the development of deep learning, related methods based on graph neural networks have also shined. Recently, SSDL [“Predicting human mobility via self-supervised disentanglement learning,” IEEE Transactions on Knowledge and Data Engineering, pp. 1–16, 2023.] adopted a dynamic learning approach, using geographic distance as weight to construct a weighted graph of interest points, obtaining the representation of interest points through a graph attention neural network, and updating the model as the model is updated. Analysis of these methods mainly relies on integrating semantic information into a unified space, which inevitably introduces noise when fusing information. At the same time, they also ignore the inherent imbalance between different interest points. Summary of the invention
[0006] The technical problem to be solved by the present invention is to propose a method for encoding user trajectory interest points to solve the problem of noise caused by mutual interference between factors when multiple factors are integrated in the existing encoding method.
[0007] The technical solution adopted by the present invention to solve the above technical problems is:
[0008] A method for encoding user trajectory interest points, comprising the following steps:
[0009] Taking the interest points as input, using the interest point embedding matrix, and based on the mapping relationship between the interest points and the interest point embedding matrix, the embedded representation of the input interest points is obtained;
[0010] The POI embedding matrix corresponds one-to-one to the POI in the POI set, and is obtained through pre-training by relation distillation using contrastive learning based on the check-in data of the corresponding model training set;
[0011] The interest point set is a set of interest points contained in the check-in data of the corresponding model training set; the check-in data includes a check-in user tag and check-in interest point information, and the interest point information includes an interest point tag and location information of the interest point.
[0012] Furthermore, the interest point information further includes interest point category information, and the interest point category information includes category labels; and the pre-training of the interest point embedding matrix includes:
[0013] C1. Data preparation
[0014] Obtain the check-in data of the corresponding model training set, and construct a point of interest set based on the point of interest labels of the points of interest contained therein; construct and initialize a point of interest embedding matrix, wherein the elements of the point of interest embedding matrix correspond one-to-one to the points of interest in the point of interest set;
[0015] C2. Input an interest point p in the interest point set i , as the current anchor point;
[0016] C3, extract and current anchor point p i Same categoryc k The points of interest constitute the current anchor point p i The positive sample set D cp (c k ); From the interest point set, the current anchor point p i , next point of interest i+1 And the positive sample set D cp (c k ) other points of interest other than the points of interest included in the sample, and construct the current anchor point p i The negative sample set, the next interest point p i+1 is the current anchor point p i The track is located at the current anchor point p along the timeline i Points of interest afterwards;
[0017] C4, using the interest point embedding matrix, based on the mapping relationship between the interest point and the interest point embedding matrix, obtain the embedding representation of the anchor point and each interest point in the positive sample set and the negative sample set;
[0018] C5, using the embedded representation of the interest point obtained in step C4, using comparative learning between the anchor point and the interest points included in the positive sample set and between the anchor point and the interest points included in the negative sample set, performing relationship distillation, and updating the interest point embedding matrix;
[0019] C6. Loop through steps C2 to C5 until all the interest points in the interest point set are traversed to obtain an interest point embedding matrix.
[0020] Further, in step C1, the points of interest in the point of interest set are traversed, and a point of interest category dictionary is constructed based on the activity category information of the point of interest; the point of interest category dictionary is represented in the form of key-value pairs: category label: S cp , where S cp represents all points of interest with the same category label;
[0021] In step C3, based on the interest point category dictionary, the current anchor point p is obtained. i Same activity category c k The points of interest constitute the current anchor point p i The positive sample set D cp (c k ).
[0022] Furthermore, in step C5, using the embedded representation of the interest point obtained in step C4, comparative learning is performed between the anchor point and the interest points included in the positive sample set and between the anchor point and the interest points included in the negative sample set, and relationship distillation is performed based on minimization expectation to update the interest point embedding matrix according to the following formula:
[0023]
[0024] in, represents the minimization expectation, P is the set of interest points, s(·) represents the similarity calculation, p i is the current anchor point, p i+1 is the current anchor point p i The track is located at the current anchor point p along the timeline i Points of interest later, p r is the positive sample set D cp (c k ) and the current anchor point p i Points of interest with the same activity category, p j is the jth negative sample, J represents the number of interest points sampled from the negative sample set; v(p i )、v(p j )、v(p i+1 ) and v(p r ) represent p i 、p j 、p i+1 and p r The embedded representation of .
[0025] Furthermore, the interest point information also includes interest point category information and check-in time, and the interest point category information includes category labels; using the second encoding network, the category embedding representation of the input interest point is obtained; using the third encoding network, the time embedding representation of the input interest point is obtained; through aggregation, the embedded representation of the input interest point is fused with its category embedding representation and time embedding representation to obtain the final embedded representation of the input interest point.
[0026] Furthermore, the categories of each point of interest in the point of interest set are used to calculate the statistical frequency of each category, and the category coding embedding matrix is calculated based on the statistical frequency of the category; the check-in time of each point of interest in the point of interest set is used to calculate the statistical frequency of each time period, and the time coding embedding matrix is calculated based on the statistical frequency of the time period; the time period is obtained by subdividing the time interval of the user trajectory in the corresponding model;
[0027] The second encoding network uses the category encoding embedding matrix to obtain the category embedding representation of the input interest point based on the category information of the interest point; the third encoding network uses the time encoding embedding matrix to obtain the time embedding representation of the input interest point based on the check-in time of the interest point.
[0028] Furthermore, the category code embedding matrix is obtained by the following steps:
[0029] Counting the distribution of all interest points in the interest point set in each category, and obtaining the statistical frequency of each category; establishing a category coding one-hot matrix, wherein the row and column dimensions of the category coding one-hot matrix are the number of interest points and the number of categories in the interest point set, respectively, and the value of each element of the category coding one-hot matrix is the statistical frequency of the category to which the corresponding interest point belongs in the interest point set; then, using the category coding one-hot matrix, through the fourth coding network, obtaining the category coding embedding matrix;
[0030] The time code embedding matrix is obtained by the following steps:
[0031] The time interval of the user trajectory is subdivided into time periods, and the distribution of all interest points in the interest point set in each time period is counted to obtain the statistical frequency of each time period; a time coding one-hot matrix is established, wherein the row and column dimensions of the time coding one-hot matrix are the number of interest points in the interest point set and the number of time periods, respectively, and the value of each element of the time coding one-hot matrix is the statistical frequency of the time period to which the corresponding interest point belongs; using the time coding one-hot matrix, a time coding embedding matrix is obtained through a fifth coding network;
[0032] The fourth encoding network and the fifth encoding network, during the training phase of the corresponding models, use gradient descent to update their parameters according to the training loss of the corresponding models.
[0033] Furthermore, the fourth coding network and the fifth coding network both use linear transformation to perform coding;
[0034] According to the following formula, use the category encoding one-hot matrix A c and the time-encoded one-hot matrix A t , through linear transformation, we get the category encoding embedding matrix V c and the temporal encoding embedding matrix V t :
[0035] V c =Tanh(A c W vc )
[0036] V t =Tanh(A t W vt )
[0037] Among them, Tanh represents the activation function, W vc and W vt are the parameters of the linear transformation.
[0038] Furthermore, through the aggregation network, the embedding representation of the input interest point is fused with its category embedding representation and time embedding representation to obtain the final embedding representation of the input interest point; the aggregation network, in the training stage of the corresponding model, uses gradient descent to update its parameters according to the training loss of the corresponding model.
[0039] Furthermore, the aggregation network is a frequency gating network; in step A213, the input interest point p is converted into τ The initial embedding representation v(p τ ), and fuse its category embedding representation v c (p τ ) and the time embedding representation v t (p τ ), and obtain the final embedding representation v′(p τ ):
[0040] v′(p τ ) = g(τ) p E mm (v(p τ ))+g(τ) c,t E gen (v c (p τ )+v t (p τ ))
[0041] g(τ) p =Sigmoid(W g*τ freq )
[0042] g(τ) c,t =1-g(τ) p
[0043] Among them, E mm represents the memory network, E gen represents the generalization network, and both the memory network and the generalization network are feedforward neural networks with the ELU activation function added; g(τ) p E mm (v(p τ )) represents the initial embedding representation v(p τ ) is the output of the frequency gating network, g(τ) c,t E gen (v c (p τ )+v t (p τ )) represents the category embedding representation v of the interest point c (p τ ) and the time embedding representation v t (p τ ) Output of the frequency gating network; τ freq represents the statistical frequency of the interest point in the interest point set, W g Represents the feature transformation matrix.
[0044] The beneficial effects of the present invention are:
[0045] The present invention provides a method for encoding user trajectory interest points, which aims to solve the problem of single semantic information in existing encoding methods. More semantic information is introduced in the encoding process, and various types of information highly associated with interest points are injected to enrich the semantics. By comparative learning, the distance between interest points and interest points of the same category is shortened, and the distance between interest points and interest points of different categories is increased, so that more semantics are injected into interest points in the spatial dimension. In addition, the distillation of positive and negative samples is combined to improve the representation effect of interest points and reduce the introduction of noise.
[0046] Furthermore, in order to integrate other generalized information, such as user preferences, time information, etc., to cope with the imbalance between points of interest, the present invention also introduces a debiasing information aggregator that can be trained together with the corresponding model, injects different generalized information for different access frequencies, and realizes dynamic fusion of various information of points of interest through a gating mechanism, thereby effectively balancing the popularity preference of points of interest. This can also effectively solve the problem that some relatively niche points of interest are difficult to discover and accurately predict. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1Schematic diagram of the pre-training process of the interest point embedding matrix in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The present invention aims to provide a method for encoding user trajectory interest points, comprising the following steps:
[0049] Taking the interest points as input, using the interest point embedding matrix, and based on the mapping relationship between the interest points and the interest point embedding matrix, the embedded representation of the input interest points is obtained;
[0050] The POI embedding matrix corresponds one-to-one to the POI in the POI set, and is obtained through pre-training by relation distillation using contrastive learning based on the check-in data of the corresponding model training set;
[0051] The interest point set is a set of interest points contained in the check-in data of the corresponding model training set; the check-in data includes a check-in user tag and check-in interest point information, and the interest point information includes an interest point tag and location information of the interest point.
[0052] The core idea is: when learning the feature representation of interest points, contrastive learning is used. By contrastive learning aggregation of interest points of the same category is achieved through relational distillation, more semantics are injected into the interest points in the spatial dimension and the distillation of positive and negative samples is combined to improve the representation effect of interest points and reduce the introduction of noise, thereby increasing the information content of the latent space vector of interest point representation learning, so that in scenes such as recommending target interest points, it can be more accurately located near relevant semantic information. The scheme of the present invention has good practicality in the coding of interest points in the fields of location services, intelligent traffic management, social media recommendations, etc.
[0053] Furthermore, in order to integrate other generalized information, such as user preferences, time information, etc., the interest point information also includes interest point category information and check-in time, and the interest point category information includes category labels; using the second encoding network, the category embedding representation of the input interest point is obtained; using the third encoding network, the time embedding representation of the input interest point is obtained; through aggregation, the embedded representation of the input interest point is integrated with its category embedding representation and time embedding representation to obtain the final embedded representation of the input interest point.
[0054] The above-mentioned aggregation can be weighted sum, concatenation, etc., or a neural network can be used, that is, through the aggregation network, the embedding representation of the input interest point is integrated with its category embedding representation and time embedding representation to obtain the final embedding representation of the input interest point; the aggregation network, in the training phase of the corresponding model, uses gradient descent to update its parameters according to the training loss of the corresponding model. Furthermore, in terms of the aggregation method, a gating mechanism with frequency as input is used to inject different generalized information for different access frequencies, thereby effectively balancing the popularity preference of interest points, thereby effectively alleviating the problem of inability to accurately predict niche interest points caused by the popularity bias of interest points.
[0055] Example
[0056] This embodiment provides a method for encoding user trajectory interest points, including the following steps:
[0057] S1. Build training data
[0058] In order to ensure that the corresponding model is in the same feature space, the training data of the encoding method of the present invention is the check-in data of the corresponding model training set. In this embodiment, the corresponding model is a point of interest recommendation model, and the check-in data includes the check-in user label and the check-in point of interest information. The point of interest information includes the point of interest label and the location information, category information and check-in time of the point of interest; the category information of the point of interest includes the category label. The introduction of category information helps to enrich the expression of user preferences, which can realize the prediction of the category of the point of interest. The specific content of the point of interest information can be selected according to the actual situation.
[0059] S2. Constructing the coding matrix
[0060] In this step, based on the data in step S1, the interest point embedding matrix, category coding embedding matrix and time coding embedding matrix are constructed respectively.
[0061] Among them, the pre-training of the interest point embedding matrix, such as Figure 1 As shown, including:
[0062] C1. Data preparation
[0063] Obtain the check-in data described in step S1, and construct an interest point set based on the interest point tags contained therein; construct and initialize an interest point embedding matrix, wherein the elements of the interest point embedding matrix correspond one-to-one to the interest points in the interest point set.
[0064] C2. Input an interest point p in the interest point set i , as the current anchor point.
[0065] C3, extract and current anchor point p i Same categoryc kThe points of interest constitute the current anchor point p i The positive sample set D cp (c k ); From the interest point set, the current anchor point p i , next point of interest i+1 And the positive sample set D cp (c k ) other points of interest other than the points of interest included in the sample, and construct the current anchor point p i The negative sample set, the next interest point p i+1 is the current anchor point p i The track is located at the current anchor point p along the timeline i That is, the interest points in the negative sample set of the current anchor point are other interest points in the interest point set that have different activity categories from the current anchor point and are not the next interest point.
[0066] C4. Using the interest point embedding matrix, based on the mapping relationship between the interest point and the interest point embedding matrix, the embedded representation of the anchor point and each interest point in the positive sample set and the negative sample set is obtained.
[0067] C5. Using the embedded representation of the interest points obtained in step C4, comparative learning is performed between the anchor points and the interest points contained in the positive sample set, and between the anchor points and the interest points contained in the negative sample set, relationship distillation is performed, and the interest point embedding matrix is updated.
[0068] C6. Loop through steps C2 to C5 until all the interest points in the interest point set are traversed to obtain an interest point embedding matrix.
[0069] In order to facilitate the extraction of the positive sample set in step C3, in step C1, the points of interest in the point of interest set are traversed, and a point of interest category dictionary is constructed based on the activity category information of the point of interest; the point of interest category dictionary is represented in the form of key-value pairs as follows: Category label: S cp , where S cp represents all points of interest with the same category label; in step C3, based on the point of interest category dictionary, obtain the points of interest with the current anchor point p i Same activity category c k The points of interest constitute the current anchor point p i The positive sample set D cp (c k ).
[0070] The purpose of pre-training is to maximize the distance between the positive sample cluster and the negative sample cluster based on the loss. Therefore, any existing method can be used. Specifically, in this embodiment, the embedded representation of the interest point obtained in step C4 is used to perform comparative learning between the anchor point and the interest points included in the positive sample set and between the anchor point and the interest points included in the negative sample set according to the following formula, and the relationship distillation is performed based on minimization expectation to update the interest point embedding matrix:
[0071]
[0072] in, represents the minimization expectation, P is the set of interest points, s(·) represents the similarity calculation, p i is the current anchor point, p i+1 is the current anchor point p i The track is located at the current anchor point p along the timeline i Points of interest later, p r is the positive sample set D cp (c k ) and the current anchor point p i Points of interest of the same category, p j is the jth negative sample, J represents the number of interest points sampled from the negative sample set; v(p i )、v(p j )、v(p i+1 ) and v(p r ) represent p i 、p j 、p i+1 and p r The embedded representation of .
[0073] Since this embodiment introduces rich information about points of interest, and adopts the above-mentioned method, using contrastive learning, and obtaining the embedding matrix of the points of interest through pre-training by means of relational distillation, it is possible to fully extract the feature information of the points of interest.
[0074] Among them, the category code embedding matrix is obtained by calculating the statistical frequency of each category using the category of each interest point in the interest point set according to the following steps, and the category code embedding matrix is obtained based on the statistical frequency of the category:
[0075] Count the distribution of all interest points in the interest point set in each category to obtain the statistical frequency of each category; establish a category coding one-hot matrix, the row and column dimensions of the category coding one-hot matrix are the number of interest points and the number of categories in the interest point set, respectively, and the value of each element of the category coding one-hot matrix is the statistical frequency of the category to which the corresponding interest point belongs in the interest point set; then, use the category coding one-hot matrix to obtain the category coding embedding matrix through the fourth coding network.
[0076] Among them, the time code embedding matrix is calculated according to the following steps, using the check-in time of each point of interest in the point of interest center to obtain the statistical frequency of each time period, and the time code embedding matrix is obtained based on the statistical frequency calculation of the time period:
[0077] The time interval of the user trajectory is subdivided into time periods, and the distribution of all interest points in the interest point set in each time period is counted to obtain the statistical frequency of each time period; in this embodiment, the time interval of the corresponding model user trajectory is a natural day, and in this step, the natural day is subdivided into 24 time periods by hour. A time coding one-hot matrix is established, and the row and column dimensions of the time coding one-hot matrix are the number of interest points in the interest point set and the number of time periods, respectively, and the value of each element of the time coding one-hot matrix is the statistical frequency of the time period to which the corresponding interest point belongs; using the time coding one-hot matrix, through the fifth coding network, a time coding embedding matrix is obtained.
[0078] The fourth coding network and the fifth coding network can be implemented in an existing manner, such as a fully connected network. In this embodiment, the fourth coding network and the fifth coding network both use linear transformation for coding.
[0079] According to the following formula, use the category encoding one-hot matrix A c and the time-encoded one-hot matrix A t , through linear transformation, we get the category encoding embedding matrix V c and the temporal encoding embedding matrix V t :
[0080] V c =Tanh(A c W vc )
[0081] V t =Tanh(A t W vt )
[0082] Among them, Tanh represents the activation function, W vc and W vt are the parameters of the linear transformation.
[0083] S3, interest point encoding
[0084] This step includes:
[0085] S31, inputting the interest point to be encoded;
[0086] S32, based on the information of the points of interest, using the point of interest embedding matrix, that is, the first coding network, based on the mapping relationship between the points of interest and the point of interest embedding matrix, obtain the embedding representation of each input point of interest; using the category coding embedding matrix, that is, the second coding network, based on the category information of the points of interest, obtain the category embedding representation of the input points of interest; using the time coding embedding matrix, that is, the third coding network, based on the check-in time of the points of interest, obtain the time embedding representation of the input points of interest;
[0087] S33. By aggregation, the initial embedding representation of the input interest point is fused with its category embedding representation and time embedding representation to obtain the final embedding representation of the input interest point.
[0088] The above aggregation can be a weighted sum, splicing, etc. In this embodiment, it is further assisted by a gating mechanism with frequency as input, so as to effectively balance the popularity preference of points of interest. This can effectively solve the problem of difficulty in making accurate predictions when users come to some relatively niche points of interest.
[0089] In this embodiment, the aggregation method is a frequency gating network; through the frequency gating network, the input interest point p is converted into τ The initial embedding representation v(p τ ), and fuse its category embedding representation v c (p τ ) and the time embedding representation v t (p τ ), and obtain the final embedding representation v′(p τ ):
[0090] v′(p τ ) = g(τ) p E mm (v(p τ ))+g(τ) c,t E gen (v c (p τ )+v t (p τ ))
[0091] g(τ) p =Sigmoid(W g *τ freq )
[0092] g(τ) c,t =1-g(τ) p
[0093] Among them, E mm represents the memory network, E genrepresents the generalization network, and both the memory network and the generalization network are feedforward neural networks with the ELU activation function added; g(τ) p E mm )v(p τ )) represents the initial embedding representation v(p τ ) is the output of the frequency gating network, g(τ) c,t E gen (v c (p τ )+v t (p τ )) represents the category embedding representation v of the interest point c (p τ ) and the time embedding representation v t (p τ ) Output of the frequency gating network; τ freq represents the statistical frequency of the interest point in the interest point set, W g Represents the feature transformation matrix.
[0094] The updated embedding representation v′(p τ ) is the final embedding representation of the interest point.
[0095] In practical application scenarios, before actual encoding, the above-mentioned aggregation network, the fourth encoding network and the fifth encoding network should be jointly trained following the corresponding models, that is, in the training stage of the corresponding models, the parameters thereof should be updated by gradient descent according to the training loss of the corresponding models.
[0096] In order to evaluate the effect of the POI coding method of the present invention, the inventors conducted comparative experiments on four real-world trajectory datasets, including the New York City (abbreviated as NYC in the table) dataset and Tokyo dataset from Foursquare, and two datasets of Houston and Los Angeles cut from the data provided by Gowalla. The Node2Vec model was selected as the baseline model for comparison. After obtaining the POI coding, the same one-layer unidirectional recurrent neural network was uniformly used as the POI recommendation model.
[0097] The experimental results are shown in Table 1 below, where Node2Vec is the baseline model and Ours is the encoding method of the embodiment. ACC@K represents the accuracy of the recommendation model, which is calculated as the ratio of the number of target values divided by the total number of values in the first K values of the recommended model's predicted output value. The larger the ratio, the higher the accuracy of the model. In this experiment, K=1, 5, i.e., ACC@1 and ACC@5, were selected. AUC is the area under the receiver operating characteristic curve (ROC), which is a commonly used indicator in classification models. The value is usually between (0.5-1). The larger the AUC value, the better the classifier effect. MAP is the average hit accuracy, which is also a commonly used indicator in recommendation models, but this indicator reflects the average level of the recommendation model more. The prediction accuracy of the model can be comprehensively considered, and the larger the value, the better the model effect.
[0098] Table 1. Comparison of the effects of the encoding method of the present invention and node2vec in the recommendation model
[0099]
[0100] As can be seen from Table 1, the method in the present invention can integrate activity semantic information into interest points, so that the model can effectively focus on the potential activity interests of human behavior, integrate the differences in the distribution of interest points, and effectively improve the feature performance. On the four data sets, significant improvements have been achieved in all indicators compared with the baseline model.
[0101] Finally, it should be noted that the above embodiments are only preferred implementations and are not intended to limit the present invention. It should be pointed out that for those skilled in the art, several modifications, equivalent replacements, improvements, etc. can be made without departing from the scope of the present invention and the scope of protection of the claims, and all of these should be included in the protection scope of the present invention.
Claims
1. A method for encoding user trajectory interest points, characterized in that: The following steps are involved: Taking the interest points as input, using the interest point embedding matrix, and based on the mapping relationship between the interest points and the interest point embedding matrix, the embedded representation of the input interest points is obtained; The POI embedding matrix corresponds one-to-one to the POI in the POI set, and is obtained through pre-training by relation distillation using contrastive learning based on the check-in data of the corresponding model training set; The interest point set is a set of interest points contained in the check-in data of the corresponding model training set; the check-in data includes a check-in user tag and check-in interest point information, and the interest point information includes an interest point tag and location information of the interest point.
2. A method for encoding user trajectory interest points according to claim 1, characterized in that: The interest point information further includes interest point category information, and the interest point category information includes category labels; the pre-training of the interest point embedding matrix includes: C1. Data preparation Obtain the check-in data of the corresponding model training set, and construct a point of interest set based on the point of interest labels of the points of interest contained therein; construct and initialize a point of interest embedding matrix, wherein the elements of the point of interest embedding matrix correspond one-to-one to the points of interest in the point of interest set; C2. Input an interest point p in the interest point set i , as the current anchor point; C3, extract and current anchor point p i Same categoryc k The points of interest constitute the current anchor point p i The positive sample set D cp (c k ); From the interest point set, the current anchor point p i , next point of interest i+1 And the positive sample set D cp (c k ) other points of interest other than the points of interest included in the sample, and construct the current anchor point p i The negative sample set, the next interest point p i+1 is the current anchor point p i The track is located at the current anchor point p along the timeline i Points of interest afterwards; C4, using the interest point embedding matrix, based on the mapping relationship between the interest point and the interest point embedding matrix, obtain the embedding representation of the anchor point and each interest point in the positive sample set and the negative sample set; C5, using the embedded representation of the interest point obtained in step C4, using comparative learning between the anchor point and the interest points included in the positive sample set and between the anchor point and the interest points included in the negative sample set, performing relationship distillation, and updating the interest point embedding matrix; C6. Loop through steps C2 to C5 until all the interest points in the interest point set are traversed to obtain an interest point embedding matrix.
3. A method for encoding user trajectory interest points as claimed in claim 2, characterized in that: In step C1, the points of interest in the point of interest set are traversed, and a point of interest category dictionary is constructed based on the activity category information of the point of interest; the point of interest category dictionary is represented in the form of key-value pairs: Category label: S cp , where S cp represents all points of interest with the same category label; In step C3, based on the interest point category dictionary, the current anchor point p is obtained. i Same activity category c k The points of interest constitute the current anchor point p i The positive sample set D cp (c k ).
4. A method for encoding user trajectory interest points as claimed in claim 2, characterized in that: In step C5, using the embedding representation of the interest point obtained in step C4, the following formula is used to perform comparative learning between the anchor point and the interest points included in the positive sample set and between the anchor point and the interest points included in the negative sample set, and the relationship distillation is performed based on minimizing expectation to update the embedding matrix of the interest point: in, represents the minimization expectation, P is the set of interest points, s(·) represents the similarity calculation, p i is the current anchor point, p i+1 is the current anchor point p i The track is located at the current anchor point p along the timeline i Later points of interest, p r is the positive sample set D cp (c k ) and the current anchor point p i Points of interest with the same activity category, p j is the jth negative sample, J represents the number of interest points sampled from the negative sample set; v(p i )、v(p j )、v(p i+1 ) and v(p r ) represent p i 、p j 、p i+1 and p r The embedded representation of .
5. A method for encoding user trajectory interest points according to any one of claims 1 to 4, characterized in that: The point of interest information also includes point of interest category information and check-in time, and the point of interest category information includes category labels; using the second encoding network, obtaining a category embedding representation of the input point of interest; using the third encoding network, obtaining a time embedding representation of the input point of interest; By aggregation, the embedding representation of the input interest point is fused with its category embedding representation and time embedding representation to obtain the final embedding representation of the input interest point.
6. A method for encoding user trajectory interest points according to claim 5, characterized in that: Using the categories of each point of interest in the point of interest set, the statistical frequency of each category is calculated, and the category coding embedding matrix is calculated based on the statistical frequency of the category; The check-in time of each point of interest in the point of interest center is used to calculate the statistical frequency of each time period, and the time coding embedding moment is calculated based on the statistical frequency of the time period; The time period is obtained by subdividing the time interval of the user trajectory in the corresponding model; The second encoding network obtains a category embedding representation of the input interest point based on the category information of the interest point using the category encoding embedding matrix; The third encoding network uses the time encoding embedding matrix to obtain the time embedding representation of the input interest point based on the check-in time of the interest point.
7. A method for encoding user trajectory interest points according to claim 6, characterized in that: The category code embedding matrix is obtained by the following steps: Count the distribution of all interest points in the interest point set in each category to obtain the statistical frequency of each category; establish a category coding one-hot matrix, the row and column dimensions of the category coding one-hot matrix are the number of interest points and the number of categories in the interest point set, respectively, and the value of each element of the category coding one-hot matrix is the statistical frequency of the category to which the corresponding interest point belongs in the interest point set; Then, the category encoding one-hot matrix is used to obtain the category encoding embedding matrix through the fourth encoding network; The time code embedding matrix is obtained by the following steps: The time interval of the user trajectory is subdivided into time periods, and the distribution of all interest points in the interest point set in each time period is counted to obtain the statistical frequency of each time period; a time coding one-hot matrix is established, wherein the row and column dimensions of the time coding one-hot matrix are the number of interest points in the interest point set and the number of time periods, respectively, and the value of each element of the time coding one-hot matrix is the statistical frequency of the time period to which the corresponding interest point belongs; using the time coding one-hot matrix, a time coding embedding matrix is obtained through a fifth coding network; The fourth encoding network and the fifth encoding network, during the training phase of the corresponding models, use gradient descent to update their parameters according to the training loss of the corresponding models.
8. A method for encoding user trajectory interest points according to claim 7, characterized in that: The fourth coding network and the fifth coding network both use linear transformation to perform coding; According to the following formula, use the category encoding one-hot matrix A c and the time-encoded one-hot matrix A t , through linear transformation, we get the category encoding embedding matrix V c and the temporal encoding embedding matrix V t : V c =Fish(A) c W vc ) V t =Fish(A) t W vt ) Among them, Tanh represents the activation function, W vc and W vt are the parameters of the linear transformation.
9. A method for encoding user trajectory interest points according to claim 7, characterized in that: Through the aggregation network, the embedding representation of the input interest point is fused with its category embedding representation and time embedding representation to obtain the final embedding representation of the input interest point; the aggregation network, in the training stage of the corresponding model, uses gradient descent to update its parameters according to the training loss of the corresponding model.
10. A method for encoding user trajectory interest points as claimed in claim 9, characterized in that: The aggregation network is a frequency gated network; in step A213, the input point of interest p is converted into τ The initial embedding representation v(p τ ), and fuse its category embedding representation v c (p τ ) and the time embedding representation v t (p τ ), and obtain the final embedding representation v′(p τ ): v′(p τ )=g(τ) p AND mm (v(p τ ))+g(τ) c,t AND gen (v c (p τ )+v t (p τ )) g(τ) p =Sigmoid(W g *t freq ) g(τ) c,t =1-g(τ) p Among them, E mm represents the memory network, E gen represents the generalization network, and both the memory network and the generalization network are feedforward neural networks with the ELU activation function added; g(τ) p E mm (v(p τ )) represents the initial embedding representation v(p τ ) is the output of the frequency gating network, g(τ) c,t E gen (v c (p τ )+v t (p τ )) represents the category embedding representation v of the interest point c (p τ ) and the time embedding representation v t (p τ ) Output of the frequency gating network; τ freq represents the statistical frequency of the interest point in the interest point set, W g Represents the feature transformation matrix.
Citation Information
Patent Citations
Personalized interest point recommendation method and system
CN111949877A
Next interest point recommendation method and device based on space-time contrast learning
CN115630233A
