估计/预测下载完成时间 [英] Estimating/forecasting download completion time

查看:393
本文介绍了估计/预测下载完成时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们都在对话,这似乎是过于简单化的剩下的X分钟开起了玩笑,但我们怎样才能提高呢?

实际上,输入是集下载速度可以达到当前的时间,我们需要用它来估计完成时间,也许是肯定的指示,像'20 -25分钟使用一些Y%剩余'置信区间。

code表示这样做可以把一个小图书馆和使用的项目遍布,所以是不是真的那么难吗?你会怎么做呢?你会给previous下载速度什么的权重?

或者是有一些开源$ C ​​$ C已经在那里?

编辑:总的来讲:

  1. 通过更好的算法中/过滤器等提高预计完成时间。
  2. 提供间隔,而不是单一的时间('1h45-2h30分钟'),或者仅仅限制precision('约2小时)。
  3. 表示,当进展已经停滞 - 但如果进展一直档,然后继续,我们应该能够面对这一切。也许,约2小时,目前陷入僵局
解决方案

更​​一般地,我认为你正在寻找一种方式,让传输速度,这是一般平均在一个小周期内获得的瞬间MESURE。

的问题是一般,为了是反应性的,周期通常是非常小的,这导致溜溜球的效果。

我会提出一个非常简单的方案,让我们的建模。

想想曲线速度(Y)随时间(X)。

  1. 即时速度,没有比阅读y表示当前的X(X0)以上。

  2. 的平均速度,不超过积分(F(X),X在[X0-T,X0])/ T

  3. 计划我的建议是要应用过滤器,向最后时刻给予更高的权重,同时还考虑到了过去的时刻。

它可以很容易地实现为 G(X,X0,T)= 2 *(X - X0)+ 2T 这是表面T. <一个简单的三角形/ P>

现在你可以计算积分(F(X)* G(X,X0,T),X在[X0-T,X0])/ T ,这应该工作,因为这两个功能总是积极的。

当然,你可以有一个不同的只要它总是在给定的时间间隔,并且其整体上的间隔为T阳性(以便其自己的平均是正是1)。

此方法的优点是,因为你即时事件给予更多的权重,就可以即使考虑较大的时间间隔(以使平均更precise,并且不易受残留pretty的反应性打嗝)。

此外,我很少见过,但认为会提供更多的precise估计将关联用于计算平均值的估计剩余时间时间:

  • 如果我下载一个5KO文件,它会在瞬间被加载,无需估算
  • 如果我下载一个15月的文件,这是怎么回事2分钟之间大约需要,所以我想估计说... ...每5秒?
  • 如果我下载一个1.5转到文件,这将需要...... 200以及围绕分钟(使用相同的速度)......这是说3h20m ......也许,一个估计每分钟就足够了?

因此​​,时间越长,下载的是要采取,少反应我需要,而且我越能平均掉。在一般情况下,我会说,一个窗口可以覆盖的总时间的2%(也许除了几首的估计,因为人们AP preciate即时反馈)。另外,指示在一个时间通过整个%进展是足够的。如果任务是漫长的,我是prepared反正等待。

We've all poked fun at the 'X minutes remaining' dialog which seems to be too simplistic, but how can we improve it?

Effectively, the input is the set of download speeds up to the current time, and we need to use this to estimate the completion time, perhaps with an indication of certainty, like '20-25 mins remaining' using some Y% confidence interval.

Code that did this could be put in a little library and used in projects all over, so is it really that difficult? How would you do it? What weighting would you give to previous download speeds?

Or is there some open source code already out there?

Edit: Summarising:

  1. Improve estimated completion time via better algo/filter etc.
  2. Provide interval instead of single time ('1h45-2h30 mins'), or just limit the precision ('about 2 hours').
  3. Indicate when progress has stalled - although if progress consistently stalls and then continues, we should be able to deal with that. Perhaps 'about 2 hours, currently stalled'

解决方案

More generally, I think you are looking for a way to give an instant mesure of the transfer speed, which is generally obtained by an average over a small period.

The problem is generally that in order to be reactive, the period is usually extremely small, which leads to the yoyo effect.

I would propose a very simple scheme, let's model it.

Think of a curve speed (y) over time (x).

  1. the Instant Speed, is no more than reading y for the current x (x0).

  2. the Average Speed, is no more than Integral(f(x), x in [x0-T,x0]) / T

  3. the scheme I propose is to apply a filter, to give more weight to the last moments, while still taking into account the past moments.

It can be easily implement as g(x,x0,T) = 2 * (x - x0) + 2T which is a simple triangle of surface T.

And now you can compute Integral(f(x)*g(x,x0,T), x in [x0-T,x0]) / T, which should work because both functions are always positive.

Of course you could have a different g as long as it's always positive in the given interval and that its integral on the interval is T (so that its own average is exactly 1).

The advantage of this method is that because you give more weight to immediate events, you can remain pretty reactive even if you consider larger time intervals (so that the average is more precise, and less susceptible to hiccups).

Also, what I have rarely seen but think would provide more precise estimates would be to correlate the time used for computing the average to the estimated remaining time:

  • if I download a 5ko file, it's going to be loaded in an instant, no need to estimate
  • if I download a 15 Mo file, it's going to take between 2 minutes roughly, so I would like estimates say... every 5 seconds ?
  • if I download a 1.5 Go file, it's going to take... well around 200 minutes (with the same speed)... which is to say 3h20m... perhaps that an estimates every minute would be sufficient ?

So, the longer the download is going to take, the less reactive I need to be, and the more I can average out. In general, I would say that a window could cover 2% of the total time (perhaps except for the few first estimates, because people appreciate immediate feedback). Also, indicating progress by whole % at a time is sufficient. If the task is long, I was prepared to wait anyway.

这篇关于估计/预测下载完成时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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