六月婷婷AV,国产偷窥猎奇福利二区,日韩三级片。,好吊色网站,日韩成人中文在线视频,国产亚洲午夜啪啪,亚洲欧美另类国产精品,国产成人av1,任你艹在线观看

時(shí)序數(shù)據(jù)庫 TDengine + 高級(jí)分析軟件 Seeq,助力企業(yè)挖掘時(shí)序數(shù)據(jù)潛力

作為一款制造業(yè)和工業(yè)互聯(lián)網(wǎng)(IIOT)高級(jí)分析軟件,Seeq 支持在工藝制造組織中使用機(jī)器學(xué)習(xí)創(chuàng)新的新功能。這些功能使組織能夠?qū)⒆约夯虻谌綑C(jī)器學(xué)習(xí)算法部署到前線流程工程師和主題專家使用的高級(jí)分析應(yīng)用程序,從而使單個(gè)數(shù)據(jù)科學(xué)家的努力擴(kuò)展到許多前線員工。通過 TDengine Java connector,Seeq 可以輕松支持查詢 TDengine 提供的時(shí)序數(shù)據(jù),并提供數(shù)據(jù)展現(xiàn)、分析、預(yù)測(cè)等功能。本文將對(duì)此進(jìn)行介紹。

如何配置 Seeq 訪問 TDengine

  1. 查看 data 存儲(chǔ)位置
sudo seeq config get Folders/Data
  1. maven.org 下載 TDengine Java connector 包,目前最新版本為 3.2.7 (https://central.sonatype.com/artifact/com.taosdata.jdbc/taos-jdbcdriver?smo=true)。并拷貝至 data 存儲(chǔ)位置的 plugins\lib 中。
  2. 重新啟動(dòng) seeq server
sudo seeq restart
  1. 輸入 License

使用瀏覽器訪問 ip:34216 并按照說明輸入 license。

使用 Seeq 分析 TDengine 時(shí)序數(shù)據(jù)

下文將為大家演示如何使用 Seeq 軟件配合 TDengine 進(jìn)行時(shí)序數(shù)據(jù)分析。

場(chǎng)景介紹

示例場(chǎng)景為一個(gè)電力系統(tǒng),用戶每天從電站儀表收集用電量數(shù)據(jù),并將其存儲(chǔ)在 TDengine 集群中?,F(xiàn)在用戶想要預(yù)測(cè)電力消耗將會(huì)如何發(fā)展,并購買更多設(shè)備來支持它。用戶電力消耗隨著每月訂單變化而不同,另外考慮到季節(jié)變化,電力消耗量會(huì)有所不同。這個(gè)城市位于北半球,所以在夏天會(huì)使用更多的電力。我們模擬數(shù)據(jù)來反映這些假定。

數(shù)據(jù) Schema

CREATE STABLE meters (ts TIMESTAMP, num INT, temperature FLOAT, goods INT) TAGS (device NCHAR(20));
create table goods (ts1 timestamp, ts2 timestamp, goods float);
時(shí)序數(shù)據(jù)庫 TDengine + 高級(jí)分析軟件 Seeq,助力企業(yè)挖掘時(shí)序數(shù)據(jù)潛力 - TDengine Database 時(shí)序數(shù)據(jù)庫

構(gòu)造數(shù)據(jù)方法

python mockdata.py
taos -s "insert into power.goods select _wstart, _wstart + 10d, avg(goods) from power.meters interval(10d);"

源代碼托管在 https://github.com/sangshuduo/td-forecasting。

使用 Seeq 進(jìn)行數(shù)據(jù)分析

配置數(shù)據(jù)源(Data Source)

使用 Seeq 管理員角色的帳號(hào)登錄,并新建數(shù)據(jù)源。

  • Power
{
    "QueryDefinitions": [
        {
            "Name": "PowerNum",
            "Type": "SIGNAL",
            "Sql": "SELECT  ts, num FROM meters",
            "Enabled": true,
            "TestMode": false,
            "TestQueriesDuringSync": true,
            "InProgressCapsulesEnabled": false,
            "Variables": null,
            "Properties": [
                {
                    "Name": "Name",
                    "Value": "Num",
                    "Sql": null,
                    "Uom": "string"
                },
                {
                    "Name": "Interpolation Method",
                    "Value": "linear",
                    "Sql": null,
                    "Uom": "string"
                },
                {
                    "Name": "Maximum Interpolation",
                    "Value": "2day",
                    "Sql": null,
                    "Uom": "string"
                }
            ],
            "CapsuleProperties": null
        }
    ],
    "Type": "GENERIC",
    "Hostname": null,
    "Port": 0,
    "DatabaseName": null,
    "Username": "root",
    "Password": "taosdata",
    "InitialSql": null,
    "TimeZone": null,
    "PrintRows": false,
    "UseWindowsAuth": false,
    "SqlFetchBatchSize": 100000,
    "UseSSL": false,
    "JdbcProperties": null,
    "GenericDatabaseConfig": {
        "DatabaseJdbcUrl": "jdbc:TAOS-RS://127.0.0.1:6041/power?user=root&password=taosdata",
        "SqlDriverClassName": "com.taosdata.jdbc.rs.RestfulDriver",
        "ResolutionInNanoseconds": 1000,
        "ZonedColumnTypes": []
    }
}
  • Goods
{
    "QueryDefinitions": [
        {
            "Name": "PowerGoods",
            "Type": "CONDITION",
            "Sql": "SELECT ts1, ts2, goods FROM power.goods",
            "Enabled": true,
            "TestMode": false,
            "TestQueriesDuringSync": true,
            "InProgressCapsulesEnabled": false,
            "Variables": null,
            "Properties": [
                {
                    "Name": "Name",
                    "Value": "Goods",
                    "Sql": null,
                    "Uom": "string"
                },
                {
                    "Name": "Maximum Duration",
                    "Value": "10days",
                    "Sql": null,
                    "Uom": "string"
                }
            ],
            "CapsuleProperties": [
                {
                    "Name": "goods",
                    "Value": "${columnResult}",
                    "Column": "goods",
                    "Uom": "string"
                }
            ]
        }
    ],
    "Type": "GENERIC",
    "Hostname": null,
    "Port": 0,
    "DatabaseName": null,
    "Username": "root",
    "Password": "taosdata",
    "InitialSql": null,
    "TimeZone": null,
    "PrintRows": false,
    "UseWindowsAuth": false,
    "SqlFetchBatchSize": 100000,
    "UseSSL": false,
    "JdbcProperties": null,
    "GenericDatabaseConfig": {
        "DatabaseJdbcUrl": "jdbc:TAOS-RS://127.0.0.1:6041/power?user=root&password=taosdata",
        "SqlDriverClassName": "com.taosdata.jdbc.rs.RestfulDriver",
        "ResolutionInNanoseconds": 1000,
        "ZonedColumnTypes": []
    }
}
  • Temperature
{
    "QueryDefinitions": [
        {
            "Name": "PowerNum",
            "Type": "SIGNAL",
            "Sql": "SELECT  ts, temperature FROM meters",
            "Enabled": true,
            "TestMode": false,
            "TestQueriesDuringSync": true,
            "InProgressCapsulesEnabled": false,
            "Variables": null,
            "Properties": [
                {
                    "Name": "Name",
                    "Value": "Temperature",
                    "Sql": null,
                    "Uom": "string"
                },
                {
                    "Name": "Interpolation Method",
                    "Value": "linear",
                    "Sql": null,
                    "Uom": "string"
                },
                {
                    "Name": "Maximum Interpolation",
                    "Value": "2day",
                    "Sql": null,
                    "Uom": "string"
                }
            ],
            "CapsuleProperties": null
        }
    ],
    "Type": "GENERIC",
    "Hostname": null,
    "Port": 0,
    "DatabaseName": null,
    "Username": "root",
    "Password": "taosdata",
    "InitialSql": null,
    "TimeZone": null,
    "PrintRows": false,
    "UseWindowsAuth": false,
    "SqlFetchBatchSize": 100000,
    "UseSSL": false,
    "JdbcProperties": null,
    "GenericDatabaseConfig": {
        "DatabaseJdbcUrl": "jdbc:TAOS-RS://127.0.0.1:6041/power?user=root&password=taosdata",
        "SqlDriverClassName": "com.taosdata.jdbc.rs.RestfulDriver",
        "ResolutionInNanoseconds": 1000,
        "ZonedColumnTypes": []
    }
}

使用 Seeq Workbench

登錄 Seeq 服務(wù)頁面并新建 Seeq Workbench,通過選擇數(shù)據(jù)源搜索結(jié)果和根據(jù)需要選擇不同的工具,可以進(jìn)行數(shù)據(jù)展現(xiàn)或預(yù)測(cè),詳細(xì)使用方法參見官方知識(shí)庫:https://support.seeq.com/space/KB/146440193/Seeq+Workbench。

時(shí)序數(shù)據(jù)庫 TDengine + 高級(jí)分析軟件 Seeq,助力企業(yè)挖掘時(shí)序數(shù)據(jù)潛力 - TDengine Database 時(shí)序數(shù)據(jù)庫

使用 Seeq Data Lab Server 進(jìn)行進(jìn)一步的數(shù)據(jù)分析

登錄 Seeq 服務(wù)頁面并新建 Seeq Data Lab,可以進(jìn)一步使用 Python 編程或其他機(jī)器學(xué)習(xí)工具進(jìn)行更復(fù)雜的數(shù)據(jù)挖掘功能。

from seeq import spy
spy.options.compatibility = 189
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
import mlforecast
import lightgbm as lgb
from mlforecast.target_transforms import Differences
from sklearn.linear_model import LinearRegression

ds = spy.search({'ID': "8C91A9C7-B6C2-4E18-AAAF-XXXXXXXXX"})
print(ds)

sig = ds.loc[ds['Name'].isin(['Num'])]
print(sig)

data = spy.pull(sig, start='2015-01-01', end='2022-12-31', grid=None)
print("data.info()")
data.info()
print(data)
#data.plot()

print("data[Num].info()")
data['Num'].info()
da = data['Num'].index.tolist()
#print(da)

li = data['Num'].tolist()
#print(li)

data2 = pd.DataFrame()
data2['ds'] = da
print('1st data2 ds info()')
data2['ds'].info()

#data2['ds'] = pd.to_datetime(data2['ds']).to_timestamp()
data2['ds'] = pd.to_datetime(data2['ds']).astype('int64')
data2['y'] = li
print('2nd data2 ds info()')
data2['ds'].info()
print(data2)

data2.insert(0, column = "unique_id", value="unique_id")

print("Forecasting ...")

forecast = mlforecast.MLForecast(
    models = lgb.LGBMRegressor(),
    freq = 1,
    lags=[365],
    target_transforms=[Differences([365])],
)

forecast.fit(data2)
predicts = forecast.predict(365)

pd.concat([data2, predicts]).set_index("ds").plot(title = "current data with forecast")
plt.show()

運(yùn)行程序輸出結(jié)果:

時(shí)序數(shù)據(jù)庫 TDengine + 高級(jí)分析軟件 Seeq,助力企業(yè)挖掘時(shí)序數(shù)據(jù)潛力 - TDengine Database 時(shí)序數(shù)據(jù)庫

寫在最后

通過集成 Seeq 和 TDengine,用戶能夠充分利用到 TDengine 高性能的時(shí)序數(shù)據(jù)存儲(chǔ)和檢索,確保數(shù)據(jù)的高效處理;同時(shí)也將受益于 Seeq 提供的強(qiáng)大數(shù)據(jù)可視化和分析功能,如數(shù)據(jù)可視化、異常檢測(cè)、相關(guān)性分析和預(yù)測(cè)建模,方便用戶獲得有價(jià)值的數(shù)據(jù)洞察并基于此進(jìn)行決策。

未來 Seeq 和 TDengine 將共同為制造業(yè)、工業(yè)物聯(lián)網(wǎng)和電力系統(tǒng)等各行各業(yè)的時(shí)序數(shù)據(jù)分析提供綜合解決方案,將高效數(shù)據(jù)存儲(chǔ)和先進(jìn)數(shù)據(jù)分析相結(jié)合,賦予企業(yè)深入挖掘時(shí)序數(shù)據(jù)潛力的能力,推動(dòng)業(yè)務(wù)發(fā)展與改進(jìn)。如果你想要了解 Seeq 的更全面設(shè)置、Seeq 與全托管的云服務(wù)平臺(tái) TDengine Cloud 的具體連接詳情,請(qǐng)移步官方文檔 https://docs.taosdata.com/third-party/seeq/ 進(jìn)行查閱。