{"id":60749,"date":"2026-01-16T10:25:25","date_gmt":"2026-01-16T02:25:25","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/60749.html"},"modified":"2026-01-16T10:25:25","modified_gmt":"2026-01-16T02:25:25","slug":"iotdb-ainode%ef%bc%9asql%e9%a9%b1%e5%8a%a8%e6%97%b6%e5%ba%8fai%e5%85%a8%e6%b5%81%e7%a8%8b%e8%90%bd%e5%9c%b0","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/60749.html","title":{"rendered":"IoTDB AINode\uff1aSQL\u9a71\u52a8\u65f6\u5e8fAI\u5168\u6d41\u7a0b\u843d\u5730"},"content":{"rendered":"<h2><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"762\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260116022523-6969a19329b40.png\" width=\"1396\" \/><\/h2>\n<p>Apache IoTDB \u4f5c\u4e3a\u5f00\u6e90\u65f6\u5e8f\u6570\u636e\u5e93\u6807\u6746&#xff0c;\u4e13\u4e3a\u7269\u8054\u7f51\u573a\u666f\u8bbe\u8ba1&#xff0c;\u800c AINode \u4f5c\u4e3a\u5176\u539f\u751fAI\u8282\u70b9&#xff0c;\u5b9e\u73b0\u4e86\u201c\u6570\u636e\u5e93\u5373\u5206\u6790\u5e73\u53f0\u201d\u7684\u7a81\u7834\u3002AINode \u53ef\u76f4\u63a5\u96c6\u6210\u673a\u5668\u5b66\u4e60\u6a21\u578b&#xff0c;\u901a\u8fc7\u6807\u51c6SQL\u5b8c\u6210\u6a21\u578b\u6ce8\u518c\u3001\u7ba1\u7406\u4e0e\u63a8\u7406\u5168\u6d41\u7a0b&#xff0c;\u65e0\u9700\u6570\u636e\u8fc1\u79fb\u6216\u989d\u5916\u7f16\u7a0b&#xff0c;\u652f\u6301\u6beb\u79d2\u7ea7\u65f6\u5e8f\u6570\u636e\u9884\u6d4b\u3001\u5f02\u5e38\u68c0\u6d4b\u7b49\u573a\u666f\u3002\u672c\u6307\u5357\u7ed3\u5408\u5b9e\u64cd\u4ee3\u7801&#xff0c;\u4ece\u73af\u5883\u90e8\u7f72\u5230\u5de5\u4e1a\u7ea7\u6848\u4f8b&#xff0c;\u624b\u628a\u624b\u6559\u4f60\u843d\u5730 AINode \u5e94\u7528\u3002<\/p>\n<h2>\u4e00\u3001\u6838\u5fc3\u6982\u5ff5\u4e0e\u67b6\u6784\u8ba4\u77e5<\/h2>\n<h3>1.1 \u6838\u5fc3\u7ec4\u4ef6\u5206\u5de5<\/h3>\n<p>AINode \u5e76\u975e\u72ec\u7acb\u8fd0\u884c&#xff0c;\u9700\u4e0e IoTDB \u6838\u5fc3\u8282\u70b9\u534f\u540c\u5de5\u4f5c&#xff0c;\u4e09\u8005\u804c\u8d23\u660e\u786e&#xff1a;<\/p>\n<ul>\n<li>\n<p>ConfigNode&#xff1a;\u7ba1\u7406\u96c6\u7fa4\u5143\u6570\u636e\u4e0e\u6a21\u578b\u6ce8\u518c\u4fe1\u606f&#xff0c;\u534f\u8c03\u5404\u8282\u70b9\u901a\u4fe1<\/p>\n<\/li>\n<li>\n<p>DataNode&#xff1a;\u5b58\u50a8\u65f6\u5e8f\u539f\u59cb\u6570\u636e&#xff0c;\u6267\u884cSQL\u89e3\u6790\u4e0e\u6570\u636e\u9884\u5904\u7406<\/p>\n<\/li>\n<li>\n<p>AINode&#xff1a;\u52a0\u8f7d\u6a21\u578b\u6587\u4ef6&#xff0c;\u6267\u884c\u63a8\u7406\u8ba1\u7b97&#xff0c;\u8fd4\u56de\u5206\u6790\u7ed3\u679c<\/p>\n<\/li>\n<\/ul>\n<p>\u6838\u5fc3\u4f18\u52bf&#xff1a;\u901a\u8fc7\u201c\u6570\u636e\u4e0d\u52a8\u6a21\u578b\u52a8\u201d\u7684\u67b6\u6784&#xff0c;\u907f\u514d\u8de8\u7cfb\u7edf\u6570\u636e\u8fc1\u79fb&#xff0c;\u5927\u5e45\u964d\u4f4e\u65f6\u5e8fAI\u843d\u5730\u6210\u672c\u3002<\/p>\n<h3>1.2 \u652f\u6301\u6a21\u578b\u89c4\u8303<\/h3>\n<p>AINode \u76ee\u524d\u4ec5\u652f\u6301\u7279\u5b9a\u683c\u5f0f\u6a21\u578b&#xff0c;\u9700\u63d0\u524d\u6ee1\u8db3\u4ee5\u4e0b\u6761\u4ef6&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u6846\u67b6\u7248\u672c&#xff1a;\u57fa\u4e8e PyTorch 2.4.0 \u8bad\u7ec3&#xff0c;\u907f\u514d\u4f7f\u7528\u66f4\u9ad8\u7248\u672c\u7279\u6027<\/p>\n<\/li>\n<li>\n<p>\u6587\u4ef6\u683c\u5f0f&#xff1a;PyTorch JIT \u683c\u5f0f&#xff08;model.pt&#xff09;&#xff0c;\u9700\u5305\u542b\u6a21\u578b\u7ed3\u6784\u4e0e\u6743\u91cd<\/p>\n<\/li>\n<li>\n<p>\u914d\u7f6e\u8981\u6c42&#xff1a;\u5fc5\u987b\u914d\u5957 config.yaml \u6587\u4ef6&#xff0c;\u5b9a\u4e49\u8f93\u5165\u8f93\u51fa\u7ef4\u5ea6\u7b49\u5173\u952e\u53c2\u6570<\/p>\n<\/li>\n<\/ul>\n<h2>\u4e8c\u3001\u73af\u5883\u51c6\u5907\u4e0e\u90e8\u7f72<\/h2>\n<h3>2.1 \u524d\u7f6e\u4f9d\u8d56\u68c0\u67e5<\/h3>\n<p>\u786e\u4fdd\u90e8\u7f72\u73af\u5883\u6ee1\u8db3\u4ee5\u4e0b\u8981\u6c42&#xff0c;\u907f\u514d\u8fd0\u884c\u65f6\u5f02\u5e38&#xff1a;<\/p>\n<ul>\n<li>\n<p>IoTDB \u7248\u672c&#xff1a;\u2265 2.0.5.1&#xff08;\u5efa\u8bae\u4f7f\u7528\u6700\u65b0\u7a33\u5b9a\u7248&#xff09;<\/p>\n<\/li>\n<li>\n<p>Python \u7248\u672c&#xff1a;3.9 ~ 3.12&#xff0c;\u4e14\u81ea\u5e26 pip\u3001venv \u5de5\u5177<\/p>\n<\/li>\n<li>\n<p>\u64cd\u4f5c\u7cfb\u7edf&#xff1a;Ubuntu 20.04&#043;\/MacOS&#xff08;Windows\u9700\u901a\u8fc7WSL\u90e8\u7f72&#xff09;<\/p>\n<\/li>\n<\/ul>\n<p>\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1Python\u73af\u5883&#xff1a;<\/p>\n<p># \u9a8c\u8bc1Python\u7248\u672c<br \/>\npython3 &#8211;version  # \u8f93\u51fa\u5e94\u4e3a 3.9.x ~ 3.12.x<br \/>\n# \u9a8c\u8bc1pip\u4e0evenv<br \/>\npip3 &#8211;version<br \/>\npython3 -m venv &#8211;help  # \u65e0\u62a5\u9519\u5373\u6b63\u5e38<\/p>\n<h3>2.2 AINode \u5b89\u88c5\u90e8\u7f72<\/h3>\n<h4>\u6b65\u9aa41&#xff1a;\u83b7\u53d6\u5e76\u6821\u9a8c\u5b89\u88c5\u5305<\/h4>\n<p>\u4ece IoTDB \u5b98\u7f51\u4e0b\u8f7d AINode \u5b89\u88c5\u5305&#xff0c;\u5efa\u8bae\u5148\u8fdb\u884c SHA512 \u6821\u9a8c\u786e\u4fdd\u6587\u4ef6\u5b8c\u6574&#xff1a;<\/p>\n<p># \u8fdb\u5165\u5b89\u88c5\u76ee\u5f55<br \/>\ncd \/data\/iotdb<br \/>\n# \u4e0b\u8f7d\u5b89\u88c5\u5305&#xff08;\u66ff\u6362\u4e3a\u5bf9\u5e94\u7248\u672c&#xff09;<br \/>\nwget https:\/\/www.apache.org\/dyn\/closer.lua\/iotdb\/xxx\/apache-iotdb-2.0.9-ainode-bin.zip<br \/>\n# \u6821\u9a8c\u5b89\u88c5\u5305<br \/>\nsha512sum apache-iotdb-2.0.9-ainode-bin.zip<br \/>\n# \u5bf9\u6bd4\u8f93\u51fa\u7ed3\u679c\u4e0e\u5b98\u7f51\u63d0\u4f9b\u7684\u6821\u9a8c\u7801&#xff0c;\u4e00\u81f4\u5219\u7ee7\u7eed<\/p>\n<h4>\u6b65\u9aa42&#xff1a;\u89e3\u538b\u4e0e\u914d\u7f6e\u4fee\u6539<\/h4>\n<p>\u89e3\u538b\u5b89\u88c5\u5305\u540e&#xff0c;\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u5173\u8054 IoTDB \u96c6\u7fa4&#xff1a;<\/p>\n<p># \u89e3\u538b\u5b89\u88c5\u5305<br \/>\nunzip apache-iotdb-2.0.9-ainode-bin.zip<br \/>\ncd apache-iotdb-2.0.9-ainode<\/p>\n<p># \u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<br \/>\nvim conf\/iotdb-ainode.properties<\/p>\n<p>\u5173\u952e\u914d\u7f6e\u9879\u4fee\u6539&#xff08;\u6839\u636e\u5b9e\u9645\u96c6\u7fa4\u8c03\u6574&#xff09;&#xff1a;<\/p>\n<p># \u96c6\u7fa4\u6807\u8bc6&#xff0c;\u9700\u4e0eIoTDB\u96c6\u7fa4\u4e00\u81f4<br \/>\ncluster_name&#061;defaultCluster<br \/>\n# ConfigNode\u5730\u5740&#xff08;\u5fc5\u586b&#xff0c;\u683c\u5f0f&#xff1a;IP:\u7aef\u53e3&#xff09;<br \/>\nain_seed_config_node&#061;192.168.1.100:10710<br \/>\n# DataNode\u8fde\u63a5\u4fe1\u606f&#xff08;\u7528\u4e8e\u62c9\u53d6\u6570\u636e&#xff09;<br \/>\nain_cluster_ingress_address&#061;192.168.1.101<br \/>\nain_cluster_ingress_port&#061;6667<br \/>\nain_cluster_ingress_username&#061;root<br \/>\nain_cluster_ingress_password&#061;root<\/p>\n<h4>\u6b65\u9aa43&#xff1a;\u542f\u52a8\u4e0e\u72b6\u6001\u68c0\u6d4b<\/h4>\n<p>\u901a\u8fc7\u811a\u672c\u542f\u52a8 AINode \u5e76\u9a8c\u8bc1\u8fd0\u884c\u72b6\u6001&#xff1a;<\/p>\n<p># \u542f\u52a8AINode&#xff08;Linux\/Mac&#xff09;<br \/>\nsbin\/start-ainode.sh<br \/>\n# \u505c\u6b62AINode&#xff08;\u5982\u9700&#xff09;<br \/>\n# sbin\/stop-ainode.sh<\/p>\n<p># \u68c0\u6d4b\u8282\u70b9\u72b6\u6001&#xff08;\u6210\u529f\u5219\u8fd4\u56deACTIVE&#xff09;<br \/>\ncurl http:\/\/localhost:8080\/health<br \/>\n# \u6216\u67e5\u770b\u65e5\u5fd7\u786e\u8ba4\u542f\u52a8\u72b6\u6001<br \/>\ntail -f logs\/ainode.log<\/p>\n<p>\u82e5\u542f\u52a8\u62a5\u9519\u201c\u627e\u4e0d\u5230venv\u6a21\u5757\u201d&#xff0c;\u9700\u5b89\u88c5\u5bf9\u5e94\u4f9d\u8d56&#xff1a;sudo apt install python3-venv&#xff08;Ubuntu&#xff09;\u3002<\/p>\n<h2>\u4e09\u3001\u6a21\u578b\u7ba1\u7406\u6838\u5fc3\u64cd\u4f5c&#xff08;SQL\u5b9e\u73b0&#xff09;<\/h2>\n<p>AINode \u652f\u6301\u901a\u8fc7\u6807\u51c6SQL\u5b8c\u6210\u6a21\u578b\u7684\u6ce8\u518c\u3001\u67e5\u8be2\u3001\u5220\u9664\u5168\u751f\u547d\u5468\u671f\u7ba1\u7406&#xff0c;\u65e0\u9700\u7f16\u5199Python\/Java\u4ee3\u7801\u3002<\/p>\n<h3>3.1 \u6a21\u578b\u6ce8\u518c&#xff08;CREATE MODEL&#xff09;<\/h3>\n<p>\u6ce8\u518c\u6a21\u578b\u9700\u63d0\u4f9b\u6a21\u578b\u6587\u4ef6\u8def\u5f84&#xff08;\u672c\u5730\/\u8fdc\u7a0b&#xff09;\u4e0e\u914d\u7f6e\u6587\u4ef6&#xff0c;\u4ee5\u4e0b\u5206\u4e24\u79cd\u573a\u666f\u6f14\u793a\u3002<\/p>\n<h4>\u573a\u666f1&#xff1a;\u672c\u5730\u6a21\u578b\u6ce8\u518c<\/h4>\n<p>\u5047\u8bbe\u672c\u5730 \/models\/dlinear \u76ee\u5f55\u4e0b\u5b58\u5728 model.pt \u4e0e config.yaml&#xff0c;\u914d\u7f6e\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b&#xff1a;<\/p>\n<p># config.yaml<br \/>\nconfigs:<br \/>\n  # \u5fc5\u9009\u9879&#xff1a;\u8f93\u516596\u4e2a\u65f6\u95f4\u6b65\u00d72\u4e2a\u7279\u5f81&#xff0c;\u8f93\u51fa48\u4e2a\u65f6\u95f4\u6b65\u00d72\u4e2a\u7279\u5f81<br \/>\n  input_shape: (96, 2)<br \/>\n  output_shape: (48, 2)<br \/>\n  # \u53ef\u9009\u9879&#xff1a;\u6570\u636e\u7c7b\u578b&#xff08;\u9ed8\u8ba4\u5168\u4e3afloat32&#xff09;<br \/>\n  input_type: (&#034;float32&#034;, &#034;float32&#034;)<br \/>\n  output_type: (&#034;float32&#034;, &#034;float32&#034;)<br \/>\n# \u81ea\u5b9a\u4e49\u5907\u6ce8\u4fe1\u606f<br \/>\nattributes:<br \/>\n  model_type: &#034;dlinear&#034;<br \/>\n  scenario: &#034;power_load_forecast&#034;<\/p>\n<p>\u6267\u884cSQL\u6ce8\u518c\u6a21\u578b&#xff1a;<\/p>\n<p>&#8212; \u6ce8\u518c\u672c\u5730\u6a21\u578b&#xff0c;\u6a21\u578bID\u5168\u5c40\u552f\u4e00<br \/>\nCREATE MODEL dlinear_power_forecast<br \/>\nUSING URI &#039;file:\/\/\/models\/dlinear&#039;;<\/p>\n<h4>\u573a\u666f2&#xff1a;\u8fdc\u7a0b\u6a21\u578b\u6ce8\u518c&#xff08;HuggingFace&#xff09;<\/h4>\n<p>\u76f4\u63a5\u4ece HuggingFace \u4ed3\u5e93\u6ce8\u518c\u516c\u5f00\u65f6\u5e8f\u6a21\u578b&#xff1a;<\/p>\n<p>&#8212; \u6ce8\u518cHuggingFace\u4e0a\u7684TimesFM\u6a21\u578b<br \/>\nCREATE MODEL timesfm_forecast<br \/>\nUSING URI &#039;https:\/\/huggingface.co\/google\/timesfm-2.0-500m-pytorch&#039;;<\/p>\n<p>\u6a21\u578b\u6ce8\u518c\u4e3a\u5f02\u6b65\u8fc7\u7a0b&#xff0c;\u53ef\u901a\u8fc7\u4ee5\u4e0bSQL\u67e5\u770b\u6ce8\u518c\u72b6\u6001\u3002<\/p>\n<h3>3.2 \u6a21\u578b\u67e5\u8be2\u4e0e\u72b6\u6001\u68c0\u67e5&#xff08;SHOW MODELS&#xff09;<\/h3>\n<p>\u67e5\u770b\u6240\u6709\u5df2\u6ce8\u518c\u6a21\u578b\u7684\u8be6\u60c5&#xff0c;\u5305\u62ec\u72b6\u6001\u3001\u914d\u7f6e\u7b49\u4fe1\u606f&#xff1a;<\/p>\n<p>&#8212; \u67e5\u770b\u6240\u6709\u6a21\u578b<br \/>\nSHOW MODELS;<\/p>\n<p>&#8212; \u67e5\u770b\u6307\u5b9a\u6a21\u578b\u8be6\u60c5&#xff08;\u6309ID\u8fc7\u6ee4&#xff09;<br \/>\nSHOW MODELS WHERE ModelId &#061; &#039;dlinear_power_forecast&#039;;<\/p>\n<p>\u8fd4\u56de\u7ed3\u679c\u4e2d State \u5b57\u6bb5\u542b\u4e49&#xff1a;<\/p>\n<ul>\n<li>\n<p>LOADING&#xff1a;\u6a21\u578b\u52a0\u8f7d\u4e2d&#xff08;\u8017\u65f6\u53d6\u51b3\u4e8e\u6587\u4ef6\u5927\u5c0f&#xff09;<\/p>\n<\/li>\n<li>\n<p>ACTIVE&#xff1a;\u6a21\u578b\u5c31\u7eea&#xff0c;\u53ef\u6267\u884c\u63a8\u7406<\/p>\n<\/li>\n<li>\n<p>INACTIVE&#xff1a;\u6a21\u578b\u4e0d\u53ef\u7528&#xff08;\u9700\u68c0\u67e5\u914d\u7f6e&#xff09;<\/p>\n<\/li>\n<\/ul>\n<h3>3.3 \u6a21\u578b\u5220\u9664&#xff08;DROP MODEL&#xff09;<\/h3>\n<p>\u5220\u9664\u4e0d\u518d\u4f7f\u7528\u7684\u6a21\u578b&#xff0c;\u91ca\u653e\u8d44\u6e90&#xff08;\u64cd\u4f5c\u4e0d\u53ef\u9006&#xff09;&#xff1a;<\/p>\n<p>&#8212; \u5220\u9664\u6307\u5b9a\u6a21\u578b<br \/>\nDROP MODEL dlinear_power_forecast;<\/p>\n<p>&#8212; \u6279\u91cf\u5220\u9664&#xff08;\u9700\u786e\u8ba4\u72b6\u6001\u4e3aACTIVE\/INACTIVE&#xff09;<br \/>\nDROP MODEL timesfm_forecast;<\/p>\n<h2>\u56db\u3001\u5b9e\u6218\u6848\u4f8b&#xff1a;\u65f6\u5e8f\u6570\u636e\u63a8\u7406\u5168\u6d41\u7a0b<\/h2>\n<p>\u4ee5\u201c\u7535\u529b\u8d1f\u8f7d\u9884\u6d4b\u201d\u4e3a\u4f8b&#xff0c;\u57fa\u4e8e\u5df2\u6ce8\u518c\u7684 DLinear \u6a21\u578b&#xff0c;\u901a\u8fc7 SQL \u5b8c\u6210\u5b9e\u65f6\u63a8\u7406&#xff0c;\u9884\u6d4b\u672a\u676524\u5c0f\u65f6\u7535\u7f51\u8d1f\u8f7d\u3002<\/p>\n<h3>4.1 \u6570\u636e\u51c6\u5907<\/h3>\n<p>\u5047\u8bbe IoTDB \u4e2d\u5b58\u50a8\u7535\u7f51\u6570\u636e&#xff0c;\u8def\u5f84\u4e3a root.energy.grid&#xff0c;\u5305\u542b\u5b57\u6bb5&#xff1a;<\/p>\n<ul>\n<li>\n<p>load&#xff1a;\u7535\u7f51\u8d1f\u8f7d&#xff08;\u5355\u4f4d&#xff1a;kW&#xff09;&#xff0c;float\u7c7b\u578b<\/p>\n<\/li>\n<li>\n<p>temperature&#xff1a;\u73af\u5883\u6e29\u5ea6&#xff08;\u5355\u4f4d&#xff1a;\u2103&#xff09;&#xff0c;float\u7c7b\u578b<\/p>\n<\/li>\n<\/ul>\n<p>\u63d2\u5165\u6d4b\u8bd5\u6570\u636e&#xff08;\u6a21\u62df7\u5929\u5386\u53f2\u6570\u636e&#xff09;&#xff1a;<\/p>\n<p>&#8212; \u63d2\u5165\u6d4b\u8bd5\u6570\u636e&#xff08;\u65f6\u95f4\u6233\u683c\u5f0f&#xff1a;yyyy-MM-dd HH:mm:ss&#xff09;<br \/>\nINSERT INTO root.energy.grid(timestamp, load, temperature)<br \/>\nVALUES<br \/>\n(&#039;2026-01-10 00:00:00&#039;, 1200.5, 15.2),<br \/>\n(&#039;2026-01-10 01:00:00&#039;, 1180.3, 14.8),<br \/>\n&#8212; &#8230; \u7701\u7565\u4e2d\u95f4\u6570\u636e&#xff0c;\u5171168\u6761&#xff08;7\u5929\u00d724\u5c0f\u65f6&#xff09;<br \/>\n(&#039;2026-01-16 23:00:00&#039;, 1250.7, 16.1);<\/p>\n<h3>4.2 \u5b9e\u65f6\u63a8\u7406&#xff08;CALL INFERENCE&#xff09;<\/h3>\n<p>\u8c03\u7528\u5df2\u6ce8\u518c\u7684\u6a21\u578b&#xff0c;\u57fa\u4e8e\u5386\u53f2\u6570\u636e\u9884\u6d4b\u672a\u676524\u5c0f\u65f6\u8d1f\u8f7d&#xff0c;\u4f7f\u7528 CALL INFERENCE \u51fd\u6570&#xff1a;<\/p>\n<p>&#8212; \u7535\u529b\u8d1f\u8f7d\u9884\u6d4b&#xff1a;\u57fa\u4e8e\u8fc7\u53bb7\u5929\u6570\u636e&#xff0c;\u9884\u6d4b\u672a\u676524\u5c0f\u65f6\u8d1f\u8f7d<br \/>\nCALL INFERENCE(<br \/>\n  &#039;dlinear_power_forecast&#039;,  &#8212; \u6a21\u578bID<br \/>\n  inputSql &#061;&gt; &#039;SELECT load, temperature FROM root.energy.grid WHERE time &gt; NOW() &#8211; 7d&#039;,  &#8212; \u8f93\u5165\u6570\u636eSQL<br \/>\n  predict_length &#061;&gt; 24  &#8212; \u9884\u6d4b\u6b65\u6570&#xff08;\u4e0e\u6a21\u578boutput_shape\u5339\u914d&#xff09;<br \/>\n);<\/p>\n<h3>4.3 \u63a8\u7406\u7ed3\u679c\u89e3\u6790<\/h3>\n<p>\u63a8\u7406\u7ed3\u679c\u4ee5\u8868\u683c\u5f62\u5f0f\u8fd4\u56de&#xff0c;\u5305\u542b\u9884\u6d4b\u65f6\u95f4\u6233\u3001\u8d1f\u8f7d\u9884\u6d4b\u503c\u3001\u6e29\u5ea6\u5173\u8054\u9884\u6d4b\u503c&#xff1a;<\/p>\n<table>\n<tr>\n<p>timestamp<\/p>\n<p>load_pred<\/p>\n<p>temperature_pred<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>2026-01-17 00:00:00<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>1230.8<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>15.9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>2026-01-17 01:00:00<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>1210.2<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>15.7<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8230;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8230;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8230;<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u53ef\u76f4\u63a5\u5c06\u7ed3\u679c\u63d2\u5165 IoTDB \u65b0\u8def\u5f84&#xff0c;\u7528\u4e8e\u53ef\u89c6\u5316\u6216\u4e0b\u6e38\u7cfb\u7edf\u8c03\u7528&#xff1a;<\/p>\n<p>&#8212; \u5c06\u9884\u6d4b\u7ed3\u679c\u5b58\u5165\u65b0\u8def\u5f84<br \/>\nINSERT INTO root.energy.grid_pred(timestamp, load_pred, temperature_pred)<br \/>\nSELECT timestamp, load_pred, temperature_pred<br \/>\nFROM CALL INFERENCE(<br \/>\n  &#039;dlinear_power_forecast&#039;,<br \/>\n  inputSql &#061;&gt; &#039;SELECT load, temperature FROM root.energy.grid WHERE time &gt; NOW() &#8211; 7d&#039;,<br \/>\n  predict_length &#061;&gt; 24<br \/>\n);<\/p>\n<h2>\u4e94\u3001\u5e38\u89c1\u95ee\u9898\u4e0e\u6392\u67e5<\/h2>\n<h3>5.1 \u542f\u52a8\u7c7b\u95ee\u9898<\/h3>\n<ul>\n<li>\n<p>SSL\u6a21\u5757\u9519\u8bef&#xff1a;\u6267\u884c pip3 install pyopenssl \u5b89\u88c5SSL\u4f9d\u8d56<\/p>\n<\/li>\n<li>\n<p>pip\u7248\u672c\u8fc7\u4f4e&#xff1a;\u5347\u7ea7pip&#xff1a;pip3 install &#8211;upgrade pip<\/p>\n<\/li>\n<\/ul>\n<h3>5.2 \u6a21\u578b\u6ce8\u518c\u7c7b\u95ee\u9898<\/h3>\n<ul>\n<li>\n<p>\u6ce8\u518c\u8d85\u65f6&#xff1a;\u8fdc\u7a0b\u6a21\u578b\u6587\u4ef6\u8fc7\u5927&#xff0c;\u5efa\u8bae\u5148\u4e0b\u8f7d\u81f3\u672c\u5730\u518d\u6ce8\u518c<\/p>\n<\/li>\n<li>\n<p>\u914d\u7f6e\u6587\u4ef6\u9519\u8bef&#xff1a;\u68c0\u67e5 config.yaml \u4e2d input_shape \u4e0e\u6a21\u578b\u5b9e\u9645\u8f93\u5165\u662f\u5426\u4e00\u81f4<\/p>\n<\/li>\n<\/ul>\n<h3>5.3 \u63a8\u7406\u7c7b\u95ee\u9898<\/h3>\n<ul>\n<li>\n<p>\u8f93\u5165\u7ef4\u5ea6\u4e0d\u5339\u914d&#xff1a;\u786e\u4fdd inputSql \u67e5\u8be2\u7ed3\u679c\u7684\u5217\u6570\u4e0e input_shape \u7b2c\u4e8c\u7ef4\u5ea6\u4e00\u81f4<\/p>\n<\/li>\n<li>\n<p>\u6570\u636e\u7c7b\u578b\u9519\u8bef&#xff1a;\u8c03\u6574 config.yaml \u4e2d input_type \u4e0e\u6570\u636e\u5b9e\u9645\u7c7b\u578b\u5339\u914d<\/p>\n<\/li>\n<\/ul>\n<h2>\u516d\u3001\u603b\u7ed3<\/h2>\n<p>IoTDB AINode \u6253\u7834\u4e86\u4f20\u7edf\u201c\u5b58\u50a8-\u5206\u6790\u201d\u5206\u79bb\u7684\u67b6\u6784&#xff0c;\u901a\u8fc7 SQL \u539f\u751f\u9a71\u52a8 AI \u80fd\u529b&#xff0c;\u8ba9\u65f6\u5e8f\u6570\u636e\u7684\u667a\u80fd\u5206\u6790\u65e0\u9700\u8de8\u7cfb\u7edf\u534f\u4f5c\u3002\u672c\u6587\u4ece\u90e8\u7f72\u3001\u6a21\u578b\u7ba1\u7406\u5230\u5b9e\u6218\u63a8\u7406&#xff0c;\u8986\u76d6\u4e86 AINode \u6838\u5fc3\u7528\u6cd5&#xff0c;\u5173\u952e\u5728\u4e8e\u628a\u63e1\u201c\u6a21\u578b\u683c\u5f0f\u89c4\u8303\u201d\u4e0e\u201cSQL\u51fd\u6570\u8c03\u7528\u201d\u4e24\u5927\u6838\u5fc3\u3002\u540e\u7eed\u53ef\u7ed3\u5408\u5185\u7f6e Timer \u7cfb\u5217\u6a21\u578b&#xff0c;\u62d3\u5c55\u5f02\u5e38\u68c0\u6d4b\u3001\u7f3a\u5931\u503c\u586b\u8865\u7b49\u573a\u666f&#xff0c;\u5b9e\u73b0\u66f4\u4e30\u5bcc\u7684\u65f6\u5e8fAI\u5e94\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache IoTDB \u4f5c\u4e3a\u5f00\u6e90\u65f6\u5e8f\u6570\u636e\u5e93\u6807\u6746&#xff0c;\u4e13\u4e3a\u7269\u8054\u7f51\u573a\u666f\u8bbe\u8ba1&#xff0c;\u800c AINode \u4f5c\u4e3a\u5176\u539f\u751fAI\u8282\u70b9&#xff0c;\u5b9e\u73b0\u4e86\u201c\u6570\u636e\u5e93\u5373\u5206\u6790\u5e73\u53f0\u201d\u7684\u7a81\u7834\u3002AINode \u53ef\u76f4\u63a5\u96c6\u6210\u673a\u5668\u5b66\u4e60\u6a21\u578b&#xff0c;\u901a\u8fc7\u6807\u51c6SQL\u5b8c\u6210\u6a21\u578b\u6ce8\u518c\u3001\u7ba1\u7406\u4e0e\u63a8\u7406\u5168\u6d41\u7a0b&#xff0c;\u65e0\u9700\u6570\u636e\u8fc1\u79fb\u6216\u989d\u5916\u7f16\u7a0b&#xff0c;\u652f\u6301\u6beb\u79d2\u7ea7\u65f6\u5e8f\u6570\u636e\u9884\u6d4b\u3001\u5f02\u5e38\u68c0\u6d4b\u7b49\u573a\u666f\u3002\u672c\u6307\u5357\u7ed3\u5408\u5b9e\u64cd\u4ee3\u7801&#xff0c;\u4ece\u73af\u5883\u90e8\u7f72\u5230\u5de5\u4e1a\u7ea7\u6848\u4f8b&#xff0c;\u624b\u628a\u624b\u6559\u4f60\u843d\u5730 AINode \u5e94\u7528<\/p>\n","protected":false},"author":2,"featured_media":60748,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[4062,768,50],"topic":[],"class_list":["post-60749","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-iotdb","tag-sql","tag-50"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>IoTDB AINode\uff1aSQL\u9a71\u52a8\u65f6\u5e8fAI\u5168\u6d41\u7a0b\u843d\u5730 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/60749.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"IoTDB AINode\uff1aSQL\u9a71\u52a8\u65f6\u5e8fAI\u5168\u6d41\u7a0b\u843d\u5730 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Apache IoTDB \u4f5c\u4e3a\u5f00\u6e90\u65f6\u5e8f\u6570\u636e\u5e93\u6807\u6746&#xff0c;\u4e13\u4e3a\u7269\u8054\u7f51\u573a\u666f\u8bbe\u8ba1&#xff0c;\u800c AINode \u4f5c\u4e3a\u5176\u539f\u751fAI\u8282\u70b9&#xff0c;\u5b9e\u73b0\u4e86\u201c\u6570\u636e\u5e93\u5373\u5206\u6790\u5e73\u53f0\u201d\u7684\u7a81\u7834\u3002AINode \u53ef\u76f4\u63a5\u96c6\u6210\u673a\u5668\u5b66\u4e60\u6a21\u578b&#xff0c;\u901a\u8fc7\u6807\u51c6SQL\u5b8c\u6210\u6a21\u578b\u6ce8\u518c\u3001\u7ba1\u7406\u4e0e\u63a8\u7406\u5168\u6d41\u7a0b&#xff0c;\u65e0\u9700\u6570\u636e\u8fc1\u79fb\u6216\u989d\u5916\u7f16\u7a0b&#xff0c;\u652f\u6301\u6beb\u79d2\u7ea7\u65f6\u5e8f\u6570\u636e\u9884\u6d4b\u3001\u5f02\u5e38\u68c0\u6d4b\u7b49\u573a\u666f\u3002\u672c\u6307\u5357\u7ed3\u5408\u5b9e\u64cd\u4ee3\u7801&#xff0c;\u4ece\u73af\u5883\u90e8\u7f72\u5230\u5de5\u4e1a\u7ea7\u6848\u4f8b&#xff0c;\u624b\u628a\u624b\u6559\u4f60\u843d\u5730 AINode \u5e94\u7528\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/60749.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-16T02:25:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260116022523-6969a19329b40.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/60749.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/60749.html\",\"name\":\"IoTDB AINode\uff1aSQL\u9a71\u52a8\u65f6\u5e8fAI\u5168\u6d41\u7a0b\u843d\u5730 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-16T02:25:25+00:00\",\"dateModified\":\"2026-01-16T02:25:25+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/60749.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/60749.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/60749.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IoTDB AINode\uff1aSQL\u9a71\u52a8\u65f6\u5e8fAI\u5168\u6d41\u7a0b\u843d\u5730\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"IoTDB AINode\uff1aSQL\u9a71\u52a8\u65f6\u5e8fAI\u5168\u6d41\u7a0b\u843d\u5730 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/60749.html","og_locale":"zh_CN","og_type":"article","og_title":"IoTDB AINode\uff1aSQL\u9a71\u52a8\u65f6\u5e8fAI\u5168\u6d41\u7a0b\u843d\u5730 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Apache IoTDB \u4f5c\u4e3a\u5f00\u6e90\u65f6\u5e8f\u6570\u636e\u5e93\u6807\u6746&#xff0c;\u4e13\u4e3a\u7269\u8054\u7f51\u573a\u666f\u8bbe\u8ba1&#xff0c;\u800c AINode \u4f5c\u4e3a\u5176\u539f\u751fAI\u8282\u70b9&#xff0c;\u5b9e\u73b0\u4e86\u201c\u6570\u636e\u5e93\u5373\u5206\u6790\u5e73\u53f0\u201d\u7684\u7a81\u7834\u3002AINode \u53ef\u76f4\u63a5\u96c6\u6210\u673a\u5668\u5b66\u4e60\u6a21\u578b&#xff0c;\u901a\u8fc7\u6807\u51c6SQL\u5b8c\u6210\u6a21\u578b\u6ce8\u518c\u3001\u7ba1\u7406\u4e0e\u63a8\u7406\u5168\u6d41\u7a0b&#xff0c;\u65e0\u9700\u6570\u636e\u8fc1\u79fb\u6216\u989d\u5916\u7f16\u7a0b&#xff0c;\u652f\u6301\u6beb\u79d2\u7ea7\u65f6\u5e8f\u6570\u636e\u9884\u6d4b\u3001\u5f02\u5e38\u68c0\u6d4b\u7b49\u573a\u666f\u3002\u672c\u6307\u5357\u7ed3\u5408\u5b9e\u64cd\u4ee3\u7801&#xff0c;\u4ece\u73af\u5883\u90e8\u7f72\u5230\u5de5\u4e1a\u7ea7\u6848\u4f8b&#xff0c;\u624b\u628a\u624b\u6559\u4f60\u843d\u5730 AINode \u5e94\u7528","og_url":"https:\/\/www.wsisp.com\/helps\/60749.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-16T02:25:25+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260116022523-6969a19329b40.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/60749.html","url":"https:\/\/www.wsisp.com\/helps\/60749.html","name":"IoTDB AINode\uff1aSQL\u9a71\u52a8\u65f6\u5e8fAI\u5168\u6d41\u7a0b\u843d\u5730 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-16T02:25:25+00:00","dateModified":"2026-01-16T02:25:25+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/60749.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/60749.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/60749.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"IoTDB AINode\uff1aSQL\u9a71\u52a8\u65f6\u5e8fAI\u5168\u6d41\u7a0b\u843d\u5730"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/60749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=60749"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/60749\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/60748"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=60749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=60749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=60749"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=60749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}