Location social network service recommendation method based on trajectory collaborative filtering and Mama
Through the joint representation learning and state space model of trajectory collaborative filtering with Mamba, the insufficient representation and popular bias of interest points and user interest signals in the location social network are solved, and more accurate and diverse recommendation results are achieved.
Patent Information
- Application Number
- CN202510705618.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-05-29
AI Technical Summary
The existing location social network recommendation system has insufficient representation ability and popularity bias when modeling user interest points and user interest signals, resulting in a lack of diversity and fairness in recommendation results.
The method based on trajectory collaborative filtering and Mamba is adopted to generate interest points and user interest signal embedding vectors through static and dynamic representation learning, and the user's long-term short-term interest state transfer mode field is constructed by combining the state space model Mamba to optimize the recommendation results.
It achieves more accurate, fair and diverse recommendation results, alleviates popular bias problems and improves the performance of the recommendation system.
Smart Images

Figure CN120256746A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data mining and recommendation systems, and specifically to a method for recommending location-based social network services based on trajectory collaborative filtering and Mamba. Background Art
[0002] Next point of interest recommendation is an important application in location-based social networks, and its goal is to predict the locations that a user may visit in the future based on the user's historical check-in records. With the popularization of mobile Internet and the development of location service technologies, recommendation systems based on deep learning have been widely applied in fields such as intelligent tourism, life services, and commercial marketing, helping users find relevant items from a vast amount of online content to reduce search costs.
[0003] However, existing methods still face many challenges in modeling user interest evolution, such as popularity bias, exposure bias, and limited representation ability. These problems limit the accurate modeling of points of interest and users, and affect the effectiveness of recommendation results. Specifically, user check-in behaviors have significant spatio-temporal characteristics, and their interests change continuously over time and location. In addition, the point of interest recommendation task is also affected by semantic information dilution. When the representation ability of points of interest is insufficient, both the accuracy and diversity of recommendations will be affected. Therefore, how to accurately model the dynamic preferences of users is one of the core problems faced by sequential recommendation. Summary of the Invention
[0004] Aiming at the problem of limited expression ability in modeling the representation of points of interest and user interest signals in existing sequential recommendation systems, as well as the problem that recommendation results are affected by popularity bias and lack diversity and fairness, the present invention proposes a method for recommending location-based social network services based on trajectory collaborative filtering and Mamba. First, in the representation modeling part, a static and dynamic joint representation learning method is used to solve the problems of poor consistency in the representation structures of static points of interest and dynamic user interest signals and semantic dilution. Secondly, an interest state Mamba network is used to construct a unified user long-term interest transfer pattern field and short-term interest response pattern, and its trajectory collaborative filtering characteristics help to alleviate the popularity bias problem faced by the recommendation system.
[0005] To achieve the above object, the specific technical solutions adopted by the present invention are as follows:
[0006] A method for recommending location-based social network services based on trajectory collaborative filtering and Mamba, comprising the following steps:
[0007] Step 1, collect service interaction data of users in the location-based social network, where the service interaction data includes point of interest numbers, geographical information of points of interest, and check-in triples including user numbers, point of interest numbers, and check-in times;
[0008] Step 2: Based on static and dynamic joint representation learning, perform representation modeling on service interaction behaviors to generate a static representation embedding vector of interest points and a user interest signal embedding vector. The static and dynamic joint representation learning includes an interest point static representation learning layer, an interactive behavior periodic dynamic representation modeling layer, and a user interest signal generator;
[0009] Step 3: Construct a service interaction behavior sequence modeling network based on the state space machine model Mamba. The network includes a state space model, a pointwise feed-forward network, and a network end layer. The pointwise feed-forward network connects multiple state space models; input the user interest signal embedding vector into the network, model the user's long-term and short-term interest state transition mode field through the state space model, and output a predicted interest point matching embedding vector
[0010] Step 4: Optimize the model by minimizing the cross-entropy loss function, and generate a user interaction service recommendation list based on the normalized score matrix. Take the top K highest-scoring interest points as the recommendation results.
[0011] Preferably, the interest point static representation learning layer is defined as follows:
[0012] Define the complete set of interest point numbers , is the total number of interest points, where is the interest point number. Construct a trainable randomly initialized semantic embedding matrix , where the semantic embedding vector of interest point is 's th row vector;
[0013] According to the interest point geographical information and the Earth's radius , perform spherical coordinate transformation to obtain spherical horizontal and vertical coordinates :
[0014] ,
[0015] The horizontal and vertical coordinates are used as source information respectively, and two embedding vectors are generated through a geographical information-aware cubic sine position encoder and concatenated to obtain a geographical information embedding vector ;
[0016] The static representation embedding vector of the interest point is .
[0017] Preferably, the interactive behavior periodic dynamic representation modeling layer is defined as follows: Use the check-in time as source information to obtain an interactive behavior periodic embedding vector through a periodic perception cubic sine position encoder 。
[0018] Preferably, the user interest signal generator is defined as follows: The semantic embedding vector , the geographic information embedding vector and the periodic embedding vector are passed through a feature fusion function to obtain the user interest signal embedding vector 。
[0019] Preferably, the period-aware cubic sine position encoder is defined as:
[0020] ,
[0021] where is the source information, the cubic frequency coefficient , is the encoding embedding dimension, is the target encoding embedding vector, where 。
[0022] Preferably, for the geographic information-aware cubic sine position encoder, its scale normalization function is:
[0023] ,
[0024] is the scale factor, is the abscissa or ordinate transformed from the longitude or latitude spherical coordinates, is the minimum value of the abscissa or ordinate;
[0025] For the period-aware cubic sine position encoder, its time periodicity normalization function is:
[0026] ,
[0027] where is the period window.
[0028] Preferably, the feature fusion function is defined as:
[0029] ,
[0030] where is the dropout function, the binary dropout mask vector is generated by the random dropout probability , is the layer normalization function, using the mean and standard deviation of this vector and the learnable scaling and translation parameters to standardize the data distribution.
[0031] Preferably, the state space model is composed of a system of ordinary differential equations with a time step Discretize the above parametric equations to obtain:
[0032] ,
[0033] where the user interest signal embedding vector is used as the input , is the user interest hidden state modeled by the model, is the user interest state characterization embedding vector output by the model, is the trainable parameter of the model.
[0034] Preferably, the pointwise feed-forward network is defined as follows:
[0035]
[0036] where is the output tensor obtained by concatenating the user interest state characterization embedding vectors output by the above state space model in sequence, is the approximation of the Gaussian error linear unit, is the learnable linear transformation matrix, is the learnable bias term.
[0037] Preferably, the last layer of the network uses residual connection and layer normalization to optimize the network output. The interest signal embedding sequence matrices from different users are packed into a batch input tensor , a sequence tensor is generated, and its last vector is extracted as the predicted interest point matching embedding vector , forming a batch matching matrix .
[0038] Preferably, in step (4), the probability normalization score matrix is calculated as defined below:
[0039]
[0040] is the original batch score matrix, performs element-wise softmax probability normalization on the score vector of each sample in the original batch score matrix.
[0041] The present invention has the following characteristics and beneficial effects:
[0042] Based on the concepts of consistency decomposition representation and interest state transfer field, the present invention realizes more accurate, fair, and diverse recommendation results, expands the application of sine positional encoding in consistency representation learning, and deeply integrates it with the state space model to extract trajectory collaborative filtering signals, thereby improving the recommendation performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 FIG. is a framework diagram of a service recommendation method based on decoupled representation learning and graph neural network according to an embodiment of the present invention.
[0044] Figure 2 is Figure 1 a network framework diagram of PSMN and Manba in
[0045] Figure 3 is Figure 1 a principle block diagram of the static and dynamic joint representation learning network and the cubic sine positional encoding of the shared structure in
[0046] Figure 4 is the theoretical basis for the selection of sine encoder parameters in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0047] The present invention will be described in detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0048] A method for recommending location-based social network services based on trajectory collaborative filtering and Mamba, as Figure 1 shown, includes the following steps:
[0049] Step 1, collect service interaction data of users in the location-based social network, where the service interaction data includes point-of-interest numbers, point-of-interest geographical information, and check-in triples including user numbers, point-of-interest numbers, and check-in times;
[0050] Specifically, in this embodiment, collecting service interaction data of users in the location-based social network specifically includes point-of-interest numbers , point-of-interest geographical information (latitude and longitude) and check-in triples including user numbers , point-of-interest numbers and check-in times . According to the check-in triples , for the same user organize a related instance of interest trajectory, including a sequence of point-of-interest numbers , a sequence of geographical information and the check-in time series 。
[0051] Step 2. Perform representation modeling on service interaction behaviors based on static and dynamic joint representation learning to generate a static representation embedding vector of points of interest and a user interest signal embedding vector. The static and dynamic joint representation learning includes a static representation learning layer of points of interest, an interactive behavior periodic dynamic representation modeling layer, and a user interest signal generator.
[0052] Specifically, as Figure 3 shown, it includes the following sub-steps:
[0053] Step (2.1). Semantic embedding layer
[0054] First, the model constructs a trainable randomly initialized semantic embedding matrix , for the complete set of point-of-interest numbers , where is the total number of points of interest. The semantic embedding vector of the point of interest is the
[0055] th row vector of
[0056] Step (2.2). Geographic information embedding layer First, for the geographic information of the point of interest , perform spherical coordinate transformation according to the Earth's radius to obtain the spherical horizontal and vertical coordinates
[0057] 。
[0058] Secondly, use a geographic information-aware two-stream cubic sine position encoder, that is, encode the horizontal and vertical coordinates separately and then splice them to obtain the geographic information embedding vector 。
[0059] For the information source , , is the encoding embedding dimension and ,where ,the cubic frequency coefficient ,take the scale normalization function , is the minimum value of the complete set of information sources. In this example, the scaling factor Take 200, then for a block with a semi - side length of 1000 meters centered at a certain point of interest, the geographical information gap between other points of interest and this point of interest is clear in the inner product space constructed by the cubic sine position encoding, that is, it is in the first monotonically decreasing interval in the attached drawings of the specification. Figure 4 This property is beneficial for the model to filter out irrelevant points of interest according to geographical information and accelerate the retrieval efficiency.
[0060] The geographical information embedding vectors of all points of interest will be saved as a matrix , and there is a static representation embedding matrix of points of interest ,
[0061] Step (2.3). Periodic time embedding layer
[0062] For the check - in time , this embodiment uses a cubic sine position encoder with the same structure to obtain a periodic time embedding vector , the difference is that the time - periodic normalization function is used, is the period window, is the scale factor. Verified by experimental results, in this embodiment, the period window is taken as 24 * 3600 seconds to achieve the best effect, and the scale factor is taken as such that when the relative time distance is within a quarter of the period window, the inner product result of two time encodings falls within the first monotonic interval, which helps the model filter out time - irrelevant interest signals. It is worth mentioning that the above two cubic sine position encoders both adopt global information sources, which is beneficial for subsequent work to fully exert the spatio - temporal trajectory collaborative filtering ability in the state - space model of a unified information domain.
[0063] Step (2.4). User interest signal generator
[0064] Generate a user interest signal embedding vector according to the three feature embedding vectors obtained in the above steps, and its definition is as follows:
[0065] where the dropout function , the binary dropout mask vector is generated by the random dropout probability ,
[0066] the layer normalization function is used, and the mean and standard deviation of this vector and the learnable scaling and translation parameters are used to standardize the data distribution.
[0067] This step helps to reduce the numerical dependence of the model on the representation and improve the robustness of the model.
[0068] For an example of a user interaction trajectory instance that contains a sequence of point-of-interest numbers , a sequence of geographical information and a sequence of check-in times , a sequence of user interest signal embedding vectors is generated according to the above steps , is the trajectory length. For batch training, multiple are padded and concatenated into as the model input, where is the batch size, is the maximum sequence length.
[0069] Step 3: Construct a service interaction behavior sequence modeling network based on the state space machine model Mamba. The network includes a state space model, a pointwise feed-forward network, and a network end layer. The pointwise feed-forward network connects multiple state space models; the user interest signal embedding is input into the network, and the state space model is used to model the user's long-term and short-term interest state transition pattern field, and the predicted point-of-interest matching embedding vector is output.
[0070] Specifically, as Figure 2 shown, in this embodiment, the state space model Mamba is introduced to model and use the constructed consistent user interest signal embedding vector to model the user's long-term and short-term interest state transition pattern field.
[0071] The concept of the state space model is defined by the following system of ordinary differential equations:
[0072] ,
[0073] Its meaning is that the change in the current interest state is related to the current interest state and the current input interest signal; the model output is related to the current interest state.
[0074] According to the solution of this ordinary differential equation and discretize the above parametric equation with a time step , the following discretized equation is obtained
[0075] , ,
[0076] where the model trainable parameters are and and .
[0077] Based on the above ordinary differential equation and its solution, this model can be interpreted as modeling the following concepts:
[0078] By mining a large amount of point-of-interest context information, the parameter matrix defines a velocity vector field that describes the long-term interest transfer pattern of users; through the input content perception mechanism of the model, the parameter matrix constructs a response to the short-term interest signal of users, which affects the model in the form of a causal convolution of the second term of the differential equation solution. Provides a mapping from the interest hidden state to the interest anchor point of the model output.
[0079] Modeling the long-term and short-term interest state transfer pattern field of users using the state space model Mamba includes the following five steps:
[0080] Step (3.1): Construct content-aware variables for the selective state space model (SSM)
[0081] For the input , first use linear projection to expand the dimension to obtain:
[0082] , the two are equal, where is reserved as the input for the subsequent residual connection. That is, for , first use one-dimensional convolution to capture the relationship between the interest signal embedding vectors of neighboring users, and then use the SiLU activation function to capture the non-linear relationship to obtain as the basis for the subsequent input content perception mechanism.
[0083] Step (3.2): Construct the original parameter matrix within the selective state space model (SSM)
[0084] For the parameters of the state space model Mamba is a structured matrix based on the high-order polynomial projection operator (HiPPO), which constructs independent state space parameters for the feature dimensions of the input, and only stores diagonal elements to represent the matrix on ; for the parameter , it comes from two different linear projections respectively, and the information source is the above . The meaning of this parameter structure is that the model responds differently to each user interest signal within the input batch, which is one of the content perception mechanisms.
[0085] Step (3.3): Construct the content-aware discretized parameter matrix within the selective state space model (SSM)
[0086] , is the basic size hyperparameter of the discretization step. The parameter structure means that the transition step of each hidden state of each sequence in the state space is different, improving the weakness of the traditional time-invariant state space model lacking content awareness.
[0087] Construct the discretization parameter based on the obtained original parameter matrix and the content-aware discretization step parameter:
[0088] , ,
[0089] where describes the content-aware user interest state transition mode field defined by . Combining the spatio-temporal-semantic trinity interest signal representation obtained in step (2), the model has the positioning ability based on the spatio-temporal trajectory signal. The parameter can quickly retrieve relevant interest trajectories according to the known user interest signals and generate a trajectory collaborative filtering effect using the known interest trajectories of other users. Verified by the experimental results on the public dataset, compared with other baseline models, this concept has achieved superior performance in terms of the accuracy, diversity, and fairness of the recommendation results.
[0090] Step (3.4): Use the above parameters to obtain the output and construct a residual connection to get the network output
[0091] Take as the input and apply the transfer equation:
[0092] ,
[0093] to obtain the output of the selected state space model . Use the above spare to perform a residual connection to get:
[0094] , and finally project linearly to get the output of the -th layer interest state Mamba network , that is, the above process will be repeated multiple times later.
[0095] Step (3.5) Use a pointwise feedforward network to connect and stack the above Mamba blocks to enhance the network modeling ability:
[0096] Normalize the output using the LayerNorm layer normalization function as described in step (2.4) and then input it into the pointwise feedforward network PFFN:
[0097] ,
[0098] is an approximation of the Gaussian error linear unit and serves as a smooth non-linear activation function for accelerating calculations.
[0099] is a learnable linear transformation matrix, is a learnable bias term. Then, a residual connection and a regularization operation similar to step (2.4) are applied:
[0100] .
[0101] Step 4: Optimize the model by minimizing the cross-entropy loss function, and generate a user interaction service recommendation list based on the normalized score matrix. Take the top K highest-scoring points of interest as the recommendation results.
[0102] Specifically, take the last vector of each sequence of the final output sequence tensor as the predicted point of interest matching embedding vector , and form a batch matching matrix .
[0103] The probability normalization score matrix is calculated as defined below:
[0104] is the original batch score matrix, where as described in step (2.2) ;
[0105] Perform element-wise softmax probability normalization on the score vector of each sample in the original batch score matrix.
[0106] The user interaction service recommendation is to query the corresponding score vector in the output score matrix of this batch of the model , and perform a full sort to obtain the indices of the top K elements with the highest scores, and use the corresponding point of interest numbers as the recommendation list.
[0107] The model optimization objective is to minimize the following loss function:
[0108] ,
[0109] where are the batch size and the number of points of interest respectively; is the value of the th element of the positive and negative sample label vector corresponding to the th sequence in the current batch; is the score matrix after probability normalization for this batch.
[0110] This method enhances the representational ability and consistency connection between static points of interest and dynamic user interest signals by improving the sine position encoding method, and explores the application prospect of trajectory collaborative filtering signals in the location-based social network service recommendation system by utilizing the efficient long-sequence modeling ability and trajectory working characteristics of the state space model Mamba. The long-term and short-term interests of users are characterized by the interest state transition mode field of the state space model and the content-aware causal convolution response respectively. The static and dynamic joint representation learning method makes full use of the spatio-temporal information of points of interest, injects spatio-temporal awareness into the trajectory collaborative filtering ability of the state space model, and effectively alleviates the common popularity bias problem in the recommendation system.
[0111] This embodiment is trained and tested on three classic public datasets.
[0112]
[0113] Table 1 shows the characteristics of the three public datasets used in the embodiment.
[0114] The dataset characteristics are shown in Table 1: The Foursquare_NYC dataset contains 227,428 check-in records of 1,084 users at 38,334 points of interest in the New York area of the United States; the Foursquare_TKY dataset contains 573,703 check-in records of 2,294 users at 61,859 points of interest in the Tokyo area of Japan; the Gowalla dataset contains 509,488 check-in records of 8,758 users at 55,860 points of interest in the United States.
[0115] The experimental environment and settings are as follows:
[0116] The model described in the present invention is implemented based on the PyTorch and RecBole frameworks. The feature embedding dimension of the model is set to 64, and a dropout probability of 0.2 is adopted. For the Mamba module, the state expansion factor of the state space model (SSM) is set to 32, the convolutional kernel size is 4 (suitable for one-dimensional convolution), and the block expansion factor of the linear projection is 2. The maximum sequence length is set to 128. The training batch size is 4096, and the evaluation batch size is also set to 4096.
[0117] The dataset is divided according to the ratio of the training set, validation set, and test set, and the ratios are 70%, 10%, and 20% respectively. All experiments are run on an NVIDIA 2080Ti GPU with 11GB of video memory. The implementation code of the present invention has been made public on GitHub.
[0118] In this embodiment, the mean reciprocal rank (MRR@K) and the normalized discounted cumulative gain (NDCG@K) are used to evaluate the accuracy and relevance of the recommendation list for a recommendation list of length K. Among them, MRR@K measures the ranking of the target item hit by the model among the top K recommended items, while NDCG@K further considers the sorting weight of the recommended items to measure the overall quality of the recommendation results.
[0119]
[0120] Table 2 Experimental results of the present method in terms of the accuracy and relevance of the recommendation results
[0121] For a model with strong prediction ability, the present invention further uses the coverage rate (COV@K) and the tail proportion (TP@K) to evaluate the diversity and fairness of the recommendation results. Among them, COV@K reflects the variety of item categories covered by the model, while TP@K measures the proportion of long-tail items in the recommendation. The tail proportion parameter is set to 0.15. These metrics are comparable only when the prediction accuracy of each model is comparable. Generally speaking, the higher the values of these metrics, the better the recommendation quality of the model.
[0122]
[0123] Table 3 Experimental results of the present method in terms of the diversity and fairness of the recommendation results
[0124] The experimental results are shown in Tables 2, 3, 4, and 5, which respectively demonstrate the advantages of a location social network service recommendation method (TCFMamba) based on trajectory collaborative filtering and Mamba proposed by the present invention over many advanced baseline models in terms of the accuracy, diversity, and fairness of the recommendation results. And the ablation experiment and the parameter comparison experiment testify to the effectiveness of the method of the present invention.
[0125] The experimental results reflect the following properties and advantages of the method of the present invention:
[0126] (1) Dynamic interest modeling ability
[0127] This method adopts a global spatio-temporal state representation method, breaking through the static limitation of the interaction-based collaborative signal, embedding the spatio-temporal trajectory collaborative signal into the state transition space, and realizing a more flexible user state modeling. At the same time, thanks to the state selection mechanism of Mamba, the long-term interests of users can be efficiently captured without additional user embeddings, and combined with the input-aware selection mechanism, the model can reasonably infer the interest transfer pattern in the current state.
[0128] (2) Cross-dataset adaptability
[0129] Experimental analysis shows that in the sparse data scenario, TCFMamba has stronger performance advantages, can effectively utilize the information in sparse data, and improve the recommendation quality of the model. In addition, on datasets with stronger collaborative signals at the item side, the relative improvement of this method is greater, indicating that it can generate a more reasonable interest point representation space and optimize the collaborative filtering effect at the item side.
[0130]
[0131] Table 4 Ablation experiment results for validating the effectiveness of the modules of this method
[0132] The ablation experiment results illustrate the effects of the components of this method as follows:
[0133] As shown in Table 4 of the specification, in this embodiment, ablation experiments were conducted on the Foursquare_TKY dataset to evaluate the impact of each component. The experiments included the following five models: using only the Mamba Block and the semantic embedding layer (SE Only), removing the geographical information embedding layer (SE&PAPE), removing the periodic time embedding layer (SE&LAPE), the full model (FullModel), and the full model with two stacked layers of the interest state Mamba network (PSMN) (2 Layers). These experimental models were gradually extended from the basic Mamba model to the full model.
[0134] The experimental results show that the geographical information embedding layer and the periodic time embedding layer have positive effects on the accuracy, diversity, and fairness of the recommendation results respectively. Among them, the geographical information embedding layer, as a hard constraint embedding, optimizes the semantic embedding structure. Although it is slightly lower than the periodic time embedding layer in terms of accuracy, it significantly improves the diversity and fairness of the recommendation, and alleviates the problems caused by popularity bias and exposure bias. The periodic time embedding layer, as a time period indicator, guides the PSMN to learn the interest state transition, can capture the sequential trajectory collaborative signal more accurately, but there are still certain limitations in its dependence on the interest point semantic embedding.
[0135] When the geographical information embedding layer and the periodic time embedding layer are used in combination, the full model can effectively integrate the three types of collaborative signals of semantics, space, and time. While improving the recommendation accuracy, it further alleviates the problems of popularity bias and exposure bias, and achieves a more balanced recommendation effect. In addition, through the connection and stacking of PSMN and PFFN, the non-linear modeling ability is enhanced, and the model performance is further improved.
[0136] In this embodiment, a comparative experiment on the parameter configuration of different encoding functions is carried out on the Foursquare_TKY dataset to evaluate its ability to model spatio-temporal correlation. Two typical frequency functions are used for comparison in the experiment: power functions (t³ and t 6 ), and exponential function (10000⁻ᵗ, which is the default function adopted by Transformer).
[0137] The experimental results show that sine encoding has the characteristic of long-range attenuation, can effectively capture spatio-temporal correlation, and at the same time makes the semantic structure more independent. In the first monotonic interval [0,5] of the relative distance δ, the model can accurately understand spatio-temporal information. Therefore, in this embodiment, it is assumed that within a square range with a semi-perimeter of 1000 meters, the popularity of points of interest is relatively close, and they are classified into this interval, so δ = 200 is set in formula (6). In terms of time encoding, considering that the interaction correlation within a quarter of the receptive field is relatively strong, so δ = w / 20 is set in formula (8). Among them, the values of w are: day (24 × 3600), week (7 × 24 × 3600), and month (30 × 24 × 3600). This method not only effectively eliminates the influence of spatio-temporal dimensions, makes the subsequent modeling more reasonable, but also enhances the generalization ability of the model.
[0138]
[0139] Table 5 Parameter comparative experiment to verify the superiority of the cubic sine position encoding and its parameters adopted by this method
[0140] As shown in Table 5, when using one day as the time granularity and combining with the power function t³, the model performs best. Therefore, the present invention finally adopts this combination to optimize the spatio-temporal encoding effect of the model.
[0141] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions in the specification are only preferred examples of the present invention, and do not limit the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A location social network service recommendation method based on trajectory collaborative filtering and Mamba, characterized in that, It includes the following steps: Step 1: Collect service interaction data of users in the location social network. The service interaction data includes point of interest numbers, point of interest geographical information, and check-in triples containing user numbers, point of interest numbers, and check-in times; Step 2: Perform representation modeling on service interaction behaviors based on static and dynamic joint representation learning to generate point of interest static representation embedding vectors and user interest signal embedding vectors. The static and dynamic joint representation learning includes a point of interest static representation learning layer, an interactive behavior periodic dynamic representation modeling layer, and a user interest signal generator; Step 3: Construct a service interaction behavior sequence modeling network based on the state space machine model Mamba. The network includes a state space model, a pointwise feed-forward network, and a network end layer. The pointwise feed-forward network connects multiple state space models; input the user interest signal embedding vector into the network, model the user's long-term and short-term interest state transition pattern field through the state space model, and output a predicted point of interest matching embedding vector; Step 4: Optimize the model by minimizing the cross-entropy loss function, and generate a user interaction service recommendation list based on the normalized score matrix. Take the top K highest-scoring points of interest as the recommendation results.
2. The method according to claim 1, wherein The point of interest static representation learning layer is defined as follows: Define the complete set of point - of - interest numbers , is the total number of points of interest. Among them, is the point - of - interest number. Construct a trainable randomly - initialized semantic embedding matrix through the complete set of point - of - interest numbers , where the semantic embedding vector of the point of interest is which is the th row vector of According to the geographical information of points of interest and the radius of the earth Perform spherical coordinate transformation to obtain the spherical horizontal and vertical coordinates : , The horizontal and vertical coordinates are used as source information respectively, and two embedding vectors are generated by a cubic sine position encoder for geographic information perception, and then concatenated to obtain a geographic information embedding vector ; There are .
3. The method according to claim 2, wherein The interactive behavior periodic dynamic characterization modeling layer is defined as follows: The check-in time is used as the source information to obtain the interactive behavior periodic embedding vector through the periodic perception cubic sine position encoder .
4. The method according to claim 3, characterized in that The definition of the user interest signal generator is as follows: the semantic embedding vector , the geographical information embedding vector , and the periodic embedding vector are input into a feature fusion function to obtain the user interest signal embedding vector .
5. The method according to claim 3, characterized in that, The definition of the periodic perception cubic sine position encoder is: , Among them, is the source information, the cubic frequency coefficient , is the coding embedding dimension, is the target coding embedding vector, where .
6. The method according to claim 5, wherein For the geographical information perception cubic sine position encoder, its scale normalization function is: , is the scaling factor, is the abscissa or ordinate transformed from the spherical coordinates of longitude or latitude, that is, the expansion of the source information, is the minimum value of the abscissa or ordinate; For the periodic perception cubic sine position encoder, its time periodicity normalization function is: , Among them, is a periodic window.
7. The method according to claim 4, wherein The feature fusion function is defined as: , where is the dropout function, and the binary dropout mask vector is generated by the random dropout probability and is the layer normalization function, which uses the mean and standard deviation of this vector and the learnable scaling and translation parameters to standardize the data distribution.
8. The method according to claim 4, characterized in that, The state space model consists of a system of ordinary differential equations with a time step Discretize the above parametric equations to obtain: , , Among them, the user interest signal embedding vector is used as the input , is the user interest hidden state modeled by the model, is the user interest state representation embedding vector output by the model, are the trainable parameters of the model.
9. The method according to claim 8, wherein The pointwise feed-forward network is defined as follows: ; wherein is the user interest state representation embedding vector output by the above state space model is the output tensor obtained by concatenating in sequence, is the approximation expression of the Gaussian error linear unit, is the learnable linear transformation matrix, is the learnable bias term.
10. The method according to claim 4, characterized in that The network's last layer optimizes the network output using residual connections and layer normalization, embedding the interest signals from different users into a sequence matrix which is packed into a batch input tensor , generating a sequence tensor , and extracting its last vector as the predicted interest point matching embedding vector , forming a batch matching matrix .
11. The method according to claim 10, wherein In step (4), the probability normalization score matrix is calculated as defined below: ; is the original batch score matrix, Perform softmax probability normalization on the score vectors of each sample in the original batch score matrix element by element.
Citation Information
Patent Citations
Point-of-interest recommendation method for embedding attention based on multivariable Hawkes time-space point process
CN116991908A
Location recommendation method based on hypergraph neural network and diffusion model
CN119441636A
Next interest point recommendation method fusing global periodicity and local regularity
CN119474564A
Relation attribute-based interpretable exercise recommendation method and system
CN119557343A
Interest point recommendation method for low-quality data scene
CN119622122A
Cited By
Course resource recommendation method and device based on improved state space model, equipment and storage medium
CN120744242A
Collaborative filtering recommendation method and system based on state space model
CN121597919A
A Collaborative Filtering Recommendation Method and System Based on State-Space Model
CN121597919B