This invention discloses a method and
system for time-
series data persistence based on a data service platform, belonging to the field of time-series
database technology. The technical problem this invention aims to solve is how to improve the query performance of total time-
series data on a data service platform while simultaneously increasing file utilization. The technical solution adopted is as follows: The method involves writing the collected time-
series data into memory, dividing it into multiple blocks of fixed size, and filling them with the data. When a block is full, the data is filed into the
file system. Specifically, the following steps are taken: defining the file structure, including a
data file (.data) and an index file (.idx); converting row-based data to column-based data; compressing by column, configuring the `compress` parameter to enable or disable compression; using different compression algorithms for each column based on its
data type; and persisting the compressed data to the
file system.