doudou0111 2013-09-11 17:15 采纳率: 0%
浏览 44
已采纳

如何根据用户交互/最感兴趣的用户对帖子进行排序

I am dealing with a huge problem. I need to fetch a wall with information from mainly two tables: posts and events.

This information has to be ordered so that the most interesting is in top (like Facebooks own newsfeed).

I wish to order this information based on other tables such as which user the current user likes the most; like which user is MOST interesting (in form of following and liking his posts) and then put it in top.

I have thought of a system like described here: Algorithm of most relevant wall posts - but after a while, it seems too messy, and will require me to load ALL posts from the database, which eventually will be very much data, and THEN handle all the data each by each.

Do anyone have any experience with this? So that I can get pointed in the right direction.

  • 写回答

1条回答 默认 最新

  • doukui4836 2013-09-11 17:53
    关注

    I deal with exactly the same problem and the approach is same as explained by @relentless

    1. Find all the associations of the current user
    2. Sort by number of likes

    However this looks very good in theory, but in practice in my case it required more time than the user was willing to wait.

    So what I did is that I limited the number of the database records (posts and events in your case) to some amount that can be processed in like 2 second time-frame. In my case this was 6 months in the past, but in your case you have to tune the timing and the load to best suit your needs.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式