Deep recommendation model fusing review timeliness and influence of trusted neighbor score
Patent Information
- Application Number
- CN202310549970.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-16
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-05-16
AI Technical Summary
[0004]目前,现有推荐模型有基于评分矩阵的推荐模型和融入评分文本的推荐模型;对于基于矩阵分解的推荐模型,虽能够处理高维评分数据,但容易遭受评分数据稀疏性的困扰;对于基于评分和评论的推荐模型,通过外加分析隐藏在用户评论中的用户偏好与物品属性信息,虽能缓解评分数据的稀疏性,但这些模型在特征提取时大多没有关注评论的时效性和可信近邻评分的影响力,无法及时反映用户兴趣变化和用户动态的社交关系
[0077] A novel deep recommendation model, DRM-RT, based on ratings and reviews is proposed. 2 NRI, this model can not only extract shallow features of user preferences and item attributes, as well as shallow user trust features from ratings, but also deep timeliness features of user preferences and item attributes from reviews.
Smart Images

Figure CN116502610B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to internet content recommendation technology, specifically to a deep recommendation model that integrates comment timeliness and the influence of trusted neighbor ratings. Background Technology
[0002] Recommendation models uncover personalized user needs by analyzing user behavior, accurately recommending long-tail products or information to users who need them. This helps users discover products or information they are interested in but find difficult to access, effectively alleviating the information overload phenomenon. Currently, recommendation models are widely used in e-commerce, academic networks, news recommendations, and many other fields to improve user engagement, reduce service churn rates, and help users build information cocoons.
[0003] Rating prediction is one of the main tasks of recommendation models, and collaborative filtering is the most widely used algorithm for rating prediction. Its principle is based on the fact that users with similar behaviors may have similar interests, and similar items may be liked by the same user, to predict a user's rating for an item. A drawback of collaborative filtering is its inability to handle high-dimensional data. Latent Semantic Model (LFM), based on matrix factorization, emerged to address this. This model decomposes the rating matrix into two low-dimensional matrices with the same latent vector dimension to uncover the latent interests of users and the latent features of items. Finally, the predicted rating for the item is given by the dot product of these two matrices. However, when user-item interaction data is sparse, LFM's prediction bias is usually large. Review text often contains rich information about user preferences and item attributes. Utilizing review text to compensate for the sparsity of rating data has been used by many recommendation models, such as DeepCoNN, NARRE, DeepCLFM, and RTRM. Generally speaking, users tend to browse reviews more recent in time to make purchasing choices and favor recommendations from friends.
[0004] Currently, existing recommendation models include those based on rating matrices and those incorporating rating text. While matrix factorization-based recommendation models can handle high-dimensional rating data, they are prone to the problem of rating data sparsity. For recommendation models based on ratings and reviews, the sparsity of rating data can be alleviated by additional analysis of user preferences and item attribute information hidden in user reviews. However, most of these models do not pay attention to the timeliness of reviews and the influence of reliable neighbor ratings when extracting features, and cannot reflect changes in user interests and dynamic social relationships in a timely manner.
[0005] In summary, existing recommendation models ignore the impact of review time on review usefulness when measuring review usefulness; at the same time, they do not analyze the trust relationship characteristics between users, and therefore cannot accurately provide user-item predicted ratings. Summary of the Invention
[0006] Purpose of the invention: The purpose of this invention is to address the shortcomings of existing technologies and provide a deep recommendation model that integrates the timeliness of comments with the influence of credible nearest neighbor ratings.
[0007] Technical Solution: This invention provides a deep recommendation model that integrates comment timeliness and the influence of trusted nearest neighbor ratings. The deep recommendation model includes a deep feature extraction module integrating comment timeliness, a shallow feature extraction module integrating the influence of trusted nearest neighbor ratings, and a multi-layer feature fusion module. The specific recommendation method of this deep recommendation model is as follows:
[0008] For the review dataset, user review information and item review information are extracted separately. Then, a deep feature extraction module that integrates review timeliness is used to extract deep features from both user review information and item review information to obtain user preference features. U and item features I ;
[0009] For the rating dataset, first extract user rating information and construct the rating matrix R. m×n (U, I), and then the rating matrix R is processed by a shallow feature extraction module that integrates the influence of trusted nearest neighbor ratings. m×n The decomposition yields shallow features, namely the latent vectors (LFM) of the items. I and user latent vectors (LFM) U Simultaneously, the system performs neighbor user selection and recommendation reliability calculation on user rating information to obtain the credible neighbor rating influence (TRUST). U ;
[0010] Item features I and item latent vectors LFM I The item feature I is obtained by splicing and fusion; the user preference feature is then obtained. U and user latent vectors (LFM) U The user median vector U′ is obtained by concatenation and fusion. The influence of the obtained user median vector U′ on the Trusted Nearest Neighbor Rating (TRUST) is then calculated. U The user preference U is obtained by adding and fusing the dimensions;
[0011] Finally, user preferences U and item features I are input into a fully connected layer, and the user's predicted rating Y_predict for the item is obtained by using the feature mapping of the fully connected layer.
[0012] Furthermore, the deep feature extraction module for the fusion of comment timeliness includes two structurally similar parallel networks, TNet. u and TNet i TNet UExtracting User Preference Features from User Review Information U The specific method is as follows:
[0013] Step (A): Given a user set U = {u1, ..., u2} m}, Item set I = {i1, ..., i n} and the quintuple o = (u, i, r) ui w ui , t ui ), the quintuple o = (u m i n r ui w ui , t ui ) represents the m-th user u m For the nth item i n At time t ui Give a score r ui And comments w ui Therefore, the comment set of user u is R = {R...} u1 , ..., R ud}, where d is the average number of comments per user, and each comment is mapped into an x-dimensional sentence vector using BERT, i.e., after vectorizing R sentences, we get S = {S u1 S ud If a user has more than d comments, then the first d comments are truncated; otherwise, if a user has less than d comments, then the [PAD] characters are used to fill in the remaining d comments to ensure that each user has d comments.
[0014] Step (B): Input the sentence vector S of the comment set of user u into a bidirectional GRU network to obtain the interrelationships between sentences, and thus obtain the forward and backward context information, where the forward context information corresponds to the k-th comment. and backward context information The calculation is as follows:
[0015]
[0016] In the above formula, k∈[1,d], and These represent the forward and backward context information of the (k-1)th comment, respectively. and These represent the forward and backward GRU operations, respectively;
[0017] Step (C): Transfer the forward and backward context information and S is obtained by splicing. uk Context information h k ,Right now Here, let the number of hidden units in the GRU be l, then h k ∈R 2l ;
[0018] In other words, the sentence vector S of user u's comment set is processed by a bidirectional GRU to obtain the context information H. u ={h1, ..., h d}, H u ∈R d×2l ;
[0019] Step (D), for context information H u An attention mechanism is used to measure the contribution of each comment to user preferences. Considering that users tend to browse comments more recently and make choices accordingly, a time factor w(t) is introduced into the attention mechanism to measure the timeliness of the comments, i.e.:
[0020]
[0021] Where α is the time decay factor; t k t represents the comment time of the k-th comment; e The timeliness weight of each comment by user u is calculated based on the comment time of the most recent comment as follows:
[0022] First, the comment contribution value 'a' of user u is calculated using an attention mechanism, i.e.
[0023] The softmax function normalizes the attention weights, resulting in a = {a1, ..., a2}. d}, a∈R 1×d , ω1∈R 1×μ ω2∈R μ×2l ;
[0024] Secondly, the time-sensitivity weight function w(t) is used to map the timestamp of each comment, thus obtaining the time-sensitivity weight of the comment T = {t1, ..., t2}. d}, T∈R 1×d This is then combined with the comment contribution score to obtain the comment's timeliness contribution weight T_A, where T_A = T*a;
[0025] When obtaining the time contribution weight T_A∈R 1×d Then, for each comment, h k Perform a weighted summation and connect it to a fully connected layer to obtain the user u's preference features. U :
[0026] Feature U =Fully_Connected(T_A×Hu ).
[0027] Furthermore, the deep feature extraction module for the fusion of comment timeliness includes two structurally similar parallel networks, TNet. u and TNet i TNet I Extracting product features from item review information I The specific method is as follows:
[0028] Step (A): Given a user set U = {u1, ..., u2} m}, Item set I = {i1, ..., i n} and the quintuple o = (u, i, r) ui w ui , t ui ), the quintuple o = (u m i n r ui w ui , t ui ) represents the m-th user u m For the nth item i n At time t ui Give a score r ui And comments w ui Therefore, the set of comments for the items is R = {R i1 , ..., R id}, where d is the average number of reviews for an item, and each review is mapped into an x-dimensional sentence vector using BERT, i.e., after vectorizing R sentences, we get S = {S i1 S id};
[0029] Step (B): Input the sentence vector S of the comment set for item i into a bidirectional GRU network to obtain the interrelationships between sentences, thereby obtaining the forward and backward contextual information, where the forward contextual information corresponding to the k-th comment is... and backward context information The calculation is as follows:
[0030]
[0031] In the above formula, k∈[1,d], and These represent the forward and backward context information of the (k-1)th comment, respectively. and These represent the forward and backward GRU operations, respectively;
[0032] Step (C): Transfer the forward and backward context information and Concatenate the information to obtain the context information h of Sik. k ,Right now Here, let the number of hidden units in the GRU be l, then h k ∈R 2l ;
[0033] In other words, the sentence vector S of the comment set for item i is processed by a bidirectional GRU to obtain the context information H. i ={h1, ..., h d}, H i ∈R d×2l ;
[0034] Step (D), for context information H i An attention mechanism is used to measure the contribution of each comment to item preference. A time factor w(t) is introduced into the attention mechanism to measure the timeliness of the comments, i.e.:
[0035]
[0036] Where α is the time decay factor; t k t represents the comment time of the k-th comment; e The timeliness weight of each comment for item i is calculated as follows, taking into account the comment time of the most recent comment:
[0037] First, the comment contribution value 'a' of item i is calculated using an attention mechanism, i.e.
[0038] The softmax function normalizes the attention weights, resulting in a = {a1, ..., a2}. d}, a∈R 1×d , ω1∈R 1×μ ω2∈R μ×2l ;
[0039] Secondly, the time-sensitivity weight function w(t) is used to map the timestamp of each comment, thus obtaining the time-sensitivity weight of the comment T = {t1, ..., t2}. d}, T∈R 1×d This is then combined with the comment contribution score to obtain the comment's timeliness contribution weight T_A, where T_A = T*a;
[0040] In obtaining the timeliness contribution weight T_A∈R 1×d Then, for each comment, h k Perform a weighted summation and connect it to a fully connected layer to obtain the preference feature of item i. I :
[0041] Feature I=Fully_Connected(T_A×H i ).
[0042] Furthermore, the influence of credible neighbor ratings (TRUST) is obtained through nearby users and recommendation reliability. U The specific content includes:
[0043] (1) Filtering nearby users
[0044] For the rating values in the user rating information, the inverse cloud algorithm is first used to calculate the user rating feature vector. Next, the modified similarity metric method is used to calculate the p-th user u. p and the qth user u q Similarity between Finally, the top K users with the highest similarity were selected as the nearest neighbors NS:
[0045]
[0046] Ex represents the expected value, indicating the average user rating level; En represents the entropy, indicating the dispersion of user ratings; He represents the hyperentropy, indicating the stability of entropy.
[0047] (2) Calculate the recommendation reliability of nearest neighbor users
[0048] Assume u q For target users, u p For u q For any of the nearest neighbor users, first predict u q In item i j ratings Then calculate u sequentially. q For u p Recommendation satisfaction SAT j (u q u p ), u p Initial Trust Level (IRT) j (u q u p ) and u p Reliability of RT j ;
[0049]
[0050]
[0051]
[0052]
[0053] Where, rpj Indicates user u p In item i j Ratings on; r qj Indicates target user u q For item i j Predicted score; For u q with u p Nearest neighbor similarity, Size of the nearest neighbor similarity set and u q and u p The mean score is given by ε, where ε represents the recommendation bias; α and β are the weights of each part, and 0 < α, β < 1. The historical reliability presented by up to uq; j represents the current item's sequence number; SAT h (u q u p ) represents u q For u p In item i h Recommendation satisfaction;
[0054]
[0055] ρ (0 < ρ ≤ 1) is the attention factor for historical reliability;
[0056] Finally, update RT. j until j = |CRIS(u q u p )|,CRIS(u q u p ) for u q with u p The common scoring item set, and i j The j-th item in the chronological order of the jointly rated items;
[0057] (3) Calculate the influence of the credible nearest neighbor score
[0058] For each user u in the user set U p Initialize TS(u) p ), for u p Each neighboring user u q The reliability RT(u) is calculated using the method in step (2). p u q ), and the reliability RT(u p u q Add to set TS(u) p Then, for each user u in the user set U... pBased on its true reliability, TS(u p Sort the data in descending order and select the top S nearest neighbors as trusted nearest neighbors T. U (u p Using the rating feature vectors of trusted nearest neighbors, the indirect feedback of the current user is calculated and added to the set TRUST. U This process continues until the entire user set U is traversed, ultimately yielding the Trusted Nearest Neighbor Rating Influence (TRUST). U .
[0059] Furthermore, in the shallow feature extraction module that integrates the influence of trusted nearest neighbor ratings, matrix factorization is used to transform the rating matrix R. m×n (U, I) is decomposed to obtain the item latent vector LFM I and user latent vectors (LFM) U ,Right now:
[0060] R m×n ≈LFM U LFM I T
[0061]
[0062]
[0063] Furthermore, the formula for calculating the predicted score is as follows:
[0064] Y_Predict=μ+b i +b u +W×multiply(U, I)
[0065] μ is the global average offset, b i For item offset, b u For user offset, W is the weight matrix, and multiply is the inner product operation;
[0066] When training a deep recommendation model, squared loss is used as the loss function. At the same time, to avoid overfitting, a regularization term is added to the loss function to constrain the parameters, i.e.:
[0067]
[0068] Here, λ is a weighting parameter used to balance the proportions of the two loss terms.
[0069] Meanwhile, to make the model converge faster, the loss function L(W,I,U) is adjusted. ′ ,b u ,b i The components of the gradient are calculated as follows:
[0070]
[0071]
[0072]
[0073]
[0074]
[0075] Based on this, the Adam optimizer is selected, which automatically adjusts the learning rate to update each parameter.
[0076] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0077] A novel deep recommendation model, DRM-RT, based on ratings and reviews is proposed. 2 NRI, this model can not only extract shallow features of user preferences and item attributes, as well as shallow user trust features from ratings, but also deep timeliness features of user preferences and item attributes from reviews.
[0078] A method for extracting shallow trust features of users based on rating matrices is proposed. This method uses user rating vectors obtained from cloud models, calculates the similarity between users using a modified similarity evaluation model, and calculates the trust relationship between similar users using the constructed trust evaluation model. On this basis, the rating vectors of all trusted neighbors are aggregated to represent the shallow trust features of users.
[0079] A deep timeliness feature extraction method based on comment text is proposed. This method uses a pre-trained BERT model to represent each comment and a bidirectional GRU to represent the inherent bidirectional relationship between comments. It also uses a constructed attention mechanism that integrates time factors to measure the timeliness contribution of each comment, so as to accurately characterize the dynamic changes of user preferences over time. Attached Figure Description
[0080] Figure 1 This is a schematic diagram of the framework structure of the deep recommendation model of the present invention;
[0081] Figure 2 This is a schematic diagram illustrating the deep feature extraction of the integrated comment timeliness in the embodiment;
[0082] Figure 3 This is a schematic diagram illustrating the impact of the dropout ratio on model performance in the examples;
[0083] Figure 4 This is a schematic diagram illustrating the impact of the number of hidden factors on model performance in the examples;
[0084] Figure 5 This is a schematic diagram illustrating the impact of the number of trusted nearest neighbors on model performance in the embodiment;
[0085] Figure 6 This is a schematic diagram comparing the prediction accuracy before and after the introduction of comment timeliness in the embodiment;
[0086] Figure 7 This is a schematic diagram comparing the prediction accuracy before and after introducing the influence of the trusted nearest neighbor rating in the example. Detailed Implementation
[0087] The technical solution of the present invention will be described in detail below, but the scope of protection of the present invention is not limited to the embodiments described.
[0088] like Figure 1 As shown, the deep recommendation model that integrates comment timeliness and the influence of trusted neighbor ratings in this embodiment includes a deep feature extraction module that integrates comment timeliness, a shallow feature extraction module that integrates the influence of trusted neighbor ratings, and a multi-layer feature fusion module. The specific recommendation method of this deep recommendation model includes the following steps.
[0089] Step 1: Deep Feature Extraction of Comment Timeliness
[0090] For the review dataset, user review information and item review information are extracted separately. Then, a deep feature extraction module that integrates review timeliness is used to extract deep features from both user review information and item review information to obtain user preference features. U and item features I .
[0091] like Figure 2 As shown, TNet U Extracting User Preference Features from User Review Information U The specific method is as follows:
[0092] Step (A): Given a user set U = {u1, ..., u2} m}, Item set I = {i1, ..., i n} and the quintuple o = (u, i, r) ui w ui , t ui ), the quintuple o = (u m i n r ui w ui , t ui ) represents the m-th user u m For the nth item i n At time t ui Give a score r ui And comments wui Therefore, the comment set of user u is R = {R...} u1 , ..., R ud}, where d is the average number of comments per user, and each comment is mapped into an x-dimensional sentence vector using BERT, i.e., after vectorizing R sentences, we get S = {S u 1, ..., S ud If a user has more than d comments, then the first d comments are truncated; otherwise, if a user has less than d comments, then the [PAD] characters are used to fill in the remaining d comments to ensure that each user has d comments.
[0093] Step (B): Input the sentence vector S of the comment set of user u into a bidirectional GRU network to obtain the interrelationships between sentences, and thus obtain the forward and backward context information, where the forward context information corresponds to the k-th comment. and backward context information The calculation is as follows:
[0094]
[0095] In the above formula, k∈[1,d], and These represent the forward and backward context information of the (k-1)th comment, respectively. and These represent the forward and backward GRU operations, respectively;
[0096] Step (C): Transfer the forward and backward context information and S is obtained by splicing. uk Context information h k ,Right now Here, let the number of hidden units in the GRU be l, then h k ∈R 2l ;
[0097] In other words, the sentence vector S of user u's comment set is processed by a bidirectional GRU to obtain the context information H. u ={h1, ..., h d}, H u ∈R d×2l ;
[0098] Step (D), for context information H u An attention mechanism is used to measure the contribution of each comment to user preferences. Considering that users tend to browse comments more recently and make choices accordingly, a time factor w(t) is introduced into the attention mechanism to measure the timeliness of the comments, i.e.:
[0099]
[0100] Where α is the time decay factor; t k t represents the comment time of the k-th comment; e The timeliness weight of each comment by user u is calculated based on the comment time of the most recent comment as follows:
[0101] First, the comment contribution value 'a' of user u is calculated using an attention mechanism, i.e.
[0102] The softmax function normalizes the attention weights, resulting in a = {a1, ..., a2}. d}, a∈R 1×d , ω1∈R 1×μ ω2∈R μ×2l ;
[0103] Secondly, the time-sensitivity weight function w(t) is used to map the timestamp of each comment, thus obtaining the time-sensitivity weight of the comment T = {t1, ..., t2}. d}, T∈R 1×d This is then combined with the comment contribution score to obtain the comment's timeliness contribution weight T_A, where T_A = T*a;
[0104] In obtaining the timeliness contribution weight T_A∈R 1×d Then, for each comment, h k Perform a weighted summation and connect it to a fully connected layer to obtain the user u's preference features. U :
[0105] Feature U =Fully_Connected(T_A×H u ).
[0106] The calculation method for the preference feature I of item i is as follows: Step (A), given the user set U = {u1, ..., u1} m}, Item set I = {i1, ..., i n} and the quintuple o = (u, i, r) ui w ui , t ui ), the quintuple o = (u m i n r ui w ui , t ui ) represents the m-th user u m For the nth item i n At time t ui Give a score r ui And comments w uiTherefore, the set of comments for the items is R = {R i1 , ..., R id}, where d is the average number of reviews for an item, and each review is mapped into an x-dimensional sentence vector using BERT, i.e., after vectorizing R sentences, we get S = {S i1 S ia};
[0107] Step (B): Input the sentence vector S of the comment set for item i into a bidirectional GRU network to obtain the interrelationships between sentences, thereby obtaining the forward and backward contextual information, where the forward contextual information corresponding to the k-th comment is... and backward context information The calculation is as follows:
[0108]
[0109] In the above formula, k∈[1,d], and These represent the forward and backward context information of the (k-1)th comment, respectively. and These represent the forward and backward GRU operations, respectively;
[0110] Step (C): Transfer the forward and backward context information and Concatenate the information to obtain the context information h of Sik. k ,Right now Here, let the number of hidden units in the GRU be l, then h k ∈R 2l ;
[0111] In other words, the sentence vector S of the comment set for item i is processed by a bidirectional GRU to obtain the context information H. i ={h1, ..., h d}, H i ∈R d×2l ;
[0112] Step (D), for context information H i An attention mechanism is used to measure the contribution of each comment to item preference. A time factor w(t) is introduced into the attention mechanism to measure the timeliness of the comments, i.e.:
[0113]
[0114] Where α is the time decay factor; t k T represents the comment time of the k-th comment; e The timeliness weight of each comment for item i is calculated as follows, taking into account the comment time of the most recent comment:
[0115] First, the comment contribution value 'a' of item i is calculated using an attention mechanism, i.e.
[0116] The softmax function normalizes the attention weights, resulting in a = {a1, ..., a2}. d}, a∈R 1×d , ω1∈R 1×μ ω2∈R μ×2l ;
[0117] Secondly, the time-sensitivity weight function w(t) is used to map the timestamp of each comment, thus obtaining the time-sensitivity weight of the comment T = {t1, ..., t2}. d}, T∈R 1×d This is then combined with the comment contribution score to obtain the comment's timeliness contribution weight T_A, where T_A = T*a;
[0118] When obtaining the time contribution weight T_A∈R 1×d Then, for each comment, h k Perform a weighted summation and connect it to a fully connected layer to obtain the preference feature I for item i:
[0119] Feature I =Fully_Connected(T_A×H i ).
[0120] Step 2: Extracting the Influence Features of Trusted Nearest Neighbor Ratings. The influence of trusted nearest neighbor ratings (TRUST) is obtained through nearby users and recommendation reliability. U The specific content includes:
[0121] (1) Filtering nearby users
[0122] For the rating values in the user rating information, the inverse cloud algorithm is first used to calculate the user rating feature vector. Next, the modified similarity metric method is used to calculate the p-th user u. p and the qth user u q Similarity between Finally, the top K users with the highest similarity were selected as the nearest neighbor users NS;
[0123]
[0124] (2) Calculate the recommendation reliability of nearest neighbor users
[0125] Assume u q For target users, u p For u q For any of the nearest neighbor users, first predict u q In item ij ratings Then calculate u sequentially. q For u p Recommendation satisfaction SAT j (u q u p ), u p Initial Trust Level (IRT) j (u q u p ) and u p Reliability of RT j ;
[0126]
[0127]
[0128]
[0129]
[0130] Where, r pj Indicates user u p In item i j Ratings on; r qj Indicates target user u q For item i j Predicted score; For u q with u p Nearest neighbor similarity, Size of the nearest neighbor similarity set and u q and u p The mean score is given by ε, where ε represents the recommendation bias; α and β are the weights of each part, and 0 < α, β < 1. The historical reliability presented by up to uq; j represents the current item's sequence number; SAT h (u q u p ) represents u q For u p In item i h Recommendation satisfaction;
[0131]
[0132] ρ (0 < ρ ≤ 1) is the attention factor for historical reliability;
[0133] Finally, update RT. j until j = |CRIS(u q u p)|,CRIS(u q u p ) for u q with u p The common scoring item set, and i j The j-th item in the chronological order of the jointly rated items;
[0134] (3) Calculate the influence of the credible nearest neighbor score
[0135] For each user u in the user set U p Initialize TS(u) p ), for u p Each neighboring user u q The reliability RT(u) is calculated using the method in step (2). p u q ), and the reliability RT(u p u q Add to set TS(u) p Then, for each user u in the user set U... p Based on its true reliability, TS(u p Sort the data in descending order and select the top S nearest neighbors as trusted nearest neighbors T. U (u p Using the rating feature vectors of trusted nearest neighbors, the indirect feedback of the current user is calculated and added to the set TRUST. U This process continues until the entire user set U is traversed, ultimately yielding the Trusted Nearest Neighbor Rating Influence (TRUST). U .
[0136] Step 3: Extracting shallow features using matrix factorization to transform the scoring matrix R m×n The latent vectors are decomposed into user latent vector matrices and item latent vector matrices to extract shallow features of users and items, namely, item latent vectors (LFM). I and user latent vectors (LFM) U R m×n ≈LFM U LFM I T ;
[0137]
[0138]
[0139] The rating matrix is as follows:
[0140] Step 4: Fusion of deep and shallow features.
[0141] First, the user's deep featuresU and deep features of objects I For the corresponding shallow features LFM U LFM I Using concatenation operation To merge, that is:
[0142]
[0143]
[0144] Then, to enrich user feature information, the user intermediate vector U′ is combined with the Trusted Nearest Neighbor Rating Influence TRUST. U The dimension addition operation is used for fusion, that is:
[0145] U=TRUST U ⊙U′;
[0146] Step 5: Score Prediction
[0147] The final obtained user preferences U and item features I are input into a fully connected layer. Utilizing the feature mapping capability of the fully connected layer, a predicted rating for the user on the item is generated, i.e.:
[0148] Y_Predict=μ+b i +b u +W×multiply(U, I)
[0149] μ is the global average offset, b i For item offset, b u Let W be the user offset, W be the weight matrix, and multiply be the inner product operation.
[0150] The deep recommendation model DRM-RT of this invention 2 When extracting user and item features based on rating matrices and review texts, NRI fully considers the timeliness of reviews and the influence of credible neighbor ratings.
[0151] Example
[0152] This embodiment aims to verify the prediction accuracy of the technical solution of the present invention, the influence of each hyperparameter on the prediction accuracy, the timeliness of the rating, the usefulness of the comments, and the influence of the trusted nearest neighbor rating on the recommendation effect.
[0153] First, seven existing recommendation models were selected as baseline models, including LFM, SVD++, Time-SVD++, DeepCoNN, NARRE, DeepCLFM, and RTRM.
[0154] 1) LFM: Extracting latent features of users and items from the rating matrix using matrix factorization;
[0155] 2)SVD++: Based on LFM, it extracts implicit features of users and items from ratings, but adds implicit user feedback compared to LFM;
[0156] 3) Time-SVD++: The rating time information was introduced into SVD++ to examine the impact of rating timeliness on user preferences;
[0157] 4) DeepCoNN: Uses CNN to extract user and item features from reviews, but does not consider rating information;
[0158] 5) NARRE: Based on DeepCoNN, it additionally utilizes LFM to extract user item features from ratings; however, unlike DeepCoNN, it introduces an attention mechanism to measure the usefulness of reviews;
[0159] 6) DeepCLFM: Based on NARRE, it performs first and second order fusion of deep features of user items extracted from reviews and shallow features of user items extracted from the rating matrix;
[0160] 7) RTRM: Based on NARRE, it extracts user and item features from reviews and ratings; however, unlike NARRE, it introduces the influence of neighboring user ratings into the rating matrix.
[0161] Table 1 provides a fine-grained comparison of the baseline model and the recommendation model of this invention from six dimensions: whether ratings, comments, deep learning, attention mechanisms, timeliness, and the influence of nearest neighbor ratings.
[0162] Table 1 Model Comparison
[0163]
[0164]
[0165] As shown in Table 1, LFM, SVD++, and Time-SVD++ only used rating data during the training phase, with only Time-SVD considering the timeliness factor. DeepCoNN was the first to use deep learning technology, but it only built the model from reviews and did not consider the timeliness factor or trust relationship. NARRE and DeepCLFM, two deep models, were based on both ratings and reviews, but they also did not incorporate the timeliness factor or trust relationship into the model. Meanwhile, their improved model, RTRM, added the influence of similar neighbor ratings. Unlike the models mentioned above, the recommendation model of this invention, while based on reviews and ratings, also considers the timeliness of (reviews) and trust relationship (the influence of trustworthy neighbor ratings).
[0166] Then, set the dataset and experimental parameters.
[0167] Amazon 5-core Clothing, Office Products (OP), Musical Instruments (MI), Sports and Outdoors (SO), and Beauty were used as experimental datasets. Table 2 shows the basic information statistics of these five datasets, which cover different themes and vary in size. It can be seen that the rating data in each dataset is extremely sparse.
[0168] Table 2. Statistical information of the dataset
[0169]
[0170] Table 3 presents the statistics of comment information for each dataset. UR-AVG (User-Review-Average) represents the average number of comments posted by each user, IR-AVG (Item-Review-Average) represents the average number of comments rated per item, UW-AVG (User-Word-Average) represents the average number of words in the user comment set, and IW-AVG (Item-Word-Average) represents the average number of words in the item comment set.
[0171] Table 3. Statistics of Comment Information in the Dataset
[0172]
[0173]
[0174] Table 3 shows that user reviews and item reviews are relatively rich in information, which can be used to compensate for the sparsity problem of rating data. It should be noted that, to maintain consistency in the length and number of reviews in the experiment, the review selection rate was set to 0.85.
[0175] In the experiment, the root mean square error (RMSE) was selected as the evaluation index for score prediction. The smaller the RMSE value, the higher the accuracy of the model's score prediction.
[0176]
[0177] In the above formula, and r ui Let |TestSet| and |TestSet| be the predicted and actual ratings of user u for item i, respectively; TestSet and |TestSet| are the test sample dataset and their sizes, respectively.
[0178] The dataset was divided into a training set (80%), a validation set (10%), and a test set (10%). The validation set was mainly used for hyperparameter tuning, while the test set was mainly used for model performance comparison.
[0179] 1) For LFM, SVD++ and Time-SVD++, we intend to search for the optimal number of latent factors from [8,16,32,64] and the optimal regularization coefficient from [0.0001,0.001,0.01,0.1,1.0].
[0180] 2) For DeepCoNN, NARRE, DeepCLFM, RTRM, and DRM-RT 2 For NRI, to ensure fairness in the experiment, a 300-dimensional GloVe pre-trained model was selected for DeepCoNN and NARRE during word vectorization, while DeepCLFM, RTRM, and DRM-RT were used for other models. 2 NRI uses the Sentence-BERT sentence vector model; simultaneously, the kernel size of the CNN convolutions in DeepCoNN and NARRE is set to 3, and the number of kernels is 100; DeepCLFM, RTRM, and DRM-RT are configured. 2 The NRI's GRU hidden unit count is 200; RTRM and DRM-RT are set. 2 The number of neighboring users in NRI is 40, and DRM-RT will be used. 2 The number of trusted nearest neighbors in NRI is initially set to 10.
[0181] Next, a performance evaluation will be conducted.
[0182] Table 4 shows a comparison of the score prediction accuracy between the deep recommendation model of this invention and seven baseline models.
[0183] Table 4 Comparison of Rating Prediction Accuracy (RMSE)
[0184]
[0185]
[0186] As can be seen from Table 4,
[0187] 1) Among the three rating data-based models—LFM, SVD++, and Time-SVD++—Time-SVD++ has the highest rating prediction accuracy. This indicates that considering timeliness information during feature extraction can improve rating prediction accuracy.
[0188] 2) The DeepCoNN model, which is based solely on reviews, outperforms LFM, SVD++, and Time-SVD++ models, which are based solely on ratings. This indicates that, like rating data, review text also contains a wealth of feature information about users and items.
[0189] 3)NARRE, DeepCLFM, RTRM and DRM-RT2 The four NRI models based on reviews and ratings outperform LFM, SVD++, Time-SVD++, and DeepCoNN. This indicates that, compared to extracting features solely from reviews or ratings, fusing reviews and ratings can extract richer user and item features, thereby achieving higher rating prediction accuracy.
[0190] 4) RTRM outperforms NARRE and DeepCLFM in terms of performance, which indicates that incorporating the influence of neighboring users during feature extraction can improve the model's feature extraction performance and thus improve the accuracy of rating prediction.
[0191] 5) The DRM-RT of the present invention 2 The NRI model achieved an average performance improvement of 3.0657% compared to seven existing baseline models. This indicates that integrating review timeliness and the influence of credible nearest neighbor ratings during feature extraction can improve the model's feature extraction performance and thus enhance the model's rating prediction accuracy. Secondly, parameter sensitivity analysis was conducted.
[0192] Using RMSE as the evaluation metric, the impact of dropout ratio, number of latent factors, and number of trusted nearest neighbors on the performance of the deep recommendation model of this invention is tested on the validation sets of the OP, MI, and SO datasets.
[0193] 1) Dropout Ratio. The selectable range for the dropout ratio is [0.1, 0.3, 0.5, 0.7, 0.9]. Figure 3 As can be seen, the performance of the deep recommendation model of this invention varies with the dropout ratio on the three datasets; for the OP dataset, the model performs best when the dropout ratio is 0.5; for the MI dataset, the model performs best when the dropout ratio is 0.7; and for the SO dataset, the model performs best when the dropout ratio is 0.3.
[0194] 2) Number of latent factors. The selectable range for the number of latent factors is [8, 16, 32, 64, 128]. From... Figure 4 It can be seen that on the OP, MI, and SO datasets, DRM-RT achieves optimal performance when the number of latent factors is 16, 16, and 32, respectively. 2 NRI performs best. Meanwhile, with the same number of latent factors, the model performs significantly better on the OP dataset than on the MI and SO datasets. This is because although the sparsity of the ratings in OP is between the other two, OP has a higher number of comments, and the rich comment information in OP compensates for the lack of rating data during feature extraction. Furthermore, as the number of latent factors increases, the RMSE also increases, indicating that the model overfits, weakens its generalization ability, and deteriorates its feature learning performance when the number of latent factors increases.
[0195] 3) Number of trusted nearest neighbors. The selectable range for the number of trusted nearest neighbors is [10, 15, 20, 25]. From... Figure 5 It can be seen that on the OP, MI, and SO datasets, DRM-RT achieves better performance when the number of trusted nearest neighbor users is 10, 25, and 15, respectively. 2 NRI performed best. Meanwhile, compared to the OP and SO datasets, the number of trusted nearest neighbors had the most significant impact on model performance on the MI dataset. This is because the MI dataset has the lowest score sparsity among the three; as the number of trusted nearest neighbors increases, the influence of the trusted nearest neighbor scores significantly improves, and the included feature information becomes richer.
[0196] Finally, an ablation experiment was conducted.
[0197] 1) Analysis of the impact of comment timeliness on prediction accuracy
[0198] To assess the impact of comment timeliness on the performance improvement of the deep recommendation model of this invention, the comment timeliness measurement function of the attention mechanism in the deep recommendation model of this invention was removed, and a comparison model BERT-GRU-Attention was constructed.
[0199] Using RMSE as the evaluation metric, based on the OP, MI, and SO datasets, Figure 6 The results show a comparison of the prediction accuracy of each technical solution before and after the introduction of comment timeliness.
[0200] The deep recommendation model of this invention, which incorporates comment timeliness, outperforms the BERT-GRU-Attention model without comment timeliness on all three datasets: on the OP, MI, and SO datasets, the former improves performance by 0.67%, 1.59%, and 0.14%, respectively. This indicates that the recommendation model of this invention improves feature extraction and rating prediction accuracy by adding a comment timeliness metric to the attention mechanism.
[0201] 2) Analysis of the impact of credible nearest neighbor ratings on prediction accuracy
[0202] Similarly, to assess the impact of the influence of trusted nearest neighbor ratings on the performance improvement of the deep recommendation model of this invention, the nearest neighbor trust evaluation function of this invention is removed, and a comparative model N-RMRT using the influence of similar nearest neighbor ratings is constructed.
[0203] like Figure 7As shown, the prediction accuracy of the deep recommendation model of this invention is improved compared with the N-RMRT model. On the OP, MI, and SO datasets, the former outperforms the latter by 0.53%, 1.47%, and 0.22%, respectively. This indicates that, compared with introducing the influence of similar nearest neighbor ratings, the deep recommendation model of this invention introduces the influence of credible nearest neighbor ratings in feature extraction, thereby improving the model's feature extraction performance and rating prediction accuracy.
[0204] In summary, this invention captures both deep features of users and items from reviews and shallow features from ratings during feature extraction. Simultaneously, it considers the timeliness of reviews and the influence of reliable neighbor ratings to align with users' tendency to browse the latest reviews and make selections, as well as their preference for friend recommendations. This improves the feature extraction capabilities of deep recommendation models and enhances rating prediction accuracy.
Claims
1. A deep recommendation model that integrates comment timeliness and the influence of credible nearest neighbor ratings, characterized in that, The deep recommendation model includes a deep feature extraction module that integrates comment timeliness, a shallow feature extraction module that integrates the influence of credible nearest neighbor ratings, and a multi-layer feature fusion module. The specific recommendation method of this deep recommendation model is as follows: For the review dataset, user review information and item review information are extracted separately. Then, a deep feature extraction module that integrates review timeliness is used to extract deep features from both user review information and item review information to obtain user preference features. U and item features I ; For the rating dataset, first extract user rating information and construct the rating matrix R. m×n (U, I), and then the rating matrix R is processed by a shallow feature extraction module that integrates the influence of trusted nearest neighbor ratings. m×n The decomposition yields shallow features, namely the latent vectors (LFM) of the items. I and user latent vectors (LFM) U Simultaneously, the system performs neighbor user selection and recommendation reliability calculation on user rating information to obtain the credible neighbor rating influence (TRUST). U ; Item features I and item latent vectors LFM I The item feature I is obtained by splicing and fusion; the user preference feature is then obtained. U and user latent vectors (LFM) U The user median vector U′ is obtained by concatenation and fusion. The influence of the obtained user median vector U′ on the Trusted Nearest Neighbor Rating (TRUST) is then calculated. U The user preference U is obtained by adding and fusing the dimensions; Finally, user preferences U and item features I are input into a fully connected layer, and the user's predicted rating Y_predict for the item is obtained by using the feature mapping of the fully connected layer.
2. The deep recommendation model that integrates comment timeliness and the influence of credible nearest neighbor ratings according to claim 1, characterized in that, The deep feature extraction module for the fusion review timeliness includes two structurally similar parallel networks, TNet. u and TNet i TNet U Extracting User Preference Features from User Review Information U The specific method is as follows: Step (A): Given a user set U = {u1, ..., u2} m }, Item set I = {i1, ..., i n } and the quintuple o = (u, i, r) ui w ui , t ui ), the quintuple o = (u m i n r ui w ui , t ui ) represents the m-th user u m For the nth item i n At time t ui Give a score r ui And comments w ui Therefore, the user's comment set is R = {R u1 , ..., R ud }, where d is the average number of comments per user, and each comment is mapped into an x-dimensional sentence vector using BERT, i.e., after vectorizing R sentences, we get S = {S u1 S ud }; Step (B): Input the sentence vector S of the comment set of user u into a bidirectional GRU network to obtain the interrelationships between sentences, and thus obtain the forward and backward context information, where the forward context information corresponds to the k-th comment. and backward context information The calculation is as follows: In the above formula, k∈[1,d], and These represent the forward and backward context information of the (k-1)th comment, respectively. and These represent the forward and backward GRU operations, respectively; Step (C): Transfer the forward and backward context information and S is obtained by splicing. uk Context information h k ,Right now Here, let the number of hidden units in the GRU be l, then h k ∈R 2l ; In other words, the sentence vector S of user u's comment set is processed by a bidirectional GRU to obtain contextual information H. u ={h1, ..., h d }, H u ∈R d×2l ; Step (D), for context information H u An attention mechanism is used to measure the contribution of each comment to user preferences. A time factor w(t) is introduced into the attention mechanism to measure the timeliness of the comments, i.e.: Where α is the time decay factor; t k t represents the comment time of the k-th comment; e The timeliness weight of each comment by user u is calculated based on the comment time of the most recent comment as follows: First, the comment contribution value 'a' of user u is calculated using an attention mechanism, i.e. The softmax function normalizes the attention weights, resulting in a = {a1, ..., a2}. d }, a∈R 1×d , ω1∈R 1×μ , ω2∈R μ×2l ; Secondly, the time-sensitivity weight function w(t) is used to map the timestamp of each comment, thus obtaining the time-sensitivity weight of the comment T = {t1, ..., t2}. d }, T∈R 1×d This is then combined with the comment contribution score to obtain the comment's timeliness contribution weight T_A, where T_A = T*a; In obtaining the timeliness contribution weight T_A∈R 1×d Then, for each comment, h k Perform a weighted summation and connect it to a fully connected layer to obtain the user u's preference features. U : Feature U =Fully_Connected(T_A×H u )。 3. The deep recommendation model that integrates comment timeliness and the influence of credible nearest neighbor ratings as described in claim 1, characterized in that, The deep feature extraction module for the fusion review timeliness includes two structurally similar parallel networks, TNet. u and TNet i TNet I Extracting product features from item review information I The specific method is as follows: Step (A): Given a user set U = {u1, ..., u2} m }, Item set I = {i1, ..., i n } and the quintuple o = (u, i, r) ui w ui , t ui ), the quintuple o = (u m i n r ui w ui , t ui ) represents the m-th user u m For the nth item i n At time t ui Give a score r ui And comments w ui Therefore, the set of comments for the items is R = {R i1 , ..., R id }, where d is the average number of reviews for an item, and each review is mapped into an x-dimensional sentence vector using BERT, i.e., after vectorizing R sentences, we get S = {S i1 S id }; Step (B): Input the sentence vector S of the comment set for item i into a bidirectional GRU network to obtain the interrelationships between sentences, thereby obtaining the forward and backward contextual information, where the forward contextual information corresponding to the k-th comment is... and backward context information The calculation is as follows: In the above formula, k∈[1,d], and These represent the forward and backward context information of the (k-1)th comment, respectively. and These represent the forward and backward GRU operations, respectively; Step (C): Transfer the forward and backward context information and S is obtained by splicing. ik Context information h k ,Right now Here, let the number of hidden units in the GRU be l, then h k ∈R 2l ; In other words, the sentence vector S of the comment set for item i is processed by a bidirectional GRU to obtain the context information H. i ={h1, ..., h d }, H i ∈R d×2l ; Step (D), for context information H i An attention mechanism is used to measure the contribution of each comment to item preference. A time factor w(t) is introduced into the attention mechanism to measure the timeliness of the comments, i.e.: Where α is the time decay factor; t k t represents the comment time of the k-th comment; e The timeliness weight of each comment for item i is calculated as follows, taking into account the comment time of the most recent comment: First, the comment contribution value 'a' of item i is calculated using an attention mechanism, i.e. The softmax function normalizes the attention weights, resulting in a = {a1, ..., a2}. d }, a∈R 1×d , ω1∈R 1× μ, ω2∈R μ×2l ; Secondly, the time-sensitivity weight function w(t) is used to map the timestamp of each comment, thus obtaining the time-sensitivity weight of the comment T = {t1, ..., t2}. d }, T∈R 1×d This is then combined with the comment contribution score to obtain the comment's timeliness contribution weight T_A, where T_A = T*a; In obtaining the timeliness contribution weight T_A∈R 1×d Then, for each comment, h k Perform a weighted summation and connect it to a fully connected layer to obtain the preference feature of item i. I : Feature I =Fully_Connected(T_A×H i )。 4. The deep recommendation model that integrates comment timeliness and the influence of credible nearest neighbor ratings according to claim 1, characterized in that, TRUST leverages the influence of trusted neighbor ratings based on nearby users and recommendation reliability. U The specific content includes: (1) Filtering nearby users For the rating values in the user rating information, the inverse cloud algorithm is first used to calculate the user rating feature vector. Next, the modified similarity metric method is used to calculate the p-th user u. p and the qth user u q similarity between Finally, the top K users with the highest similarity were selected as the nearest neighbor users NS; Ex represents the expected value, indicating the average user rating level; En represents the entropy, indicating the dispersion of user ratings; He represents the hyperentropy, indicating the stability of entropy. (2) Calculate the recommendation reliability of nearest neighbor users Assume u q For target users, u p For u q For any of the nearest neighbor users, first predict u q In item i j ratings Then calculate u sequentially. q For u p Recommendation satisfaction SAT j (u q u p ), u p Initial Trust Level (IRT) j (u q u p ) and u p Reliability of RT j ; Where, r pj Indicates user u p In item i j Ratings on the platform; Indicates target user u q For item i j Predicted score; For u q with u p Nearest neighbor similarity, Size of the nearest neighbor similarity set and u q and u p The mean score is given by ε, where ε represents the recommendation bias; α and β are the weights of each part, and 0 < α, β < 1. For u p Presented to u q Historical reliability; j represents the current item's sequence number; SAT h (u q u p ) represents u q For u p In item i h Recommendation satisfaction; ρ (0 < ρ ≤ 1) is the attention factor for historical reliability; Finally, update RT. j until j = |CRIS(u q u p )|,CRIS(u q u p ) for u q with u p The common scoring item set, and i j The j-th item in the chronological order of the jointly rated items; (3) Calculate the influence of the trusted nearest neighbor score For each user u in the user set U p Initialize TS(u) p ), for u p Each neighboring user u q The reliability RT(u) is calculated using the method in step (2). p u q ), and the reliability RT(u p u q Add to set TS(u) p Then, for each user u in the user set U... p Based on its true reliability, TS(u p Sort the data in descending order and select the top S nearest neighbors as trusted nearest neighbors T. U (u p Using the rating feature vectors of trusted nearest neighbors, the indirect feedback of the current user is calculated and added to the set TRUST. U This process continues until the entire user set U is traversed, ultimately yielding the Trusted Nearest Neighbor Rating Influence (TRUST). U .
5. The deep recommendation model that integrates comment timeliness and the influence of credible nearest neighbor ratings according to claim 1, characterized in that, In the shallow feature extraction module that integrates the influence of trusted nearest neighbor ratings, matrix factorization is used to extract the rating matrix R. m×n (U, I) is decomposed to obtain the item latent vector LFM I and user latent vectors (LFM) U ,Right now: R m×n ≈LFM U LFM I T 6. The deep recommendation model that integrates comment timeliness and the influence of credible nearest neighbor ratings according to claim 1, characterized in that, The formula for calculating the predicted score is: Y_Predict=μ+b i +b u +W×multiply(U,I) μ is the global average offset, b i For item offset, b u For user offset, W is the weight matrix, and multiply is the inner product operation; When training a deep recommendation model, squared loss is used as the loss function. To prevent overfitting during training, a regularization term is added to the loss function to constrain the parameters. Where λ is a weighting parameter used to balance the proportions of the two loss terms; Meanwhile, to make the model converge faster, the loss function L(W, I, U′, b) is adjusted. u b i The components of the gradient are calculated as follows: Based on this, the Adam optimizer is selected, which automatically adjusts the learning rate to update each parameter.