You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/UserGuide/Master/Table/AI-capability/AINode_apache.md
+70-41Lines changed: 70 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,17 +21,25 @@
21
21
22
22
# AINode
23
23
24
-
AINode is an IoTDB native node designed to support the registration, management, and invocation of large-scale timeseries models. It comes with industry-leading proprietary timeseries models such as Timer and Sundial. These models can be invoked through standard SQL statements, enabling real-time inference of time series data at the millisecond level, and supporting application scenarios such as trend forecasting, missing value imputation, and anomaly detection for time series data.
24
+
AINode is a native IoTDB node that supports the registration, management, and invocation of time-series-related models. It comes with built-in industry-leading self-developed time-series large models, such as the Timer series developed by Tsinghua University. These models can be invoked through standard SQL statements, enabling real-time inference of time series data at the millisecond level, and supporting application scenarios such as trend forecasting, missing value imputation, and anomaly detection for time series data.
The responsibilities of the three nodes are as follows:
31
32
32
-
-**ConfigNode**: responsible for storing and managing the meta-information of the model; responsible for distributed node management.
33
-
-**DataNode**: responsible for receiving and parsing SQL requests from users; responsible for storing time-series data; responsible for preprocessing computation of data.
34
-
-**AINode**: responsible for model file import creation and model inference.
33
+
-**ConfigNode:**
34
+
- Manages distributed nodes and handles load balancing across the system.
35
+
-**DataNode:**
36
+
- Receives and parses user SQL queries.
37
+
- Stores time-series data.
38
+
- Performs preprocessing computations on raw data.
39
+
-**AINode:**
40
+
- Manages and utilizes time-series models (including training/inference).
41
+
- Supports deep learning and machine learning workflows.
42
+
35
43
36
44
## 1. Advantageous features
37
45
@@ -55,11 +63,11 @@ Compared with building a machine learning service alone, it has the following ad
55
63
-**Create**: Load externally designed or trained model files/algorithms into AINode for unified management and usage by IoTDB.
56
64
-**Inference**: Use the created model to complete time series analysis tasks applicable to the model on specified time series data.
57
65
-**Built-in Capabilities**: AINode comes with machine learning algorithms or self-developed models for common time series analysis scenarios (e.g., forecasting and anomaly detection).
58
-

66
+

59
67
60
68
## 3. Installation and Deployment
61
69
62
-
The deployment of AINode can be found in the document [Deployment Guidelines](../Deployment-and-Maintenance/AINode_Deployment_apache.md#ainode-deployment).
70
+
The deployment of AINode can be found in the document [AINode Deployment](../Deployment-and-Maintenance/AINode_Deployment_apache.md).
63
71
64
72
65
73
## 4. Usage Guide
@@ -80,12 +88,12 @@ Models that meet the following criteria can be registered with AINode:
80
88
The SQL syntax for model registration is defined as follows:
81
89
82
90
```SQL
83
-
create model <model_name> using uri <uri>
91
+
create model <model_id> using uri <uri>
84
92
```
85
93
86
94
Detailed meanings of SQL parameters:
87
95
88
-
-**model_name**: The global unique identifier for the model, non-repeating. Model names have the following constraints:
96
+
-**model_id**: The global unique identifier for the model, non-repeating. Model names have the following constraints:
@@ -117,7 +125,7 @@ In addition to registering local model files, remote resource paths can be speci
117
125
118
126
#### Example
119
127
120
-
The current example folder contains model.pt (trained model) and config.yaml with the following content:
128
+
The [example folder](https://github.com/apache/iotdb/tree/master/integration-test/src/test/resources/ainode-example) contains model.pt (trained model) and config.yaml with the following content:
121
129
122
130
```YAML
123
131
configs:
@@ -157,41 +165,56 @@ Registered models can be queried using the `show models` command. The SQL defini
157
165
```SQL
158
166
show models
159
167
160
-
show models <model_name>
168
+
show models <model_id>
161
169
```
162
170
163
171
In addition to displaying all models, specifying a `model_id` shows details of a specific model. The display includes:
1. The `forecast` function predicts all columns in the input table by default (excluding the time column and columns specified in `partition by`).
245
268
2. The `forecast` function does not require the input data to be in any specific order. It sorts the input data in ascending order by the timestamp (specified by the `TIMECOL` parameter) before invoking the model for prediction.
246
-
3. Different models have different requirements for the number of input data rows:
247
-
-If the input data has fewer rows than the minimum requirement, an error will be thrown.
248
-
- If the input data exceeds the maximum row limit, the last rows that meet the requirement will be automatically truncated for processing.
249
-
- Among the currently built-in models in AINode, only `sundial` has a row limit. It supports a maximum of 2880 input rows. If exceeded, the last 2880 rows will be automatically used.
269
+
3. Different models have varying requirements for the number of input data rows. If the input data has fewer rows than the minimum requirement, an error will be reported.
270
+
-Among the current built-in models in AINode:
271
+
- Timer-XL requires at least 96 rows of input data.
272
+
- Timer-Sundial requires at least 16 rows of input data.
250
273
4. The result columns of the `forecast` function include all input columns from the input table, with their original data types preserved. If `preserve_input = true`, an additional `is_input` column will be included to indicate whether a row is from the input data.
251
274
- Currently, only columns of type INT32, INT64, FLOAT, or DOUBLE are supported for prediction. Otherwise, an error will occur: "The type of the column [%s] is [%s], only INT32, INT64, FLOAT, DOUBLE is allowed."
252
275
5.`output_start_time` and `output_interval` only affect the generation of the timestamp column in the output results. Both are optional parameters:
253
276
-`output_start_time` defaults to the last timestamp of the input data plus `output_interval`.
254
277
-`output_interval` defaults to the sampling interval of the input data, calculated as: (last timestamp - first timestamp) / (number of rows - 1).
255
278
- The timestamp of the Nth output row is calculated as: `output_start_time + (N - 1) * output_interval`.
256
279
257
-
#### Example
280
+
**Example: Database and table must be pre-created**
Using the ETTh1-tab dataset:[ETTh1-tab](/img/ETTh1-tab.csv)。
260
289
@@ -314,7 +343,7 @@ It costs 1.615s
314
343
315
344
### 4.5 Time Series Large Model Import Steps
316
345
317
-
AINode supports multiple time series large models. For deployment, refer to [Time Series Large Model](https://timecho.com/docs/zh/UserGuide/latest/AI-capability/TimeSeries-Large-Model.html)
346
+
AINode supports multiple time series large models. For deployment, refer to [Time Series Large Model](../AI-capability/TimeSeries-Large-Model.md)
0 commit comments