Article recommendation method

By introducing the chameleon group algorithm and collaborative filtering recommendation algorithm with reverse learning strategy for lens imaging, the optimal number of recommendations is determined, which solves the problem of insufficient number of items recommended in the collaborative filtering method, and improves recommendation accuracy and system stability.

CN119271902APending Publication Date: 2025-01-07WUHU CONCH PROFILES AND SCIENCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411293456.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing collaborative filtering recommendation methods have insufficient requirements in terms of the number of items recommended, and fail to effectively consider the impact of the number of recommendations on recommendation accuracy, resulting in a decline in user experience when the number of items recommended is too high or too small.

Method used

The chameleon group algorithm that introduces the lens imaging reverse learning strategy is adopted. By calculating the optimal number of m recommended for the target user, and combining the user's collaborative filtering recommendation algorithm, the first m items with the highest score are determined for recommendation, improving the recommendation accuracy.

Benefits of technology

By optimizing the number of recommendations, the user's item recommendation accuracy is improved, the stability and efficiency of the recommendation system are improved, and the advantages of high recommendation accuracy, fast convergence speed and good stability are shown.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271902A_ABST
    Figure CN119271902A_ABST
Patent Text Reader

Abstract

The invention discloses an article recommendation method. The method comprises the following steps: S1, obtaining a current to-be-recommended article and a target user of the to-be-recommended article; s2, obtaining an optimal recommendation number m of target users based on a chameleon group algorithm introducing a lens imaging reverse learning strategy; and S3, based on a collaborative filtering recommendation algorithm of the user, determining scores of the target user for various items, and recommending the first m items with the highest scores to the target user. According to the method, the article recommendation quantity with high recommendation accuracy is found out according to the article recommendation quantity searched by the chameleon group algorithm introducing the lens imaging reverse learning strategy, and then the articles with the article recommendation quantity with high prediction scores are selected and recommended to the user based on the collaborative filtering algorithm of the user, so that the article recommendation accuracy of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of personalized recommendation, and more specifically, the present invention relates to an item recommendation method. Background Art

[0002] In modern society, with the development of information technology and the Internet, recommendation systems have been widely used in various fields. Whether it is e-commerce platforms, social media, music and movie recommendations, or online learning platforms, recommendation systems provide users with personalized services and information, greatly improving user experience.

[0003] With the rapid increase in the number of users and recommended items, recommendation systems are facing more and more challenges. Among them, how to optimize the number of recommended items to meet the personalized needs of users has become a key issue in the research of recommendation systems.

[0004] Most collaborative filtering recommendation methods choose to recommend a specified number of the highest-rated items to users, without considering the impact of the number of recommended items on the accuracy of the recommendation. Too many or too few recommended items will affect the accuracy of the user's item recommendations. Summary of the invention

[0005] The present invention provides an item recommendation method, aiming to improve the above-mentioned problem.

[0006] The present invention is implemented as follows: a method for recommending items, the method comprising the following steps:

[0007] S1. Obtain the current items to be recommended and the target users of the items to be recommended;

[0008] S2, based on the chameleon swarm algorithm that introduces the lens imaging reverse learning strategy, obtain the optimal number of recommendations m for the target user;

[0009] S3. The user-based collaborative filtering recommendation algorithm determines the target user's ratings for each type of item, and recommends the top m items with the highest ratings to the target user.

[0010] Furthermore, the method for determining the optimal number of recommendations m for the target user is as follows:

[0011] S21, encoding the recommended number into the initial position of each chameleon individual;

[0012] S22, updating the individual positions of chameleons, and calculating the fitness value of each chameleon, where the fitness value is the recommendation accuracy corresponding to the position of the chameleon;

[0013] S23, using the lens imaging reverse learning strategy to generate the corresponding reverse individual for the chameleon individual with the best fitness in the current chameleon population, and evaluating whether to retain the generated reverse individual based on the recommendation accuracy;

[0014] S24, updating the local optimal position of each chameleon;

[0015] S25, detecting whether the current number of iterations reaches the maximum number of iterations. If the detection result is yes, taking the position of the individual chameleon with the best fitness in the current chameleon population as the number of items to be recommended. If the detection result is no, executing step S22.

[0016] Furthermore, the reverse position of the chameleon individual j with the best fitness in the chameleon population in the tth iteration is The calculation formula is as follows:

[0017]

[0018] in, represents the number of recommendations to be made by the jth chameleon at the end of the hunting phase in the tth iteration, express The number of reverse recommendations obtained through the lens imaging reverse strategy, up j and low j represents the maximum and minimum boundaries of the number of recommendations contained in the j-th chameleon; k represents the scaling factor.

[0019] Furthermore, the calculation formula of the scaling factor k is as follows:

[0020] k=(1+(t / T) 0.5 ) 10 ;

[0021] Among them, t is the current iteration number and T is the maximum iteration number.

[0022] Furthermore, the calculation formula of the recommendation accuracy Precision is as follows:

[0023]

[0024] Among them, R(u) represents the set of recommended items for target user u formed by the user-based collaborative filtering algorithm, and T(u) represents the set of items liked by target user u in the test set.

[0025] Furthermore, the process of obtaining the recommended item set R(u) is as follows:

[0026] Get the target user u's ratings for each item, and put the top m items with the highest ratings into the recommended item set R(u), where the target user u's rating for item s The formula is as follows:

[0027]

[0028] Where N(s) represents the set of users who have rated item s in the training set or test set, r vs represents the rating of user v on item s, and Sim(u,v) represents the cosine similarity between target user u and user v.

[0029] Furthermore, the calculation formula of the cosine similarity Sim(u,v) between user u and user v is as follows:

[0030]

[0031] Among them, I uv I represents the set of items rated by target user u and user v. u and I v represents the set of items that the target user u and user v have historically given positive feedback on, r ui represents the rating given by target user u to item i, r uk 、r vk They represent the ratings given by target user u and user v to item k, r vj represents the rating given by user v to item j.

[0032] Furthermore, the calculation formula of the initial position of the chameleon individual is as follows:

[0033]

[0034] in, is the initial number of recommendations contained in the jth chameleon, up j and low j represents the maximum and minimum bounds of the number of recommendations contained in the j-th chameleon, and r is a random number between 0 and 1.

[0035] Furthermore, the historical ratings of the users on the items are taken as samples, the constructed samples are put into the sample set, and the samples in the sample set are divided into a training set and a test set according to a set ratio.

[0036] The chameleon swarm algorithm that introduces the lens imaging reverse learning strategy searches for the number of recommended items, finds the number of recommended items with high recommendation accuracy, and then selects items with high predicted scores based on the user's collaborative filtering algorithm and recommends them to the user, thereby improving the user's item recommendation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A flowchart of an item recommendation method provided by an embodiment of the present invention;

[0038] Figure 2 Comparison diagram of fitness value convergence curves of the IIOL-CSA-CF method and the CF method provided in an embodiment of the present invention on three data sets, where (a) is the MovieLens data set, (b) is the Book Crossing data set, and (c) is the Lastfm data set. DETAILED DESCRIPTION

[0039] The specific implementation modes of the present invention are further explained in detail below by describing the embodiments with reference to the accompanying drawings, so as to help those skilled in the art to have a more complete, accurate and in-depth understanding of the inventive concept and technical solution of the present invention.

[0040] Figure 1 A flowchart of an item recommendation method provided by an embodiment of the present invention, the method comprising the following steps:

[0041] S1. Obtain the current items to be recommended and the target users of the items to be recommended;

[0042] The historical ratings of users on items are taken as samples, the constructed samples are put into the sample set, and the samples in the sample set are divided into training set and test set according to the set ratio;

[0043] S2, based on the chameleon swarm algorithm that introduces the lens imaging reverse learning strategy, obtain the optimal number of recommendations m for the target user;

[0044] S3. The user-based collaborative filtering recommendation algorithm predicts the target user's rating of each item and recommends the top m items with the highest ratings to the target user.

[0045] At the end of the hunting phase of the chameleon swarm algorithm, the present invention uses the lens imaging reverse learning strategy to generate the number of reverse individuals to be recommended for the number of the best chameleon individuals in the current population, and determines whether to retain the number of reverse individuals to be recommended. This improves the population diversity of the chameleon swarm algorithm, compensates for the impact of random population positions on the exploration performance of the chameleon swarm algorithm to a certain extent, and improves the exploration ability of the algorithm. At the same time, combined with the user-based collaborative filtering algorithm, an optimal chameleon is finally evolved, and the position of the chameleon represents the number of items to be recommended. The chameleon swarm optimization algorithm based on lens imaging reverse learning is referred to as the IIOL-CSA method, and the method of using IIOL-CSA to find the optimal number of items to be recommended in the user-based collaborative filtering recommendation algorithm is referred to as the IIOL-CSA-CF method. The IIOL-CSA-CF method shows the advantages of high recommendation accuracy, fast convergence speed, and good stability when performing recommendation tasks. The process of the optimal recommendation number of target users provided by the present invention is as follows:

[0046] S21, encoding the recommended number into the initial position of each chameleon individual;

[0047] S22, using hunting strategies to update individual chameleon positions;

[0048] S23, calculating the recommendation accuracy based on the training set, and using the recommendation accuracy to correspond to the fitness value of the chameleon to evaluate the quality of each chameleon;

[0049] S24, using the lens imaging reverse learning strategy to generate the corresponding reverse individual for the best chameleon individual in the current chameleon population, and evaluating whether to retain the generated reverse individual based on the recommendation accuracy;

[0050] S25, updating the locally optimal recommended number of each chameleon and the globally optimal recommended number of the entire chameleon population - when the fitness value of the current position of the chameleon individual is greater than the fitness value corresponding to the current local optimal position, the position of the chameleon remains unchanged, and the fitness value corresponding to the current local optimal position is updated to the fitness value of the current position; otherwise, the position of the chameleon is updated to the current local optimal position;

[0051] S26. Check whether the current number of iterations reaches the maximum number of iterations. If the detection result is yes, the position of the chameleon individual with the best fitness in the current population (global optimum) is used as the number of items to be recommended. If the detection result is no, execute step S22.

[0052] (I) Chameleon Swarm Algorithm Introducing the Lens Imaging Reverse Learning Strategy

[0053] The chameleon swarm algorithm mainly simulates the foraging and hunting behavior of chameleons in desert and jungle environments. The chameleon population can converge to the optimal solution to the problem after three stages. The three stages are divided into the prey searching stage, the eye rotation stage and the prey hunting stage.

[0054] In the embodiment of the present invention, initializing the number of items to be recommended at individual positions of the chameleon population includes:

[0055]

[0056] in, is the initial number of recommendations contained in the jth chameleon, up j and low j represents the maximum and minimum bounds of the number of recommendations contained in the j-th chameleon, and r is a random number between 0 and 1.

[0057] During the prey search phase, when searching for the recommended quantity to be found, the recommended quantity contained in the chameleon individual can be updated using the following formula:

[0058]

[0059] in, represents the position of the jth chameleon before searching for prey at the tth iteration, represents the location of the jth chameleon after searching for prey at the tth iteration; Gb represents the optimal number of recommendations for the jth chameleon at the tth iteration; t represents the number of recommended individuals in the chameleon group up to the tth iteration; up j and low j represents the maximum and minimum bounds of the number of recommendations contained in the jth chameleon; p1 and p2 are positive numbers that control the exploration ability of the algorithm, r i is a random number in [0,1], It represents the probability of a chameleon detecting prey, rand is a random number with a value range of 0 to 1, indicating the direction of exploration and development; γ, α, and β are three constant values ​​for adjusting the exploration and development capabilities. t and T represent the current number of iterations and the maximum number of iterations, respectively.

[0060] During the eye rotation phase, chameleons can sense the location of the number of recommendations by rotating their eyes, which enables them to observe prey within a 360-degree range. Once the chameleon finds the location of the number of recommendations, it will move in its direction. At this time, the formula for updating the chameleon's position is as follows:

[0061]

[0062] in, represents the position of the jth chameleon after rotating through the eyes at the tth iteration, represents the center of position of the jth chameleon after searching for prey at the tth iteration; represents the rotation center of the jth chameleon at the tth iteration, which can be expressed by the following formula:

[0063]

[0064] in, represents the chameleon rotation matrix, where θ=r*sgn(rand-0.5)*180° represents the rotation angle of the chameleon's eyes, and r and rand are both random numbers. and represents a set of orthogonal vectors, A x and A y Respectively represent the rotation matrices on the x-axis and y-axis, the expressions are as follows:

[0065]

[0066] in, represents the rotation angle around the x-axis, Indicates the rotation angle around the y-axis.

[0067] During the hunting phase, when the chameleons get close to the recommended number, they will attack it with their tongues. The chameleon closest to the optimal recommended number is considered the optimal chameleon and is also considered the optimal solution in the solution space. During the hunting process, the chameleon's tongue extends to twice its original length. The speed of the tongue spraying towards the recommended number can be expressed as follows:

[0068]

[0069] in, It represents the hunting speed of the jth chameleon to obtain the recommended number at the t+1th and tth iterations. c1 and c2 are two positive numbers. represents the inertia weight, which decreases with the increase of the number of iterations, and ρ is a positive number used to affect the exploration ability. When the chameleon extends its tongue in the direction of the prey, its own position will also change accordingly. The position change formula is as follows:

[0070]

[0071] in, represents the position of the jth chameleon after hunting its prey at the t+1th iteration, a=2590*(1-e -logt ) represents the acceleration of the chameleon when hunting.

[0072] In order to prevent the randomly generated population positions from affecting the exploration performance of the algorithm, the chameleon population is enabled to fully explore the solution space in the early stage of the algorithm iteration, thereby improving the convergence speed and accuracy of the chameleon swarm algorithm. Considering that the reverse solution generated by the lens imaging reverse learning strategy is in the area that has not been searched in the solution space, the present invention introduces the lens imaging reverse learning strategy at the end of the hunting prey stage. By reverse learning the optimal chameleon in the current population, it can fully explore the solution space during the iteration process. The formula for generating the reverse solution in the lens imaging reverse learning strategy is as follows:

[0073]

[0074] in, represents the number of recommendations to be made by the jth chameleon at the end of the hunting phase in the tth iteration, express The number of reverse recommendations obtained through the lens imaging reverse strategy, up j and low j represents the maximum and minimum boundaries of the number of recommendations contained in the jth chameleon; k represents the scaling factor, k = (1 + (t / T) 0.5 ) 10 , t is the current iteration number, and T is the maximum iteration number.

[0075] (ii) Predict the user's rating of each item, select items with high ratings and recommend them to the user, and then calculate the recommendation accuracy

[0076] The core idea of ​​the User-based Collaborative Filtering (User-CF) algorithm is that similar users have similar ratings and preferences for items in history. By finding other users similar to the target user, and recommending items that these similar users like, the similarity between users is calculated using the following cosine similarity formula:

[0077]

[0078] Among them, Sim(u,v) represents the cosine similarity between user u and user v, I uv represents the set of items rated by user u and user v, I u and I v represents the set of items that user u and user v have historically given positive feedback on, r ui represents the rating given by user u to item i, r uk 、r vk Respectively represent the ratings given by user u and user v to item k, r vj represents the rating given by user v to item j.

[0079] Then predict the target user u's rating for item s The calculation formula is as follows:

[0080]

[0081] Where N(s) represents the set of users who have rated item s, r vs Represents the rating of user v on item s, v∈N(s), and based on the above formula, obtain the rating of each item by target user u, and put the top m items with high ratings into the recommended item set R(u). Based on the above method, the recommended item set of all target users can be obtained. The calculation formula of recommendation accuracy is as follows:

[0082]

[0083] Wherein, R(u) represents the set of recommended items to user u, T(u) represents the set of items that user u likes, and when formula (12) is used to calculate the recommendation accuracy as the fitness value, the target user u is the target user in the training set.

[0084] (III) The performance of the proposed method is evaluated using three recommendation datasets. The three datasets used in the experiment are MovieLens dataset, Book Crossing dataset, and Lastfm dataset. Table 1 below lists the dataset names, the number of users and the number of items in the dataset respectively:

[0085] Table 1. Number of users and items in different datasets

[0086]

[0087] At the same time, Figure 2 (a) to (c) in the figure show the comparison of the fitness value convergence curves of the IIOL-CSA-CF method and the CF method on three data sets.

[0088] The present invention has been described exemplarily. Obviously, the specific implementation of the present invention is not limited to the above-mentioned method. As long as various non-substantial improvements are made using the method concept and technical solution of the present invention, or the concept and technical solution of the present invention are directly applied to other occasions without improvement, they are all within the protection scope of the present invention.

Claims

1. An item recommendation method, characterized in that: The method comprises the following steps: S1. Obtain the current items to be recommended and the target users of the items to be recommended; S2, based on the chameleon swarm algorithm that introduces the lens imaging reverse learning strategy, obtain the optimal number of recommendations m for the target user; S3. The user-based collaborative filtering recommendation algorithm determines the target user's ratings for each type of item, and recommends the top m items with the highest ratings to the target user.

2. The item recommendation method according to claim 1, characterized in that: The method for determining the optimal number of recommendations m for target users is as follows: S21, encoding the recommended number into the initial position of each chameleon individual; S22, updating the individual positions of chameleons, and calculating the fitness value of each chameleon, where the fitness value is the recommendation accuracy corresponding to the position of the chameleon; S23, using the lens imaging reverse learning strategy to generate the corresponding reverse individual for the chameleon individual with the best fitness in the current chameleon population, and evaluating whether to retain the generated reverse individual based on the recommendation accuracy; S24, updating the local optimal position of each chameleon; S25, detecting whether the current number of iterations reaches the maximum number of iterations. If the detection result is yes, taking the position of the individual chameleon with the best fitness in the current chameleon population as the number of items to be recommended. If the detection result is no, executing step S22.

3. The item recommendation method according to claim 1, characterized in that: The reverse position of the chameleon individual j with the best fitness in the chameleon population in the tth iteration The calculation formula is as follows: in, represents the number of recommendations to be made by the jth chameleon at the end of the hunting phase in the tth iteration, express The number of reverse recommendations obtained through the lens imaging reverse strategy, up j and low j represents the maximum and minimum boundaries of the number of recommendations contained in the j-th chameleon; k represents the scaling factor.

4. The item recommendation method according to claim 3, characterized in that: The calculation formula of the scaling factor k is as follows: k=(1+(t / T) 0.5 ) 10 ; Among them, t is the current iteration number and T is the maximum iteration number.

5. The item recommendation method according to claim 1, characterized in that: The calculation formula for the recommendation accuracy Precision is as follows: Among them, R(u) represents the set of recommended items for target user u formed by the user-based collaborative filtering algorithm, and T(u) represents the set of items liked by target user u in the test set.

6. The item recommendation method according to claim 5, characterized in that: The process of obtaining the recommended item set R(u) is as follows: Get the score of each item given by the target user u, and put the top m items with high scores into the recommended item set R(u), where the score of the target user u on the item s is r^ us The formula is as follows: Where N(s) represents the set of users who have rated item s in the training set or test set, r vs represents the rating of user v on item s, and Sim(u,v) represents the cosine similarity between target user u and user v.

7. The item recommendation method according to claim 6, characterized in that: The calculation formula of cosine similarity Sim(u,v) between user u and user v is as follows: Among them, I uv I represents the set of items rated by target user u and user v. u and I v represents the set of items that the target user u and user v have historically given positive feedback on, r ui represents the rating given by target user u to item i, r uk 、r vk They represent the ratings given by target user u and user v to item k, r vj represents the rating given by user v to item j.

8. The item recommendation method according to claim 1, characterized in that: The calculation formula for the initial position of a chameleon individual is as follows: in, is the initial number of recommendations contained in the jth chameleon, up j and low j represents the maximum and minimum bounds of the number of recommendations contained in the j-th chameleon, and r is a random number between 0 and 1.

9. The item recommendation method according to claim 1, characterized in that: The historical ratings of users on items are taken as samples, the constructed samples are put into the sample set, and the samples in the sample set are divided into training set and test set according to the set ratio.