Content pushing method based on double-layer attention mechanism and heterogeneous graph convolutional network
By adopting a two-layer attention mechanism and heterogeneous graph convolution network in the recommendation system, the user-project heterogeneous graph and learning embedded representations are solved, and the diversity and accuracy balance problem in the existing recommendation system is improved.
Patent Information
- Application Number
- CN202510375767.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-06-13
AI Technical Summary
When improving recommendation accuracy, existing recommendation systems ignore factors such as diversity, freshness and interpretability, resulting in problems that are difficult to capture information redundancy and changes in user interests.
The content push method based on the bilayer attention mechanism and heterogeneous graph convolution network is adopted to optimize the diversity of recommended results by constructing user-project heterogeneous graphs, learning the embedded representation of users and projects, and reducing interference from noise information through the bilayer attention mechanism.
Effectively balance the diversity and accuracy in the recommendation system, significantly improve the diversity of recommendation results, adapt to changes in user interests, and alleviate the problem of data sparseness.
Smart Images

Figure CN120144874A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of recommendation systems, and particularly relates to a content push method based on a double-layer attention mechanism and a heterogeneous graph convolutional network. Background Art
[0002] With the rapid development of the mobile Internet, the explosive growth of online content and service data volume makes it difficult for users to make clear choices when facing numerous services such as news, movies, music, and books. The emergence of recommendation systems aims to help users cope with the problem of information overload by providing personalized products. However, traditional recommendation algorithms usually only rely on users' historical behavior information and make recommendations based on the potential common preferences among users. These algorithms have achieved remarkable success in improving recommendation accuracy, but their main goal often focuses on accuracy and even takes it as the only goal. At the same time, although recommendation systems have alleviated the problem of information overload to a certain extent, they have also brought the problem of information redundancy.
[0003] From the perspective of user satisfaction, relevance is never the only criterion. In fact, in addition to relevance, there are many other factors that affect users' engagement with recommended content, such as freshness, diversity, interpretability, etc. Taking video recommendation as an example, users may like both the imagination of the future world brought by science fiction movies and be interested in the real stories in historical documentaries, which highlights the importance and need for diverse recommendations. Diverse recommendations can break the limitations of single-type recommendations and provide users with content covering multiple types, just like opening a treasure chest full of treasures for users, and each recommendation may bring new surprises. However, users' interests are diverse and complex, making it difficult to comprehensively model and accurately capture them. At the same time, different users have different understandings and requirements for diversity. In addition, users' interests change with factors such as time and environment, which poses greater challenges for diverse recommendation systems in dynamically modeling and real-time updating users' interests. Therefore, an ideal diverse recommendation system should be able to capture users' complex and changing interests and adapt to the interest changes brought by factors such as time and environment.
[0004] In the real world, when a graph (network) contains multiple types of objects (nodes) or relationships (edges), it is called a heterogeneous graph or heterogeneous information network (HIN). Effectively learning the rich structure in HIN helps to complete various data mining tasks, such as object classification and link prediction. An ideal HIN representation learning method should be able to fully utilize as much meta-path information (i.e., paths composed of object types and edge types) as possible. However, not all adjacency relationships described by meta-paths are equally important for a specific task. The ideal method should be able to identify the importance of different information, reduce the interference of noise information, and effectively mine and utilize useful meta-paths. The attention mechanism is the key to solving this problem. When facing a large amount of complex object meta-paths, the attention mechanism can assign weights to different information, strengthen the role of important information, suppress noise interference, and quickly identify the meta-paths useful for the task. Summary of the Invention
[0005] Aiming at the problems mentioned in the background technology, the present invention proposes a content push method based on a double-layer attention mechanism and a heterogeneous graph convolutional network, which can effectively combine heterogeneous graphs with diverse recommendations, alleviate the data sparsity problem, and significantly improve the diversity of recommendation results while ensuring accuracy.
[0006] Technical Solution: To solve the above technical problems, the technical solution adopted by the present invention is as follows:
[0007] A content push method based on a double-layer attention mechanism and a heterogeneous graph convolutional network, comprising the following steps:
[0008] Step 1: Construct a user-item heterogeneous graph, perform user diversity feature sampling, and learn and enhance user diversity feature representation;
[0009] Step 2: Based on the user-item heterogeneous graph, use the heterogeneous graph convolutional network and the double-layer attention mechanism to learn the embedding representations of users and items;
[0010] Step 3: Perform score prediction according to the embedding representations of users and items, and optimize the model through a loss reweighting strategy to improve the diversity of recommendation results.
[0011] Preferably, in Step 1, it specifically includes:
[0012] Step 1.1: Construct a user-item heterogeneous graph based on user-item interaction information and user social relationships;
[0013] Step 1.2: Use a diversity feature sampler to adjust the sampling probability according to the popularity of the categories to which the items belong, and generate the embedding representation of the user behavior sequence;
[0014] Step 1.3: Adopt a gated recurrent unit model to learn the dynamic change characteristics of user interests based on the embedded representation of the user behavior sequence.
[0015] Preferably, in Step 1.2, the specific content of the sampling probability of the diversity feature sampler is as follows:
[0016] For each user each item in its interaction behavior history the selection probability calculation formula is:
[0017] ,
[0018] wherein, represents the degree of the category to which the item belongs; represents the temperature, which is used to control the distribution; represents the probability that the current user u selects item i;
[0019] According to the above operations, finally form the sampling set of the user , and sort this sampling set according to the interaction time to obtain the set ;
[0020] The embedded representation of the user behavior sequence is:
[0021] For a single user , the embedded representation of the behavior sequence of this user is jointly composed of the embeddings of these selected items, and the specific definition is:
[0022] ,
[0023] wherein, represents the set of the behavior sequence representation of the user ; represents the embedded representation of the item .
[0024] Preferably, in Step 1.3, adopt a GRU model to further learn the embedded representation of the user, and the specific calculation formula is as follows:
[0025] ,
[0026] wherein, represents the embedded representation of the user in the previous state ; represents the degree used to control the update between the current state and the previous state; Represents the candidate hidden state at the current moment; Represents the user In the state The embedding representation.
[0027] Preferably, in step 2, it specifically includes:
[0028] Step 2.1: Introduce a symmetric normalized adjacency matrix in the heterogeneous graph convolutional network to aggregate the heterogeneous information of user and item nodes;
[0029] Step 2.2: Calculate type-level and node-level attention weights through a two-layer attention mechanism to optimize the capture of effective paths in the heterogeneous graph;
[0030] Step 2.3: Update the node embedding representation according to the attention weights.
[0031] Preferably, in step 2.1, for the heterogeneous graph , based on the existing GCN, introduce the corresponding adjacency matrix , whose self-connection adjacency matrix is , and the adjacency degree matrix corresponding to the adjacency matrix is ;
[0032] For nodes of type , the transformation matrix is expressed as:
[0033] ,
[0034] where, represents the identity matrix, represents the set of neighbor types of the current type , represents the symmetric normalized adjacency matrix; represents the symmetric normalized adjacency matrix between nodes of type and nodes of type ; represents the transition matrix of nodes of type , represents the th layer of the embedding matrix of nodes of type ; represents the neighbor type of the current type t; represents the activation function; represents the th layer of the embedding matrix of nodes of type .
[0035] Preferably, in step 2.2, it specifically includes:
[0036] Step 2.2.1: Calculation of type-level attention weights;
[0037] The specific calculation formula is as follows:
[0038] ,
[0039] where, represents the set of neighbor types of the current type ; represents the type-level attention weight between the current node and the type ; represents the attention weight between the current node ;
[0040] Preferably, Step 2.2.2: Calculation of node-level attention weights;
[0041] The specific calculation formula is as follows:
[0042] ,
[0043] where, represents the set of neighbor nodes of the current node ; represents the node-level attention weight between the node and the node ; represents the node-level attention score between the node and the node ; represents the attention weight between the current node ;
[0044] Preferably, finally, the double-layer attention mechanism is combined with the heterogeneous graph convolutional network to help the heterogeneous graph convolutional network represent the importance of different types of nodes during convolution and capture the effective paths in the heterogeneous graph; for nodes of type , the improved heterogeneous graph convolution calculation formula is as follows:
[0045] ,
[0046] where, represents the node-level attention weight matrix between nodes of type and nodes of type ; represents the embedding matrix of nodes of type in the (l + 1)-th layer; represents the set of neighbor types of the current type ; represents the The layer type is The embedding matrix of the nodes; Indicates the type The transfer matrix of the nodes; Represents the activation function.
[0047] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0048] (1) This paper proposes a diversity recommendation method based on a dual-layer attention mechanism and a heterogeneous graph convolutional network. It applies heterogeneous graphs to diversity recommendation tasks for the first time, aiming to mine the rich meta-path information in heterogeneous graphs to achieve a balance between diversity and accuracy in the recommendation system. At the same time, a dual-layer attention mechanism is designed to learn the weights between different types of neighbor nodes and identify effective information in heterogeneous graphs, thereby reducing the interference of noise information on embedding learning.
[0049] (2) The present invention constructs a diversity feature sampler to construct biased user behavior sequences, thereby alleviating the head bias problem. At the same time, the GRU network is used to learn the time series information of user behavior and capture the dynamic characteristics of user interests changing over time to enhance the diversity representation of user features.
[0050] (3) The present invention performs rating prediction and diversity recommendation based on the embedded representation of users and items, and optimizes the loss function through the loss reweighting strategy, so that the model pays more attention to the training of unpopular category items, thereby improving the diversity of recommendation results. The experimental results show that the method proposed in the present invention can effectively combine heterogeneous graphs with diversity recommendation, alleviate the problem of data sparsity, and significantly improve the diversity of recommendation results while ensuring accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a flowchart of the content push method based on the double-layer attention mechanism and heterogeneous graph convolutional network of the present invention. DETAILED DESCRIPTION
[0052] The present invention is further illustrated below in conjunction with specific examples. The examples are implemented based on the technical solutions of the present invention. It should be understood that these examples are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0053] like Figure 1As shown in the figure, the content push method based on the double attention mechanism and the heterogeneous graph convolutional network provided in this embodiment first designs a diversity feature sampler based on the existing user-item heterogeneous graph. This sampler alleviates the head bias problem by performing biased sampling on the user's historical behavior sequence; and uses a Gated Recurrent Unit (GRU) network to learn the time series information of the user's behavior, capturing the dynamic features of the user's interest changing over time to enhance the diversity representation of the user features. Secondly, based on the constructed user-item heterogeneous graph, the heterogeneous graph convolutional network is used to learn the embedding representations of users and items; at the same time, a double attention mechanism is designed to learn the weights of different types of neighbor nodes through type-level and node-level attention mechanisms, reducing the interference of noise information. Finally, score prediction and diversity recommendation are performed according to the embedding representations of users and items, and the loss function is optimized through a loss reweighting strategy, making the model pay more attention to the learning of long-tail category items, thereby further improving the diversity of the recommendation results. Specifically, it includes the following three major steps: step 1-step 3:
[0054] Step 1: Construct a user-item heterogeneous graph, perform user diversity feature sampling, and learn and enhance the user diversity feature representation.
[0055] Step 1.1: Construct a user-item heterogeneous graph based on the existing user-item interaction information and user social relationships.
[0056] Step 1.2: Use the diversity feature sampler to adjust the sampling probability according to the popularity of the category to which the item belongs, and generate the embedding representation of the user behavior sequence.
[0057] The user's historical interaction behavior often shows a strong preference for popular items. Uniform sampling may lead to the historical behavior sequence being filled with popular items, which is detrimental to the diversity of the recommendation results. The present invention constructs a diversity feature sampler, which is more inclined to select items in cold categories, and uses the user's historical interaction behavior characteristics to enhance the user's embedding representation.
[0058] To reduce the computational and memory overhead, a fixed number of items are sampled for each user, and the size is controlled by the hyperparameter For each user each item in its interaction behavior history The selection probability is represented by the following formula:
[0059]
[0060] where represents the degree of the category to which the item belongs, that is, the number of times all items in the category are interacted. in the category are interacted. is the temperature, used to control the distribution of The lower the value, the more likely the samples sampled in the user sequence are to be biased towards long-tail category items. represents the probability that the current user u selects item i.
[0061] According to the above operations, a sampling set of users can finally be constructed, and by sorting this sampling set according to the interaction time, the set can be obtained.
[0062] For a single user , the embedded representation of the behavior sequence of this user can be jointly composed of the embeddings of these selected items, and its specific definition is:
[0063]
[0064] Among them, represents the set of behavior sequence representations of user . represents the embedded representation of item . In the present invention, embedding technology is used to combine the attribute information of items (including item information, rating information, category information, etc.) to jointly construct the embedding of the item.
[0065] Step 1.3: Adopt a gated recurrent unit model to learn the dynamic change characteristics of user interests according to the embedded representation of the user behavior sequence.
[0066] After constructing the embedded representation of the user behavior sequence through the diversity feature sampler, the present invention regards the interaction order as an ordered sequence, adopts a gated recurrent unit (GRU) model as a potential comprehensive model, and further learns the embedded representation of the user. The specific formula is as follows:
[0067]
[0068]
[0069]
[0070]
[0071] Among them, represents the embedded representation of the th interaction item in the set of user behavior sequence representations . represents the embedded representation of user in the previous state . Used to control the update degree between the current state and the previous state. Used to control the contribution of the previous hidden state to the information at the current moment. Represents the candidate hidden state at the current moment. Represents the user In the state The embedding representation under it will ultimately be used as the initial embedding of the user and input into the heterogeneous graph convolutional network for learning. 、 And Represent different weight matrices. 、 And Represent different bias vectors. Represents the activation function.
[0072] Step 2: Construct a feature extraction module based on a heterogeneous graph, and learn the feature representations of users and items through a heterogeneous graph convolutional network and a two-layer attention mechanism.
[0073] The present invention constructs a new heterogeneous graph convolutional network integrating an attention mechanism. This network simultaneously considers two different types of nodes: users and items.
[0074] Step 2.1: Introduce a symmetric normalized adjacency matrix in the heterogeneous graph convolutional network to aggregate the heterogeneous information of user and item nodes.
[0075] For the heterogeneous graph , (V and E represent the set of nodes, which includes user nodes and item nodes; the set of edges, which includes social relationships and interaction relationships) Based on the existing GCN (Graph Convolutional Network), introduce the corresponding adjacency matrix , its self-connection adjacency matrix is , and its corresponding adjacency degree matrix is . For nodes of type , the transformation matrix is expressed as:
[0076]
[0077] Among them, Represents the identity matrix, Represents the set of neighbor types of the current type , for example, , . Represents the symmetric normalized adjacency matrix. Represents the symmetric normalized adjacency matrix between nodes of type and nodes of type , where represents the number of all nodes of type Represents the number of all nodes of type t'. is the transition matrix of nodes of type , which takes into account the differences in different feature spaces and maps them to an implicit common space . Denotes the embedding matrix of nodes of type at the layer; Denotes the neighbor type of the current type t; Denotes the activation function; Denotes the layer, and the embedding matrix of nodes of type .
[0078] Step 2.2: Calculate type-level and node-level attention weights through a two-layer attention mechanism to optimize the capture of effective paths in the heterogeneous graph.
[0079] To better capture the importance differences at the node level and type level, a new two-layer attention mechanism is used to improve the existing heterogeneous graph convolutional network.
[0080] Step 2.2.1: Type-level attention weight calculation.
[0081] For a specific node of type , first aggregate all neighbor node information according to the node type. For type , its aggregated embedding representation can be obtained by the following formula: where
[0082]
[0083] represents the set of all neighbor nodes of the current node of type . represents the symmetric normalized adjacency matrix between nodes of type and nodes of type . represents the embedding representation of node v'. represents the aggregated embedding representation of the type corresponding to the current node .
[0084] After that, based on the embedding information of the current node and the aggregated embedding corresponding to the type , calculate the type-level attention score corresponding to the neighbor type of the current node. The specific formula is as follows:
[0085]
[0086] Among them, represents the attention vector of type represents the concatenation operation. represents the activation function. represents the node and type The type-level attention score between them. T represents the transpose operation.
[0087] Finally, the attention scores of all types are normalized, and the final type corresponding type-level attention score is obtained. The specific formula is as follows:
[0088]
[0089] Among them, represents the current type set of neighbor types. represents the current node and type The type-level attention weight between them.
[0090] Step 2.2.2: Node-level attention weight calculation.
[0091] The node-level attention mechanism aims to capture the importance of different adjacent nodes and reduce the interference of noisy nodes. For a given specific node of type and its specific neighbor node of type , according to the node embedding information and , and the type-level attention weight between node and type , calculate the node-level attention score corresponding to node . The specific formula is as follows:
[0092]
[0093] Among them, represents the attention vector. represents the node-level attention score between node and node represents the activation function.
[0094] Next, for the current node Normalize the node-level attention scores of all neighbor nodes of the current node and obtain the node-level attention score of the current node. The specific calculation formula is as follows: The node-level attention score of the current node is calculated as follows:
[0095]
[0096] Where represents the current node and represents the set of neighbor nodes of node and represents the node-level attention weight between node
[0097] Finally, combine the double-layer attention mechanism with the heterogeneous graph convolutional network to help the heterogeneous graph convolutional network represent the importance of different types of nodes during convolution, capture the effective paths in the heterogeneous graph, and reduce the interference of noise information. For nodes of type , the improved heterogeneous graph convolution formula is as follows:
[0098]
[0099] Where represents the node-level attention weight matrix between nodes of type and nodes of type .
[0100] Step 3: Perform rating prediction based on the embedding representations of users and items, and optimize the model through a loss reweighting strategy to improve the diversity of recommendation results.
[0101] Step 3.1: Perform rating prediction based on the embedding representations of users and items.
[0102] After obtaining the embedding representations of each user and item on the constructed heterogeneous user-item graph, the method will perform rating prediction between users and items. The rating prediction formula between users and items is as follows:
[0103]
[0104] Where and respectively represent the embedding representations of user and item . represents the element-wise product operation.
[0105] represents the predicted rating between user and item .
[0106] Step 3.2: Adopt the Bayesian Personalized Ranking (BPR) loss function and adjust the weights of different category items through a loss reweighting strategy.
[0107] The present invention also uses Bayesian Personalized Ranking to optimize model parameters. At the same time, since the number of items in different categories usually follows a power-law distribution, that is, a few categories contain most of the items, while most categories only contain a small number of items, directly training by optimizing the average loss of all samples may make the training of long-tail category items hardly noticeable. To address this issue, a loss reweighting strategy is introduced to enable the model to pay more attention to the training of long-tail category items, thereby enhancing the diversity of recommendation results. The calculation formula of the final loss function L is as follows:
[0108]
[0109] where, denotes that user has evaluated item , that is, a positive sample pair. denotes that user has not evaluated item , that is, a negative sample pair. denotes the category to which item belongs. denotes the weight of the category to which the current item belongs. The weights of popular categories are relatively low, while the weights of long-tail categories are relatively high. denotes the BPR loss function, that is, the Bayesian Personalized Ranking (BPR) loss function mentioned above; denotes the regularization parameter, which is used to control the strength of regularization, balance the fitting ability of the model, and prevent overfitting; denotes all learnable parameters in the model, which is a parameter vector.
[0110] The calculation formula of
[0111]
[0112] is as follows: denotes the popularity-aware coefficient that controls the weight size; The larger , the smaller the weight of the popular item category. denotes the total number of items contained in the category to which item
[0113] To further verify the effectiveness and practicality of the method proposed in the present invention, the present invention designs a large number of experiments on the real-world Epinions dataset for evaluation, and uses evaluation metrics such as recall (Recall@K), hit rate (HR@K), and coverage rate (Coverage@K) to verify the performance of the method. Among them, the recall rate and the hit rate are related to accuracy, and the coverage rate is related to diversity. At the same time, the following several recommendation methods are selected for comparison to show and verify the effectiveness and feasibility of the method.
[0114] DGRec: It is an advanced GNN-based diversity recommendation method. It adopts three modules: a submodular neighbor selection module, a layer attention mechanism module, and a loss reweighting module.
[0115] LightGCN: It is an advanced recommendation system method. It is a GCN-based model, but the transformation matrix, non-linear activation, and self-loops are removed.
[0116] NGCF: It is an advanced recommendation method that uses neural networks and graph-based models to improve recommendation performance.
[0117] Table 1 Comparison of experimental performances of different methods
[0118]
[0119] The experimental results are shown in Table 1, where the training set ratios of the Epinions dataset are {40%, 60%, 80%} respectively. The training set ratio represents the ratio of the interactions used for training in the user interaction set, aiming to study the performance differences of the method under different data sparsity levels; the remaining ratio of the dataset is used as the validation set and the test set. In addition, the data marked in bold in the table represents the best result under the same training set ratio, and the data marked with an underline represents the second-best result under the same training set ratio.
[0120] In terms of diversity metrics, for different proportions of the training set, the coverage rate of the method proposed in the present invention is always better than the other three comparative methods: DGRec, LightGCN, and NGCF. This is mainly due to the fact that the method proposed in the present invention is a recommendation method with diversity as the main goal. The designed diversity feature sampler can effectively construct the diverse behavior sequences of users, thereby enhancing the diverse representation of users. At the same time, the method proposed in the present invention effectively learns the heterogeneous information in the heterogeneous graph by using the heterogeneous graph convolutional attention network, mines the potential preferences of users, which is conducive to the improvement of the diversity of recommendation results. In addition, the method proposed in the present invention also introduces a loss reweighting strategy to further optimize the training process of the model, enabling the model to pay more attention to items in unpopular categories, thereby effectively improving the diversity of recommendation results. Similarly, DGRec, as another recommendation method with diversity as the main goal, its designed neighbor selection module, layer attention mechanism, etc., contribute to improving the diversity of recommendation results, so it usually achieves sub-optimal results in terms of coverage rate. In contrast, LightGCN and NGCF mainly focus on improving the accuracy of recommendation results and ignore the importance of diversity, resulting in their diversity metrics being lower than the method proposed in the present invention and DGRec.
[0121] In terms of accuracy metrics, for the case where the proportion of the training set is small, the recall rate and hit rate of the method proposed in the present invention are always better than LightGCN, NGCF, and DGRec. However, in the case where the proportion of the training set is large, the recall rate of the method proposed in the present invention is lower than that of LightGCN and DGRec, but its hit rate is better than that of LightGCN and NGCF. This is mainly because LightGCN and NGCF mainly aim at accuracy, and their learned model effects are poor in the case of data sparsity; while the method proposed in the present invention effectively learns the rich heterogeneous information in the graph by using the heterogeneous graph convolutional attention network, thereby alleviating the data sparsity and cold start problems. Therefore, when the data is sparse, the recall rate of HGADR is better than that of LightGCN and NGCF. At the same time, the method proposed in the present invention can combine the time series information and the heterogeneous information in the heterogeneous graph to better learn the preference information of users, which is more conducive to the improvement of the hit rate. Therefore, the hit rate index of the method proposed in the present invention is generally higher than that of other methods. In contrast, DGRec mainly aims at diversity. Although its designed sub-modules (such as neighbor selection module, layer attention mechanism, etc.) help to improve diversity, it will sacrifice accuracy to a certain extent, so its accuracy metrics are poor.
[0122] In summary, the experimental results of recall rate, hit rate, and coverage rate further prove the effectiveness and feasibility of the method proposed by the present invention. As expected, the method proposed by the present invention can effectively apply heterogeneous graphs to diverse recommendations, alleviate data sparsity and cold start problems, and achieve better diverse recommendations while ensuring a certain level of accuracy.
[0123] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A content push method based on a double-layer attention mechanism and a heterogeneous graph convolutional network, characterized by: The following steps are involved: Step 1: Build a user-item heterogeneous graph, sample user diversity features, and learn and enhance user diversity feature representation; Step 2: Based on the user-item heterogeneous graph, the heterogeneous graph convolutional network and the two-layer attention mechanism are used to learn the embedding representation of users and items; Step 3: Make rating predictions based on the embedded representations of users and items, and optimize the model through a loss reweighting strategy to improve the diversity of recommendation results.
2. The content push method based on the dual-layer attention mechanism and heterogeneous graph convolutional network according to claim 1 is characterized in that: In step 1, specifically include: Step 1.1: Construct a user-item heterogeneous graph based on user-item interaction information and user social relationships; Step 1.2: Use a diverse feature sampler to adjust the sampling probability according to the popularity of the category to which the item belongs, and generate an embedding representation of the user behavior sequence; Step 1.3: Use the gated recurrent unit model to learn the dynamic changing characteristics of user interests based on the embedded representation of user behavior sequences.
3. The content push method based on the dual-layer attention mechanism and heterogeneous graph convolutional network according to claim 2 is characterized in that: In step 1.2, the specific content of the sampling probability of the diversity feature sampler is: For each user Each item in its interaction history The formula for calculating the selection probability is: , in, Display items Category The degree, Indicates temperature, used to control Distribution of represents the probability that the current user u selects item i; According to the above operations, the user The sampling set is sorted by interaction time to obtain the set ; The embedding representation of the user behavior sequence is: For a single user , the embedding representation of the user's behavior sequence is The embeddings of the selected items are composed together, which are specifically defined as: , in, Indicates user The behavior sequence of represents a set; Display items The embedded representation of .
4. The content push method based on the dual-layer attention mechanism and heterogeneous graph convolutional network according to claim 2 is characterized in that: In step 1.3, the GRU model is used to further learn the user's embedded representation. The specific calculation formula is as follows: , in, Indicates user In the previous state The embedding representation below; It is used to control the update degree of the current state and the previous state; Represents the candidate hidden state at the current moment; Indicates user In Status The following embedding representation.
5. The content push method based on the dual-layer attention mechanism and heterogeneous graph convolutional network according to claim 1 is characterized in that: In step 2, specifically including: Step 2.1: Introduce a symmetric normalized adjacency matrix into the heterogeneous graph convolutional network to aggregate the heterogeneous information of user and project nodes; Step 2.2: Calculate the type-level and node-level attention weights through a two-layer attention mechanism to optimize the capture of effective paths in the heterogeneous graph; Step 2.3: Update the node embedding representation according to the attention weights.
6. The content push method based on the dual-layer attention mechanism and heterogeneous graph convolutional network according to claim 5 is characterized in that: In step 2.1, for heterogeneous graphs , based on the existing GCN, introduce the corresponding adjacency matrix , whose self-connection adjacency matrix is , the adjacency matrix The corresponding adjacency matrix is ; For the type The node transformation matrix is expressed as: , in, represents the identity matrix, Indicates the current type The set of neighbor types, represents the symmetric normalized adjacency matrix; Representation Type Nodes and Types Symmetric normalized adjacency matrix of nodes; Indicates the type The transfer matrix of the node, Indicates The layer type is The embedding matrix of the nodes; Indicates the neighbor type of the current type t; represents the activation function; Indicates The layer type is The embedding matrix of the node.
7. The content push method based on the dual-layer attention mechanism and heterogeneous graph convolutional network according to claim 5 is characterized in that: In step 2.2, specifically include: Step 2.2.1: Type-level attention weight calculation; The specific calculation formula is as follows: , in, Indicates the current type The set of neighbor types; Indicates the current node With type Type-level attention weights between ; Indicates the current node The attention weight between .
8. The content push method based on the dual-layer attention mechanism and heterogeneous graph convolutional network according to claim 7 is characterized in that: Step 2.2.2: Node-level attention weight calculation; The specific calculation formula is as follows: , in, Indicates the current node The set of neighbor nodes; Representation Node With Node The node-level attention weights between ; Representation Node With Node The node-level attention score between ; Indicates the current node The attention weight between .
9. The content push method based on the dual-layer attention mechanism and heterogeneous graph convolutional network according to claim 8, characterized in that: Finally, the two-layer attention mechanism is combined with the heterogeneous graph convolutional network to help the heterogeneous graph convolutional network characterize the importance of different types of nodes during the convolution process and capture the effective paths in the heterogeneous graph; The improved heterogeneous graph convolution calculation formula is as follows: , in, Indicates the type The node and type are The node-level attention weight matrix between the nodes of ; Indicates that the type of the l+1th layer is The embedding matrix of the nodes; Indicates the current type The set of neighbor types; Indicates The layer type is The embedding matrix of the nodes; Indicates the type The transfer matrix of the nodes; Represents the activation function.
Citation Information
Cited By
Social network user personality detection method based on multi-view feature fusion
CN121658948A
A multi-view feature fusion social network user personality detection method
CN121658948B