A location-based social network service recommendation method based on trajectory collaborative filtering and Mamba
Through the joint representation learning method of trajectory collaborative filtering and Mamba, the problem of limited representation ability of points of interest and user interest signals is solved, and a user long-term and short-term interest state transition pattern field is constructed, achieving more accurate, fair and diverse recommendation results, and improving the performance of the recommendation system.
Patent Information
- Application Number
- CN202510705618.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-05-29
AI Technical Summary
Existing sequential recommendation systems have limited expressive capabilities in modeling points of interest and representing user interest signals, and their recommendation results are affected by popularity bias and lack diversity and fairness.
A location-based social network service recommendation method based on trajectory collaborative filtering and Mamba is adopted. Static and dynamic joint representation learning is used to generate interest points and user interest signal embedding vectors. Combined with the state space model Mamba, the user's long-term and short-term interest state transition pattern field is constructed, and the model is optimized to generate a recommendation list.
It achieves more accurate, fair and diverse recommendation results, alleviates the popularity bias problem, and improves the performance of the recommendation system.
Smart Images

Figure CN120256746B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data mining and recommendation systems, and in particular to a location social network service recommendation method based on trajectory collaborative filtering and Mamba. Background Art
[0002] Next point of interest recommendation is a key application in location-based social networks. Its goal is to predict a user's likely future locations based on their historical check-in history. With the widespread adoption of mobile internet and the development of location-based services, deep learning-based recommendation systems have gained widespread application in smart tourism, lifestyle services, and commercial marketing, helping users find relevant items from vast amounts of online content and reducing search costs.
[0003] However, existing methods still face numerous challenges in modeling the evolution of user interests, such as popularity bias, exposure bias, and limited representation capabilities. These issues limit the precise modeling of POIs and users, impacting the effectiveness of recommendation results. Specifically, user check-in behavior exhibits significant spatiotemporal characteristics, with interests evolving over time and location. Furthermore, the POI recommendation task is subject to the dilution of semantic information. When the representation capabilities of POIs are insufficient, both the accuracy and diversity of recommendations are compromised. Therefore, accurately modeling users' dynamic preferences is a core issue facing sequential recommendation. Summary of the Invention
[0004] This paper addresses the limited expressiveness of existing sequential recommendation systems in modeling POIs and user interest signal representations, as well as the lack of diversity and fairness in recommendation results due to popularity bias. This paper proposes a location-based social network service recommendation method based on trajectory collaborative filtering and Mamba. First, in the representation modeling phase, a static and dynamic joint representation learning method is used to address the poor representation structure consistency and semantic dilution between static POIs and dynamic user interest signals. Second, the interest state Mamba network is used to construct a unified field of long-term user interest transition patterns and short-term interest response patterns. Its trajectory collaborative filtering properties help alleviate the popularity bias problem faced by recommendation systems.
[0005] In order to achieve the above object, the technical solutions specifically adopted by the present invention are as follows:
[0006] A location social network service recommendation method based on trajectory collaborative filtering and Mamba includes the following steps:
[0007] Step 1: Collecting service interaction data of users in the location social network, wherein the service interaction data includes a point of interest number, geographical information of the point of interest, and a check-in triplet including a user number, a point of interest number, and a check-in time;
[0008] Step 2: Model the service interaction behavior based on static and dynamic joint representation learning to generate a static representation embedding vector of the point of interest and a user interest signal embedding vector. The static and dynamic joint representation learning includes a static representation learning layer for the point of interest, a periodic dynamic representation modeling layer for the interaction behavior, 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, which includes a state space model, a point-by-point feedforward network, and a network end layer. The point-by-point feedforward network connects multiple state space models; embed the user interest signal into the input network, model the user's long-term and short-term interest state transition pattern field through the state space model, and output the 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, taking the top K highest-scoring points of interest as the recommendation results.
[0011] Preferably, the interest point static representation learning layer is defined as follows:
[0012] Define the full set of point of interest numbers , is the total number of points of interest, where Number the points of interest and construct a trainable randomly initialized semantic embedding matrix from the full set of point of interest numbers , where points of interest The semantic embedding vector of for No. row vectors;
[0013] Based on geographical information of points of interest and the radius of the Earth Perform spherical coordinate transformation to obtain spherical horizontal and vertical coordinates :
[0014] ,
[0015] The horizontal and vertical coordinates are used as source information respectively. The two embedding vectors are generated by the geographic information-aware cubic sine position encoder and then the geographic information embedding vector is obtained. ;
[0016] The static representation embedding vector of the interest point is obtained .
[0017] As an example, the interactive behavior periodic dynamic representation modeling layer is defined as follows: the check-in time As the source information, the interactive behavior periodic embedding vector is obtained through the periodic perceptual cubic sine position encoder. .
[0018] Preferably, the user interest signal generator is defined as follows: embedding the semantic vector , geographic information embedding vector and the periodic embedding vector The user interest signal embedding vector is obtained through the feature fusion function .
[0019] Preferably, the period-aware cubic sine position encoder is defined as:
[0020] ,
[0021] in, is the source information, 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 horizontal coordinate or vertical coordinate transformed from the longitude or latitude spherical coordinate, is the minimum value of the horizontal or vertical coordinate;
[0025] For the periodic sensing cubic sine position encoder, its time periodicity normalization function is:
[0026] ,
[0027] in, is the period window.
[0028] Preferably, the feature fusion function is defined as:
[0029] ,
[0030] in is the drop function, binary drop mask vector By random drop probability generate, is the layer normalization function, using the vector mean and standard deviation And learnable scaling and translation parameters To standardize the data distribution.
[0031] Preferably, the state space model is composed of a set of ordinary differential equations with a time step Discretizing the above parametric equations, we get:
[0032] ,
[0033] Among them, the user interest signal embedding vector As input , The hidden state of user interests modeled by the model, The user interest state representation embedding vector output by the model, are the trainable parameters of the model.
[0034] Preferably, the point-by-point feedforward network is defined as follows:
[0035]
[0036] in Output the user interest state representation embedding vector for the above state space model The output tensor obtained by concatenating the sequences, is the approximate expression of Gaussian error linear unit, is the learnable linear transformation matrix, is the learnable bias term.
[0037] As a preference, the last layer of the network uses residual connections and layer normalization to optimize the network output, embedding interest signals from different users into the sequence matrix Packed into batches of input tensors , generating a sequence tensor , and extract its last vector as the predicted interest point matching embedding vector , forming a batch matching matrix .
[0038] Preferably, in step (4), the probability normalized score matrix is calculated as follows:
[0039]
[0040] is the original batch score matrix, The score vector of each sample in the original batch score matrix is element-wise softmax probability normalized.
[0041] The present invention has the following characteristics and beneficial effects:
[0042] Based on the concepts of consistent decomposition representation and interest state transition field, this paper achieves more accurate, fair and diverse recommendation results, expands the application of sinusoidal position coding in consistent representation learning, and deeply integrates it with the state space model to extract trajectory collaborative filtering signals, thereby improving recommendation performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a framework diagram of a service recommendation method based on decoupled representation learning and graph neural network in an embodiment of the present invention.
[0044] Figure 2 for Figure 1 Network framework diagram of PSMN and Manba.
[0045] Figure 3 for Figure 1 Schematic diagram of the principle of cubic sinusoidal positional encoding with static and dynamic joint representation learning network and shared structure.
[0046] Figure 4 This is the theoretical basis for selecting the parameters of the sinusoidal encoder in the embodiment of the present invention. DETAILED DESCRIPTION
[0047] The present invention is described in detail below in conjunction with specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.
[0048] A location-based social network service recommendation method based on trajectory collaborative filtering and Mamba, such as Figure 1 As shown, the following steps are included:
[0049] Step 1: Collecting service interaction data of users in the location social network, wherein the service interaction data includes a point of interest number, geographical information of the point of interest, and a check-in triplet including a user number, a point of interest number, and a check-in time;
[0050] Specifically, in this embodiment, the service interaction data of users in the location social network is collected, including the number of points of interest , geographic information of points of interest (latitude and longitude) and contains the user number , point of interest number and check-in time Check-in triplet . Based on the sign-in triplet , for the same user An example of an interest trajectory related to the organization, including a sequence of interest point numbers , geographic information sequence And the check-in time series .
[0051] Step 2: Based on static and dynamic joint representation learning, the service interaction behavior is represented and modeled to generate the static representation embedding vector of the point of interest and the user interest signal embedding vector. The static and dynamic joint representation learning includes the static representation learning layer of the point of interest, the periodic dynamic representation modeling layer of the interaction behavior, and the user interest signal generator.
[0052] Specifically, such as Figure 3 As shown, it includes the following sub-steps:
[0053] Step (2.1). Semantic Embedding Layer
[0054] First, the model is the complete set of interest point numbers , Construct a trainable randomly initialized semantic embedding matrix for the total number of interest points , where points of interest The semantic embedding vector of for No. A row vector.
[0055] Step (2.2). Geographic information embedding layer
[0056] First, the points of interest Geographic information , according to the radius of the Earth Perform spherical coordinate transformation to obtain spherical horizontal and vertical coordinates :
[0057] .
[0058] Secondly, a dual-stream cubic sine position encoder based on geographic information perception is used, that is, the horizontal and vertical coordinates Encode separately and then concatenate to get the geographic information embedding vector .
[0059] For information sources , , is the encoding embedding dimension and ,in , cubic frequency coefficient , take the scale normalization function , is the minimum value of the entire set of information sources. In this case, the scaling factor Take 200, then the geographical information gap between other points of interest and the point of interest in the block with a half side length of 1000 meters centered on a point of interest is clear in the inner product space constructed by cubic sine position coding, that is, in the appendix of the manual. Figure 4 This property helps the model filter out irrelevant points of interest based on geographic information and accelerates retrieval efficiency.
[0060] The geographic information embedding vectors of all points of interest will be saved as a matrix , and the static representation of the point of interest is embedded in the matrix ,
[0061] Step (2.3). Periodic temporal embedding layer
[0062] For check-in time In this embodiment, a cubic sine position encoder with the same structure is used 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 scaling factor. The experimental results show that in this embodiment, the period window For best results, the scaling factor is 24*3600 seconds. This ensures that when the relative temporal distance is within a quarter-period window, the inner product of the two time codes falls within the first monotonic interval, helping the model filter out temporally uncorrelated signals of interest. It is worth noting that both of the aforementioned cubic sinusoidal position encoders utilize a global information source, which facilitates the full utilization of spatiotemporal trajectory collaborative filtering capabilities in state-space models within a unified information domain in subsequent work.
[0063] Step (2.4). User interest signal generator
[0064] Generate the user interest signal embedding vector based on the three feature embedding vectors obtained in the above steps , which is defined as follows:
[0065] The discard function ,Binary drop mask vector By random drop probability generate,
[0066] Layer normalization function , using the vector mean and standard deviation And learnable scaling and translation parameters To standardize the data distribution.
[0067] This step helps reduce the model's dependence on the numerical representation and improves the robustness of the model.
[0068] For a user interaction trajectory instance, a sequence of interest point numbers is included. , geographic information sequence And the check-in time series , which generates a user interest signal embedding vector sequence according to the above steps , is the trajectory length. For batch training, multiple After filling, splicing As model input, 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, wherein the network includes a state-space model, a point-by-point feedforward network, and a network end layer, wherein the point-by-point feedforward network connects multiple state-space models; embed the user interest signal into the input network, model the user's long-term and short-term interest state transition pattern field through the state-space model, and output the predicted interest point matching embedding vector.
[0070] Specifically, such as Figure 2 As shown, in this embodiment, the state space model Mamba modeling is introduced and the above-constructed consistent user interest signal embedding vector is used 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 set of ordinary differential equations:
[0072] ,
[0073] This means that the change in the current state of interest is related to the current state of interest and the current input interest signal; the model output is related to the current state of interest.
[0074] According to the solution of this ordinary differential equation and time step Discretize the above parametric equations and get the following discretized equations
[0075] , ,
[0076] The model trainable parameters are and as well as .
[0077] Based on the above ordinary differential equations and their solutions, this model can be interpreted as modeling the following concepts:
[0078] By mining massive context information of points of interest, the parameter matrix The velocity vector field describing the user's long-term interest transfer pattern is defined; through the input content perception mechanism of the model, the parameter matrix A response to the user's short-term interest signal is constructed, and the model is affected by the causal convolution form of the second term of the differential equation. Provides a mapping from the interest hidden state to the interest anchor of the model output.
[0079] Modeling the user's long-term and short-term interest state transition pattern 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 input , first use linear projection to expand the dimension to get:
[0082] , the two are equal, where It is used as input for subsequent residual connections. That is to say First, use one-dimensional convolution to capture the embedding vector relationship of neighboring user interest signals, and then use SiLU activation function to capture nonlinear relationships, and get Serves as the basis for subsequent input content perception mechanism.
[0083] Step (3.2): Construct the original parameter matrix in 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 is the input The feature dimensions construct independent state space parameters and only store diagonal elements to express The matrix on ; for the parameter , which come from two different linear projections, the information source is the above The parameter structure means that the model is interested in each user in the input batch. The response is different, which is one of the content-aware mechanisms.
[0085] Step (3.3): Construct the content-aware discretized parameter matrix in the selective state space model (SSM)
[0086] , is the basic size hyperparameter of the discretization step size. This parameter structure means that the transition step size of each hidden state in the state space of each sequence is different, which improves the weakness of the traditional time-invariant state space model that lacks content perception.
[0087] The discretization parameters are constructed based on the original parameter matrix obtained above and the content-aware discretization step size parameters:
[0088] , ,
[0089] Among them Described by The defined user interest state transition pattern field with content awareness, combined with the spatial-temporal semantic trinity interest signal representation obtained in step (2), the model has the positioning capability based on the spatial-temporal trajectory signal. It can quickly retrieve relevant interest tracks based on known user interest signals and leverage known interest tracks of other users to create a collaborative filtering effect. Experimental results on public datasets have shown that this concept achieves superior performance in recommendation accuracy, diversity, and fairness compared to other baseline models.
[0090] Step (3.4): Use the above parameters to get the output and construct the residual connection to get the network output
[0091] Will As input Apply the transfer equation:
[0092] ,
[0093] Get the selected state space model output , using the above spare Perform residual connection to obtain:
[0094] , and finally The first Layer Interest State Mamba Network Output , that is, the above process will be repeated multiple times.
[0095] Step (3.5) utilizes point-by-point feedforward network connections and superimposes the above Mamba blocks to enhance network modeling capabilities:
[0096] Output After performing the LayerNorm layer normalization function as described in step (2.4), input the point-by-point feedforward network PFFN:
[0097] ,
[0098] It is an approximate expression of the Gaussian error linear unit, which serves as a smooth nonlinear activation function for accelerated calculation.
[0099] is the 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, taking the top K highest-scoring points of interest as the recommendation results.
[0102] Specifically, take the final output sequence tensor The last vector of each sequence is used as the predicted interest point matching embedding vector , forming a batch matching matrix .
[0103] The probability normalized score matrix calculation is defined as follows:
[0104] is the original batch score matrix, as described in step (2.2) ;
[0105] The score vector of each sample in the original batch score matrix is element-wise softmax probability normalized.
[0106] The user interaction service recommendation query model outputs a score matrix for this batch The corresponding score vector in , perform full sorting and obtain the index of the top K elements with the highest scores, and use the corresponding numbers of the points of interest as the recommendation list.
[0107] The model optimization goal is to minimize the following loss function:
[0108] ,
[0109] in are batch size and number of points of interest respectively; The current batch The sequence corresponds to the positive and negative sample label vector The value of the element; is the score matrix after the probability of the batch is normalized.
[0110] This method enhances the representation and consistency of static POIs and dynamic user interest signals by improving the sinusoidal position encoding method. Leveraging the efficient long-sequence modeling and trajectory-based working characteristics of the state-space model Mamba, this method explores the potential application of trajectory-based collaborative filtering signals in location-based social network service recommendation systems. Users' long-term and short-term interests are characterized by the state-space model's interest state transition pattern field and content-aware causal convolutional responses, respectively. This joint static and dynamic representation learning method fully leverages the spatiotemporal information of POIs, infusing the state-space model's trajectory collaborative filtering capabilities with spatiotemporal awareness, effectively alleviating the popularity bias common in recommendation systems.
[0111] This example is trained and tested on three classic public datasets.
[0112]
[0113] Table 1 shows the characteristics of the three public data sets used in the embodiment.
[0114] The characteristics of the dataset are shown in Table 1: the Foursquare_NYC dataset contains 227,428 check-in records at 38,334 points of interest (POIs) by 1,084 users in the New York area of the United States; the Foursquare_TKY dataset contains 573,703 check-in records at 61,859 POIs by 2,294 users in the Tokyo area of Japan; and the Gowalla dataset contains 509,488 check-in records at 55,860 POIs by 8,758 users in the United States.
[0115] The experimental environment and settings are as follows:
[0116] The model described in this paper is implemented using the PyTorch and RecBole frameworks. The model's feature embedding dimension is set to 64, with a dropout probability of 0.2. For the Mamba module, the state space model (SSM) state expansion factor is set to 32, the convolution kernel size is set to 4 (for one-dimensional convolution), and the block expansion factor of the linear projection is set to 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 was divided into training, validation, and test sets with a ratio of 70%, 10%, and 20%, respectively. All experiments were run on an NVIDIA 2080Ti GPU with 11GB of video memory. The implementation code of this invention is publicly available on GitHub.
[0118] This example uses Mean Reciprocal Ranking (MRR@K) and Normalized Discounted Cumulative Gain (NDCG@K) to evaluate the accuracy and relevance of a recommendation list of length K. MRR@K measures the model's ranking of the target item among the top K recommended items, while NDCG@K further considers the ranking weight of the recommended items to measure the overall quality of the recommendation results.
[0119]
[0120] Table 2 Experimental results of this method on the accuracy and relevance of recommendation results
[0121] For models with strong predictive capabilities, this paper further uses coverage ratio (COV@K) and tail percentage (TP@K) to assess the diversity and fairness of recommendation results. COV@K reflects the variety of items covered by the model, while TP@K measures the proportion of long-tail items in the recommendations. The tail percentage parameter is set to 0.15. These metrics are only comparable when the prediction accuracy of the models is comparable. Generally speaking, higher values of these metrics indicate better recommendation quality.
[0122]
[0123] Table 3 Experimental results of this method on diversity and fairness of recommendation results
[0124] The experimental results are shown in Tables 2, 3, 4, and 5, which respectively demonstrate the advantages of the proposed location-based social network service recommendation method based on trajectory collaborative filtering and Mamba (TCFMamba) compared with many advanced baseline models in terms of recommendation result accuracy, diversity, and fairness. Ablation experiments and parameter comparison experiments also demonstrate the effectiveness of the proposed method.
[0125] The experimental results show that the method of the present invention has the following properties and advantages:
[0126] (1) Dynamic interest modeling capabilities
[0127] This method employs a global spatiotemporal state representation, breaking through the static limitations of interaction-based collaborative signals. It embeds spatiotemporal trajectory collaborative signals into a state transition space, enabling more flexible user state modeling. Furthermore, thanks to Mamba's state selection mechanism, it efficiently captures long-term user interests without the need for additional user embedding. Combined with an input-aware selection mechanism, the model can reasonably infer interest transition patterns within the current state.
[0128] (2) Cross-dataset adaptability
[0129] Experimental analysis shows that TCFMamba has a stronger performance advantage in data-sparse scenarios, effectively leveraging information in sparse data to improve the model's recommendation quality. Furthermore, on datasets with strong project-side collaborative signals, this method achieves even greater relative improvements, demonstrating its ability to generate a more reasonable POI representation space and optimize project-side collaborative filtering.
[0130]
[0131] Table 4 Ablation experiment results verifying the effectiveness of the module of this method
[0132] The ablation experiment results show the effects of each component of this method as follows:
[0133] As shown in Table 4 of the specification, this embodiment conducted ablation experiments 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 geographic embedding layer (SE & PAPE), removing the periodic temporal embedding layer (SE & LAPE), the full model (FullModel), and the full model with two stacked interest state Mamba networks (PSMN) (2 Layers). These experimental models represent a process of gradually expanding from the basic Mamba model to the full model.
[0134] Experimental results show that the geographic information embedding layer and the periodic time embedding layer each have a positive impact on the accuracy, diversity, and fairness of recommendation results. The geographic information embedding layer, as a hard-constrained embedding, optimizes the semantic embedding structure. While its accuracy is slightly lower than that of the periodic time embedding layer, it significantly improves the diversity and fairness of recommendations, alleviating issues caused by popularity bias and exposure bias. The periodic time embedding layer, as a temporal period indicator, guides the PSMN to learn interest state transitions, enabling more accurate capture of temporal trajectory collaboration signals. However, its reliance on semantic embeddings of points of interest still has certain limitations.
[0135] When the geographic information embedding layer and the periodic time embedding layer are combined, the complete model effectively integrates semantic, spatial, and temporal signals. This improves recommendation accuracy while further alleviating popularity and exposure bias, resulting in more balanced recommendations. Furthermore, by connecting and stacking the PSMN and PFFN, nonlinear modeling capabilities are enhanced, further improving model performance.
[0136] This example conducts a comparative experiment on the parameter configurations of different encoding functions on the Foursquare_TKY dataset to evaluate their modeling capabilities for spatiotemporal correlation. The experiment uses two typical frequency functions for comparison: power function (t³ and t 6 ) and an exponential function (10000⁻ᵗ, which is the default function used by Transformer).
[0137] Experimental results show that sinusoidal coding has a long-range decay characteristic and can effectively capture spatiotemporal correlation while making the semantic structure more independent. Within the first monotonic interval [0,5] of the relative distance δ, the model can accurately understand spatiotemporal information. Therefore, this embodiment assumes that the popularity of points of interest within a square with a semi-perimeter of 1000 meters is relatively close and is classified into this interval, thereby setting δ = 200 in formula (6). In terms of time coding, considering that the interactive correlation within one-quarter of the receptive field is strong, δ = 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 the spatiotemporal dimension, making subsequent modeling more reasonable, but also enhances the generalization ability of the model.
[0138]
[0139] Table 5 Parameter comparison experiment to verify the superiority of cubic sine position coding and its parameters used in this method
[0140] As shown in Table 5, the model performs best when using one day as the time granularity and combining it with the power function t³. Therefore, the present invention ultimately adopts this combination to optimize the model's spatiotemporal coding effect.
[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 to the above embodiments. The above embodiments and descriptions are merely preferred examples of the present invention and are not intended to limit the present invention. Various changes and improvements may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and improvements fall within the scope of the present invention. The scope of protection claimed in 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: The steps include: Step 1: Collecting service interaction data of users in the location social network, wherein the service interaction data includes a point of interest number, geographical information of the point of interest, and a check-in triplet including a user number, a point of interest number, and a check-in time; Step 2: Model the service interaction behavior based on static and dynamic joint representation learning to generate a static representation embedding vector of the point of interest and a user interest signal embedding vector. The static and dynamic joint representation learning includes a static representation learning layer for the point of interest, a periodic dynamic representation modeling layer for the interaction behavior, 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 point-by-point feedforward network, and a network end layer. The point-by-point feedforward 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 the predicted interest point 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, taking the top K highest-scoring points of interest as the recommendation results.
2. The method according to claim 1, characterized in that The interest point static representation learning layer is defined as follows: Define the full set of point of interest numbers , is the total number of points of interest, where Number the points of interest and construct a trainable randomly initialized semantic embedding matrix from the full set of point of interest numbers , where points of interest The semantic embedding vector of for No. row vectors; Based on geographical information of points of interest and the radius of the Earth Perform spherical coordinate transformation to obtain spherical horizontal and vertical coordinates : , The horizontal and vertical coordinates are used as source information respectively. The two embedding vectors are generated by the geographic information-aware cubic sine position encoder and then the geographic information embedding vector is obtained. ; The static representation embedding vector of the interest point is obtained ,in is the semantic embedding vector, Embed vectors for geographic information.
3. The method according to claim 2, characterized in that The interactive behavior periodic dynamic representation modeling layer is defined as follows: As the source information, the interactive behavior periodic embedding vector is obtained through the periodic perceptual cubic sine position encoder. .
4. The method according to claim 3, characterized in that The user interest signal generator is defined as follows: , geographic information embedding vector and the periodic embedding vector The user interest signal embedding vector is obtained through the feature fusion function .
5. The method according to claim 3, characterized in that The period-aware cubic sine position encoder is defined as: , in, is the source information, cubic frequency coefficient , is the encoding embedding dimension, is the target encoding embedding vector, where .
6. The method according to claim 5, characterized in that For the geographic information-aware cubic sine position encoder, its scale normalization function is: , is the scale factor, is the horizontal coordinate or vertical coordinate transformed from the longitude or latitude spherical coordinate, that is, the expansion of the source information, is the minimum value of the horizontal or vertical coordinate; For the periodic sensing cubic sine position encoder, its time periodicity normalization function is: , in, is the period window.
7. The method according to claim 4, characterized in that The feature fusion function is defined as: , in is the drop function, binary drop mask vector By random drop probability generate, is the layer normalization function, using the vector mean and standard deviation And 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 time steps Discretized parametric equations , ,get: , ; Among them, the user interest signal embedding vector As input , The hidden state of user interests modeled by the model, 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, characterized in that The point-by-point feedforward network is defined as follows: , in Output the user interest state representation embedding vector for the above state space model The output tensor obtained by concatenating the sequences, is the approximate expression of 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 last layer of the network uses residual connection and layer normalization to optimize the network output and embed the interest signals from different users into the sequence matrix Packed into batches of input tensors , generating a sequence tensor , and extract its last vector as the predicted interest point matching embedding vector , forming a batch matching matrix .
11. The method according to claim 10, characterized in that In step 4, the probability normalized score matrix is calculated as follows: , is the original batch score matrix, The score vector of each sample in the original batch score matrix is element-wise softmax probability normalized.
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