TimechoDB v1.3.0 is officially released! This release introduces the groundbreaking "AINode", the internal machine learning framework, and brings a comprehensive upgrade to the permission module, supporting sequence-level permission grants. Additionally, various optimizations have been made to features such as views and stream processing, enhancing product usability while boosting version stability and overall performance.
Highlights: Internal Machine Learning Framework "AINode"
What is AINode?
AINode is the third internal node after ConfigNode and DataNode in Apache IoTDB. This node extends the capability of IoTDB to perform machine learning analysis on time series data by interacting with the DataNode and ConfigNode clusters. AINode allows the integration of existing machine learning models by registering them and executing time series analysis tasks through simple SQL statements on specified time series data. This seamlessly combines model creation, management, and inference within the database engine. The framework currently supports common machine learning algorithms or proprietary models for typical time series analysis scenarios like time series prediction and anomaly detection.
Advantages of AINode
Ease of Use: AINode simplifies the process of managing and inferring machine learning models through SQL statements (e.g. CREATE MODEL, CALL INFERENCE, ...), eliminating the need for Python or Java programming.
Real-time Inference without Data Movement: Leveraging IoTDB's native machine learning capabilities allows direct application of stored data in machine learning model inference, eliminating the need to move data to a separate machine learning platform. This accelerates data processing, enhances security, and reduces costs.
Built-in Algorithms: AINode supports leading machine learning analysis algorithms, covering typical time series analysis tasks.
Time Series Forecasting: Learns patterns of change from past time series to predict the most likely future sequence based on given observed values.
Anomaly Detection for Time Series: Detects and identifies abnormal values in given time series data, aiding in discovering unusual behavior.
Time Series Annotation: Adds additional information or labels to each data point or specific time periods, such as events, anomalies, or trend changes, for better data understanding and analysis.
Use Cases of AINode
Taking the example of predicting power load in the electricity scenario, AINode can be employed for forecasting purposes. In industrial settings, predicting power load is crucial for optimizing power supply, energy and resource conservation, supporting planning and expansion, and enhancing the reliability of the power system.
We utilized the ETTh1 test dataset for prediction1. This dataset comprises electricity data collected every hour, with each data entry consisting of load and oil temperature values, namely High Useful Load, High Useless Load, Middle Useless Load, Low Useful Load, Low Useless Load, and Oil Temperature.
On this dataset, the model inference functionality of IoTDB-ML can predict the oil temperature for a future period based on the historical values of high, medium, and low loads and their corresponding timestamps. This empowers automatic regulation and monitoring of the power grid transformer.
Importing the ETTh1 dataset into IoTDB and incorporating the pre-trained deep learning model DLinear from Hugging Face2, we can use the following SQL statement to invoke the model for data inference, obtaining the predicted data:
IoTDB> call inference(dlinear_example, "select s0,s1,s2,s3,s4,s5,s6 from root.eg.etth", window=head(96))
+-----------+----------+----------+------------+---------+----------+----------+
| output0| output1| output2| output3| output4| output5| output6|
+-----------+----------+----------+------------+---------+----------+----------+
| 10.319546| 3.1450553| 7.877341| 1.5723765|2.7303758| 1.1362307| 8.867775|
| 10.443649| 3.3286757| 7.8593454| 1.7675098| 2.560634| 1.1177158| 8.920919|
| 10.883752| 3.2341104| 8.47036| 1.6116762|2.4874182| 1.1760603| 8.798939|
......
| 8.0115595| 1.2995274| 6.9900327|-0.098746896| 3.04923| 1.176214| 9.548782|
| 8.612427| 2.5036244| 5.6790237| 0.66474205|2.8870275| 1.2051733| 9.330128|
| 10.096699| 3.399722| 6.9909| 1.7478468|2.7642853| 1.1119363| 9.541455|
+-----------+----------+----------+------------+---------+----------+----------+
Total line number = 48
Comparing the predicted oil temperature with the actual results, visualizations show a high degree of consistency in trends between the predicted curve (yellow line) and the actual oil temperature data from the dataset (blue line).
Other Features
New Features & Improvements:
New AINode Internal Machine Learning Module (Only available on TimechoDB)
Upgrade to the permission module, supporting permission settings at the time series granularity
Support for SSL communication encryption between client and server
Addition of multiple metrics monitoring items in the stream processing module
Support for LAST queries in non-writable view sequences
Optimization of data point monitoring item statistics accuracy
Optimization of the 'show path' statement to address longer response times ...
Bug Fixes:
Support for leap year judgment in group by year
Fix for errors in paths containing '*' character
Fix for NullPointerException (NPE) in Show Cluster in a network partition environment
Fix for potential data point loss issue during sequence alignment flush after restart
Fix for the occurrence of empty files after restart recovery ...
For more details of AINode, please read the user manual: https://www.timecho-global.com/docs/UserGuide/latest/User-Manual/AINode_timecho.html#_1-advantageous-features
Sources
ETTh1 test dataset: https://alioss.timecho.com/docs/img/ETTh1.csv
Hugging Face: https://huggingface.co/hvlgo/dlinear/resolve/main