Commodity recommendation method based on fusion of multiple user representations
By employing adversarial fusion networks and multi-granularity matching mechanisms, the problems of distributional differences and semantic inconsistencies in multi-source user representations are resolved. This enables the understanding of complex relationships between users and items, improves the accuracy and diversity of the recommendation system, and provides richer personalized recommendations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANJIN UNIVERSITY OF TECHNOLOGY
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, recommendation methods based on multi-source user representations ignore the distributional differences and semantic gaps between user representations from different sources, leading to feature conflicts and semantic confusion. This makes it difficult to maintain recommendation accuracy in scenarios with sparse data or missing information. Furthermore, traditional methods struggle to capture the multi-granular relationships between users and items, limiting the performance improvement of recommendation systems.
An adversarial fusion network architecture is adopted, which calculates the relevance weights between user representations through a cross-view attention mechanism and uses a view discriminator to identify residual features. The gradient inversion layer is combined to optimize representation fusion. A multi-granularity matching mechanism is used to calculate the matching degree between users and items, and diversity constraints are introduced to generate a recommendation list.
It achieves semantic alignment of user representations, improves the quality and discriminative ability of fused representations, enhances the accuracy and diversity of recommendations, avoids the information cocoon effect, and provides a richer user experience.
Smart Images

Figure CN122022952A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of recommendation system technology, and more specifically, to a product recommendation method based on the fusion of multiple user representations. Background Technology
[0002] With the rapid development of e-commerce and content platforms, personalized recommendation systems have become a key technology for enhancing user experience and platform value. These systems analyze multiple information sources, including users' historical behavior, content preferences, and social relationships, to construct comprehensive user representations, thereby more accurately predicting user interests and recommending relevant products or content. Recommendation methods based on multi-source user representations can understand user preferences from different dimensions, which is significant for solving traditional problems such as data sparsity and cold start, and represents an important research direction in the field of recommendation systems.
[0003] In existing technologies, recommendation methods based on multi-source user representations typically employ simple feature concatenation or weighted averaging for representation fusion. This approach ignores the distributional differences and semantic gaps between user representations from different sources. For example, representations extracted from behavioral sequences primarily reflect users' immediate interests, while representations extracted from social networks embody users' long-term stable preferences. These two types of representations exhibit significantly different distributional characteristics in the feature space. Directly performing simple fusion leads to feature conflicts and semantic confusion in the representation space, reducing the accuracy of subsequent matching calculations. Furthermore, existing methods lack effective alignment mechanisms during the fusion process, failing to guarantee semantic consistency between representations from different sources within a unified space. This deficiency is particularly pronounced in scenarios with sparse user behavior data or missing social relationships, leading to biased recommendation results. Additionally, traditional methods often employ a single matching degree calculation method, making it difficult to capture the complex relationships between users and items at different granularities, thus limiting the performance improvement of recommendation systems.
[0004] Therefore, this paper proposes a product recommendation method based on the fusion of multiple user representations to address the above problems. The technical issues to be solved are: how to overcome the distribution differences and semantic inconsistencies among multiple user representations to achieve more effective representation fusion; how to maintain the accuracy of recommendations when data is sparse or some information is missing; and how to understand the matching relationship between users and items from multiple granular levels to improve the overall performance of the recommendation system. Summary of the Invention
[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a product recommendation method based on the fusion of multiple user representations to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a product recommendation method based on the fusion of multiple user representations, comprising the following steps: S1. Obtain various heterogeneous user representations and item representations of users. The user representations include behavioral representations based on user historical behavior sequences, content representations based on user-generated content, and social representations based on user social networks. The item representations are extracted from item attribute features through an embedding layer. S2. Input the various heterogeneous user representations into an adversarial fusion network. The network includes a multi-view fusion unit and a view discriminator. The multi-view fusion unit calculates the correlation weights between different user representations through a cross-view attention mechanism and generates a unified fusion representation. Meanwhile, the view discriminator uses a 3-layer neural network to discriminate the view-specific features remaining in the fusion representation and backpropagates the discrimination loss to the multi-view fusion unit through a gradient inversion layer. S3. Based on the fused user and item representations after adversarial alignment, a multi-granularity matching mechanism is used to calculate the matching degree between users and items. S4. Generate a personalized product recommendation list based on the matching degree ranking results, and introduce diversity constraints to ensure the coverage of the recommendation results.
[0007] Preferably, the specific implementation of the cross-view attention mechanism includes: assigning learnable query vectors to the behavior representation, content representation, and social representation respectively, with each query vector having a dimension of 64; calculating the attention score between each query vector and the key vectors of all user representations; obtaining the key vectors from the original user representations through a linear transformation; obtaining the weight distribution by normalizing the attention score through a softmax function; and finally, performing a weighted summation on the original user representations based on the weight distribution to generate a fusion representation with a dimension of 256.
[0008] Preferably, the gradient inversion layer performs an inversion operation on the gradient value and multiplies it by an adversarial strength coefficient during backpropagation. This coefficient increases linearly from 0.1 to 1.0 during training. The gradient inversion layer is located after the input layer of the view discriminator, forcing the fused representation generated by the multi-view fusion processor to gradually lose view-specific features while maintaining the discriminative ability of the fused representation.
[0009] Preferably, the behavior representation is extracted by a temporal encoder that introduces time-interval-aware positional encoding when processing user behavior sequences. The positional encoding is calculated based on the time difference between adjacent behaviors. A 4-layer Transformer module is used to capture the temporal dependencies in the behavior sequence. Each layer contains 8 attention heads, the hidden layer dimension is 512, and the output is obtained by average pooling to obtain the behavior representation.
[0010] Preferably, the content representation is extracted by a text encoder based on a pre-trained BERT model. The encoder uses a 12-layer Transformer module to process user-generated text content. The input text is truncated to a length of 128 tokens. The attention pooling layer selects the text features most relevant to the recommendation task. The attention pooling layer uses a learnable query vector to calculate attention weights and outputs a content representation with a dimension of 768.
[0011] Preferably, the social representation is extracted by a graph encoder, which performs a two-hop graph convolution operation on the user's social graph. Each hop uses an independent graph attention layer, which calculates the attention weights of neighboring nodes, aggregates the social features of direct neighbors and second-order neighbors, and outputs a vector representation with a dimension of 256. After the graph convolution operation, a nonlinear transformation is performed using the ReLU activation function.
[0012] Preferably, the specific implementation of the multi-granularity matching mechanism includes: projecting the fused user representation and item representation into three different subspaces, each subspace having a dimension of 128. The projection is implemented through a fully connected layer. In each subspace, the cosine similarity is calculated, and the similarity score is normalized to between 0 and 1 using the sigmoid function. The final matching degree is the weighted sum of the similarities of each subspace, and the weights are learned from the fused user representation through another fully connected layer.
[0013] Preferably, the specific implementation of the diversity constraint includes: when generating the recommendation list, classifying candidate items into categories, calculating the initial proportion of each category in the recommendation list, applying a weighting coefficient of 0.7 to candidate items belonging to the same item category, and further adjusting the matching degree ranking if the proportion of a single category in the recommendation list exceeds 40%, to ensure that the recommendation list covers at least 5 different categories.
[0014] Preferably, the model training phase also includes an end-to-end training method to simultaneously optimize the multi-view fusion engine, view discriminator, and matching degree calculation module. The training objective includes three loss terms: the main loss for the recommendation task uses the cross-entropy loss function, the discriminative loss for adversarial alignment uses the binary classification cross-entropy loss function, and the contrast loss for multi-granularity matching uses the interval loss function.
[0015] Preferably, a progressive update strategy is adopted during the deployment phase, with incremental updates to user representations every 24 hours. The incremental updates are calculated in real time by a time-series encoder based on the latest user behavior data. The parameters of the fusion model are fully updated every 7 days. The full update uses data from the past 30 days to retrain the model. During the update process, the architecture of the adversarial fusion network remains unchanged, and only the model weights are adjusted to adapt to changes in data distribution.
[0016] The technical effects and advantages of this invention are as follows: Compared to existing technologies, this invention constructs an adversarial fusion network architecture. It introduces a cross-view attention mechanism in the multi-view fusion processor to calculate the relevance weights between different user representations. Simultaneously, a view discriminator uses a three-layer neural network to identify residual view-specific features in the fused representation. A gradient reversal layer backpropagates the discriminative loss to the fusion processor, enabling the generated unified fused representation to effectively eliminate distributional differences between representations from different sources. This design achieves semantic alignment between behavioral, content, and social representations in the latent space, avoiding feature conflicts caused by traditional simple fusion methods. It improves the quality and discriminative power of the fused representation, providing a more accurate user representation foundation for subsequent matching calculations.
[0017] Compared to existing technologies, this invention employs a multi-granularity matching mechanism, projecting the adversarially aligned fused user and item representations into three distinct subspaces. In each subspace, cosine similarity is used to calculate the matching degree, and finally, a weighted fusion is performed using learnable weights. This method can capture the complex relationships between users and items from multiple levels of global and local features, overcoming the limitations of traditional single-matching-degree calculation methods. Through similarity calculation in subspaces of different granularities and adaptive weight fusion, the system can more meticulously understand the degree of matching between user preferences and item characteristics, thereby improving the diversity of recommendations while maintaining accuracy.
[0018] Compared to existing technologies, this invention introduces a diversity constraint mechanism during the recommendation list generation stage. By categorizing candidate items and calculating category distribution, a weighting coefficient is applied to items within the same category, ensuring that the recommendation results cover multiple item categories. This design effectively avoids the information cocoon effect that traditional recommendation methods are prone to. By controlling the maximum proportion of a single category in the recommendation list, it ensures that users are exposed to more diverse content. Combined with a multi-granularity matching mechanism, the system can significantly improve the diversity and novelty of recommendation results while maintaining recommendation accuracy, providing users with a richer exploration experience. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the overall workflow of the method of the present invention.
[0020] Figure 2 This is a detailed flowchart of the adversarial fusion network of the present invention.
[0021] Figure 3 This is a flowchart illustrating the implementation of the multi-granularity matching mechanism of the present invention.
[0022] Figure 4 This is a schematic diagram illustrating the diversity constraints and recommendation generation of the present invention. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] Example 1 As attached Figures 1 to 4 The method shown is a product recommendation method based on the fusion of multiple user representations. The whole method includes four stages: multi-source heterogeneous representation extraction, adversarial representation fusion, multi-granularity matching calculation, and diverse recommendation generation.
[0025] In the initial representation extraction phase, the system needs to construct comprehensive and accurate user and item feature representations from multiple dimensions. Furthermore, this process is achieved by building a specialized feature extraction pipeline that employs a parallel processing architecture to handle different types of data sources simultaneously.
[0026] User behavior representations are constructed based on their historical interaction sequences, which include behavioral data with strict temporal characteristics such as clicks, purchases, and browsing. In the specific processing, the raw behavior sequences first undergo data preprocessing, including outlier detection and removal, behavior sequence segmentation, and timestamp standardization.
[0027] The preprocessed sequence data is input into a temporal encoder, which employs a deep neural network architecture specifically designed to capture short-term preference patterns and long-term interest evolution in behavioral sequences. In particular, the encoder's built-in pattern recognition module can detect key turning points in the behavioral sequence, such as feature changes indicating a shift from simple browsing to in-depth comparison, or a pattern shift from exploratory behavior to decision-making behavior. These fine-grained temporal patterns provide important clues for understanding the dynamics of user interests.
[0028] The content representation extraction module focuses on processing various types of user-generated text content, including unstructured data such as product reviews, personal tags, and search queries.
[0029] The text data first undergoes a professional natural language processing workflow, including text cleaning, word segmentation, stop word filtering, and vectorization. The text encoder adopts a Transformer-based architecture, extracting semantic features from the text through a multi-layer self-attention mechanism.
[0030] During processing, the encoder not only focuses on surface-level lexical information but also uses deep semantic analysis to understand the underlying sentiment and focus of attention in the text. For example, when analyzing product reviews, the system distinguishes between user evaluations of different dimensions such as product functionality, appearance, and user experience, and integrates this fine-grained information into the final content representation.
[0031] The social representation extraction module constructs feature representations based on the user's social network topology. This module first constructs a user social graph, where nodes represent users and edges represent different types of social relationships.
[0032] Graph neural networks capture the patterns of user influence propagation and interest diffusion paths within social environments through embedding learning of social graphs. In practice, the system analyzes the composition of a user's social circle, identifies the user's role in different social groups, and assesses the similarity of interests between the user and their friends. These social characteristics are systematically encoded into social representations, providing data support for understanding the social influencing factors of user interests.
[0033] The item representation extraction module employs a separate feature processing pipeline, comprehensively processing item attribute features, content descriptions, and interaction statistics. This module extracts structured attributes such as item category, price, and brand, while also processing unstructured content such as text descriptions and image features. All these features are fused to generate a unified item representation, ensuring that subsequent matching calculations are performed in the same vector space as the user representation.
[0034] Furthermore, in the representation fusion phase, the system employs an adversarial fusion network to handle multiple user representations.
[0035] The core of this network is to eliminate the distribution differences between different representation sources through an adversarial training mechanism, thereby generating purer and more consistent user representations.
[0036] Cross-view attention, a key component of the fusion network, works by dynamically evaluating the importance of different user representations using learnable query vectors. In its implementation, the system maintains a dedicated query vector for each representation type, which is continuously optimized during training to capture the complementarity between different representation sources.
[0037] The calculation of attention weights is a sophisticated, multi-factor decision-making process, in which the system comprehensively considers multiple dimensions such as representation quality, contextual relevance, temporal freshness, and data completeness. For example, when processing new users, due to the relative sparseness of behavioral data, the system automatically increases the weight of content representation based on a meta-learning strategy; while in scenarios where users have high social activity, the weight of social representation will be increased accordingly. This dynamic weight adjustment mechanism enables the fusion process to intelligently adapt to different user characteristics and usage scenarios.
[0038] The formula for calculating attention score is: In this formula, Representing the A query vector is a parameter vector learned for a specific representation type, used to capture the important characteristics of that type of representation. Representing the Each key vector is a feature vector derived from the original user representation through linear transformation, carrying semantic information about the specific representation content. These are attention weights normalized using the softmax function, which precisely quantify the contribution of different representations to the final fusion result. This attention-based fusion mechanism ensures that the system can intelligently balance the contributions of different information sources according to the specific context.
[0039] After the fused representation is generated, the view discriminator begins its work, its core task being to detect and identify residual view-specific features in the fused result. The discriminator uses a multilayer perceptron to deeply analyze the statistical distribution characteristics of the fused representation, detecting any traceable sources of the representation. This discriminative process drives the fusion network to continuously optimize its parameter configuration to generate cleaner view-independent representations. The discriminator's training objective is adversarial to the fusion network's, and this adversarial training mechanism effectively drives the alignment optimization of the representation distribution.
[0040] Furthermore, the gradient inversion layer plays a crucial role in the adversarial training architecture. This component is designed based on the gradient propagation principle of deep learning, maintaining the data flow unchanged during the forward computation phase and performing a directional transformation of the gradient signal during the backward propagation phase. (Adversarial strength coefficient) The incremental adjustment strategy is an innovation of this layer, and its linear growth process from 0.1 to 1.0 precisely corresponds to the alignment requirements of different training stages.
[0041] In the early stages of training, smaller The value allows for the preservation of some view characteristics, avoiding feature loss and model degradation caused by premature over-alignment; as the training process progresses, the value is gradually increased. The values continuously reinforce the alignment constraints, ensuring that the final fused representation has sufficient view invariance. This progressive alignment strategy effectively balances the trade-off between representational consistency and feature richness through mathematically continuous changes.
[0042] The mathematical expression for gradient transformation is: In this transformation, This represents the original gradient signal that propagates back from the discriminator, containing important information indicating the source of the discrimination. It is the transformed output gradient, which guides the fusion network to optimize in the direction of eliminating view-specific features. As an adversarial strength coefficient, it controls the intensity and speed of alignment optimization. This gradient operation makes the parameter update direction of the fusion network and the optimization objective of the discriminator form a dialectical relationship, thereby achieving asymptotic alignment of the representation distribution in adversarial scenarios.
[0043] Furthermore, the behavior representation extraction module employs a time-aware deep coding architecture. This module is specifically optimized for the temporal characteristics of user behavior data, simultaneously considering two key factors when processing sequential data: the order of behaviors and the distribution of time intervals. Time-interval-aware positional coding is the core technological innovation of this module; it accurately captures behavioral patterns at different time scales through combinations of trigonometric functions. In this position encoding function It represents the specific time interval between consecutive actions, reflecting the temporal distribution density of user behavior. The number of dimensions in the encoding determines the ability to represent temporal features. and These are learnable amplitude parameters that are automatically adjusted through training to adapt to the behavioral time patterns of different users. These are frequency control parameters responsible for capturing different periodic temporal patterns. This encoding method can accurately express complex temporal dependencies between behaviors, such as identifying users' periodic purchasing patterns, sudden browsing behaviors, or gradual shifts in interest.
[0044] The multi-layered stacked structure of the Transformer module enables the encoder to capture multi-level temporal patterns ranging from fine-grained to coarse-grained. Each attention head focuses on learning a specific type of temporal relationship; some focus on direct associations between local continuous behaviors, some dig out deep patterns in long-term dependencies, and others analyze pattern correlations across sequence segments.
[0045] This collaborative attention mechanism ensures a comprehensive and deep understanding of the behavioral sequence. The final average pooling operation intelligently aggregates the hidden states from all time steps, preserving important local details while forming an overall interest representation vector. The entire processing flow ensures a complete understanding of the user's behavioral sequence, providing high-quality feature input for subsequent fusion and matching.
[0046] Furthermore, content representation extraction is based on a language model architecture that combines pre-training and fine-tuning. The text encoder employs a two-stage training strategy: first, it is pre-trained on a large-scale general corpus to acquire basic language understanding capabilities and world knowledge; then, it is fine-tuned on domain-specific text data for the recommendation system.
[0047] This gradual training strategy ensures both the model's generalization ability and its professionalism and accuracy in recommendation tasks. Attention pooling is an innovation in text processing; it automatically identifies the most relevant information segments in the text for the recommendation task through learnable query vectors. For example, when processing user product reviews, the system pays special attention to sentence segments expressing strong emotional tendencies or specific functional characteristics, while relatively downplaying routine descriptive content.
[0048] The specific process of weight calculation is as follows: In this calculation process, It is a learnable query vector that gradually learns the ability to recognize important text features through training. It is the first The hidden state of a text token contains semantic information about that location. These are normalized attention weights that accurately reflect the importance of each text segment. This intelligent weighting mechanism enables precise filtering of text information, effectively highlighting key content and suppressing noise interference. The encoder also employs a hierarchical representation strategy, retaining fine-grained features at the lexical level at the bottom layer and constructing a document-level overall semantic representation at the top layer, forming a multi-layered and comprehensive text understanding system.
[0049] Furthermore, social representation extraction utilizes graph neural networks to deeply mine latent information within the social topology. The graph encoder design fully considers the unique structural characteristics of social networks, including node degree distribution features, community clustering structure, relational connection strength, and multi-hop influence propagation. The two-hop graph convolution design balances local features and global information. The first hop aggregates feature representations of direct neighbors, capturing the user's micro-social environment and personal social circle characteristics; the second hop aggregates feature representations of second-order neighbors, understanding the user's relative position and influence range within a larger social circle. The graph attention mechanism automatically evaluates the importance of different social connections through learnable parameters. In this attention calculation and These represent the features of the target user and the neighboring users, respectively. It is a weight matrix of linear transformation, responsible for projecting the original features into a space suitable for attention calculation. It is an attention vector that learns to distinguish the importance of different social relationships. It is the LeakyReLU activation function, which introduces the necessary nonlinear transformation. These are normalized attention weights, which precisely quantify the strength of the influence of social connections. This design enables the model to intelligently distinguish the different impacts of strong and weak ties, accurately identifying key social effects such as social homogeneity and influence propagation.
[0050] Furthermore, the multi-granularity matching mechanism delves into the complex relationships between users and items through hierarchical projection and adaptive fusion strategies. This mechanism understands matching relationships at different levels of abstraction, establishing a comprehensive matching evaluation system. Three independent projection subspaces focus on different aspects of matching signal analysis: The first subspace focuses on overall interest alignment, assessing the degree of matching between users and items from a macro perspective; The second subspace analyzes specific characteristic preferences, examining the matching of functional characteristics from a meso-level perspective; The third subspace delves into deeper potential connections, exploring implicit matching possibilities at a micro level.
[0051] Each subspace uses a completely independent parameter matrix for projection learning, ensuring that each subspace can focus on learning different types of feature combination patterns.
[0052] Cosine similarity calculation serves as the basis for matching metrics: In this similarity calculation and Representing users and items respectively in the first... Projection representation in subspaces. Cosine similarity is insensitive to the absolute magnitude of vectors, focusing on evaluating directional consistency. This characteristic makes it particularly suitable for evaluating the degree of feature matching. The process of projecting onto a subspace is actually a process of feature reconstruction and emphasis. Each subspace strengthens features in certain dimensions while weakening others, thereby revealing matching relationships at different granularities.
[0053] The weighted learning network dynamically adjusts the contribution weights of each subspace based on the user's current feature representation. This dynamic adjustment mechanism reflects the system's context-awareness. For example, for users with clear interests and stable behavior, the system relies more on global matching signals; while for users in the interest exploration stage, the weight of potential association matching will be increased accordingly. The final score is calculated through weighted fusion. in It is the first The dynamic weights of each subspace are generated from the user fusion representation through a dedicated weight learning network. It's the sigmoid function, responsible for normalizing the similarity score to... - Within the standard range. Through this multi-granularity, hierarchical matching analysis, the system can comprehensively assess the complex relationships between users and items, significantly improving the accuracy and robustness of matching calculations.
[0054] Furthermore, the diversity constraint mechanism ensures a reasonable distribution of recommendation results through intelligent ranking adjustments. This mechanism is based on the diversity-accuracy trade-off principle in recommender system theory, scientifically expanding content coverage while maintaining recommendation accuracy. The category system adopts a hierarchical architecture, including both coarse-grained broad category divisions to ensure diversity and fine-grained sub-category distinctions to maintain accuracy. The weighting coefficient of 0.7 is based on extensive offline experiments and theoretical analysis, effectively reducing the excessive concentration of similar items without unduly compromising recommendation accuracy. (Percentage threshold) The control ensures that users do not receive uniform recommended content, thus maintaining the balance of recommendation results.
[0055] The specific mathematical expression for the weight reduction operation is: In this formula, It is the original match score. It is a category The weighting of a category within the current recommendation list is considered. This formula implements a dynamic adjustment mechanism; when the weighting of a category approaches a threshold, the weighting automatically increases, creating a smooth transition of constraints. The system also sets a minimum number of categories to ensure that the recommendation list covers at least five different interest dimensions. This multi-layered, adaptive diversity control design effectively breaks the information cocoon effect, providing users with a richer and more balanced experience.
[0056] Furthermore, the model training employs a multi-task learning framework, collaboratively optimizing multiple training objectives through a carefully combined combination of loss functions. The main recommendation loss uses the cross-entropy function to measure the difference between predicted results and real interactions, ensuring the core objective of recommendation accuracy. The adversarial loss drives representation distribution alignment through the discriminator's binary classification task, improving fusion quality and representation consistency. The contrastive loss uses the margin loss function to construct a good geometric structure in the embedding space, making similar user-item pairs closer in the vector space and dissimilar pairs farther apart.
[0057] The combined form of the total loss function is: In this loss function, The recommender bears the primary responsibility for ensuring the accuracy of recommendations. The weight is set to 0.5 to represent the adversarial loss, reflecting the importance of the alignment task. This is the contrastive loss, with a weight of 0.3, responsible for optimizing the embedding space structure. This weight configuration ensures that the objectives are optimized in a coordinated manner without conflict. The adaptive learning rate of the Adam optimizer helps the model converge quickly to a good solution while avoiding getting trapped in local optima. The setting of 100 training epochs ensures that the model fully learns the deep patterns in the data, while mechanisms such as early stopping prevent overfitting.
[0058] Furthermore, the deployment and update strategy employs a tiered update mechanism to scientifically balance the system's real-time and stability requirements. Users report updates occurring every 24 hours. This incremental update, performed periodically, fully utilizes the latest user behavior data to ensure the timeliness and accuracy of user representations. It only recalculates user representation features without changing model parameter configurations, thus guaranteeing both timely recommendations and system stability. A full model update is performed every... Each iteration retrains the entire network parameters using the accumulated new data, adapting to long-term changes and evolutionary trends in the data distribution. 30 The training time window fully considers the freshness of the data while ensuring the sufficiency and representativeness of the training data. During the update process, the model architecture remains completely fixed, and only the parameter values are adjusted. This design ensures the predictability of system behavior and ease of maintenance.
[0059] To illustrate the complete workflow of the system in more detail, we will conduct an in-depth end-to-end analysis using a specific e-commerce recommendation scenario. Suppose the system needs to generate a personalized recommendation list for a user with a rich history of behavioral data. This user has recently shown a strong interest in smart home products and follows several tech opinion leaders on social networks.
[0060] After the system initiates the recommendation process, it first executes multiple representation extraction tasks in parallel. The behavior representation extraction module performs in-depth analysis of the user's most recent 30... The detailed sequence of behaviors, including repeated browsing Compare the technical specifications of various smart speakers from different brands, and make a final purchase decision. The complete decision-making process for a smart lighting fixture.
[0061] When processing this data, the timing encoder accurately captures the clear trend of users' interests shifting from traditional home appliances to smart devices through time-interval-aware location encoding.
[0062] In the specific calculation process, the time interval The value is the precise difference in the number of days between each behavior, which is transformed into a semantic feature vector through a location encoding formula. The multi-layer attention mechanism of the Transformer module deeply analyzes the complex dependencies of the behavior sequence, identifying typical behavioral patterns in which users usually browse products in the evening and make purchase decisions on weekends. These temporal patterns provide an important basis for user interest modeling.
[0063] Meanwhile, the content representation extraction module professionally processes users' recently posted product reviews and search query records. The text encoder identifies frequently occurring core keywords in user reviews, such as "voice control," "device compatibility," and "ease of installation," through semantic analysis. The attention pooling mechanism assigns significantly higher weights to these key terms through weight calculation. In the specific process of calculating attention weights, the query vector... With each token hidden state The dot product operation clearly shows that phrases reflecting user experience, such as "easy to operate" and "stable connection," received high attention scores. These semantic signals reflecting the user's real needs were reinforced and encoded into the final content representation.
[0064] The social representation extraction module analyzes users' social network relationships and interaction patterns. The graph encoder discovers the close connections between users and key opinion leaders across multiple technology fields through two-hop graph convolution operations, and the graph attention mechanism accurately calculates the relationship weights between users and these opinion leaders. The scores are distributed in the higher range of 0.6-0.8, significantly higher than those of ordinary social connections. This analysis suggests that users' interest formation and product choices are significantly influenced by these opinion leaders, and this social influence needs to be properly modeled and utilized.
[0065] After completing the multi-source representation extraction, the adversarial fusion network begins to perform the crucial representation alignment task. The cross-view attention mechanism intelligently calculates the fusion weights of the three representations. Due to the abundance and high quality of recent user behavior data, the behavior representation receives a significant weight of 0.5, while the content representation and social representation receive reasonable weights of 0.3 and 0.2, respectively.
[0066] During the calculation of attention scores, the dot product of the query vector and the key vector clearly demonstrates that the behavioral representation has the strongest discriminativeness and reliability in describing the user's current interest state. The fused unified representation is gradually eliminated by the unique traces of each representation source through collaborative adversarial training of the gradient inversion layer and the view discriminator, forming a pure, view-invariant user interest representation.
[0067] After entering the multi-granularity matching stage, the system performs fine-grained matching degree calculations between the user's fused representation and smart home products in the candidate item library. Three projection subspaces analyze the matching relationships in depth from different dimensions: The first subspace focuses on the macro-level matching degree of overall smart home interests, the second subspace analyzes the meso-level matching of specific functional needs, and the third subspace explores the micro-level matching possibilities of potential interest expansion.
[0068] The cosine similarity calculation results show that the user's scores with a certain brand of smart speaker in the three subspaces are 0.85, 0.76, and 0.68, respectively. After weighted fusion using dynamic weights generated by a weighted learning network, the final matching degree is 0.79. Meanwhile, the system found that the user's matching degree with smart curtains is 0.72, slightly lower than that with smart speakers, but it belongs to a new product category that the user has not yet encountered, and has potential for expanding interest.
[0069] In the crucial stage of generating the final recommendation list, the diversity constraint mechanism begins to take effect. The system detects in real time that smart speaker products account for a significant proportion of the current candidate list. Clearly exceeded The preset threshold is used, thus automatically triggering a weighting reduction mechanism. Based on the weighting reduction formula, the matching degree of the smart speaker product is adjusted to... Meanwhile, smart curtain products maintained their original score of 0.72. After a scientific re-sorting, smart curtain products moved to the top of the recommended list, ensuring reasonable exposure opportunities for this new category.
[0070] The entire processing flow is completed efficiently within hundreds of milliseconds, ultimately generating a recommendation list containing 10 products, reasonably covering five different product categories: smart lighting, smart speakers, smart curtains, environmental sensors, and security monitoring. The recommendation list includes core products highly matching the user's current interests, while also intelligently introducing relevant new product categories with exploration value, achieving an optimal balance between recommendation accuracy and diversity. The system fully records all key data and decision information from this recommendation process, which will provide data support for subsequent model updates and system optimization.
[0071] This complete processing flow demonstrates the close collaboration and organic coordination of various technical components. Through systematic, multi-stage in-depth processing, it achieves a precise understanding and comprehensive modeling of user interests, ultimately generating high-quality personalized recommendation results.
[0072] Finally, the following points should be noted: First, in the description of this application, it should be noted that, unless otherwise specified and limited, the terms "installation", "connection", and "linkage" should be interpreted broadly, and can be mechanical or electrical connections, or internal connections between two components, or direct connections. "Up", "down", "left", "right", etc. are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may change. Secondly: The accompanying drawings of the embodiments disclosed in this invention only involve the structures involved in the embodiments disclosed in this invention. Other structures can refer to the general design. In the absence of conflict, the same embodiment and different embodiments of this invention can be combined with each other. In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A product recommendation method based on the fusion of multiple user representations, characterized in that, Includes the following steps: S1. Obtain various heterogeneous user representations and item representations of users. The user representations include behavioral representations based on user historical behavior sequences, content representations based on user-generated content, and social representations based on user social networks. The item representations are extracted from item attribute features through an embedding layer. S2. Input the various heterogeneous user representations into an adversarial fusion network. The network includes a multi-view fusion unit and a view discriminator. The multi-view fusion unit calculates the correlation weights between different user representations through a cross-view attention mechanism and generates a unified fusion representation. Meanwhile, the view discriminator uses a 3-layer neural network to discriminate the view-specific features remaining in the fusion representation and backpropagates the discrimination loss to the multi-view fusion unit through a gradient inversion layer. S3. Based on the fused user and item representations after adversarial alignment, a multi-granularity matching mechanism is used to calculate the matching degree between users and items. S4. Generate a personalized product recommendation list based on the matching degree ranking results, and introduce diversity constraints to ensure the coverage of the recommendation results.
2. A product recommendation method based on the fusion of multiple user representations as described in claim 1, characterized in that, The specific implementation of the cross-view attention mechanism includes: assigning learnable query vectors to behavior representation, content representation and social representation respectively, with each query vector having a dimension of 64; calculating the attention score between each query vector and the key vectors of all user representations; obtaining the key vectors from the original user representations through linear transformation; obtaining the weight distribution by normalizing the attention score through the softmax function; and finally, performing a weighted summation on the original user representations based on the weight distribution to generate a fusion representation with a dimension of 256.
3. A product recommendation method based on the fusion of multiple user representations as described in claim 1, characterized in that, The gradient inversion layer inverts the gradient value during backpropagation and multiplies it by an adversarial strength coefficient, which increases linearly from 0.1 to 1.0 during training. The gradient inversion layer is located after the input layer of the view discriminator, forcing the fused representation generated by the multi-view fusion processor to gradually lose view-specific features while maintaining the discriminative ability of the fused representation.
4. A product recommendation method based on the fusion of multiple user representations as described in claim 1, characterized in that, The behavior representation is extracted by a temporal encoder that introduces time-time-aware positional encoding when processing user behavior sequences. The positional encoding is calculated based on the time difference between adjacent behaviors. A 4-layer Transformer module is used to capture the temporal dependencies in the behavior sequence. Each layer contains 8 attention heads and the hidden layer dimension is 512. The output is obtained by average pooling to obtain the behavior representation.
5. A product recommendation method based on the fusion of multiple user representations as described in claim 1, characterized in that, The content representation is extracted through a text encoder based on a pre-trained BERT model. It uses a 12-layer Transformer module to process user-generated text content. The input text is truncated to a length of 128 tokens. An attention pooling layer selects the text features most relevant to the recommendation task. The attention pooling layer uses a learnable query vector to calculate attention weights and outputs a content representation with a dimension of 768.
6. A product recommendation method based on the fusion of multiple user representations as described in claim 1, characterized in that, The social representation is extracted by a graph encoder, which performs a two-hop graph convolution operation on the user's social graph. Each hop uses an independent graph attention layer, which calculates the attention weights of neighboring nodes, aggregates the social features of direct neighbors and second-order neighbors, and outputs a vector representation with a dimension of 256. After the graph convolution operation, a nonlinear transformation is performed using the ReLU activation function.
7. A product recommendation method based on the fusion of multiple user representations as described in claim 1, characterized in that, The specific implementation of the multi-granularity matching mechanism includes: projecting the fused user representation and item representation into three different subspaces, each with a dimension of 128. The projection is achieved through a fully connected layer. Cosine similarity is calculated in each subspace, and the similarity score is normalized to between 0 and 1 using the sigmoid function. The final matching degree is the weighted sum of the similarities of each subspace, and the weights are learned from the fused user representation through another fully connected layer.
8. A product recommendation method based on the fusion of multiple user representations as described in claim 1, characterized in that, The specific implementation of the diversity constraint includes: when generating the recommendation list, classifying candidate items into categories, calculating the initial proportion of each category in the recommendation list, applying a weighting coefficient of 0.7 to candidate items belonging to the same item category, and further adjusting the matching degree ranking if the proportion of a single category in the recommendation list exceeds 40%, to ensure that the recommendation list covers at least 5 different categories.
9. A product recommendation method based on the fusion of multiple user representations as described in claim 1, characterized in that, It also includes the model training phase, which uses an end-to-end training approach to simultaneously optimize the multi-view fusion, view discriminator, and matching degree calculation module. The training objective includes three loss terms: the main loss for the recommendation task uses the cross-entropy loss function, the discriminative loss for adversarial alignment uses the binary classification cross-entropy loss function, and the contrastive loss for multi-granularity matching uses the interval loss function.
10. A product recommendation method based on the fusion of multiple user representations as described in claim 1, characterized in that, During the deployment phase, a progressive update strategy is adopted, with user representations incrementally updated every 24 hours. The incremental update is based on the latest user behavior data and is calculated in real time through a time-series encoder. The fusion model parameters are fully updated every 7 days. The full update uses data from the past 30 days to retrain the model. During the update process, the architecture of the adversarial fusion network remains unchanged, and only the model weights are adjusted to adapt to changes in data distribution.