User real interest perception graph enhanced recommendation system and medium based on attention mechanism
By using the user's real interest perception graph based on attention mechanism in the recommendation system, the problem that existing recommendation systems are difficult to truly reflect user interests is solved, and higher recommendation accuracy and effect are achieved.
Patent Information
- Application Number
- CN202310286423.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2043-03-22
AI Technical Summary
The existing recommendation system is difficult to truly reflect the user's real interests, resulting in low accuracy of recommendation results.
The user's real interest perception graph enhancement recommendation system is adopted based on the attention mechanism, and the user's real interests are extracted through the graph enhancement module, and the original and enhanced user-item interaction map is generated, and the graph comparison learning module is used to train node vector representation to improve the accuracy of the recommendation algorithm.
Through real interest perception and graph comparison learning, the accuracy of the recommendation system is improved, which can better reflect the user's real interests and improve the recommendation effect.
Smart Images

Figure CN116501954B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of content recommendation, and in particular to a user real interest perception graph enhanced recommendation system and medium based on an attention mechanism. Background Art
[0002] Personalized recommendations were initially based on simple recommendation methods based on keyword matching. With the rapid development of the Internet, more and more user information is collected, and recommendation systems have begun to be applied in e-commerce, social media, news recommendations and other fields, becoming one of the core services of major websites.
[0003] Traditional recommendation systems mainly use collaborative filtering algorithms to make recommendations based on user historical behavior data. However, with the increase in the number of users and the complexity of data, traditional recommendation systems have gradually exposed some problems, such as data sparsity, cold start, and poor interpretability. Therefore, how to further improve the recommendation effect of recommendation algorithms and better serve users is one of the current research hotspots. Among them, deep learning algorithms play an important role in this field. Recommendation algorithms based on deep learning can extract user interest features and behavior patterns by learning and analyzing a large amount of data, thereby achieving more accurate recommendations. For example, recommendation algorithms based on convolutional neural networks (CNNs) can model and analyze user behavior sequences, extract user interest features from them, and use these features to make recommendations. In addition, recommendation algorithms based on recurrent neural networks (RNNs) and long short-term memory networks (LSTMs) have also been widely used and have made good progress.
[0004] Some scholars have published a user interest recommendation method and system that integrates collaborative exchange and temporal perception. Figure 5 As shown, this method proposes a user interest recommendation method and system that integrates collaborative transformation and temporal awareness, constructs a user-item bipartite graph, aggregates neighbor information, and uses the idea of collaborative filtering to enrich the user-item representation in the sequence before the sequential mode; then uses additional time information to capture the temporal transformation pattern between items in the sequence, and strengthens the representation learning in the sequential mode by considering the changes in user interests over time; finally, the learned item representation is used through a target interaction network to specifically activate a certain interest of the user, and a specific representation is formed using the target item, and recommendation prediction is performed after fusing different representations.
[0005] Some scholars have also disclosed a personalized recommendation method and system that integrates the temporal fluctuations of user interests. Figure 6As shown, the method includes collecting the interaction data between users and commodities, integrating the time series fluctuations, identifying and classifying the time series fluctuations of users' interests, and obtaining two fluctuation sequences of small and large interests. The small interest fluctuation sequence and the large interest fluctuation sequence are used to model and predict the fluctuation changes of users' interests in different time periods in a targeted manner, and personalized recommendations are made to users based on the prediction results.
[0006] However, the above methods are difficult to truly reflect the real interests of users, and the accuracy of recommendation results is low. Summary of the invention
[0007] The purpose of the present invention is to provide a user real interest perception graph enhancement recommendation system based on attention mechanism, including a graph enhancement module based on real interest perception, a graph comparison learning module, and a personalized recommendation module;
[0008] The real interest perception-based graph enhancement module extracts the real interests of all users and generates an original user-item interaction graph;
[0009] The graph enhancement module based on real interest perception calculates the attention score of each user to all items, establishes an attention score matrix, and generates an enhanced user-item interaction graph;
[0010] The graph enhancement module based on real interest perception transmits the original user-item interaction graph and the enhanced user-item interaction graph to the graph comparison learning module;
[0011] The graph contrast learning module stores a multi-layer graph convolutional neural network; a node in each layer of the graph convolutional neural network represents a user or an item;
[0012] The graph comparison learning module calculates the similarity between the vector representations of nodes aggregated and updated on the original user-item interaction graph and the enhanced user-item interaction graph, assigns node labels, and uses the loss function to train the vector representations of nodes to obtain trained node vector representations with strong generalization ability. The node vector representation obtained by training is more in line with practical applications and reduces the impact of noise to a certain extent;
[0013] The personalized recommendation module uses a multi-layer graph convolutional neural network to process the original user-item interaction graph to generate personalized recommendation content for user u.
[0014] Furthermore, the attention score matrix W is as follows:
[0015]
[0016] Among them, user u’s attention score weights for item v uv As shown below:
[0017] x uv =a(e u , e v ) (2)
[0018]
[0019] In the formula, x uv is the intermediate parameter; n is the number of items; a(e u , e v ) is the user vector representation e u 、Item vector representation e v The similarity between them; u = 1, 2, ..., m; v = 1, 2, ..., n. h = 1, 2, ..., n.
[0020] Further, the step of generating an enhanced user-item interaction graph includes:
[0021] a) Compare the attention score with the preset attention threshold T, set the attention score less than the preset attention threshold to 0, and establish an updated attention score matrix W′;
[0022] Among them, the attention score of user u to item v is updated as follows:
[0023]
[0024] In the formula, weights′ uv is the updated attention score;
[0025] b) Perform a Hadamard product operation on the original user-item interaction matrix and the attention score matrix W′ to obtain an enhanced user-item interaction graph based on the user’s real interest perception.
[0026] Furthermore, the attention score matrix W′ is as follows:
[0027]
[0028] Furthermore, user u aggregates the updated vector representation e′ on the original user-item interaction graph u The updated vector representation e″ after aggregation of user u on the enhanced user-item interaction graph u The similarity between u ,e″ u ) is as follows:
[0029]
[0030] In the formula, ∈ is a very small constant, usually set to 1e-6, to prevent the denominator from being zero.
[0031] Further, the comparison loss function loss c (similarity(e′ u ,e″ u ), label) is as follows:
[0032]
[0033] In the formula, label is the label, label = 1 means that the two vectors are similar, and label = -1 means that the two vectors are not similar.
[0034] Furthermore, the step of generating personalized recommendation content for user u by the personalized recommendation module includes:
[0035] 1) Aggregate and update the user vector representation and item vector representation on the user-item interaction graph to obtain:
[0036]
[0037]
[0038] Where k ≥ 0 represents the k-th layer graph convolution operation; N u N represents the set of items that user u interacts with; v represents the set of users who interact with item v; The user vector representation after aggregation update; The updated item vector representation after aggregation;
[0039] 2) Combine the vector representations obtained from each layer of graph convolution operations to obtain the final vector representation of users and items, namely:
[0040]
[0041] In the formula, K represents the total number of layers, Indicates the importance of each layer of vector representation;
[0042] 3) The final vector representation e for user u u and the final vector representation e of item v v Perform inner product operation to obtain the preference score of user u for item v;
[0043] 4) Repeat steps 1) to 3) to obtain the preference score of user u for each item in the item set V;
[0044] 5) Arrange the items in the item set V in descending order according to the preference scores, and extract the top-k items as personalized recommendations for user u. Top-k is a positive integer greater than 0.
[0045] A computer-readable medium storing a computer program for a user's real interest perception graph-enhanced recommendation system based on an attention mechanism;
[0046] When the computer program is executed by a processor, the following steps are implemented:
[0047] 1) The graph enhancement module based on real interest perception extracts the real interests of all users and generates an original user-item interaction graph;
[0048] 2) The graph enhancement module based on real interest perception calculates the attention score of each user to all items, establishes an attention score matrix, and generates an enhanced user-item interaction graph;
[0049] 3) The graph enhancement module based on real interest perception transmits the original user-item interaction graph and the enhanced user-item interaction graph to the graph comparison learning module;
[0050] 4) The graph contrast learning module stores a multi-layer graph convolutional neural network; a node in each layer of the graph convolutional neural network represents a user or an item;
[0051] 5) The graph comparison learning module calculates the similarity between the vector representations of nodes aggregated and updated on the original user-item interaction graph and the enhanced user-item interaction graph, assigns node labels, and trains the vector representations of the nodes using a loss function to obtain trained node vector representations;
[0052] 6) The personalized recommendation module uses a multi-layer graph convolutional neural network to process the original user-item interaction graph to generate personalized recommendation content for user u.
[0053] The technical effect of the present invention is unquestionable. The present invention proposes a user interest perception recommendation model based on graph contrast learning, which includes a user interest perception module, a graph contrast learning module, a user representation fusion module and a personalized recommendation module. The model extracts the user's real interests, enhances the user's representation through graph contrast learning and the user's social relationship, and thus improves the accuracy of the recommendation algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is the flow chart of this program;
[0055] Figure 2 It is the specific model of this program;
[0056] Figure 3 It is a graph enhancement technology graph based on the user's real interest perception;
[0057] Figure 4 is the user vector embedding contrast learning graph;
[0058] Figure 5 It is the prior art flow chart I;
[0059] Figure 6 It is the prior art flow chart II. DETAILED DESCRIPTION
[0060] The present invention is further described below in conjunction with the embodiments, but it should not be understood that the above subject matter of the present invention is limited to the following embodiments. Without departing from the above technical ideas of the present invention, various substitutions and changes are made according to the common technical knowledge and customary means in the art, which should all be included in the protection scope of the present invention.
[0061] Embodiment 1:
[0062] See also Figures 1 to 4 , a user real interest perception graph enhancement recommendation system based on attention mechanism, including a graph enhancement module based on real interest perception, a graph comparison learning module, and a personalized recommendation module;
[0063] The real interest perception-based graph enhancement module extracts the real interests of all users and generates an original user-item interaction graph;
[0064] The graph enhancement module based on real interest perception calculates the attention score of each user to all items, establishes an attention score matrix, and generates an enhanced user-item interaction graph;
[0065] The graph enhancement module based on real interest perception transmits the original user-item interaction graph and the enhanced user-item interaction graph to the graph comparison learning module;
[0066] The graph contrast learning module stores a multi-layer graph convolutional neural network; a node in each layer of the graph convolutional neural network represents a user or an item;
[0067] The graph comparison learning module calculates the similarity between the vector representations of nodes aggregated and updated on the original user-item interaction graph and the enhanced user-item interaction graph, assigns node labels, and uses the loss function to train the vector representations of nodes to obtain trained node vector representations with strong generalization ability. The node vector representation obtained by training is more in line with practical applications and reduces the impact of noise to a certain extent;
[0068] For the same node, the vector representation e′ after aggregation and update on different graphs u and e″ u It is called a positive sample and is given a similar label (i.e. label = 1). The vector representation e′ of different nodes after aggregation and update on different graphs is u and e″ vIt is called a negative sample and is assigned a dissimilar label (i.e., label = -1). In this way, the node’s own distinguishing ability can be used as an auxiliary supervision signal, and the contrast loss function can be used for training to improve the node’s generalization representation ability.
[0069] The personalized recommendation module uses a multi-layer graph convolutional neural network to process the original user-item interaction graph to generate personalized recommendation content for user u.
[0070] The attention score matrix W is as follows:
[0071]
[0072] Among them, user u’s attention score weights for item v uv As shown below:
[0073] x uv =a(e u , e v ) (2)
[0074]
[0075] In the formula, x uv is the intermediate parameter; n is the number of items; a(e u , e v ) is e u , e v The similarity between them can be calculated using methods such as vector inner product or cosine similarity; u = 1, 2, ..., m; v = 1, 2, ..., n. h = 1, 2, ..., n.
[0076] The steps to generate an enhanced user-item interaction graph include:
[0077] a) Compare the attention score with the preset attention threshold T, set the attention score less than the preset attention threshold to 0, and establish an updated attention score matrix W′;
[0078] Among them, the attention score of user u to item v is updated as follows:
[0079]
[0080] In the formula, weights′ uv is the updated attention score;
[0081] b) Perform a Hadamard product operation on the original user-item interaction matrix and the attention score matrix W′ to obtain an enhanced user-item interaction graph based on the user’s real interest perception.
[0082] The attention score matrix W′ is as follows:
[0083]
[0084] User u aggregates the updated vector representation e′ on the original user-item interaction graph u The updated vector representation e″ after aggregation of user u on the enhanced user-item interaction graph u The similarity between u ,e″ u ) is as follows:
[0085]
[0086] In the formula, ∈ is a very small constant, usually set to 1e-6, to prevent the denominator from being zero.
[0087] Contrasting loss function loss c (similarity(e′ u ,e″ u ), label) is as follows:
[0088]
[0089]
[0090] In the formula, label is the label, label = 1 means that the two vectors are similar, and label = -1 means that the two vectors are not similar.
[0091] The step of generating personalized recommendation content for user u by the personalized recommendation module includes:
[0092] 1) Aggregate and update the user vector representation and item vector representation on the original user-item interaction graph.
[0093] Enhancing the user and item graphs is an auxiliary task used to enhance the vector representation of users and nodes. Here, the main task of the model is to perform aggregate updates on the original user-item graph, which is personalized recommendation.
[0094] The results after aggregation update are as follows:
[0095]
[0096]
[0097] Where k ≥ 0 represents the k-th layer graph convolution operation; N u N represents the set of items that user u interacts with; v represents the set of users who interact with item v; The user vector representation after aggregation update; The updated item vector representation after aggregation;
[0098] 2) Combine the vector representations obtained from each layer of graph convolution operations to obtain the final vector representation of users and items, namely:
[0099]
[0100] In the formula, K represents the total number of layers, Indicates the importance of each layer of vector representation;
[0101] 3) The final vector representation e for user u u and the final vector representation e of item v v Perform inner product operation to obtain the preference score of user u for item v;
[0102] 4) Repeat steps 1) to 3) to obtain the preference score of user u for each item in the item set V;
[0103] 5) Arrange the items in the item set V in descending order according to the preference scores, and extract the top-k items as personalized recommendations for user u.
[0104] A computer-readable medium storing a computer program for a user's real interest perception graph-enhanced recommendation system based on an attention mechanism;
[0105] When the computer program is executed by a processor, the following steps are implemented:
[0106] 1) The graph enhancement module based on real interest perception extracts the real interests of all users and generates an original user-item interaction graph;
[0107] 2) The graph enhancement module based on real interest perception calculates the attention score of each user to all items, establishes an attention score matrix, and generates an enhanced user-item interaction graph;
[0108] 3) The graph enhancement module based on real interest perception transmits the original user-item interaction graph and the enhanced user-item interaction graph to the graph comparison learning module;
[0109] 4) The graph contrast learning module stores a multi-layer graph convolutional neural network; a node in each layer of the graph convolutional neural network represents a user or an item;
[0110] 5) The graph comparison learning module calculates the similarity between the vector representations of nodes aggregated and updated on the original user-item interaction graph and the enhanced user-item interaction graph, assigns node labels, and trains the vector representations of the nodes using a loss function to obtain trained node vector representations;
[0111] 6) The personalized recommendation module uses a multi-layer graph convolutional neural network to process the original user-item interaction graph to generate personalized recommendation content for user u.
[0112] Embodiment 2:
[0113] A user real interest perception graph enhancement recommendation system based on attention mechanism, including a graph enhancement module based on real interest perception, a graph comparison learning module, and a personalized recommendation module;
[0114] The real interest-aware graph enhancement module extracts the real interests of all users and generates an enhanced user-item interaction graph based on a set threshold.
[0115] The graph contrast learning module takes the original user-item interaction graph and the generated new user-item interaction graph as input to maximize the similarity between positive samples;
[0116] 1. Graph enhancement module based on real interest perception:
[0117] The implicit recommendation model only focuses on whether the user is interested in the item, and uses the user's historical interaction list to recommend items that the user may be interested in. However, due to various reasons, the items that the user has visited cannot fully represent the user's real interests. In order to truly capture the user's interests, the real interest-aware graph enhancement module uses an attention mechanism to calculate the user's attention score on the item, and enhances the original user-item graph according to the set threshold to obtain a new graph that can reflect the user's real interests.
[0118] For user u and the set V of all items, the importance weight of each vector in u and V is calculated through the attention mechanism. The calculation method is:
[0119] x uv =a(e u ,e v )
[0120]
[0121] All users in the user set U perform the above operation on all items in the item set to obtain an attention score matrix. Each row of the attention score matrix represents the attention score of the user to the user's item. Through a pre-set threshold, the scores less than the threshold are set to 0, and only the items that the user is interested in are retained.
[0122]
[0123]
[0124]
[0125] Wherein, T represents a preset threshold.
[0126] By performing a Hadamard product between the original user-item interaction matrix and W′, we can obtain an enhanced user-item graph based on the user’s real interest perception. The new graph is enhanced based on the original user-item graph, retaining the user’s real interaction behavior of interest.
[0127] 2. Image comparison learning module
[0128] For the original user-item graph D and the enhanced graph based on real interest perception Let the vector of user u after graph convolution operation (aggregation and update) on the original graph D be represented as e′ u , the updated vector of user u aggregated on the enhanced graph is represented as e″ u , use cosine similarity to measure the similarity between the two Embeddings.
[0129]
[0130] Among them, ∈ is a very small number, usually set to 1e-6 to prevent errors caused by the denominator being 0. After using cosine similarity as a measure of the similarity of Embeddings, the contrast loss function is used to map two Embeddings to similar or dissimilar labels. For the same user, the vector representation {(e′ u ,e″ u )|u∈U}, we believe that they are similar and hope that they are mapped to the same label. For different users, the vector representation {(e′ u ,e″ p )|u, p∈U, u≠p}, we believe that they are not similar and hope that they are mapped to different labels. The loss function is defined as:
[0131]
[0132] Among them, label is the label, label = 1 means that the two embeddings are similar, and label = -1 means that the two embeddings are not similar.
[0133] 3. User personalized recommendation generation module
[0134] The vector representation of the user and the vector representation of the item are aggregated and updated on the user-item graph. The rules are as follows:
[0135]
[0136]
[0137] Here, k ≥ 0 indicates the kth layer of graph convolution operation. Following the mainstream graph recommendation system approach, the vector representations obtained at each layer are combined as the final vector representations of users and items.
[0138]
[0139] Among them, K represents the total number of layers, Indicates the importance of each layer of vector representation. The final vector representation of user u and item v is e u and e v The inner product operation is performed, and the score obtained is the preference of user u for item v. Perform the above operation on the vector representation of user u and each item v in the item set V to obtain the score set Ratings of user u for the item set. According to the pre-set Top-k rule, the top-k item sequences with the highest scores are taken, which is the personalized recommendation of the model for user u.
[0140] Embodiment 3:
[0141] A user real interest perception graph enhancement recommendation system based on attention mechanism, including a graph enhancement module based on real interest perception, a graph comparison learning module, and a personalized recommendation module;
[0142] The real interest perception-based graph enhancement module extracts the real interests of all users and generates an original user-item interaction graph;
[0143] The graph enhancement module based on real interest perception calculates the attention score of each user to all items, establishes an attention score matrix, and generates an enhanced user-item interaction graph;
[0144] The graph enhancement module based on real interest perception transmits the original user-item interaction graph and the enhanced user-item interaction graph to the graph comparison learning module;
[0145] The graph contrast learning module stores a multi-layer graph convolutional neural network; a node in each layer of the graph convolutional neural network represents a user or an item;
[0146] The graph comparison learning module calculates the similarity between the vector representations of nodes aggregated and updated on the original user-item interaction graph and the enhanced user-item interaction graph, assigns node labels, and trains the vector representations of the nodes using a loss function to obtain trained node vector representations;
[0147] The personalized recommendation module uses a multi-layer graph convolutional neural network to process the original user-item interaction graph to generate personalized recommendation content for user u.
[0148] Embodiment 4:
[0149] Based on the user's real interest perception graph enhancement recommendation system based on the attention mechanism, the attention score matrix W is as follows:
[0150]
[0151] Among them, user u’s attention score weights for item v uv As shown below:
[0152] x uv =a(e u ,e v ) (2)
[0153]
[0154] In the formula, x uv is the intermediate parameter; n is the number of items; a(e u ,e v ) is the user vector representation e u 、Item vector representation e v The similarity between them; u = 1, 2, …, m; v = 1, 2, …, n; h = 1, 2, …, n.
[0155] Embodiment 5:
[0156] The steps of enhancing the recommendation system based on the user's real interest perception graph of the attention mechanism to generate an enhanced user-item interaction graph include:
[0157] 1) Compare the attention score with the preset attention threshold T, set the attention score less than the preset attention threshold to 0, and establish the updated attention score matrix W′;
[0158] Among them, the attention score of user u to item v is updated as follows:
[0159]
[0160] In the formula, weights′ uv is the updated attention score;
[0161] 2) Perform a Hadamard product operation on the original user-item interaction matrix and the attention score matrix W′ to obtain an enhanced user-item interaction graph based on the user’s real interest perception.
[0162] Embodiment 6:
[0163] Based on the user's real interest perception graph enhancement recommendation system based on the attention mechanism, the attention score matrix W′ is as follows:
[0164]
[0165] Embodiment 7:
[0166] User real interest perception graph enhanced recommendation system based on attention mechanism, user u aggregates the updated vector representation e′ on the original user-item interaction graph u The updated vector representation e″ after aggregation of user u on the enhanced user-item interaction graph u The similarity between u ,e″ u ) is as follows:
[0167]
[0168] In the formula, ∈ is a very small constant used to prevent the denominator from being zero.
[0169] Embodiment 8:
[0170] User real interest perception graph based on attention mechanism to enhance recommendation system, comparing loss function loss c (similarity(e′ u ,e″ u ), label) is as follows:
[0171]
[0172] In the formula, label is the label, label = 1 means that the two vectors are similar, and label = -1 means that the two vectors are not similar.
[0173] Embodiment 9:
[0174] In the user real interest perception graph enhanced recommendation system based on the attention mechanism, the steps of generating personalized recommendation content for user u by the personalized recommendation module include:
[0175] 1) Aggregate and update the user vector representation and item vector representation on the original user-item interaction graph to obtain:
[0176]
[0177]
[0178] Where k ≥ 0 represents the k-th layer graph convolution operation; N u N represents the set of items that user u interacts with; vrepresents the set of users who interact with item v; The user vector representation after aggregation update; The updated item vector representation after aggregation;
[0179] 2) Combine the vector representations obtained from each layer of graph convolution operations to obtain the final vector representation of users and items, namely:
[0180]
[0181] In the formula, K represents the total number of layers, Indicates the importance of each layer of vector representation; e u is the final vector representation of user u; e v The final vector representation of user u is the final vector representation of item v;
[0182] 3) The final vector representation e for user u u and the final vector representation e of item v v Perform inner product operation to obtain the preference score of user u for item v;
[0183] 4) Repeat steps 1) to 3) to obtain the preference score of user u for each item in the item set V;
[0184] 5) Arrange the items in the item set V in descending order according to the preference scores, and extract the top-k items as personalized recommendations for user u; Top-k is a positive integer greater than 0.
[0185] Embodiment 10:
[0186] A computer-readable medium storing a computer program of the user real interest perception graph enhanced recommendation system based on the attention mechanism according to any one of Embodiments 3-9;
[0187] When the computer program is executed by a processor, the following steps are implemented:
[0188] 1) The graph enhancement module based on real interest perception extracts the real interests of all users and generates an original user-item interaction graph;
[0189] 2) The graph enhancement module based on real interest perception calculates the attention score of each user to all items, establishes an attention score matrix, and generates an enhanced user-item interaction graph;
[0190] 3) The graph enhancement module based on real interest perception transmits the original user-item interaction graph and the enhanced user-item interaction graph to the graph comparison learning module;
[0191] 4) The graph contrast learning module stores a multi-layer graph convolutional neural network; a node in each layer of the graph convolutional neural network represents a user or an item;
[0192] 5) The graph comparison learning module calculates the similarity between the vector representations of nodes aggregated and updated on the original user-item interaction graph and the enhanced user-item interaction graph, assigns node labels, and trains the vector representations of the nodes using a loss function to obtain trained node vector representations;
[0193] 6) The personalized recommendation module uses a multi-layer graph convolutional neural network to process the original user-item interaction graph to generate personalized recommendation content for user u.
Claims
1. A user real interest perception graph-enhanced recommendation system based on attention mechanism, characterized by: It includes a graph enhancement module based on real interest perception, a graph comparison learning module, and a personalized recommendation module; The real interest perception-based graph enhancement module extracts the real interests of all users and generates an original user-item interaction graph; The graph enhancement module based on real interest perception calculates the attention score of each user to all items, establishes an attention score matrix, and generates an enhanced user-item interaction graph; The graph enhancement module based on real interest perception transmits the original user-item interaction graph and the enhanced user-item interaction graph to the graph comparison learning module; The graph contrast learning module stores a multi-layer graph convolutional neural network; a node in each layer of the graph convolutional neural network represents a user or an item; The graph comparison learning module calculates the similarity between the vector representations of nodes aggregated and updated on the original user-item interaction graph and the enhanced user-item interaction graph, assigns node labels, and trains the vector representations of the nodes using a loss function to obtain trained node vector representations; The personalized recommendation module uses a multi-layer graph convolutional neural network to process the original user-item interaction graph to generate personalized recommendation content for user u; The attention score matrix W is as follows: Among them, user u’s attention score weights for item v uv As shown below: x uv =a(e u ,And v ) (2) In the formula, x uv is the intermediate parameter; n is the number of items; a(e u ,e v ) is the user vector representation e u 、Item vector representation e v Similarity between; u = 1, 2, ..., m; v = 1, 2, ..., n; h = 1, 2, ..., n; The steps to generate an enhanced user-item interaction graph include: S1) comparing the attention score with a preset attention threshold T, setting the attention score less than the preset attention threshold to 0, and establishing an updated attention score matrix W′; Among them, the attention score of user u to item v is updated as follows: In the formula, weights′ uv is the updated attention score; S2) performing a Hadamard product operation on the original user-item interaction matrix and the attention score matrix W′ to obtain an enhanced user-item interaction graph based on the user's real interest perception; The step of generating personalized recommendation content for user u by the personalized recommendation module includes: 1) Aggregate and update the user vector representation and item vector representation on the original user-item interaction graph to obtain: Where k ≥ 0 represents the k-th layer graph convolution operation; N u N represents the set of items that user u interacts with; v represents the set of users who interact with item v; The user vector representation after aggregation update; The updated item vector representation after aggregation; 2) Combine the vector representations obtained from each layer of graph convolution operations to obtain the final vector representation of users and items, namely: In the formula, K represents the total number of layers, Indicates the importance of each layer of vector representation; e u is the final vector representation of user u; e v The final vector representation of user u is the final vector representation of item v; 3) The final vector representation e for user u u and the final vector representation e of item v v Perform inner product operation to obtain the preference score of user u for item v; 4) Repeat steps 1) to 3) to obtain the preference score of user u for each item in the item set V; 5) Arrange the items in the item set V in descending order according to the preference scores, and extract the top-k items as personalized recommendations for user u; Top-k is a positive integer greater than 0.
2. The user real interest perception graph enhanced recommendation system based on attention mechanism according to claim 1 is characterized in that: The attention score matrix W′ is as follows:
3. The user real interest perception graph enhanced recommendation system based on attention mechanism according to claim 1 is characterized in that: User u aggregates the updated vector representation e′ on the original user-item interaction graph u The updated vector representation e″ after aggregation of user u on the enhanced user-item interaction graph u The similarity between u ,e″ u ) is as follows: In the formula, ∈ is a very small constant used to prevent the denominator from being zero.
4. The user real interest perception graph enhanced recommendation system based on attention mechanism according to claim 1 is characterized in that: Contrasting loss function loss c (similarity(e′ u ,e″ u ),label) is as follows: In the formula, label is the label, label = 1 means that the two vectors are similar, and label = -1 means that the two vectors are not similar.
5. A computer-readable medium, characterized in that: The computer-readable medium stores a computer program of the user real interest perception graph enhanced recommendation system based on the attention mechanism according to any one of claims 1 to 4; When the computer program is executed by a processor, the following steps are implemented: 1) The graph enhancement module based on real interest perception extracts the real interests of all users and generates an original user-item interaction graph; 2) The graph enhancement module based on real interest perception calculates the attention score of each user to all items, establishes an attention score matrix, and generates an enhanced user-item interaction graph; 3) The graph enhancement module based on real interest perception transmits the original user-item interaction graph and the enhanced user-item interaction graph to the graph comparison learning module; 4) The graph contrast learning module stores a multi-layer graph convolutional neural network; a node in each layer of the graph convolutional neural network represents a user or an item; 5) The graph comparison learning module calculates the similarity between the vector representations of nodes aggregated and updated on the original user-item interaction graph and the enhanced user-item interaction graph, assigns node labels, and trains the vector representations of the nodes using a loss function to obtain trained node vector representations; 6) The personalized recommendation module uses a multi-layer graph convolutional neural network to process the original user-item interaction graph to generate personalized recommendation content for user u.