A
A
Albert2022-02-10 22:35:10
PHP
Albert, 2022-02-10 22:35:10

How to collect user data on your own interest site?

Hello.

I need to collect user data on my site. It's like artificial intelligence, I need to collect data about user actions and make the appropriate output. Here I have a movie site, I need to understand which films users watch most often, some parameters need to be remembered: genre, director, reviews, number of views, so that later these users in the Recommended section can advise a movie that suits them according to their interests accumulated for a certain period, let's say a month, but it can be a week or 3 days.

I think to do it this way: just every time the user clicks on a movie in a separate table, just store data about this event: such and such a movie, at such and such a time, such and such a genre and everything else related to this movie. Then, after a few days, I see that this user has clicked on 100 films, out of these 100 films, based on all the data, he most likes films from the Action genre (for example), so in the Recommended section, most of the films will be from this category.

It's such an easy way. I'm just wondering if there's a better way to do this? what other ways are there? maybe not very sophisticated. And is the method that I described even suitable? If we upload some data to the database every second, and if there are a lot of users, let's say 1000 or more, won't this affect performance and what is the best way to collect such data in this case?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
ThunderCat, 2022-02-10
@ThunderCat

It's such an easy way.
The method is normal, it just applies to artificial intelligence in the same way as an Excel table with 2 formulas - that is, nothing. Stupid statistics in the most primitive form.
I'm just wondering if there's a better way to do this?
Of course you can, it just takes disproportionately more effort to get a slight improvement, for example, take into account the duration of viewing a particular genre, activity such as comments, likes, ratings, and other little things. In short, for one small site it is practically unprofitable, the volume of YouTube is another matter, it all works there and brings an extra penny.
If we upload some data to the database every second, and if there are a lot of users, let's say 1000 or more, won't this affect performance and what is the best way to collect such data in this case?
No, if there are 1000 users, and the movie averages about an hour, then the activity in terms of writing to the database will be near zero, in 60 minutes ~ 1000 actions, which is approximately equal to 1 action in 3 seconds. Even if the activity is 10 times more, and there are also 10 times more users - the activity will eventually be about 100 actions in 3 seconds, or 30-40 actions per second, for a normal database structure this is not a load at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question