Structured generation type point of interest recommendation method and system based on large language model
Patent Information
- Application Number
- CN202611032763.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-07-13
AI Technical Summary
[0009]综上所述,目前生成式兴趣点推荐存在表示层结构缺失、训练监督孤立、推理约束不足三大问题
[0064]1.本发明提出了结构化语义元组表达。通过引入专用属性标记符将签到记录重构为显式对齐的线性元组,确立了输入与输出空间的结构同构性,使模型无需通过注意力机制自行推断属性间的语义边界,从而有效缩小了自回归搜索空间,降低了建模复杂度;同时,通过希尔伯特曲线对兴趣点标识符进行空间重映射,使标识符前缀与地理区域形成强关联,在自回归生成过程中实现了候选地理范围的逐位递进式收缩,为模型提供了显式的空间归纳偏置。
Smart Images

Figure CN122527419B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence technology, natural language processing technology, and information recommendation technology, and in particular to a structured generative interest point recommendation method and system based on a large language model. Background Technology
[0002] The Next Point of Interest (POI) recommendation system aims to provide accurate location services based on user preferences and contextual information, inferring users' immediate access intentions by analyzing the transition probability and spatiotemporal correlation in historical check-in sequences.
[0003] To improve recommendation performance, researchers have proposed various deep learning models, including recurrent neural networks (RNNs), graph neural networks (GNNs), and the Transformer architecture based on self-attention. These methods significantly improve prediction accuracy by capturing complex nonlinear trajectory patterns. However, traditional models typically treat Points of Interest (POIs) as isolated atomic identifiers, making it difficult to fully integrate the high-dimensional attributes such as semantic categories and spatial locations inherent within POIs.
[0004] The recent rise of Large Language Models (LLMs) has brought about a modeling shift in POI recommendation, moving from rating re-ranking to sequence generation. LLMs, with their deep semantic understanding and rich world knowledge, can directly predict the identifier of a target POI through end-to-end generative modeling. Existing research, such as LLM4POI, explores encoding trajectory information into natural language descriptions for prediction, while GNPR-SID attempts to construct semantically meaningful identifier IDs through residual quantization. Although these methods demonstrate excellent generalization potential, existing generative frameworks still face significant challenges when dealing with high-precision, heterogeneous spatiotemporal sequences.
[0005] Based on the shortcomings of existing research, generative interest point recommendation based on large language models currently faces the following three main challenges.
[0006] First, the representation layer lacks explicit structural modeling of multi-dimensional attributes. Existing methods rely on unstructured text descriptions or compressed identifiers, implicitly embedding identifiers, categories, and geographic coordinates into the textual context, thus obscuring the physical boundaries between attributes. The model needs to infer semantic boundaries automatically using attention mechanisms, which not only expands the autoregressive search space but also increases the difficulty of modeling multi-attribute relationships. This semantic ambiguity and representation collapse caused by unstructured or compressed representations are particularly prominent in high-precision geographic information processing.
[0007] Second, the training phase lacks cross-attribute logical consistency supervision. Standard cross-entropy loss only performs atomic supervision on identifiers, ignoring their logical binding relationships with attributes such as category and geographic location. This makes the model prone to attribute illusion, meaning that the generated identifiers are semantically inconsistent with subsequent attribute descriptions. Due to the significant long-tail distribution characteristics of POI data, the model struggles to establish robust cross-attribute knowledge associations in the hidden layers when dealing with sparse samples, further exacerbating the risk of logical inconsistency.
[0008] Third, the inference stage lacks constraints on physical spatial feasibility. The generation process of large language models is essentially based on autoregressive sampling of conditional probability, with decisions primarily driven by statistical distributions. While the model can implicitly learn some spatial patterns from training data, it lacks explicit awareness of physical constraints such as upper limits on movement speed and geographical accessibility. This can easily lead to the generation of geographically inaccessible or unreasonably slow paths, making the recommendations semantically plausible but physically infeasible or illogical, severely impacting the practicality and credibility of generative recommendations.
[0009] In summary, current generative interest point recommendation methods suffer from three major problems: lack of representation layer structure, isolated training supervision, and insufficient inference constraints. Therefore, there is an urgent need for a method that can align semantic dimensions through structured representations, enhance logical consistency through cross-attribute supervision, and ensure generative feasibility through physical space constraints. Summary of the Invention
[0010] To address the shortcomings of existing technologies, this invention proposes a structured generative interest point recommendation method and system based on a large language model. By constructing a structured representation that aligns the semantic dimensions of input and output, it achieves deep alignment between the hidden representations within the model and the external physical priors.
[0011] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0012] Firstly, a structured generative interest point recommendation method based on a large language model includes the following steps:
[0013] S1. Construct a structured semantic tuple representation, including: formalizing each point of interest entity into a semantic tuple; introducing a dedicated attribute identifier as a structural boundary signal for a single check-in record that includes the point of interest entity and time, and reconstructing the single check-in record into an explicitly aligned structured sequence.
[0014] Input prompts are constructed based on structured semantic tuple representations and historical check-in sequences;
[0015] S2. Based on structured semantic tuple representation and input prompt words, extract the hidden vectors corresponding to the special attribute identifiers of each target prediction tuple in the hidden state of the last layer of the large language model; construct cross-attribute alignment loss based on geometric distance, and then construct the total loss function.
[0016] S3. In the inference stage, global prefix tree pruning and dynamic spatiotemporal penalty algorithms are integrated to constrain the generation process within the legal entity space and physical reachability domain.
[0017] S4. Input the structured sequence into the large language model, use the total loss function to train the model, and obtain the trained recommendation model.
[0018] S5. Input the historical check-in sequence of the user to be recommended into the trained recommendation model to generate the next point of interest for recommendation.
[0019] Preferably, S1 includes:
[0020] S11. Formalize each point of interest entity p into a semantic tuple containing a unique identifier, category, and geocode:
[0021]
[0022] Wherein, id represents the unique identifier of the point of interest, c represents the semantic category, and g represents the geocode;
[0023] S12, Special attribute identifiers include Where TIME represents the check-in time attribute identifier, POI represents the point of interest attribute identifier, CAT represents the category attribute identifier, and GEO represents the geocoding attribute identifier; for a single check-in record Through linearization operators Map it to a linear sequence:
[0024] ;
[0025] S13. Calculate the one-dimensional distance of all points of interest on the Hilbert curve; sort all points of interest in ascending order of one-dimensional distance, and use the sort index as the new unique identifier.
[0026] Preferably, S2 includes:
[0027] Based on input prompts and structured semantic tuple representations, the hidden state sequence output by the last Transformer block of the large language model is formalized as follows:
[0028]
[0029] in, These represent the hidden vectors of the POI, CAT, and GEO attribute identifier sites in the i-th check-in record, respectively.
[0030] Based on structured semantic tuple representation, the representation vector of each special attribute identifier in the target prediction tuple is captured;
[0031] Based on the geometric alignment criterion of cosine similarity, the alignment loss between identifier anchors and category anchors, and between identifier anchors and geographic anchors, is calculated as the cross-attribute alignment loss. :
[0032]
[0033] The total loss function is defined as a weighted ensemble of the sequence generation loss and the cross-attribute alignment loss:
[0034] ;
[0035] in, This is a balancing coefficient used to control the proportion of cross-attribute alignment loss.
[0036] Preferably, S3 includes:
[0037] Based on the sorted points of interest, a global prefix tree is pre-built using all legal attribute combinations in the database;
[0038] At each step of decoding, path matching is performed in the global prefix tree based on the currently generated partial target sequence to dynamically determine a set of legal successor tokens; any token in the set of legal successor tokens, after being concatenated with the currently generated partial target sequence, is still a prefix of a certain legal path in the global prefix tree;
[0039] The predicted scores of candidate tokens are corrected by setting the predicted scores of candidate tokens that do not belong to the set of valid successor tokens to invalid values.
[0040] The next token is generated based on the corrected predicted score.
[0041] As a preferred option, S3 also includes:
[0042] The dynamic search radius is set based on the user's adaptive movement intensity and the time difference of target prediction;
[0043] For each candidate token in the set of valid successor tokens, evaluate all points of interest under the prefix subtree corresponding to the candidate token branch, and calculate the minimum geographical distance between these points of interest and the user's current location. If the minimum geographical distance is greater than the dynamic search radius, apply a bias penalty to the predicted score of the candidate token to reduce its probability of being selected.
[0044] As a preferred option, in S3:
[0045] Define the dynamic search radius:
[0046] ,
[0047] in, The target predicted time is the time difference between the historical last check-in time and the target predicted time. For adaptive movement intensity;
[0048] Adaptive movement intensity By integrating users' long-term mobile potential It is obtained by weighting with short-term movement states;
[0049] Long-term mobility potential is the maximum instantaneous transfer speed exhibited by the user in the training dataset;
[0050] The short-term movement state is the average transfer speed of adjacent check-in records in the current input sequence.
[0051] As a preferred option, in S3:
[0052] The bias penalty is defined as follows:
[0053] ;
[0054] in, β is the standard deviation of the Top-K candidates in the current Logits, and β is the intervention weight;
[0055] The corrected prediction score is: .
[0056] Secondly, a structured generative interest point recommendation system based on a large language model includes:
[0057] The structured semantic tuple expression module is used to construct structured semantic tuple expressions, including: formalizing each point of interest entity into a semantic tuple; introducing a dedicated attribute identifier as a structural boundary signal for a single check-in record including the point of interest entity and time, reconstructing the single check-in record into an explicitly aligned structured sequence; and constructing input prompt words based on the structured semantic tuple expression and the historical check-in sequence.
[0058] The hidden state semantic alignment module is used to extract the hidden vectors corresponding to the special attribute identifiers of the target prediction tuple in the hidden state of the last layer of the large language model based on the structured semantic tuple representation and input prompt words; and to construct the cross-attribute alignment loss based on geometric distance, and then construct the total loss function.
[0059] The spatial logic constraint decoding component is used to integrate global prefix tree pruning and dynamic spatiotemporal penalty algorithms during the inference phase, constraining the generation process within the legal entity space and physical reachability domain.
[0060] The training module is used to input structured sequences into a large language model, train the model using the total loss function, and obtain a trained recommendation model.
[0061] The recommendation output module is used to input the historical check-in sequence of the user to be recommended into the trained recommendation model and generate the next point of interest for recommendation.
[0062] The structured generative interest point recommendation system based on a large language model is used to implement the structured generative interest point recommendation method and its steps based on a large language model as described in the first aspect.
[0063] Compared with the prior art, the beneficial technical effects of the present invention are as follows:
[0064] 1. This invention proposes a structured semantic tuple representation. By introducing dedicated attribute markers, check-in records are reconstructed into explicitly aligned linear tuples, establishing the structural isomorphism between the input and output spaces. This eliminates the need for the model to infer semantic boundaries between attributes through attention mechanisms, effectively reducing the autoregressive search space and modeling complexity. Simultaneously, spatial remapping of interest point identifiers using Hilbert curves creates a strong association between identifier prefixes and geographic regions. This achieves a progressive shrinkage of candidate geographic ranges during the autoregressive generation process, providing the model with an explicit spatial inductive bias.
[0065] 2. This invention proposes a hidden state semantic alignment mechanism. This mechanism introduces representation layer consistency constraints during the fine-tuning stage, achieving synergy between identifiers and multi-view attributes. This effectively alleviates the problem of insufficient gradient signals caused by data sparsity, suppresses semantic drift during the generation process, and enhances the logical consistency of the model in the hidden representation space.
[0066] 3. This invention implements a spatial logic constraint decoding component. This component, through a combination of topology pruning and spatiotemporal distance bias, constrains the generation process within a legal entity space and physically reachable domain without modifying model parameters, ensuring that the recommendation results are both semantically reasonable and physically feasible.
[0067] 4. There is a close synergistic effect among the three modules of this invention: the structured format established by the structured semantic tuple expression provides accurate attribute anchors (the hidden state positions of independent tokens) for the hidden state semantic alignment mechanism, and also provides the physical basis of the hierarchical prefix tree for spatial logic constraint decoding; the model representation enhanced by the training of the hidden state semantic alignment mechanism makes the constraints of spatial logic constraint decoding more effective; the spatial logic constraint decoding utilizes the structured format of the structured semantic tuple expression for bit-by-bit pruning and dynamic biasing during the inference stage, further leveraging the advantages of structured representation. Attached Figure Description
[0068] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0069] Figure 1 This is a schematic diagram of the method framework of Embodiment 1 of the present invention;
[0070] Figure 2 This is a schematic diagram comparing the spatial distribution of interest point identifiers before and after Hilbert remapping in Embodiment 1 of the present invention;
[0071] Figure 3 This is a flowchart of the generative point of interest recommendation method according to Embodiment 1 of the present invention. Detailed Implementation
[0072] To make the technical means, inventive features, objectives, and effects of the invention readily understandable, the invention is further described below with reference to specific illustrations. However, the invention is not limited to the embodiments described below.
[0073] It should be noted that the structures, proportions, sizes, etc., illustrated in the accompanying drawings of this specification are only used to complement the content disclosed in the specification for those skilled in the art to understand and read, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.
[0074] To address the lack of explicit structural modeling of multi-dimensional attributes in the representation layer, this invention proposes a Structured Semantic Tuple (SST) representation. By introducing dedicated attribute markers, check-in records are reconstructed into explicitly aligned linear tuples, establishing structural isomorphism between the input history and the prediction target, and explicitly defining attribute boundaries to reduce model modeling complexity. To address the lack of cross-attribute logical consistency supervision during the training phase, this invention designs a Hidden-State Semantic Alignment (HSA) mechanism, which applies multi-view... Figure 1 Consistency constraints guide the geometric distance between interest point identifiers and their corresponding attributes in the latent space to tend towards consistency, achieving cross-attribute gradient collaboration. Addressing the lack of physical space feasibility constraints in the inference phase, this invention implements a Spatio-Logical Constrained Decoding (SLCD) component, integrating global prefix tree pruning and dynamic spatiotemporal penalty algorithms. During the sampling phase, bit-by-bit path filtering is performed to ensure that the generated target interest point tuples simultaneously satisfy logical consistency and spatial rationality in terms of entity existence and physical reachability.
[0075] This application proposes a structured generative recommendation framework. This framework restructures the generative modeling process from three dimensions. First, by reconstructing check-in records into explicitly aligned linear tuples through structured semantic tuple representations, the structural isomorphism between the input history and the prediction target is established. Second, a hidden state semantic alignment mechanism is designed, which applies multi-view... Figure 1 Consistency constraints are applied to narrow the geometric distance between identifiers and their corresponding attributes in the latent space. Finally, a spatial logic constraint decoding component is implemented, integrating global prefix tree pruning and a dynamic spatial distance penalty algorithm to perform bit-by-bit path filtering during the sampling phase.
[0076] Example 1:
[0077] like Figure 1 The method for recommending structured generative interest points based on a large language model, as shown, includes the following steps:
[0078] S1. Constructing a structured semantic tuple representation, including: formalizing each point of interest entity as a semantic tuple; introducing a dedicated attribute identifier as a structural boundary signal for a single check-in record including the point of interest entity and time, reconstructing the single check-in record into an explicitly aligned structured sequence; constructing input prompt words based on the structured semantic tuple representation and historical check-in sequences; specifically including:
[0079] S11. To enable the generative model to effectively capture the multidimensional semantic features in the check-in data, each point of interest entity is projected into a structured space. Specifically, each POI entity p is formalized as a semantic tuple containing an identifier, category, and geocode:
[0080]
[0081] Here, id represents the unique identifier of the POI, c represents the semantic category, and g represents the geocoding. To achieve a balance between spatial accuracy and semantic density, this invention maps geographic coordinates to 6-bit region-level Plus Codes, providing robust spatial location priors for the model.
[0082] S12. Introduce dedicated attribute identifiers. This serves as the structural boundary signal for the sequence. Here, TIME represents the check-in time attribute identifier, POI represents the point of interest attribute identifier, CAT represents the category attribute identifier, and GEO represents the geocoding attribute identifier. For a single check-in record... Through linearization operators Map it as:
[0083]
[0084] S13. To incorporate spatially aware inductive bias into the identifier ontology, this embodiment introduces a Hilbert curve to spatially reconstruct the unique identifiers of points of interest (POIs). The order of the Hilbert curve is defined as p=16, dividing the geographic space into a high-precision grid. Latitude and longitude coordinates are normalized to integer grid coordinates through linear mapping, and then the two-dimensional grid coordinates are mapped to a one-dimensional Hilbert distance using the Hilbert transform function. Finally, all POI entities are sorted in ascending order according to this distance, and their sorting index is used as the new unique identifier. .like Figure 2 As shown, the reconstructed ID sequence exhibits a clear color gradient, achieving high alignment between physical spatial location and identifier prefix.
[0085] This invention is the first to apply Hilbert curves to spatial encoding of identifier prefixes in generative recommendation. Leveraging the property that spatial proximity leads to prefix encoding proximity, it establishes a strong association between identifier prefixes and geographic regions, achieving a progressive narrowing of candidate geographic ranges during autoregressive generation. This differs entirely from existing technologies that use Hilbert curves for retrieval acceleration or data anonymization. This invention uses Hilbert curves to imbue ID identifiers with clear spatial hierarchical semantics, enabling the model to possess geographic intuition early in the generation process—a design not achieved in existing generative recommendation methods.
[0086] Based on the aforementioned tuple representation, the user Historical check-in sequence The organization is a structured check-in sequence. Embed it into the instruction template to construct the final input prompt. .
[0087] S2. Based on structured semantic tuple representations and input prompts, extract hidden vectors corresponding to the specific attribute identifiers of each target prediction tuple in the hidden state of the final layer of the large language model; construct cross-attribute alignment loss based on geometric distance, and then construct the total loss function; specifically including:
[0088] To enhance the model's consistent modeling capability at the latent representation layer, this embodiment introduces cross-attribute representation layer constraints during the fine-tuning phase. Given an input sequence of prompt words... ,make This represents the hidden state sequence output by the last Transformer block of the LLM layer. To correspond with the topological structure established by the structured semantic tuple representation, the hidden state sequence is formalized as:
[0089]
[0090] in, These represent the hidden vectors of the POI, CAT, and GEO attribute identifier sites in the i-th check-in record, respectively.
[0091] By using structured semantic tuples to represent defined index positions, prediction tuples can be accurately captured. The representation vectors of each attribute identifier are defined as follows: The core representation vectors of each dimension are defined as follows:
[0092]
[0093] To explicitly incorporate multidimensional semantic constraints into the generation of POI identifiers, a geometric alignment criterion based on cosine similarity is introduced. Cross-attribute alignment loss is also employed. Defined as:
[0094]
[0095] The total loss function is defined as a weighted ensemble of the sequence generation loss and the representation alignment loss:
[0096]
[0097] in, This is a balance coefficient used to control the weight given to the alignment loss. In this embodiment... Set it to 0.1.
[0098] The identifier alignment target and attribute identifier design of the hidden state semantic alignment mechanism differ from previous methods. The innovation of this invention lies in two points: First, it sets the alignment target as the hidden state of the attribute token rather than the specific content token. This constraint method establishes a logical binding between the identifier and the attribute only at the semantic entry point, effectively avoiding the representation collapse risk common in high-precision modeling and preserving the model's ability to distinguish fine-grained POIs as much as possible; second, it sets the attribute token (… <poi> 、 <cat> 、 <geo>These tags are added as independent tokens to the LLM vocabulary, giving them independent semantic anchors in the latent space and providing precise supervision points for subsequent alignment. Existing LLM recommendation methods typically treat such tags as ordinary text, making it impossible to achieve the anchor location and alignment mechanism described in this invention.
[0099] S3. In the inference stage, global prefix tree pruning and dynamic spatiotemporal penalty algorithms are integrated to constrain the generation process within the legal entity space and physical reachability domain.
[0100] To ensure that the generated sequence is logically self-consistent and physically feasible, this embodiment designs a spatial logic constraint decoding component in the inference stage, integrating global prefix tree pruning and dynamic spatiotemporal penalty algorithms.
[0101] First, based on the hierarchical nature of the identifiers after Hilbert remapping in step 1, all legal attribute combinations in the database are utilized. Pre-build global prefix tree In each decoding step, let the prefix of the currently generated sequence be... The system dynamically identifies a set of valid successor tokens through path matching; that is, the token whose current prefix, when concatenated with the current prefix, still represents a valid successor token. The prefix of a valid path in the set. For candidate tokens that do not belong to this set, their predicted Logits scores are forcibly set to... Since the identifier prefix itself implicitly contains the geographic hierarchy, this pruning strategy can effectively narrow the geographic range of candidate POIs in the early stages of decoding, achieving a progressive spatial constraint.
[0102] Simultaneously, a dynamic spatiotemporal penalty mechanism is introduced. A dynamic search radius is defined. ,in The target predicted time is the time difference between the historical last check-in time and the target predicted time. For adaptive movement intensity. By integrating users' long-term mobile potential (Maximum instantaneous transfer velocity in the training set) and short-term movement states The weighted average transfer speed of adjacent check-ins in the current input sequence is used to obtain the token. For each valid candidate token branch, all POIs under the Trie subtree corresponding to that token branch are recursively evaluated, and the minimum geographical distance between these POIs and the user's current location is calculated. ,like Then a nonlinear bias is applied:
[0103]
[0104] in Let be the standard deviation of the Top-K candidates in the current Logits. To intervene in the weighting, This represents a valid candidate token. The final corrected Logits are: ,in, The non-linear bias for candidate tokens. M is the bias penalty vector, formed by the nonlinear biases of multiple candidate tokens. mask The topological mask is used, setting invalid tokens to -∞ and valid tokens to 0. The probability distribution is output via Softmax, and a greedy search is employed to generate the optimal next valid token.
[0105] SLCD is a deep coupling mechanism of prefix tree validity constraints and dynamic spatiotemporal penalty, not static filtering. While prefix tree-based constraint decoding is indeed an existing algorithm, this invention has two innovations: First, it is the first to use prefix trees for validity constraint checks on POI identifiers, ensuring that each generated token prefix corresponds to a real POI entity path—something not considered in existing POI recommendation methods. Second, it deeply couples prefix trees with a dynamic spatiotemporal penalty mechanism. The prefix tree prunes illegal paths to reduce the search space, while the dynamic spatiotemporal penalty applies an adaptive bias coupled to model confidence to legal but physically unreachable branches. Together, they achieve efficient and physically feasible decoding. Existing methods only use it for static Trie pruning and do not dynamically couple spatiotemporal feasibility assessment with Trie pruning.
[0106] S4. Input the structured sequence constructed in S1 into the large language model, and use the hidden state semantic alignment mechanism in S2 to optimize the model training to obtain the trained recommendation model.
[0107] S5. Input the historical check-in sequence of the user to be recommended into the trained recommendation model, and use the spatial logic constraint decoding component of S3 to perform reasoning to generate the next point of interest for recommendation.
[0108] This example uses three real-world check-in datasets: Foursquare-New York, Foursquare-Tokyo, and Gowalla-California. Following preprocessing guidelines, POIs with fewer than 10 interactions and users with fewer than 10 check-in records were removed. Check-in records were chronologically divided into 80% training, 10% validation, and 10% test sets. Statistical information for the datasets is shown in Table 1.
[0109] Table 1: Statistical information of the three benchmark datasets
[0110]
[0111] The recommendation model uses Llama-2-7b-longlora-32k as the base model and leverages the LoRA strategy for efficient parameter fine-tuning. The LoRA rank R is set to 16, and the dropout rate is set to 0.05. During the fine-tuning phase, each dataset is trained for 3 epochs with a constant learning rate. It is combined with 100 steps of linear preheating.
[0112] This embodiment uses Top-1 accuracy (Acc@1) as the core performance indicator, and its calculation formula is as follows:
[0113]
[0114] in, This represents the total number of test samples. Indicates the first The true interest points of each sample This represents the points of interest predicted by the model. It is an indicator function that takes the value 1 when the prediction is correct and 0 otherwise. A higher value indicates better recommendation performance from the model. Table 2 shows the performance comparison of this invention with several baseline methods on three benchmark datasets.
[0115] Table 2: Performance comparison of different models on three datasets (Acc@1)
[0116]
[0117] As shown in Table 2, this invention significantly outperforms existing state-of-the-art methods in all benchmark tests. Specifically, on the New York dataset, this invention achieves a relative improvement of 36.60% compared to the traditional state-of-the-art method ROTAN; on the Tokyo dataset, it achieves a relative improvement of 21.76% compared to STHGCN; and on the California dataset, it achieves a relative improvement of 21.18% compared to GNPR-SID. Compared to the state-of-the-art large language model-based method GNPR-SID, this invention significantly outperforms existing state-of-the-art methods on the New York, Tokyo, and California datasets. The indicators achieved significant improvements of 17.28%, 17.30%, and 21.17%, respectively.
[0118] Table 3 shows the performance of the present invention and its ablation variants on three datasets. performance.
[0119] Table 3: Ablation study results of this invention on three datasets (Acc@1)
[0120]
[0121] As shown in Table 3, the complete model achieves optimal performance in most scenarios, validating the effectiveness of each core component. Removing the Hidden State Alignment (HSA) mechanism causes a performance degradation across all datasets, demonstrating the crucial role of representation layer consistency constraints in enhancing identifier discrimination performance. Removing the Spatial Logical Constraint Decoding (SLCD) component leads to performance degradation in high-density urban datasets such as New York and Tokyo, confirming the necessity of external physical priors in calibrating the generation path.
[0122] Example 2:
[0123] A structured generative interest point recommendation system based on a large language model includes:
[0124] The structured semantic tuple expression module is used to construct structured semantic tuple expressions, including: formalizing each point of interest entity into a semantic tuple; introducing a dedicated attribute identifier as a structural boundary signal for a single check-in record including the point of interest entity and time, reconstructing the single check-in record into an explicitly aligned structured sequence; and constructing input prompt words based on the structured semantic tuple expression and the historical check-in sequence.
[0125] The hidden state semantic alignment module is used to extract the hidden vectors corresponding to the special attribute identifiers of the target prediction tuple in the hidden state of the last layer of the large language model based on the structured semantic tuple representation and input prompt words; and to construct the cross-attribute alignment loss based on geometric distance, and then construct the total loss function.
[0126] The spatial logic constraint decoding component is used to integrate global prefix tree pruning and dynamic spatiotemporal penalty algorithms during the inference phase, constraining the generation process within the legal entity space and physical reachability domain.
[0127] The training module is used to input structured sequences into a large language model, train the model using the total loss function, and obtain a trained recommendation model.
[0128] The recommendation output module is used to input the historical check-in sequence of the user to be recommended into the trained recommendation model and generate the next point of interest to be recommended.
[0129] Ablation experiments demonstrate that the complete model is optimal on all datasets, and removing any module leads to performance degradation. Removing HSA causes a comprehensive performance decline across all three datasets, while removing SLCD results in a performance drop in high-density cities. This proves that the three modules are interdependent and complementary, forming a closed-loop enhancement framework from internal gradient collaboration to external physical space constraints, producing an overall technical effect that surpasses the sum of individual modules.
[0130] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments, including components, without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.< / geo> < / cat> < / poi>
Claims
1. A structured generative interest point recommendation method based on a large language model, characterized in that, Includes the following steps: S1. Construct a structured semantic tuple representation, including: formalizing each point of interest entity into a semantic tuple; introducing a dedicated attribute identifier as a structural boundary signal for a single check-in record that includes the point of interest entity and time, and reconstructing the single check-in record into an explicitly aligned structured sequence. Input prompts are constructed based on structured semantic tuple representations and historical check-in sequences; S2. Based on structured semantic tuple representation and input prompt words, extract the hidden vectors corresponding to the special attribute identifiers of each target prediction tuple in the hidden state of the last layer of the large language model; construct cross-attribute alignment loss based on geometric distance, and then construct the total loss function. S3. In the inference stage, global prefix tree pruning and dynamic spatiotemporal penalty algorithms are integrated to constrain the generation process within the legal entity space and physical reachability domain. S4. Input the structured sequence into the large language model, use the total loss function to train the model, and obtain the trained recommendation model. S5. Input the historical check-in sequence of the user to be recommended into the trained recommendation model to generate the next point of interest for recommendation.
2. The structured generative interest point recommendation method based on a large language model according to claim 1, characterized in that, S1 includes: S11. Formalize each point of interest entity p into a semantic tuple containing a unique identifier, category, and geocode: Wherein, id represents the unique identifier of the point of interest, c represents the semantic category, and g represents the geocode; S12, Special attribute identifiers include Where TIME represents the check-in time attribute identifier, POI represents the point of interest attribute identifier, CAT represents the category attribute identifier, and GEO represents the geocoding attribute identifier; for a single check-in record Through linearization operators Map it to a linear sequence: ; S13. Calculate the one-dimensional distance of all points of interest on the Hilbert curve; sort all points of interest in ascending order of one-dimensional distance, and use the sort index as the new unique identifier.
3. The structured generative interest point recommendation method based on a large language model according to claim 1, characterized in that, S2 include: Based on input prompts and structured semantic tuple representations, the hidden state sequence output by the last Transformer block of the large language model is formalized as follows: in, These represent the hidden vectors of the POI, CAT, and GEO attribute identifier sites in the i-th check-in record, respectively. Based on structured semantic tuple representation, the representation vector of each special attribute identifier in the target prediction tuple is captured; Based on the geometric alignment criterion of cosine similarity, the alignment loss between identifier anchors and category anchors, and between identifier anchors and geographic anchors, is calculated as the cross-attribute alignment loss. : in, , , The total loss function is defined as a weighted ensemble of the sequence generation loss and the cross-attribute alignment loss: ; in, This is a balancing coefficient used to control the proportion of cross-attribute alignment loss.
4. The structured generative interest point recommendation method based on a large language model according to claim 1, characterized in that, S3 includes: Based on the sorted points of interest, a global prefix tree is pre-built using all legal attribute combinations in the database; At each step of decoding, path matching is performed in the global prefix tree based on the currently generated partial target sequence to dynamically determine a set of legal successor tokens; any token in the set of legal successor tokens, after being concatenated with the currently generated partial target sequence, is still a prefix of a certain legal path in the global prefix tree; The predicted scores of candidate tokens are corrected by setting the predicted scores of candidate tokens that do not belong to the set of valid successor tokens to invalid values. The next token is generated based on the corrected predicted score.
5. The structured generative interest point recommendation method based on a large language model according to claim 4, characterized in that, S3 also includes: The dynamic search radius is set based on the user's adaptive movement intensity and the time difference of target prediction; For each candidate token in the set of valid successor tokens, evaluate all points of interest under the prefix subtree corresponding to the candidate token branch, and calculate the minimum geographical distance between these points of interest and the user's current location. If the minimum geographical distance is greater than the dynamic search radius, apply a bias penalty to the predicted score of the candidate token to reduce its probability of being selected.
6. The structured generative interest point recommendation method based on a large language model according to claim 5, characterized in that, In S3: Define the dynamic search radius: , in, The target predicted time is the time difference between the historical last check-in time and the target predicted time. For adaptive movement intensity; Adaptive movement intensity By integrating users' long-term mobile potential It is obtained by weighting with short-term movement states; Long-term mobility potential is the maximum instantaneous transfer speed exhibited by the user in the training dataset; The short-term movement state is the average transfer speed of adjacent check-in records in the current input sequence.
7. The structured generative interest point recommendation method based on a large language model according to claim 5, characterized in that, In S3: The bias penalty is defined as follows: ; in, Indicates a candidate token. β is the standard deviation of the Top-K candidates in the current Logits, and β is the intervention weight; The corrected prediction score is: ;in, The non-linear bias for candidate tokens. The bias penalty vector is formed by the nonlinear bias of multiple candidate tokens.
8. A structured generative interest point recommendation system based on a large language model, characterized in that, include: The structured semantic tuple expression module is used to construct structured semantic tuple expressions, including: formalizing each point of interest entity into a semantic tuple; introducing a dedicated attribute identifier as a structural boundary signal for a single check-in record including the point of interest entity and time, reconstructing the single check-in record into an explicitly aligned structured sequence; and constructing input prompt words based on the structured semantic tuple expression and the historical check-in sequence. The hidden state semantic alignment module is used to extract the hidden vectors corresponding to the special attribute identifiers of the target prediction tuple in the hidden state of the last layer of the large language model based on the structured semantic tuple representation and input prompt words; and to construct the cross-attribute alignment loss based on geometric distance, and then construct the total loss function. The spatial logic constraint decoding component is used to integrate global prefix tree pruning and dynamic spatiotemporal penalty algorithms during the inference phase, constraining the generation process within the legal entity space and physical reachability domain. The training module is used to input structured sequences into a large language model, train the model using the total loss function, and obtain a trained recommendation model. The recommendation output module is used to input the historical check-in sequence of the user to be recommended into the trained recommendation model and generate the next point of interest for recommendation. The structured generative interest point recommendation system based on a large language model is used to implement the structured generative interest point recommendation method and its steps based on a large language model as described in claim 1.
Citation Information
Patent Citations
Method and system for predicting next interest point of user based on large language model, terminal equipment and storage medium
CN120892584A
Generation-based interest point recommendation method and device, storage medium and terminal
CN120994915A