平滑算法来投放广告平均一个月 [英] Smoothening algorithm to serve ads evenly in a month

查看:516
本文介绍了平滑算法来投放广告平均一个月的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我有上显示的网站10广告。

Say I have 10 ads that are displayed on a website.

如果广告#1是在一个特定的月份要显示100K,你将如何去均匀/平滑地显示这些广告在一天?

If ad #1 is to be displayed 100K in a given month, how would you go about evenly/smoothly display these ads throughout the day?

我得把流量高峰的考虑,所以我不能简单地除以30天,每天10万或3K IM pressions。

I have to take traffic spikes into consideration, so I can't simply divide 30 days by 100K or 3K impressions per day.

有没有这种类型的问题域的公式?

Is there a formula for this type of problem domain?

推荐答案

那么,对于一件事,你可以不知道你的网站将会有多少人访问得到的,所以你不能保证每个广告将被显示的完全 X次。例如,如果广告#1是要显示100K次,广告#2是要显示200K次,但你只能得到15万人次,那么你cannoy可能满足任何东西。而在另一方面,如果你得到60万人次,那么所有其他的访问应该是没有广告的。但是你事先没有办法predict这一点。

Well, for one thing you cannot know how many visits your site will get, so you cannot ensure that each ad will be shown exactly X times. For instance, if ad #1 is to be displayed 100K times, and ad #2 is to be displayed 200K times, but you get only 150K visits, then you cannoy possibly satisfy anything. And on the other hand, if you get 600K visits, then every other visit should have no ad. But you have no way to predict this in advance.

因此​​,我建议同样的事情tskuzzy - 接广告在随机的,而是让他们接近的观点适量调整它们的概率。而且,当然,跟踪有多少次,每次广告已示出,并且从旋转中删除它,一旦已达到限制

Hence, I'd advise the same thing as tskuzzy - pick ads on random, but adjust their probabilities so that they approach the right amount of views. And, of course, track how many times each ad has been shown, and remove it from the rotation once the limit has been reached.

让我们来看一个例子。假设你有两个广告。广告#1仍然需要显示7天以上,并需要获得70K更多的意见。广告#2需要显示为10多天,并且需要20K更多的意见。 2K次每一天 - 所以,广告#1,应广告#2所示,平均每天1万次,。这样的广告#1上来的概率应为10 /(10 + 2)= 5/6,且广告#2的概率应为2 /(10 + 2)= 1/6。因此,对于每一个12K的意见,你会得到平均10K意见广告#1,和2K欣赏广告#2。这是你所需要的。

Let's look at an example. Suppose you have two ads. Ad #1 still needs to be shown for 7 more days, and needs to get 70K more views. Ad #2 needs to be shown for 10 more days, and needs 20K more views. So, ad #1 should be shown on average 10K times each day, and ad #2 - 2K times each day. So the probability of ad #1 coming up should be 10/(10+2)=5/6, and the probability of ad #2 should be 2/(10+2)=1/6. Hence for every 12K views you will get on average 10K views of ad #1, and 2K views of ad #2. Which is what you need.

重新计算这些概率在每天开始和只在同一时间增加新的广告。如果在一天中增加新的广告,这将事情复杂化。然而,将工作一样好,如果你计算时间(秒),而不是在天,所以你可以做到这一点了更高的精度。只要保持性能的眼睛,如果你重新计算一切,所以经常。

Recalculate these probabilities at the start of each day and only add new ads at the same time. If you add new ads in the middle of the day, it will complicate things. However it will work just as well if you calculate time in seconds, not in days, so you might do that too for a greater accuracy. Just keep an eye on performance if you recalculate everything so often.

这篇关于平滑算法来投放广告平均一个月的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆