推荐新内容的算法
我有一个文章列表,这些文章的 id 不断增加。一些 id 丢失,因为文章被删除,所以顺序上升,但并不总是增加 1。
我试图动态推荐内容,如相关文章,但并不总是想推荐相同的文章,但想确保有
1) Every article is recommended in another article
2) A page always recommends the same article - so randomness algorithms do not help.
没有好的方法可以做到这一点?
谢谢!!
I have a list of articles that have increasing ids associated with them. Some ids are missing because the articles were deleted so the order is going up, but not always incremented by 1.
I am trying to dynamically recommend content like related articles but don't always want to recommend the same articles, but want to make sure that
1) Every article is recommended in another article
2) A page always recommends the same article - so randomness algorithms do not help.
Is there a good way to do this?
Thanks!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在你的sql中这样想。
- 选择与某些关键匹配的类别相似的故事列表
-grab a random 1
然而,确保每篇文章都附加到另一篇文章的唯一方法是设置一个密钥列表。使键列表包含左侧的每一篇文章,当然,右侧的其他文章也可以随机输入。将此设为临时表,以便在添加文章时左侧递增,右侧重新随机相关文章,同时使用列表中的每个人。
In your sql think like this.
-Select List of catagorically alike stories that match some key
-grab a random 1
However the only way to ENSURE every article is attached to another is to set up a key list. Make the key list hold every article on the left, and random input for other articles on the right categorically again of course. Make this a temp table so when you add articles the left side increments, and the right side re-randoms the related articles, while using everyone in the list.