A User Preference Prediction Method Based on the Pairing Method and Graph Convolutional Neural Network

By adopting a method based on pairing method and graph convolution neural network in the recommendation system, the shortcomings of the traditional matrix decomposition model in mining user-product interaction information and utilizing additional information are solved, and a higher quality user preference prediction is achieved.

CN115271173BActive Publication Date: 2025-06-24KUNMING UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210738469.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2025-06-24
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

The traditional matrix decomposition model is insufficient and cannot utilize additional information when mining user-product interaction information, and there is also an inconsistency between the accuracy of rating prediction and the quality of user preferences.

Method used

The user preference prediction method based on the pairing method and graph convolution neural network is adopted to mine user-product interaction information through the graph convolution layer, and combine the additional information of users and products, and optimize model parameters using the pairing loss function to improve the quality of the user preference sequence.

Benefits of technology

It effectively improves the quality of user preference prediction, solves the problem of inconsistent rating prediction accuracy and user preference quality, and makes full use of additional information from users and products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115271173B_ABST
    Figure CN115271173B_ABST
Patent Text Reader

Abstract

The present invention relates to a user preference prediction method based on the pairing method and graph convolutional neural network, belonging to the technical field of recommendation systems. First, preprocess the data and divide it into a training set and a test set, construct a user-item matrix with the test set data, a grading matrix corresponding to each rating, and construct pairwise comparisons between items for each user. Secondly, initialize the user and item vector groups and input them into the graph convolutional layer, and fuse additional information such as user age, occupation, and item attributes to obtain the user and item embedding vector groups. Then, obtain the predicted value through the prediction layer and optimize the model parameters using the pairing loss function. Finally, use the trained model to predict user preferences. The present invention uses graph convolutional neural network to mine user-item interaction information and constructs a prediction layer that combines non-linear and linear interactions. In addition, this method constructs a loss function based on the pairing method, effectively solving the problem that the rating criteria of different users are different, making the ratings incomparable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a user preference prediction method based on a pairing method and a graph convolutional neural network, belonging to the technical field of recommendation systems. Background Art

[0002] With the expansion of the network coverage, the Internet has been applied to various fields, resulting in a wide variety of online services such as online education, online entertainment, online shopping, and online car-hailing. They provide users with rich choices, but the difficulty for users to screen services is increasing day by day. Therefore, users need to rely on recommendation systems to quickly discover the services they need.

[0003] In recommendation systems, collaborative filtering is a type of technical solution that uses user-item interaction information (usually the historical rating data of users) to calculate the similarity between users or the similarity between items, and predicts the recommendation results based on the similarity. Matrix factorization is a classic collaborative filtering model that represents users and items as low-dimensional vectors and uses the inner product of the two as the prediction result of the corresponding user-item evaluation. The traditional matrix factorization model aims to optimize the root mean squared error (RMSE), that is, to improve the accuracy of rating prediction. However, Balakrishnan S et al. ("Collaborative ranking." Proceedings of the fifth ACM international conference on Web search and data mining. 2012.) proposed that the quality of rating prediction is not necessarily equivalent to the quality of ranking, and the normalized discounted cumulative gain (NDCG) is a better evaluation metric; on the other hand, when a user gives a rating to an item, it is the cardinal utility expressed quantitatively after using or experiencing the item. The problem with using ratings to represent user preferences for items is that it is necessary to assume that every user evaluates items objectively according to the same standard. However, different users have different rating criteria. Some users tend to give high scores, while others do the opposite. Therefore, simply improving the accuracy of rating prediction cannot reflect user preferences. Relative to ratings, users' ordinal preferences are reflected in the comparison of the superiority and inferiority between pairs of items, and this form can more accurately reflect user preferences without relying on additional assumptions.

[0004] Different from collaborative filtering which aims to reduce the root mean square error of prediction results, the Collaborative Ranking model aims to improve the quality of the predicted user preference sequence. The classic methods of collaborative ranking include the point model, the pairwise model, and the list model. Examples of the point model are CofiRank which designs the maximum margin matrix factorization (Weimer, Markus, et al. "Cofi rank-maximum margin matrix factorization for collaborative ranking." Advances in neural information processing systems 20 (2007)); the pairwise model is Collrank (Park, Dohyung, et al. "Preference completion: Large-scale collaborative ranking from pairwise comparisons." International Conference on Machine Learning. PMLR, 2015); examples of the list model are List-wise MF (Shi, Yue, Martha Larson, and Alan Hanjalic. "List-wise learning to rank with matrix factorization for collaborative filtering." Proceedings of the fourth ACM conference on Recommender systems. 2010). Most of these collaborative ranking models are based on matrix factorization, using the inner product of user and item embedding vectors to model the interaction between the two, aiming to minimize a specific loss function, rather than converting the rating information into a bipartite graph and mining user-item interaction information in the graph structure. At the same time, in these models, it is difficult to use additional information such as the age and occupation of users and the attributes of items to optimize the corresponding embedding representations.

[0005] In recent years, deep learning has been widely applied in fields such as computer vision and natural language processing. Among the numerous network architectures adopted in deep learning, the Convolutional Neural Network (CNN) plays an important role in computer vision and other fields due to its powerful feature representation ability. Texts, images, and videos are all data defined on regular grids, and they can be correspondingly regarded as distributed on one-dimensional, two-dimensional, and three-dimensional grid support sets. Based on such regularity features, CNN can perform operations conveniently. Compared with the data on these regular grids, graph signal data is distributed or defined on an irregular grid support set. Generalizing the convolutional neural network to such irregular grid data as graph data has given rise to graph convolution models such as GCMC, NGCF, and LightGCN. These models mine the node interaction information in the graph through convolutional operations on graph signals and generate more meaningful embedding representations compared to traditional collaborative filtering methods. Another major advantage of neural networks is that it is convenient to incorporate additional information about users and commodities into the model to optimize the embedding representations of users and commodities. However, currently, graph convolution models based on rating data (such as GCMC) usually aim to reduce RMSE, and there is no graph convolution model that optimizes users' ordinal preferences. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide a user preference prediction method based on the pairing method and graph convolutional neural network, which is used to solve the problem that traditional matrix factorization models lack the ability to mine user-item interaction information and cannot utilize additional information. At the same time, the quality of the predicted user preference sequence is directly optimized through a pairwise comparison-based loss function, avoiding the inconsistency between the accuracy of rating prediction and the quality of user preferences.

[0007] The technical solution of the present invention is: a user preference prediction method based on the pairing method and graph convolutional neural network. First, preprocess the data and divide it into a training set and a test set, construct a user-item matrix with the test set data, a grading matrix corresponding to each rating, and construct pairwise comparisons between commodities for each user. Secondly, initialize the user and commodity vector groups and input them into the graph convolutional layer, and fuse additional information such as user age, occupation, and commodity attributes to obtain user and commodity embedding vector groups. Then, obtain the predicted value through the prediction layer and optimize the model parameters using the pairing loss function. Finally, use the trained model to predict user preferences.

[0008] The specific steps are as follows:

[0009] Step 1: Obtain the user-item rating dataset and additional information about users and items. Preprocess the user-item rating data and divide it into a training set and a test set. Process the additional information of users and items to obtain the corresponding feature vector groups. Classify the user rating data in the training set according to the scores, and the ratings with the same score are grouped into one class. Construct a hierarchical matrix for the rating data of the same class. In addition, for each user, pairwise compare the items according to the rating scores of different items by the user, and then form a set of pairwise comparisons for all users. Construct an initial matrix according to the number of users and items.

[0010] Step 2: Input the initial matrix and all hierarchical matrices into the graph convolutional layer to obtain the user intermediate vector group and the item intermediate vector group.

[0011] Step 3: Add the feature vectors of users and items to the user and item intermediate vector groups through the fully connected layer to obtain the corresponding embedding matrices. Then input the two embedding matrices into the prediction layer to obtain the predicted scoring matrix and optimize the model parameters using the pairwise loss function.

[0012] Step 4: Use the trained model to predict user preferences.

[0013] The specific content of Step 1 is as follows:

[0014] Step 1.1: Obtain three pieces of data, namely the user-item rating dataset and the additional information of users and items. Preprocess the user-item rating data and divide it into a training set and a test set.

[0015] Construct a user-item rating matrix R according to the training set. N u represents the total number of all users in the training set, and N v represents the total number of all items in the training set. The element R of the rating matrix ij represents the rating of user u i for item v j .

[0016] The rating range of users for items is Π = {1, 2, 3..r}, |Π| = r, and R ij ∈ Π. Obtain the additional information of users and items and preprocess it to obtain the corresponding feature vectors.

[0017] The additional information of users includes age and occupation, and the additional information of items includes price and attributes. Stack all the feature vectors of users and items into a feature vector group N = N u + N v , D f represents the dimension of the feature vector, and X f represents the first N uBehavior user feature vector, X f Denote the last N v Behavior commodity feature vectors.

[0018] Step1.2: According to the rating range Π of the user for the commodity, construct M1, M2, … M r A total of r zero matrices, called hierarchical matrices,

[0019] Step1.3: According to the rating R in R ij = r, r ∈ {1, 2, 3..r}, that is, user u i rates item v j as r, fill the corresponding position of the hierarchical matrix M r with 1, if R ij = r then M r,ij = 1.

[0020] Step1.4: Perform the operation in Step1.3 for each rating in R.

[0021] Step1.5: For user u in the training set i , construct a pairwise comparison set Ω i = {(i, j, k)|R ij > R ik}.

[0022] Step1.6: Loop Step1.5 until all users in the training set are traversed to obtain all pairwise comparison sets in the training set

[0023] Step1.7: Construct an identity matrix X ∈ R N×N , N = N u + N v as the initialization matrix. For any row X i = x, x = [x1, x2…x N , x i = 1, and the rest are 0, that is, each node is represented by a unique one-hot encoding.

[0024] Specifically, Step2 is as follows:

[0025] Step2.1: Input the initialization matrix and all hierarchical matrices into the graph convolutional layer together. Regard the graph convolution as the transmission of information along the edges between heterogeneous nodes in the user-commodity bipartite graph. According to the different ratings on the edges, the edges with different ratings can be regarded as different types. The transmission of information from commodity node j to user node i along the edge with rating r can be expressed as:

[0026]

[0027] C in the above formula ij is a normalization constant, and its value can be |N i | or where N i represents the set of adjacent nodes of user node i, and N j represents the set of adjacent nodes of commodity node j. W r is the user convolution weight parameter matrix corresponding to the score r, and X j represents the initial one-hot encoding of commodity node j.

[0028] Step2.1: The information transfer from user node i to commodity node j along the edge with score r can be expressed as:

[0029]

[0030] The weights are shared among edges of the same type, and each parameter is consistent with the definition in the message passing from commodity nodes to user nodes.

[0031] Step2.3: After message passing, it is necessary to aggregate different types of messages μ input by each user or item node. The specific operation is to aggregate all messages into a single intermediate vector according to certain rules:

[0032] For user node i, there is

[0033] For commodity node j, there is

[0034] where accum(·) represents the aggregation operation, which can be implemented by stacking stack(·), that is, concatenating multiple vectors into one vector. Or sum(·), that is, summing all vectors. σ(·) represents an activation function, and ReLU = max(0,·) or other forms can be selected. h i , h j are the intermediate vectors of user node i and commodity node j obtained after graph convolution.

[0035] The specific content of Step3 is as follows:

[0036] Step3.1: Since the characteristic information between users and between commodities (such as the age and occupation of users, the type of commodities, etc.) is not distinct enough, some users and some commodities cannot be distinguished by characteristic information. Therefore, directly using the characteristic information as the initial vector group of users and commodities input to the graph convolution layer will cause a serious information bottleneck. Therefore, in order to utilize the characteristic information, a fully connected neural network is used to integrate the feature vectors into the intermediate vectors to obtain embedding vectors, and the embedding vectors are stacked into the corresponding embedding matrix.

[0037] For user ui and commodity v j , first input their corresponding feature vectors into the fully connected layer, and obtain f through linear transformation and non-linear activation i , f j .

[0038]

[0039]

[0040] Next, use the fully connected layer to combine f i , f j with the intermediate vector h i , h j to obtain the embedding vectors U i of user u j and commodity v i , V j . Stack all U i to form the user embedding matrix U, and similarly, the commodity embedding matrix V can be obtained.

[0041] User u i Embedding vector:

[0042] Commodity v j Embedding vector:

[0043] Among them, represents the feature vectors of user node i and commodity node j, W u , W v is a trainable weight matrix, is the bias, and σ(·) represents an activation function, and ReLU = max(0,·) can be selected.

[0044] Step3.2: The prediction layer uses a neural network to replace the inner product to represent the user-commodity interaction, and models the user-commodity interaction through the non-linear transformation and bilinear transformation of the embedding vectors of user u i , commodity v j to predict the preference degree of user u i for commodity v j .

[0045] First, perform non-linear transformation on the embedding vectors U i of user u j , commodity v i , V j to obtain the intermediate vectors u ni , v nj , and then obtain user u through bilinear transformation and adding biasi The predicted value of the score for product v j

[0046] u ni = σ(W nu U i + b1)

[0047] v nj = σ(W nv V j + b2)

[0048]

[0049] where σ(·) is ReLU = max(0,·), W nu , W nv , Q are all trainable weight matrices, and b1, b2, b3 are biases. The size of the score represents the degree of preference. Similarly, the predicted values for all user - product combinations can be obtained, and these predicted values are denoted as the predicted score matrix Y.

[0050] Step 3.3: To further improve the quality of preference prediction rather than simply enhancing the accuracy of score prediction, the present invention constructs a hinge loss function based on the pairwise comparison set Ω. During training, s pairwise comparisons are randomly sampled from the set Ω to form a subset Ω s , |Ω s | = s, then the loss function is:

[0051]

[0052] l hinge = max(0, m - x), m > 0

[0053] m is a predefined score difference interval.

[0054] ​The beneficial effects of the present invention are as follows: Based on user rating data, the present invention proposes a method for predicting user ordinal preferences based on the pairing method and graph convolutional neural network. This method represents user rating data as a bipartite graph composed of user and item nodes, and then uses message passing between heterogeneous nodes on the user-item bipartite graph, that is, graph convolution, to deeply explore user-item interaction information. The output of the graph convolution layer is fused with additional information of users and items through a fully connected layer to obtain the embedding representations of users and items, so as to improve the information utilization rate. The embedding representations of users and items are input into the prediction layer to obtain the output of the model. Compared with the traditional matrix factorization model that uses the inner product to model the interaction between users and items, the neural network modeling makes full use of non-linearity and has better prediction effect. When optimizing the model, this method is based on pairwise comparison between items constructed from user rating data, and uses the hinge loss function to optimize the model, directly improving the quality of the model's prediction of the user ordinal preference sequence, and effectively solving the problem of inconsistent accuracy of rating prediction and quality of preference prediction in traditional recommendation problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 is the flowchart of the steps of the present invention;

[0056] Figure 2 is the structural schematic diagram of the user preference prediction method model based on the pairing method and graph convolutional neural network in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0057] The present invention will be further described below in conjunction with the drawings and specific embodiments.

[0058] Embodiment 1: As Figure 1 shown, a method for predicting user preferences based on the pairing method and graph convolutional neural network, the specific steps are as follows:

[0059] Step1: Use the MovieLens100k dataset, which is collected through the MovieLens website. The interaction between users and items (movies) means the ratings given by movie viewers to the movies they watched. This dataset contains 943 users, 1682 items (movies), a total of 100,000 rating data, and the rating score r of users for items (movies) ∈ {1, 2, 3, 4, 5}. The additional information of each user includes the user's age and occupation; the additional information of each item (movie) includes the release time, type, etc. In the experiment, user data with a rating count less than or equal to 20 is first removed, and then 20 ratings are selected for each user as the test set, and the rest are used as the training set. Such a division makes the training set data volume account for 81.1% of the total data volume. The rating matrix R, R ∈ R 943×1682 .

[0060] Specifically:

[0061] Step 1.1: Construct hierarchical matrices. Construct 5 zero matrices, M1, M2, M3, M4, M5, M 1,2,3,4,5 ∈R 943×1682 According to the score R in R ij = r, the hierarchical matrix M r Corresponding position M r,ij Filled with 1, that is, R ij = r then M r,ij = 1. Process the additional information of users and products to obtain the feature vectors of each user and product. Stack the feature vectors of all users and products into a feature vector group N = 943 + 1682 = 2625, D f Indicates the dimension of the feature vector. The first 943 row vectors are user feature vectors, and the last 1682 row vectors are product feature vectors. Get feature information X f .

[0062] Step 1.2: Traverse the rating matrix R until M1 to M5 are filled, and obtain the corresponding five grading matrices M1, M2, M3, M4, and M5.

[0063] Step 1.3: According to the user u in the training set i The scoring data is used to construct a pairwise comparison set Ω i ={(i,j,k)|R ij >R ik}.

[0064] Step 1.4: Traverse the rating data of each user in the training set and construct a set of all pairwise comparisons in the training set

[0065] Step 1.5: Construct an identity matrix X∈R N×N ,N=943+1682=2625, X will be used as the initialization matrix, each row has only one element of 1, and the rest of the elements are all 0, that is, each node is represented by a unique one-hot encoding.

[0066] Step 2: Initialize the user and product node vector groups, and input them into the graph convolution layer of the model together with the classification matrix to obtain the user intermediate vector group and the product intermediate vector group.

[0067] Specifically:

[0068] Perform a convolution operation. For each user / item node in the bipartite graph, calculate the message vectors of its adjacent nodes, sum these message vectors, and obtain a single intermediate vector h i / h j . Stack all the intermediate vectors to get the intermediate matrix The above calculation is vectorized as:

[0069]

[0070] where, W r represents the trainable weight matrix; D represents the diagonal node degree matrix with non-zero elements, and D ii = |N i |, and |N i | represents the number of adjacent nodes of node i.

[0071] Step3: Add the feature vectors of the user and the commodity to the intermediate vector group of the user and the commodity through the fully connected layer to obtain the corresponding embedding vectors, and stack the embedding vectors into the corresponding embedding matrix. Then, input the two embedding matrices into the prediction layer to obtain the prediction score matrix and optimize the model parameters using the pairing loss function.

[0072] Specifically:

[0073] Step3.1: Process the feature information of the user and commodity nodes. For user u i and commodity v j , first input their corresponding feature vectors into the fully connected layer, and obtain f i , f j after linear transformation and non-linear activation.

[0074]

[0075]

[0076] Then, use the fully connected layer to combine f i , f j with the intermediate vector h i , h j to obtain the embedding vectors U i of user u j and commodity v i , V j . Stack all U i to form the user embedding matrix U, and similarly obtain the commodity embedding matrix V.

[0077] Embedding vector of user u i :

[0078] Embedding vector of commodity v j :

[0079] represents the feature vectors of user node i and commodity node j, Wu ,W v is a trainable weight matrix, and b is a bias. σ(·) represents an activation function, and ReLU = max(0, ·) is selected.

[0080] Step3.2: The prediction layer uses a neural network to replace the inner product to represent the user-item interaction. By performing non-linear and bilinear transformations on the embedding vectors of user u i , item v j , it models the user-item interaction to predict the preference degree of user u i for item v j . First, the embedding vectors U i of user u j , and V i of item v j are non-linearly transformed to obtain intermediate vectors u ni , v nj . Then, through bilinear transformation and adding bias, the predicted value of the score of user u i for item v j is obtained.

[0081] u ni = σ(W nu U i + b1)

[0082] v nj = σ(W nv V j + b2)

[0083]

[0084] σ(·) is ReLU = max(0, ·). W nu , W nv , Q are all trainable weight matrices, and b1, b2, b3 are biases. The size of the score represents the preference degree. Similarly, the predicted values of all user-item combinations can be obtained, and these predicted values are recorded as the predicted score matrix Y.

[0085] Step3.3: Randomly sample s pairwise comparisons from the set Ω to form a subset Ω s , |Ω s | = s, where s = 2048. According to the score matrix Y predicted by the model, the loss function is:

[0086]

[0087] l hinge= max(0, m - x)

[0088] The Adam optimizer is selected to optimize the model. The model is tested using the test set, and the results of this method are compared with existing collaborative ranking methods. The comparison objects selected in this embodiment are Collrank and PRIMAL-CR++. Among them, Collrank is a matrix factorization model that alternately optimizes the embedding vectors of users and items through the dual coordinate descent algorithm under a non-convex framework to fit the ranking score matrix to the given pairwise comparison data; PRIMAL-CR++ is based on numerical rating data and applies Newton's method and the calculation of the Hessian matrix to optimize the embedding vectors of users and items. The performance metric selected is the Normalized Discounted Cumulative Gain at K (NDCG@K), which measures the similarity between the predicted ranking and the correct ranking of the top K items. The higher the NDCG value, the better the recommendation effect. In this embodiment, K is set to 10.

[0089] Table 1 shows the experimental results, where GCMC-PW is the experimental result using only rating data, and GCMC-PW-F is the experimental result using rating data and adding additional information. It can be seen that compared with the traditional model, the present invention is significantly superior to the traditional model.

[0090]

[0091] Table 1

[0092] The specific embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings. However, the present invention is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present invention within the scope of knowledge possessed by those of ordinary skill in the art.

Claims

1. A user preference prediction method based on the pairing method and graph convolutional neural network, characterized in that: Step1: Obtain the user-item rating dataset and additional information of users and items, preprocess the user-item rating data, and divide it into a training set and a test set. Process the additional information of users and items to obtain corresponding feature vector groups; classify the user rating data in the training set according to scores, and ratings with the same score are grouped into one category; construct a hierarchical matrix from the rating data of the same category. In addition, for each user, pairwise compare these items according to the rating scores of different items for the user, then form a set of pairwise comparisons of all users, and construct an initial matrix according to the number of users and items; Step2: Input the initial matrix and all hierarchical matrices into the graph convolutional layer to obtain the user intermediate vector group and the item intermediate vector group; Step3: Add the feature vectors of users and items to the user and item intermediate vector groups through the fully connected layer to obtain the corresponding embedding matrices, and then input the two embedding matrices into the prediction layer to obtain the prediction scoring matrix and optimize the model parameters using the pairing loss function; Step4: Use the trained model to predict user preferences; The specific content of Step3 is as follows: Step3.1: Integrate the feature vectors into the intermediate vectors through a fully connected neural network to obtain the embedding vectors, and stack the embedding vectors into the corresponding embedding matrices; For user u i and product v j , first, input their corresponding feature vectors into the fully connected layer, and obtain f i through linear transformation and non-linear activation j ; Next, use a fully connected layer to combine f i , f j with the intermediate vectors h i , h j to obtain the embedding vectors U i of user u j and item v i , V j . Stack all U i to form the user embedding matrix U, and similarly obtain the item embedding matrix V; User u i Embedding vector: Product v j Embedded vector: Among them, represents the feature vectors of user node i and commodity node j, W u ,W v are trainable weight matrices, is the bias, and σ(·) represents an activation function, and ReLU = max(0,·) can be selected; Step3.2: First, for user u i , and item v j , perform non-linear transformation on the embedding vectors U i , V j to obtain intermediate vectors u ni , v nj . Then, through bilinear transformation and adding bias, obtain the predicted score i of user u j for item v u ni = σ(W nu U i + b1) v nj = σ(W nv V j + b2) where σ(·) is ReLU = max(0,·), W n u, W nv , Q are all trainable weight matrices, and b1, b2, b3 are biases. The score magnitude represents the preference degree. Similarly, the predicted values of all user-item combinations can be obtained, and these predicted values are denoted as the predicted scoring matrix Y. Step 3.3: During training, randomly sample s pairwise comparisons from the set Ω to form a subset Ω of Ω s , |Ω s | = s, then the loss function is as follows: l hinge = max(0, m - x), m > 0 m is a predefined score difference interval.

2. The user preference prediction method based on the pairing method and the graph convolutional neural network according to claim 1, wherein The specific content of Step1 is as follows: Step1.1: Obtain three pieces of data, namely the user-item rating dataset and the additional information of users and items, preprocess the user-item rating data, and divide it into a training set and a test set; Construct a user-item rating matrix R according to the training set, N u represents the number of all users in the training set, N v represents the number of all items in the training set, and the element R of the rating matrix ij represents user u i 's rating for item v j ; The rating range of users for products is Π = {1, 2, 3..r}, |Π| = r, R ij ∈Π, obtain the additional information of users and products and preprocess it to obtain the corresponding feature vectors; User additional information includes age and occupation. Product additional information includes price and attributes. Stack all the feature vectors of users and products into a feature vector group N = N u + N v , D f represents the dimension of the feature vector, X f represents the first N u rows are user feature vectors, X f represents the last N v rows are product feature vectors; Step1.2: According to the rating range Π of the product by the user, construct M1, M2, … M r A total of r zero matrices, which are called grading matrices, Step1.3: According to the score R in R ij = r, r ∈ {1, 2, 3..r}, that is, user u i rates item v j as r, fill the corresponding position of the grading matrix M r with 1. If R ij = r, then M r,ij = 1; Step1.4: Perform the operations in Step1.3 on each rating in R; Step1.5: For user u in the training set i , construct the pairwise comparison set Ω i = {( i , j, k) | R ij > R ik}; Step1.6: Loop Step1.5 until all users in the training set are traversed to obtain all pairwise comparison sets in the training set Step1.7: Construct the identity matrix X ∈ R N×N , N = N u + N v As the initialization matrix, for any row X i = x, x = [x1, x2…x N , x i = 1, and the rest are 0, that is, each node is represented by a unique one - hot encoding.