Intelligent recommendation method and device for collaborative accuracy and diversity
By introducing category-aware neighbor selection strategies, hierarchical dynamic perceived attention mechanisms, cross-perspective information fusion strategies and long-tail-oriented contrast learning optimization training modules in the recommendation system, the problem of diversity and accuracy trade-offs in the existing technology is solved, and more efficient user interest capture and recommendation quality improvement is achieved.
Patent Information
- Application Number
- CN202510074562.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-01-17
AI Technical Summary
Existing diversified recommendation methods based on graph neural networks have problems with oversmoothing and long-tail projects being flooded when weighing accuracy and diversity, making it difficult to effectively capture users' multi-dimensional interests.
An intelligent recommendation method is proposed to optimize the information aggregation and training process of the recommendation system by introducing category-aware neighbor selection strategy, hierarchical dynamic perceived attention mechanism, cross-perspective information fusion strategy and long-tail-oriented contrast learning optimization training module, and optimized the information aggregation and training process of the recommendation system to achieve an excellent trade-off for accuracy and diversity.
It effectively alleviates the oversmoothing problem in deep GNN, improves the diversity and personalization of recommended content, significantly improves user experience and platform stickiness, and achieves a more detailed balance of popular and long-tail projects.
Smart Images

Figure CN120013637A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology, and specifically relates to an intelligent recommendation method and device for optimizing the trade-off between accuracy and diversity in a recommendation system, aiming to improve the comprehensiveness and accuracy of user experience. Background Art
[0002] In today's era of information overload, the amount of new data added every day is growing exponentially, and it is becoming increasingly difficult for the public to obtain and digest information. Users often have no idea where to start when faced with massive amounts of information, making it a major 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 users with relevant content, thereby improving information acquisition efficiency and user experience.
[0003] Generally speaking, accuracy is often used as a critical indicator to evaluate the effectiveness of a recommendation system, which is used to measure the likelihood of users interacting with specific items. However, accurate recommendations are not necessarily satisfactory recommendations. Simply optimizing the accuracy of the recommendation system may exacerbate the "filter bubble" effect, that is, users are limited to a known range of interests and have difficulty in accessing novel and diverse content, which weakens the exploration of new points of interest. For example, when buying 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 styles of dressing. If a large number of accurate and similar clothes are recommended, it may cause aesthetic fatigue in users, reduce their desire to buy and reduce platform stickiness. In recent years, studies have 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 differences between recommended items, a diversified recommendation system can better capture and meet the different interests of users, help users discover potential interests, thereby enriching the user experience and creating greater value for the platform. However, optimizing diversity alone often leads to a decrease in recommendation accuracy. Therefore, how to balance accuracy and diversity and exchange diversity for the minimum accuracy cost is a direction worth studying.
[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 the information of each node's neighborhood to generate node embeddings by designing appropriate graph structures and neural networks, thus providing new possibilities for diversified recommendations. However, graph-based diversified recommendations face the following problems. First, directly stacking information at each layer is prone to over-smoothing problems, thereby 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, the long-tail items will be overwhelmed by popular items, and the user's multi-dimensional interests cannot be captured. In general, 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 of the invention
[0005] The present invention aims to overcome the above-mentioned shortcomings of the prior art and proposes an intelligent recommendation method and device that coordinates accuracy and diversity, aiming to resolve the contradiction between diversity and accuracy in the existing methods.
[0006] Specifically, the present invention proposes a novel training framework, the core technologies of which include: 1. Category-aware neighbor selection strategy, which introduces category-balanced penalty terms to dynamically adjust the maximum entropy function to construct a category-balanced and diverse neighbor subset, providing optimization support for the information aggregation of subsequent graph neural networks; 2. Hierarchical dynamic perception attention mechanism, which combines static and dynamic attention, adaptively allocates the importance of information at each layer, enhances the model's ability to capture local and high-order structural information, and alleviates the over-smoothing problem of deep GNN; 3. Cross-perspective information fusion weight strategy, which grasps the essential attributes of items from multiple perspectives by fusing the category information and value information of items, dynamically adjusts the importance of different items, and achieves a more detailed balance between popular items and long-tail items; 4. Long-tail-oriented contrastive learning optimization training module, which integrates contrastive learning into the framework through dynamic sampling and noise perturbation of the embedding space, enhances the representation learning ability of long-tail items, and improves the diversity learning effect. In general, this method achieves an excellent trade-off between recommendation accuracy and diversity.
[0007] A first aspect of the present invention relates to an intelligent recommendation method for coordinated accuracy and diversity, comprising the following steps:
[0008] S1: Load the dataset containing the interaction records between users and items;
[0009] S2: Initialize user and item embeddings, assigning a randomly initialized embedding vector of dimension d to each user and item;
[0010] S3: Construct a bipartite graph of users and items, where users and items are nodes and interaction relationships are edges;
[0011] S4: Use a category-aware neighbor selection strategy to screen the neighbors of the node 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 and auxiliary task comparative 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] Further, 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 an implicit 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 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 because of 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 selected subset category distribution S u As close as possible to the neighborhood N u The final function definition is as follows:
[0017]
[0018] The adjusted maximum entropy function f(S u )The higher the function value, the more the selected subset can not only effectively represent the entire neighbor set, but also maintain the diversity and balance of the categories. represents the 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 nodes are selected too much, the penalty term increases, weakening 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 two items. In this method, the Mahalanobis distance is used to measure the similarity between samples. After k steps of selection, a diverse 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 diverse and balanced neighbor nodes and 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 They represent the neighbor sets of user u and item i obtained through category-aware neighbor selection respectively; It is a normalization factor used to avoid multiple aggregation operations that result in too large an embedding representation value. A controllable uniform perturbation is added during the layer-by-layer information aggregation process. The generated embedding is saved as an intermediate layer for subsequent contrastive learning views.
[0023] S52: In graph neural networks, different layers generate embeddings by aggregating information from neighboring nodes with different hop counts. The lth layer mainly aggregates information from l-hop neighbors. This hierarchical aggregation provides an opportunity to introduce diverse information from low-order and high-order neighbors. However, traditional layer attention mechanisms usually rely on static weight allocation, which makes it difficult to adaptively capture diverse information in high-order neighbors and over-rely on low-order neighbors, thereby limiting the diversity of recommendation results. In order to break out of this limitation, this method proposes a multi-level dynamic perception attention module, which comprehensively considers dynamic and static attention, and takes into account the personalized characteristics and overall stability of nodes from both global and local perspectives. The static attention weight is calculated based on the ordinary layer attention mechanism, which is used to measure the importance of each layer of embedding, and sets the parameter W of the attention weight. Att ∈R d , the specific calculation formula is:
[0024]
[0025] The weight calculation of the dynamic attention mechanism is based on the initial embedding of the node (0) and each layer is embedded (l), and combined with the level bias b (l) , in order to capture the personalized characteristics of the node, this design can more accurately reflect the core characteristics of the node itself without being disturbed by neighbor information. The specific formula is:
[0026]
[0027] The function g(x,y,z)=<x,y> +z, combines 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. The final embedding of node u (the same applies to node i) is expressed as:
[0028]
[0029] The dynamic attention mechanism effectively captures the personalized needs of nodes, while the static attention mechanism ensures global stability between layers. Compared with traditional methods, this method effectively alleviates the problem of over-reliance on low-order neighbors in traditional layer attention mechanisms, improves diversity and information coverage, and alleviates the over-smoothing problem in deep GNNs.
[0030] Further, step S6 includes:
[0031] S61: Under the premise of retaining the category weighting to improve the long-tail attention, the value information of the item and the category information are integrated to further capture the essential information of the integrated item, and the final weight of the integrated value information and category information of the item is calculated;
[0032] S62: Adjust the loss calculation of the main task according to the weight of the fusion value and category information of the item, and guide the sample sampling of the comparative learning task based on the weight, and finally jointly optimize the main task and the auxiliary task.
[0033] Furthermore, step S61 includes:
[0034] Optimizing the average loss of all samples in the recommendation system may ignore the long-tail categories, resulting in insufficient diversity in the recommendation results. To alleviate this problem, traditional strategies usually calculate weights based on categories, assigning lower weights to popular categories and higher weights to unpopular categories, and re-weighting the calculated loss to increase the model's attention to unpopular category items and improve diversity. However, this "one-size-fits-all" approach ignores the differences in items within categories: there are valuable and high-quality items in popular categories that should not be suppressed indiscriminately; while the quality of unpopular categories varies, and overly general weighting calculations may lead to unnecessary noise. Therefore, this method proposes a weight adjustment strategy that integrates item category and value information. On the premise of retaining category weights to improve long-tail attention, the item value factor v(i) is introduced to further distinguish similar items. Combining the perspective of item value information can help the model break away from the limitations of the item category information perspective, further capture the essential information of the fused item, and more reasonably balance accuracy and diversity. Item value factor v(i), which can be measured by the user interaction frequency of the item, such as click-through rate, number of purchases, etc. The final weight W opt (i) The calculation formula is:
[0035]
[0036] in is the normalized category weight, which reflects the scarcity of the category. The smaller the number of category samples, the higher the weight. v(i) is the interaction value of item i, such as the normalized number of user clicks or purchases. α is an adjustment parameter used to control the impact of the item interaction value on the final weight.
[0037] Furthermore, step S62 includes:
[0038] Long-tail items are usually difficult to fully capture due to the small number of user interactions, which leads to the model's preference and focus on popular items. To address this problem, this method introduces a contrastive learning task based on the main task BPR optimization to improve the uniformity and robustness of the embedding distribution, thereby enhancing the model's ability to represent and capture long-tail items. A long-tail-oriented contrastive learning optimization strategy is designed. The core idea is to obtain the category balance weight W opt (i) Based on this, we combine the dynamic sampling cooling mechanism to perform subset sampling, and then use contrastive learning with uniform noise perturbation to focus on unpopular categories or long-tail items, thereby improving the generalization ability and recommendation diversity of the model. Specifically, using the weight W opt(i) Weight the items to increase the probability of long-tail and high-value items being selected when sampling the subset, and set a dynamic sampling upper limit for each item. When the number of samples of an item in the contrastive learning subset reaches this upper limit, this method will reduce its subsequent probability of selection or temporarily remove it from the candidate set. This current limiting mechanism can prevent contrastive learning from paying too much attention to individual long-tail high-value items, ensuring that the subset maintains a moderate global balance while improving diversity, and then encourages the model to achieve finer-grained hierarchical information alignment through uniform perturbation noise and cross-layer contrastive learning. The optimized joint loss function is as follows:
[0039]
[0040] In the method of the present invention, for a given user-item pair, we not only focus on the representation z of the final layer i , and also embed the middle layer Incorporating it into the contrast objective, by implementing contrastive learning between multiple levels of embedded representations, the model embedding can capture more three-dimensional features in the representation space. When finally calculating the loss, the main task (BPR) and contrastive learning (CL) are combined for joint optimization. The main task loss focuses on optimizing the user's preference ranking of positive and negative samples to improve the recommendation accuracy; the contrastive learning loss aims to enhance the diversity and robustness of the representation space and improve the ability to capture long-tail items. μ is a balancing parameter used to control the contribution of contrastive learning loss in the overall optimization process. When μ increases, the impact of contrastive learning increases, further promoting the representation ability and diversity of long-tail items. Through this joint training method, the model can combine multi-perspective signals of multi-level embedding, which can not only maintain good performance at the recommendation accuracy level, but also effectively improve diversity and robustness.
[0041] A second aspect of the present invention relates to an intelligent recommendation device for collaborative diversity and accuracy, comprising a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the intelligent recommendation method for collaborative diversity and accuracy of the present invention.
[0042] A third aspect of the present invention relates to a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the intelligent recommendation method of the present invention for coordinated diversity and accuracy.
[0043] The innovation of the present invention lies in: introducing a category-aware neighbor selection strategy, achieving balance and diversification of neighborhood categories by dynamically adjusting the maximum entropy function; adopting a hierarchical dynamic perception attention mechanism, adaptively allocating information weights at each layer, effectively alleviating the over-smoothing problem of deep models; combining item categories and value information, proposing a cross-perspective information fusion strategy to optimize weight allocation; designing a long-tail-oriented contrastive learning optimization module to enhance the representation ability and diversity learning effect of long-tail items. Through multi-task joint optimization training, the present invention breaks through the trade-off limitations of traditional algorithms between accuracy and diversity, and greatly improves the recommendation quality and user experience.
[0044] The advantages of the present invention are: the introduction of a category-aware neighbor selection strategy, a hierarchical dynamic attention mechanism and a cross-view information fusion strategy optimizes the trade-off between accuracy and diversity in the recommendation system, and significantly improves the diversity and personalization of recommended content; by adopting a multi-task joint training strategy, the Bayesian personalized sorting and auxiliary tasks including a long-tail guided contrastive learning optimization module are combined to enhance the representation capability of long-tail items and the generalization of the model; at the same time, the use of a lightweight graph convolutional network effectively reduces the computational complexity and improves the training efficiency of the model, thereby significantly improving the user's content exploration experience and platform stickiness while ensuring the accuracy of the recommendation, showing high technical innovation and application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic diagram of the process of the present invention;
[0046] Figure 2 It is a model training framework diagram of the present invention;
[0047] Figure 3 It is a schematic diagram of the device of the present invention. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0049] Example 1
[0050] like Figure 1 As shown in FIG. 1 , an intelligent recommendation method for coordinating accuracy and diversity includes the following specific steps:
[0051] Step S1: Load the dataset containing user-item interaction records
[0052] In some embodiments, a public data set can usually be obtained from a website such as Kaggle, and the data set generally includes information such as user ID, item ID, and timestamp;
[0053] Step S2: Initialize user and item embeddings
[0054] Based on the loaded dataset, an initial embedding vector is generated for each user and item, and the vector dimension is set to d. Vector initialization can use random distribution or pre-trained models, such as generating initial values through matrix decomposition methods. These embedding vectors are used to represent the characteristics of users and items, and will be dynamically updated based on training. Lookup table E that maps user-item IDs to dense vectors (0) , the corresponding embedding representation can be obtained from the lookup table through the index. The initial embedding lookup table for users and items is as follows:
[0055]
[0056] Step S3: Construct a user-item bipartite graph
[0057] The relationship between users and items is extracted from the user's interaction records to construct a bipartite graph. User nodes and item nodes are used as two types of nodes in the bipartite graph, and the interaction between users and items is used as edges. The weight of each edge can be set according to the interaction intensity (such as the number of clicks or purchase frequency).
[0058] Step S4: Use the category-aware neighbor selection strategy to screen the neighbors of the node and generate a category-balanced neighbor subset
[0059] The present invention uses a new class-balanced neighbor selection strategy, adjusts the original neighbor search process, and introduces a class-balanced penalty term so that the selected subset class distribution S u As close as possible to the neighborhood N u The distribution of is measured by the adjusted maximum entropy function, and the final function is defined as follows:
[0060]
[0061] f(S u ) function, the higher the value, the more the selected neighbor subset can not only effectively represent the entire neighbor set, but also maintain the diversity and balance of the categories. Represents a 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 too many popular category nodes are selected, the penalty term increases, weakening the entropy gain of the category, thereby reducing its selection probability in the next step. Such a function design can make the final selected neighbor node distribution as close as possible to the initial neighborhood distribution. After k steps of adjustment, the selection can obtain a diverse and balanced neighbor subset for each user.
[0062] Step S5: Use a lightweight graph convolutional network to aggregate information on a class-balanced subset of neighbors, and use a hierarchical dynamic attention module to weightedly fuse multiple layers of embedding
[0063] Lightweight graph convolution LGC is used as the basic GNN layer to directly aggregate the information of diverse and balanced neighbor nodes and update the embedding representation of users and items at different layers. The specific embedding update formula is as follows:
[0064]
[0065] Where S u and S i They represent the neighbor sets of user u and item i obtained through category-aware selection. The aggregation process here is Figure 1 The category-aware information in the graph is aggregated, and uniform and controllable perturbations are added to the embeddings to save them as intermediate layers for subsequent comparative learning views. In graph neural networks, different layers generate embeddings by aggregating information from neighboring nodes with different numbers of hops, and the lth layer mainly aggregates information from l-hop neighbors. After LGC obtains the embedded representation of aggregated neighbor information at different layers, this method uses a dynamic and static combined attention mechanism to comprehensively consider the 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 to measure the importance of each layer of embedding. The dynamic attention mechanism uses the initial embedding of the node to assist in the generation of dynamic attention weights, ensuring that the model can take into account the essential characteristics of the node and the diversity goals when aggregating multiple layers of embeddings. The specific formula is:
[0066]
[0067] The function g(x,y,z)=<x,y> +z, combines 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. The final embedding of node u (the same applies to node i) is expressed as:
[0068]
[0069] Step S6: Adopt a multi-task joint training strategy to combine the main task Bayesian personalized loss and auxiliary task contrastive learning to train and optimize
[0070] As attached Figure 2 As shown in Figure 1, in response to the shortcomings in the calculation of category weights, this method proposes an adjustment strategy that combines item categories and value information. On the premise of retaining the category weights to improve the long-tail attention, the item value factor v(i) is introduced to further divide the item categories. The item value factor can be calculated based on the user interaction frequency of the item (such as clicks, purchases), and the adjusted weight W opt (i) The calculation formula is:
[0071]
[0072] The loss calculation of the main task is adjusted according to the weight of the fusion value and category information of the item, and the sample sampling of the contrastive learning task is guided by the weight. opt (i) Adjust the probability of item selection and set a dynamic sampling upper limit for each item. When the number of samples of an item in the comparative learning subset reaches this upper limit, reduce its subsequent probability of selection or temporarily remove it from the candidate set. This flow-limiting mechanism can prevent comparative learning from paying too much attention to individual long-tail high-value items, ensuring that the subset maintains a moderate global balance while improving diversity. Through cross-layer comparative learning, the intermediate layer and the final embedding layer representations of the records retained in step S5 are used as two different views of comparative learning, encouraging the model to achieve more fine-grained hierarchical information alignment. Finally, the main task and auxiliary task are jointly optimized and trained. The specific loss function is designed as follows:
[0073]
[0074] In this method, for a given user-item pair, we not only focus on the representation z i , and also embed the middle layer Incorporating it into the contrast objective, by implementing contrastive learning between multiple levels of embedded representations, the model embedding can capture more three-dimensional features in the representation space. When finally calculating the loss, the main task (BPR) and contrastive learning (CL) are combined for joint optimization. The main task loss focuses on optimizing the user's preference ranking for positive and negative samples to improve the accuracy of recommendations; the contrastive learning loss aims to enhance the diversity and robustness of the representation space and improve the ability to capture long-tail items. Through this joint training method, the model can combine multi-perspective signals of multi-level embeddings, which can not only maintain good performance in terms of recommendation accuracy, but also effectively improve diversity and robustness.
[0075] Step 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 recommended to the user.
[0076] Finally, retain the trained embedding representation e u and e i , the inner product calculation can be performed to obtain the interaction probability between items. The inner product result represents the relevance score between user u and item i. The higher the score, the greater the user's interest in the item. Specifically, for each user u, by calculating its relevance score with all candidate items, a set of matching scores is obtained, and the recommendation results are output in descending order. Usually, the K items with the highest scores are intercepted as the final recommendation result output. The output form of the recommendation result can be a project list or a specific product display page.
[0077] Example 2
[0078] Reference Figure 3 This embodiment relates to an intelligent recommendation device for collaborative diversity and accuracy, including a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the intelligent recommendation method for collaborative diversity and accuracy of Example 1.
[0079] Example 3
[0080] This embodiment relates to a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the intelligent recommendation method for collaborative diversity and accuracy of Embodiment 1 is implemented.
[0081] It should be noted that although the embodiments of the present invention described above are illustrative, they are not intended to limit the present invention, and therefore the present invention is not limited to the above specific embodiments. Without departing from the principles of the present invention, any other embodiments obtained by those skilled in the art under the guidance of the present invention are deemed to be within the protection of the present invention.
Claims
1. An intelligent recommendation method for collaborative diversity and accuracy, characterized in that: The following steps are involved: S1: Load the dataset containing the interaction records between users and items; S2: Initialize user and item embeddings, assigning a randomly initialized embedding vector of dimension d to each user and item; S3: Construct a bipartite graph of users and items, where users and items are nodes and interaction relationships are edges; S4: Use a category-aware neighbor selection strategy to screen the neighbors of the node and generate a category-balanced neighbor subset; 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; 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 and auxiliary task comparative learning for training optimization; 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.
2. The method according to claim 1, characterized in that Step S4 specifically includes: A maximum entropy function that takes into account the balanced distribution of categories is designed, so that the category distribution S of the selected subset u As close as possible to the neighborhood N u The distribution of is measured by the adjusted maximum entropy function, which is defined as follows: The higher the value of the function, the better the representativeness and category diversity of the selected neighborhood subset; Represents a 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 too many popular category nodes are selected, the penalty term increases, weakening the entropy gain of the category, thereby reducing its selection probability in the next step. After the neighbor selection strategy after k steps of adjustment, a diversified and balanced neighbor subset for each user is obtained for subsequent aggregation operations.
3. The method according to claim 1, characterized in that Step S5 specifically includes: S51: Use lightweight graph convolution LGC as the basic GNN layer to directly aggregate the information of diverse and balanced neighbor nodes and update the embedding representation of users and items at different layers. The specific embedding update formula is as follows: Where S u and S i They represent the neighbor sets of user u and item i obtained through module selection respectively; It is a normalization factor, which is used to avoid multiple aggregation operations that lead to excessive embedding representation values. It adds controllable uniform perturbations in the process of layer-by-layer information aggregation. The generated embedding is saved as an intermediate layer and used as a subsequent contrastive learning view. S52: Construct a multi-level dynamic perception attention module, combining dynamic attention and static attention, taking into account both the individual characteristics and overall stability of nodes from a global and local perspective; static attention weights are calculated based on the ordinary layer attention mechanism to measure the importance of each layer of embedding; the weight calculation of the dynamic degree attention mechanism is based on the initial embedding of the node (0) and each layer is embedded (l) , and combined with the level bias b (l) , to capture the personalized characteristics of the node; the initial embedding of the node is used to assist in generating dynamic attention weights. The specific formula is: The function g(x, y, z) =<x,y> +z, combines personalized information and hierarchical information through inner product, and enhances the perception ability between multiple layers through hierarchical bias; the final attention weight allocation is determined by static and dynamic weights, and the final embedding of node u is expressed as: By adjusting the fusion hyperparameter η, the model can capture focused global and local information while alleviating the over-smoothing problem in deep GNNs.
4. The method according to claim 1, characterized in that: Step S6 specifically includes: S61: Under the premise of retaining the category weighting to improve the long-tail attention, the value information of the item and the category information are integrated to further capture the essential information of the integrated item and calculate the final weight of the integrated value information and category information of the item; S62: Adjust the loss calculation of the main task according to the weight of the fusion value and category information of the item, and guide the sample sampling of the comparative learning task based on the weight, and finally jointly optimize the main task and the auxiliary task.
5. The method according to claim 4, characterized in that Step S61 specifically includes: The weighting strategy that integrates item category and value information, while retaining the category weighting to improve the long-tail attention, introduces the item value factor v(i) to further distinguish items; the item value factor is measured by the user interaction frequency, and the final weight W opt (i) The calculation formula is: in is the normalized category weight, which reflects the scarcity of the category. The fewer the category samples, the higher the weight. v(i) is the interaction value of item i. α is an adjustment parameter used to control the impact of the item interaction value on the final weight.
6. The method according to claim 4, characterized in that Step S62 specifically includes: Design a long-tail oriented contrastive learning optimization strategy to obtain the category balance weight W opt (i) Based on this, a dynamic sampling cooling mechanism is used to perform subset sampling, and then cross-layer contrastive learning is used to encourage the model to achieve more fine-grained hierarchical information alignment. The optimized joint loss function is as follows: For a given user-item pair, we not only focus on the representation z at the final layer i , and also embed the middle layer By incorporating contrastive learning into the contrastive objectives and implementing contrastive learning between multiple levels of embedded representations, the model embedding in the representation space can capture more three-dimensional features; when finally calculating the loss, the main task (BPR) and contrastive learning (CL) are combined for joint optimization. The main task loss focuses on optimizing the user's preference ranking of positive and negative samples to improve the recommendation accuracy; the contrastive learning loss aims to enhance the diversity and robustness of the representation space and improve the ability to capture long-tail items; through this joint training method, the model can not only maintain good performance in terms of recommendation accuracy, but also effectively improve diversity and robustness.
7. An intelligent recommendation device for coordinated diversity and accuracy, characterized in that: The invention comprises a memory and one or more processors, wherein the memory stores executable codes, and when the one or more processors execute the executable codes, the intelligent recommendation method for collaborative diversity and accuracy as described in any one of claims 1 to 6 is implemented.
8. A computer-readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by a processor, the intelligent recommendation method for collaborative diversity and accuracy as described in any one of claims 1-6 is implemented.
Citation Information
Patent Citations
Lightweight video action recognition method
CN113673307A
Recommendation system-oriented attention network architecture and optimization method thereof
CN119761415A
Sequwncw recommendation method based on extracting and modeling of complex multi-mode user interests
GB202316980D0
Semisupervised autoencoder for sentiment analysis
US20180165554A1
Utilizing embedding-based claim-relation graphs for efficient syntopical reading of content collections
US20240419921A1
Cited By
Online adaptive information recommendation method and system based on graph retrieval enhancement
CN120723981A
Side information fusion recommendation method based on double-end multi-expert network and group balance routing
CN121210773A
A side information fusion recommendation method based on a double-end multi-expert network and group balanced routing
CN121210773B