确定列表顺序/评分系统的算法思路? [英] Algorithm ideas to determine list order/rating system?

查看:103
本文介绍了确定列表顺序/评分系统的算法思路?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个动态列表,用户可以在其中随时添加其他项目.但是,我也希望根据某种评级系统对列表中的项目进行排序.因为可以将新项目随时添加到列表中,所以有关如何执行此操作的任何想法?

更多信息:
用户将项目添加到列表中,并且用户还可以对当前列出的项目进行评分.该列表将根据商品收到的评级进行排序.

我关心的主要问题是,最近添加的商品在正确订购时会带来不利影响.例如....假设一个项目在一个月前添加并在该时间范围内收到10个评分,而另一个项目在一天前添加并获得9个评分.如果仅基于等级对列表进行排序,则具有10个等级的项目将在具有9个等级的项目之前列出,即使很显然具有9个等级的项目更受欢迎.诸如此类.....

I want to create a dynamic list where users can add additional items to it at any point. However, I also want the items on the list to be ordered based on some sort of rating system. Any ideas on how to do this since new items can be added to the list at any time?

More info:
Users will add items to the list and users will also be able to rate the currently listed items. The list will be sorted based on the ratings the items receive.

The main problem I''m concerned with is the fact that the more recently added items would have a disadvantage in being ordered properly. For example.... Let''s say an item was added a month ago and received 10 ratings within that time frame and another item that was added a day ago and received 9 ratings. If the list was ordered simply based on ratings, then item with 10 ratings would be listed before the item with 9 ratings even though it''s obvious that the item with 9 ratings is more popular. Something like that.....

推荐答案

最明显的方法是使用列表并将新项目放置在列表中的相对位置.如果项目可以在列表中移动,则您需要在数据更改时求助.
The obvious way is to use a list and position the new items at their relative position in the list. If items can move in the list, you need to resort when the data changes.


这篇关于确定列表顺序/评分系统的算法思路?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆