Recommendation rating prediction method and system based on egocentric network in online social network

Through self-centered network and GCN technology, users' social trust characteristics and item preference characteristics are extracted and integrated, and the problem of low rating prediction accuracy caused by data sparseness in online social networks is solved, and more accurate user item rating prediction is achieved.

CN116561444BActive Publication Date: 2025-08-22HENAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310598208.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-19
Publication Date
2025-08-22
Estimated Expiration
2043-05-19

AI Technical Summary

Technical Problem

In online social networks, due to data sparsity, the accuracy of the scoring prediction method is low, making it difficult to obtain sufficient user preference information and overlapping information of item evaluation, which makes it difficult to capture similarities in interest among users.

Method used

The self-centered network method is adopted to extract user social trust characteristics and item preference characteristics through graph convolutional neural network (GCN), and integrate them, using the trust relationship and scoring information between users to predict the user's rating of items.

Benefits of technology

It improves the accuracy of score prediction, expands the capture range of preference similarities among users, enhances the utilization rate of trust relationships, and realizes user feature modeling that is more in line with real scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116561444B_ABST
    Figure CN116561444B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for predicting recommendation ratings based on an egocentric network in an online social network. The method comprises: storing user social trust data and user item rating data as a graph structure, referred to as a social recommendation graph; preprocessing the social recommendation graph to obtain initial features of user nodes, initial features of item nodes, and initial features of ratings; for any user node, extracting the user node's social trust features and item preference features based on the user node's egocentric network, and fusing the two to obtain the user features of the user node; for any item node, extracting the item features of the item node using its user neighbor nodes; and for node pairs consisting of user nodes and item nodes without a rating relationship, obtaining a rating prediction result based on the user features of the user node and the item features of the item node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of graph neural network technology, and in particular to a recommendation rating prediction method and system based on an egocentric network in an online social network. Background Art

[0002] With the rapid development of internet and communications technologies, numerous online social networking platforms have emerged, including Twitter, Facebook, and TikTok. Recommender systems use rating prediction methods to predict user ratings for any item based on historical user behavior information stored in online social networks. These systems can then recommend items of interest to users, helping them quickly and accurately determine which items they are interested in.

[0003] Data sparsity is the biggest challenge facing rating prediction methods. First, in a social network, compared to the massive amount of information about users, items, and user-item combinations, the proportion of known user-item rating information is very small. Secondly, overlapping information, that is, rating information of different users on the same item, is even sparser. Therefore, it is difficult for rating prediction methods to obtain sufficient user preference information and overlapping information on item evaluations, which makes it difficult to capture the similarity of interests between users. This patent intends to utilize the positive correlation between user social trust and user interest similarity, and use user social trust information as a supplement to rating prediction information to alleviate the difficulty in capturing the similarity of interests between users caused by data sparsity, thereby improving the accuracy of rating prediction. Summary of the Invention

[0004] To address the problem of low accuracy of rating prediction methods due to data sparsity, the present invention provides a recommendation rating prediction method and system based on egocentric networks in online social networks.

[0005] In one aspect, the present invention provides a method for predicting recommendation ratings based on an egocentric network in an online social network, comprising:

[0006] Step 1: Store user social trust data and user rating data of items into a graph structure, and record the graph structure as a social recommendation graph;

[0007] Step 2: Preprocess the social recommendation graph to obtain the initial features of user nodes, item nodes, and ratings;

[0008] Step 3: For any user node, extract the social trust features and item preference features of the user node based on the egocentric network of the user node;

[0009] Step 4: For any user node, the social trust feature and item preference feature of the user node are integrated to obtain the user feature of the user node;

[0010] Step 5: For any item node, use the neighboring user nodes of the item node to extract the item features of the item node;

[0011] Step 6: For a node pair consisting of a user node and an item node that does not have an evaluation relationship, obtain a score prediction result of the user node for the item node based on the user features of the user node and the item features of the item node.

[0012] Furthermore, step 1 specifically includes:

[0013] Extract the trust relationship between users in the social network and the user's rating of the item to build a social recommendation graph G = (V U ∪V G ,E U ∪E G ,W G ); where u i ∈V U Indicates user, g k ∈V G Indicates an item; Represents user u i To u j There is a direct connection, that is, a direct trust relationship; among them, u i is the arc tail node, u j is the arc head node; Represents user u i For items g k evaluation relationship; Represents user u i For items g k 's rating.

[0014] Furthermore, step 2 specifically includes:

[0015] Using random initialization method, the specific values ​​of user ID, item ID and rating are converted into vectors of specific dimensions, including: for any user node u i ∈V U , whose initial feature is expressed as Ue[i] (0) ; For any item node g k ∈V G , whose initial feature is expressed as Ie[k]; for any score Its initial characteristic is expressed as Oe ik .

[0016] Furthermore, in step 3, extracting the social trust features of the user node based on the egocentric network specifically includes:

[0017] Step 3.1: According to formula (1), use GCN directed graph convolution to transform the user node u i All the arc head neighbor nodes and arc tail neighbor nodes are aggregated and connected separately to obtain the social trust feature U of the user node social [i];

[0018]

[0019] Among them, N T (i) means u i The set of arc head neighbor nodes, N H (i) is u i The set of neighbor nodes at the end of the arc, Ue[j] represents u j The initial features, linear represents a linear function, Represents a join operation.

[0020] Step 3.2: According to formula (2), GCN is used to perform iterative convolution operations layer by layer to iteratively mine the low-order social trust features of the user node to obtain the high-order social trust features of the user node;

[0021]

[0022] Where l represents the number of iterations, Ue[j] (l-1) Indicates u j The features obtained at the (l-1)th iteration.

[0023] Furthermore, in step 3, extracting the item preference features of the user node based on the egocentric network specifically includes:

[0024] Step 3.3: Collect user nodes u according to formula (3) i For item node g j Interaction feature u-feature ij :

[0025]

[0026] Among them, Ie[j] represents item node g j The initial characteristics, Oe ij Indicates u i For g j The evaluation characteristics of Indicates a connection operation;

[0027] Step 3.4: Aggregate all interaction features u-feature in the user neighborhood according to formula (4) ij Get user node u i Item preference characteristics U interact [i];

[0028]

[0029] Among them, N1(i) refers to the user node u i The set of item node labels with evaluation relationships, is a trainable transformation matrix, Is a bias matrix, D represents the length of the initial feature, D2 represents the length of the converted feature, and σ represents the activation function.

[0030] Furthermore, step 4 specifically includes:

[0031] According to formula (5), user node u i The social trust features and item preference features are integrated to obtain the user node u i User features User[i];

[0032]

[0033] Among them, linear represents the linear function, σ represents the activation function, U social [i] (l) Represents the user node u obtained in the lth iteration i Social trust characteristics of U interact [i] represents user node u i Item preference characteristics, Represents a join operation.

[0034] Furthermore, in step 5, the method of extracting the item features of the item node using the neighboring user nodes specifically includes:

[0035] Step 5.1: Collect item nodes g according to formula (6) i With user node u j Interaction feature i-feature ij ;

[0036]

[0037] Among them, Ue[j] represents the user node u j The initial characteristics, Oe ji Indicates u j For g i The evaluation characteristics of Indicates a connection operation;

[0038] Step 5.2: According to formula (7), aggregate all interaction features i-feature in the neighborhood of the product ij Get item node g i User preference characteristics Iinteract [i];

[0039]

[0040] Among them, N2(i) refers to the node with the item g i The set of user node labels with evaluation relationships, is a trainable transformation matrix, Is a bias matrix, D represents the length of the initial feature, D2 represents the length of the converted feature, and σ represents the activation function;

[0041] Step 5.3: According to formula (8), according to the item node g i User preference characteristics I interact [i] extracts the corresponding item feature Item[i];

[0042] Item[i]=linear(σ(linear(I interact [i]))) (8)

[0043] Among them, linear represents the linear function and σ represents the activation function.

[0044] Furthermore, in step 6, obtaining a score prediction result of the user node for the item node based on the user features of the user node and the item features of the item node specifically includes:

[0045] Step 6.1: According to formula (9), the user node u to be predicted i User features User[i] and item nodes g j The item features Item[j] are concatenated to obtain the user-item association feature h ij ;

[0046]

[0047] in, Indicates a connection operation;

[0048] Step 6.2: According to formula (10), the user-item association feature h ij Perform dimensionality reduction processing to mine the potential evaluation rule features in the user-item association features, and finally obtain the user node u i For the item node g j Rating prediction results

[0049]

[0050] Among them, linear represents the linear function and σ represents the activation function.

[0051] In another aspect, the present invention provides a recommendation rating prediction system based on an egocentric network in an online social network, comprising:

[0052] A data processing unit stores user social trust data and user rating data of items into a graph structure, and records the graph structure as a social recommendation graph;

[0053] Data initialization unit, used to preprocess the social recommendation graph to obtain initial features of user nodes, initial features of item nodes, and initial features of ratings;

[0054] The recommendation model unit includes a user social trust module, a user-item interaction module, a user feature fusion module, and a prediction module; among which:

[0055] A user social trust module is used to extract the social trust features of any user node based on the egocentric network of the user node;

[0056] A user-item interaction module is configured to extract, for any user node, the item preference features of the user node based on the egocentric network of the user node; and to extract, for any item node, the item features of the item node using the neighboring user nodes of the item node;

[0057] A user feature fusion module is used to fuse the social trust feature and item preference feature of any user node to obtain the user feature of the user node;

[0058] The prediction module is used to obtain a score prediction result of the user node for the item node based on the user features of the user node and the item features of the item node for a node pair consisting of a user node and an item node that do not have an evaluation relationship.

[0059] Beneficial effects of the present invention:

[0060] (1) Compared with the entire network, egocentric networks are easier to implement data collection and analysis. Starting from the perspective of egocentric networks, this paper uses the surrounding social trust relationships of a single user as the main body, as well as the user-item rating information, to explore the potential impact of social trust networks on the similarity of preferences between users, thereby alleviating the impact of data sparsity on the accuracy of rating prediction.

[0061] (2) A complete trust relationship is bidirectional, meaning the user is both the trustor and the trusted. This paper uses the directed graph convolution operation of GCN to model the dual trust identity of users in an egocentric network. This fully incorporates the bidirectional structure of user trust and being trusted into user characteristics, making the rating prediction method's analysis of user trust relationships more realistic.

[0062] (3) Since trust is transitive, trust information related to user preference similarity is contained in their broad neighborhood. This paper adopts the layer-by-layer iterative convolution method of GCN to obtain indirect trust information within the user's high-order neighborhood in the egocentric network, expand the scope of capturing preference similarity between users, and improve the utilization rate of social trust relationships. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A flowchart of a method for predicting recommendation ratings based on an egocentric network in an online social network provided by an embodiment of the present invention;

[0064] Figure 2 A schematic diagram of a social recommendation graph provided by an embodiment of the present invention;

[0065] Figure 3 A schematic diagram of a recommendation model unit provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0066] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0067] Example 1

[0068] Egocentric networks are an important research perspective in social network analysis, primarily encompassing individuals, their neighbors, and the relationships between them. Social trust is a type of social relationship in social networks. Therefore, to address the data sparsity issue in the rating prediction process of recommendation systems, this example, starting from the perspective of egocentric networks, introduces the surrounding social trust relationships of individual users into user-item prediction. This method explores the potential impact of social trust networks on preference similarity between users, thereby mitigating the impact of data sparsity on rating prediction accuracy.

[0069] Combine Figure 1 and Figure 2 As shown, an embodiment of the present invention provides a recommendation rating prediction method based on an egocentric network in an online social network, comprising the following steps:

[0070] S101: storing user social trust data and user rating data of items into a graph structure, and recording the graph structure as a social recommendation graph;

[0071] Specifically, if Figure 2In the social recommendation graph shown, there are 6 user nodes {u1,u2,u3,u4,u5,u6} and 4 item nodes {music, book, computer, car}. Figure 2 In fact, it is composed of two subgraphs: the social trust graph and the interaction evaluation graph. User nodes are included in both the social trust graph and the interaction evaluation graph. The social trust graph is a graph structure obtained by storing user social trust data as a graph structure, and the interaction evaluation graph is a graph structure obtained by storing user rating data on items as a graph structure.

[0072] It should be noted that social trust relationships between users are asymmetric, meaning that the person you trust may not necessarily trust you. Therefore, the trust relationships between users in the social trust graph are directed, specifically from the trustor to the trusted. Edges in the interaction evaluation graph do not have a direction.

[0073] Figure 2 Some of the social trust relationships between users reflected in are as follows: user node u1 trusts user node u3, user node u3 trusts user node u6, user node u3 and user node u5 trust each other, user node u2 and user node u4 trust each other, and so on. Figure 2 The evaluation relationships of some users on items reflected in are as follows: user node u1's preference scores for books and computers are 2 and 3 respectively, and user nodes u3 and u6's preference scores for cars are 5 and 4 respectively, etc.

[0074] S102: Preprocessing the social recommendation graph to obtain initial features of user nodes, initial features of item nodes, and initial features of ratings;

[0075] S103: For any user node, extract the social trust feature and item preference feature of the user node based on the egocentric network of the user node;

[0076] Specifically, since user nodes are included in both the social trust graph and the interaction evaluation graph, when collecting user association information, it is necessary to collect their social trust information from the social trust graph as their social trust features, and to collect their rating information for all items from the interaction evaluation graph as their item preference features.

[0077] For example, taking user node u1 as an example, in Figure 2 In (a), user node u1 trusts user node u3, and is also trusted by user node u2. Then, u1's direct trust relationship includes u1->u3, and u2->u1; and u1, through the spread of direct trust relationships between users, has indirect trust relationships with u4, u5, and u6. The system of direct trust relationships and indirect trust relationships is called the user's social trust relationship. Figure 2In (b), user node u1's preference for books is rated 2, and for computers is rated 3. Therefore, user node u1's item rating information includes u1-books and u1-computers. Clearly, the local network centered on user node u1, i.e., u1's egocentric network, contains complete social recommendation data related to it. Therefore, this embodiment uses the egocentric network as a starting point to collect all user-related information in the network.

[0078] S104: For any user node, the social trust feature and item preference feature of the user node are integrated to obtain the user feature of the user node;

[0079] S105: For any item node, extract the item features of the item node using the neighboring user nodes of the item node;

[0080] Specifically, an item node usually has multiple user nodes rating it. Therefore, when collecting the associated information of the item node, all the user nodes that have rated it need to be considered.

[0081] For example, in Figure 2 In the example above, for the item node "car," user node u3 scores it 5, and user node u6 scores it 4. Therefore, the associated information for the item node "car" includes u3-car and u6-car. This shows that in the social recommendation graph, the egocentric network centered around car can also collect complete item association information.

[0082] S106: For a node pair consisting of a user node and an item node that do not have an evaluation relationship, obtain a rating prediction result of the user node for the item node based on the user features of the user node and the item features of the item node.

[0083] Specifically, the association relationship between the user and the unknown item can be established by integrating the user features of the user node and the item features of the item node.

[0084] For example, in Figure 2 In the example, when predicting u1’s rating of the car, the social trust information between u1 and u3 and u6, as well as the rating information of u3 and u6 on the car, can be used to establish the connection between u1 and the car, thereby predicting user u1’s rating of the car.

[0085] Example 2

[0086] Graph Convolutional Neural Network (GCN) is an advanced graph data processing tool that can effectively extract graph structure and neighborhood information on the graph. Therefore, based on the above embodiment, from the perspective of egocentric network, in order to further fully utilize and obtain complete trust information and evaluation information in the user neighborhood, this embodiment uses GCN to learn local graph structure information in the social recommendation graph, extract user features and item features in the graph, and then achieve the purpose of recommending items to social network users. The recommendation rating prediction method based on egocentric network in online social network provided by this embodiment specifically includes the following steps:

[0087] S201: storing user social trust data and user rating data of items as a social recommendation graph;

[0088] Specifically, a user or an item is respectively regarded as a node in the graph, and the node corresponding to the user is recorded as a user node, and the node corresponding to the item is recorded as an item node; the direct trust relationship between users or the evaluation relationship between users and items is regarded as the edge in the graph, and the user's rating of the item is regarded as the weight of the corresponding edge, so that the user's social trust data and the user's rating data of the item are stored as a graph structure.

[0089] For the convenience of description and understanding, let G=(V U ∪V G ,E U ∪E G ,W G ) represents the social recommendation graph. i ∈V U Indicates user, g k ∈V G Indicates an item; Represents user u i To u j There is a direct connection, that is, a direct trust relationship; among them, u i is the arc tail node, u j is the arc head node; Represents user u i For items g k evaluation relationship; Represents user u i For items g k If user u i For items g k No rating, recorded as The goal of this embodiment is to predict the

[0090] S202: Preprocessing social recommendation graph data to obtain initial features of user nodes, initial features of item nodes, and initial features of ratings;

[0091] Specifically, a random initialization method is used to convert the specific values ​​of user ID, item ID and rating into vectors of specific dimensions, including: for any user node u i ∈V U , whose initial feature is expressed as Ue[i] (0) ; For any item node g k ∈V G , whose initial feature is expressed as Ie[k]; for any score Its initial characteristic is expressed as Oe ik .

[0092] S203: For any user node, based on the egocentric network of the user node, perform GCN directed graph convolution on its social neighbor nodes to obtain the social trust features of the user node;

[0093] Specifically, since the edges between user nodes in the social recommendation graph are directed, each user node has both arc head neighbor nodes and arc tail neighbor nodes. According to formula (1), GCN directed graph convolution is used to transform the user node u i ∈V U All the arc head neighbor nodes and arc tail neighbor nodes are aggregated and connected separately to obtain the social trust feature U of the user node social [i];

[0094]

[0095] Among them, N T (i) means u i The set of arc head neighbor nodes, Ue[j] represents u j The initial characteristics, N H (i) is u i The set of neighbor nodes at the end of the arc, Ue[j] represents u j The initial features, linear represents the linear function, Represents a join operation.

[0096] S204: For any user node, iteratively repeat step S203 once to obtain the high-order social trust features of the user node;

[0097] Specifically, in the social recommendation graph, the social trust between users in the user egocentric network is contagious. Therefore, in practical applications, in order to capture the implicit information of high-order neighborhoods, it is generally necessary to iteratively perform convolution operations layer by layer through GCN to repeatedly learn the social information of user neighbors.

[0098] Based on the above formula (1), the following formula (2) can be derived:

[0099]

[0100] Where l represents the number of iterations, Ue[j] (l-1) Indicates u j The features obtained at the (l-1)th iteration.

[0101] S205: For any user node, based on the egocentric network of the user node, connect the item nodes and corresponding scores of the user node, and perform average aggregation to obtain the item preference characteristics;

[0102] Specifically, in the social trust recommendation graph, the user's egocentric network includes the item information they rated. Therefore, by collecting all the item information rated by the user and the corresponding rating information, we can learn the user's item preference characteristics. Specifically, the following sub-steps are included:

[0103] S2051: Collect user nodes u according to formula (3) i For item node g j Interaction feature u-feature ij :

[0104]

[0105] Among them, Ie[j] represents item node g j The initial characteristics, Oe ij Indicates u i For g j The evaluation characteristics of Indicates a connection operation;

[0106] S2052: Aggregate all interaction features u-feature in the user neighborhood according to formula (4) ij Get user node u i Item preference characteristics U interact [i];

[0107]

[0108] Among them, N1(i) refers to the user node u i The set of item node labels with evaluation relationships, is a trainable transformation matrix, Is a bias matrix, D represents the length of the initial feature, D2 represents the length of the converted feature, and σ represents the activation function.

[0109] S206: For any user node, connect its high-order social trust feature and item preference feature to obtain user features;

[0110] Specifically, in the social trust recommendation graph, the complete information in the user's egocentric network includes high-order social trust information and item information. Therefore, it is necessary to comprehensively learn the above two parts of information and calculate the user node u according to formula (5). i The social trust features and item preference features are integrated to obtain the user node u i User features User[i];

[0111]

[0112] Among them, linear represents the linear function, σ represents the activation function, U social [i] (l) Represents the user node u obtained in the lth iteration i Social trust characteristics of U interact [i] represents user node u i item preference characteristics.

[0113] S207: For any item node, connect the user node that scored it and the corresponding score, and perform average aggregation to obtain the item feature;

[0114] Specifically, in the social recommendation graph, item-related information mainly includes user ratings of the item. Therefore, collecting all user information that has rated the item and the corresponding rating information can help learn the characteristics of the item. This includes the following sub-steps:

[0115] S2071: Collect item nodes g according to formula (6) i With user node u j Interaction feature i-feature ij ;

[0116]

[0117] Among them, Ue[j] represents the user node u j The initial characteristics, Oe ji Indicates u j For g i Evaluation characteristics of

[0118] S2072: According to formula (7), all interactive features i-feature in the neighborhood of the aggregated items are aggregated. ij Get item node g i User preference characteristics I interact [i];

[0119]

[0120] Among them, N2(i) refers to the node with the item g iThe set of user node labels with evaluation relationships, is a trainable transformation matrix, Is a bias matrix, D represents the length of the initial feature, D2 represents the length of the converted feature, and σ represents the activation function;

[0121] S2073: According to formula (8), according to the item node g i User preference characteristics I interact [i] extracts the corresponding item feature Item[i];

[0122] Item[i]=linear(σ(linear(I interact [i]))) (8)

[0123] Among them, linear represents the linear function and σ represents the activation function.

[0124] S208: For any user-item node pair that does not have a rating relationship, the user features and the item features are connected, and the result is transformed to obtain a rating prediction value of the user node for the item node.

[0125] Specifically, in a social recommendation graph, a user's rating of an item corresponds to a specific edge. Therefore, the edge features can be learned from the node features at both ends of the edge. This involves the following sub-steps:

[0126] S2081: For any user-item node pair that does not have a rating relationship According to formula (9), the user node u to be predicted i User features User[i] and item nodes g j The item features Item[j] are concatenated to obtain the user-item association feature h ij ;

[0127]

[0128] S2082: For any user-item node pair that does not have a rating relationship According to formula (10), the user-item association feature h ij Perform dimensionality reduction processing to mine the potential evaluation rule features in the user-item association features, and finally obtain the user node u i For the item node g j Rating prediction results

[0129]

[0130] Among them, linear represents the linear function, σ represents the activation function, and l represents the number of iterations.

[0131] Example 3

[0132] Corresponding to the above method, an embodiment of the present invention provides a recommendation rating prediction system based on an egocentric network in an online social network, comprising: a data processing unit, a data initialization unit, and a recommendation model unit; Figure 3 As shown, the recommendation model unit includes a user social trust module, a user-item interaction module, a user feature fusion module and a prediction module;

[0133] The data processing unit is configured to store user social trust data and user item rating data as a graph structure, and to record this graph structure as a social recommendation graph. The data initialization unit is configured to preprocess the social recommendation graph to obtain initial features of user nodes, initial features of item nodes, and initial features of ratings. The user social trust module is configured to extract the social trust features of any user node based on the egocentric network of the user node. The user-item interaction module is configured to extract the item preference features of any user node based on the egocentric network of the user node; and to extract the item features of any item node using the neighboring user nodes of the item node. The user feature fusion module is configured to fuse the social trust features and item preference features of any user node to obtain the user features of the user node. The prediction module is configured to predict the rating of a user node for an item node based on the user features of the user node and the item features of the item node for a node pair consisting of a user node and an item node that do not have a rating relationship.

[0134] Specifically, the embodiment of the present invention uses a recommendation model unit obtained by pre-training a recommendation rating prediction method based on an egocentric network in an online social network to process social recommendation graph data to achieve item recommendation.

[0135] It should be noted that the recommendation rating prediction system based on egocentric network in online social network provided by the embodiment of the present invention is for realizing the above method embodiment. Its specific functions can be referred to the above method embodiment and will not be described in detail here.

[0136] Example 4

[0137] In order to verify the effectiveness of the solution of the present invention, the present invention also provides the following examples for experimental verification.

[0138] (1) Data preparation

[0139] The dataset in this example comes from Ciao, a popular social networking site that allows users to rate items and add friends to their trust circles. Therefore, the dataset contains a large amount of social trust information and rating information. The Ciao dataset includes: 7,317 users, 104,975 items, 168,956 pieces of social trust information, and 283,320 ratings, with ratings ranging from 1 to 5. Therefore, for this example, the social trust recommendation graph data refers to the Ciao dataset, and the goal of this example is to predict user ratings for unknown items.

[0140] (2) Model training

[0141] All user ratings for items were divided into a training set, a validation set, and a test set. Specifically, the training set was set to 60%, the validation set to 20%, and the remaining 20% ​​to the test set. The experimental simulation hardware environment is as follows: an Intel Core i7-11700K 3.6GHz CPU, 16GB RAM, a 954GB SSD, and a GeForce RTX 3070Ti GPU.

[0142] First, the training set is fed into the GCN to generate a recommendation model. Then, the user-item pairs in the validation set are fed into the trained recommendation model to obtain rating predictions and calculate the loss. After model training stops, the user-item pairs in the test set are fed into the optimal recommendation model to obtain rating predictions. Finally, the predicted results are compared with the corresponding real results in the test set to verify the model's effectiveness.

[0143] In the feature extraction convolution layer: First, for any user node u i ∈V U According to formula (1), the GCN directed graph convolution operation is performed, and all the arc head neighbor node features and all the arc tail neighbor node features are averaged and aggregated, and the feature vector length is 32; the two parts of features are spliced ​​to obtain the user's social trust feature, and the feature length is 32.

[0144] According to formula (2), GCN is used to perform convolution operations layer by layer, and the iterative repetition is repeated to obtain the user's high-order social trust features with a feature length of 32.

[0145] According to user node u i ∈V U The items with rating relationships and the corresponding rating features are processed according to formulas (3) and (4) to obtain the user's item preference features, with a feature length of 32.

[0146] According to user node u i ∈V UThe high-order social trust features and item preference features are processed according to formula (5) to obtain user features with a feature length of 32.

[0147] According to the item node g i ∈V G The users with rating relationships and the corresponding rating features are processed according to formulas (6) and (7) to obtain the user preference features of the items, with a feature length of 32.

[0148] The item node g i ∈V G The user preference features are processed according to formula (8) to obtain item features, and the feature length is 32.

[0149] In the prediction layer: For the node pairs (u i ,g j ), change u i User characteristics and g j The item features of the items are connected (i.e., processed according to formula (9)) to obtain the correlation features between nodes, and the feature length is 64. The correlation features are processed according to formula (10) to obtain the node pair (u i ,g j ), which is the predicted score of the user for the item.

[0150] The predicted edge weights and the corresponding true edge weights in the training set are passed through the MSEloss function to calculate the loss value, backpropagate, and update the model parameters.

[0151] (3) Repeat the above model training process until the validation set loss value does not decrease for 5 consecutive times, and then stop training.

[0152] (4) Model performance evaluation

[0153] Take the optimal model after training and input the test set to obtain the prediction effect to evaluate the performance of the solution of the present invention. i ,g j ), u is calculated by the optimal model after training i User characteristics and g j The node-related features are connected to obtain the node-related features. The node-related features are processed by the prediction layer in the trained optimal model to obtain the node pair (u i ,g j )’s predicted rating value.

[0154] In order to verify the effectiveness of the solution of the present invention, the present invention also provides the following experimental comparative analysis results:

[0155] Table 1 shows the evaluation indicators of the solution of the present invention and the existing GraphRec model and SocialRec model on the Ciao dataset. For all models, the training set is set to 40%, the validation set is set to 20%, and the remaining 20% ​​is the test set. The experiment adopts the early stopping method in the training process. The model is verified after each training round. If the error of the model on the validation set no longer decreases in 5 consecutive training rounds, the training of the model is stopped. The model performance is mainly measured by two evaluation indicators: MAE and RMSE. Among them, MAE is the mean absolute error, which represents the average value of the absolute error between the predicted value and the observed value. The smaller the MAE value, the higher the model prediction accuracy; RMSE is the root mean square error, which represents the square root of the ratio of the square of the deviation between the predicted value and the true value to the number of observations. It measures the deviation between the predicted value and the true value and is more sensitive to outliers in the data. The smaller the RMSE value, the better the model prediction effect.

[0156] Table 1 Evaluation indicators of different models on the Ciao dataset

[0157]

[0158] As shown in Table 1, the MAE of the proposed method is 0.0245 higher than that of GraphRec and 0.0943 higher than that of SocialRec. The RMSE of the proposed method is also better than that of GraphRec and SocialRec.

[0159] The experimental results verify that the recommendation model of the present invention can characterize the potential factors affecting users' item ratings, thereby establishing an effective rating prediction model. In summary, it shows that the prediction method and system provided by the present invention can effectively predict users' ratings for unknown items.

[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A recommendation rating prediction method based on egocentric network in online social network, characterized by: include: Step 1: Store user social trust data and user rating data of items into a graph structure, and record the graph structure as a social recommendation graph; Specifically include: extracting trust relationships between users in social networks, as well as users' ratings of items, and building a social recommendation graph ;in, Represents the user, Indicates an item; Represents a user right There is a direct connection, that is, a direct trust relationship; among them, is the arc tail node, is the arc head node; Represents a user For items evaluation relationship; Represents a user For items 's rating; Step 2: Preprocess the social recommendation graph to obtain the initial features of user nodes, item nodes, and ratings; Step 3: For any user node, extract the social trust features and item preference features of the user node based on the egocentric network of the user node. In step 3, extracting the social trust features of the user node based on the egocentric network of the user node specifically includes: Step 3.1: According to formula (1), use GCN directed graph convolution to obtain user nodes Social trust characteristics ; (1) in, express The set of arc head neighbor nodes, yes The set of arc tail neighbor nodes, express Features, represents a linear function, Indicates a connection operation; Step 3.2: According to formula (2), GCN is used to perform iterative convolution operations layer by layer to iteratively mine the low-order social trust features of the user node to obtain the high-order social trust features of the user node; (2) in, l represents the number of iterations, express The first ( l -1) The features obtained by the iteration; Step 4: For any user node, the social trust feature and item preference feature of the user node are integrated to obtain the user feature of the user node; Step 5: For any item node, use the neighboring user nodes of the item node to extract the item features of the item node; Step 6: For a node pair consisting of a user node and an item node that does not have an evaluation relationship, obtain a score prediction result of the user node for the item node based on the user features of the user node and the item features of the item node.

2. The recommendation rating prediction method based on egocentric network in online social network according to claim 1, characterized in that: Step 2 specifically includes: Using random initialization method, the specific values ​​of user ID, item ID and rating are converted into vectors of specific dimensions, including: , whose initial features are expressed as ; For any item node , whose initial features are expressed as For any rating , whose initial features are expressed as .

3. The recommendation rating prediction method based on egocentric network in online social network according to claim 1, characterized in that: In step 3, the extraction of the item preference features of the user node specifically includes: Step 3.3: Collect user nodes according to formula (3) Item Node Interaction features : (3) in, Table item node The initial characteristics of express right The evaluation characteristics of Indicates a connection operation; Step 3.4: Aggregate all interaction features within the user neighborhood according to formula (4) Get user node Item preference characteristics ; (4) in, Refers to the user node The set of item node labels with evaluation relationships, is a trainable transformation matrix, is a bias matrix, represents the length of the initial feature, represents the characteristic length after transformation, Represents the activation function.

4. The recommendation rating prediction method based on egocentric network in online social network according to claim 1, characterized in that: Step 4 specifically includes: According to formula (5), the user node The social trust features and item preference features are integrated to obtain the user node User characteristics ; (5) in, represents a linear function, represents the activation function, Indicates the l The user node obtained by the iteration Social trust characteristics, Represents a user node Item preference characteristics, Represents a join operation.

5. The recommendation rating prediction method based on egocentric network in online social network according to claim 1, characterized in that: In step 5, the method of extracting the item features of the item node using the neighboring user nodes specifically includes: Step 5.1: Collect item nodes according to formula (6) With user node Interaction characteristics between ; (6) in, Represents a user node The initial characteristics of express right The evaluation characteristics of Indicates a connection operation; Step 5.2: According to formula (7), aggregate all interaction features in the neighborhood of the product Get item node User preference characteristics ; (7) in, Refers to the item node The set of user node labels with evaluation relationships, is a trainable transformation matrix, is a bias matrix, represents the length of the initial feature, represents the characteristic length after transformation, represents the activation function; Step 5.3: According to formula (8), according to the item node User preference characteristics Extract the corresponding item features ; (8) in, represents a linear function, Represents the activation function.

6. The recommendation rating prediction method based on egocentric network in online social network according to claim 1, characterized in that: In step 6, obtaining the score prediction result of the user node for the item node based on the user features of the user node and the item features of the item node specifically includes: Step 6.1: According to formula (9), the user node to be predicted User characteristics and item nodes Item Features Splice to get the user-item association features ; (9) in, Indicates a connection operation; Step 6.2: According to formula (10), the user-item association features Perform dimensionality reduction processing to mine potential evaluation rules in user-item association features, and finally obtain user nodes For the item node Rating prediction results ; (10) in, represents a linear function, Represents the activation function.

7. A recommendation rating prediction system based on egocentric network in online social network, characterized by: The method for predicting recommendation ratings based on an egocentric network in an online social network as claimed in claim 1 comprises: A data processing unit stores user social trust data and user rating data of items into a graph structure, and records the graph structure as a social recommendation graph; Data initialization unit, used to preprocess the social recommendation graph to obtain initial features of user nodes, initial features of item nodes, and initial features of ratings; The recommendation model unit includes a user social trust module, a user-item interaction module, a user feature fusion module, and a prediction module; among which: A user social trust module is used to extract the social trust features of any user node based on the egocentric network of the user node; A user-item interaction module is configured to extract, for any user node, the item preference features of the user node based on the egocentric network of the user node; and to extract, for any item node, the item features of the item node using the neighboring user nodes of the item node; A user feature fusion module is used to fuse the social trust feature and item preference feature of any user node to obtain the user feature of the user node; The prediction module is used to obtain a score prediction result of the user node for the item node based on the user features of the user node and the item features of the item node for a node pair consisting of a user node and an item node that do not have an evaluation relationship.

Citation Information

Patent Citations

  • Social group recommendation method, system and device and storage medium

    CN114510653A

  • Method for predicting relationship between users in social network and multi-head mixed aggregation graph convolutional network

    CN115660882A