Two-channel recommendation method and system based on graph structure perception and representation alignment
By employing a dual-channel recommendation method that combines graph structure perception and representation alignment with graph neural networks and large language models, we achieve the alignment and dynamic fusion of semantics and collaborative embedding. This solves the problems of insufficient high-order collaborative modeling and semantic drift in existing technologies, and improves the performance of recommendation systems in cold start scenarios.
Patent Information
- Application Number
- CN202511800127.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-02-27
AI Technical Summary
Existing recommendation methods based on large language models lack explicit recursive propagation and neighbor aggregation mechanisms of graph neural networks when modeling user-item interaction relationships. This makes it difficult to fully explore potential high-order collaborative signals and structured relationships in the interaction graph. Furthermore, the lack of dynamic coordination mechanisms among multi-source embeddings leads to semantic drift and pseudo-relevance issues, resulting in poor performance, especially in cold-start scenarios.
A dual-channel recommendation method based on graph structure perception and representation alignment is adopted. Cooperative embeddings are extracted through graph neural networks and attention mechanisms, combined with semantic embeddings from a large language model, and semantic alignment with cooperative embeddings is achieved by residual quantization and unified semantic mapping mechanism. Finally, multi-source information is dynamically integrated through a gated weighted fusion mechanism to generate a unified fusion representation.
It improves the robustness and generalization ability of the model in cold start scenarios, effectively alleviates the embedding degradation problem caused by data sparsity, and enhances the robustness and accuracy of the recommendation system.
Smart Images

Figure CN121579784A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence and recommendation system technology, and in particular to a dual-channel recommendation method and system based on graph structure perception and representation alignment. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Recommender systems, as a core supporting technology in modern internet services, have been widely applied in e-commerce, social media, short video platforms, online education, and other scenarios. These systems predict potential interests and recommend personalized content by modeling and analyzing users' historical behavioral data. Traditional recommendation methods, especially collaborative filtering (CF), learn potential interest representations by mining the interaction relationships between users and items, achieving personalized recommendations to some extent. However, these methods typically rely on sparse user behavior signals and struggle to effectively utilize rich semantic information such as text descriptions, comments, and context. Consequently, recommendation performance significantly declines in scenarios with sparse data and cold start conditions.
[0004] In recent years, Large Language Models (LLMs) have made groundbreaking progress in the field of natural language processing. These models possess powerful semantic understanding and text generation capabilities, enabling them to model and reason about complex semantic information, and providing new possibilities for introducing linguistic knowledge and semantic representation into recommendation systems. Recommendation paradigms based on LLMs can leverage natural language to uniformly map user preferences, item attributes, and contextual information to a shared language space, thereby overcoming the bottlenecks of traditional collaborative filtering in feature learning and generalization capabilities.
[0005] Despite this, existing LLM-based recommendation methods still face a series of challenges. First, when modeling user-item interactions, mainstream methods focus on capturing shallow semantic features and sequence dependencies, lacking the explicit recursive propagation and neighbor aggregation mechanisms of Graph Neural Networks (GNNs), making it difficult to fully explore potential high-order collaborative signals and structured relationships in the interaction graph. Second, LLMs and GNNs differ significantly in feature space and information modeling paradigms: the former emphasizes continuous representation of linguistic semantics and contextual reasoning, while the latter relies on neighborhood aggregation and topological propagation mechanisms in discrete graph structures. This structural difference leads to a representational gap between semantic embeddings and collaborative embeddings, making it difficult to achieve consistent spatial alignment and information fusion. Meanwhile, in cold-start scenarios, data sparsity further amplifies these problems. Finally, the lack of dynamic coordination mechanisms among multi-source embeddings (semantic embeddings, collaborative embeddings, and index representations) means that the weights of different information channels cannot be adaptively adjusted according to the context, causing the model to over-rely on information from a single source, leading to semantic drift and spurious relevance issues.
[0006] Therefore, how to establish an efficient collaborative modeling mechanism between large language models and graph neural networks, fully integrate semantic and high-order collaborative information, and achieve unified representation and dynamic alignment in multi-source embedding space has become a key technical problem that urgently needs to be solved in the current research and application of recommendation systems driven by large language models. Summary of the Invention
[0007] To address the aforementioned issues, this invention proposes a dual-channel recommendation method and system based on graph structure perception and representation alignment. This method achieves a deep fusion of collaborative filtering and semantic modeling, effectively mitigating embedding degradation and semantic drift caused by data sparsity, and significantly improving the robustness and generalization ability of the model in cold-start scenarios.
[0008] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a dual-channel recommendation method based on graph structure awareness and representation alignment, comprising the following steps: Obtain text attribute data from user and item information, as well as user-item interaction data; A user-item interaction graph is constructed based on user-item interaction data, and a graph neural network and attention mechanism are used to extract collaborative embeddings from the interaction graph to capture user preferences and item attributes. Multi-layer perceptual semantic encoding is performed on text attribute data, and the structural signals of local neighbors are injected into the semantic space through a graph structure-aware word embedding enhancement method based on random feature propagation to obtain semantic embeddings with perceptual interaction relationships. By using residual quantization and a unified semantic mapping mechanism, semantic embedding and co-embedding are compressed into an indexable discrete latent space to generate an indexed representation; By utilizing a gated weighted fusion mechanism, adaptive weight allocation at the word level and vector level is performed on collaborative embedding, semantic embedding, and index representation to generate a unified fusion representation; Based on a unified fusion representation, learnable cue vectors are used as task condition signals to guide the model to complete various recommendation tasks and output recommendation results.
[0009] As an alternative implementation, a collaborative embedding for capturing user preferences and item attributes is extracted from the interaction graph using graph neural networks and attention mechanisms, specifically: Initialize and embed user nodes and item nodes; By using multi-layer graph convolution operations, neighbor node information is aggregated, and the current node representation is updated. Using symmetric normalization coefficients suppresses the excessive influence of active users and popular items, enhancing the stability and discriminative power of collaborative signals.
[0010] As an alternative implementation, a graph structure-aware word embedding enhancement method based on random feature propagation is as follows: Input the text attribute data into the large language model to obtain the initial semantic embedding; By combining graph structure information, the structural signals of local neighbors are injected into the semantic space through a random feature propagation mechanism, thereby enhancing the semantic embedding's ability to perceive interaction relationships.
[0011] As an alternative implementation method, the residual quantization and unified semantic mapping mechanism is as follows: By using residual quantization, the continuous embedding is quantized layer by layer into a multi-level discrete index, capturing residual information to achieve multi-granularity representation. In the last layer of quantization space, an optimal transmission constraint is introduced, and the Sinkhorn-Knopp algorithm is used to achieve a uniform distribution of embeddings and indexes, avoiding hash collisions and ensuring index uniqueness and semantic consistency.
[0012] As an alternative implementation method, the gated weighted fusion mechanism is implemented in the following way: Calculate the dynamic gating weights for semantic embedding, co-embedding, and index representation respectively; A unified fusion representation is generated by weighted summation of the three types of embeddings based on gating weights. The gating weights are adaptively adjusted based on the context, task objective, and input features.
[0013] As an alternative implementation, based on a unified fusion representation, a learnable cue vector is used as a task condition signal to guide the model to complete various recommendation tasks and output recommendation results, specifically: The unified fusion representation is input to the downstream task layer, and a set of learnable continuous cue vectors is defined for each task. The cue vector is concatenated to the front end of the unified fused representation of the input as a task condition signal; Joint training and inference for direct recommendation and sequential recommendation tasks are performed in a shared parameter space.
[0014] Secondly, the present invention provides a dual-channel recommendation system based on graph structure awareness and representation alignment, comprising: The data acquisition module is configured to acquire text attribute data from user information and item information, as well as user-item interaction data. The collaborative embedding generation module is configured to: construct a user-item interaction graph based on user-item interaction data, and extract collaborative embeddings from the interaction graph using graph neural networks and attention mechanisms to capture user preferences and item attributes; The semantic embedding generation module is configured to: perform multi-layer perceptual semantic encoding on text attribute data, and inject the structural signals of local neighbors into the semantic space through a graph structure-aware word embedding enhancement method based on random feature propagation, so as to obtain semantic embeddings with perceptual interaction relationships. The index representation generation module is configured to: compress semantic embeddings and co-embeddings into an indexable discrete latent space through residual quantization and a unified semantic mapping mechanism to generate index representations; The fusion embedding generation module is configured to: use a gated weighted fusion mechanism to perform adaptive weight allocation at the word level and vector level for collaborative embedding, semantic embedding and index representation to generate a unified fusion representation; The recommendation module is configured to: guide the model to complete various recommendation tasks based on a unified fusion representation, using learnable cue vectors as task condition signals, and output recommendation results.
[0015] Thirdly, the present invention provides an electronic device including a memory and a processor, and computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the method described in the first aspect.
[0016] Fourthly, the present invention provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the method described in the first aspect.
[0017] Fifthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0018] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention presents a dual-channel recommendation method based on graph structure awareness and representation alignment, which possesses powerful high-order collaborative modeling capabilities. It captures collaborative embeddings through graph neural networks and attention aggregation, and obtains semantic embeddings with perceived interaction relationships through a graph structure awareness-based word embedding enhancement method based on random feature propagation. The dual-channel design enables the simultaneous acquisition of collaborative and semantic information, effectively improving the capture of collaborative relationships in user-item interactions, fully mining potential high-order collaborative information, and maintaining stable discriminative power in cold-start and data-sparse scenarios.
[0019] The dual-channel recommendation method based on graph structure awareness and representation alignment of the present invention combines representation alignment with storage friendliness. Residual quantization and unified semantic mapping balance expressiveness and index balance. Contrastive constraints enhance semantic alignment, reduce conflicts and drift, and effectively alleviate the embedding degradation problem caused by data sparsity at the representation level, thereby improving retrieval efficiency and saving storage costs.
[0020] The present invention provides a dual-channel recommendation method based on graph structure perception and representation alignment, which achieves fine-grained adaptive fusion. Three-way gating dynamically adjusts the semantic, collaborative, and index representation weights at the word-vector level, achieving optimal information integration for different tasks and scenarios. This enhances the model's perception of structural signals of similar users and items, alleviates semantic drift to some extent, and improves the consistency of recommendation representation.
[0021] The present invention provides a dual-channel recommendation method based on graph structure perception and representation alignment. It constructs a unified paradigm for multi-task optimization, and the unified modeling based on prompts enables direct recommendation and sequential recommendation to achieve synergistic gains in a unified parameter space. Combined with regularization, it further improves generalization and convergence speed, enhances cross-task generalization, and significantly improves the accuracy and robustness of recommendation results.
[0022] Advantages of additional aspects 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
[0023] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0024] Figure 1 The flowchart shows the dual-channel recommendation method based on graph structure perception and representation alignment of the present invention. Figure 2 This is a schematic diagram of the framework of the dual-channel recommendation method based on graph structure perception and representation alignment of the present invention. Detailed Implementation
[0025] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0026] It should be noted that the following detailed description is exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0027] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments of the invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form as well. Furthermore, it should be understood that the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but includes other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0029] Example 1 With the widespread application of recommender systems in e-commerce, social media, and short video platforms, effectively extracting high-order collaborative information from users' historical behavior has become a core issue in recommender algorithm research. Sequence recommendation methods, by modeling the order of user interactions, can capture the dynamic changing trends of interests and have therefore attracted widespread attention. However, in practical applications, user-item interaction data generally exhibits sparse distribution characteristics, making it difficult for traditional collaborative filtering methods to obtain robust representations of collaborative information, especially in cold-start and low-frequency interaction scenarios, where recommendation performance significantly degrades.
[0030] In recent years, Large Language Models (LLMs) have been applied to recommender systems due to their powerful semantic understanding and knowledge reasoning capabilities, used to extract deep semantic features from item text descriptions, comment information, and contextual hints. The semantic embeddings generated by LLMs can provide additional semantic information for items, showing significant advantages, especially when historical interaction data is lacking. However, directly using high-dimensional semantic vectors not only incurs high computational costs but may also lead to feature redundancy and noise interference. Furthermore, semantic embeddings and collaborative information are difficult to integrate and align in the feature space, thus limiting the model's generalization performance and practical application effectiveness.
[0031] To address this, this invention proposes a dual-channel recommendation method based on graph structure perception and representation alignment. The dual channels simultaneously acquire semantic and collaborative information, effectively enhancing the capture of high-order collaborative information in user-item interactions and solving the problem of insufficient high-order collaborative modeling. Residual quantization and a unified semantic mapping mechanism bridge the gap between semantic embedding and collaborative embedding, resolving issues of spatial inconsistency, retrieval efficiency, and storage costs. At the representation level, this effectively mitigates embedding degradation caused by data sparsity, improving the model's robustness in cold-start scenarios. A gated weighted fusion strategy dynamically and adaptively integrates collaborative, semantic, and index representations, thereby enhancing the model's perception of structural signals related to similar users and items, mitigating semantic drift to some extent, and improving the consistency of recommendation representations. Furthermore, multi-task learning scheduling explicitly guides the model to focus on context relevant to the task objective, improving cross-task generalization. Through these steps, deep alignment and dynamic fusion of semantic and structural information are achieved, significantly improving the performance and robustness of the recommendation system in cold-start and sparse data environments.
[0032] While existing research has made some progress in semantic feature fusion, most methods still primarily focus on item-side representation optimization, lacking a systematic design for user-side semantic enhancement and target optimization strategies, resulting in insufficient multi-source feature fusion. Existing technologies struggle to achieve stable alignment between semantic and collaborative features, leading to insufficient accuracy in user preference representation and further impacting the reliability and effectiveness of the final recommendation results.
[0033] To capture high-order collaborative information in interaction graphs and alleviate the difficulties of data sparsity, embedding fusion, and alignment, as well as the semantic drift caused by the lack of dynamic coordination, this embodiment proposes a dual-channel recommendation method based on graph structure awareness and representation alignment, such as... Figures 1 to 2 As shown, it includes: Retrieve text attribute data and user-item interaction data from user and item information; User-item interaction records (i.e., text attribute data in user and item information) are subjected to multilayer perceptual semantic encoding using LLMs. Furthermore, a graph structure-aware word embedding enhancement method based on random feature propagation is employed to inject structural signals from local neighbors into the semantic space, resulting in a semantic embedding E with perceptual interaction relationships. text ; A user-item interaction graph is constructed based on user-item interaction data. Using graph neural networks and attention mechanisms, a collaborative filtering embedding that captures user preferences and item attributes is learned from the interaction graph, generating a collaborative embedding E. graph ; The representational gap between semantic embeddings and co-embeddings is bridged through residual quantization and unified semantic mapping. Residual quantization compresses semantic embeddings and co-embeddings into an indexable discrete latent space, generating an indexed representation E.index This enables multi-granularity semantic structure representation. To avoid hash collisions caused by multiple embeddings mapping to the same index, a unified semantic mapping mechanism is adopted to evenly distribute the last-level index space, ensuring the uniqueness of the index and semantic consistency of each embedding, and completing the alignment of collaborative semantic representations. A gated weighted fusion mechanism is used to achieve the system integration of collaborative information, semantic embedding, and index representation of multi-source heterogeneous information GNNs. Weights are adaptively allocated at the word and vector levels to dynamically suppress noise and highlight the information most relevant to the task objective, generating a unified fusion representation E. fused ; The fused representation is input to the downstream task layer. Through a prompt-based multi-task learning strategy, the model is guided to complete various recommendation tasks, including direct recommendation and sequential recommendation, using prompts as task condition signals, and the recommendation results are output.
[0034] User information and item information refer to the sequence data of user interactions on the platform, primarily used to model user preferences and behavioral patterns. User information and item information include user-item interaction data and user-item interaction records. User-item interaction data mainly refers to the structured behavioral events that actually occur between users and items, such as user behavior logs, clicks, browsing, favorites, purchases, and ratings. It exists in a numerical, structured form and is the core foundation for constructing collaborative filtering signals, sequence dependencies, and graph structure relationships. User-item interaction records refer to the natural language descriptions generated by users around their interactive behaviors. These are unstructured text information, such as user comments, item titles, item descriptions, and user input statements, reflecting users' subjective expressions and semantic preferences. User-item interaction data and user-item interaction records represent two types of information sources with different semantic levels and functional positioning in the recommendation system. They differ fundamentally in data form, information expression methods, and functional positioning within the model system: user-item interaction data focuses on factual modeling at the behavioral level, providing structured graph signals for the collaborative filtering channel; user-item interaction records focus on content modeling at the semantic level, providing natural language features for the semantic filtering channel. Therefore, in a dual-channel recommendation system, the two together constitute a complementary source of collaborative information and semantic information, which is the key foundation for achieving multi-source fusion and alignment.
[0035] This embodiment employs a dual-channel feature extraction structure to avoid the cold-start problem caused by relying solely on behavioral data while neglecting semantic information; secondly, it overcomes the limitation of relying solely on semantic information, which makes it difficult to model high-order interaction relationships. Through the complementary fusion of the collaborative and semantic channels, the model can not only extract collaborative preferences in high-order neighborhood propagation, but also enhance the characterization of users' potential interests by utilizing semantic embedding. Dual-channel parallel design: Simultaneously utilizing collaborative filtering and semantic modeling breaks through the limitations of relying on a single information source, achieving the organic fusion of structured relationships and semantic features. Multi-order neighborhood and semantic complementarity: By combining graph neural networks with attention mechanisms, the capture of high-order collaborative signals is enhanced; at the same time, the semantic channel fills the information gap between users and items in cold-start and sparse scenarios.
[0036] This embodiment extracts information from two different channels in parallel, as detailed below: Collaborative filtering channel: Through graph neural networks and attention mechanisms, multi-level neighborhood information is propagated and aggregated to explicitly capture high-order collaborative signals between users and items, such as the consistency of preferences among similar user groups and implicit relationships between related items. Specifically, the initial embedding vectors of users and items are sampled from a normal distribution with a mean of 0 and a standard deviation of σ.
[0037] in and Representing items and users The embedding. Initialized user embedding. and item embedding These are random, learnable parameters, obtained through stacking. In each layer, the final embedding of each node can capture high-order neighbor information of users and items, thereby learning a rich and powerful collaborative filtering representation. The layer embedding rules are as follows:
[0038] : Represents the order of the layer. =0 represents the 0th layer, which is the initial embedding vector of the node. =1 represents the new embedding vector obtained after one convolution operation. = K This represents the embedding vector obtained after propagation through the final layer. and They are users and items The set of neighboring nodes. The radical is called the symmetric normalization coefficient: its function is to suppress the excessive influence of active users and popular items, making information dissemination more stable. By continuously applying the above formula, the user's... Second-order neighbor users right Weighting coefficients that have an impact for: , user The set of neighboring nodes, i.e., the user's degree. thing The set of neighboring nodes, i.e., the degree of the item. express It is an item node that has been interacted with by two users. Indicates based on item node The influence is weighted by degree. It can be seen that stronger influence means more information will be transmitted to these higher-order neighbors, reflecting a more complex interaction between users and items in the graph. Therefore, this influence is determined by the frequency of their interactions, the popularity of the item, and the activity of the user. The representation of the current node is updated by aggregating neighbor information.
[0039] in Represents the node embedding vector. This represents the target user node currently being computed and embedded. Indicates user In the Layer embedding. ReLU represents a non-linear activation function, which introduces non-linear transformation capabilities into the model, enhancing its expressive power. Represents the target user node The first-order neighbor set, i.e., users The number of items that have been interacted with. It is a neighbor item node The degree, that is, the item How many users have interacted with it? ( ) This is a trainable parameter matrix used to perform feature transformation and dimension adjustment on the embedding vectors of neighboring nodes. Neighboring nodes In the The feature vectors of the layer are then used to obtain the collaborative filtering embedding rich in high-order structural information. Output embedded sequence This provides a structured and highly adaptable input representation for unified semantic mapping.
[0040] Semantic Channel: The original interaction records (i.e., textual attribute data from user and item information, such as textual interaction descriptions, product descriptions, user behavior logs, and prompts) are input into LLMs to obtain high-quality semantic interaction representations. If relying solely on LLM representations, the model may struggle to capture neighbor information behind user behavior. Therefore, this approach injects structural signals from local neighbors into the semantic space to obtain semantic embeddings with perceived interaction relationships. This embodiment's dual-channel design can simultaneously acquire semantic and collaborative information, effectively improving the ability to capture high-order collaborative information in user-item interactions and addressing the problem of insufficient high-order collaborative modeling.
[0041] Specifically: Tokenization and Initial Embedding: The original text is first encoded into a discrete sequence of tokens by a tokenizer. Each token sequence is mapped into a low-dimensional vector, called the token embedding. Next, positional embeddings are obtained to provide word order information. Tag embedding: = , Location embedding: = ( ), Initial input representation: 0 = + , in, It is the first t A vector of tags, It is an embedding matrix. It is a position index. f It is a positional encoding function. Then, the core context encoding of the large model is performed: initial embedding sequence { 1 0 , 2 0 ,..., 0The process involves multiple Transformer blocks, including a self-attention mechanism and a feedforward network. The self-attention output is:
[0042] in, Q (Query), K (Key), V (Value) All representations are obtained through a linear transformation of the input of the current layer. This process incorporates global contextual information into the representation of each tag, generating a context-aware representation sequence. 1 , 2 ,..., (L represents the last layer). Finally, through an aggregation strategy, a fixed-length global text vector is obtained, i.e., the semantic embedding. The vector corresponding to a special marker at the beginning or end of the sequence (such as [CLS] or [EOS]) is used as the representation of the entire semantics:
[0043] Average pooling: averaging the output vectors of all labels in the last layer.
[0044] Then, similarity calculation is performed: after obtaining the semantic vectors, the semantic relevance is measured by calculating the cosine similarity between the vectors. Cosine similarity is expressed as:
[0045] in, and These represent the semantic vector representations of two texts to be compared. : Represents the vector dot product, used to measure the similarity of two vectors in a direction; the closer the value is to 1, the more semantically similar they are. Through a series of techniques including deep context encoding of a large model, semantic compression using a specific aggregation strategy, and semantic alignment based on cosine similarity, the final semantic embedding is obtained. The output embedded sequence ={e t 1 ,e t 2 ,…,e t n As a feature representation on the text side, it contains both explicit task instruction information and implicit behavioral patterns.
[0046] In the feature extraction stage, this embodiment first obtains the two types of representations mentioned above: semantic embeddings generated by a large language model and co-embedded embeddings captured by a graph neural network and attention mechanism. Secondly, this embodiment introduces a residual quantization variational autoencoder to perform discrete index quantization on the joint representation. Specifically, residual quantization quantizes the continuous vector space layer by layer into multiple discrete indices. Each layer of quantization captures the remaining residual information, thereby gradually approximating the original representation. This residual quantization strategy allows each embedding to be mapped to a set of multi-level discrete item indices, modeling temporal dependencies and higher-order behavioral pattern changes. While ensuring representational power, it significantly compresses the vocabulary size, achieving multi-granular semantic structure representation. However, directly using vector quantization introduces a potential problem: multiple embeddings may be mapped to the same index position, leading to hash collisions and weakening semantic discriminability. To address this problem, this embodiment further utilizes a unified semantic mapping mechanism based on residual quantization to improve the expressiveness and discriminability of the semantic space. Specifically, Unified Semantic Mapping (USM) introduces Optimal Transport (OT) constraints in the quantization space of the last layer of Residual Quantization (RQ-VAE). By establishing a global matching relationship between embeddings and discrete indices, it ensures that different embeddings can be mapped to the most suitable and non-conflicting index positions. At the implementation level, this invention employs the Sinkhorn-Knopp iterative algorithm to approximate the solution to the optimal transport problem. This algorithm ensures computational efficiency while guaranteeing the uniqueness of each embedding's index and semantic consistency, thereby enhancing the discriminativeness of item representations. This mechanism bridges the gap between semantic embeddings and collaborative embeddings, effectively mitigating the embedding degradation problem caused by data sparsity at the representation level and improving the robustness of the model in cold-start scenarios.
[0047] In summary, combining the RQ-VAE + USM model not only generates discretized index representations but also achieves the alignment and fusion of semantics and collaborative embeddings, laying a unified representation foundation for subsequent recommendation generation and multi-task learning.
[0048] This embodiment employs a gated weighted fusion mechanism in the fusion stage to dynamically and adaptively integrate multi-source heterogeneous information. Different users, scenarios, and tasks have varying needs regarding the importance of "semantic vs. collaborative vs. indexing." Adaptive gating allows the model to adjust the contribution ratio of different embeddings based on context, task objectives, and input features, determining which information to retain and which noise to suppress. This mechanism ensures that the model can highlight textual semantic signals in semantically driven tasks, strengthen collaborative relationship modeling in structure-driven tasks, and simultaneously leverage the supplementary role of index representation in helping the model capture temporal evolution patterns, providing stable retrieval anchors. Specifically: obtaining semantic embeddings... The embedding layer of a large language model first encodes the input text—including task prompts, user IDs and project comments, metadata, etc.—into a context-aware serialized representation, capturing linguistic semantic features. Collaborative embedding... This approach utilizes graph neural networks and attention mechanisms to model user-item interaction graphs, extracting collaborative filtering embeddings that reflect user preferences and higher-order structural relationships. (Index representation) The semantic embedding and co-embedding are input into the residual quantization module to generate a multi-level discretized index. Through a unified semantic mapping, the uniqueness and uniformity of the final index allocation are guaranteed, thus obtaining a temporally evolved index representation. During the integration phase, we employ a three-way gating method to dynamically integrate the three types of embeddings:
[0049] Where σ( Let be the Sigmoid function, and W be the trainable parameter matrix. The final fused embedding representation:
[0050] The fused representation The input is fed into the downstream task layer to complete prompt-based multi-task learning, including direct recommendation and sequential recommendation. This embodiment achieves fine-grained fusion at the token level through a gated weighted fusion mechanism, which not only preserves the context sensitivity of semantic embedding but also introduces the structured preferences of co-embedding and index representations with compact temporal order, significantly enhancing the model's representational ability in recommendation tasks.
[0051] The fusion method in this embodiment has the following advantages: Fine-grained dynamic adjustment: Unlike fixed-weighted fusion methods, the gating layer can adaptively adjust the weights of semantics, collaborative embedding, and index representation at the lexical level. Task-aware adaptability: Since the gating parameters are learnable during training, the model can adaptively adjust the fusion ratio of multi-source heterogeneous information according to the needs of different tasks, thereby improving the robustness of the model in multi-task scenarios. Therefore, gated weighted fusion enhances the model's perception of structural signals of similar users and items, alleviates semantic drift to a certain extent, and improves the consistency of recommendation representations.
[0052] This embodiment employs a prompt-based multi-task learning method to enable a single model to handle both direct and sequential recommendation tasks simultaneously. Single-task learning easily leads to overfitting to a particular pattern, resulting in poor generalization and low training data utilization. Multi-task learning allows different tasks to complement each other, enhancing the model's representational ability and cross-task adaptability, while improving training efficiency, reducing manual parameter tuning, and enabling seamless transfer of the model between different recommendation paradigms. Specifically, this embodiment defines a set of learnable, continuous prompt templates for each task as conditional signals. When processing input samples, the prompt vector for the corresponding task is concatenated to the beginning of the input sequence, forming an enhanced input representation together with the original input. This embodiment uniformly converts the input of all tasks into a text sequence format that the model is proficient in, achieving end-to-end multi-task training. Through learnable prompt templates, the model can understand and distinguish the semantics of multiple tasks within a shared parameter space. In this mechanism, prompts not only act as task identifiers but also explicitly guide the model to focus on contextual regions related to the task objective, improving cross-task generalization and robustness.
[0053] This embodiment proposes a dual-channel recommendation method based on graph structure awareness and representation alignment. One channel utilizes graph neural networks and attention mechanisms to learn collaborative filtering embeddings that capture user preferences and item attributes from the user-item interaction graph. The other channel extracts semantic embeddings from the text using a large model. To overcome the sensitivity of large models to token decomposition, a graph structure awareness-based word embedding enhancement method based on random feature propagation is employed, enabling each word to not only understand semantics but also perceive graph structure. This approach injects structural signals from local neighbors into the semantic space, obtaining semantic embeddings with perceived interaction relationships. The dual-channel design can simultaneously acquire semantic and collaborative information, effectively improving the ability to capture high-order collaborative information in user-item interactions and addressing the problem of insufficient high-order collaborative modeling.
[0054] This embodiment employs residual quantization and unified semantic mapping to bridge the gap between semantic embeddings and collaborative embeddings. Residual quantization compresses semantic and collaborative embeddings into an indexable discrete latent space, generating indexed representations, modeling temporal dependencies and higher-order behavioral pattern changes, and achieving multi-granularity semantic structure representation. To avoid hash collisions caused by multiple embeddings mapping to the same index, this embodiment uses a unified semantic mapping mechanism to evenly distribute the last-level index space, ensuring the uniqueness of each embedding's index and semantic consistency, thereby enhancing the efficiency and distinguishability of item representation. This mechanism effectively alleviates the embedding degradation problem caused by data sparsity at the representation level, improving the robustness of the model in cold-start scenarios.
[0055] This embodiment achieves adaptive system integration of multi-source heterogeneous information through a gated weighted fusion mechanism. It dynamically and adaptively weighs collaborative information, semantic embeddings, and index representations from the GNN, allowing the model to adjust the contribution ratio of different embeddings based on context, task objectives, and input features, deciding which information to retain. This enhances the model's perception of structural signals related to similar users and items, mitigating semantic drift to some extent and improving the consistency of recommendation representations.
[0056] This embodiment utilizes a prompt-based multi-task learning strategy, using prompts as task condition signals to guide the model in completing various recommendation tasks, including direct and sequential recommendations. Through learnable prompt templates, the model can understand and distinguish various task semantics within a shared parameter space, explicitly guiding it to focus on context relevant to the task objective and improving cross-task generalization.
[0057] It should be noted that all data acquisition is conducted in accordance with laws and regulations and with user consent, and the data is used legally.
[0058] Example 2 This embodiment provides a dual-channel recommendation system based on graph structure awareness and representation alignment, including: The data acquisition module is configured to acquire text attribute data from user information and item information, as well as user-item interaction data. The collaborative embedding generation module is configured to: construct a user-item interaction graph based on user-item interaction data, and extract collaborative embeddings from the interaction graph using graph neural networks and attention mechanisms to capture user preferences and item attributes; The semantic embedding generation module is configured to: perform multi-layer perceptual semantic encoding on text attribute data, and inject the structural signals of local neighbors into the semantic space through a graph structure-aware word embedding enhancement method based on random feature propagation, so as to obtain semantic embeddings with perceptual interaction relationships. The index representation generation module is configured to: compress semantic embeddings and co-embeddings into an indexable discrete latent space through residual quantization and a unified semantic mapping mechanism to generate index representations; The fusion embedding generation module is configured to: use a gated weighted fusion mechanism to perform adaptive weight allocation at the word level and vector level for collaborative embedding, semantic embedding and index representation to generate a unified fusion representation; The recommendation module is configured to: guide the model to complete various recommendation tasks based on a unified fusion representation, using learnable cue vectors as task condition signals, and output recommendation results.
[0059] It should be noted that the above modules correspond to the steps in Embodiment 1, and the examples and application scenarios implemented by the above modules and their corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should also be noted that the above modules can be executed in a computer system as part of the system.
[0060] In further embodiments, the following is also provided: An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, perform the method described in Embodiment 1. For brevity, further details are omitted here.
[0061] It should be understood that in this embodiment, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0062] A computer-readable storage medium for storing computer instructions that, when executed by a processor, perform the method of Embodiment 1.
[0063] The method in Example 1 can be directly executed by a hardware processor, or it can be executed by a combination of hardware and software modules within the processor. The software modules can reside in readily available storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, a detailed description is not provided here.
[0064] A computer program product includes a computer program that, when executed by a processor, implements the method in Embodiment 1.
[0065] The present invention also provides at least one computer program product tangibly stored on a non-transitory computer-readable storage medium. The computer program product includes computer-executable instructions, such as instructions included in program modules, which execute in a device on a target real or virtual processor to perform the processes / methods described above. Typically, program modules include routines, programs, libraries, objects, classes, components, data structures, etc., that perform specific tasks or implement specific abstract data types. In various embodiments, the functionality of program modules can be combined or divided among program modules as needed. The machine-executable instructions for the program modules can execute within a local or distributed device. In a distributed device, the program modules can reside in both local and remote storage media.
[0066] The computer program code used to implement the methods of the present invention may be written in one or more programming languages. This computer program code may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the computer or other programmable data processing device, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a computer, partially on a computer, as a stand-alone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server.
[0067] In the context of this invention, computer program code or related data may be carried by any suitable carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, and the like. Examples of signals may include electrical, optical, radio, sound, or other forms of propagation signals, such as carrier waves, infrared signals, etc.
[0068] Those skilled in the art will recognize that the units and algorithm steps described in conjunction with the embodiments herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0069] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A two-channel recommendation method based on graph structure perception and representation alignment, characterized in that, The method comprises the following steps: obtaining text attribute data in user information and item information and user-item interaction data; constructing a user-item interaction graph based on the user-item interaction data, and extracting collaborative embedding for capturing user preferences and item attributes from the interaction graph by using a graph neural network and an attention mechanism; performing multi-layer perception semantic coding on the text attribute data, and injecting structural signals of local neighbors into a semantic space by a graph structure perception enhanced word embedding method based on random feature propagation to obtain semantic embedding with perceived interaction relationship; compressing the semantic embedding and the collaborative embedding to an indexable discrete latent space by a residual quantization and unified semantic mapping mechanism to generate index representation; generating a unified fusion representation by using a gated weighted fusion mechanism to perform adaptive weight allocation of word-level and vector-level for the collaborative embedding, the semantic embedding and the index representation; based on the unified fusion representation, using a learnable prompt vector as a task condition signal to guide the model to complete multiple recommendation tasks and output a recommendation result.
2. The dual-path recommendation method based on graph structure perception and representation alignment of claim 1, wherein, The collaborative embedding for capturing user preferences and item attributes is extracted from the interaction graph by using a graph neural network and an attention mechanism, specifically: initializing the embedding of user nodes and item nodes; aggregating neighbor node information by multi-layer graph convolution operation to update the current node representation; using a symmetric normalization coefficient to suppress the excessive influence of active users and popular items, and enhancing the stability and discriminability of collaborative signals.
3. The dual-path recommendation method based on graph structure perception and representation alignment of claim 1, wherein, The graph structure perception enhanced word embedding method based on random feature propagation is: inputting the text attribute data into a large language model to obtain initial semantic embedding; combining graph structure information, and using a random feature propagation mechanism to inject structural signals of local neighbors into a semantic space to enhance the perception ability of semantic embedding to interaction relationship.
4. The dual-path recommendation method based on graph structure perception and representation alignment of claim 1, wherein, The residual quantization and unified semantic mapping mechanism is: capturing residual information by layer-by-layer quantization of continuous embedding to multi-level discrete index to realize multi-granularity representation; introducing optimal transport constraints in the last quantization space, and realizing uniform distribution of embedding and index by Sinkhorn-Knopp algorithm to avoid hash collision and ensure index uniqueness and semantic consistency.
5. The dual-path recommendation method based on graph structure perception and representation alignment of claim 1, wherein, The gated weighted fusion mechanism is realized by the following ways: calculating dynamic gated weights of semantic embedding, collaborative embedding and index representation respectively; performing weighted summation on the three types of embedding based on the gated weights to generate a unified fusion representation; wherein the gated weights are adaptively adjusted according to context, task target and input features.
6. The dual-path recommendation method based on graph structure perception and representation alignment of claim 1, wherein, Based on the unified fusion representation, using a learnable prompt vector as a task condition signal to guide the model to complete multiple recommendation tasks and output a recommendation result, specifically: inputting the unified fusion representation into a downstream task layer to define a set of learnable continuous prompt vectors for each task; concatenating the prompt vectors to the front end of the input unified fusion representation as a task condition signal; completing joint training and reasoning of direct recommendation and sequential recommendation tasks in a shared parameter space.
7. A dual-channel recommendation system based on graph structure perception and representation alignment, characterized in that, It comprises: a data acquisition module configured to obtain text attribute data in user information and item information and user-item interaction data; The collaborative embedding generation module is configured to construct a user-item interaction graph based on user-item interaction data, and extract collaborative embedding for capturing user preference and item attribute from the interaction graph by using a graph neural network and an attention mechanism; The semantic embedding generation module is configured to perform multi-layer perception semantic coding on the text attribute data, and inject structural signals of local neighbors into a semantic space by using a graph structure perception-based word embedding enhancement method with random feature propagation, to obtain semantic embedding with perceived interaction relationship; The index representation generation module is configured to compress the semantic embedding and the collaborative embedding to an indexable discrete latent space by using a residual quantization and unified semantic mapping mechanism, to generate index representation; The fused embedding generation module is configured to perform adaptive weight allocation at a token level and a vector level on the collaborative embedding, the semantic embedding and the index representation by using a gated weighting fusion mechanism, to generate unified fused representation; The recommendation module is configured to guide the model to complete multiple recommendation tasks based on the unified fused representation, with a learnable prompt vector as a task condition signal, and output a recommendation result.
8. An electronic device, comprising: A computer program product, comprising a memory and a processor, and computer instructions stored on the memory and run on the processor, when the computer instructions are run by the processor, the method of any one of claims 1-6 is completed.
9. A computer-readable storage medium, characterized in that, A computer program product for storing computer instructions, when the computer instructions are executed by a processor, the method of any one of claims 1-6 is completed.
10. A computer program product, characterised in that, A computer program product for storing computer instructions, when the computer instructions are executed by a processor, the method of any one of claims 1-6 is completed.