Lossy compression method and system for DCS time sequence database
By using the lossy compression method of preset dead zone values and LZSS algorithms in the DCS timing database, the problem of insufficient data processing and discarding accuracy is solved, efficient data compression and decompression is achieved, hardware resource consumption is reduced, and resource-constrained needs are adapted to industrial scenarios.
Patent Information
- Application Number
- CN202510627022.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-08-26
AI Technical Summary
The existing DCS timing database lossy compression methods are insufficient in the accuracy and flexibility of data processing and discarding during compression and decompression, which affects compression efficiency and is difficult to adapt to industrial scenarios with limited resources, resulting in data distortion.
A data filtering mechanism with preset deadband values and dynamic thresholds is adopted, combined with the LZSS algorithm, the timestamps, numerical values and quality codes are preprocessed, redundant data is filtered through cache, and points are interpolated during the decompression stage to ensure data continuity and integrity.
It realizes efficient lossy compression, significantly reduces storage requirements, reduces hardware configuration costs, improves compression ratio and decompression efficiency, adapts to resource consumption balance in various industrial scenarios, and ensures data timing continuity and integrity.
Smart Images

Figure CN120546702A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of DCS system data processing, and in particular relates to a lossy compression method and system for a DCS time series database. Background Art
[0002] A DCS (Distributed Control System) must collect and store large amounts of time-series data (such as timestamps, values, and quality codes) in real time to support equipment monitoring, fault tracing, and data analysis. The DCS's historical station stores time-series data collected from lower-level computers. When the system has a large number of nodes, the amount of data stored daily can reach hundreds of gigabytes. To meet long-term storage requirements, the upper-level computer typically requires at least three years of data storage, requiring larger hard drives to store the data, significantly increasing hardware costs.
[0003] As an improvement, compression methods for time series data are mainly divided into two categories: lossless and lossy. While lossless compression can completely preserve the original data, its compression ratio is limited, making it difficult to effectively reduce storage size. Furthermore, the compression process consumes a lot of resources such as CPU and memory, which may affect the real-time performance of the system. While lossy compression technology can improve the compression ratio by selecting data, existing lossy compression methods lack precision and flexibility in data processing, discarding, and storage during compression and decompression, affecting compression efficiency and potentially causing data distortion. This makes it relatively difficult to adapt to resource-constrained industrial scenarios. Summary of the Invention
[0004] The present invention provides a lossy compression method and system for a DCS time series database, aiming to solve the problems in current lossy compression, such as insufficient precision and flexibility in data processing, discarding, and storage during compression and decompression, which affects compression efficiency and may cause data distortion, making it relatively difficult to adapt to resource-constrained industrial scenarios.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions: The present invention provides a lossy compression method for a DCS time series database, comprising the following steps: S1. Receive time series data of each data point according to a preset sampling period. The time series data includes a timestamp, a value, and a quality code. Compare the values and quality codes received at the current moment with those received at the previous moment. If the difference is less than a preset dead zone value and the quality codes are consistent, discard the current data. Otherwise, store the current timestamp, value, and quality code in a cache. S2. When the time series data in the cache reaches a preset capacity, the time series data in the cache is divided into a timestamp array, a value array, and a quality code array, and sorted in ascending order of timestamps; S3. Preprocess the timestamp array, quality code array, and value array: Compare the differences between adjacent timestamps in sequence. If the difference is equal to the preset sampling period, skip it. If the difference is greater than the sampling period, add the missing timestamp to form a timestamp sequence. Recording the starting timestamp and duration of consecutive identical quality codes to form quality code data, and recording the starting timestamp and duration of consecutive identical numerical values to form numerical data; converting the quality code data and numerical data into a preset format; S4. Concatenate the preprocessed timestamp array, quality code array, and value array in a preset order, and compress them using the LZSS algorithm to generate compressed data; associate the compressed data with the data point identifier, start time, end time, and data volume information and store them in a time series database; S5. Read the compressed data from the time series database, decompress it using the LZSS algorithm, restore the timestamp sequence, quality code sequence, and numerical sequence, and interpolate the missing timestamps according to the supplementary rules to finally restore the time series data.
[0006] In some implementations, in S1 , the cache allocates a fixed-capacity storage space for each data point, and the preset dead zone value is a user-configurable dynamic threshold.
[0007] In some implementations, in S3, supplementing the missing timestamp includes: dividing the duration of the missing time period by the sampling period to generate an arithmetic progression with the starting timestamp as a reference and the sampling period as a step length.
[0008] In some implementations, in S3, forming the quality code data specifically includes: if the quality code changes, recording the changed quality code and its corresponding start timestamp, and calculating the number of consecutive appearances of the quality code based on the duration.
[0009] In some embodiments, in S3, forming numerical data specifically includes: if the difference in the numerical values exceeds a preset dead zone value, recording the changed numerical value and its corresponding start timestamp, and calculating the number of consecutive occurrences of the numerical value by the duration.
[0010] In some embodiments, in S4, the preset order includes: a data point identifier, a start time, an end time, a data volume, a timestamp array, a quality code array, and a value array.
[0011] In some implementations, in S5 , restoring the timestamp sequence, the quality code sequence, and the numerical sequence is performed based on the ID, start time, end time, and quantity information in the decompressed data.
[0012] In some embodiments, in S5, interpolating and filling points includes: if the difference between adjacent timestamps exceeds a preset sampling period, determining the number of timestamps to be supplemented based on the difference divided by the preset sampling period, and filling the supplementary points with the value and quality code of the previous timestamp.
[0013] In some embodiments, in S5 , redundant data is removed after decompression: starting from the second data point, if the value and quality code of the current data point are consistent with those of the previous data point, the data of the current data point is deleted.
[0014] The present invention also provides a lossy compression system for a DCS time series database, the system comprising a data processing module, a data compression module, and a data decompression module; wherein: Data processing module: used to receive time series data of each data point according to the preset sampling period. The time series data includes timestamp, value and quality code; compare the value and quality code received at the current moment with the value and quality code received at the previous moment. If the difference is less than the preset dead zone value and the quality code is consistent, the current data is discarded; otherwise, the current timestamp, value and quality code are stored in the cache; Data compression module: When the time series data in the cache reaches the preset capacity, it is used to divide the time series data in the cache into a timestamp array, a value array, and a quality code array, and sort them in ascending order of timestamps; Preprocess the timestamp array, quality code array, and value array: Compare the differences between adjacent timestamps in sequence. If the difference is equal to the preset sampling period, skip it. If the difference is greater than the sampling period, add the missing timestamp to form a timestamp sequence. Recording the starting timestamp and duration of consecutive identical quality codes to form quality code data, and recording the starting timestamp and duration of consecutive identical numerical values to form numerical data; converting the quality code data and numerical data into a preset format; The pre-processed timestamp array, quality code array, and value array are concatenated in a preset order and compressed using the LZSS algorithm to generate compressed data. The compressed data is associated with the data point identifier, start time, end time, and data volume information and stored in a time series database. Data decompression module: used to read compressed data from the time series database, decompress it using the LZSS algorithm, restore the timestamp sequence, quality code sequence, and numerical sequence, and interpolate missing timestamps according to the supplementary rules to finally recover the time series data.
[0015] Compared with the prior art, the lossy compression method and system for a DCS time series database of the present invention has the following beneficial effects: The present invention provides a lossy compression method for a DCS time series database, which can achieve lossy compression of time series data and achieve a high compression ratio of data by configuring dead zone values and data preprocessing. Efficient and accurate data decompression can be achieved, and compared with lossless compression of time series data, more resources such as CPU, memory, and hard disk can be saved. The present invention is based on a data screening mechanism with preset dead zone values and dynamic thresholds to effectively discard redundant data; combined with the efficient compression of the LZSS algorithm, the compression ratio is improved, the storage capacity of the time series database is reduced, and the hardware configuration cost is reduced. The present invention preprocesses timestamps, quality codes, and numerical values to reduce the data scale during compression and reduce the real-time load of the CPU and memory. Compared with lossless compression algorithms, resource consumption is more balanced, and combined with an efficient decompression method, the adaptability to various industrial scenarios is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings in the specification are used to provide further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0017] Figure 1 The figure is a flow chart of a lossy compression method for a DCS time series database according to the present invention. DETAILED DESCRIPTION
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0019] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.
[0020] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0021] In the description of the embodiments of the present invention, it should be noted that if the terms "upper," "lower," "horizontal," "inner," etc. appear, the orientation or positional relationship indicated is based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the inventive product is typically placed when in use. These terms are merely for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or component referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on the present invention. In addition, the terms "first," "second," etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0022] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0023] In the description of the embodiments of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "disposed," "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0024] How to achieve a high data compression ratio and efficient and accurate data decompression? Compared with lossless compression of time series data, how to save more CPU, memory, hard disk and other resources, control costs and improve applicability.
[0025] Based on this, Figure 1 As shown, the present invention provides a lossy compression method for a DCS time series database, comprising the following steps: S1. Receive time series data of each data point according to a preset sampling period. The time series data includes a timestamp, a value, and a quality code. Compare the values and quality codes received at the current moment with those received at the previous moment. If the difference is less than a preset dead zone value and the quality codes are consistent, discard the current data. Otherwise, store the current timestamp, value, and quality code in a cache. S2. When the time series data in the cache reaches a preset capacity, the time series data in the cache is divided into a timestamp array, a value array, and a quality code array, and sorted in ascending order of timestamps; S3. Preprocess the timestamp array, quality code array, and value array: Compare the differences between adjacent timestamps in sequence. If the difference is equal to the preset sampling period, skip it. If the difference is greater than the sampling period, add the missing timestamp to form a timestamp sequence. Recording the starting timestamp and duration of consecutive identical quality codes to form quality code data, and recording the starting timestamp and duration of consecutive identical numerical values to form numerical data; converting the quality code data and numerical data into a preset format; S4. Concatenate the preprocessed timestamp array, quality code array, and value array in a preset order, and compress them using the LZSS algorithm to generate compressed data; associate the compressed data with the data point identifier, start time, end time, and data volume information and store them in a time series database; S5. Read the compressed data from the time series database, decompress it using the LZSS algorithm, restore the timestamp sequence, quality code sequence, and numerical sequence, and interpolate the missing timestamps according to the supplementary rules to finally restore the time series data.
[0026] This invention proposes a lossy compression method for DCS time series databases. By integrating data screening, preprocessing, and compression, it optimizes the entire process from data acquisition to storage, significantly reducing storage requirements and improving processing efficiency. Based on pre-set dead zone values and quality code consistency, it flexibly discards redundant data, preventing invalid data from occupying storage resources. Missing timestamps are supplemented during preprocessing, and interpolation is used during decompression to ensure the temporal continuity of compressed data and improve the accuracy of subsequent analysis.
[0027] In some embodiments, the present invention combines the efficient compression of the LZSS algorithm to significantly improve compression ratios, reduce the storage requirements of time series databases, and lower hardware configuration costs. This invention preprocesses timestamps, quality codes, and numerical values to reduce the data size during compression and lower the real-time load on the CPU and memory. Compared to lossless compression algorithms, this method offers more balanced resource consumption and is suitable for the real-time demands of industrial scenarios.
[0028] Furthermore, the present invention ensures the continuity and integrity of the compressed timestamp sequence by supplementing missing timestamps and interpolating points, avoids data distortion caused by sampling period deviation, and improves the reliability of subsequent analysis.
[0029] The user-configurable dynamic dead zone value and fixed-capacity cache of the present invention support adjustment of data discard sensitivity and memory usage according to actual working conditions, balancing compression efficiency and data accuracy requirements.
[0030] Specifically, the present invention removes redundant data after decompression and streamlines the recovered data volume by comparing the numerical values and quality codes of adjacent data points for consistency, improving storage and query efficiency. Data is spliced in a preset order, and rapid parsing based on information such as ID and start time ensures a clear and efficient decompression process, reducing data recovery time.
[0031] The LZSS algorithm adopted in this invention combines the characteristics of time series data (time stamp and quality code are processed independently) to ensure the compression rate while avoiding the damage of traditional lossy compression to key information such as quality code, thus meeting the stringent requirements of industrial scenarios for data integrity.
[0032] The present invention satisfies the demand of industrial systems for long-term data storage by storing compressed data in association with information such as data point identifiers and time ranges.
[0033] The present invention also provides a lossy compression system for a DCS time series database, the system comprising a data processing module, a data compression module, and a data decompression module; wherein: Data processing module: used to receive time series data of each data point according to the preset sampling period. The time series data includes timestamp, value and quality code; compare the value and quality code received at the current moment with the value and quality code received at the previous moment. If the difference is less than the preset dead zone value and the quality code is consistent, the current data is discarded; otherwise, the current timestamp, value and quality code are stored in the cache; Data compression module: When the time series data in the cache reaches the preset capacity, it is used to divide the time series data in the cache into a timestamp array, a value array, and a quality code array, and sort them in ascending order of timestamps; Preprocess the timestamp array, quality code array, and value array: Compare the differences between adjacent timestamps in sequence. If the difference is equal to the preset sampling period, skip it. If the difference is greater than the sampling period, add the missing timestamp to form a timestamp sequence. Recording the starting timestamp and duration of consecutive identical quality codes to form quality code data, and recording the starting timestamp and duration of consecutive identical numerical values to form numerical data; converting the quality code data and numerical data into a preset format; The pre-processed timestamp array, quality code array, and value array are concatenated in a preset order and compressed using the LZSS algorithm to generate compressed data. The compressed data is associated with the data point identifier, start time, end time, and data volume information and stored in a time series database. Data decompression module: used to read compressed data from the time series database, decompress it using the LZSS algorithm, restore the timestamp sequence, quality code sequence, and numerical sequence, and interpolate missing timestamps according to the supplementary rules to finally recover the time series data.
[0034] The following further describes in detail a lossy compression method and system for a DCS time series database of the present invention through specific embodiments.
[0035] Time series data is based on changes in time. The data that needs to be stored currently consists of the timestamp, value, and quality code for each point. Timestamps are periodic data, and the host computer periodically reads data from the slave computer. Values and quality codes are constantly changing. Preprocessing the data based on specific rules reduces the amount of data compressed into the storage, improves the compression ratio, and ultimately reduces disk usage.
[0036] Data compression.
[0037] 1) The database allocates memory for each point that can store 1024 moments of data. The acquisition program periodically inserts the collected data into the database, typically writing a value (including three attributes: timestamp, value, and quality code) to each point every 1s or 500ms. After receiving each value, the database compares it with the data and quality code written to the cache at the previous moment. If the difference between the current value and the value written to the cache is less than the deadband value and the quality code is consistent, the value at that moment is discarded. If the difference between the current value and the value written to the cache is greater than the deadband value, the value, quality code, and time at that moment are written to the cache.
[0038] 2) When the difference between the first moment in the cache and the current moment reaches 1024 sampling cycles, processing and data compression are performed. The steps are as follows: a) The database divides the data stored in the memory into three arrays for storage.
[0039] b) Sort the timestamp, data, and quality code according to the timestamp, from small to large.
[0040] c) Preprocess the timestamps. Starting with the second data point, compare the timestamp with the first data point. If the timestamp difference is equal to the sampling period (the host computer sampling period, usually 1s or 500ms), compare the next data point until the timestamp difference is different or all 1024 timestamps have been polled. Divide the current timestamp "date-1-1-1-500" and the first timestamp "date-1-0-1-500" by the sampling period to obtain the n missing sampling periods. These n sampling periods are added to the array in order. Continue these steps until all timestamps are compared. If the timestamp difference is the sampling period, the final data format is as follows: date-1-0-1-500 (1024).
[0041] d) Preprocess the quality code. Starting from the second data, compare the quality code with the first data. If they are consistent, compare the next one until the quality code is inconsistent. Calculate the difference between the timestamp "date-1-7-1-500" corresponding to the current inconsistent quality code and the first timestamp "date-1-0-31-500" and divide it by the sampling period to get n, and save the data as 0(n). Repeat the above steps from the next inconsistent quality code until all quality codes are compared. The final data format is as follows: 0(900)1(100)0(24).
[0042] e) Preprocess the values, starting from the second value, compare the value with the previous value, if they are consistent, compare with the next one, until the values are unequal, calculate the difference between the timestamp "Date-1-0-51-500" corresponding to the current different quality code and the first timestamp "Date-1-0-1-500" and divide it by the sampling period to get n, save the data as 1.1 (n), and repeat the above steps from the next unequal value until all the value comparisons are completed. The final data format is as follows: 1.1 (100) 1.2 (2) 1.3 (900) 1.4 (22).
[0043] f) Compress the preprocessed data using the LZSS algorithm in the order of PTID, start time, end time, quantity, timestamp, quality code, and value. After compression, store the data in the time series database.
[0044] Decompress the data.
[0045] a) Read compressed data from the time series database; The original data is decompressed using the lzss (Lempel-Ziv-Storer-Szymanski) algorithm.
[0046] b) After decompression, bytes 0-3 are the ID, bytes 4-11 are the start time, bytes 12-19 are the end time, and bytes 20-21 are the quantity.
[0047] c) Restore timestamp information. Read data starting from the 22nd byte and stop when encountering (). For example, for "date-1-1-1-500 (100)", restore the first 100 timestamps to "date-1-1-1-500" as the starting time, and scan the period as an arithmetic progression of the step length (date-1-1-1-500, date-1-1-2-000). The numbers in parentheses are quantities.
[0048] d) Restore the quality code information. After the timestamp restoration is completed, continue to read the quality code information. Start reading data from the last () of the timestamp and stop when encountering (). For example, 0(100) means that 100 consecutive quality codes are 0. Repeat the above steps until the total number of quality codes read reaches the total number.
[0049] e) Restore the value. After the quality code is restored, continue to restore the value. Start reading data from the last ) of the quality code and stop when encountering (). For example, 1(100) means that 100 consecutive values are all 1. Repeat the above steps until the total number of values read reaches the total number.
[0050] f) Fill the timestamp, quality code, and value parsed above into the array in order.
[0051] g) Remove the points added during compression, start from the second point, and compare the value and quality code with the first point. If they are consistent, delete the point. If they are different, repeat the subsequent comparison with this point as the starting point.
[0052] h) Store the data recovered in the above steps into a 1024-bit array, which is the decompressed data.
[0053] i) The decompressed data needs to be padded. Starting from the second timestamp, compare it with the previous timestamp. If the difference between adjacent timestamps is not equal to the collection period, interpolation is required. The value is calculated by subtracting the previous timestamp from the next period's timestamp, divided by the collection period. For example, if there is a 1500ms difference between "Date-1-1-1-500" and "Date-1-1-3-000," the timestamps "Date-1-1-2-000" and "Date-1-1-2-500" need to be padded. Both the value and quality code need to be padded, and the padded value and quality code must be consistent with the time of "Date-1-1-1-500."
[0054] j) After removing the supplementary points, the final result is obtained.
[0055] In summary, the present invention provides a lossy compression method and system for a DCS time series database, which effectively discards redundant data and significantly reduces storage requirements through dynamic dead zone values and data screening mechanisms, while supporting flexible user configuration to adapt to the needs of different scenarios. The present invention supplements missing timestamps in the data preprocessing stage and interpolates points in the decompression stage to ensure the continuity and integrity of the time series, avoid data distortion, and reduce duplicate data storage and improve compression efficiency by recording the duration of continuous identical quality codes and values. Compression and decompression performance are optimized by adopting the LZSS algorithm in combination with normalized data organization. Data recovery efficiency and query performance are improved by removing redundant data after decompression and the principle of fast data recovery. While ensuring the integrity of key data, the present invention significantly reduces the consumption of storage and computing resources, meeting the needs of industrial systems for long-term data storage and real-time processing.
[0056] Finally, it should be noted that the above is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any ordinary technician in this industry can smoothly implement the present invention as shown in the specification and described above. Any equivalent changes, modifications and evolutions made by using the technical content disclosed above are all equivalent embodiments of the present invention. At the same time, any equivalent changes, modifications and evolutions made to the above embodiments based on the essential technology of the present invention are still within the scope of protection of the technical solution of the present invention.
Claims
1. A lossy compression method for a DCS time series database, characterized in that: The steps include: S1. Receive time series data of each data point according to a preset sampling period. The time series data includes a timestamp, a value, and a quality code. Compare the value and quality code received at the current moment with the value and quality code received at the previous moment. If the difference is less than the preset dead zone value and the quality codes are consistent, discard the current data. Otherwise, store the current timestamp, value and quality code in the cache; S2. When the time series data in the cache reaches a preset capacity, the time series data in the cache is divided into a timestamp array, a value array, and a quality code array, and sorted in ascending order of timestamps; S3. Preprocess the timestamp array, quality code array, and value array: compare the differences between adjacent timestamps in sequence. If the difference is equal to the preset sampling period, skip it. If the difference is greater than the sampling period, add the missing timestamp to form a timestamp sequence. Recording the starting timestamp and duration of consecutive identical quality codes to form quality code data, and recording the starting timestamp and duration of consecutive identical numerical values to form numerical data; converting the quality code data and numerical data into a preset format; S4. Concatenate the preprocessed timestamp array, quality code array, and value array in a preset order, and compress them using the LZSS algorithm to generate compressed data; associate the compressed data with the data point identifier, start time, end time, and data volume information and store them in a time series database; S5. Read the compressed data from the time series database, decompress it using the LZSS algorithm, restore the timestamp sequence, quality code sequence, and numerical sequence, and interpolate the missing timestamps according to the supplementary rules to finally restore the time series data.
2. The lossy compression method for a DCS time series database according to claim 1, characterized in that: In S1, the cache allocates a fixed-capacity storage space to each data point, and the preset dead zone value is a dynamic threshold configurable by the user.
3. The lossy compression method for a DCS time series database according to claim 1, characterized in that: In S3, supplementing the missing timestamp includes: dividing the duration of the missing time period by the sampling period to generate an arithmetic progression with the starting timestamp as a reference and the sampling period as a step length.
4. The lossy compression method for a DCS time series database according to claim 1, characterized in that: In said S3, forming the quality code data specifically includes: if the quality code changes, recording the changed quality code and its corresponding start timestamp, and calculating the number of consecutive appearances of the quality code according to the duration.
5. The lossy compression method for a DCS time series database according to claim 1, characterized in that: In said S3, forming the numerical data specifically includes: if the difference of the numerical values exceeds the preset dead zone value, recording the changed numerical value and its corresponding starting timestamp, and calculating the number of consecutive occurrences of the numerical value by the duration.
6. The lossy compression method for a DCS time series database according to claim 1, characterized in that: In said S4, the preset sequence includes: data point identifier, start time, end time, data volume, timestamp array, quality code array and value array.
7. The lossy compression method for a DCS time series database according to claim 1, characterized in that: In said S5, the timestamp sequence, the quality code sequence and the numerical sequence are restored according to the ID, the start time, the end time and the quantity information in the decompressed data.
8. The lossy compression method for a DCS time series database according to claim 1, characterized in that: In said S5, interpolating and filling points includes: if the difference between adjacent timestamps exceeds a preset sampling period, determining the number of timestamps to be supplemented according to the difference divided by the preset sampling period, and filling the supplementary points with the value and quality code of the previous timestamp.
9. The lossy compression method for a DCS time series database according to claim 1, characterized in that: In said S5, redundant data is removed after decompression: starting from the second data point, if the value and quality code of the current data point are consistent with those of the previous data point, the data of the current data point is deleted.
10. A system based on the lossy compression method for a DCS time series database according to any one of claims 1 to 9, characterized in that: The system includes a data processing module, a data compression module and a data decompression module; wherein: Data processing module: used to receive time series data of each data point according to the preset sampling period. The time series data includes timestamp, value and quality code; compare the value and quality code received at the current moment with the value and quality code received at the previous moment. If the difference is less than the preset dead zone value and the quality code is consistent, the current data is discarded; otherwise, the current timestamp, value and quality code are stored in the cache; Data compression module: When the time series data in the cache reaches the preset capacity, it is used to divide the time series data in the cache into a timestamp array, a value array, and a quality code array, and sort them in ascending order of timestamps; Preprocess the timestamp array, quality code array, and value array: Compare the differences between adjacent timestamps in sequence. If the difference is equal to the preset sampling period, skip it. If the difference is greater than the sampling period, add the missing timestamp to form a timestamp sequence. Recording the starting timestamp and duration of consecutive identical quality codes to form quality code data, and recording the starting timestamp and duration of consecutive identical numerical values to form numerical data; converting the quality code data and numerical data into a preset format; The pre-processed timestamp array, quality code array, and value array are concatenated in a preset order and compressed using the LZSS algorithm to generate compressed data. The compressed data is associated with the data point identifier, start time, end time, and data volume information and stored in a time series database. Data decompression module: used to read compressed data from the time series database, decompress it using the LZSS algorithm, restore the timestamp sequence, quality code sequence, and numerical sequence, and interpolate missing timestamps according to the supplementary rules to finally recover the time series data.