问题描述
我将很快开始横幅旋转脚本,我变得有点困惑了究竟如何发展它。假设一个客户要求
I'm going to be starting a banner-rotation script soon and I'm getting a bit perplexed over how exactly to develop it. Suppose a client asks for
万IM pressions在接下来的10天为$一万块钱。
另一个客户端请求
1000 IM pressions为$ 100美金。
和第三个要求
1000点击或10,000 IM pressions为$ 5,000。
究竟是如何确定我在一个页面请求要显示的旗帜?我该如何权衡打鬼?显然,第一个要求是相当重要的,因为我有望成为在一个时间窗口的IM pressions一组数字。
How exactly do I determine which banner to show upon a page-request? How do I weigh one against another? Clearly the first request is rather important, as I'm expected to serve a set number of impressions within a time-window.
第二个客户端不是那么重要,因为他们不关心一个时间窗口,他们只是想要一些面对面的时间。
The second client is not nearly as important, as they don't care about a time-window, they just want some face-time.
和最后一个客户端要放置在IM pressions /点击的N或者M的约束,使事情稍微难一些。
And the last client wants to place an n or m restraint on the impressions/clicks, making matters slightly more difficult.
我已经pretty的信心,我需要从抽象的这些情景的一些权重来确定谁得到了最多的关注。我的问题是什么样的算法类型可以解决这个问题,二来我怎么可能成为标语重量不总是提供了最重要的旗帜每个请求?
I'm already pretty confident that I'll need to abstract some weight from these scenarios to determine who gets the most attention. My question is what type of algorithm could handle this, and secondly how could I serve up banners by weight without always serving up the most important banner with each request?
推荐答案
的困难来自于时间限制比什么都重要。我会分裂任何人的优先考虑谁没有指定由365(一年)时间限制,然后用时间作为权重因子的一部分。所以:
The difficulty comes from the time constraint more than anything else. I would divide anyone's priority who did not specify a time constraint by 365 (a year), and then use time as part of the weight factor. So:
Client 1 priority: 10000/10 = 1000
Client 2 priority: 1000/365 ~ 3
Client 3 priority: 10000/365 ~30
这应该让你优先相当不错的指标。现在,你不能混用并匹配IM pressions和点击次数可以吗?他们要么去IM pression路由或点击路线。看,你无法控制一下,但你可以控制IM pressions(至少,moreso比点击),我会根据即时通讯pressions称重。
That should get you a fairly decent indicator of priority. Now, you can't mix and match impressions and clicks can you? They either go the impression route or the click route. Seeing as you cannot control click, but you can control impressions (at least, moreso than clicks), I would weigh it according to impressions.
这篇关于先进的横幅旋转算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!