需要设计建议的艺术家推荐
我有以下场景。我需要向用户推荐艺术家。应该如何建模?我正在寻找这方面的建议。
我在想。基于以下标准:
- 当用户听歌曲时,歌曲流派会被记录在带有 +1 的地方
- 当用户“喜欢”一首歌曲时,歌曲流派会被记录在带有 +2 的地方
这样我就可以根据具有最高分的类型。
即使如此,我是否应该有一个名为“推荐”的新模型并将其嵌入到用户中?
我愿意接受各种建议。
I have the following scenario.I need to recommend artists to users. How should this be modeled? I am looking for suggestions on this.
I was thinking. Based on following criterias:
- When a user listens to a song, the songs genre gets recorded somewhere with +1
- When a user "likes" a song, the songs genre gets recorded somewhere with +2
This way I could list all artists based on the genre that has the highest points.
Even still, should I have a new model called "Recommendation" and have it embedded into user?
I am open to all kinds of suggestions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一个用户可以有很多票。投票可以是赞成票或反对票(使用单表继承)。然后,您可以拥有一个推荐模型,根据赞成票和反对票来确定用户可能喜欢的内容(从赞成票中查找相关艺术家并减去与反对票相关的艺术家)。然后,用户可以有许多推荐。
A User could have many Votes. A Vote could be an up-vote or down-vote (using single table inheritance). You could then have a Recommendation model that determines what a user might like depending on up and down-votes (find related artists from up-votes and subtract artists related to down-votes.) A User then could have many Recommendations.