Collaborative filtering recommendation method and personalized content recommendation method, system, equipment and terminal thereof
By introducing time decay optimization methods into the collaborative filtering algorithm, penalties and rewards are imposed based on the interaction time between users and items, which solves the problems of insufficient recommendation accuracy and diversity in the existing technology and achieves more accurate and diversified recommendation effects. .
Patent Information
- Application Number
- CN202411673379.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-01-24
AI Technical Summary
The existing collaborative filtering algorithms have shortcomings in recommendation accuracy and diversity, especially in the failure to effectively solve the impact of the 'long-tail effect' on the recommendation effect, resulting in the over-recommended project and the 'unpopular project' being ignored. .
By introducing time attenuation optimization methods in the collaborative filter algorithm, establish a user project matrix, calculate the similarity between users, and use the Personal Rank algorithm to calculate the initial weight. Then, set the time attenuation function of the interaction time of the user and the project, punish the 'popular items', and reward the ‘unpopular project’ to optimize the scoring weight.
It improves the accuracy and diversity of the recommendation system, balances the recommendation of 'popular items' and 'unpopular items', and alleviates the negative impact of the 'long tail effect' on the recommendation effect.
Smart Images

Figure CN119357484A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to but is not limited to the technical field of collaborative filtering algorithms, and in particular relates to a collaborative filtering recommendation method based on time decay optimization and a personalized content recommendation method, system, device and terminal thereof. Background Art
[0002] With the development of information technology, network information data has shown explosive growth, and recommendation systems have become an indispensable part of modern business. Recommendation systems play a key role in improving user satisfaction, promoting product sales, and enhancing platform competitiveness. However, traditional recommendation systems face the problems of low accuracy and poor diversity.
[0003] To address the problem of low accuracy, existing collaborative filtering algorithms, such as collaborative filtering algorithms combined with neural network attention models, often use attention modules to extract information from content features, while focusing on the module to score the preferences of items without considering the impact of time on the recommendation score. This approach can achieve good performance when there are many features and a small amount of data. However, in real life, the available user information is not rich, for example, it is impossible to know the user's age, gender and other personal information. This missing information makes it impossible to perform the next step of analysis, resulting in the recommendation accuracy not meeting expectations.
[0004] To address the problem of poor diversity, existing collaborative filtering algorithms, such as the collaborative filtering algorithm that combines the user topic model with the item topic model, consider both item label information and user behavior data. This approach can achieve better performance when user behavior is ideal. However, in real life, users may have delayed orders, help with purchases, or complain after purchase. Such erroneous information causes the predicted results to differ from the actual situation, and the expected recommendation effect cannot be achieved.
[0005] In view of the above analysis, the technical problems that urgently need to be solved in the existing technology are: the existing improvements to the collaborative filtering algorithm consider combining different aspects such as user information, user behavior information and project attribute information, but there is no "long tail effect" on the recommendation effect. "Popular projects" appear more frequently in the public eye and may have higher scores. On the contrary, "unpopular projects" may have lower scores. Summary of the invention
[0006] In view of the problems existing in the prior art, the present invention provides a collaborative filtering recommendation method based on time decay optimization and its personalized content recommendation method, system, device and terminal, which improves the score without increasing the matrix dimension, rewards "unpopular projects" and punishes "hot projects", so as to alleviate the "long tail effect" and improve the recommendation accuracy.
[0007] The present invention is implemented as follows: a collaborative filtering recommendation method based on time decay optimization and a personalized content recommendation method thereof, comprising:
[0008] Step 1: Create a user-item matrix, record the user's ratings and interaction time for the interaction items, filter out the last interaction time between each user and all items, and calculate the similarity between users based on the person algorithm;
[0009] Step 2: Calculate the initial weight of user-item based on the Personal Rank algorithm;
[0010] Step 3: Set popular and unpopular projects according to the interaction time of user projects, and set the time decay function;
[0011] Step 4: Combine the time decay value as a penalty factor with the initial probability value to penalize popular items and reward unpopular items. The final score weight value is combined with the original household project score to replace the original household project score, and the project is recommended for the given user.
[0012] The working principle of the optimized collaborative filtering algorithm can be divided into four main steps:
[0013] First, a user-item matrix is established to record each user's rating and interaction time for each interactive item. By analyzing the user's interaction data, the last interaction time of each user on the item can be screened out to ensure the accuracy of the time data. In addition, the similarity between users is calculated based on the Person algorithm to further provide user preference information for the recommendation system. The calculation of similarity helps to discover user groups with similar interests and provide basic support for subsequent recommendations.
[0014] Next, the Personal Rank algorithm is used to calculate the initial weight of the user-item. The Personal Rank algorithm is a graph sorting algorithm that calculates weights through the two-way interaction between users and items, and regards it as the user's preference for the item. The weight value generated in this step preliminarily reflects the closeness of the relationship between the user and the item, which facilitates the precise adjustment of user preferences in the subsequent stage.
[0015] Then, in order to distinguish the user's preference for popular and unpopular items, the popular and unpopular items are set based on the user-item interaction time, and a time decay function is added. The time decay function is introduced to reduce the recommendation bias for popular items and reward the scores of unpopular items, thereby ensuring the diversity of recommendations. The time decay function decreases according to the time of user-item interaction, so that items that interact with the user earlier receive lower weight values, while unpopular items that interact with the user more recently receive higher weight values.
[0016] Finally, the time decay value is combined with the initial probability value as a penalty factor, and the user-item scores are re-weighed. By penalizing popular items and rewarding unpopular items, the final value of the user-item weight is optimized and combined with the original score to obtain an updated score matrix. This score matrix replaces the original score and is used to generate the final recommendation list, which improves the accuracy and diversity of the recommendation and ensures the balance of the algorithm between popular and unpopular items.
[0017] Further, step one specifically includes:
[0018] Step 1: Create a user-item matrix, which is expressed as:
[0019]
[0020] Where C is the user-item matrix, i is the list of ratings and interaction times between user u and item v. i is specifically expressed as [rating time], where rating is the rating of item v by user u, and time is the interaction time of item v by user u.
[0021] Step 2: Filter out the last interaction time between user u and all interaction items v for the user-item matrix, which is expressed as: t=(u maxtime), where t represents the last interaction time maxtime of user u and all interaction items.
[0022] Step 3: Calculate user similarity based on the person algorithm, which is expressed as:
[0023]
[0024] Among them, M ij represents the set of items that have interacted with both user i and user j, R ik represents the rating of user i on item k, represents the average rating of the items used by user i, R jk represents the rating of user j on item k, represents the average rating of the items used by user j.
[0025] Step 4: For each user, select the user with the highest similarity as his similar user.
[0026] Further, step 2 specifically includes:
[0027] The initial weight of user-item is calculated based on the Personal Rank algorithm, which is expressed as:
[0028]
[0029] Among them, PR(i) represents the access probability of item i, out(i) represents the out-degree of item node i, and α represents the probability of continued access.
[0030] Further, step three specifically includes:
[0031] The rules for setting hot and unpopular items are as follows: the interaction time between the user and the item is compared with the last interaction time between the user and all items. If the time span is large, the item is considered to be a relatively unpopular item for the user; on the contrary, if the time span is small, the item is considered to be a relatively hot item for the user. The specific degree of hotness and coldness is represented by the time decay value, which is expressed as:
[0032]
[0033] t=t umax -t u,i
[0034] Among them, λ represents the time decay rate, which can be adjusted dynamically; t represents the time span of the user's interaction with the project; t umax Indicates the most recent rating time of user u; t u,i Indicates the time when user u rated item i. f(t) is the time correction value, and its value range is [12,1).
[0035] Further, step four specifically includes:
[0036] The time decay value is used as a penalty factor and combined with the initial probability value to obtain the final scoring weight value, which is combined with the original household item scoring value and replaces the original household item scoring value. Specifically, it is expressed as:
[0037] r u,i =∑rating(v,i)*sim(u,v)*f(t)*PR(j)
[0038] Among them, r u,i represents the predicted rating of user u for item i, rating(v,i) represents the actual rating of user v for item i, sim(u,v) represents the similarity between user u and user v, f(t) represents the time-corrected value of user u for item i, and PR(j) represents the initial PersonalRank value of user u for item i.
[0039] Another object of the present invention is to provide a method for implementing the collaborative filtering recommendation method based on time decay optimization and its use in a personalized content recommendation method, comprising:
[0040] User similarity calculation module: establishes a user-item matrix, records the user's ratings and interaction time for the interaction items, and filters out the last interaction time between each user and all items, and calculates the similarity between users based on the person algorithm;
[0041] Initial weight calculation module: calculates the initial weight of user-item based on the PersonalRank algorithm;
[0042] Time decay function design module: Set popular and unpopular projects according to the interaction time of user projects, and set the time decay function;
[0043] Project recommendation module: The time decay value is combined with the initial probability value as a penalty factor to penalize popular projects and reward unpopular projects. The final score weight value is combined with the original household project score to replace the original household project score, and the project is recommended for a given user.
[0044] Another object of the present invention is to provide a computer device, the computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the collaborative filtering recommendation method based on time decay optimization and its steps in the personalized content recommendation method.
[0045] Another object of the present invention is to provide a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the collaborative filtering recommendation method based on time decay optimization and its steps in the personalized content recommendation method.
[0046] Another object of the present invention is to provide an information data processing terminal, which includes the collaborative filtering recommendation method based on time decay optimization and its use in a personalized content recommendation system.
[0047] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:
[0048] First, due to the poor accuracy and diversity of traditional collaborative filtering algorithms, the scores cannot accurately reflect the user's preference for the project in the actual scoring process. The present invention improves the traditional scoring rules and plays a positive role in improving the performance of the collaborative filtering algorithm. Different from the improved similarity calculation method in the collaborative filtering algorithm, the present invention starts from the user's score for the project, calculates the user's initial probability of the project with the Personal Rank algorithm to represent the degree of popularity of the project to the user, and sets the time decay value to make the over-cold and over-hot projects return to normal rating values. Using the time decay value to represent the popularity of the project takes into account the impact of the time factor on the score and improves the accuracy of the score; on the other hand, for different users, different projects have different popularity, which is more in line with reality, alleviates the impact of the long tail effect, and improves the accuracy of the recommendation.
[0049] Second, as auxiliary evidence of the inventiveness of the claims of the present invention, it is also reflected in the fact that the technical solution of the present invention solves a technical problem that people have always been eager to solve but have never been successful:
[0050] Since the coverage and recall rates of traditional collaborative filtering recommendation algorithms are low, the recommended items in actual recommendations only account for a small part of all items, and other items cannot be fully utilized, resulting in poor performance in practical applications. Different from traditional collaborative filtering algorithms, the present invention starts from the user's rating of the item, and uses the Personal Rank algorithm to calculate the user's initial probability of the item to represent the hotness or coldness of the item to the user, and sets the time decay value to make the over-cold items and over-hot items return to normal ratings. Using the time decay value to represent the hotness or coldness of the item is in line with the current status of recommendations in real life. The longer the interaction time span between the recommended item and the recommending user, the less the recommended item is needed by the recommending user, and the recommendation weight is reduced, and vice versa. In this way, items that have not been used in traditional recommendation methods can be utilized, the diversity of recommended items can be improved, and it is more in line with practical applications.
[0051] Third, the optimization-based collaborative filtering algorithm proposed in this invention aims to solve several major technical problems in traditional recommendation systems, especially the deficiencies in user preference modeling and item recommendation accuracy, and achieve significant technical progress. The following is an explanation from the perspective of innovation and optimization of parameters, algorithms and mathematical models.
[0052] 1. Solution of technical problems
[0053] (1) Regarding the long-tail effect of project recommendations:
[0054] Traditional collaborative filtering methods have the difficulty of recommending too few types of items, especially when there are too many types of items. To solve this problem, the present invention introduces a time decay factor and a method for classifying the hotness and coldness of items, which determines the hotness and coldness of items based on the user's interaction time with the items and sets a time decay function. This improvement reduces the influence of popular item types by giving unpopular items a higher recommendation weight, thereby making unpopular items better presented in the recommendation.
[0055] (2) Scoring weights are not dynamic enough:
[0056] Traditional collaborative filtering algorithms are often based on fixed scores and do not consider the dynamic changes of user preferences. The present invention enables dynamic adjustment of score weights by introducing time decay values (penalty factors). For items with earlier interaction times, the time decay function is used to reduce the score, while unpopular items are given a moderate score gain. This method increases the flexibility of the recommendation system and better captures the changing trends of user preferences.
[0057] 2. Parameter design and algorithm innovation
[0058] Compared with the traditional collaborative filtering algorithm, the present invention has the following two innovative points in improving the recommended project scores to solve the long-tail effect problem of project recommendation:
[0059] (1) Time decay factor:
[0060] The innovative application of the time decay factor in this invention solves the problem of dynamic rating. Through parameters such as the time decay rate, the time factor is embedded in the user rating information, and the weight penalty and reward adjustment are performed on popular items and unpopular items respectively. User rating behavior will change over time, and the time decay factor dynamically adjusts the rating value according to the popularity of the item, making the recommendation results more dynamic and flexible.
[0061] (2) Personal Rank initial weight:
[0062] The present invention introduces the Personal Rank algorithm to calculate the initial weight of the user-item, and determines the importance of each item through the access probability and node out-degree. This algorithm structure enables the recommendation model to judge the hot and cold items, and can more accurately improve the score value with the time decay value, providing a stable foundation for subsequent score optimization.
[0063] 3. Advances and advantages of mathematical models
[0064] (1) Improvement of time decay function:
[0065] The time decay function enables the model to set unpopular and popular items based on the user's interaction time with the items, thereby generating more personalized recommendations. By adjusting the decay rate and time span, the model can dynamically respond to changes in user preferences and set more accurate scoring weights for each item.
[0066] (2) Composite scoring mechanism:
[0067] The present invention innovatively combines user rating values, similarity values, time decay values, and initial Personal Rank values, so that the model can obtain the final rating weight value through multi-dimensional information fusion. The final rating weight value is calculated by the four factors of actual rating, similarity, time decay, and initial weight. The generated rating result can not only meet the personalized needs of users, but also has stronger robustness and anti-interference ability.
[0068] 4. Significant technological progress
[0069] (1) Improved recommendation accuracy and coverage:
[0070] By rewarding unpopular items and punishing popular items, the present invention overcomes the problem of traditional algorithms favoring popular items, making unpopular items more prominent in recommendations. Experimental results show that the optimized collaborative filtering algorithm has significantly improved recommendation coverage and recommendation accuracy.
[0071] (2) Enhanced generalization ability of the model:
[0072] The Personal Rank algorithm, when used in conjunction with the time decay value, significantly enhances the generalization ability of the model and makes it suitable for more types of recommendation systems and scenarios.
[0073] (3) Improved scalability and computational efficiency of recommendation systems:
[0074] The present invention adopts a multi-level integrated algorithm structure, which enables the calculation to be performed in parallel at different levels, thus improving the calculation efficiency of the system. At the same time, the designed time decay function and scoring mechanism greatly reduce the redundancy of the algorithm, making the recommendation system more scalable.
[0075] Fourth, the present invention proposes a collaborative filtering recommendation method based on time decay optimization, which significantly improves the accuracy and flexibility of the recommendation system by incorporating the interaction time between users and items into the scoring and weight calculation. Traditional collaborative filtering algorithms mainly make recommendations based on user scores or behavioral similarities, ignoring the timeliness of user interests and the differentiated treatment of popular and unpopular items. This defect often leads to insufficient personalization of recommendation results and the inability to effectively capture the dynamic changes in user interests, especially in the repeated recommendation of popular items, where there is a large deviation.
[0076] The present invention adopts a time decay function, taking the interaction time of the project as a penalty factor or reward factor, reasonably reducing the weight of popular projects and increasing the recommendation probability of unpopular projects. This method can dynamically adjust the recommendation results according to the user's interaction time span for different projects, so as to be closer to the user's interest preferences. At the same time, the present invention incorporates the time factor into the similarity calculation, and effectively avoids the problem that the traditional method cannot capture the changes of user preferences over time by relying solely on static similarity through the Personal Rank algorithm in combination with the calculation of the similarity between users.
[0077] In industrial applications, the present invention significantly improves the user experience of the recommendation system in application scenarios such as e-commerce, streaming media, and social platforms. Through time decay and personalized unpopular project reward mechanism, this method can more accurately meet the personalized needs of users, avoid the simplification of recommendation results, and help improve the user retention rate and conversion rate of the platform. Therefore, compared with the prior art, the present invention has significant technical progress in the personalization and real-time performance of the recommendation system. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 The collaborative filtering recommendation method based on time decay optimization provided by the embodiment of the present invention and the steps of the personalized content recommendation method are shown in FIG.
[0079] Figure 2 It is a schematic diagram of a collaborative filtering recommendation method based on time decay optimization and Personal Rank provided by an embodiment of the present invention and a process flow of the personalized content recommendation method;
[0080] Figure 3 It is a collaborative filtering recommendation method based on time decay optimization provided by an embodiment of the present invention and a structural diagram of the personalized content recommendation system.
[0081] Figure 4-6 It is relevant evidence of the technical effects obtained by the embodiments of the present invention. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0083] See also Figure 1 As shown, the method step diagram of the embodiment of the present invention includes the following steps:
[0084] S101: Establish a user-project matrix and filter out the last interaction time between the user and all projects;
[0085] S102: Calculate the initial weight of the user project based on the Personal Rank algorithm;
[0086] S103: Setting a time decay function and calculating a time decay value;
[0087] S104: The time decay value is used as a penalty factor and combined with the initial weight to obtain a final weight value, and the final weight value is combined with the original user-item score and replaces the original user-item score value.
[0088] The following is combined with Figure 2 The application principle of the present invention is further described.
[0089] Figure 2 For the specific implementation process, the present invention provides a collaborative filtering recommendation method based on Personal Rank and time decay optimization and its personalized content recommendation method, which includes the following steps:
[0090] 1. Establish a user-item matrix, record the user's rating and interaction time for the interaction items, and filter out the last interaction time between each user and all items. At the same time, calculate the similarity between users based on the person algorithm;
[0091] 1.1 Establish a user-item matrix, which is expressed as:
[0092]
[0093] Where C is the user-item matrix, i is the list of ratings and interaction times between user u and item v. i is specifically expressed as [rating time], where rating is the rating of item v by user u, and time is the interaction time of item v by user u.
[0094] 1.2 Filter out the last interaction time between user u and all interaction items v from the user-item matrix, which is expressed as: t = (u maxtime), where t represents the last interaction time maxtime between user u and all interaction items;
[0095] 1.3 Calculate user similarity based on the person algorithm, which is expressed as:
[0096]
[0097] Among them, M ij represents the set of items that have interacted with both user i and user j, R ik represents the rating of item k by user i, represents the average rating of the items used by user i, R jk represents the rating of user j on item k, represents the average rating of the items used by user j;
[0098] 1.4 For each user, select the user with the highest similarity as his similar user.
[0099] 2 Calculate the initial weight of user-item based on the Personal Rank algorithm, which is expressed as:
[0100]
[0101] Among them, PR(i) represents the access probability of item i, out(i) represents the out-degree of item node i, and α represents the probability of continued access.
[0102] 3. Set the rules for hot and unpopular items as follows: compare the interaction time between the user and the item with the last interaction time between the user and all items. If the time span is large, the item is considered to be a relatively unpopular item for the user; on the contrary, if the time span is small, the item is considered to be a relatively hot item for the user. The specific degree of hotness and coldness is represented by the time decay value, which is expressed as:
[0103]
[0104] t=t umax -t u,i
[0105] Among them, λ represents the time decay rate, which can be adjusted dynamically; t represents the time span of the user's interaction with the project; t umax Indicates the most recent rating time of user u; t u,i Indicates the time when user u rated item i. f(t) is the time correction value, and its value range is [12,1).
[0106] 4. Combine the time decay value as a penalty factor with the initial probability value to obtain the final scoring weight value, which is combined with the original household item scoring value and replaces the original household item scoring value. Specifically, it is expressed as:
[0107] r u,i =∑rating(v,i)*sim(u,v)*f(t)*PR(j)
[0108] Among them, r u,i represents the predicted rating of user u for item i, rating(v,i) represents the actual rating of user v for item i, sim(u,v) represents the similarity between user u and user v, f(t) represents the time-corrected value of user u for item i, and PR(j) represents the initial Personal Rank value of user u for item i.
[0109] Select the top n items with the highest scores to form a recommendation list.
[0110] like Figure 3 As shown, the collaborative filtering recommendation method based on time decay optimization and its use in a personalized content recommendation system provided by an embodiment of the present invention include:
[0111] User similarity calculation module: establishes a user-item matrix, records the user's ratings and interaction time for the interaction items, and filters out the last interaction time between each user and all items, and calculates the similarity between users based on the person algorithm;
[0112] Initial weight calculation module: calculates the initial weight of user-item based on Personal Rank algorithm;
[0113] Time decay function design module: Set popular and unpopular projects according to the interaction time of user projects, and set the time decay function;
[0114] Project recommendation module: The time decay value is combined with the initial probability value as a penalty factor to penalize popular projects and reward unpopular projects. The final score weight value is combined with the original household project score to replace the original household project score, and the project is recommended for a given user.
[0115] An application embodiment of the present invention provides a computer device, which includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor executes a collaborative filtering recommendation method based on time decay optimization and its steps in a personalized content recommendation method.
[0116] An application embodiment of the present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes a collaborative filtering recommendation method based on time decay optimization and steps thereof in a personalized content recommendation method.
[0117] The application embodiment of the present invention provides an information data processing terminal, which includes a collaborative filtering recommendation method based on time decay optimization and a personalized content recommendation system thereof.
[0118] 1. Specific application fields or related products of the present invention.
[0119] The present invention can play an important role in multiple fields. In e-commerce platforms such as Taobao, users are helped to find products of interest by analyzing their browsing and purchasing history. In streaming services such as Netflix and Spotify, algorithms accurately recommend movies, TV shows and music based on users' viewing and listening habits. Social media such as Xiaohongshu also use recommendation algorithms to promote friend-related content and advertising based on users' interests and interaction history. In online education and news aggregation platforms, recommendation systems provide personalized courses and articles based on users' learning materials and reading preferences. Industries such as tourism, catering, recruitment and financial services also use recommendation algorithms to improve user experience and help them find products or services that meet their personal needs. Through technologies such as good filtering, content-based recommendations and hybrid recommendations, these algorithms can effectively analyze user behavior data and create smarter recommendation systems.
[0120] 2. Relevant evidence of the technical effects obtained by the embodiments of the present invention.
[0121] The present invention is tested on the Movielens 100k dataset, which contains the ratings and rating time information of 943 users on 1682 movies, with a rating of 1-5 points, 1 point is the lowest, and 5 points is the highest. The experimental environment is a PC, Windows 10 operating environment, processor Intel (R) Core (TM) i5-8300H CPU @ 2.30GHz 2.30GHz, and programming language Pyhton3.6.
[0122] Combine the following Figure 4-6 The test of the present invention is further described.
[0123] Figure 4 This is the prediction of the accuracy of the present invention and the traditional item-based collaborative filtering algorithm and FSTS algorithm on the Movielens100k data set. The higher the accuracy, that is, the more items recommended to the user are guessed in the user's favorite list, the better the recommendation effect. From the overall effect of the image, before K=30, the present invention is better than the other two algorithms. When K=5, the accuracy of the present invention is improved by 80% compared with the FSTS algorithm. When K=25, the accuracy of the present invention is improved by 5.6% compared with the FSTS algorithm.
[0124] Figure 5The prediction of recommendation coverage rate of the present invention and the traditional collaborative filtering algorithm based on items and the FSTS algorithm on the Movielens100k dataset. The higher the coverage rate, that is, the more types of items recommended to users, the better the recommendation effect. From the overall effect of the image, the prediction of coverage rate of the present invention is better than that of the FSTS algorithm. When K=20, the coverage rate of the present invention is improved by 60% compared with that of the FSTS algorithm. Even when K=5, the coverage rate of the present invention is improved by 16.85% compared with that of the FSTS algorithm.
[0125] Figure 6 The prediction of recommendation popularity of the present invention and the traditional collaborative filtering algorithm based on items and the FSTS algorithm on the Movielens100k dataset. The lower the popularity, that is, the more items at the tail of the long tail effect among the items recommended to the user, the better the recommendation effect. From the overall effect of the image, the prediction of popularity of the present invention is better than that of the FSTS algorithm. When K=40, the recommendation popularity of the present invention is improved by 17.23% compared with the FSTS algorithm. When K=25, the recommendation popularity of the present invention is improved by 22% compared with the FSTS algorithm.
[0126] Among them, the accuracy Precision can describe the proportion of items recommended to users that users like. Its specific representation is as follows, where R(u) represents the items recommended by user u, and T(u) represents the set of items that user u likes in the test set.
[0127]
[0128] Coverage can describe the ratio of the number of recommended items to the number of all items, and its specific expression is as follows: R(u) represents the number of recommended items, and I represents the total number of items.
[0129]
[0130] Popularity can describe the popularity of the recommended items in the recommendation system, that is, the degree of "long tail". Its specific representation is as follows, where item(i) represents the number of times item i is recommended. The lower the value of this indicator, the smaller the long tail effect and the better the recommendation effect.
[0131] Popularity=∑ m∈M log 2 (1+item(i))
[0132] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0133] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.
Claims
1. A collaborative filtering recommendation method based on time decay optimization and its personalized content recommendation method, characterized in that: include: Step 1: Create a user-item matrix, record the user's ratings and interaction time for the interaction items, filter out the last interaction time between each user and all items, and calculate the similarity between users based on the person algorithm; Step 2: Calculate the initial weight of user-item based on the Personal Rank algorithm; Step 3: Set popular and unpopular projects according to the interaction time of user projects, and set the time decay function; Step 4: Combine the time decay value as a penalty factor with the initial probability value to penalize popular items and reward unpopular items. The final score weight value is combined with the original household project score to replace the original household project score, and the project is recommended for the given user.
2. The collaborative filtering recommendation method based on time decay optimization and the personalized content recommendation method thereof as claimed in claim 1, characterized in that: Step 1 specifically includes: Step 1: Create a user-item matrix, which is expressed as: Where C is the user-item matrix, i is the list of ratings and interaction times between user u and item v; i is specifically expressed as [rating time], where rating is the rating of item v by user u, and time is the interaction time of item v by user u; Step 2: Filter out the last interaction time between user u and all interaction items v from the user-item matrix, which is expressed as: t = (u maxtime), where t represents the last interaction time maxtime between user u and all interaction items; Step 3: Calculate user similarity based on the person algorithm, which is expressed as: Among them, M ij represents the set of items that have interacted with both user i and user j, R ik represents the rating of item k by user i, represents the average rating of the items used by user i, R jk represents the rating of user j on item k, represents the average rating of the items used by user j; Step 4: For each user, select the user with the highest similarity as his similar user.
3. The collaborative filtering recommendation method based on time decay optimization and the personalized content recommendation method thereof as claimed in claim 1, characterized in that: Step 2 specifically includes: The initial weight of user-item is calculated based on the Personal Rank algorithm, which is expressed as: Among them, PR(i) represents the access probability of item i, out(i) represents the out-degree of item node i, and α represents the probability of continued access.
4. The collaborative filtering recommendation method based on time decay optimization and the personalized content recommendation method thereof as claimed in claim 1, characterized in that: Step three specifically includes: The rules for setting hot and unpopular items are as follows: the interaction time between the user and the item is compared with the last interaction time between the user and all items. If the time span is large, the item is considered to be a relatively unpopular item for the user; on the contrary, if the time span is small, the item is considered to be a relatively hot item for the user. The specific degree of hotness and coldness is represented by the time decay value, which is expressed as: Among them, λ represents the time decay rate, which can be adjusted dynamically; t represents the time span of the user's interaction with the project; t umax Indicates the most recent rating time of user u; t u,i represents the time when user u rated item i; f(t) is the time correction value, and its value range is [12,1).
5. The collaborative filtering recommendation method based on time decay optimization and the personalized content recommendation method thereof as claimed in claim 1, characterized in that: Step 4 specifically includes: The time decay value is used as a penalty factor and combined with the initial probability value to obtain the final scoring weight value, which is combined with the original household item scoring value and replaces the original household item scoring value. Specifically, it is expressed as: r u,i =∑rating(v,i)*sim(u,v)*f(t)*PR(j) Among them, r u,i represents the predicted rating of user u for item i, rating(v,i) represents the actual rating of user v for item i, sim(u,v) represents the similarity between user u and user v, f(t) represents the time-corrected value of user u for item i, and PR(j) represents the initial PersonalRank value of user u for item i.
6. A collaborative filtering recommendation method based on time decay optimization for implementing the recommendation method according to any one of claims 1 to 5 and its use in a personalized content recommendation system, characterized in that: include: User similarity calculation module: establishes a user-item matrix, records the user's ratings and interaction time for the interaction items, and filters out the last interaction time between each user and all items, and calculates the similarity between users based on the person algorithm; Initial weight calculation module: calculates the initial weight of user-item based on the PersonalRank algorithm; Time decay function design module: Set popular and unpopular projects according to the interaction time of user projects, and set the time decay function; Project recommendation module: The time decay value is combined with the initial probability value as a penalty factor to penalize popular projects and reward unpopular projects. The final score weight value is combined with the original household project score to replace the original household project score, and the project is recommended for a given user.
7. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the collaborative filtering recommendation method based on time decay optimization as described in any one of claims 1 to 5 and its steps in the personalized content recommendation method.
8. A computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to execute the collaborative filtering recommendation method based on time decay optimization as described in any one of claims 1 to 5 and the steps thereof in the personalized content recommendation method.
9. An information data processing terminal, comprising the collaborative filtering recommendation method based on time decay optimization as claimed in claim 6 and its use in a personalized content recommendation system.
Citation Information
Cited By
Training data generation method, training method, device, equipment, medium and program product
CN120408201A