質問

Can anyone shed some light on how youtube suggest videos. I notice when I go on youtube there is a list of previously watched clips as well as similar videos.

The closest way I can think of pulling this off, is to have tags and do a query where the SELECT statement's TAGS are equal to each users tags.

e.g

SELECT id, video_name, video_duration, video_link FROM videos
WHERE tags = 'boxing' OR tags = 'athletics' or tags = 'Usain Bolt'

Tags can then be cached in a cookie or database table against an IP or user_id

Is this how it is done or is there a more efficient way of doing this?

Thanks

役に立ちましたか?

解決

I am sorry to dissapoint you, but 'suggestions' algorithm can go a very complex path. As I remember, Amazon were first to expose the efficiency of complexing such algorithms.

On the other hand, if you are looking for something simple, you are on a right path. In addition, you could add weight to suggested videos based on how many times they were viewed.

P.S. If you are really interrested in how recommendation algorithms are being done on popular websites, consider reading some research papers: http://scholar.google.co.uk/scholar?q=recommending+products+algorithm

他のヒント

It is really complex but I can share with you what I noticed during my experiences. It records which users watch which videos. It also records which computers watch what videos. Geolocation, categorization, popularity and channels they all matters. I think it also records video rates in relationship or channels. For example most of people watches videos from A channel and they also watch B channel so if you watch a video from A, B is likely suggested.

Keep in mind there are billions of videos and multiply it with relationship possibility so you will also need some strong hardware as well.

You should also pay attention to distribute fields to different relationships. For example one for most popular in that category, one for most watched channels related category and some sponsored video suggestions, etc. Sounds too complex to do without a team.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top