A product diversity complementary recommendation method
By constructing a complementary relationship graph of goods using graph neural networks and large language models, and combining multi-layer message passing and category coverage strategies, the problems of redundancy and homogenization in existing complementary recommendation systems are solved, achieving a balance between diversity and relevance, and improving the intelligence and user satisfaction of the recommendation system.
Patent Information
- Application Number
- CN202610402277.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-30
AI Technical Summary
Existing complementary recommendation systems have made some progress in improving recommendation accuracy, but they still fall short in terms of diversity, resulting in redundant recommendations and limited user choices. This fails to stimulate users' interest in exploring other products, and existing models mainly rely on user behavior data, lacking diversity and category coverage.
By introducing graph neural networks and large language models, a complementary relationship graph of goods is constructed. A multi-layer message passing mechanism is adopted, combining the features of neighbor nodes and edge information. Sub-modulus functions and category coverage strategies are used to perform product embedding representation and comprehensive score ranking, balancing relevance and diversity weights, and recommending diverse and relevant goods.
It enables more accurate identification of complementary product relationships, avoids redundant recommendations, ensures that recommended products are both relevant and diverse, improves user shopping experience and purchase intent, enhances the intelligence and adaptability of the recommendation system, and meets users' personalized needs.
Smart Images

Figure CN122312253A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of e-commerce technology, and in particular to a method for recommending products with complementary diversity. Background Technology
[0002] With the rapid growth of e-commerce platform transaction volume, recommendation systems are playing an increasingly significant role in improving user satisfaction and boosting sales. The goal of complementary recommendation systems is to meet users' broader shopping needs by predicting items that can complement their recent purchases.
[0003] While existing complementary recommendation systems have made some progress in improving recommendation accuracy, they still have shortcomings in terms of diversity. When a user purchases a mobile phone, recommending complementary products based solely on accuracy often focuses on the most complementary items, ignoring the similarity between recommended products. This approach can lead to redundant recommendations, limiting the user's choices and failing to stimulate the user's interest in exploring other products. Existing complementary recommendation models mainly rely on user behavior data, such as co-purchase relationships. However, just because two products are frequently purchased together does not necessarily mean they are truly complementary. Furthermore, these models often focus only on accuracy, resulting in homogeneous recommendation results and a lack of diversity. Summary of the Invention
[0004] This invention provides a product diversity complementary recommendation method to solve the aforementioned problems in the prior art, namely, how the prior art addresses the problem of homogeneity in product complementary recommendation results. This invention provides a product diversity complementary recommendation method, which includes: The acquired product category labels of the target product are input into a pre-trained large language model to determine the complementary relationship between the target product and the candidate products. The complementary relationship includes intra-class complementarity, which represents the complementary relationship between two products within the same category, and inter-class complementarity, which represents the complementary relationship between products of different categories. By treating products as nodes and the complementary relationships between target products and candidate products as edge information, a product complementarity graph is constructed. Based on the product complementarity graph, a multi-layer message passing mechanism is used through a graph neural network to establish the neighbor relationship of the target product by combining the feature vectors and edge information of the neighbor nodes. Based on the neighbor relationship, the embedding representation of the product is learned through the graph neural network to determine the product embedding vector. The set of neighbor nodes of the target product is determined by the similarity between the product embedding vectors; the intra-class complementarity and inter-class complementarity are weighted and optimized to maximize the category coverage as the objective function, and multiple product neighbors in the set of neighbor nodes of the target product are selected. The comprehensive scores of product neighbors are self-balancing and re-ranked using a constructed relevance-diversity weighting mechanism to determine the ranking result, which is then used as the final recommendation result. The relevance-diversity weighting mechanism introduces two learnable coefficient vectors to determine the relevance weight, which represents the similarity between product neighbors and the target product, and the diversity weight, which represents the diversity contribution of product neighbors. The relevance weight and the diversity weight are weighted and summed to determine the comprehensive score of each product neighbor.
[0005] Optionally, obtaining the objective function specifically includes: Based on the currently selected set of neighboring nodes and the number of categories covered by the currently selected set of neighboring nodes, the objective function is obtained using the following formula. : in, ; in, For calculation and The similarity is calculated using the following formula: ; in, This is a weight parameter that controls the trade-off between intra-class complementarity and inter-class complementarity. This represents the set of neighboring nodes that have been selected so far. Represents the currently selected set of neighboring nodes. The number of categories covered.
[0006] Optionally, obtaining the multi-layer message passing mechanism specifically includes: in, Indicates goods In the The message from the layer indicates that, This represents the set of neighboring nodes of the target product. For goods To the goods Embedded vector, Representing the products and goods In the Layer embedding representation, Represents element-wise product. It is the first The trainable weight matrix of the layer, It is a non-linear activation function.
[0007] Optionally, the intra-class complementarity can be confirmed using a sub-modular function strategy, and the inter-class complementarity can be confirmed using a class coverage strategy.
[0008] Optionally, the submodular function is a decreasing marginal return, selected by choosing k neighbor nodes with the largest gains, specifically including: in, For the currently given product node, Represents all the neighbors of the product. This represents the set of neighboring nodes that have been selected so far. This indicates the currently selected best neighbor node.
[0009] Optionally, the step of weighting and summing the relevance weights and diversity weights to determine the comprehensive score of each product's neighbors specifically includes: The overall score is obtained using the following formula: ; in, ; ; in, Diversity weight, and Given two learnable coefficient vectors, , and These are the weight parameters.
[0010] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention provides a product diversity complementary recommendation method. By introducing graph neural networks and large language models, the present invention can more accurately identify the complementary relationship between target products and candidate products. Combined with the category coverage strategy, redundant recommendations are avoided, ensuring that the recommended products are highly relevant and can cover multiple categories to meet the diverse needs of users. This invention analyzes the potential complementary relationships between products to effectively recommend products that complement the user's current selection. For example, when recommending toothbrushes, it can recommend not only toothpaste but also related products such as dental floss, thereby enhancing the user's shopping experience and purchase intent. By employing submodular functions and category coverage strategies, it effectively avoids over-reliance on a single product category while ensuring the relevance of product recommendations, preventing overly simplistic or repetitive recommendations and improving recommendation diversity.
[0011] This invention employs a multi-layered recursive message propagation mechanism. By aggregating multi-hop relationships, it can capture potential complementary relationships between products at greater distances, overcoming the limitations of traditional methods that only consider nearest-neighbor products. This enhances the intelligence and comprehensiveness of the recommendation system. By providing diverse and highly relevant product recommendations, this invention better meets users' personalized needs, stimulates their exploration interest, increases their dwell time on the platform, and increases the probability of purchase, thereby effectively improving overall user satisfaction and shopping experience. This invention not only improves the accuracy and diversity of product recommendations but also possesses strong adaptability and flexibility. It can adjust recommendation strategies according to different user behaviors and product characteristics, adapting to the application needs of various e-commerce platforms and enhancing the practicality and market competitiveness of the recommendation system. Attached Figure Description
[0012] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0013] Figure 1 This is a schematic diagram of a product diversity complementary recommendation method provided in an embodiment of the present invention; Figure 2 This is a product hierarchy diagram of the "Beauty and Personal Care" dataset provided in this embodiment of the invention; Figure 3 This is a complementary relationship diagram of products determined by ChatGPT 4o, provided in an embodiment of the present invention. Detailed Implementation
[0014] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0015] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.
[0016] Figure 1 This is a schematic diagram of the structure of a product diversity complementary recommendation method provided in an embodiment of the present invention, as shown below. Figure 1 As shown in the figure, this embodiment illustrates a product diversity complementary recommendation method, including: S1: Input the obtained product category label of the target product into the pre-trained large language model to determine the complementary relationship between the target product and the candidate products; the complementary relationship includes intra-class complementarity, which is used to represent the complementary relationship between two products in the same category, and inter-class complementarity, which is used to represent the complementary relationship between products in different categories.
[0017] For example, this embodiment proposes a product diversity complementary recommendation model—GDCRec—based on graph neural networks. The framework structure of GDCRec is as follows: Figure 1 As shown, the three modules will be explained in detail below to demonstrate their specific roles and implementation methods in the model.
[0018] For learning complementary relationships, large-scale language models (LLMs) extract these relationships. This invention leverages the extensive knowledge base of large-scale language models such as ChatGPT 4.0 to identify complementary relationships between products, thereby improving the performance of the recommendation system and enhancing the user experience. Each product in the dataset is assigned a three-level category label. For example, for the product "Sony DSC-RX1 RX1 full-frame digital camera," its category is: Mobile Phone / Digital → Photography / Videography → Digital Camera. Product categories are treated as concepts, and the finest-grained category is used to determine complementary relationships. Specifically, given a concept, the model's goal is to select other complementary concepts in the dataset using ChatGPT 4.0.
[0019] S2: Construct a product complementarity graph by using products as nodes and the complementary relationships between target products and candidate products as edge information.
[0020] For example, the construction of a complementary relationship graph may include: based on the product hierarchy, such as Figure 2 As shown, design a prompt template, such as Figure 3 As shown, ChatGPT 4o prompts for identifying complementary product relationships. The prompt template is: "If you were a product recommendation officer for an e-commerce website, when a user buys a toothbrush, please recommend complementary products so that the user can purchase them as well. Please select from the following candidate products. Candidate products: 1) Toothpaste, 2) Notebook, 3) Digital camera, 4) Dental floss, 5) Mouse..." Here, "toothbrush" represents the current product and can be any product from the second conceptual layer. The candidate products come from the second conceptual layer of the product hierarchy structure.
[0021] To this end, appropriate prompts were designed to guide ChatGPT 4.0 in generating more accurate recommendation results. For example, when recommending products that complement the concept of a "toothbrush," the following prompt could be used: "Suppose you are a product recommendation officer for an e-commerce website. When a user buys a toothbrush, please recommend complementary products so that the user can purchase them as well. Please choose from the following candidate products. Candidate products: 1) Toothpaste, 2) Notebook, 3) Digital camera, 4) Dental floss, 5) Mouse…." In this way, ChatGPT can accurately identify products that complement toothbrushes, such as toothpaste and dental floss.
[0022] Furthermore, the complementarity probability between a given concept and a selected concept can be quantified using the following formula, thereby effectively evaluating the relevance and accuracy of the recommendation results: Where x is a given concept, s is a list of complementary concepts to x selected by ChatGPT, and |s| is the length of list s. It is the i-th concept in the list.
[0023] Based on the complementary relationships between the obtained concepts, we can further construct complementary relationships between commodities.
[0024] For example, if the complementary concept of toothbrush includes toothpaste and dental floss, then all goods under the categories of toothpaste and dental floss can be considered complementary to all goods under the concept of toothbrush. Specifically, as a concept, the complementary set of goods for toothbrush would include all goods belonging to the categories of toothpaste and dental floss. In this way, the complementarity between goods can be extended to the category level, and a more comprehensive and detailed network of complementary relationships between goods can be established.
[0025] S3: Based on the complementary relationship graph of goods, a multi-layer message passing mechanism is adopted through a graph neural network to establish the neighbor relationship of the target goods by combining the feature vectors and edge information of the neighbor nodes; based on the neighbor relationship, the embedding representation of goods is learned through a graph neural network to determine the product embedding vector.
[0026] For example, to accurately predict the complementarity between products, the GDCRec model fully utilizes information about product neighbors and the connections between products. Traditional recommender systems typically only consider the features of product neighbors, ignoring the information about the edges between products. To address this issue, a message passing mechanism is designed, using both the information about the edges between products and the information about product neighbors as input for message passing. The specific message passing formula is as follows:
[0027] in, Create a function for the message. For goods With goods Embedded representation. For goods To the goods The edge embedding representation. Through this message-passing mechanism, the model is able to capture the complementary relationships between items more accurately.
[0028] To further enhance the model's expressive power, edge information not only includes simple connections but also incorporates information about the products at both ends of the edge, making the edge representation more complex and diverse. The specific formula is as follows:
[0029] in, For vector concatenation, For product, For trainable parameters, It is the ReLU function. This function ensures that the relationships between products are not limited to a simple graph structure, but make full use of the information from the edges between products to more comprehensively characterize the complementarity between products.
[0030] Predicting Long-Distance Complementarity Relationships: Traditional recommender systems typically focus only on directly connected items, neglecting potential complementary relationships between items located further apart. However, multi-hop relationships between items often contain rich semantic information. For example, some items may have implicit associations or complementarities with other items located far apart, relationships that may not be captured with a single message pass. Therefore, simple aggregation methods based on proximity may limit the recommendation results and fail to fully exploit the complex complementary relationships between items.
[0031] To overcome this deficiency, this invention proposes a multi-hop relationship aggregation strategy. In this strategy, by stacking multiple message propagation steps, a product can progressively aggregate messages from distant neighbors, ultimately including more levels of neighbor information in its embedding representation. Specifically, after L layers of message passing, a product not only contains messages from its direct neighbors but also captures semantic information from even more distant neighbors. This approach significantly improves the model's ability to recognize complex complementary relationships between products. The message propagation mechanism is as follows:
[0032] in, Indicates goods In the The message from the layer indicates that, This represents the set of neighboring nodes of the target product. For goods To the goods Embedded vector, Representing the products and goods In the Layer embedding representation, Represents element-wise product. It is the first The trainable weight matrix of the layer, It is a non-linear activation function. By recursively aggregating messages from neighbors in multiple layers, the representation of a product can progressively incorporate information from distant neighbors.
[0033] Furthermore, the embedded representation of the product will be continuously updated as multi-hop messages are passed, with the specific update formula as follows: in, Indicates goods In the Layer embedding features, and They are the first The trainable weight matrix of the layer. Through this update process, the product embedding representation not only combines the messages from the current layer, but also incorporates multi-hop information passed from neighbors, thereby improving the richness and accuracy of the product representation.
[0034] This multi-layered message passing mechanism enables the model to fully capture long-distance complementary relationships between items. Through L-layer propagation, the model can recursively aggregate information from distant items, making item representations more diverse and comprehensive, overcoming the limitations of relying solely on direct neighbors. This process not only enhances the model's generalization ability but also allows the recommender system to uncover more potential complementary relationships in complex item networks, thereby providing more accurate and diverse recommendation results.
[0035] S4: Determine the set of neighboring nodes of the target product by the similarity between the product embedding vectors; weight intra-class complementarity and inter-class complementarity, and select multiple product neighbors from the set of neighboring nodes of the target product with the objective of maximizing the category coverage.
[0036] For example, in graph neural network-based recommender systems, the embedded representation of a product is typically generated by aggregating information from all its neighbors. However, this aggregation method can lead to the embedding representation of popular products dominating the entire product space, thus covering the features of long-tail products. For instance, aggregating the information of all product neighbors for "a certain brand and model of a sonic electric toothbrush" might result in a product representation that favors common products like "toothpaste" or "dental floss," while ignoring potentially complementary products like "toothbrush heads" or "mouthwash." This type of aggregation process often accumulates information solely based on the graph structure, ignoring potential redundancy among product neighbors, resulting in poor diversity in the recommendation results. This strategy, which overemphasizes accuracy, can easily limit the recommender system, neglecting the importance of diversity.
[0037] To address the aforementioned issues, this invention designs a diverse message aggregation strategy. This strategy aims to generate diverse product representations by selecting a diverse subset of product neighbors for information aggregation. Product complementarity can be categorized into two types: intra-class complementarity and inter-class complementarity. Intra-class complementarity refers to the complementary relationship between two products within the same category. For example, "Brand A lipstick" and "Brand B lipstick," while both lipsticks and functionally substitutes for each other, are complementary in color. Inter-class complementarity refers to the complementary relationship between products belonging to different categories, such as mobile phones and phone cases, which complement each other functionally, forming cross-category complementarity. By distinguishing between these two types of complementarity, this strategy can effectively improve the diversity of product recommendations while ensuring the relevance and complementarity of the recommendation results.
[0038] Intra-class complementarity is achieved using submodular functions. The core characteristic of submodular functions is diminishing marginal returns; that is, continuously increasing a certain input will gradually reduce the additional output or return. Therefore, we can find the k neighbor nodes with the largest gains as the selected neighbors, as shown in the following formula:
[0039] in, For the currently given product node, Represents all the neighbors of the product. This represents the set of neighboring nodes that have been selected so far. This indicates the currently selected best neighbor node.
[0040] For example, if there are similar nodes to the unselected nodes in the selected set of neighbor nodes, then we say that we evaluate the similarity between the unselected neighbor nodes and the selected neighbor nodes. The diverse selection of neighbor nodes results in a highly diverse set of aggregated products, as shown in the following formula: in, It is a calculation and The similarity is calculated using the following formula: in, This represents the set of neighboring nodes that have been selected so far.
[0041] For inter-class complementarity, category coverage is used. That is, by measuring the category coverage of the selected neighboring nodes, we ensure that the selected product categories have diversity and broad coverage. Let the set of product categories be... ,node The category it belongs to is , for goods Selected set of neighboring nodes In, each neighbor node The category it belongs to is Inter-class complementarity increases the selection of goods. This is achieved through diversity within the categories. The formula is as follows:
[0042] in, Represents the currently selected set of neighboring nodes. The number of categories covered. To maximize inter-class complementarity and ensure that the selected product set covers as many categories as possible, the optimization objective is:
[0043] By selecting the neighboring node that maximizes the increase in category coverage. To expand the set of neighbor nodes .
[0044] Combining Intra-class and Inter-class Complementarity: To comprehensively consider intra-class and inter-class complementarity, the two can be combined and the objective function optimized through a weighted approach. The combined objective function can be expressed as:
[0045] in, This is a weight parameter that controls the trade-off between intra-class complementarity and inter-class complementarity.
[0046] After obtaining messages from the product's neighbors, the product representation is updated using the product's own feature representation and the newly received neighbor messages. The updated representation... Represented as:
[0047] The product's feature representation is mapped to the message space, then concatenated with the current message, and fed into the second fully connected layer. Weight matrix. and These are trainable parameters.
[0048] S5: The comprehensive scores of product neighbors are self-balancing and re-ranked using the constructed relevance-diversity weight mechanism to determine the ranking result, which is then used as the final recommendation result. The relevance-diversity weight mechanism introduces two learnable coefficient vectors to determine the relevance weight, which represents the similarity between product neighbors and the target product, and the diversity weight, which represents the diversity contribution of product neighbors. The relevance weight and the diversity weight are weighted and summed to determine the comprehensive score of each product neighbor.
[0049] For example, in self-balancing re-ranking, the complementarity and diversity of recommendation results are somewhat contradictory. Specifically, when a recommendation system overemphasizes the complementarity between items, the diversity of the recommendation results tends to be low. For instance, for the item badminton racket, the most complementary item might be badminton shuttlecocks, leading to recommendations concentrated on different brands and models of shuttlecocks, lacking sufficient diversity. Conversely, when a recommendation system overemphasizes diversity, the recommended items might cover multiple different types of items such as badminton shuttlecocks, badminton shoes, grip tape, wristbands, sports towels, and sports water bottles, which obviously significantly reduces the complementarity of the recommendation results. Therefore, how to balance the weights between complementarity and diversity in the recommendation process becomes a key issue in improving the performance of recommendation systems.
[0050] To achieve a balance between the two, a correlation-diversity weighting mechanism was designed, which introduces two learnable coefficient vectors, as shown below: in, This indicates the selected product list. and given goods The correlation between them. The formula is:
[0051] For the first selected product, only relevance needs to be considered; the formula is: The next products need to consider relevance and diversity, as shown in the formula below: Diversity is achieved by subtracting the maximum relevance between all selected and candidate items. Higher relevance results in a lower diversity score. The final score is obtained by weighted summing of relevance and diversity.
[0052] in, Diversity weight, and Given two learnable coefficient vectors, , and These are the weight parameters.
[0053] Example 2 In this embodiment, a series of experiments are conducted to verify the effectiveness of the proposed Graph Neural Network-based Complementary Recommendation Model for Product Diversity (GDCRec).
[0054] This embodiment uses and processes a publicly available dataset from an e-commerce platform. This dataset contains 520,000 products, over 1,100 product categories, 1.42 million users, and 7.2 million user purchase reviews. Based on the first-level product categories, this invention divides the dataset into three distinct subsets, as shown in Table 1.
[0055] Table 1: Dataset Statistics To verify the effectiveness of the proposed GDCRec model, it was compared with several representative complementary and diverse recommendation models. These baseline models cover a variety of current methods in the field of complementary recommendation, including models focusing on diverse recommendations and those centered on complementarity. Specifically, the following models were selected for comparison in this embodiment:
[0056] P-Companion: P-Companion is a method focused on complementary product recommendations with diverse product categories. In this model, only one product is recommended to the user for each complementary category, ensuring significant diversity in the recommendations. However, due to its strict constraint on diversity, P-Companion may sacrifice recommendation accuracy in some cases.
[0057] DecGCNii: DecGCN is a graph neural network model that generates substitute and complementary representations of goods in different spaces and captures the interaction between these two representations. By distinguishing between substitution and complementarity relationships, DecGCN can better understand the complex relationships between goods, thereby providing more accurate complementary recommendations.
[0058] DHGANiii: DHGAN is one of the most advanced complementary recommendation models currently available, based on a Hyperbolic Graph Attention Network. By modeling the relationships between items in hyperbolic space, it can more effectively capture the complex hierarchical structure between items and generate efficient complementary recommendations.
[0059] Sceptreiv: Sceptre is a classic complementary recommendation model that combines the LDAii (Latent Dirichlet Allocation) topic model with link prediction techniques. This model predicts complementary relationships by capturing the implicit topic structure of items and further enhances the accuracy of complementary recommendations through link prediction.
[0060] DGRecvi: DGRec is a diversity recommendation model that uses submodule functions and layer attention mechanisms to achieve a balance between accuracy and diversity in recommendation results.
[0061] EMRIGCNvii: EMRIGCN improves the performance of inference results by learning the mutual influence between different types of relations and the strength of related pairs.
[0062] For example, in this embodiment, for a product Its truly complementary product set is Model recommendation Individual and The most complementary product set To verify whether the complementary goods recommended by the model are suitable for the goods... In light of actual circumstances, this invention introduces the following evaluation metrics to measure the performance of the recommendation system:
[0063] Precision: Precision is used to measure the accuracy of a model's recommendations. Of the complementary goods, how many are commodities? The more accurate the model's recommendations, the better they match the actual products offered. The more accurate the complementary relationship, the better. The calculation formula is as follows:
[0064] in, This indicates that the recommended products are actually products. The quantity of complementary goods, This represents the total number of items recommended by the model. Precision measures the accuracy of the recommendations and is one of the core metrics for evaluating the performance of a recommender system.
[0065] Recall: Recall is used to measure the set of items recommended by the model. The middle section covers the products. A collection of truly complementary products The proportion. A high recall rate means that the recommended results can cover more real complementary products. The calculation formula is as follows:
[0066] in, Indicates goods The size of the true complementary product set. Recall complements precision and reflects the model's performance in terms of completeness.
[0067] F1-Score: The F1-Score is the harmonic mean of precision and recall, used to comprehensively measure model performance. The F1-Score strikes a balance between precision and recall, making it particularly suitable for scenarios where both need to be considered simultaneously. Its formula is as follows:
[0068] F1-Score can better reflect the overall performance of a model in complex scenarios, avoiding focusing on only one metric.
[0069] • Hit Ratio (HR): Hit ratio measures whether the recommendation list contains at least one actual complementary product. The formula is:
[0070] Hit rate is a binary metric used to determine whether the recommended results contain at least one actual complementary product.
[0071] • Coverage: Coverage measures the diversity performance of a recommender system, indicating how many categories of actually complementary products the recommended products cover. The formula is:
[0072] in Indicates goods The actual set of complementary product categories, This represents the set of product categories recommended by the model.
[0073] • Normalized Discount Cumulative Gain (NDCG): NDCG measures the ranking quality of the recommendation list, taking into account the relevance of the products and their position in the list. The specific formula is: in, It is the number in the recommended list The relevance score of each item (1 indicates relevance, 0 indicates irrelevance). The numerator is the Discount Cumulative Gain (DCG), representing the actual ranking score of the recommendation list. The denominator is the Ideal Discount Cumulative Gain (IDCG), representing the score under the ideal ranking condition.
[0074] This embodiment compares the proposed GDCRec model with several state-of-the-art complementary and diversity-aware recommendation models to verify its effectiveness. As shown in Table 2, the GDCRec model demonstrates higher scores in precision (P@20, P@50) and recall (R@20, R@50), especially in P@50 and R@50, showing superior performance compared to other baseline models. This indicates that GDCRec exhibits higher accuracy in identifying truly complementary items. GDCRec also performs well in terms of coverage, achieving a C@50 of 0.958. This demonstrates that GDCRec can recommend a wider range of items, exhibiting high recommendation diversity.
[0075] This embodiment compares the proposed GDCRec model with several state-of-the-art complementary and diversity-aware recommendation models to verify its effectiveness. As shown in Table 2, the GDCRec model demonstrates higher scores in precision (P@20, P@50) and recall (R@20, R@50), especially in P@50 and R@50, showing superior performance compared to other baseline models. This indicates that GDCRec exhibits higher accuracy in identifying truly complementary items. In terms of coverage, GDCRec also performs well, achieving a C@50 of 0.958. This demonstrates that GDCRec can recommend a wider range of items, exhibiting high recommendation diversity.
[0076] Table 2: Performance Comparison of GDCRec with Other Models To investigate the impact of hyperparameters on the model, this implementation used an electronics dataset to conduct sensitivity experiments on the submodulus function threshold and α weight in GDCRec. The model performance was compared when the submodulus function threshold was set to 0.1, 0.2, and 0.3, with a threshold of 0.2 showing the best results. The experimental results are shown in Table 3. Changes in the α value have a significant impact on the balance between intra-class and inter-class complementarity; α=0.6 achieves the optimal balance between the two, as shown in Table 4.
[0077] Table 3: Impact of the threshold of the submodulus function on performance Table 4: The effect of α on model performance Ablation experiments are an important method for evaluating the contributions of each component in a GDCRec model. By removing or replacing key parts of the model one by one, the impact of each part on the overall performance can be quantitatively analyzed. Table 5 presents the ablation experiment results for each module, based on several key ablation experiment results and a comparison of the changes in model performance when certain features are removed. In this table, With_G represents the impact of the graph neural network layer, With_D represents the utility of diversity message aggregation, and With_Reranker represents the importance of self-balancing reordering.
[0078] Table 5: Ablation experiments for each module The impact of graph neural network layers (With_G) is investigated. First, the impact of graph neural network layers on recommendation performance is explored. Using the basic graph neural network model LightGCNviii to identify complementary items, a significant performance degradation is observed. This demonstrates the importance of existing models in identifying complex relationships between items.
[0079] The utility of diversity message aggregation (With_D). To test the utility of the diversity message aggregation strategy, a control group was set up where item embeddings were generated solely using average neighbor information, without considering diversity. Experimental results confirm the necessity of diversity message aggregation in improving recommendation quality.
[0080] The Importance of Self-Balancing Reranking (With_Reranker). By comparing the results of enabling and disabling the self-balancing multi-angle ranking mechanism, we found that this mechanism is crucial for maintaining a balance between complementarity and diversity. When disabled, the recommendation results tend to over-concentrate on a few highly relevant items, neglecting the user's broad interests.
[0081] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0082] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this invention.
Claims
1. A method for recommending products with complementary diversity, characterized in that, include: The acquired product category labels of the target product are input into a pre-trained large language model to determine the complementary relationship between the target product and the candidate products. The complementary relationship includes intra-class complementarity, which represents the complementary relationship between two products within the same category, and inter-class complementarity, which represents the complementary relationship between products of different categories. By treating products as nodes and the complementary relationships between target products and candidate products as edge information, a product complementarity graph is constructed. Based on the product complementarity graph, a multi-layer message passing mechanism is used through a graph neural network to establish the neighbor relationship of the target product by combining the feature vectors and edge information of the neighbor nodes. Based on neighbor relationships, the embedding representation of products is learned through a graph neural network to determine the product embedding vector; The set of neighbor nodes of the target product is determined by the similarity between the product embedding vectors; the intra-class complementarity and inter-class complementarity are weighted and optimized to maximize the category coverage as the objective function, and multiple product neighbors in the set of neighbor nodes of the target product are selected. The comprehensive scores of product neighbors are self-balancing and re-ranked using a constructed relevance-diversity weighting mechanism to determine the ranking result, which is then used as the final recommendation result. The relevance-diversity weighting mechanism introduces two learnable coefficient vectors to determine the relevance weight, which represents the similarity between product neighbors and the target product, and the diversity weight, which represents the diversity contribution of product neighbors. The relevance weight and the diversity weight are weighted and summed to determine the comprehensive score of each product neighbor.
2. The product diversity complementary recommendation method as described in claim 1, characterized in that, The acquisition of the objective function specifically includes: Based on the currently selected set of neighboring nodes and the number of categories covered by the currently selected set of neighboring nodes, the objective function is obtained using the following formula. : in, ; in, For calculation and The similarity is calculated using the following formula: ; in, This is a weight parameter that controls the trade-off between intra-class complementarity and inter-class complementarity. This represents the set of neighboring nodes that have been selected so far. Represents the currently selected set of neighboring nodes. The number of categories covered.
3. The product diversity complementary recommendation method as described in claim 1, characterized in that, The acquisition of the aforementioned multi-layer message passing mechanism specifically includes: in, Indicates goods In the The message from the layer indicates that, This represents the set of neighboring nodes of the target product. For goods To the goods Embedded vector, Representing the products and goods In the Layer embedding representation, Represents element-wise product. It is the first The trainable weight matrix of the layer, It is a non-linear activation function.
4. The product diversity complementary recommendation method as described in claim 1, characterized in that, The intra-class complementarity is confirmed using a sub-modular function strategy, and the inter-class complementarity is confirmed using a class coverage strategy.
5. The product diversity complementary recommendation method as described in claim 4, characterized in that, The submodular function represents decreasing marginal returns, and is selected by choosing the k neighbor nodes with the largest gains. Specifically, it includes: in, For the currently given product node, Represents all the neighbors of the product. This represents the set of neighboring nodes that have been selected so far. This indicates the currently selected best neighbor node.
6. The product diversity complementary recommendation method as described in claim 1, characterized in that, The step of weighting and summing the relevance weights and diversity weights to determine the comprehensive score of each product's neighbors specifically includes: The overall score is obtained using the following formula: ; in, ; ; in, Diversity weight, and Given two learnable coefficient vectors, , and These are the weight parameters.
