Point of interest recommendation method based on collaborative bias and bidirectional state space modeling
Patent Information
- Application Number
- CN202610935037.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-11-03
AI Technical Summary
现有兴趣点推荐方法在下一兴趣点推荐任务中存在序列方法对群体协同信息利用不足,图方法对时序动态建模能力有限,难以统一建模用户个体偏好、群体行为模式及复杂时空依赖关系的问题。
By employing a collaborative bias and bidirectional state-space modeling approach, user trajectory sequences, user preference matrices, and temporal embeddings are constructed, and combined with self-attention encoding and gating fusion mechanisms, a joint modeling of individual user interest evolution and group behavior patterns is achieved.
It improves the accuracy and robustness of recommendation results, and can better capture long-range temporal dependencies and dynamic interest evolution features in user behavior, thereby enhancing the model's spatiotemporal modeling capabilities.
Smart Images

Figure CN123030814A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of recommendation systems and spatiotemporal data mining technology, and in particular to an interest point recommendation method based on collaborative bias and bidirectional state space modeling. Background Technology
[0002] Location-based social networks (LBSNs) have accumulated a wealth of user trajectory data, making point-of-interest (POI) recommendation a key technology in smart cities and personalized services. The next POI recommendation task aims to predict users' potential future locations based on their historical check-in behavior, thereby providing accurate travel and consumption suggestions.
[0003] Existing POI recommendation methods are mainly divided into two categories: sequence-based methods and graph-based methods. Sequence-based methods treat user check-in records as time-ordered behavioral sequences and characterize the evolution of user interests by modeling the dynamic dependencies within the sequence. Recurrent Neural Networks (RNNs), Long Short-Term Memory Networks (LSTMs), and Gated Recurrent Units (GRUs) have been introduced to enhance sequence modeling capabilities; Transformers achieve global dependency modeling through self-attention mechanisms, improving long sequence processing capabilities to some extent. However, these methods typically focus on single-user behavior modeling, lacking utilization of collaborative information between users, and still suffer from high computational complexity or information decay in long sequence scenarios, limiting their ability to characterize complex spatiotemporal patterns. Graph-based recommendation methods construct user-interest point interaction graphs or interest point transition graphs to mine higher-order relationships in user behavior. Graph Convolutional Networks (GCNs) and Graph Attention Networks (GATs) can learn global structural information between users and interest points, while some methods characterize spatial dependencies by modeling the transition relationships between interest points. While these methods have advantages in capturing global relationships, they typically lack fine-grained modeling of time-series dynamics, making it difficult to accurately reflect changes in user interests over time. Furthermore, they often rely on static graph structures, which do not adequately utilize temporal contextual information.
[0004] Existing technologies still have significant limitations in the next point of interest recommendation task: sequence methods do not make sufficient use of group collaborative information and are difficult to alleviate the data sparsity problem; graph methods can characterize global relationships, but have limited ability to model temporal dynamics; at the same time, existing methods are difficult to uniformly model individual user preferences, group behavior patterns and complex spatiotemporal dependencies. Summary of the Invention
[0005] This invention aims to address at least one of the technical problems existing in related technologies. To this end, this invention provides an interest point recommendation method based on collaborative bias and bidirectional state space modeling. By introducing a collaborative preference modeling mechanism and a bidirectional sequence representation learning method, it achieves joint modeling of the evolution of individual user interests and the patterns of group behavior, thereby improving the accuracy and robustness of the recommendation results.
[0006] This invention provides a method for recommending points of interest based on cooperative bias and bidirectional state space modeling, including: S1: Obtain user check-in record text including user, point of interest, and geographical location of point of interest; construct user trajectory sequence based on user check-in record text; divide user trajectory sequence into multiple sub-trajectories with natural day as time window; construct supervised learning samples based on sub-trajectories; and construct initial mapping prediction model based on supervised learning samples. S2: Construct a user preference matrix based on the historical check-in records of all users; calculate individual preferences and group preferences based on the user preference matrix; calculate collaborative bias based on individual preferences and group preferences. S3: Construct a feature sequence based on user embedding, point of interest embedding, and geographic location embedding; construct a temporal embedding function, and construct temporal embedding representations from the user's perspective and point of interest perspective based on the temporal embedding function; perform a complex space rotation transformation on the feature sequence with the temporal embedding representation as the phase angle to obtain a complex space feature sequence; perform self-attention encoding on the complex space feature sequence and then perform bidirectional state space modeling to obtain a forward-order encoded sequence and a reverse-order encoded sequence. S4: A gating fusion mechanism is used to dynamically fuse the forward and reverse encoded sequences to obtain a fused sequence; the fused sequence is then concatenated with the interest point embedding and the geographic location embedding and mapped to the interest point prediction space to obtain the prediction output vector; S5: Correct the predicted output vector through collaborative bias to obtain the final predicted vector; S6: Calculate the cross-entropy loss based on the final prediction vector, and use the backpropagation algorithm to jointly optimize the initial mapping prediction model based on the cross-entropy loss. Use the interest point with the highest probability output by the optimized mapping prediction model as the prediction result of the next interest point.
[0007] Furthermore, in step S2, the rows of the user preference matrix represent users, the columns of the user preference matrix represent points of interest, and each item in the user preference matrix represents the number of times a user visits a point of interest.
[0008] Furthermore, step S2, which calculates individual preferences and group preferences based on the user preference matrix, includes: Normalize the row vectors corresponding to each user in the user preference matrix to obtain individual preferences; L2 normalization is performed on individual preferences to obtain normalized individual preferences; Calculate the similarity of preferences between any two users based on normalized individual preferences; For users Select with user Construct a neighbor set from the top K users with the highest preference similarity, and calculate the relationships between users in the neighbor set. The similarity of preferences is normalized to obtain the similarity weight, where K is a preset positive integer; Group preferences are calculated based on individual preferences and similarity weights.
[0009] Furthermore, the calculation of collaborative bias based on individual and group preferences in step S2 includes: By integrating individual and group preferences, a combined preference can be obtained. The fusion preference is normalized, and the collaborative bias is calculated based on the normalized fusion preference.
[0010] Furthermore, the feature sequence includes user interest point interaction feature sequence and interest point geographic semantic interaction feature sequence, and the complex space feature sequence includes user-interest point interaction complex space fusion feature and interest point-geographic semantic complex space fusion feature.
[0011] Furthermore, the time embedding representation includes hour-level time embedding representation and week-level time embedding representation; Hour-level time embedding representations include hour-level user-perspective time embedding representations and hour-level point-of-interest-perspective time embedding representations; The week-level time embedding representation includes the week-level user-perspective time embedding representation and the week-level point-of-interest perspective time embedding representation.
[0012] Furthermore, the computational expression for the time embedding function is: in, For time embedding functions, For timestamps, For the linear term weight parameters, For the linear term phase parameter vector, This is a vector of frequency parameters for a multi-frequency sine wave. This is the phase parameter vector for the multi-frequency sine wave term.
[0013] Furthermore, after performing self-attention encoding on the complex space feature sequence, bidirectional state space modeling is performed to obtain the forward-order encoded sequence and the reverse-order encoded sequence, including: The hourly and weekday-level time embedding representations of complex spatial feature sequences are fused using a weighted fusion mechanism to obtain complex spatial fused features. Calculate the complex space fusion features for all time steps to obtain the complex space fusion feature sequence; The complex space fused feature sequence is input into the encoder based on the self-attention mechanism to extract local contextual dependencies and obtain the encoded sequence; The encoded sequence is modeled bidirectionally, and the representations of the two directions are concatenated on the feature dimension and mapped back to the original dimension. Through residual connection and normalization, a bidirectional sequence is obtained. The bidirectional sequence is encoded using an independent Mamba stack structure to obtain the forward and reverse encoded sequences.
[0014] Furthermore, step S4 includes: S41: Calculate the gating fusion weights based on the ascending and descending encodings using the gating fusion module; S42: Weighted fusion of forward and reverse encodings based on gating fusion weights to obtain a fused sequence; S43: Concatenate the fused sequence with the interest point embedding and the geographic location embedding, and map them to the interest point prediction space to obtain the prediction output vector.
[0015] Furthermore, the expression for calculating the gating fusion weights is as follows: in, For the first Branch gating fusion weights, It is the Sigmoid activation function. It is a linear function. To constrain linear functions, To enhance the linear function with gated weights, For 1D convolution, For element-wise multiplication, For the first Branching in ascending order encoding For the first Branch reverse encoding, This involves concatenating vectors.
[0016] The above-described one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects: This invention introduces a collaborative bias mechanism based on user similarity to integrate the behavioral patterns of groups with similar access preferences with individual user preferences, which can effectively improve the accuracy and stability of recommendation results. By adopting a bidirectional state-space sequence modeling structure based on Mamba and combining forward and reverse trajectory information, it can more fully capture the long-term temporal dependencies and dynamic interest evolution characteristics in user behavior, thereby improving the model's spatiotemporal modeling ability and recommendation performance.
[0017] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating an interest point recommendation method based on cooperative bias and bidirectional state space modeling provided by the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention. The following embodiments are used to illustrate this invention but cannot be used to limit the scope of this invention.
[0021] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0022] The following is combined Figure 1 This invention describes an interest point recommendation method based on cooperative bias and bidirectional state space modeling.
[0023] like Figure 1 As shown, an interest point recommendation method based on cooperative bias and bidirectional state space modeling includes: S1: Obtain user check-in record text including user, point of interest, and geographical location of point of interest; construct user trajectory sequence based on user check-in record text; divide user trajectory sequence into multiple sub-trajectories with natural day as time window; construct supervised learning samples based on sub-trajectories; and construct initial mapping prediction model based on supervised learning samples. S11: Define the user set, interest set, and category set: in, For user collection, For the first user, For the first One user, For the number of users, For a set of points of interest, As the first point of interest, For the first One point of interest For the number of points of interest, For a set of categories, For the first point of interest category, For the first Interest categories, This represents the number of interest point categories.
[0024] Users include destination prediction in map navigation, travel route planning, local service recommendations, business district customer flow guidance, ride-hailing dispatch, precise advertising, and urban traffic management.
[0025] S12: Obtain the geographical location of each point of interest in the point of interest set, and construct the user check-in record text based on the user set, the point of interest set, the category set, and the geographical location of the point of interest; in, For user check-in record text, For points of interest, , c represents the timestamp of the check-in (usually a specific date and time), and c represents the category of points of interest. , For the geographical location of points of interest, ,user All check-in records can be arranged in ascending order of time, forming its original behavioral sequence.
[0026] User check-in records are comma-separated structured text files. Each line of text represents a user's check-in at a specific point of interest. Each check-in record is represented as a multi-field text group, with each field stored as text characters, specifically including: User u is a unique user identifier stored as a text string, user_id, used to uniquely distinguish different users in the system. Its form is a text encoding sequence composed of Arabic numeral characters, such as the text "349", "198", "521". Each different text encoding corresponds to an independent user entity. A point of interest (POI) p is an identifier and semantic category information of the POI represented by a text string, including a unique identifier POI_id, a category identifier POI_catid, and a category name POI_catname. The unique identifier is a text-encoded string composed of hexadecimal alphanumeric characters, such as the text "4fc7f3dfe4b0896b9f093264". The category identifier is also a text-encoded string composed of hexadecimal characters, such as the text "4f2a23984b9023bd5841ed2c". The category name is a natural language text label describing the functional semantic attributes of the location, such as text category names like "historical site", "coffee shop", "subway station", "office building", and "cinema", used to characterize the functional type of the POI. The geographic location g of the point of interest is spatial coordinate information recorded in text character form, including the latitude field and the longitude field, which are stored in the form of decimal floating-point text numbers. The geographic spatial location of the point of interest is represented by the latitude-longitude coordinate text value pair (latitude, longitude), for example, the text "40.8130989074707,-74.00180053710938"; Sign-in timestamp The timestamp information, recorded as a text string, includes the Coordinated Universal Time (UTC_time) field and the Local Time (local_time) field. Both use standard date and time format text strings, such as the text "2012-12-21 13:29:31+00:00", which is used to mark the precise time when the check-in occurred. The aforementioned user check-in records are persistently stored as comma-separated text value files. The system reads and parses the text file line by line, converting the text content of each field into a numerical representation within the system.
[0027] S13: Construct a user trajectory sequence based on the user check-in record text; in, For users trajectory sequence, For users The first sign-in record, For users The second sign-in record, For users The One sign-in record, The first check-in timestamp, For the first Each check-in timestamp; S14: Divide the user trajectory sequence into multiple sub-trajectories using natural days as the time window; The strategy of dividing user trajectory into several sub-trajectories based on a 24-hour time window, using calendar days as the unit, is used for user... trajectory sequence It is divided into multiple subsequences based on timestamps: in, For the first sub-trajectory, For the first Each sub-track represents a user's check-in sequence within a time window, provided that the timestamps of all check-in records in that sub-sequence fall within the same natural day.
[0028] S15: Constructing supervised learning samples based on sub-trajectories; Before Historical records as samples for supervised learning: in, Given the input sequence, This is the first historical record. For the first historical records, The category of the first historical record. For the first Categories of historical records; S16: Construct a mapping prediction model based on supervised learning samples; Given target time The goal of the initial mapping prediction model is to predict the next point of interest that a user is most likely to visit at that point in time. The next interest recommendation problem can be formalized as learning a mapping function: in, For mapping prediction models, For mapping, The next point of interest to be predicted.
[0029] S2: Construct a user preference matrix based on the historical check-in records of all users; calculate individual preferences and group preferences based on the user preference matrix; calculate collaborative bias based on individual preferences and group preferences. S21: Construct a user preference matrix based on the historical check-in records of all users; The rows of the user preference matrix represent users, and the columns represent points of interest. The mathematical expression is: in, This is a user preference matrix, representing users Visit points of interest Number of times, This is a frequency statistics function.
[0030] S22: Calculate individual preferences and group preferences based on the user preference matrix; S221: Normalize the row vectors corresponding to each user in the user preference matrix to obtain individual preferences; the calculation expression is: in, For individual preferences, For users The row vector; S222: Perform L2 normalization on individual preferences to obtain normalized individual preferences; in, To normalize individual preferences; S223: Calculate the preference similarity between any two users based on normalized individual preferences; in, For users and users similarity, This is the transpose of the matrix.
[0031] S224: For users Select with user Construct a neighbor set from the top K users with the highest preference similarity, and calculate the relationships between users in the neighbor set. The similarity of preferences is normalized to obtain the similarity weight, where K is a preset positive integer; For each user Select the first one with the highest similarity Each user constitutes a neighbor set. Furthermore, a minimum similarity threshold is introduced to filter low-quality neighbors. The expression for calculating the similarity weight is as follows: in, For users and neighboring users Similarity weights, For users and neighboring users similarity, For users and neighboring users Similarity; S225: Calculate group preference based on individual preferences and similarity weights. The calculation expression is as follows: in, For users Group preferences For neighboring users Individual preferences.
[0032] S23: Calculate the collaborative bias based on individual and group preferences; By integrating individual preferences and group preferences, a combined preference is obtained, and its calculation expression is as follows: in, For users Fusion preference, For individual preference weights, Weights for group preferences; The fusion preference is normalized, and the collaborative bias is calculated based on the normalized fusion preference. The calculation expression is as follows: in, For coordinated bias, To prevent numerically unstable smoothing terms, For users Fusion preference for fusion of interest point p. For users Fusion preferences for points of interest fusion preference.
[0033] S3: Construct a feature sequence based on user embedding, point of interest embedding, and geographic location embedding; construct a temporal embedding function, and construct temporal embedding representations from the user's perspective and point of interest perspective based on the temporal embedding function; perform a complex space rotation transformation on the feature sequence with the temporal embedding representation as the phase angle to obtain a complex space feature sequence; perform self-attention encoding on the complex space feature sequence and then perform bidirectional state space modeling to obtain a forward-order encoded sequence and a reverse-order encoded sequence. S31: Obtain User Embedment Interest point embedding and geolocation embedding At each time step Feature sequences are constructed based on user embedding, point of interest embedding, and geographic location embedding; Feature sequences include user-interest interaction features and point of interest-geographic semantic features ; in, This involves concatenating vectors.
[0034] S32: Construct the time embedding function; The time embedding function uses the Time2Vec method to embed timestamps. To perform modeling, given , Given the set of real numbers, the time embedding function is defined as a combination of linear terms and multi-frequency sine terms, and its calculation expression is: in, For the linear term weight parameters, For the linear term phase parameter vector, This is a vector of frequency parameters for a multi-frequency sine wave. This is a vector of phase parameters for multi-frequency sinusoidal terms; and Used to depict the overall linear trend of time changing with input. and Used to model periodic variations in time series.
[0035] S33: Construct temporal embedding representations of user perspective and point-of-interest perspective based on the temporal embedding function; Time embedding representations include hour-level time embedding representations and week-level time embedding representations; From the user's perspective, the hourly time embedding is represented as follows: in, An hourly user-perspective time embedding representation. Hourly timestamps This represents the hourly user-perspective linear term frequency parameter vector. This is a linear phase parameter vector for the hourly user perspective. This is a frequency parameter vector for multi-frequency sinusoidal terms from the user's perspective at the hourly level. This is a vector of phase parameters for multi-frequency sinusoidal terms from the user's hourly perspective. The user's perspective weekday-level time embedding is represented as follows: in, For weekday-based user-perspective time embedding representation. A week-level timestamp, This is a vector of linear term frequency parameters from the user's perspective on a weekly basis. For the week-based user-perspective linear phase parameter vector, This is a frequency parameter vector for multi-frequency sinusoidal terms from a user's perspective, on a weekly basis. This is a weekly user-perspective multi-frequency sine wave phase parameter vector; For a point-of-interest perspective, the hourly time embedding representation of the point-of-interest perspective is as follows: in, Time embedding representation of point of interest at the hour level. Hourly timestamps This is a vector of linear terms representing hourly points of interest. This is the hourly-level linear phase parameter vector for the viewpoint of interest. This is a vector of frequency parameters for the multi-frequency sinusoidal terms from the perspective of hourly points of interest. This is a vector of phase parameters for the multi-frequency sinusoidal terms of point-of-interest views at the hourly level. The point-of-interest perspective week-level time embedding is represented as follows: in, A time-embedded representation of points of interest at the week level. A week-level timestamp, This is a vector of frequency parameters for linear terms representing points of interest on a weekly basis. For the phase parameter vector of the linear term of the weekly interest point view, This is a vector of frequency parameters for the multi-frequency sinusoidal terms from the perspective of weekly interest points. For the phase parameter vector of the multi-frequency sinusoidal terms of weekly interest points; S34: Perform a complex space rotation transformation on the feature sequence using the time embedding representation as the phase angle to obtain the complex space feature sequence. The calculation expression is as follows: in, For complex space feature sequences, For characteristic sequences, Phase angle; The user interest point interaction feature sequence is rotated in complex space to obtain the user interest point interaction feature sequence in complex space. The geographic semantic interaction feature sequence of points of interest is rotated in complex space to obtain the geographic semantic interaction feature sequence of points of interest in complex space.
[0036] S35: After performing self-attention encoding on the complex space feature sequence, bidirectional state space modeling is performed to obtain the forward-order encoded sequence and the reverse-order encoded sequence; S351: The hour-level and week-level time embedding representations of feature sequences in the complex space are fused by a weighted fusion mechanism to obtain complex space fused features; For user interest interaction features, the calculation expression is: in, for Moment-based user-interest point interaction complex spatial fusion features; Points of interest (POIs) - geographic semantic features, calculated as follows: in, for Moment-point of interest - geographic semantic complex spatial fusion features.
[0037] S352: Calculate the complex space fusion features for all time steps to obtain the complex space fusion feature sequence; By serializing all time steps, a complex spatial fusion feature sequence of user-interest interactions is obtained. Feature sequences fused with point of interest-geographic semantic complex space ,in, This represents the total length of the sequence.
[0038] S353: Input the user-point-of-interest (POI) interaction feature sequence and the POI-geographic semantic feature sequence into a self-attention-based encoder to obtain local contextual dependencies and acquire the encoded sequence; the calculation expression is: in, For encoding sequence, For encoders with a self-attention mechanism, For user-interest interaction branches, For points of interest - geographic semantics branch.
[0039] S354: The encoded sequence is modeled bidirectionally, and the representations of the two directions are concatenated on the feature dimension and mapped back to the original dimension. The bidirectional sequence is obtained through residual connection and normalization. For the encoded sequence, the bidirectional modeling process is defined as: in, To model historical dependencies to the present, To encode reverse context information from the future to the present, This is a sequence flipping operation along the time dimension. This is a unidirectional state-space temporal modeling module. The representations of the two directions are concatenated along the feature dimension and mapped back to the original dimension. Through residual connection and normalization, a bidirectional sequence is obtained, and the computational expression is: in, It is a bidirectional sequence. ( (For layer normalization) It is a linear mapping; in, For the first The bidirectional Mamba sequence modeling module is used to perform joint state-space modeling of sequences from both forward and reverse directions to capture bidirectional temporal dependencies in the sequence.
[0040] S355: Encodes bidirectional sequences using an independent Mamba stack structure to obtain forward-order and reverse-order encoded sequences; The calculation expression for the ascending sequence encoding is: in, It is an ascending sequence encoding. For the first The branch is a deep sequence encoding structure composed of multiple stacked Mamba modules; it is used for further feature extraction and temporal dependency modeling of bidirectional sequences.
[0041] The reverse encoding is: in, It is a reverse encoding.
[0042] S4: A gating fusion mechanism is used to dynamically fuse the forward and reverse encoded sequences to obtain a fused sequence; the fused sequence is then concatenated with the interest point embedding and the geographic location embedding and mapped to the interest point prediction space to obtain the prediction output vector; S41: The gating fusion module calculates the gating fusion weight based on the forward and reverse encoded sequences. The calculation expression is as follows: in, For gating fusion weights, It is the Sigmoid activation function. It is a linear function. To constrain linear functions, To enhance the linear function with gated weights, For 1D convolution, This is element-wise multiplication.
[0043] S42: Weighted fusion of the forward and reverse encoded sequences based on the gated fusion weights to obtain the fused sequence. The calculation expression is as follows: in, This is a fusion sequence.
[0044] S43: Concatenate the fused sequence with the corresponding interest point embedding and geographic location embedding, and map it to the interest point prediction space to obtain the prediction output vector. The calculation expression is as follows: in, For the first Branches The predicted output vector (logits) for all candidate POIs at each time step represents the user's preference score for visiting each POI at the current time. Each element in the vector corresponds to the predicted logits value of a POI; the larger the value, the higher the probability that the model predicts the user will visit that POI. For the first Branches The fusion sequence of moments For embedding static points of interest, For static geolocation embedding, For the first Branch learnable parameters Learnable parameters for user-interest interaction branches. Learnable parameters for the point-of-interest-geographic semantic branch. For bias vectors, For the bias vector of the user-interest interaction branch, For the point of interest-geographic semantic branch bias vector, User-interest interaction branches The predicted output vector for all candidate POIs at time step 1. For points of interest - geographic semantic branch The predicted output vector for all candidate POIs at time step 1.
[0045] Dual-branch output fusion: in, for Predict the output vector at each time step. This represents the branch weight coefficient.
[0046] S5: Correct the predicted output vector using collaborative bias to obtain the final predicted vector. The calculation expression is as follows: in, For the final predicted vector, This is the global scaling factor, used to adjust the intensity of the influence of the cooperative signal on the prediction results.
[0047] S6: Calculate the cross-entropy loss based on the final prediction vector, and perform joint optimization of the initial mapping prediction model using the backpropagation algorithm based on the cross-entropy loss. Use the interest point with the highest probability output by the optimized mapping prediction model as the prediction result of the next interest point. To improve the prediction accuracy and generalization performance of the model, the model parameters can be iteratively updated through loss optimization and backpropagation mechanisms.
[0048] S61: Calculate the cross-entropy loss based on the final predicted vector. The calculation expression is as follows: in, For activation function, for The predicted probability vector at time step, For cross-entropy loss, for The true probability at any given moment The total length of the sequence. This represents the probability value of the true POI predicted by the model.
[0049] S62: Using the backpropagation algorithm, the partial derivatives of the loss function with respect to each network parameter are calculated according to the chain rule: in, This is the prediction error term for the current time step. This is a One-Hot encoding representation of the real label.
[0050] The gradient is: The gradient of the cooperative bias term is: The gradient of the bi-branch prediction layer is: , S63: Update the weights and bias parameters of the user-point of interest interaction branch and the point of interest-geographic semantic branch; According to the chain rule, the gradient of the weights of the user-interest interaction branches is: in, User-interest interaction branches The fusion sequence of moments.
[0051] The gradient of the user-interest point interaction branch weight bias is: Error propagation into the hidden layer is as follows: The gradient of the point of interest-geographic semantic branch weights is: in, For points of interest - geographic semantic branch The fusion sequence of moments.
[0052] The bias gradient of the user-interest interaction branch is: The error propagates further into the hidden layer: The gradient continues to propagate back to the gated fusion module, the BiMamba bidirectional state space module, the Transformer encoder, the Time2Vec temporal embedding module, and the user embedding and interest point embedding matrix, thereby achieving joint optimization of the entire network parameters.
[0053] S64: Update model parameters based on the Adam optimizer; Let the model be in the first place. The parameters in the next iteration are Its gradient is expressed as ,in, For parameters Find the gradient; Calculate the first moment estimate of the gradient: in, For the first The first-order momentum of the next iteration For the first The first-order momentum of the next iteration It is the first-order momentum decay coefficient.
[0054] Calculate the second moment estimate of the gradient: in, For the first The second-order momentum of the next iteration. It is the second-order momentum decay coefficient. No. The second-order momentum of the next iteration.
[0055] Deviation correction: , in, This is the corrected unbiased first-order momentum. This is the corrected unbiased second-order momentum; Parameter update: in, For the model in the first Parameters in the next iteration For learning rate, The learning rate is dynamically adjusted by combining the cosine annealing learning rate scheduling strategy.
[0056] During training, the training data is divided into multiple batches and input into the model, and the following processes are repeatedly executed: forward propagation, loss calculation, gradient backpropagation, and parameter update; in each training round, the error term... Continuously guide the model parameters to optimize in the direction of reducing cross-entropy loss, and coordinate bias terms. As prior information on group behavior, the distribution of long-tail interest points and data sparsity scenarios is corrected. During training, metrics such as ACC@K and MRR are monitored on the validation set. When the validation performance no longer improves or the preset stopping condition is met, training is terminated, and the current model parameters are used as the final convergence result. Finally, the interest point category with the highest probability output by the converged model is used as the prediction result of the next interest point for the target user, so as to achieve accurate classification and recommendation of the target to be analyzed.
[0057] This invention introduces a collaborative bias mechanism based on user similarity to fuse the behavioral patterns of groups with similar access preferences with individual user preferences, effectively improving the accuracy and stability of recommendation results. Employing a Mamba-based bidirectional state-space sequence modeling structure, and combining forward and reverse trajectory information, it can more fully capture long-range temporal dependencies and dynamic interest evolution characteristics in user behavior, thereby enhancing the model's spatiotemporal modeling capabilities and recommendation performance.
[0058] To verify the effectiveness of the present invention, it was evaluated on two publicly available real-world datasets: Foursquare-NYC and Gowalla-CA.
[0059] This invention uses ACC@5 (top 5 accuracy), ACC@10 (top 10 accuracy), ACC@20 (top 20 accuracy), and MRR (mean reciprocal ranking) as evaluation metrics for the next interest point recommendation task to assess the performance of the proposed method. To ensure fair comparison between methods, the same data partitioning is used. The experimental platform is based on the Ubuntu 22.04.2 LTS operating system, using Python 3.9.21 as the programming language, PyTorch 2.8.0 as the deep learning framework, and a Quadro RTX8000 GPU. Statistical information for the two datasets is shown in Table 1. Table 1. Statistical information for the Foursquare-NYC and Gowalla-CA datasets.
[0060] Ten baseline models were selected for comparative experiments: Traditional collaborative filtering and Markov chain-based methods such as FPMC and PRME, which mainly combine long-term user preferences with short-term sequence transition relationships for modeling; time-series modeling methods based on recurrent neural networks such as LSTM, ST-RNN, STGN, and PLSPL, which learn the dynamic spatiotemporal dependencies and interest evolution patterns in user trajectories through recurrent structures; attention-based methods such as STAN and ROTAN, which utilize self-attention mechanisms to enhance the modeling ability of key spatiotemporal behavioral relationships; methods based on hierarchical time structures and multi-task learning such as MTNet, which focuses on fine-grained modeling of user preferences at different time scales; and methods based on graph structures and high-order relationship modeling such as HGDRec, which model the global high-order spatiotemporal association between users and points of interest through hypergraph structures. The results show that the proposed method outperforms other baseline models on all datasets. Specific experimental results are shown in Table 2. Table 2 Experimental Results
[0061] In addition, component analysis experiments were conducted to evaluate the contribution of each component in this invention. Two variants were designed: with / o colla-bias (only the Mamba module is retained) and with / o Mamba (only the co-bias module is retained), and compared with the complete model. Evaluation metrics included ACC@5, ACC@10, ACC@20 and MRR. The results are shown in Table 3.
[0062] Table 3 Component Analysis Experiment Results
[0063] This invention provides an interest point recommendation method based on collaborative bias and bidirectional state space modeling, which realizes the joint modeling of user historical behavior sequences, group collaborative preference information and spatiotemporal dynamic features, thereby achieving high-precision prediction of the user's next interest point, effectively improving the ability to capture temporal dependencies in long sequence scenarios and the recommendation accuracy and robustness under data sparsity conditions.
[0064] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An interest point recommendation method based on cooperative bias and bidirectional state space modeling, characterized in that, include: S1: Obtain user check-in record text including user, point of interest, and geographical location of point of interest; construct user trajectory sequence based on user check-in record text; divide user trajectory sequence into multiple sub-trajectories with natural day as time window; construct supervised learning samples based on sub-trajectories; and construct initial mapping prediction model based on supervised learning samples. S2: Construct a user preference matrix based on the historical check-in records of all users; calculate individual preferences and group preferences based on the user preference matrix; calculate collaborative bias based on individual preferences and group preferences. S3: Construct a feature sequence based on user embedding, point of interest embedding, and geographic location embedding; construct a temporal embedding function, and construct temporal embedding representations from the user's perspective and point of interest perspective based on the temporal embedding function; perform a complex space rotation transformation on the feature sequence with the temporal embedding representation as the phase angle to obtain a complex space feature sequence; perform self-attention encoding on the complex space feature sequence and then perform bidirectional state space modeling to obtain a forward-order encoded sequence and a reverse-order encoded sequence. S4: A gating fusion mechanism is used to dynamically fuse the forward and reverse encoded sequences to obtain a fused sequence; the fused sequence is then concatenated with the interest point embedding and the geographic location embedding and mapped to the interest point prediction space to obtain the prediction output vector; S5: Correct the predicted output vector through collaborative bias to obtain the final predicted vector; S6: Calculate the cross-entropy loss based on the final prediction vector, and use the backpropagation algorithm to jointly optimize the initial mapping prediction model based on the cross-entropy loss. Use the interest point with the highest probability output by the optimized mapping prediction model as the prediction result of the next interest point.
2. The interest point recommendation method based on cooperative bias and bidirectional state space modeling according to claim 1, characterized in that, In step S2, the rows of the user preference matrix represent users, the columns represent points of interest, and each item in the user preference matrix represents the number of times a user visits a point of interest.
3. The interest point recommendation method based on cooperative bias and bidirectional state space modeling according to claim 1, characterized in that, Step S2 involves calculating individual and group preferences based on the user preference matrix, including: Normalize the row vectors corresponding to each user in the user preference matrix to obtain individual preferences; L2 normalization is performed on individual preferences to obtain normalized individual preferences; Calculate the similarity of preferences between any two users based on normalized individual preferences; For users Select with user Construct a neighbor set from the top K users with the highest preference similarity, and calculate the relationships between users in the neighbor set. The similarity of preferences is normalized to obtain the similarity weight, where K is a preset positive integer; Group preferences are calculated based on individual preferences and similarity weights.
4. The interest point recommendation method based on cooperative bias and bidirectional state space modeling according to claim 1, characterized in that, The calculation of collaborative bias based on individual and group preferences in step S2 includes: By integrating individual and group preferences, a combined preference can be obtained. The fusion preference is normalized, and the collaborative bias is calculated based on the normalized fusion preference.
5. The interest point recommendation method based on cooperative bias and bidirectional state space modeling according to claim 1, characterized in that, The feature sequences include user point-of-interest (POI) interaction feature sequences and POI geographic semantic interaction feature sequences. The complex spatial feature sequences include user-POI interaction complex spatial fusion features and POI-geographic semantic complex spatial fusion features.
6. The interest point recommendation method based on cooperative bias and bidirectional state space modeling according to claim 1, characterized in that, Time embedding representations include hour-level time embedding representations and week-level time embedding representations; Hour-level time embedding representations include hour-level user-perspective time embedding representations and hour-level point-of-interest perspective time embedding representations; The week-level time embedding representation includes the week-level user-perspective time embedding representation and the week-level point-of-interest perspective time embedding representation.
7. The interest point recommendation method based on cooperative bias and bidirectional state space modeling according to claim 1, characterized in that, The expression for calculating the time embedding function is: in, For time embedding functions, For timestamps, For the linear term weight parameters, For the linear term phase parameter vector, This is a vector of frequency parameters for a multi-frequency sine wave. This is the phase parameter vector for the multi-frequency sine wave term.
8. The interest point recommendation method based on cooperative bias and bidirectional state space modeling according to claim 6, characterized in that, After performing self-attention encoding on the feature sequences in the complex space, bidirectional state-space modeling is performed to obtain the forward-order and reverse-order encoded sequences, including: The hourly and weekday-level time embedding representations of complex spatial feature sequences are fused using a weighted fusion mechanism to obtain complex spatial fused features. Calculate the complex space fusion features for all time steps to obtain the complex space fusion feature sequence; The complex space fused feature sequence is input into the encoder based on the self-attention mechanism to extract local contextual dependencies and obtain the encoded sequence; The encoded sequence is modeled bidirectionally, and the representations of the two directions are concatenated on the feature dimension and mapped back to the original dimension. Through residual connection and normalization, a bidirectional sequence is obtained. The bidirectional sequence is encoded using an independent Mamba stack structure to obtain the forward and reverse encoded sequences.
9. The interest point recommendation method based on cooperative bias and bidirectional state space modeling according to claim 1, characterized in that, Step S4 includes: S41: Calculate the gating fusion weights based on the ascending and descending encodings using the gating fusion module; S42: Weighted fusion of forward and reverse encodings based on gating fusion weights to obtain a fused sequence; S43: Concatenate the fused sequence with the interest point embedding and the geographic location embedding, and map them to the interest point prediction space to obtain the prediction output vector.
10. The interest point recommendation method based on cooperative bias and bidirectional state space modeling according to claim 1, characterized in that, The expression for calculating the gating fusion weights is: in, For the first Branch gating fusion weights, It is the Sigmoid activation function. It is a linear function. To constrain linear functions, To enhance the linear function with gated weights, For 1D convolution, For element-wise multiplication, For the first Branching in ascending order encoding For the first Branch reverse encoding, This involves concatenating vectors.
