A collaborative filtering recommendation method and system based on trusted selection of time-sensitive neighbors

By using the method of timely neighbor filtering and trusted neighbor selection in collaborative filtering recommendation, the problems of low recommendation accuracy and poor attack resistance when data is sparse are solved, and higher recommendation accuracy and attack resistance are achieved.

CN114861081BActive Publication Date: 2025-02-28NANJING AUDIT UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210544339.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2025-02-28
Estimated Expiration
2042-05-18

AI Technical Summary

Technical Problem

The existing collaborative filtering recommendation technology has problems with low recommendation accuracy and poor attack resistance when data is sparse, and it has failed to effectively deal with abnormal changes in user interest and fluctuations in reliability.

Method used

The collaborative filtering recommendation method based on the trusted selection of aging neighbors is adopted. The user's interest similarity is calculated through the time weight function, the aging neighbors are filtered, and the project-level trust calculation model and the PID controller variant model are used to re-estimate the recommendation reliability, dynamically select trusted neighbors, and finally score prediction is made.

Benefits of technology

It improves recommendation accuracy and attack resistance, alleviates the problems of low recommendation accuracy and poor stability in data sparse situations, and at the same time enhances the anti-attack and credibility of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present invention discloses a collaborative filtering recommendation method and system based on trusted selection of time-sensitive neighbors, which predicts the score of a target user on a target project based on a score matrix, and the specific steps include: time-sensitive neighbor screening, trusted neighbor selection, and score prediction. The collaborative filtering recommendation method based on trusted selection of time-sensitive neighbors of the present invention fully considers two time-varying factors, abnormal changes in user interests and fluctuations in recommendation credibility, and sequentially utilizes three steps, namely, time-sensitive neighbor screening, trusted neighbor selection, and target user score prediction, to complete the recommendation to the target user, thereby alleviating the problems of low collaborative filtering recommendation accuracy, poor stability, and weak resistance to user profile injection attacks in the case of sparse data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to information recommendation technology, and in particular to a collaborative filtering recommendation method and system based on time-sensitive nearest neighbor trusted selection. Background Art

[0002] In recent years, as social production and people's lives have migrated to information space on a large scale, the phenomenon of information wandering caused by information overload has become increasingly serious. In order to help people filter out useful information from the rapidly expanding data, recommendation systems have emerged. Currently, content-based recommendations, collaborative filtering recommendations, association rule-based recommendations, utility-based recommendations, knowledge-based recommendations, and hybrid recommendations have been widely used in various e-commerce platforms to improve user stickiness, reduce service bounce rates, and help users build information cocoons. According to statistics, 80% of movies watched on Netflix, 60% of video clicks on YouTube, and 38% of news clicks on Google are all from recommendations; 30% of product page views on Amazon, 20% to 30% of product sales, and 35% of sales revenue are all contributed by personalized recommendations.

[0003] Among them, as one of the most successful recommendation technologies in e-commerce recommendation systems, the basic idea of ​​collaborative filtering recommendation is that similar users may like the same item, and similar items may be liked by the same user. Although this type of recommendation has the advantages of not requiring domain knowledge, no special requirements for recommended objects, easy to explain, and easy to implement in engineering, traditional collaborative filtering recommendations are usually based on the assumption that data is static, and there is a problem of low recommendation accuracy when data is sparse.

[0004] To improve the accuracy of collaborative filtering recommendations, some studies have attempted to add descriptive information about changes in user interests to recommendation strategies, such as:

[0005] Liu proposed a collaborative filtering recommendation algorithm based on clustering. The algorithm preprocessed user ratings using a time decay function, described users using interest vectors, and clustered users using a clustering algorithm, thus realizing a multi-dimensional portrait that reflects changes in user interests. Dong Chenlu et al. proposed a collaborative filtering algorithm based on user interest changes and comments. The algorithm used a topic model to mine product topic features from comment texts, used the Ebbinghaus forgetting curve to assist in calculating user comment similarity, and combined user comment similarity and rating similarity to obtain the final similarity between users. Based on the fact that experts in each field are more persuasive and user interests change over time, Xu et al. proposed a collaborative filtering recommendation algorithm based on user credibility and time context. By incorporating these two factors into a modified cosine similarity model, the accuracy of similarity calculation between users was improved. Based on the fact that recommendations need to fit users' short-term interests, Li et al. proposed a collaborative filtering algorithm using social information and dynamic time windows. Based on the Ebbinghaus forgetting curve, the algorithm used segmented time windows to define users' short-term interests, introduced time functions to distinguish the importance of each short-term interest, and realized the timely capture of user interest changes.

[0006] However, the above technical solutions do not pay attention to the abnormal interest changes implemented by malicious users to interfere with or mislead recommendations. Taking the common user profile attack in collaborative filtering recommendation as an example, malicious users can obtain the identities of similar users (neighbors) of the target user by deliberately catering to the interests of the target user in the ratings of the target user's rated items, and then implement strategic scoring on the target user's unrated items to achieve the purpose of interfering with or misleading recommendations. Different from the normal changes in the target user's interests, this abnormal change in interest hidden behind the malicious user's strategic scoring will inevitably weaken the anti-attack ability of the recommendation system if it is not effectively handled.

[0007] In addition, some people have introduced trust relationships into recommendations to improve recommendation accuracy and system robustness, for example:

[0008] Chen Ting et al. proposed a trust-based recommendation algorithm in a social network environment. However, when the algorithm uses the user preference model constructed by integrating the similarity generated by the rating data and the trust generated by the trust relationship to find neighbors, it has not paid attention to the dynamic nature of the trust relationship. Wang et al. incorporated geographic location and time information into the similarity calculation model based on the preference of interest points for the prediction of user trajectory behavior sequences in smart cities, and proposed a user similarity calculation method with trust enhancement. However, this method simply divides the rating time into 24 time zones and cannot reliably reflect the changes of user trust over time at a fine-grained level. Wang et al. proposed a new trust-based collaborative filtering algorithm, but did not mention how to ensure that the trust used is consistent and reliable over time. Jia Dongyan et al. proposed a collaborative filtering recommendation algorithm based on a dual neighbor selection strategy, using trust to characterize the user's recommendation ability, but the algorithm lacks consideration of the interest changes of the target user and the trust fluctuations of neighboring users. The recommendation accuracy and anti-attack ability of the recommendation system still have room for improvement.

[0009] In summary, the existing technology fails to deal with abnormal changes in user interests and fluctuations in user confidence in recommendations, two issues that may interfere with or mislead the recommendation results, making it difficult to ensure the anti-attack ability, recommendation stability and credibility of the recommendation system. Summary of the invention

[0010] Purpose of the invention: The purpose of the present invention is to solve the deficiencies in the prior art and to provide a collaborative filtering recommendation method and system based on time-sensitive nearest neighbor trusted selection.

[0011] Technical solution: A collaborative filtering recommendation method based on time-sensitive neighbor trusted selection of the present invention sets the six-tuple CFRS= <U,I,R,u a ,i b ,r ab >,U={u1,u2,…,u i ,…,u m} is composed of m users u i The user set composed of 1≤i≤m; I={i1,i2,…,i j ,…,i m} is composed of n items i j The set of items, 1≤j≤n; R={r ij} m*n is composed of m*n ratings r ij The scoring matrix composed of ij Indicates u i to i j If the rating Indicates u i to ij No rating yet; predict the target user u based on the rating matrix R a In the target project i b Rating ab The specific steps are as follows:

[0012] Step S1: Time-sensitive neighbor screening

[0013] First, the time-effectiveness weight function w(t) is used to calculate the time-effectiveness weight of the target user's neighbors on the common rated items. Then, the time-effectiveness similarity between each neighbor and the target user is calculated by incorporating the time-effectiveness weight into the interest similarity calculation model based on the Pearson correlation coefficient. Finally, the time-effectiveness neighbors are dynamically selected for the target user based on the time-effectiveness similarity.

[0014] Step S2: Trusted Neighbor Selection

[0015] First, the recommendation ability of the time-sensitive neighbors selected in step S1 is initially estimated using the item-level trust calculation model, and then the initial recommendation confidence estimate is re-estimated using the PID controller variant model. Finally, the trusted neighbors are dynamically selected for the target user based on the re-estimated recommendation confidence.

[0016] Step S3: Rating prediction

[0017] First, the recommendation weight of each trusted neighbor on the target project is calculated based on the recommendation credibility of each trusted neighbor. Then, the scores of all trusted neighbors on the target project are used to predict the target user's score on the project, thereby completing the project recommendation to the target user.

[0018] The above technical solution fully considers the two key factors that affect the quality of target user neighbor screening: abnormal changes in user interests and fluctuations in the credibility of recommendation capabilities, and constructs a recommendation process that includes three strategies: time-sensitive neighbor screening, credible neighbor selection, and score prediction.

[0019] Furthermore, the detailed process of step S1 is as follows:

[0020] Step S1.1: Calculate the target user u by interest similarity a Its neighbor user u i ∈NS(u a )’s temporal similarity TSD(u a ,u i );

[0021]

[0022] In formula (1), r ak and r ik u a and u i For Project I k∈CRIS(u a ,u i ) rating; Indicates u a In its corresponding scoring item RIS(u a ), Indicates u i In its corresponding scoring item set RIS(u i ) is the mean score of all items in the ak and t ik Ratings r ak and r ik The generation time (normalized time), w(t ak ) and w(t ik ) are r ak and r ik The time weight of CRIS(u a ,u i ) is the target user u a and its neighbor user u i The common scoring item set, and CRIS(u a ,u i )=RIS(u a )∩RIS(u i );

[0023] Step S1.2: Calculate the target user u a With the neighbor set NS(u a ) is:

[0024]

[0025] NS(u a ) is the target user u a The neighbor set of

[0026] Step S1.3: for target user u a Filter its corresponding time-effective nearest neighbor set TeCNS(u a );

[0027]

[0028] Furthermore, the timeliness weight w(t ak ) and w(t ik ) is calculated by the time-effectiveness weight function w(t), and the expression of w(t) is:

[0029] w(t)=Logistic(t)=(1+e -t ) -1; t∈[-1,1] (2).

[0030] Furthermore, the detailed process of step S2 is as follows:

[0031] S2.1. Based on the project-level trust calculation model, the time-sensitive neighbor set TeCNS(u a ) to make an initial estimate of the recommendation credibility;

[0032] First, use the time-sensitive neighbor u i Information prediction target user u a For the jth item i j Rating Right now

[0033]

[0034] Then use the prediction score To estimate u a To u i Recommended Satisfaction SAT j (u a ,u i ),Right now:

[0035]

[0036] Among them, the constant ε is u a The recommended deviation value defined is 1.2 in the experiment in Section 4.

[17] .

[0037] Then use the recommendation satisfaction estimate u a To u i RRT j (u a ,u i ),Right now:

[0038]

[0039] S2.2. Correct the original value of recommendation reliability RRT by re-evaluating the recommendation reliability j with u i The measurement deviation between the actual recommendation behavior and the specific recommendation confidence re-estimation calculation is as follows:

[0040] RT j (u a ,u i )=α*RRT j (u a ,u i )+β*HRT1 j-1 (u a ,u i )+γ*DRTj (u a ,u i )+δ*DRT j (u a ,u i )*|SDRT j (u a ,u i )|;0<α,β,γ,δ<1 (7)

[0041] In the above formula, RRT j ,HRT1 j-1 ,DRT j ,SDRT j and RT j They represent the original value, historical value, change rate, change trend and revaluation value of recommendation confidence respectively; α, β, γ and δ are the corresponding weights of each part;

[0042] HRT1 j-1 ,DRT j and SDRT j The calculation formulas of are shown in Equations 10 to 12, where ρ (0<ρ≤1) and θ (0<θ≤1) are the attention factors of historical recommendation credibility and its change rate, respectively;

[0043]

[0044]

[0045]

[0046] S2.3, Trusted Neighbor Screening: The target user u a The time-effective neighbor recommendation credibility set {RT(u a ,u i )|u i ∈TeCNS(u a )} are sorted from largest to smallest, and the time-effective neighbors u corresponding to the topK recommendation confidences are selected i As u a Trusted neighbors.

[0047] Furthermore, the values ​​of α, β, γ and δ are as follows:

[0048] β / α is proportional to j-1, γ and δ follow equations 8 and 9;

[0049]

[0050]

[0051] Furthermore, the detailed method of step S3 is:

[0052] For target project i j , according to the time-sensitive neighbor set TCNS(u a ) in which the user j The score of a in i j Rating on

[0053]

[0054] The present invention also provides a collaborative filtering recommendation system based on time-sensitive neighbor credible selection, comprising a time-sensitive neighbor screening unit, a credible neighbor selection unit and a score prediction unit;

[0055] The time-sensitive neighbor screening unit first uses the time-sensitive weight function w(t) to calculate the time-sensitive weight of the target user's neighbors on the common scoring items, and then calculates the time-sensitive similarity between each neighbor and the target user through the interest similarity calculation model based on the Pearson correlation coefficient that incorporates the time-sensitive weight. Finally, the time-sensitive neighbors are dynamically screened for the target user based on the time-sensitive similarity.

[0056] The trusted neighbor selection unit first uses the item-level trust calculation model to make an initial recommendation confidence estimate for the recommendation capability of the time-sensitive neighbors selected in step S1, then re-estimates the initial recommendation confidence estimate using the PID controller variant model, and finally dynamically selects a trusted neighbor for the target user based on the re-estimated recommendation confidence estimate;

[0057] The rating prediction unit first calculates the recommendation weight of each trusted neighbor on the target project based on the recommendation credibility of each trusted neighbor, and then uses their ratings on the target project to predict the target user's rating of the project, thereby completing the project recommendation to the target user.

[0058] Beneficial effects: Compared with the prior art, the present invention has the following advantages:

[0059] (1) The collaborative filtering recommendation method based on trusted selection of time-sensitive neighbors of the present invention fully considers two time-varying factors: abnormal changes in user interests and fluctuations in recommendation credibility. It sequentially uses three steps, namely, time-sensitive neighbor screening, trusted neighbor selection, and target user rating prediction, to complete the recommendation to the target user, thereby alleviating the problems of low collaborative filtering recommendation accuracy, poor stability, and weak resistance to user profile injection attacks in the case of sparse data.

[0060] (2) The present invention proposes a time-sensitive neighbor screening strategy based on interest time similarity. By giving timeliness to the traditional interest similarity, users with the same score but different scoring time have different interest similarities, which alleviates the problem of inaccurate neighbor selection caused by the change of target user interests over time in the traditional neighbor selection strategy based on user interest similarity.

[0061] (3) The present invention proposes a trusted neighbor selection strategy based on recommendation credibility, which comprehensively utilizes four factors, namely, the original value, historical value, current change rate and future trend of the neighbor recommendation credibility to re-evaluate the recommendation credibility, so that the neighbors cannot use the fluctuating scores of the strategy to improve others' confidence in their recommendation ability, thereby alleviating the problem of unreliable neighbor selection for target users caused by unreliable recommendation credibility in existing credibility-based neighbor selection strategies.

[0062] (4) The MovieLens dataset is used in this paper to compare the strategy proposed in this paper with similar strategies based on indicators such as mean absolute error, average prediction increment, precision, recall and harmonic mean, which confirms that the new method has significant improvements in recommendation accuracy (including accuracy stability) and anti-attack ability (including attack user identification effect). BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 It is a schematic diagram of the framework of the present invention. DETAILED DESCRIPTION

[0064] The technical solution of the present invention is described in detail below, but the protection scope of the present invention is not limited to the embodiments.

[0065] In order to further understand the technical solution of the present invention, the following symbolic parameters are explained.

[0066] Collaborative Filtering Recommendation System CFRS <U,I,R,u a ,i b ,r ab > contains six elements, where U = {u1,u2,…,u i ,…,u m} is composed of m users u i The user set composed of 1≤i≤m; I={i1,i2,…,i j ,…,i m} is composed of n items i j The set of items, 1≤j≤n; R={r ij} m*n is composed of m*n ratings r ij The scoring matrix composed of ij Indicates u i to ij If the rating Indicates u i to i j Not rated yet.

[0067] Rating item set, if user u a For Project I j Rated, that is Then i j is u a A rating item for user u a The scoring item set RIS(u a ) is the set of all the rated items of the user, that is,

[0068] Commonly rated item set, let RIS(u a ) and RIS(u i ) are respectively user u a and u i The rated item set, then u a and u i The commonly rated itemset CRIS(u a ,u i ) can be expressed as CRIS(u a ,u i )=RIS(u a )∩RIS(u i ).

[0069] Neighbor set, let CRIS(u a ,u i ) is user u a With user u i The commonly rated item set, then u a The neighbor set of can be expressed as

[0070] Time-sensitive neighbor set, let NS(u a ) is user u a Neighbor set, TSD(u a ,u i ) is u a With user u i The temporal similarity of G TSD (u a ) is u a The limited time similarity threshold, then u a The temporal neighbor set can be expressed as

[0071] Time-sensitive neighbor credibility set, let TeCNS(u a ) is user u a The temporal neighbor set, RT(ua ,u i ) is user u i Present to you a The recommendation credibility of u a The time-sensitive neighbor credibility set can be expressed as

[0072] Trusted neighbor set, let TeCNS(u a ) and TSTeCN(u a ) are respectively user u a The time-sensitive neighbor set and credibility set, RT(u a ,u i ) is user u i Present to you a The recommendation credibility of u a The trusted neighbor set of Where topK({.}) represents the set consisting of the first K larger elements in {.}.

[0073] like Figure 1 As shown, the collaborative filtering recommendation method based on time-sensitive neighbor trusted selection in this embodiment predicts the target user u through the rating matrix R a In the target project i b Rating ab , the main process is described as follows:

[0074] (1) Based on the rating matrix R, select the target user u a The neighbor set NS(u a );

[0075] (2) Based on the interest time similarity TSD(u a ,*), using Algorithm 1 from the neighbor set NS(u a ) to extract u a The temporal nearest neighbor set TeCNS(u a );

[0076] (3) The recommendation reliability RT(u) calculated according to Algorithm 2 a ,*), using Algorithm 3 from TeCNS(u a ) to further filter out u a The trusted nearest neighbor set TCNS(u a );

[0077] (4) According to formula 13, predict u a For Project I j Rating Complete project recommendations.

[0078]

[0079] Embodiment 1: The specific steps of this embodiment are as follows:

[0080] Step S1, the time-effective neighbor screening unit first uses the time-effective weight function w(t) to calculate the time-effective weight of the target user's neighbors on the common scoring items, and then calculates the time-effective similarity between each neighbor and the target user through the interest similarity calculation model based on the Pearson correlation coefficient that incorporates the time-effective weight, and finally dynamically screens the time-effective neighbors for the target user based on the time-effective similarity. The specific process is:

[0081] Step S1.1: Calculate the target user u by interest similarity a Its neighbor user u i ∈NS(u a )’s temporal similarity TSD(u a ,u i );

[0082]

[0083] In formula (1), r ak and r ik u a and u i For Project I k ∈CRIS(u a ,u i ) rating; Indicates u a In its corresponding scoring item RIS(u a ), Indicates u i In its corresponding scoring item set RIS(u i ) is the mean score of all items in the ak and t ik Ratings r ak and r ik The generation time (normalized time), w(t ak ) and w(t ik ) is r ak and r ik The time weight of CRIS(u a ,u i ) is the target user u a and its neighbor user u i The common scoring item set, and CRIS(u a ,u i )=RIS(u a )∩RIS(u i );

[0084] Step S1.2: Calculate the target user ua With the neighbor set NS(u a ) is:

[0085]

[0086] NS(u a ) is the target user u a The neighbor set of

[0087] Step S1.3: for target user u a Filter its corresponding time-effective nearest neighbor set TeCNS(u a );

[0088]

[0089] The above time weight w(t ak ) and w(t ik ) is calculated by the time-effectiveness weight function w(t), and the expression of w(t) is:

[0090] w(t)=Logistic(t)=(1+e -t ) -1 ; t∈[-1,1] (2).

[0091] Among them, for any target user u a There are users u who have a common rating item i For u a The closer it is to u a The greater the similarity of interest time.

[0092] The temporal nearest neighbor selection algorithm in this embodiment is shown in Algorithm 1 and described as follows:

[0093]

[0094] The second step in Algorithm 1 is to obtain the target user u a The neighbor set NS(u a ); Steps 3 to 6 are to calculate u a With neighbors i The temporal similarity and u a The time-limited similarity threshold of G TSD (u a ) is the target user u a Screening time-effective nearest neighbor set TeCNS(u a ). In this embodiment, G TSD (u a ) is u a The mean of the temporal similarity with all users in the neighbor set.

[0095] Step S2: The trusted neighbor selection unit first uses the item-level trust calculation model to make an initial estimate of the recommendation confidence of the time-sensitive neighbors selected in step S1, then re-estimates the initial value of the recommendation confidence using the PID controller variant model, and finally dynamically selects a trusted neighbor for the target user based on the re-estimated value of the recommendation confidence. Let u a For the target user, u i for u a The temporal nearest neighbor, that is, u i ∈TeCNS(u a ),i j for u a with u i The common scoring items of i j ∈CRIS(u a ,u i ), r aj and r ij u a and u i to i j Rating, and for u a and u i The mean score, TSD(u a ,u i ) is u a and u i The temporal similarity of CRIS(u a ,u i ) in the project element press u i The scoring time is in order, and i j is the jth item in the set.

[0096] The detailed process is:

[0097] S2.1. Based on the project-level trust calculation model, the time-sensitive neighbor set TeCNS(u a ) to make an initial estimate of the recommendation credibility;

[0098] First, use the time-sensitive neighbor u i Information prediction target user u a For the jth item i j Rating Right now

[0099]

[0100] Then use the prediction score To estimate u a To u i Recommended Satisfaction SAT j (ua ,u i ),Right now:

[0101]

[0102] Among them, the constant ε is u a The recommended deviation value defined in Section 4 is 1.2.

[0103] Then use the recommendation satisfaction estimate u a To u i RRT j (u a ,u i ),Right now:

[0104]

[0105] S2.2. Correct the original value of recommendation reliability RRT by re-evaluating the recommendation reliability j with u i The measurement deviation between the actual recommendation behavior and the specific recommendation confidence re-estimation calculation is as follows:

[0106] RT j (u a ,u i )=α*RRT j (u a ,u i )+β*HRT1 j-1 (u a ,u i )+γ*DRT j (u a ,u i )+δ*DRT j (u a ,u i )*|SDRT j (u a ,u i )|;0<α,β,γ,δ<1 (7)

[0107] In the above formula, RRT j ,HRT1 j-1 ,DRT j ,SDRT j and RT j They represent the original value, historical value, change rate, change trend and revaluation value of recommendation confidence respectively; α, β, γ and δ are the corresponding weights of each part;

[0108] HRT1 j-1 ,DRT j and SDRT jThe calculation formulas of are shown in Equations 10 to 12, where ρ (0<ρ≤1) and θ (0<θ≤1) are the attention factors of historical recommendation credibility and its change rate, respectively;

[0109]

[0110]

[0111]

[0112] The above recommendation credibility evaluation algorithm is shown in Algorithm 2 and described as follows:

[0113]

[0114] S2.3, Trusted Neighbor Screening: The target user u a The time-effective neighbor recommendation credibility set {RT(u a ,u i )|u i ∈TeCNS(u a )} are sorted from largest to smallest, and the time-effective neighbors u corresponding to the topK recommendation confidences are selected i As u a Trusted neighbors.

[0115] The trusted neighbor screening algorithm is described as follows:

[0116]

[0117] The values ​​of α, β, γ and δ are as follows:

[0118] β / α is proportional to j-1, γ and δ follow equations 8 and 9;

[0119]

[0120]

[0121] Step S3: The rating prediction unit first calculates the recommendation weight of each trusted neighbor on the target project based on the recommendation credibility of each trusted neighbor, and then uses their ratings on the target project to predict the target user's rating of the project, thereby completing the project recommendation to the target user:

[0122] For target project i j , according to the time-sensitive neighbor set TCNS(u a ) in which the user j The score of a in i j Rating on

[0123]

[0124] Example 2: Table 1 shows the scores and (standardized) time of the target user Mike and his neighbors u1-u7 on items i1-i5 in this example. The similarity between Mike and the seven neighbors is calculated using traditional PCC and PCC with time weights.

[0125] (1) The results obtained by the former are {0.4852, 0.3225, 0.0369, 0.0678, 0.4111, 0.3025, 0.4135} (Mike similarity threshold 0.2914), and the selected Mike neighbor set is {u1, u2, u5, u6, u7};

[0126] (2) The results obtained by the latter are {0.5064, 0.2965, 0.0846, 0.0791, 0.4090, 0.3001, 0.4472} (Mike's temporal similarity threshold is 0.3033), and the selected Mike temporal neighbor set is {u1, u5, u7}.

[0127] Taking u6 as an example, although its and u5 have the same score as Mike, the time interval between its score and Mike is much larger than the time interval between u5 and Mike, which causes it to be excluded from Mike's neighbors by the PCC method with time weight.

[0128] Table 1 Similarity calculation

[0129]

[0130] The hyperparameters are α=0.2, β=0.8, γ1=δ1=0.05, γ2=δ2=0.2, ρ=θ=1. Then, the self-PID control strategy is improved according to the recommendation credibility re-evaluation model of formula (7). The four components of recommendation credibility original value (P), historical value (I), change rate (D) and change trend (SD) are comprehensively utilized. The weighted D component is used to measure the sudden fluctuation of recommendation behavior. The weighted average of I, D and SD components is used to distinguish between improvement and deterioration of recommendation behavior. The weighted average of P and I components is used to tolerate unconscious erroneous recommendation behavior and reflect consistent recommendation behavior. The weighted average of D and SD components is used to track the trend of recommendation behavior changes, thereby improving the approximation between recommendation credibility and real recommendation behavior.

[0131] If ε=0.5, α=0.2, β=0.8, γ1=δ1=0.05, γ2=δ2=0.2, ρ=θ=1, as shown in Table 2, according to Algorithm 2, the recommendation confidences of u1, u5 and u7 can be obtained as 0.73, 1.00 and 0.61 respectively.

[0132] Table 2 Recommendation reliability evaluation

[0133]

[0134] In this embodiment, the K value is 2. According to Algorithm 3, Mike's trusted neighbors can be selected as u1 and u5, and the topK is 90%. Finally, Algorithm 4 is used to calculate Mike's predicted score for i3 as 2.463.

[0135] Experimental data and platform

[0136] The experiments were conducted on two MovieLens movie rating datasets: movielens-100K (about 1000 users with about 100,000 ratings on nearly 1,700 movies, with a sparsity rate of about 96.695%) and ml-latest-small (about 610 users with 100,837 ratings on nearly 9,742 movies, with a sparsity rate of about 98.303%). The MovieLens dataset contains fields such as user ID, movie ID, rating, and timestamp in the rating data. The rating is the user's rating of the movie he has watched, with a score of 1 ("dislike") to 5 ("very like"), and the timestamp is the number of seconds between the rating submission time and midnight on New Year's Day 1970.

[0137] The algorithm is implemented using Python 3.9.7 and the math library. The machine configuration used in the experiment is as follows: CPU (I7-11800H, 2.30GHz), memory (32G), hard disk (1TB), and GPU (RTX3060 6GB).

[0138] Performance Evaluation Metrics

[0139] There are two main evaluation indicators used in this embodiment, namely:

[0140] (1) Mean Absolute Error (MAE)

[0141] MAE is used to measure the error between the predicted score and the actual score. The calculation formula is:

[0142]

[0143] In formula 14 and r aj The target user u a In Project I j The predicted score and the true score on (1≤j≤n). The smaller the MAE value, the higher the algorithm recommendation accuracy.

[0144] (2) Average Prediction Shift (APS)

[0145] APS is used to measure the increment of system prediction before and after the project is attacked. The calculation formula is:

[0146]

[0147] In formula (15), and They are the target users u before and after the project is attacked. a In Project I j The smaller the APS value, the stronger the algorithm's anti-attack ability.

[0148] In addition, the attack user detection capability is evaluated by using three commonly used classifier evaluation metrics: precision, recall, and harmonic mean. Specifically, let TP be the number of samples correctly identified as attack users, FN be the number of samples misclassified as non-attack users, and FP be the number of samples misclassified as attack users, then the attack user recall R = TP / (TP+FN), the attack user recall P = TP / (TP+FP), and the harmonic mean F = 2*P*R / (P+R).

[0149] Recommendation accuracy evaluation

[0150] Here, in order to evaluate the recommendation accuracy of the technical solution of the present invention, this embodiment classifies and compares the recommendation accuracy of eight similar strategies, including the collaborative filtering recommendations of the time-sensitive neighbor selection strategy (CF-TSD), the trusted neighbor determination strategy (CF-RT) and the time-sensitive neighbor trusted selection strategy (CF-TeCNTS) of the present invention, the collaborative filtering recommendations of the interest similar user set (CF-PSU), the user trust calculation model (CF-UTC) and the dual neighbor selection strategy (CF-DNC) of the related prior art, the collaborative filtering recommendations of the item set trust calculation model (CF-ITC) and the traditional collaborative filtering recommendation (CF).

[0151] The experiment uses the MovieLens-100K dataset and the MAE evaluation indicator. By selecting users with different numbers of neighbors as target users, the recommendation deviation MAE value is calculated as shown in Table 3.

[0152] Table 3 Comparison of recommendation deviation MAE of different strategies

[0153]

[0154]

[0155] From Table 3 we can see that:

[0156] (1) In the strategy of selecting neighbors based on similarity, the MAE obtained by CF-PSU and CF-TSD is significantly lower than that of CF (the mean is reduced by 7.3616% and 14.3482% respectively), indicating that using the similarity threshold to filter out low-similarity users during neighbor screening can improve the quality of neighbor screening and thus improve the system recommendation accuracy. Furthermore, due to the consideration of interest changes, the MAE fluctuation of CF-TSD is significantly higher than that of CF-PSU, but its overall mean MAE is lower than that of CF-PSU (the mean is reduced by 7.5418%), indicating that the selection of neighbors based on the interest-time similarity of the present invention can further improve the quality of neighbor screening and bring higher recommendation accuracy.

[0157] (2) In the strategy of selecting neighbors based on trust, the MAE obtained by CF-UTC and CF-RT is lower than that of CF-ITC (the average values ​​are reduced by 19.8553% and 19.9555% respectively), indicating that changing the user trust from the global evaluation of the public on their recommendation ability to the local evaluation of the target user can improve the pertinence of neighbor screening, thereby improving the recommendation accuracy. Furthermore, CF-RT is lower than CF-UTC in MAE and its volatility (reduced by 0.1250% and 68.7500% respectively), indicating that selecting neighbors based on the recommendation trust proposed in this paper can obtain more stable and higher recommendation accuracy.

[0158] (3) In the strategy of integrating similarity and trust to select neighbors, the MAE and its fluctuation degree obtained by CF-TeCNTS are lower than those of CF-DNC (reduced by 7.5778% and 80.0000% respectively), indicating that selecting neighbors according to the time-sensitive neighbor trusted selection strategy proposed in this paper can obtain more stable and higher recommendation accuracy.

[0159] (4) The ability of CF-TeCNTS to respond sensitively to changes in user interests comes from CF-TSD, and the ability to stabilize recommendation accuracy comes from CF-RT.

[0160] Attack resistance assessment

[0161] In order to evaluate the anti-attack ability of the strategy proposed by the technical solution of the present invention, random attack data is injected into the ml-latest-small dataset. The number of neighbor users is selected as 40, the attack scale (the proportion of false users) is 1%, 3%, 5%, 10%, 25%, and the filling scale (the proportion of the number of ratings of each false user) is 1%, 2%, 5%, 10%, respectively. With the continuous increase of the attack scale and the filling scale, the recommended deviation MAE of the eight strategies is shown in Table 4.

[0162] Table 4 Comparison of recommendation deviation MAE of different strategies under random attack

[0163]

[0164] From Table 4 we can see that:

[0165] (1) Under the same filling scale (attack scale), as the attack scale (filling scale) increases, the recommended MAE of the eight strategies basically shows an upward trend, which indicates that the more attacks there are in the system, the worse the recommendation quality will be; and compared with the influence of the attack scale on the recommended MAE, the influence of the filling scale is greater.

[0166] (2) Among the strategies for selecting neighbors based on similarity, the recommended MAEs of the three strategies CF, CF-PSU and CF-TSD gradually decrease (the latter are 63.1350% and 3.0952% lower than the former on average, respectively); among the strategies for selecting neighbors based on trust, the recommended MAEs of the three strategies CF-ITC, CF-UTC and CF-RT gradually decrease (the latter are 72.0679% and 0.0135% lower than the former on average, respectively); among the strategies for selecting neighbors based on the integration of similarity and trust, the recommended MAE of CF-TeCNTS is 6.9955% lower than that of CF-DNC on average.

[0167] This indicates that the technical solution of the present invention has a lower recommendation deviation in the face of random attacks.

[0168] Table 5 gives the average prediction deviations of the eight strategies at the corresponding attack scale and filling scale.

[0169] Table 5 Comparison of prediction deviation APS of different strategies under random attack

[0170]

[0171] From Table 5 we can see that:

[0172] (1) Under the same filling scale (attack scale), as the attack scale (filling scale) increases, the prediction deviation APS of the eight strategies basically shows an upward trend, which indicates that the more attacks there are in the system, the worse the prediction deviation will be; moreover, compared with the influence of filling scale on prediction deviation, the influence of attack scale is greater.

[0173] (2) In the strategy of selecting neighbors based on similarity, the prediction deviation APS of the three strategies CF, CF-PSU and CF-TSD gradually decreases (the latter is 72.8650% and 63.4921% lower than the former on the mean, respectively); in the strategy of selecting neighbors based on trust, the prediction deviation APS of the three strategies CF-ITC, CF-UTC and CF-RT gradually decreases (the latter is 92.4772% and 1.7578% lower than the former on the mean, respectively); in the strategy of integrating similarity and trust to select neighbors, the prediction deviation APS of CF-TeCNTS is 11.4286% lower than that of CF-DNC on the mean.

[0174] This shows that the technical solution of the present invention has lower prediction deviation in the face of random attacks.

[0175] Attack User Detection Capability Assessment

[0176] Using the ml-latest-small dataset, the attack scale and fill scale are set to 25% and 10% respectively, and the number of neighbor users is 40. Based on the three indicators of recall, precision and harmonic mean, Table 6 gives the comparison of the ability of 8 recommended strategies to detect random attack users.

[0177] Table 6 Comparison of attack user detection capabilities of different strategies under random attacks

[0178]

[0179] As can be seen from Table 6, CF does not have the ability to detect attacking users, while CF-PSU and CF-TSD both detected different numbers of attacking users, which shows that in the neighbor screening based on interest similarity, user screening based on similarity threshold can significantly filter out attacking users. Compared with CF-PSU, CF-TSD identifies more attacking users by filtering out more users. Although the latter is lower in precision than the former, it is 35.9853% higher in recall than the former, which shows that the interest time similarity based neighbor screening in the present invention can exclude more attacking users.

[0180] Similar to the above, CF-ITC does not have the ability to detect attacking users, but CF-RT and CF-UTC have detected a certain number of attacking users, which shows that neighbor screening based on trust can effectively filter out attacking users. At the same time, the attacking user detection ability of CF-RT is not significantly different from that of CF-UTC in the random attack scenario. This is because the score fluctuation of the attacking user in the random attack scenario is not obvious, which makes the trust re-evaluation technology used by CF-RT unable to reflect its advantages. Compared with CF-DNC, CF-TeCNTS detects more attacking users by filtering out more users, and improves the recall rate of attacking users by 4.2842%, which shows that the time-sensitive neighbor trusted selection strategy proposed in this paper has a higher ability to detect attacking users.

[0181] In summary, the collaborative filtering recommendation method based on trusted selection of time-sensitive neighbors of the present invention fully considers the two factors of abnormal changes in user interests and fluctuations in recommendation ability in the process of screening target user neighbors, and achieves accurate recommendations to target users by adopting three recommendation strategies: time-sensitive neighbor screening, trusted neighbor selection, and target user score prediction, effectively alleviating the problems of low recommendation accuracy and poor anti-attack ability of traditional collaborative filtering recommendations in the case of sparse data.

Claims

1. A collaborative filtering recommendation method based on trusted selection of time-sensitive neighbors, characterized by: Set the sextet CFRS=<U,I,R,u a ,i b ,r ab >,U={u1,u2,…,u i ,…,u m } is composed of m users u i The user set composed of 1≤i≤m; I={i1,i2,…,i j ,…,i m } is composed of n items i j The set of items, 1≤j≤n; R={r ij } m*n is composed of m*n ratings r ij The scoring matrix composed of ij Indicates u i to i j If the rating Indicates u i to i j No rating yet; predict the target user u based on the rating matrix R a In the target project i b Rating ab The specific steps are as follows: Step S1: Time-sensitive neighbor screening First, the time-weight function w(t) is used to calculate the time-weight of the target user's neighbors on the common rated items. Then, the time-weighted interest similarity calculation model based on the Pearson correlation coefficient is used to calculate the time-weighted similarity between each neighbor and the target user. Finally, the time-weighted neighbors are dynamically selected for the target user based on the time-weighted similarity. The specific method is as follows: Step S1.1: Calculate the target user u by interest similarity a Its neighbor user u i ∈NS(u a )’s temporal similarity TSD(u a ,u i ); In formula (1), r ak and r ik u a and u i For Project I k ∈CRIS(u a ,u i ) rating; Indicates u a In its corresponding scoring item RIS(u a ), Indicates u i In its corresponding scoring item set RIS(u i ) is the mean score of all items in the ak and t ik Ratings r ak and r ik The generation time, w(t ak ) and w(t ik ) are r ak and r ik The time weight of CRIS(u a ,u i ) is the target user u a and its neighbor user u i The common scoring item set, and CRIS(u a ,u i )=RIS(u a )∩RIS(u i ); Step S1.2: Calculate the target user u a With the neighbor set NS(u a ) is: NS(u a ) is the target user u a The neighbor set of Step S1.3: for target user u a Filter its corresponding time-effective nearest neighbor set TeCNS(u a ); Step S2: Trusted Neighbor Selection First, the recommendation ability of the time-sensitive neighbors selected in step S1 is initially estimated using the item-level trust calculation model, and then the initial recommendation confidence estimate is re-estimated using the PID controller variant model. Finally, the trusted neighbors are dynamically selected for the target user based on the re-estimated recommendation confidence. The specific method is as follows: S2.

1. Based on the project-level trust calculation model, the time-sensitive neighbor set TeCNS(u a ) to make an initial estimate of the recommendation credibility; First, use the time-sensitive neighbor u i Information prediction target user u a For the jth item i j Rating Right now Then use the prediction score To estimate u a To u i Recommended Satisfaction SAT j (u a ,u i ),Right now: Among them, the constant ε is u a Defined recommended deviation values; Then use the recommendation satisfaction estimate u a To u i RRT j (u a ,u i ),Right now: S2.

2. Correct the original value of recommendation reliability RRT by re-evaluating the recommendation reliability j with u i The measurement deviation between the actual recommendation behavior and the specific recommendation confidence re-estimation calculation is as follows: In the above formula, RRT j , DRT j ,SDRT j and RT j They represent the original value, historical value, change rate, change trend and revaluation value of recommendation confidence respectively; α, β, γ and δ are the corresponding weights of each part; DRT j and SDRT j The calculation formulas of are shown in Equations 10 to 12, where ρ (0<ρ≤1) and θ (0<θ≤1) are the attention factors of historical recommendation credibility and its change rate, respectively; S2.3, Trusted Neighbor Screening: The target user u a The time-effective neighbor recommendation credibility set {RT(u a ,u i )|u i ∈TeCNS(u a )} are sorted from largest to smallest, and the time-effective neighbors u corresponding to the topK recommendation confidences are selected i As u a Trusted neighbors; Step S3: Rating prediction First, the recommendation weight of each trusted neighbor on the target project is calculated based on its recommendation credibility. Then, the scores of all trusted neighbors on the target project are used to predict the target user's score on the project, thereby completing the project recommendation to the target user. For target project i j , according to the time-sensitive neighbor set TCNS(u a ) in which the user j The score of a in i j Rating on 2. The collaborative filtering recommendation method based on time-sensitive nearest neighbor trusted selection according to claim 1 is characterized by: The time-effectiveness weight w(t ak ) and w(t ik ) is calculated by the time-effectiveness weight function w(t), and the expression of w(t) is: w(t)=Logistic(t)=(1+e -t ) -1 ;t∈[-1,1] (2)。 3. The collaborative filtering recommendation method based on time-sensitive nearest neighbor trusted selection according to claim 1 is characterized by: The values ​​of α, β, γ and δ are as follows: β / α is proportional to j-1, γ and δ follow equations 8 and 9; 4. A system according to the collaborative filtering recommendation method based on time-sensitive nearest neighbor trusted selection according to any one of claims 1 to 3, characterized in that: It includes a time-sensitive neighbor screening unit, a trusted neighbor selection unit, and a score prediction unit; The time-sensitive neighbor screening unit first uses the time-sensitive weight function w(t) to calculate the time-sensitive weight of the target user's neighbors on the common scoring items, and then calculates the time-sensitive similarity between each neighbor and the target user through the interest similarity calculation model based on the Pearson correlation coefficient that incorporates the time-sensitive weight. Finally, the time-sensitive neighbors are dynamically screened for the target user based on the time-sensitive similarity. The trusted neighbor selection unit first uses the item-level trust calculation model to make an initial recommendation confidence estimate for the recommendation capability of the time-sensitive neighbors selected in step S1, then re-estimates the initial recommendation confidence estimate using the PID controller variant model, and finally dynamically selects a trusted neighbor for the target user based on the re-estimated recommendation confidence estimate; The rating prediction unit first calculates the recommendation weight of each trusted neighbor on the target project based on the recommendation credibility of each trusted neighbor, and then uses the ratings of all trusted neighbors on the target project to predict the target user's rating of the project, thereby completing the project recommendation to the target user.

Citation Information

Patent Citations

  • Method for collaborative filtering recommendation based on interest changes and trust relations

    CN106570090A

  • A collaborative filtering recommendation method based on entropy similarity and dynamic trust

    CN109408734A