An intelligent recommendation method and apparatus that cooperates precision and diversity

By optimizing category-aware neighbor selection, hierarchical dynamic awareness attention, and long-tail-oriented contrastive learning, the trade-off problem in diversified recommendation in graph neural networks is solved, improving the accuracy and diversity of the recommendation system, especially its ability to capture long-tail items.

CN120013637BActive Publication Date: 2025-10-24ZHEJIANG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510074562.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-10-24
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

Existing graph neural network-based diversity recommendation methods face challenges in balancing accuracy and diversity, easily leading to oversmoothing and the submergence of long-tailed items, making it difficult to effectively capture users' multi-dimensional interests.

Method used

A category-aware neighbor selection strategy is introduced, and the balance and diversity of neighborhood categories are achieved by dynamically adjusting the maximum entropy function. A hierarchical dynamic perception attention mechanism is adopted to adaptively allocate information weights at each layer. Combining item category and value information, a long-tail-oriented contrastive learning optimization module is designed to enhance the representation ability of long-tail items.

Benefits of technology

It achieves an excellent trade-off between recommendation accuracy and diversity, improves the diversity and personalization of recommended content, enhances the ability to represent long-tail items and the generalization of the model, and reduces computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120013637B_ABST
    Figure CN120013637B_ABST
Patent Text Reader

Abstract

An intelligent recommendation method combining diversity and accuracy, comprising: loading a dataset containing user and item interaction records; initializing user and item embeddings, assigning a randomly initialized embedding vector to each user and item with dimension d; constructing a bipartite graph of users and items, where users and items are nodes and interaction relationships are edges; using a category-aware neighbor selection strategy to screen the neighbors of the nodes and generate a category-balanced neighbor subset; using a lightweight graph convolutional network to aggregate information of the category-balanced neighbor subset, using a hierarchical dynamic attention module to weight and fuse multi-layer embeddings, balancing information at different levels, and updating user and item embedding vectors; adopting a multi-task joint training strategy, adjusting the Bayesian personalized loss based on adaptive fusion weights, and combining the main task Bayesian personalized loss and the auxiliary task contrast learning to train and optimize; based on the finally trained user and item embeddings, calculating the inner product between them to obtain the user's rating for the item, and presenting the recommendation list to the user.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of artificial intelligence, and specifically relates to an intelligent recommendation method and device for optimizing the accuracy and diversity trade-off in a recommendation system, aiming to improve the comprehensiveness and accuracy of user experience. BACKGROUND

[0002] In today's era of information overload, the amount of data added daily grows exponentially, and the public's access and digestion of information becomes increasingly difficult. When faced with a vast amount of information, users often have no idea where to start, making it a challenge to filter out truly valuable information. In this context, recommendation systems have emerged as an important tool to alleviate information overload. By analyzing user behavior and preferences, recommendation systems can efficiently provide relevant content to users, thereby improving information acquisition efficiency and user experience.

[0003] Generally speaking, evaluating the effectiveness of a recommendation system usually takes accuracy as a crucial indicator to measure the likelihood of user interaction with a particular item. However, accurate recommendations are not necessarily satisfactory recommendations, and simply optimizing the accuracy of a recommendation system may exacerbate the 'filter bubble' effect, i.e., users are limited to known interests and have difficulty accessing novel and diverse content, which weakens the exploration of new interests. For example, when purchasing clothes on e-commerce platforms such as Taobao and Vipshop, users spend a lot of time browsing autumn and winter clothes in the hope of discovering new fashion styles. If a large number of accurate and similar clothes are recommended, it may lead to user aesthetic fatigue, reducing user purchasing desire and platform stickiness. In recent years, research has shown that improving the diversity of recommended content can significantly improve core business indicators such as user clicks, dwell time, and long-term user retention. By increasing the difference between recommended items, a diversified recommendation system can better capture and satisfy users' different interests, helping users discover potential interests, thereby enriching user experience and creating greater value for the platform. However, optimizing diversity alone often leads to a decline in recommendation accuracy, so how to balance accuracy and diversity, and achieve diversity at the cost of minimal accuracy, is a direction worth researching.

[0004] By representing the user's historical interactions as a user-item bipartite graph, graph-based methods can effectively capture high-order connection information. Graph neural networks (GNNs), as a powerful learning method for processing graph-structured data, are widely used in graph-based recommendation systems. Typical graph-based recommendation systems aggregate information in the neighborhood of each node to generate node embeddings by designing appropriate graph structures and neural networks, thus providing new possibilities for diversified recommendations. However, graph-based diversified recommendation faces the following problems. First, directly stacking layers of information can easily lead to over-smoothing, thus reducing the accuracy of recommendations. Second, how to effectively manipulate the neighborhood to increase diversity is also a problem. If all neighbors are directly aggregated, long-tail items will be overwhelmed by popular items, and the user's multi-dimensional interests cannot be captured. In general, the existing research on diversified recommendation methods based on graph neural networks is still relatively limited, and often faces the dilemma of balancing accuracy and diversity. SUMMARY

[0005] The present invention aims to overcome the above-mentioned shortcomings of the prior art and proposes an intelligent recommendation method and device that balances accuracy and diversity, aiming to solve the contradiction between diversity and accuracy in existing methods.

[0006] Specifically, the present invention proposes a novel training framework, which includes the following core technologies: 1. Category-aware neighbor selection strategy, a category balance penalty term is introduced to dynamically adjust the maximum entropy function, to construct a category-balanced and diversified neighbor subset, providing optimization support for subsequent information aggregation of graph neural networks; 2. Hierarchical dynamic-aware attention mechanism, this method combines static and dynamic attention to adaptively allocate the importance of each layer of information, enhancing the model's ability to capture local and high-order structural information, and alleviating the over-smoothing problem of deep GNNs; 3. Cross-perspective information fusion weight strategy, by fusing the category information and value information of items, the essential attributes of items are grasped from multiple perspectives, and the importance of different items is dynamically adjusted, achieving a more detailed balance between popular items and long-tail items; 4. Long-tail-oriented contrastive learning optimization training module, by dynamically sampling and noise disturbance in embedding space, contrastive learning is integrated into the framework, enhancing the representation learning ability of long-tail items and improving the diversity learning effect. In general, this method achieves an excellent trade-off between recommendation accuracy and diversity.

[0007] The first aspect of the present invention relates to an intelligent recommendation method that balances accuracy and diversity, comprising the following steps:

[0008] S1: Load a dataset containing user and item interaction records;

[0009] S2: Initialize user and item embeddings, assign a randomly initialized embedding vector to each user and item, with a dimension of d;

[0010] S3: Construct a bipartite graph of users and items, where users and items are nodes and interaction relationships are edges;

[0011] S4: Use the category-aware neighbor selection strategy to screen the node's neighbors and generate a category-balanced neighbor subset;

[0012] S5: Use a lightweight graph convolutional network to aggregate information on a category-balanced subset of neighbors, use a hierarchical dynamic attention module to weightedly fuse multiple layers of embedding, balance information at different levels, and update user and item embedding vectors;

[0013] S6: Adopting a multi-task joint training strategy, adjusting the Bayesian personalized loss based on adaptive fusion weights, and combining the main task Bayesian personalized loss with auxiliary task contrastive learning for training optimization;

[0014] S7: Based on the final trained user embedding and item embedding, the inner product between them is calculated to obtain the user's rating of the item, and the K items with the highest ratings are selected as the recommendation list and presented to the user.

[0015] Furthermore, step S4 includes:

[0016] This method aims to improve the embedding representativeness and diversity in the recommendation system by optimizing the neighbor selection process. The traditional submodular neighbor selection method usually uses a greedy algorithm to maximize the maximum entropy function. The algorithm starts from the empty set S u At the beginning, each time we select i∈N that maximizes the marginal gain u \S u , after k steps of greedy selection, a diverse neighbor subset is obtained. This has a hidden problem. When the categories are seriously unbalanced, if the goal of the greedy strategy selection is maximum similarity and representativeness, the model will tend to select those popular categories that can cover more nodes in the similarity metric, because these popular categories occupy the majority in the entire neighborhood Nu. Relatively speaking, unpopular items are often ignored due to their small marginal gain. This phenomenon is particularly obvious when k is small. To solve the above problem, this method optimizes the original neighbor search process and introduces a category balance penalty term to adjust the original maximum entropy function so that the category distribution S of the selected subset is u As close as possible to the neighborhood N u The final function is defined as follows:

[0017]

[0018] The adjusted maximum entropy function f(S u ) function value is higher, indicating that the selected subset can not only effectively represent the entire neighbor set, but also maintain the diversity and balance of categories. represents a penalty term, which is used to reduce the difference between the proportion of the current category in the selected set and the target proportion. When the popular category node is selected too much, the penalty term increases, which weakens the entropy gain of the category, thereby reducing its selection probability in the next step and reducing its probability of being selected in the next step. ′ sim(i, i) represents the similarity between the two terms. In this method, Mahalanobis distance is used to measure the similarity between samples, so that after k steps of selection, a diversified and balanced neighbor subset of each user is obtained for subsequent information aggregation operations.

[0019] Further, step S5 includes:

[0020] S51: Use lightweight graph convolution LGC as the basic GNN layer to directly aggregate the information of diversified and balanced neighbor nodes, update the embedding representation of users and items at different layers. The specific embedding update formula is as follows:

[0021]

[0022] where S u and S i respectively represent the neighbor set of user u and item i obtained by category-aware neighbor selection; is a normalization factor used to avoid the embedding representation value being too large due to multiple aggregation operations. A controllable uniform disturbance is added in the process of layer-by-layer information aggregation, and the generated embedding is saved as an intermediate layer and used for subsequent contrastive learning view.

[0023] S52: In the graph neural network, different layers generate embeddings by aggregating information from neighbor nodes at different hops. The l-th layer mainly aggregates information from l-hop neighbors. This hierarchical aggregation provides an opportunity to introduce diversified information from low-order and high-order neighbors. However, traditional layer attention mechanisms usually rely on static weight allocation, making it difficult to adaptively capture diversified information in high-order neighbors and over-relying on low-order neighbors, thereby limiting the diversity of recommendation results. To overcome this limitation, this method proposes a multi-level dynamic perception attention module that considers both dynamic and static attention. From a global and local perspective, it takes into account the personalized characteristics and overall stability of nodes. The static attention weight is calculated based on the ordinary layer attention mechanism, which is used to measure the importance of each layer embedding. The attention weight parameter W Att ∈R d is set, and the specific calculation formula is:

[0024]

[0025] The weight calculation of the dynamic attention mechanism is based on the initial embedding e (0) and the layer embedding e (l)and combined with the hierarchical bias b (l) To capture the personalized characteristics of the nodes, the design can more accurately reflect the core characteristics of the nodes themselves, and will not be disturbed by the neighbor information. The specific formula is:

[0026]

[0027] Where the function g(x,y,z) = <x,y> + z combines the personalized information and hierarchical information through inner product, and enhances the perception ability between multiple layers through hierarchical bias. The final attention weight distribution is determined by static and dynamic weights, and the final embedding of node u (the same for node i) is represented as:

[0028]

[0029] The dynamic attention mechanism effectively captures the personalized needs of the nodes, while the static attention mechanism ensures the global stability between layers. Compared with traditional methods, the method effectively alleviates the problem of excessive dependence on low-order neighbors in traditional layer attention mechanism, improves diversity and information coverage, and alleviates the over-smoothing problem in deep GNN.

[0030] Further, step S6 comprises:

[0031] S61: Under the premise of preserving the category weighting to improve the long-tail attention, the item value information and category information are fused to further capture the essential information of the fused items, and the final weight of the item fusion value information and category information is calculated;

[0032] S62: Adjust the loss calculation of the main task according to the weight of the item fusion value and category information, and guide the sample sampling of the contrast learning task based on the weight, and finally jointly optimize and train the main task and the auxiliary task.

[0033] Further, step S61 comprises:

[0034] Optimizing the average loss of all samples in the recommendation system may ignore the long-tail categories, leading to insufficient diversity of the recommendation results. To alleviate this problem, the traditional strategy usually calculates the weight based on the category, giving lower weight to popular categories and higher weight to unpopular categories, and reweights the loss to increase the model's attention to unpopular category items and improve diversity. However, this "one-size-fits-all" approach ignores the differences between items within a category: there are high-quality items in popular categories that should not be penalized uniformly; and the quality of unpopular categories is uneven, so overly general weight calculation may cause unnecessary noise. Therefore, a weighting strategy that combines item category and value information is proposed in this method, which preserves the category weighting to improve the attention to the long tail on the premise, and further distinguishes the same category items by introducing the item value factor v(i). Combining the value information perspective of the item, it can help the model to jump out of the limitations of the category information perspective of the item, and further capture and integrate the essential information of the item, and more reasonably balance the accuracy and diversity. The item value factor v(i) can be measured by the user interaction frequency of the item, such as click rate, purchase frequency, etc. The final weight W opt (i) the calculation formula is:

[0035]

[0036] wherein is the normalized category weight, reflecting the scarcity of the category, the fewer the number of category samples, the higher the weight; v(i) is the interaction value of item i, such as the normalized user click frequency or purchase frequency; and a is a regulation parameter for controlling the influence of item interaction value on the final weight.

[0037] Further, step S62 comprises:

[0038] Long-tail items are usually difficult to be fully captured due to the small number of user interactions, leading to the preference and focus of the model on popular items. To address this problem, the method introduces a contrastive learning task based on the optimization of the main task BPR to improve the uniformity and robustness of the embedding distribution, thereby enhancing the representation and capture ability of the model for long-tail items. A long-tail-oriented contrastive learning optimization strategy is designed, and the core idea is to obtain the category balanced weight W opt (i) on the basis of, combined with the dynamic sampling cooling mechanism for subset sampling, and then through the contrastive learning of uniform noise disturbance to focus on unpopular categories or long-tail items, thereby improving the generalization ability and recommendation diversity of the model. Specifically, the weight W opt(i) Weighting the items, so as to increase the selection probability of long-tail and high-value items when sampling the subset, while setting a dynamic sampling upper limit for each item. When the sampling times of an item in the contrast learning subset reach this upper limit, the method will reduce its subsequent selection probability or temporarily exclude it from the candidate set. Through this flow limiting mechanism, it can prevent the contrast learning from giving excessive attention to individual long-tail high-value items, and ensure that the subset maintains a moderate global balance when improving diversity, and then encourage the model to achieve more fine-grained hierarchical information alignment through uniform perturbation noise and cross-layer contrast learning. The optimized joint loss function is as follows:

[0039]

[0040] In the method of the application, for a given user-item pair, not only the representation z i of the final layer is focused on The embedding of the intermediate layer is also included in the contrast target, and by implementing contrast learning between multiple hierarchical embedding representations, the model embedding can capture more stereoscopic features in the representation space. When calculating the loss, the main task (BPR) and contrast learning (CL) are combined for joint optimization. The main task loss focuses on optimizing the preference ordering of positive and negative samples for users to improve recommendation accuracy; the contrast learning loss aims to enhance the diversity and robustness of the representation space and improve the capture ability of long-tail items. μ is a balance parameter used to control the contribution of the contrast learning loss in the overall optimization process. When μ increases, the influence of contrast learning increases, further promoting the representation ability and diversity of long-tail items. Through this joint training method, the model can combine the multi-perspective signals of multi-level embedding, not only maintaining good performance in recommendation accuracy, but also effectively improving diversity and robustness.

[0041] The second aspect of the application relates to an intelligent recommendation device that cooperates diversity and accuracy, comprising a memory and one or more processors, the memory stores executable code, and the one or more processors execute the executable code to implement the intelligent recommendation method of the application that cooperates diversity and accuracy.

[0042] The third aspect of the application relates to a computer readable storage medium, which stores a program, and the program is executed by a processor to implement the intelligent recommendation method of the application that cooperates diversity and accuracy.

[0043] The innovation of the application is: a category-aware neighbor selection strategy is introduced, the balance and diversity of the neighborhood category are realized by dynamically adjusting the maximum entropy function; a hierarchical dynamic perception attention mechanism is adopted to adaptively allocate information weights of each layer, effectively alleviating the over-smoothing problem of deep models; combined with item category and value information, a cross-view information fusion strategy is proposed to optimize weight allocation; a long-tail oriented contrast learning optimization module is designed to enhance the representation ability and diversity learning effect of long-tail items. Through multi-task joint optimization training, the application breaks through the trade-off limitation between accuracy and diversity of traditional algorithms, and greatly improves the recommendation quality and user experience.

[0044] The advantages of the application are: the introduction of the category-aware neighbor selection strategy, the hierarchical dynamic attention mechanism and the cross-view information fusion strategy optimizes the trade-off between accuracy and diversity in the recommendation system, significantly improves the diversity and personalization of the recommended content; by adopting the multi-task joint training strategy, the Bayesian personalized ranking and the auxiliary task containing the long-tail oriented contrast learning optimization module are combined to enhance the representation ability of long-tail items and the generalization of the model; at the same time, the lightweight graph convolutional network is adopted to effectively reduce the computational complexity and improve the training efficiency of the model, thereby ensuring the accuracy of the recommendation while significantly improving the content exploration experience of the user and the platform stickiness, showing high technical innovation and application value. BRIEF DESCRIPTION OF DRAWINGS

[0045] Figure 1 is a flowchart of the application;

[0046] Figure 2 is a model training framework diagram of the application;

[0047] Figure 3 is a device schematic diagram of the application. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application.

[0049] Embodiment 1

[0050] As shown in Figure 1 , an intelligent recommendation method combining accuracy and diversity includes the following specific steps:

[0051] Step S1: loading a data set containing user and item interaction records

[0052] In some embodiments, the public data set can generally be obtained from websites such as Kaggle, and the data set generally contains user id, item id, timestamp, etc.

[0053] Step S2: initializing user and item embeddings

[0054] Based on the loaded data set, initial embedding vectors are generated for each user and item, and the vector dimension is set to d. Vector initialization can use a random distribution or a pre-trained model, such as generating initial values by matrix factorization method. These embedding vectors are used to represent the characteristics of users and items, which will be dynamically updated according to the training. A lookup table E is used to map user-item IDs to dense vectors (0) The corresponding embedding representation can be obtained from the lookup table by indexing. The initial embedding lookup table of users and items is as follows:

[0055]

[0056] Step S3: Constructing a user-item bipartite graph

[0057] The relationship between users and items is extracted from the user's interaction record to construct a bipartite graph. User nodes and item nodes are respectively used as two types of nodes in the bipartite graph, and the interaction behavior between users and items is used as an edge. The weight of each edge can be set according to the interaction strength (such as the number of clicks or the frequency of purchase).

[0058] Step S4: Using a category-aware neighbor selection strategy to screen the neighbors of the nodes and generate a category-balanced neighbor subset

[0059] The present application uses a new class-balanced neighbor selection strategy to adjust the original neighbor search process, and introduces a class balance penalty term, so that the selected subset class distribution S u is as close as possible to the distribution of the neighborhood N u . The diversity is measured by the adjusted maximum entropy function, and the final function is defined as follows:

[0060]

[0061] f(S u ) function value is higher, which not only can effectively represent the entire neighbor set, but also can maintain the diversity and balance of the category. Among them represents the penalty term, which is used to adjust the difference between the proportion of the current category in the selected set and the target proportion. When the popular category node is selected too much, the penalty term increases, which weakens the entropy gain of this category, thereby reducing its selection probability in the next step. Such function design can make the distribution of the finally selected neighbor nodes as close as possible to the initial neighborhood distribution. After k-step adjustment, a diversified and balanced neighbor subset for each user can be obtained.

[0062] Step S5: Using a lightweight graph convolutional network to aggregate information of the category-balanced neighbor subset, and using a hierarchical dynamic attention module to weight and fuse multi-layer embedding

[0063] Lightweight Graph Convolution (LGC) is used as the basic GNN layer to directly aggregate the information of diversified and balanced neighbor nodes, update the embedding representation of users and items at different layers, and the specific embedding update formula is as follows:

[0064]

[0065] Where S u and S i respectively represent the neighbor set of user u and item i obtained by category-aware selection, where the aggregation process is the category-aware information aggregation in Figure 1 , and a uniform controllable perturbation is added to the embedding as an intermediate layer to be saved for subsequent contrastive learning view. In graph neural networks, different layers generate embeddings by aggregating information from neighbor nodes at different hops. The l-th layer mainly aggregates information from l-hop neighbors. After LGC obtains the embedding representation of neighbor information aggregated at different layers, the method uses a dynamic and static combined attention mechanism to consider global and local perspectives, taking into account the personalized characteristics and overall stability of the nodes. The static attention weight is calculated based on the ordinary layer attention mechanism, which is used to measure the importance of each layer embedding. The dynamic attention mechanism uses the initial embedding of the node to assist in generating dynamic attention weights, ensuring that the model can consider both the essential characteristics and diversity goals of the nodes when aggregating multi-layer embeddings. The specific formula is:

[0066]

[0067] Where the function g(x, y, z) = <x, y> + z combines the personalized information and hierarchical information through inner product, and the hierarchical bias is used to enhance the perception ability between multiple layers. The final attention weight allocation is determined by the static and dynamic weights, and the final embedding of node u (the same for node i) is represented as:

[0068]

[0069] Step S6: A multi-task joint training strategy is used to combine the main task Bayesian personalized loss and the auxiliary task contrastive learning to train and optimize

[0070] As shown in the accompanying Figure 2 , to address the shortcomings in the calculation of category weights, the method proposes an adjustment strategy that combines item category and value information. Under the premise of preserving category weighting to improve long-tail attention, the value factor v(i) of the item is introduced to further divide the item category. The item value factor can be calculated based on the user interaction frequency (such as click and purchase times) of the item, and the adjusted weight W opt (i) is calculated as:

[0071]

[0072] The loss calculation of the main task is adjusted according to the weight of the fused value and category information of the item, and the sampling of the sample of the contrast learning task is guided based on the weight. In the sampling process, the selection probability of the item is adjusted according to the weight W opt (i) Adjust the selection probability of the item, and set a dynamic sampling upper limit for each item. When the sampling number of a certain item in the contrast learning subset reaches the upper limit, the subsequent selection probability of the item is reduced or the item is temporarily excluded from the candidate set. Through this flow limiting mechanism, it can prevent the contrast learning from paying excessive attention to individual long-tail high-value items, and ensure that the subset maintains moderate global balance when improving diversity. Through cross-layer contrast learning, the intermediate layer and the final embedding layer representation recorded in step S5 are taken as two different views of contrast learning, encouraging the model to achieve finer-grained hierarchical information alignment. Finally, the main task and the auxiliary task are jointly optimized and trained. The specific loss function design is as follows:

[0073]

[0074] In the method, for a given user-item pair, not only the representation z i of the final layer is focused on, but also the embedding h of the intermediate layer is included in the contrast target. Through contrast learning between multiple hierarchical embedding representations, the model embedding can capture more stereoscopic features in the representation space. Finally, the main task (BPR) and the contrast learning (CL) are combined for joint optimization when calculating the loss. The main task loss focuses on optimizing the preference ordering of the user for positive and negative samples to improve recommendation accuracy; the contrast learning loss aims to enhance the diversity and robustness of the representation space and improve the capture ability of long-tail items. Through this joint training method, the model can combine the multi-perspective signals of multi-level embedding, not only maintaining good performance in recommendation accuracy, but also effectively improving diversity and robustness.

[0075] Step S7: Based on the finally trained user embedding and item embedding, the inner product between them is calculated to obtain the rating of the user to the item. The K items with the highest ratings are recommended to the user

[0076] Finally, the trained embedding representations e u and e i are retained, and the inner product is calculated to obtain the interaction probability between items. The inner product result represents the relevance score of the user u to the item i, and the higher the score, the greater the interest of the user to the item. Specifically, for each user u, a set of matching scores is obtained by calculating the relevance scores of all candidate items, and the recommendation result is output in descending order. Usually, the top K items with the highest scores are taken as the final recommendation result output. The output form of the recommendation result can be a list of items or a specific product display page.

[0077] Embodiment 2

[0078] With reference to Figure 3 The embodiment relates to an intelligent recommendation device with synergy of diversity and accuracy, including a memory and one or more processors, the memory has stored executable codes, and the one or more processors execute the executable codes to implement the intelligent recommendation method with synergy of diversity and accuracy in the embodiment 1.

[0079] Embodiment 3

[0080] The embodiment relates to a computer readable storage medium, and a program is stored on the computer readable storage medium, the program is executed by a processor to implement the intelligent recommendation method with synergy of diversity and accuracy in the embodiment 1.

[0081] It should be noted that, although the above embodiments of the present application are illustrative, this is not a limitation of the present application, therefore the present application is not limited to the above specific embodiments. Any other embodiments obtained by those skilled in the art under the inspiration of the present application without departing from the principles of the present application are considered to be within the protection scope of the present application.

Claims

1. A method of intelligent recommendation that synergizes diversity and accuracy, characterized in that, Comprising the following steps: S1: loading a dataset containing user and item interaction records; S2: initializing user and item embeddings, assigning a randomly initialized embedding vector to each user and item with dimension d; S3: constructing a bipartite graph of users and items, where users and items are nodes and interaction relationships are edges; S4: using a category-aware neighbor selection strategy to filter the neighbors of the nodes and generate a category-balanced neighbor subset; Specifically, it includes: a maximum entropy function that takes into account the balanced distribution of categories to measure diversity, the function is: where S u is the selected neighbor set of user u, i is an item, N u is the neighborhood, represents the penalty term, the neighbor selection strategy after k-step adjustment, and the diversified and balanced neighbor subset of each user. S5: using a lightweight graph convolutional network to aggregate information of the category-balanced neighbor subset, using a hierarchical dynamic attention module to weight and integrate multi-layer embeddings, balancing information at different levels, and updating user and item embedding vectors; Specifically, it includes: S51: aggregate information of neighbor nodes, update user and item embedding representation at different layers, and generate intermediate layer embedding as a reference for subsequent contrastive learning view; S52: Construct a multi-level dynamic perception attention module, combine dynamic attention and static attention, and calculate the static attention weight based on the general layer attention mechanism; the weight calculation of the dynamic attention mechanism is based on the initial embedding e of the node (0) and the embedding e of each layer (l) , and combine the hierarchical bias b (l) ; use the initial embedding of the node to assist in generating the dynamic attention weight, and the specific formula is: Where the function g(x,y,z) = <x,y>+z, the final embedding representation of node u is: η is the fusion hyperparameter; S6: adopt a multi-task joint training strategy, adjust the Bayesian personalized loss based on adaptive fusion weight, and combine the main task Bayesian personalized loss and auxiliary task contrastive learning for training and optimization; Specifically, it includes: S61: Calculate the final weight W of the item interaction value and category opt (i) the calculation formula is: wherein is the normalized category weight; v(i) is the interaction value of item i, i.e., the normalized number of clicks or purchase times; and a is an adjustment parameter. S62: adjust the loss calculation of the main task based on the optimal weight, and guide the sampling of the contrastive learning task based on the optimal weight, and finally jointly optimize and train the main task and auxiliary task; S7: based on the final trained user embedding and item embedding, calculate the inner product between them to get the user's rating of the item, and select the top K items with the highest score as the recommendation list to present to the user.

2. The method of claim 1, wherein, In step S51, the specific embedding update formula is as follows: where S u and S i denote the neighbor sets of user u and item i, respectively, obtained by module selection; is a normalization factor.

3. The method of claim 1, wherein Step S62 specifically includes: An optimization strategy for contrastive learning oriented to long-tail guidance is designed, which uses a dynamic sampling cooling mechanism for subset sampling, and then encourages the model to achieve finer-grained hierarchical information alignment through cross-layer contrastive learning. The optimized joint loss function is as follows: where z i is the characterization of the final layer, is the embedding of the intermediate layer.

4. An intelligent recommendation apparatus that synergizes diversity and accuracy, characterized by, The memory and one or more processors, the memory has stored executable code, the one or more processors execute the executable code to implement the intelligent recommendation method with collaborative diversity and accuracy in any one of claims 1-3.

5. A computer readable storage medium, characterized in that, A program is stored thereon, which is executed by a processor to implement the intelligent recommendation method with collaborative diversity and accuracy in any one of claims 1-3.

Citation Information

Patent Citations

  • Recommendation system-oriented attention network architecture and optimization method thereof

    CN119761415A

  • Directed graph transformers

    US20250077670A1