A product recommendation method based on meta-learning and knowledge graph
Through methods based on meta-learning and knowledge graphs, combined with transformer network and graph attention network, user, product and attribute information are integrated to solve the cold start and data sparse problems of new users, improve the precision and accuracy of the recommendation system, and fully Utilize knowledge graph information.
Patent Information
- Application Number
- CN202210397786.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-15
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-04-15
AI Technical Summary
Existing recommendation models based on collaborative filtering perform poorly on new user cold starts and data sparse issues, and methods based on knowledge graphs are difficult to fully utilize node attribute information and path selection to affect performance.
Using methods based on meta-learning and knowledge graphs, by constructing a user-product interaction bipartite graph and background knowledge graph, combined with transformer network and graph attention network, it integrates user, product and attribute information, learns global and local feature vectors, and calculates user- Score of product pairs to improve recommendation accuracy.
It effectively solves the problems of cold start and data sparseness, improves the precision and accuracy of the recommendation system, makes full use of knowledge graph information, adaptively calculates node influence weights, and enhances the quality of product modeling.
Smart Images

Figure CN114708064B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and specifically is a product recommendation method based on meta-learning and knowledge graph. Background Art
[0002] With the rapid development of the Internet and information computing, a huge amount of data has been generated. We have entered an era of information explosion. Massive amounts of information are generated every moment. However, not all of this information is of concern to individuals. It is becoming increasingly difficult for users to find useful information from a large amount of information. On the other hand, the producers of information are also racking their brains to deliver information that users are interested in to users. Everyone's interests are different, so recommendation systems that can meet the needs of thousands of people have emerged. Simply put, the recommendation system determines the user's interests based on the user's browsing habits, recommends appropriate information to the user by exploring the user's behavior, meets the user's personalized needs, and helps the user find information or products that are of interest to him or her but difficult to find.
[0003] The recommendation model based on collaborative filtering is the most widely studied model in academia. It does not require the use of user or item profiles, but only needs to collect user historical behavior records, discover the potential similarities between users and users, items and items, and complete recommendations based on the similarities of this group. Collaborative filtering models can be divided into two categories: neighbor-based methods and model-based methods. However, recommendation methods based on collaborative filtering often have some problems: for users who have just joined the system, since there is no historical record of them in the database, their interests and preferences cannot be mined and personalized recommendations cannot be made accurately, which is called the cold start problem; due to the large increase in the number of users and items, the number of items that a single user can interact with is limited, resulting in a large number of blank elements in the interaction matrix, which is called the data sparsity problem.
[0004] In order to solve some of the above problems, researchers considered fusing diverse data. The data on the real network platform is diverse. There are voice, image, text and other data about items, and there are browsing, purchasing and other data about users. How to fuse these diverse data into a model so that they can work together to generate recommendations is of great significance. Therefore, researchers use knowledge graphs as an effective auxiliary tool. Existing recommendation methods based on knowledge graphs can be mainly divided into two categories: embedding-based methods and path-based methods. The embedding-based method mainly uses the graph embedding method to vector model various entities and associations in the graph, and then expands the semantic information expressed by the original goods and users. However, this method focuses on modeling strict semantic associations and often ignores the attribute information of the nodes themselves in the knowledge graph, so it is impossible to accurately model the user's preference for the node content attributes, resulting in reduced recommendation accuracy; the path-based method focuses on mining multiple connection relationships between users and goods based on the graph, extracting paths carrying high-order information and inputting them into the prediction model. However, since the choice of path has a great influence on the final performance, and the definition of the path requires a lot of manual operation and certain domain knowledge, in actual situations, it is difficult to obtain the optimal connection path, so that the role of knowledge graphs in recommendation methods cannot be fully utilized. Summary of the invention
[0005] The present invention aims to address the deficiencies of the above-mentioned prior art and proposes a product recommendation method based on meta-learning and knowledge graph, in order to accurately recommend products that may be of interest to users by integrating the background knowledge graph of product attributes, thereby using only a small amount of training data to train the recommendation system.
[0006] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme:
[0007] The product recommendation method based on meta-learning and knowledge graph of the present invention is characterized by following the steps:
[0008] Step 1: Obtain the data of historical interaction records of users and commodities, and use the users and commodities in the data as user nodes and commodity nodes respectively, and use the historical interaction records in the data as an edge between the user node and the commodity node, recorded as a user-commodity pair, so as to construct a user-commodity interaction bipartite graph G T , where U is the user-product interaction bipartite graph G T The corresponding user node set, u j is the jth user node in the user node set U, and I represents the user-product interaction bipartite graph G T The corresponding commodity node set, i n is the nth commodity node of I in the commodity node set;
[0009] Step 2: Collect the attribute information of the products in the historical interaction record data, as well as the association information between products and attributes, and between attributes, and use prior knowledge to construct a background knowledge graph G′ containing product nodes, various attribute nodes of the products themselves, and association information;
[0010] Step 3: From the user-product interaction bipartite graph G T Extract the jth user node u from j , and select the jth user node u j A user-item pair is used to construct the support set S of the jth user node j , using the jth user node u j The remaining user-item pairs construct the query set Q of the jth user node j ; At the same time, randomly select the first Product nodes And the first Product nodes With the jth user node u j There is no edge between them, so the support set S is constructed j Pseudo user-item pairs;
[0011] Step 4: Count the user-product interaction bipartite graph G T The number of user nodes a in the user-product interaction bipartite graph G T The number of product nodes in the background knowledge graph G′ is b, the number of attribute nodes in the background knowledge graph G′ is c, and the number of associated features in the background knowledge graph G′ is d;
[0012] Set the dimension of the latent semantic feature vector to e, use the random initialization method to construct the a×e-dimensional user feature matrix U, the b×e-dimensional product feature matrix V, the c×e-dimensional attribute feature matrix F, and the d×e-dimensional association feature matrix R, and map the user nodes, product nodes, attribute nodes, and association features to the feature vectors in the corresponding feature matrix according to the sequence number;
[0013] Step 5: Build a feature vector learning module based on an n-layer transformer network and a layer of graph attention network GAT to learn global feature vectors and local feature vectors for each user-item pair;
[0014] Step 5.1, sub-graph extraction:
[0015] Step 5.1.1: For the j-th user node u j The support set S j User-item pairs in Extract the u-th j Product nodes Direct attribute characteristics in, Indicates the uth j Product nodes The number of direct attribute features, Indicates the uth j Product nodes The hth direct attribute feature of ;
[0016] Step 5.1.2: Extract the u-th j Product nodes The attribute characteristics associated with the direct attribute characteristics in, Represents the u j Product nodes The direct attribute feature set of j Product nodes The direct attribute feature set of A direct attribute feature of Representative and j Product nodes The number of attribute features associated with the direct attribute features, Representative and j Product nodes Attribute characteristics associated with the direct attribute characteristics;
[0017] Step 5.1.3: Direct attribute features and its associated attribute characteristics Together they form the j Product nodes The property set
[0018] Step 5.1.4: Obtain the jth user node u according to the process of steps 5.1.1 to 5.1.3 j The query set Q j The attribute set C of all commodity nodes in j ;
[0019] Step 5.1.5: Obtain the support set S according to the process of steps 5.1.1 to 5.1.3 j The attribute set of the item node in the pseudo user-item pair
[0020] Step 5.2, subgraph vectorization:
[0021] Step 5.2.1. j Product nodes The attribute set C ujIt is represented as a label sequence χ={x1,...,x i ,...,x (4p+3)}, where x i represents the i-th element. The elements corresponding to the odd numbers represent entities, and the elements corresponding to the even numbers represent the associated features between the two adjacent elements corresponding to the odd numbers. Let the i-th element x i The position vector in the tag sequence χ is Let the i-th element x i The corresponding feature vectors in the user feature matrix U, product feature matrix V, attribute feature matrix F, and association feature matrix R are recorded as So the feature vector and the position vector The sum of the two forms the i-th element x i The vector representation z i ;
[0022] Step 5.2.2: Follow the process of step 5.2.1 to obtain the vector representation of each element in the tag sequence χ, thereby obtaining the vector representation set z0 = {z1,…,z i ,…,z 4p+3};
[0023] The vector representation set z0 is input into the transformer network for training and the updated vector representation z′ is obtained, and the middle three elements z′ of the updated vector representation z′ are extracted. 2p ,z′ 2p+1 ,z′ 2p+2 Then take the mean and get the support set S j The global eigenvector of
[0024] Step 5.2.3: Follow the process of steps 5.2.1-5.2.2 to query set Q j Each user-item pair in is processed to obtain the query set Q j The global eigenvector G j ;
[0025] Step 5.2.4: Input the updated vector representation z′ into the graph attention network GAT for training and obtain the support set S j The local eigenvector of
[0026] Step 5.2.5: Follow the process of step 5.2.4 to query set Q j Each user-item pair in is processed to obtain the query set Q j The local vector representation L j ;
[0027] Step 5.2.6: Follow the process from step 5.2.1 to step 5.2.2 to calculate the support set S j The pseudo user-item pairs in are processed to obtain the global feature vector Follow the process in step 5.2.4 to obtain the local feature vector of the pseudo user-item pair
[0028] Step 6: Query set Q j Measure the credibility of user-item pairs;
[0029] Step 6.1, calculate the global score:
[0030] By the support set S j The global eigenvector of With the query set Q j The global eigenvector G j After performing dot multiplication respectively, we get the global score S global ;
[0031] Step 6.2, calculate the local score:
[0032] By the support set S j The local eigenvector of With the query set Q j The local eigenvector L j After performing point multiplication respectively, we get the local score S local ;
[0033] Step 6.3: Calculate the query set Q using formula (1) j The final score S of the kth user-item pair in k :
[0034]
[0035] In formula (1), λ is a hyperparameter; is the global score S global The kth score in is the local score S local The kth score in
[0036] Step 6.4: Calculate the final score of the pseudo user-item pair according to the process of steps 6.2-6.3
[0037] Step 7: Based on the user-product interaction bipartite graph G T With the background knowledge graph G′, the feature vector learning module is trained using the back propagation algorithm, and the loss function L shown in formula (2) is calculated. When the loss function continues to decrease until convergence, the optimal classification model is obtained:
[0038] L=max(0,γ+S - -S + ) (2)
[0039] In formula (2), S + is the score of the user-item pair in the query set, S - is the score of the pseudo user-item pair corresponding to the support set, and γ is a hyperparameter;
[0040] Step 8: Input a number of commodities that the target user has not interacted with into the optimal classification model, thereby outputting the interaction probability of the corresponding commodities, and recommending commodities with higher interaction probabilities to the target user.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] 1. To address the cold start problem, the present invention constructs a user-product interaction bipartite graph, uses the knowledge graph to integrate the direct attributes of the product and the attribute features associated with the direct attribute features, fully utilizes the knowledge information of the knowledge graph, and integrates the semantic information of the user-product pair itself into the vector representation, reflecting the semantic relationship between the user-product pair and improving the expressiveness of the user-product pair vector representation, thereby capturing the user's deep potential interests and paving the way for making accurate recommendations to users;
[0043] 2. To address the problem of data sparsity, the present invention uses a meta-learning-based method, which enables useful information to be learned using only a few user-item pairs, and thus enables accurate analysis of users with less reference data, greatly improving the overall effect of the recommendation system;
[0044] 3. The present invention adopts a graph neural network based on transformer network and attention mechanism to integrate the rich semantics and association information in the knowledge graph. It can simultaneously model the content of the product attribute node itself and the association information between product nodes, which are two factors that can affect user interests. It adaptively calculates the influence weight of different nodes on the product, and integrates the information into the product expression, thereby improving the modeling quality of the product.
[0045] 4. The present invention calculates the rationality score of the user-item pair based on the global and local semantic information of the user-item pair, which can increase the accuracy of the recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0047] In this embodiment, a product recommendation method based on meta-learning and knowledge graph is to project users, products and related attributes of products into a latent semantic vector space with the same dimension, and then aggregate the mutually influencing feature vectors by feature propagation and weighted combination in the transformer network and graph attention network, so as to obtain a vector representation of user-product pairs with richer semantic information, making the recommendation system more accurate. Specifically, Figure 1 As shown, the steps are as follows:
[0048] Step 1: Obtain the data of historical interaction records of users and products. Each interaction record consists of users and products. The users and products in the data are respectively regarded as user nodes and product nodes. The historical interaction records in the data are regarded as an edge between user nodes and product nodes, recorded as user-product pairs, so as to construct the user-product interaction bipartite graph G. T , where U is the user-product interaction bipartite graph G T The corresponding user node set, u j is the jth user node in the user node set U, and I represents the user-product interaction bipartite graph G T The corresponding commodity node set, i n is the nth commodity node of I in the commodity node set;
[0049] Step 2: Collect the attribute information of the products in the historical interaction record data, as well as the association information between products and attributes, and between attributes, and use prior knowledge to construct a background knowledge graph G′ containing product nodes, various attribute nodes of the products themselves, and association information;
[0050] Step 3: From the user-product interaction bipartite graph G T Extract the jth user node u from j , and select the jth user node u j A user-item pair is used to construct the support set S of the jth user node j , using the jth user node u j The remaining user-item pairs construct the query set Q of the jth user node j ; At the same time, randomly select the first Product nodes And the first Product nodes With the jth user node u j There is no edge between them, so the support set S is constructed j Pseudo user-item pairs;
[0051] Step 4: Count the user-product interaction bipartite graph G TThe number of user nodes a in the user-product interaction bipartite graph G T The number of product nodes in the background knowledge graph G′ is b, the number of attribute nodes in the background knowledge graph G′ is c, and the number of associated features in the background knowledge graph G′ is d;
[0052] Set the dimension of the latent semantic feature vector to e, use the random initialization method to construct the a×e-dimensional user feature matrix U, the b×e-dimensional product feature matrix V, the c×e-dimensional attribute feature matrix F, and the d×e-dimensional association feature matrix R, and map the user nodes, product nodes, attribute nodes, and association features to the feature vectors in the corresponding feature matrix according to the sequence number;
[0053] Step 5: Construct a feature vector learning module based on an n-layer transformer network and a layer of graph attention network GAT to integrate the rich semantics and association information in the knowledge graph. It can simultaneously model the content of the product attribute node itself and the association information between product nodes, two factors that can affect user interest. It adaptively calculates the influence weight of different nodes on the product and integrates the information into the product expression, thereby obtaining the global feature vector and local feature vector of the user-product pair.
[0054] Step 5.1, sub-graph extraction:
[0055] Step 5.1.1: For the j-th user node u j The support set S j User-item pairs in Extract the u-th j Product nodes Direct attribute characteristics in, Indicates the uth j Product nodes The number of direct attribute features, Indicates the uth j Product nodes The hth direct attribute feature of ;
[0056] For example, user u j When buying bananas, we can extract the direct attribute features of bananas from the background knowledge graph, that is, sweetness, smoothness and other similar features as the direct attribute features of the product;
[0057] Step 5.1.2: Extract the u-th j Product nodes The attribute characteristics associated with the direct attribute characteristics in, Represents the u j Product nodes The direct attribute feature set of j Product nodes The direct attribute feature set of A direct attribute feature of Representative and j Product nodes The number of attribute features associated with the direct attribute features, Representative and j Product nodes Attribute characteristics associated with the direct attribute characteristics;
[0058] Taking banana as an example, the corresponding relationship between the attribute sweetness and the attribute bitterness is an antonym relationship, so in the later stage, we will try to avoid recommending products related to the attribute bitterness; the attribute sweetness and the attribute sweetness are super-word relationships, so in the later stage, more products related to the attribute sweetness will be associated;
[0059] Step 5.1.3: Direct attribute features and its associated attribute characteristics Together they form the j Product nodes The property set
[0060] Step 5.1.4: Obtain the jth user node u according to the process of steps 5.1.1 to 5.1.3 j The query set Q j The attribute set C of all commodity nodes in j ;
[0061] Step 5.1.5: Obtain the support set S according to the process of steps 5.1.1 to 5.1.3 j The attribute set of the item node in the pseudo user-item pair
[0062] Step 5.2, subgraph vectorization:
[0063] Step 5.2.1. j Product nodes The property set It is represented as a tag sequence χ={x1,…,x i ,…,x (4p+3)}, where x i represents the i-th element. The elements corresponding to the odd numbers represent entities, and the elements corresponding to the even numbers represent the associated features between the two adjacent elements corresponding to the odd numbers. Let the i-th element x i The position vector in the tag sequence χ is Specifically, we assign a position index to each element to characterize the structure of the tag sequence. For example, we set the position index of the structure of entity-associated feature-entity to 2p, 2p+1, and 2p+2 respectively; let the i-th element x i The corresponding feature vectors in the user feature matrix U, product feature matrix V, attribute feature matrix F, and association feature matrix R are recorded as So the feature vector and the position vector The sum of the two forms the i-th element x i The vector representation z i ;
[0064] Step 5.2.2: Follow the process of step 5.2.1 to obtain the vector representation of each element in the tag sequence χ, thereby obtaining the vector representation set z0 = {z1,…,z i ,…,z 4p+3};
[0065] The vector representation set z0 is input into the transformer network for training and the updated vector representation z′ is obtained. The transformer network can integrate the rich semantics and association information of the products in the knowledge graph, and can simultaneously model the content of the product attribute node itself and the association information between product nodes, which are two factors that can affect user interest.
[0066] Extract the middle three elements z′ of the update vector representation z′ 2p ,z′ 2p+1 ,z′ 2p+2 Then take the mean and get the support set S j The global eigenvector g of uj ;
[0067] Step 5.2.3: Follow the process of steps 5.2.1-5.2.2 to query set Q j Each user-item pair in is processed to obtain the query set Q j The global eigenvector G j ;
[0068] Step 5.2.4: Input the updated vector representation z′ into the graph attention network GAT for training and obtain the support set S j The local eigenvector of The graph attention network (GAT) can adaptively calculate the influence weight of different nodes on products and integrate the information into the product expression, thereby improving the modeling quality of the product.
[0069] For example, among the attributes associated with bananas, the attribute of sweetness should have a larger weight, the other common attributes such as food should have a smaller weight, and the attribute of bitterness should have a small and almost negligible weight;
[0070] Step 5.2.5: Follow the process of step 5.2.4 to query set Q j Each user-item pair in is processed to obtain the query set Q j The local vector representation L j ;
[0071] Step 5.2.6: Follow the process from step 5.2.1 to step 5.2.2 to calculate the support set S j The pseudo user-item pairs in are processed to obtain the global feature vector Follow the process in step 5.2.4 to obtain the local feature vector of the pseudo user-item pair
[0072] Step 6: Query set Q j The credibility of user-item pairs is measured;
[0073] Step 6.1, calculate the global score:
[0074] By the support set S j The global eigenvector of With the query set Q j The global eigenvector G j After performing dot multiplication, we get the global score S global ;
[0075] Step 6.2, calculate the local score:
[0076] By the support set S j The local eigenvector of With the query set Q j The local eigenvector L j After performing point multiplication respectively, we get the local score S local ;
[0077] Step 6.3: After the above two stages, the global score and local score are calculated, and the query set Q is calculated using formula (1) j The final score S of the kth user-item pair in k :
[0078]
[0079] In formula (1), λ is a hyperparameter; is the global score S global The kth score in is the local score S localThe kth score in S k The value range is between 0 and 1;
[0080] Step 6.4: Calculate the final score of the pseudo user-item pair according to the process of steps 6.2-6.3
[0081] Step 7: Based on the user-product interaction bipartite graph G T The feature vector learning module is trained with the background knowledge graph G′ using the back propagation algorithm, and the loss function L shown in formula (2) is calculated. When the loss function continues to decrease until convergence, the optimal classification model is obtained:
[0082] L=max(0,γ+S - -S + ) (2)
[0083] In formula (2), S + is the score of the user-item pair in the query set, S - is the score of the pseudo user-item pair corresponding to the support set, and γ is a hyperparameter;
[0084] Step 8: Input several products that the target user has not interacted with into the optimal classification model, so as to output the interaction probability of the corresponding products, and recommend the products with the highest interaction probability to the target user.
Claims
1. A product recommendation method based on meta-learning and knowledge graph, Its characteristics are Proceed as follows: Step 1: Obtain the data of historical interaction records of users and commodities, and use the users and commodities in the data as user nodes and commodity nodes respectively, and use the historical interaction records in the data as an edge between the user node and the commodity node, recorded as a user-commodity pair, so as to construct a user-commodity interaction bipartite graph G T , where U is the user-product interaction bipartite graph G T The corresponding user node set, u j is the jth user node in the user node set U, and I represents the user-product interaction bipartite graph G T The corresponding commodity node set, i n is the nth commodity node of I in the commodity node set; Step 2: Collect the attribute information of the products in the historical interaction record data, as well as the association information between products and attributes, and between attributes, and use prior knowledge to construct a background knowledge graph G′ containing product nodes, various attribute nodes of the products themselves, and association information; Step 3: From the user-product interaction bipartite graph G T Extract the jth user node u from j , and select the jth user node u j A user-item pair is used to construct the support set S of the jth user node j , using the jth user node u j The remaining user-item pairs construct the query set Q of the jth user node j ; At the same time, randomly select the first Product nodes And the first Product nodes With the jth user node u j There is no edge between them, so the support set S is constructed j Pseudo user-item pairs; Step 4: Count the user-product interaction bipartite graph G T The number of user nodes a in the user-product interaction bipartite graph G T The number of product nodes in the background knowledge graph G′ is b, the number of attribute nodes in the background knowledge graph G′ is c, and the number of associated features in the background knowledge graph G′ is d; Set the dimension of the latent semantic feature vector to e, use the random initialization method to construct the a×e-dimensional user feature matrix U, the b×e-dimensional product feature matrix V, the c×e-dimensional attribute feature matrix F, and the d×e-dimensional association feature matrix R, and map the user nodes, product nodes, attribute nodes, and association features to the feature vectors in the corresponding feature matrix according to the sequence number; Step 5: Build a feature vector learning module based on an n-layer transformer network and a layer of graph attention network GAT to learn global feature vectors and local feature vectors for each user-item pair; Step 5.1, sub-graph extraction: Step 5.1.1: For the j-th user node u j The support set S j User-item pairs in Extract the u-th j Product nodes Direct attribute characteristics in, Indicates the uth j Product nodes The number of direct attribute features, Indicates the uth j Product nodes The hth direct attribute feature of ; Step 5.1.2: Extract the u-th j Product nodes The attribute characteristics associated with the direct attribute characteristics in, Represents the u j Product nodes The direct attribute feature set of j Product nodes The direct attribute feature set of A direct attribute feature of Representative and j Product nodes The number of attribute features associated with the direct attribute features, Representative and j Product nodes Attribute characteristics associated with the direct attribute characteristics; Step 5.1.3: Direct attribute features and its associated attribute characteristics Together they form the j Product nodes The property set Step 5.1.4: Obtain the jth user node u according to the process of steps 5.1.1 to 5.1.3 j The query set Q j The attribute set C of all commodity nodes in j ; Step 5.1.5: Obtain the support set S according to the process of steps 5.1.1 to 5.1.3 j The attribute set of the item node in the pseudo user-item pair Step 5.2, subgraph vectorization: Step 5.2.
1. j Product nodes The property set It is represented as a tag sequence χ = {x 1 ,...,x i ,...,x (4p+3) }, where x i represents the i-th element. The elements corresponding to the odd numbers represent entities, and the elements corresponding to the even numbers represent the associated features between the two adjacent elements corresponding to the odd numbers. Let the i-th element x i The position vector in the tag sequence χ is Let the i-th element x i The corresponding feature vectors in the user feature matrix U, product feature matrix V, attribute feature matrix F, and association feature matrix R are recorded as So the feature vector and the position vector The sum of the two forms the i-th element x i The vector representation z i ; Step 5.2.2: Follow the process of step 5.2.1 to obtain the vector representation of each element in the tag sequence x, thereby obtaining the vector representation set z 0 ={z 1 ,…,z i ,…,z 4p+3 }; The vector represents the set z 0 Input the transformer network for training and obtain the updated vector representation z′, and extract the middle three elements z′ of the updated vector representation z′ 2p ,z′ 2p+1 ,z′ 2p+2 Then take the mean and get the support set S j The global eigenvector of Step 5.2.3: Follow the process of steps 5.2.1-5.2.2 to query set Q j Each user-item pair in is processed to obtain the query set Q j The global eigenvector G j ; Step 5.2.4: Input the updated vector representation z′ into the graph attention network GAT for training and obtain the support set S j The local eigenvector of Step 5.2.5: Follow the process of step 5.2.4 to query set Q j Each user-item pair in is processed to obtain the query set Q j The local vector representation L j ; Step 5.2.6: Follow the process from step 5.2.1 to step 5.2.2 to calculate the support set S j The pseudo user-item pairs in are processed to obtain the global feature vector Follow the process in step 5.2.4 to obtain the local feature vector of the pseudo user-item pair Step 6: Query set Q j The credibility of user-item pairs is measured; Step 6.1, calculate the global score: By the support set S j The global eigenvector of With the query set Q j The global eigenvector G j After performing dot multiplication, we get the global score S global ; Step 6.2, calculate the local score: By the support set S j The local eigenvector of With the query set Q j The local eigenvector L j After performing point multiplication respectively, we get the local score S local ; Step 6.3: Calculate the query set Q using formula (1) j The final score S of the kth user-item pair in k : In formula (1), λ is a hyperparameter; is the global score S global The kth score in is the local score S local The kth score in Step 6.4: Calculate the final score of the pseudo user-item pair according to the process of steps 6.2-6.3 Step 7: Based on the user-product interaction bipartite graph G T With the background knowledge graph G′, the feature vector learning module is trained using the back propagation algorithm, and the loss function L shown in formula (2) is calculated. When the loss function continues to decrease until convergence, the optimal classification model is obtained: L=max(0,γ+S - -S + ) (2) In formula (2), S + is the score of the user-item pair in the query set, S - is the score of the pseudo user-item pair corresponding to the support set, and γ is a hyperparameter; Step 8: Input a number of commodities that the target user has not interacted with into the optimal classification model, thereby outputting the interaction probability of the corresponding commodities, and recommending commodities with higher interaction probabilities to the target user.
Citation Information
Patent Citations
Method for carrying out personalized recommendation on commodities by fusing knowledge graph
CN112232925A
Tourism route recommendation method and system based on tourism knowledge graph
CN112749339A
