问题
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.
回答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.
来源:https://stackoverflow.com/questions/4366417/need-suggestions-on-designing-artist-recommendation