The invention discloses a ship multi-level high-efficiency track
compression method, which comprises the following steps of: firstly connecting a kafka
data source, dynamically generating a track compression
algorithm with a plurality of levels connected in series according to program configuration, default to generate four levels, namely day, week, month and quarter, and then,
processing and reserving data on each layer through the compression
algorithm, and sending the data to the kafka for storage. According to the technical scheme, track compression is calculated in real time, compression is continuous, new storage points can be checked and displayed immediately, the problem of off-line calculation window
boundary data redundancy does not exist, flexibility, high performance and high adaptability are achieved, the requirement for reserving track detailed characteristics in short query time can be met, and the method is suitable for large-scale popularization and application. The method can also guarantee a rough track with long query time and high-performance quick response, can meet the query requirements of different tracks from several minutes to several years, can flexibly configure the layer number of track compression algorithms, is in father-son series connection in each layer, is high in performance, and can be flexibly combined with a
complex algorithm and a
simple algorithm in each layer. And most track storage and query scenes are met.