具有时间加权平均聚合函数的时间序列数据库用于不规则时间序列?(Time series database with time

编程入门 行业动态 更新时间:2024-10-27 20:39:16
具有时间加权平均聚合函数的时间序列数据库用于不规则时间序列?(Time series database with time-weighted-average aggregation function for irregular time series?)

我们的传感器以不规则的时间间隔生成值

12:00 10 12:02 20 12:22 30 12:29 40

我试图找到一个时间序列数据库,可以自动计算某些常规时间间隔(例如10分钟)的平均值。 当然,值在区间内有效的时间越长,它在平均值中的权重就越大(时间加权平均值)。 (例如12:00-12:10:(10 * 2 + 20 * 8)/ 10 = 18))

我现在正在互联网上搜索几个小时,发现很多时间序列数据库,讨论不规则的时间序列(例如InfluxDB,OpenTDSB等),并且大多数数据库都有一些带有聚合函数的类似SQL的查询语言。

不幸的是,他们没有说明如何平均不规则的时间间隔。 由于我不想尝试所有这些,有人可以告诉我哪些数据库支持计算时间加权平均值? 谢谢!

Our sensors produce values in irregular time intervals:

12:00 10 12:02 20 12:22 30 12:29 40

I am trying to find a time series database that can automatically calculate the average value for certain regular time intervals (e.g. 10min). Of course the longer a value was valid within the interval the more weight it has in the average (time weighted average). (e.g. 12:00-12:10: (10*2+20*8)/10=18) )

I am searching now on the internet for hours and found lots of time series databases that talk about irregular time series (e.g. InfluxDB, OpenTDSB, etc.) and most of them have some SQL-like query language with aggregation functions.

Unfortunately they don't say how exactly irregular time intervals are averaged. As I don't want to try all of them, can someone tell me which databases support the calculation of a time-weighted-average? Thanks!

最满意答案

OpenTSDB在查询隐含的时间内在查询中的所有系列中执行聚合。 对于在时间戳上没有数据值的任何系列,它会从前后的值线性插值。 它在查询时进行“上采样” - 原始数据始终存储在它到达时的状态。 您可以执行尾随窗口时间平均值,但不是指数加权移动平均线(我相信这是您按时间加权的含义吗?)

http://opentsdb.net/docs/build/html/user_guide/query/aggregators.html

(我应该补充一点,这不是对你应该使用的数据库的OpenTSDB的一揽子推荐,我只是回答你的问题)

OpenTSDB performs aggregation across all series in a query at the time(s) implied by the query. For any series not having a data value at a timestamp, it linearly interpolates a value from the values before and after. It does this "upsampling" at query time -- the original data is always stored as it was when it arrived. You can perform a trailing windowed time average, but not an exponentially weighted moving average (I believe that is what you meant by time-weighted?)

http://opentsdb.net/docs/build/html/user_guide/query/aggregators.html

(I should add, that's not a blanket recommendation for OpenTSDB as the db you should use, I'm just responding to your question)

更多推荐

本文发布于:2023-04-29 11:40:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1336253.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:时间   序列   不规则   函数   加权平均

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!