A relationship-aware enhanced generative recommendation method and system
Patent Information
- Application Number
- CN202610543592.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-23
- Publication Date
- 2026-08-21
AI Technical Summary
[0005]本发明的目的是提供一种关系感知增强的生成式推荐方法及系统,旨在解决现有推荐系统在捕捉用户复杂意图演变及物品深层逻辑关系方面面临的一系列关键技术问题
Smart Images

Figure CN122616705A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a data augmentation and generative recommendation method and system with relationship-aware enhancement, belonging to the technical fields of deep learning and recommendation systems. Background Technology
[0002] In the field of recommender systems, capturing user intent is one of the core challenges. Traditional relationship-based recommender methods typically utilize knowledge graphs (KGs) to capture dependencies between items. However, these methods are often limited by shallow statistical patterns or predefined relationship templates, ignoring the central role of users in establishing these relationships and lacking the ability to mine deep logical dependencies. On the other hand, generative recommender methods based on Large Language Models (LLMs) that have emerged in recent years, while utilizing the reasoning capabilities of LLMs, currently rely primarily on static item semantics or collaborative signals. They often treat recommending as a simple sequence generation problem, failing to effectively capture the dynamic evolution of user intent driven by internal logical reasoning—that is, why users move from historical interactions to the next target item. Existing methods often struggle to simultaneously align structured and semantic information when generating item identifiers (IDs), resulting in insufficient accuracy and interpretability of recommendations when faced with complex user decision-making processes.
[0003] Traditional relationship-based recommendation methods, while utilizing knowledge graphs to capture item dependencies, suffer from significant limitations in depth. These methods are often confined to shallow statistical co-occurrence patterns or predefined fixed templates, neglecting the deep logical connections established by users during interactions and based on specific scenarios. This not only makes it difficult for the model to understand the true motivations behind user behavior but also results in recommendations lacking sufficient relevance and interpretability. On the other hand, existing generative recommendation methods, especially those based on LLM, while leveraging their reasoning capabilities, largely rely on static item semantics or collaborative signals, failing to effectively capture the dynamic evolution of user intent driven by internal logical reasoning.
[0004] Therefore, there is an urgent need for a new method that can deeply explore the potential relationships between items from the user's perspective and integrate this logical reasoning ability into the generative recommendation process in order to more accurately capture the evolution of user intent. Summary of the Invention
[0005] The purpose of this invention is to provide a relation-aware enhanced generative recommendation method and system, aiming to solve a series of key technical problems faced by existing recommendation systems in capturing the complex evolution of user intent and the deep logical relationships between items. By mining potential relationships from the user's perspective and introducing explicit reasoning and prediction tasks, the accuracy and logicality of recommendations are improved.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A relation-aware enhanced generative recommendation method includes the following steps:
[0008] Step 1, Enhanced Relationships Based on User Intent: Using a large language model as a generator, we can mine the deep potential relationships between items that are bridged by user intent, and transform unstructured descriptions into structured tags to build an enhanced item knowledge graph.
[0009] Step 2, Structure-Semantic Alignment Representation Learning: Construct a multi-relationship item graph using the enhanced item knowledge graph built in Step 1, encode topological structure information using a graph neural network, and align the structured embedding with the semantic embedding through a feature alignment mechanism to generate the item's structure-semantic identifier;
[0010] Step 3, Next Relationship Prediction Enhanced Sequence Recommendation: The structural semantic discrete identifiers generated in Step 2 are used as prediction targets and introduced into the next relationship prediction task. The model is fine-tuned using multi-task supervision, and logical relationships are explicitly predicted based on user historical interactions to guide the generation of target items.
[0011] Furthermore, step 1 specifically includes:
[0012] Step 11: For frequently co-purchased item pairs in historical interactions, input the item's static attributes and user comments into the large language model to generate a text description explaining the relationship between the two.
[0013] Step 12: Use a large language model to encode the text description into a semantic vector;
[0014] Step 13: Apply the K-means clustering algorithm to process the semantic vector set to obtain several cluster centers, and define the cluster centers as a set of potential relations;
[0015] Step 14: For each item pair, assign it to the relation label represented by the nearest cluster center as edge information of the enhanced item knowledge graph.
[0016] Furthermore, step 2 specifically includes:
[0017] Step 21: Construct a multi-relationship item graph that integrates explicit attributes and latent intentions, and initialize the node representations in the graph using text semantic embeddings generated by a large language model encoding.
[0018] Step 22: Use a relational graph convolutional network as a structural encoder to capture the topological dependencies of items in the graph, and introduce a contrastive learning mechanism to align the structural feature space with the semantic feature space.
[0019] Step 23: Generate an item representation that combines structural and semantic information through joint optimization.
[0020] Furthermore, in the structure-semantic alignment representation learning,
[0021] The multi-relationship item graph includes explicit attribute relationships defined in the dataset and latent relationships mined out.
[0022] The node representation in the initialization graph is accomplished by embedding and mapping text semantics into the structural feature space through a linear projection layer;
[0023] The structural encoding updates the structural representation of the current node by aggregating neighbor node information under different relationships;
[0024] The contrastive learning mechanism treats the structural and semantic embeddings of the same item as positive sample pairs and the embeddings of other items as negative sample pairs, aligning the topological structure and semantic space by maximizing the mutual information between positive sample pairs.
[0025] Furthermore, the joint optimization adopts a total optimization objective function. ,in To calculate the reconstruction loss, the Dismult scoring function is used. To compare learning loss, This is the balance coefficient.
[0026] Furthermore, the contrastive learning loss function in the contrastive learning mechanism is:
[0027]
[0028] Where B represents the training batch. For the structural embedding of item v, For the semantic embedding of item v, For similarity function, This refers to the temperature parameter.
[0029] Furthermore, step 3 specifically includes:
[0030] Step 31: Use the RQ-Kmeans residual vector quantization method to quantize the aligned item embeddings into structural semantic discrete identifiers and add them to the vocabulary of the model to be trained.
[0031] Step 32: Define the next relationship as the logical reasoning path connecting the user's historical sequence and the target item, and use a large language model to analyze it from the global and local levels during the training phase to generate a supervision label for the relationship;
[0032] Step 33: Train the recommendation base model using a two-stage multi-task fine-tuning strategy.
[0033] Furthermore, the multi-task supervised fine-tuning strategy employs a two-stage training process:
[0034] The first phase is the fine-tuning of relation-aware instructions, including the index-language alignment task, the item relation analysis task, and the next relation prediction task;
[0035] The second stage is the item sequence prediction task, where the model is trained to generate the identifier of the next item based on the historical sequence, and the relational reasoning ability learned in the first stage is used as an implicit inductive bias.
[0036] Furthermore, the tasks of the first phase include:
[0037] The index-language alignment task involves training a model to generate corresponding textual attribute descriptions of items based on discrete identifiers.
[0038] The task of item relationship analysis involves training a model to generate text explaining the logical relationship between co-purchased item pairs using their identifiers.
[0039] The next relation prediction task involves training a model to predict the ground truth label of the next relation based on the user's historical interaction sequence.
[0040] A generative recommender system, comprising:
[0041] The relationship enhancement module is used to leverage a large language model as a generator to uncover deep potential relationships between items bridged by user intent, and to transform unstructured descriptions into structured tags.
[0042] The representation learning module is used to construct a multi-relationship item graph, encode topological information using a relation graph convolutional network, and align structured embeddings with semantic embeddings through contrastive learning to generate discrete structural and semantic identifiers for items.
[0043] The recommendation module is used to introduce the next relationship prediction task in the recommendation stage. It uses multi-task supervision to fine-tune the training model, explicitly predicts logical relationships based on the user's historical interactions, and guides the generation of target items.
[0044] Beneficial effects: Compared with the prior art, the present invention has the following beneficial effects:
[0045] Traditional recommendation methods are often limited to shallow statistical patterns or predefined rigid relationship templates, neglecting the dominant role of users in constructing item associations and failing to uncover deep logical dependencies between items. While existing generative recommendation systems utilize LLM, they mostly rely on static item semantics or collaborative signals, failing to effectively capture the dynamic evolution of user intent driven by internal reasoning logic, resulting in insufficient accuracy and interpretability of recommendations. This invention, through a user intent-aware relationship enhancement strategy, leverages LLM to deeply mine potential logical reasoning relationships between items from the user's perspective, overcoming the limitation of traditional methods that can only identify explicit attribute associations and greatly enriching the semantic information of the item graph. Simultaneously, the structure-semantic alignment module proposed in this invention tightly integrates the topological structure of the graph with textual semantics through a contrastive learning mechanism, enabling subsequently generated item identifiers to possess both structural dependencies and semantic generalization capabilities, significantly alleviating the cold-start problem caused by data sparsity. More importantly, this invention innovatively introduces a next-relationship prediction task as a strong inductive bias, enabling the model to no longer merely fit statistical probabilities but to explicitly learn the logical reasoning paths connecting historical behavior and future goals. This mechanism can accurately capture the dynamic evolution of user intent and guide the model to generate target items that meet logical expectations, thereby achieving a significant improvement in performance and robustness in complex and ever-changing sequence recommendation scenarios. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the overall framework of the method of the present invention. Detailed Implementation
[0047] The invention will now be further explained with reference to the accompanying drawings.
[0048] Example 1
[0049] This embodiment provides a relation-aware enhanced generative recommendation method.
[0050] Figure 1 This paper presents the overall framework of the relation-aware enhanced generative recommendation method proposed in this invention, which consists of three parts: 1. User intent-aware relation enhancement; 2. Structure-semantic aligned representation learning; 3. Next relation prediction to enhance sequence recommendation. The specific steps are as follows:
[0051] (1) Enhanced user intent perception relationship
[0052] For items that were frequently purchased together in historical interactions Utilizing advanced LLM As a generator. Input prompts, item static attributes, and user reviews, and let... Generate a text description explaining the relationship between the two. This description captures the underlying intent behind user purchasing behavior.
[0053] To integrate unstructured text into a graph structure, we first utilize LLM to describe... Encoded as semantic vectors Then, the K-means algorithm is applied to the vector set. Clustering is performed to obtain Cluster centers These cluster centers are defined as the set of potential relations. For each item pair, it is assigned the relation label represented by the nearest cluster center, thus enriching the edge information of the item graph beyond explicit relations.
[0054] (2) Representation learning with structure-semantic alignment
[0055] Constructing a multi-relationship graph , where the relation set Includes explicit relationships And the potential relationships discovered in step 1 A relational graph convolutional network (RGCN) is used as the encoder. The node update formula for the layer is:
[0056]
[0057] in It is a relationship The following is a collection of neighbors. These are learnable weights.
[0058] Semantic embeddings generated by LLM encoding of item text attributes Initialize nodes and through a linear projection layer Mapping to structure space: .
[0059] To prevent semantic forgetting during RGCN training, a contrastive learning loss is introduced. For the same item, embed its structure. With semantic embedding Treating each item as a positive sample pair and its embeddings with those of other items as negative sample pairs maximizes mutual information.
[0060]
[0061] Where B represents the training batch. For similarity function, This refers to the temperature parameter.
[0062] Calculate the graph link prediction loss using the Dismult scoring function. The overall objective function is ,in This is the balance coefficient.
[0063] (3) Next Relationship Prediction Enhanced Sequence Recommendation
[0064] The item embeddings obtained in step 2 are quantized into discrete RSID sequences using RQ-Kmeans, and the atomic tokens of the RSIDs are added to the input vocabulary of the LLM for training.
[0065] Define the "next relation" To connect user historical sequences With the target item The logical reasoning path. During the training phase, utilizing... Based on global user profiles and local intent analysis, truth labels for this relationship are generated. .
[0066] A two-stage training strategy is adopted for the recommendation base model. Conduct training.
[0067] The first phase is fine-tuning of relation-aware instructions, which includes three sub-tasks:
[0068] 1. Index-Language Alignment: Training Generate item attribute descriptions based on RSID;
[0069] 2. Item Relationship Analysis: Training Explain the logical relationship between the co-purchased item pairs. ;
[0070] 3. Next Relationship Prediction: Training According to history predict .
[0071] The second stage is item sequence prediction: the trained model generates the RSID of the next item based on the historical sequence. At this point, the relational reasoning ability learned in the first stage serves as an implicit inductive bias, guiding the model to generate target items that conform to the evolution of user intent.
[0072] Through the above steps, this embodiment can effectively integrate structure, semantics, and reasoning logic, significantly improving the performance of the recommendation system.
[0073] Example 2:
[0074] This embodiment provides a generative recommendation system, the functions of which correspond to those of the method described in Embodiment 1. The system includes:
[0075] (a) Relationship Enhancement Module
[0076] This module uses a large language model as a generator to uncover deep, potential relationships between items bridged by user intent, and transforms unstructured descriptions into structured tags.
[0077] Specifically, the relationship enhancement module performs the following operations: For frequently co-purchased item pairs in historical interactions, the static attributes of the items and user reviews are input into a large language model to generate a text description explaining the relationship between the two; the large language model is used to encode the text description into semantic vectors; the K-means clustering algorithm is applied to process the semantic vector set to obtain several cluster centers, which are defined as a set of potential relationships; for each item pair, it is assigned to the relationship label represented by the nearest cluster center, serving as the edge information of the enhanced item knowledge graph. This module outputs an enhanced item knowledge graph containing explicit attribute connections and implicit intent relationships.
[0078] (ii) Representation Learning Module
[0079] This module is used to construct a multi-relationship item graph, which uses a relation graph convolutional network to encode topological information and aligns the structured embedding with the semantic embedding through contrastive learning to generate discrete structural and semantic identifiers for items.
[0080] Specifically, the representation learning module performs the following operations: constructing a multi-relationship item graph that integrates explicit attributes and latent intentions, and initializing the node representations in the graph using text semantic embeddings generated by a large language model; using a relational graph convolutional network as a structural encoder to capture the topological dependencies of items in the graph, while introducing a contrastive learning mechanism to align the structural feature space and semantic feature space; and generating item representations that combine structural and semantic information through joint optimization. The multi-relationship item graph includes explicit attribute relationships defined in the dataset and latent relationships mined; node initialization is accomplished by mapping text semantic embeddings to the structural feature space through a linear projection layer; structural encoding is achieved by aggregating neighbor node information under different relationships to update the structural representation of the current node; the contrastive learning mechanism treats the structural and semantic embeddings of the same item as positive sample pairs and embeddings of other items as negative sample pairs, aligning the topological structure and semantic space by maximizing the mutual information between positive sample pairs. The joint optimization adopts a total optimization objective function, which is a weighted sum of graph reconstruction loss and contrastive learning loss. Finally, the aligned item embeddings are quantized into structural and semantic discrete identifiers using the RQ-Kmeans residual vector quantization method.
[0081] (III) Recommendation Module
[0082] This module is used to introduce the next relationship prediction task in the recommendation stage. It uses multi-task supervision to fine-tune the training model, explicitly predicts logical relationships based on user history interactions, and guides the generation of target items.
[0083] Specifically, the recommendation module performs the following operations: adding structural semantic discrete identifiers to the vocabulary of the model to be trained; defining the next relation as a logical reasoning path connecting the user's historical sequence and the target item, and using a large language model to analyze it from global and local levels during the training phase to generate a supervision label for this relation; and training the recommendation base model using a two-stage multi-task fine-tuning strategy. The first stage is relation-aware instruction fine-tuning, including index-language alignment, item relation analysis, and next relation prediction tasks; the second stage is the item sequence prediction task, where the model is trained to generate the identifier for the next item based on the historical sequence, and the relation reasoning ability learned in the first stage serves as an implicit inductive bias.
[0084] The modules described above are connected in sequence. The output of the relationship enhancement module serves as the input of the representation learning module, and the structural semantic discrete identifier output by the representation learning module serves as the prediction target of the recommendation module. Together, they complete the entire process from the original interaction data to the final recommendation result.
[0085] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A relation-aware enhanced generative recommendation method, characterized in that: Includes the following steps: Step 1, Enhanced Relationships Based on User Intent: Using a large language model as a generator, we can mine the deep potential relationships between items that are bridged by user intent, and transform unstructured descriptions into structured tags to build an enhanced item knowledge graph. Step 2, Structure-Semantic Alignment Representation Learning: Construct a multi-relationship item graph using the enhanced item knowledge graph built in Step 1, encode topological structure information using a graph neural network, and align the structured embedding with the semantic embedding through a feature alignment mechanism to generate the item's structure-semantic identifier; Step 3, Next Relationship Prediction Enhanced Sequence Recommendation: The structural semantic discrete identifiers generated in Step 2 are used as prediction targets and introduced into the next relationship prediction task. The model is fine-tuned using multi-task supervision, and logical relationships are explicitly predicted based on user historical interactions to guide the generation of target items.
2. The method according to claim 1, characterized in that: Step 1 specifically includes: Step 11: For frequently co-purchased item pairs in historical interactions, input the item's static attributes and user comments into the large language model to generate a text description explaining the relationship between the two. Step 12: Use a large language model to encode the text description into a semantic vector; Step 13: Apply the K-means clustering algorithm to process the semantic vector set to obtain several cluster centers, and define the cluster centers as a set of potential relations; Step 14: For each item pair, assign it to the relation label represented by the nearest cluster center as edge information of the enhanced item knowledge graph.
3. The method according to claim 1, characterized in that: Step 2 specifically includes: Step 21: Construct a multi-relationship item graph that integrates explicit attributes and latent intentions, and initialize the node representations in the graph using text semantic embeddings generated by a large language model encoding. Step 22: Use a relational graph convolutional network as a structural encoder to capture the topological dependencies of items in the graph, and introduce a contrastive learning mechanism to align the structural feature space with the semantic feature space. Step 23: Generate an item representation that combines structural and semantic information through joint optimization.
4. The method according to claim 3, characterized in that: In the structure-semantic alignment representation learning, The multi-relationship item graph includes explicit attribute relationships defined in the dataset and latent relationships mined out. The node representation in the initialization graph is accomplished by embedding and mapping text semantics into the structural feature space through a linear projection layer; The structural encoding updates the structural representation of the current node by aggregating neighbor node information under different relationships; The contrastive learning mechanism treats the structural and semantic embeddings of the same item as positive sample pairs and the embeddings of other items as negative sample pairs, aligning the topological structure and semantic space by maximizing the mutual information between positive sample pairs.
5. The method according to claim 3, characterized in that: The joint optimization adopts a total optimization objective function. ,in To calculate the reconstruction loss, the Dismult scoring function is used. To compare learning loss, This is the balance coefficient.
6. The method according to claim 4 or 5, characterized in that: The contrastive learning loss function in the contrastive learning mechanism is: Where B represents the training batch. For the structural embedding of item v, For the semantic embedding of item v, For similarity function, This refers to the temperature parameter.
7. The method according to claim 1, characterized in that: Step 3 specifically includes: Step 31: Use the RQ-Kmeans residual vector quantization method to quantize the aligned item embeddings into structural semantic discrete identifiers and add them to the vocabulary of the model to be trained. Step 32: Define the next relationship as the logical reasoning path connecting the user's historical sequence and the target item, and use a large language model to analyze it from the global and local levels during the training phase to generate a supervision label for the relationship; Step 33: Train the recommendation base model using a two-stage multi-task fine-tuning strategy.
8. The method according to claim 7, characterized in that: The multi-task supervised fine-tuning strategy employs a two-stage training process: The first phase is the fine-tuning of relation-aware instructions, including the index-language alignment task, the item relation analysis task, and the next relation prediction task; The second stage is the item sequence prediction task, where the model is trained to generate the identifier of the next item based on the historical sequence, and the relational reasoning ability learned in the first stage is used as an implicit inductive bias.
9. The method according to claim 8, characterized in that: The tasks of the first phase include: The index-language alignment task involves training a model to generate corresponding textual attribute descriptions of items based on discrete identifiers. The task of item relationship analysis involves training a model to generate text explaining the logical relationship between co-purchased item pairs using their identifiers. The next relation prediction task involves training a model to predict the ground truth label of the next relation based on the user's historical interaction sequence.
10. A generative recommendation system, characterized in that: include: The relationship enhancement module is used to leverage a large language model as a generator to uncover deep potential relationships between items bridged by user intent, and to transform unstructured descriptions into structured tags. The representation learning module is used to construct a multi-relationship item graph, encode topological information using a relation graph convolutional network, and align structured embeddings with semantic embeddings through contrastive learning to generate discrete structural and semantic identifiers for items. The recommendation module is used to introduce the next relationship prediction task in the recommendation stage. It uses multi-task supervision to fine-tune the training model, explicitly predicts logical relationships based on the user's historical interactions, and guides the generation of target items.