根据用户的推荐向用户推荐链接
我正在构建一项服务,用户可以提交他推荐/喜欢的链接“列表”(文章、网站等),系统将向他显示他可能喜欢的其他链接的列表。
我心中执行此过程的唯一想法是:
- 用户 A 将提交他的链接列表(例如 10 个链接)
- 系统将查找其他用户(例如用户 B)列表,其中用户 A 和用户 B 链接之间有 80% 相同的链接
- 显示 20% 的新链接(来自用户 B 列表)给用户 A
您还有其他方法可以做到这一点吗?或者你有任何开源项目可以做同样的事情吗?
任何语言都可以,但我更喜欢 Perl、PHP、Java、SQL
I'm building a service where a user can submit "list" of links he recommends/likes (articles, sites...etc) and the system will show him a list of other links he may like as well.
The only idea in my mind to do this process is:
- User A will submit his list of links (e.g 10 links)
- The system will lookup for other users (say user B) list with 80% same links between User A and User B links
- Show the 20% new links (from User B list) to User A
Do you have any other way to do this? or do you have any open source project that doing the same thing?
Any language is ok but I'm more into Perl, PHP, Java, SQL
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的方法实施起来很简单。然而,当我阅读它时,您正在配对用户而不是链接。如果在 80% 以内找不到任何匹配项怎么办?
我认为更好的方法是构建一个以链接作为节点和连接的“相似性”分数的图表。
您可以根据每两个链接出现在同一列表中的次数来计算分数。
当您想为用户 A 进行推荐时,您会为他的列表中尚未包含的每个链接获得得分最高的链接。
Your approach is simple to implement. However, as I'm reading it, you are pairing users and not links. What if you don't find any match to within 80% ?
I think a better approach would be to build a graph with links as nodes and a "similarity" score for the connections.
You compute the score based on the number of times each 2 links appear in the same list.
When you want to make a recommendation for user A, you get the highest scoring link(s) for each of his links that aren't already in his list.
我认为拥有完全相同的链接是不太可能的。更好的方法是下载每个链接并创建单词索引并尝试匹配内容而不是链接。很像网络搜索:)
I think having exactly the same links is very unlikely. A better approach would be to download each link and create a word index and try to match the contents rather than links. Much like web search :)