Time sequence data compression and decompression method and related equipment

By cyclically adjusting the compression ratio, the vehicle-mounted millimeter-wave radar signal is gradually compressed, solving the problems of excessive signal loss and insufficient timeliness in existing technologies with small amplitude signals, and achieving a more efficient data compression and decompression process.

CN121664201APending Publication Date: 2026-03-13MAXIO TECHNOLOGY (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies for compressing vehicle-mounted millimeter-wave radar signals result in excessive signal loss even with small amplitudes and poor timeliness, failing to meet the vehicle's need for rapid identification of its surroundings.

Method used

The compression ratio is adjusted cyclically to compress the time-series data step by step. The compression results are compared with the preset range for adaptive adjustment, avoiding compression of a single maximum value and improving timeliness.

Benefits of technology

It reduces compression loss of smaller amplitude signals, improves compression timeliness, and ensures that vehicles can quickly identify their surroundings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121664201A_ABST
    Figure CN121664201A_ABST
Patent Text Reader

Abstract

The invention discloses a time sequence data compression method, a time sequence data decompression method and related equipment, and aims to solve the problems that in the prior art, compression loss of signals with small amplitude is too large, and timeliness is poor. The time sequence data compression method comprises the steps of selecting a compression ratio from a predetermined compression ratio set as a target compression ratio for to-be-compressed time sequence data at an initial moment; cyclically executing the following operations until the to-be-compressed time sequence data at all moments are compressed, and terminating the cycle: compressing the to-be-compressed time sequence data based on the target compression ratio to obtain a compression result of the to-be-compressed time sequence data; comparing the compression result with a preset time sequence data compression value range to obtain the compression degree of the to-be-compressed time sequence data; and according to the compression degree, selecting a compression ratio matched with the compression degree from the compression ratio set as a target compression ratio of the to-be-compressed time series data at the next moment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data compression technology, and in particular to a method and related equipment for compressing and decompressing time-series data. Background Technology

[0002] Vehicle-mounted millimeter-wave radar is a device used in automated driving assistance systems to help vehicles identify information such as obstacles, pedestrians, and other vehicles.

[0003] As the number of automotive millimeter-wave radar antennas increases, the amount of data that needs to be processed also increases exponentially, significantly increasing the overhead of advanced driver assistance systems (ADAS) such as bus bandwidth and storage. Therefore, to reduce this overhead, the automotive millimeter-wave radar signal is typically compressed during data processing. This signal compression refers to the data compression processing of the acquired radar echo signal from the automotive millimeter-wave radar, compressing the radar echo signal into a smaller space.

[0004] Existing signal compression algorithms, such as Block Floating Point (BFP) and Block Scaling (BS), typically pre-obtain the maximum amplitude of a segment of the vehicle-mounted millimeter-wave radar signal and then compress the signal based on this maximum value.

[0005] The problem with the aforementioned existing technology is that:

[0006] 1. Excessive signal compression loss. Specifically, because a single maximum value is used to compress the vehicle-mounted millimeter-wave radar signal, signals with smaller amplitudes are prone to experiencing a large compression loss.

[0007] 2. Poor timeliness. Specifically, vehicle-mounted millimeter-wave radar signals are time-series signals. If all time-series signals are collected at times T0-TN, the maximum amplitude of the vehicle-mounted millimeter-wave radar signal can only be determined at time TN, and then signal compression can be performed. This results in poor timeliness, making it difficult to meet the timeliness requirements for processing vehicle-mounted millimeter-wave radar signals in vehicle scenarios. This can lead to vehicles being unable to quickly identify their surroundings and react in a timely manner. Summary of the Invention

[0008] This application provides a method for compressing time-series data to solve the problems in the prior art where the compression of vehicle millimeter-wave radar signals using a single maximum value results in excessive compression loss for signals with small amplitudes and poor timeliness.

[0009] This application also provides a method for decompressing time-series data, a device for compressing time-series data, a device for decompressing time-series data, an electronic device, and a computer-readable storage medium.

[0010] The embodiments of this application adopt the following technical solutions:

[0011] In a first aspect, this application provides a method for compressing time-series data, including:

[0012] For the time series data to be compressed at the initial moment, a compression ratio is selected from a pre-determined set of compression ratios as the target compression ratio;

[0013] The following operation is performed repeatedly until all time-series data to be compressed has been compressed, at which point the loop terminates:

[0014] The time series data to be compressed is compressed based on the target compression ratio to obtain the compression result of the time series data to be compressed.

[0015] The compression degree of the time series data to be compressed is obtained by comparing the compression result with the preset compression value range of time series data.

[0016] Based on the degree of compression, a compression ratio that matches the degree of compression is selected from the set of compression ratios and used as the target compression ratio for the time series data to be compressed at the next moment.

[0017] Secondly, this application provides a method for decompressing time-series data, including:

[0018] Obtain the compression result and target compression ratio of the time-series data to be compressed at the initial moment;

[0019] The specified operation is executed repeatedly until the target compression ratio of the time series data to be compressed at all times is determined, at which point the specified operation is terminated.

[0020] Based on the target compression ratio of the time series data to be compressed at all times and the compression results at all times, the data is decompressed by multiplication to obtain the time series data to be compressed at all times.

[0021] The specified operations include:

[0022] The compression degree of the time series data to be compressed is obtained by comparing the compression result with the preset compression value range of time series data.

[0023] Based on the degree of compression, a compression ratio that matches the degree of compression is selected from the set of compression ratios and used as the target compression ratio for the time series data to be compressed at the next moment.

[0024] Thirdly, this application provides a time-series data compression apparatus, including a selection module and a loop processing module, wherein:

[0025] The selection module is used to select a compression ratio from a pre-determined set of compression ratios for the time series data to be compressed at the initial moment, and use it as the target compression ratio.

[0026] The loop processing module is used to repeatedly perform the following operations until all time-series data to be compressed has been compressed, at which point the loop terminates:

[0027] The time series data to be compressed is compressed based on the target compression ratio to obtain the compression result of the time series data to be compressed.

[0028] The compression degree of the time series data to be compressed is obtained by comparing the compression result with the preset compression value range of time series data.

[0029] Based on the degree of compression, a compression ratio that matches the degree of compression is selected from the set of compression ratios and used as the target compression ratio for the time series data to be compressed at the next moment.

[0030] Fourthly, this application provides a time-series data decompression apparatus, comprising an acquisition module, a loop execution module, and a decompression module, wherein:

[0031] The acquisition module is used to acquire the compression result and target compression ratio of the time-series data to be compressed at the initial moment;

[0032] The loop execution module is used to repeatedly execute the specified operation until the target compression ratio of the time series data to be compressed at all times is determined, at which point the specified operation is terminated.

[0033] The decompression module is used to decompress the time-series data to be compressed at all times by multiplying the target compression ratio of the time-series data to be compressed at all times and the compression results at all times.

[0034] The specified operations include:

[0035] The compression degree of the time series data to be compressed is obtained by comparing the compression result with the preset compression value range of time series data.

[0036] Based on the degree of compression, a compression ratio that matches the degree of compression is selected from the set of compression ratios and used as the target compression ratio for the time series data to be compressed at the next moment.

[0037] Fifthly, this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the time-series data compression method or the time-series data decompression method as described above.

[0038] In a sixth aspect, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the time-series data compression method or the time-series data decompression method as described above.

[0039] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects:

[0040] The method provided in this application embodiment can, on the one hand, continuously adjust the compression ratio according to the compression degree of the time sequence data to be compressed, avoiding the problem in the prior art that when a single maximum value is used to compress vehicle millimeter-wave radar signals, signals with small amplitudes are easily subject to a large compression loss ratio.

[0041] On the other hand, since this application does not require the maximum value of the time series data to compress the time series data, it does not need to wait until the TN time to perform compression, which can improve the compression timeliness compared with the prior art. Attached Figure Description

[0042] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0043] Figure 1 A schematic diagram illustrating the implementation process of a time-series data compression method provided in this application embodiment;

[0044] Figure 2a This is a schematic diagram illustrating the implementation process of a method for selecting a compression ratio smaller than a target compression ratio from a set of compression ratios as the target compression ratio for time-series data to be compressed at the next moment, as provided in an embodiment of this application.

[0045] Figure 2b This is a schematic diagram illustrating the implementation process of a method for selecting a compression ratio greater than a target compression ratio from a set of compression ratios as the target compression ratio for time-series data to be compressed at the next moment, as provided in an embodiment of this application.

[0046] Figure 3 A schematic diagram illustrating an application flow of the time-series data compression method provided in this application embodiment in practice;

[0047] Figure 4 A schematic diagram illustrating the implementation process of a time-series data decompression method provided in an embodiment of this application;

[0048] Figure 5 This application provides a schematic diagram of the specific structure of a time-series data compression device according to an embodiment of the present application;

[0049] Figure 6 This application provides a schematic diagram of the specific structure of a time-series data decompression device according to an embodiment of the present application;

[0050] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0052] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0053] Example 1

[0054] To address the problems in existing technologies where compression of vehicle-mounted millimeter-wave radar signals using a single maximum value results in excessive compression loss for signals with smaller amplitudes and poor timeliness, this application provides a method for compressing time-series data.

[0055] The execution subject of this method can be various types of computing devices, or it can be an application or app installed on the computing device. The computing device can be a user terminal such as a mobile phone, tablet computer, or smart wearable device, or it can be a server.

[0056] For ease of description, this application uses a server as the execution subject of the method in its embodiments to illustrate the method. Those skilled in the art will understand that this embodiment uses a server as an example to describe the method, which is merely an illustrative example and does not limit the scope of protection of the corresponding claims.

[0057] Specifically, the implementation flow of the method provided in this application embodiment is as follows: Figure 1 As shown, it includes the following steps:

[0058] Step 11: For the time series data to be compressed at the initial moment, select a compression ratio from the pre-determined set of compression ratios as the target compression ratio.

[0059] The time-series data to be compressed refers to the time-series data to be compressed. In this embodiment, the time-series data can be a time-series signal, such as a vehicle-mounted millimeter-wave radar signal. The time-series data is a signed number, meaning that one bit needs to be allocated as a sign bit. For example, assuming the target number of bits after compression of the time-series data is k, then the k-th bit is the sign bit, and the 1st to (k-1)th bits are the data bits.

[0060] The initial moment refers to the point in time when a time series data sequence (a time series data sequence composed of multiple moments) begins, or it can be understood as the first acquisition moment / observation moment of the time series data sequence.

[0061] Correspondingly, the time-series data to be compressed at the initial moment can be understood as the specific measurement value or data point acquired at the beginning moment or the first acquisition / observation moment in the time-series signal sequence. For example, taking the time-series signal as an automotive millimeter-wave radar signal, the time-series data to be compressed at the initial moment can be the automotive millimeter-wave radar signal data measured at the first acquisition moment.

[0062] It should be noted that the time-series data listed above is merely an exemplary illustration of the embodiments of this application and does not impose any limitations on the embodiments of this application.

[0063] Secondly, the compression ratio set includes multiple compression ratios of different sizes. In this application, these different compression ratios can be determined based on the target number of bits of the compressed time-series data and the preset compression error rate.

[0064] The target number of bits for the compressed time-series data is the number of bits required for storage after compression.

[0065] A preset compression error rate is used to measure the difference between the compressed and zero-padded decompressed time-series data and the uncompressed time-series data. Optionally, in this embodiment, the preset compression error rate can be selected a priori based on the distribution of the time-series data to be compressed, to ensure that the selected preset compression error rate can achieve better compression results. For example, when the fluctuation of the time-series data to be compressed is small, a smaller preset compression error rate can be selected.

[0066] Optionally, in this embodiment, the range of the preset compression error rate can be determined based on the target number of bits after compression of the time series data to be compressed. For example, assuming that the target number of bits after compression of a certain time series data to be compressed is k, the range of the preset compression error rate can be (2... 1-k ,1).

[0067] In one optional implementation, the compression ratios in the compression ratio set can be determined based on the target number of bits after compression and a preset compression error rate, as follows:

[0068] (1) Obtain the target number of bits and the preset compression error rate of the time sequence data to be compressed;

[0069] (2) Based on the target number of data bits and the preset compression error rate, determine each compression ratio in the compression ratio set according to the preset growth pattern of the geometric sequence; wherein, the first term of the geometric sequence is determined by the target number of data bits, and the common ratio of the geometric sequence is determined by the preset compression error rate.

[0070] Specifically, in practical applications, based on the target number of data bits and the preset compression error rate, and following a preset geometric progression growth pattern, the compression ratios in the compression ratio set can be determined using the following calculation method:

[0071] S index =round[(2 k-1 -1)×(1+d) index ]Formula 1

[0072] Among them, S index represents the compression ratio at the index, where index can be understood as the position index of the compression ratio; k represents the target number of bits after compression of the time-series data to be compressed; d represents the preset compression error rate; round represents rounding the floating-point number to the nearest integer. (2) k-1 -1) represents the first term of the geometric sequence; (1+d) represents the common ratio of the geometric sequence.

[0073] Furthermore, since each compression ratio in the compression ratio set grows according to a preset geometric progression, the calculation method for each compression ratio in the compression ratio set can also be written as follows:

[0074] S index =round[S index-1 Formula 2

[0075] In this embodiment of the application, when selecting a compression ratio as the target compression ratio from a predetermined set of compression ratios, any of the following methods can be used:

[0076] (1) Select any compression ratio from the set of compression ratios as the target compression ratio;

[0077] (2) Select the median of the compression ratio set from the compression ratio set as the target compression ratio;

[0078] (3) Based on the average value of the time series data to be compressed at all times, select a compression ratio related to the average value from the set of compression ratios as the target compression ratio.

[0079] Specifically, if convergence speed is not a concern and only the target compression ratio needs to be determined quickly, the above method (1) can be used, arbitrarily selecting a compression ratio from the set of compression ratios as the target compression ratio. Using this method, in the worst-case scenario, after continuously selecting (n-2*k+1) compression ratios for adaptive compression, the compression result of the time series data to be compressed can reach convergence. Here, n represents the initial number of bits of the time series data before compression, and k represents the target number of bits of the time series data after compression.

[0080] Alternatively, to accelerate the convergence speed and improve the compression effect of the first few time series data to be compressed, the above method (2) can be used to select the median of the compression ratio set from the compression ratio set. In this way, it is equivalent to the compression result of the time series data to be compressed converging after only (n-2*k+1) / 2 compression ratios in the worst case, thus accelerating the convergence speed; where n is the initial number of bits of the time series data to be compressed before compression, and k represents the target number of bits of the time series data to be compressed after compression.

[0081] Alternatively, if you want to further accelerate convergence based on the above method (2), you can use the above method (3) to select a compression ratio related to the average value from the set of compression ratios based on the average value of the time series data to be compressed at all times, as the target compression ratio.

[0082] To ensure the compression effect and efficiency of the time-series data to be compressed, the compression ratio range of each compression ratio in the compression ratio set can be further determined in this embodiment. The method for determining the compression ratio range of each compression ratio in the compression ratio set is as follows:

[0083] First, obtain the initial number of bits of the time series data to be compressed, and the target number of bits of the time series data after compression;

[0084] Secondly, the difference between the target data bit depth and the preset reduction value is calculated, and the preset exponential operation is performed on the difference result to generate the first boundary for determining the compression ratio range.

[0085] Then, a preset exponential operation is performed based on the difference between the initial number of data bits and the target number of data bits, and a second boundary is generated based on the difference between the exponential operation result and the reduction value to determine the range of compression ratio.

[0086] Finally, the compression ratio range is determined based on the first and second boundaries.

[0087] Step 12: Compress the time series data to be compressed based on the target compression ratio to obtain the compression result of the time series data to be compressed.

[0088] The compression result of the time series data to be compressed, that is, the compressed time series data to be compressed.

[0089] In this embodiment of the application, after determining the target compression ratio, the time series data to be compressed can be compressed according to the following calculation method based on the target compression ratio to obtain the compression result of the time series data to be compressed:

[0090] EN i =round(abs(D i ) / S index ) Formula 3

[0091] Among them, EN i D represents the time-series data to be compressed. i The compressed result after compression; S index This indicates the type of time-series data to be compressed, D. i The compression ratio selected during compression; abs(D i ) represents the time-series data to be compressed, D i Calculates the absolute value; round means rounding a floating-point number to the nearest integer.

[0092] Step 13: Compare the compression result with the preset time series data compression value range to obtain the compression degree of the time series data to be compressed.

[0093] Compression level describes the degree to which the data volume (or data size) of time-series data is reduced after compression processing.

[0094] In this embodiment of the application, the degree of compression of the time series data to be compressed can be measured by comparing the compression result with the preset range of time series data compression values.

[0095] The preset time-series data compression value range, also known as the encoded value range of the time-series data to be compressed, refers to the range of values ​​that the time-series data may take after compression. This preset time-series data compression value range can be determined based on the target number of bits after compression.

[0096] For example, assuming the target number of bits for the compressed time series data is k, the preset time series data compression value range can be expressed as [-2]. k-1 +1,2 k-1 -1].

[0097] In this embodiment of the application, after comparing the compression result with a preset range of time-series data compression values, the compression degree of the time-series data to be compressed can be obtained in the following manner:

[0098] (1) If the compression result is outside the preset time series data compression value range and the compression result is close to the lower limit of the time series data compression value range, it is considered that the compression degree of the time series data to be compressed is too large. In order to ensure the convergence of the compression result, the compressed data is first limited to the compression value range, and the compression ratio can be significantly reduced in the future.

[0099] For example, suppose the set of compression ratios is S = [15, 16, 18, 20, 22, 24, 26, 29, 32, 35, 38, 42, 46, 51, 56, 62, 68, 75, 82, 90, 99, 109, 120, 132, 145, 160, 176, 194, 213, 234, 257, 283, 311, 342, 376, 414, 455, 501, 551, 606, 667, 734, 807, 888, 977, 10 [75,1182,1300,1430,1573,1730,1903,2048] The currently selected target compression ratio is 46, and it is determined from the compression results that the compression degree is too large. Therefore, for the time series data to be compressed at the next time moment, a compression ratio with a large difference from 46 and less than 46 can be selected as the target compression ratio. For example, 20 (where the difference between 20 and 46 is 20, and the difference is large) can be selected as the target compression ratio for the time series data to be compressed at the next time moment.

[0100] (2) If the compression result is outside the preset time series data compression value range and the compression result is close to the upper limit of the time series data compression value range, it is considered that the compression degree of the time series data to be compressed is too small. In order to ensure the convergence of the compression result, the compressed data is first limited to the compression value range, and the compression degree can be greatly increased in the future.

[0101] (3) If the compression result is within the preset time series data compression value range, and the compression result is close to the lower limit of the time series data compression value range, it is considered that the compression degree of the time series data to be compressed is relatively large. In order to ensure the convergence of the compression result, the compression ratio can be reduced slightly in the future.

[0102] In this embodiment of the application, it is assumed that the preset time-series data compression value range is [-2]. k-1 +1,2 k-1 If the compression result is within the preset time-series data compression value range, and the compression result is less than or equal to 2, then... k-2 When the value is -1, it is considered that the compression degree of the time series data to be compressed is relatively large.

[0103] (4) If the compression result is within the preset time series data compression value range, and the compression result is close to the upper limit of the time series data compression value range, it is considered that the compression degree of the time series data to be compressed is small. In order to ensure the convergence of the compression result, the compression ratio can be increased slightly in the future.

[0104] In this embodiment of the application, it is assumed that the preset time-series data compression value range is [-2]. k-1 +1,2 k-1 If the compression result is within the preset time-series data compression value range, and the compression result is greater than 2, then... k-2 When the value is -1, the compression level of the time series data to be compressed is considered to be relatively low.

[0105] Step 14: Based on the degree of compression, select a compression ratio that matches the degree of compression from the set of compression ratios, and use it as the target compression ratio for the time series data to be compressed in the next moment.

[0106] In this embodiment of the application, when it is determined that the compression degree is too large or too large, the compression ratio can be reduced. That is, a compression ratio smaller than the current target compression ratio can be selected from the set of compression ratios as the target compression ratio of the time series data to be compressed at the next moment.

[0107] Conversely, if the compression level is determined to be too small or too low, the compression ratio can be increased. That is, a compression ratio greater than the current target compression ratio can be selected from the set of compression ratios and used as the target compression ratio for the time series data to be compressed in the next moment.

[0108] Specifically, based on the degree of compression, a compression ratio matching the compression level can be selected from the set of compression ratios as the target compression ratio for the time series data to be compressed at the next time step, in the following manner:

[0109] Case 1: If the compression level meets the first preset condition, then select a compression ratio from the set of compression ratios that is less than the target compression ratio as the target compression ratio for the time series data to be compressed in the next moment.

[0110] Case 2: If the compression degree meets the second preset condition, then select a compression ratio greater than the target compression ratio from the set of compression ratios, and use it as the target compression ratio for the time series data to be compressed in the next moment.

[0111] Step 15: Determine whether all the time-series data to be compressed at all times has been fully compressed.

[0112] The operation ends once all time-series data to be compressed has been compressed.

[0113] Conversely, if the time series data to be compressed at all times has not been compressed, then the above steps 12 to 14 are executed repeatedly until the time series data to be compressed at all times has been compressed.

[0114] The method provided in this application embodiment can, on the one hand, continuously adjust the compression ratio according to the compression degree of the time sequence data to be compressed, avoiding the problem in the prior art that when a single maximum value is used to compress vehicle millimeter-wave radar signals, signals with small amplitudes are easily subject to a large compression loss ratio.

[0115] On the other hand, since this application does not require the maximum value of the time series data to compress the time series data, it does not need to wait until the TN time to perform compression, which can improve the compression timeliness compared with the prior art.

[0116] Example 2

[0117] In this embodiment of the application, when performing step 14, if the compression degree meets the first preset condition, a compression ratio smaller than the target compression ratio can be selected from the set of compression ratios as the target compression ratio for the time series data to be compressed at the next moment. Alternatively, if the compression degree meets the second preset condition, a compression ratio larger than the target compression ratio can be selected from the set of compression ratios as the target compression ratio for the time series data to be compressed at the next moment.

[0118] In one optional implementation, considering that in practical applications, there may be multiple compression ratios in the compression ratio set that satisfy either less than or greater than the target compression ratio, how to quickly and accurately select the target compression ratio for the time-series data to be compressed at the next moment is a key issue addressed in this application's embodiments.

[0119] To address this issue, in the embodiments of this application, as follows: Figure 2a As shown, if the compression level meets the first preset condition, a compression ratio smaller than the target compression ratio can be selected from the set of compression ratios as the target compression ratio for the time series data to be compressed at the next time step, in the following manner:

[0120] Step 200: Sort the compression ratios in the compression ratio set in ascending order to obtain the sorting position of each compression ratio.

[0121] Step 202: Based on the sorting position, select a compression ratio from the set of compression ratios that is at a preset position interval from the target compression ratio and is less than the target compression ratio, and use it as the target compression ratio for the time series data to be compressed at the next moment; the preset position interval is determined based on a preset logarithmic operation of the preset compression error rate.

[0122] Specifically, in this embodiment, the preset position interval can be determined based on a preset logarithmic operation of a preset compression error rate, as follows:

[0123] p = round(log (1+d) 2) Formula 4

[0124] Where p is the preset position interval; d represents the preset compression error rate.

[0125] For example, assuming the position index of the target compression ratio is index, a compression ratio that is a preset position interval p away from the target compression ratio and is smaller than the target compression ratio can be selected from the set of compression ratios as the target compression ratio of the time series data to be compressed at the next time moment. That is, the compression ratio with position index (index-p) is selected from the set of compression ratios as the target compression ratio of the time series data to be compressed at the next time moment.

[0126] Or, such as Figure 2b As shown, if the compression level meets the second preset condition, a compression ratio greater than the target compression ratio can be selected from the set of compression ratios as the target compression ratio for the time series data to be compressed at the next time step, in the following manner:

[0127] Step 210: Sort the compression ratios in the compression ratio set in ascending order to obtain the sorting position of each compression ratio.

[0128] Step 212: Based on the sorting position, select a compression ratio from the set of compression ratios that is at a preset position interval from the target compression ratio and is greater than the target compression ratio, and use it as the target compression ratio for the time series data to be compressed at the next moment; the preset position interval is determined based on a preset logarithmic operation of a preset compression error rate.

[0129] Continuing with the previous example, assuming the position index of the target compression ratio is index, a compression ratio that is a preset position interval p away from the target compression ratio and is greater than the target compression ratio can be selected from the set of compression ratios as the target compression ratio of the time series data to be compressed at the next time moment. That is, the compression ratio with position index (index+p) is selected from the set of compression ratios as the target compression ratio of the time series data to be compressed at the next time moment.

[0130] In this embodiment of the application, the formula S(index+p)=2*S(index) is satisfied.

[0131] In addition to the two situations mentioned above, in this embodiment of the application, if the compression degree meets the first preset condition and the compression result is within the range of time series data compression values ​​and close to the lower bound of the time series data compression value range, then a compression ratio smaller than the target compression ratio can be selected from the set of compression ratios as the target compression ratio for the time series data to be compressed at the next moment, in the following manner:

[0132] (1) Sort each compression ratio in the compression ratio set in ascending order to obtain the sorting position of each compression ratio;

[0133] (2) Based on the sorting position, select a compression ratio less than the target compression ratio from the compression ratio set according to the formula index = index - 1, and use it as the target compression ratio for the time series data to be compressed at the next time step. Here, index represents the sorting position of the target compression ratio, or it can also be called the position index.

[0134] For example, suppose that sorting the compression ratios in the compression ratio set in ascending order gives: S=[15,16,18,20,22,24,26,29,32,35,38,42,46,51,56,62,68,75,82,90,99,109,120,132,145,160,176,194,213,234,257,283,311,342,376,414,455,501,551,606,667,734,8 [07,888,977,1075,1182,1300,1430,1573,1730,1903,2048], the sorting position of the target compression ratio is 5, that is, the target compression ratio is 22. At this time, if it is necessary to select a compression ratio less than the target compression ratio from the compression ratio set as the target compression ratio of the time series data to be compressed at the next moment, then the compression ratio 20 with index = index-1 = 5-1 = 4 can be selected as the target compression ratio of the time series data to be compressed at the next moment.

[0135] Furthermore, if the compression level meets the second preset condition, and the compression result is within the range of time-series data compression values, and close to the upper limit of the time-series data compression value range, then a compression ratio greater than the target compression ratio can be selected from the set of compression ratios as the target compression ratio for the time-series data to be compressed at the next time step, in the following manner:

[0136] (1) Sort each compression ratio in the compression ratio set in ascending order to obtain the sorting position of each compression ratio;

[0137] (2) Based on the sorting position, select a compression ratio greater than the target compression ratio from the compression ratio set according to the formula index = index + 1, and use it as the target compression ratio for the time series data to be compressed at the next time step. Here, index represents the sorting position of the target compression ratio, or it can also be called the position index.

[0138] Using the sorted set of compression ratios shown in the previous example, assuming the target compression ratio is sorted at position 9, that is, the target compression ratio is 32, if we need to select a compression ratio greater than the target compression ratio from the set of compression ratios as the target compression ratio for the time series data to be compressed at the next time step, we can select the compression ratio 35, which is index = index + 1 = 9 + 1 = 10, as the target compression ratio for the time series data to be compressed at the next time step.

[0139] Using the method provided in the embodiments of this application, when there are multiple compression ratios in the compression ratio set that are smaller than the target compression ratio or larger than the target compression ratio, the target compression ratio of the time series data to be compressed at the next moment can be selected quickly and accurately from the multiple compression ratios that are smaller than the target compression ratio or larger than the target compression ratio; and the convergence of the compression results is accelerated.

[0140] Example 3

[0141] The following describes how the methods provided in the embodiments of this application are applied in practice, taking into account real-world scenarios.

[0142] Please see Figure 3 This is a schematic diagram illustrating an application process of the method provided in this application embodiment. The process specifically includes the following steps:

[0143] [Preparation Phase]

[0144] Step 31: Determine the timing data to be compressed.

[0145] Assume that the first time-series data to be compressed, D1, acquired at time T0 is 200, the second time-series data to be compressed, D2, acquired at time T1 is 100, the third time-series data to be compressed, D3, acquired at time T2 is 50, the fourth time-series data to be compressed, D4, acquired at time T3 is 50, the fifth time-series data to be compressed, D5, acquired at time T4 is 50, and the sixth time-series data to be compressed, D6, acquired at time T5 is 50.

[0146] That is, the time series data sequence to be compressed, which is composed of the time series data to be compressed acquired from time T0 to time T5, is D = [200, 100, 50, 50, 50, 50, 50].

[0147] Step 32: Obtain the initial number of bits of the time series data to be compressed before compression, and determine the target number of bits of the time series data to be compressed after compression, preset the compression error rate and preset the time series data compression value range.

[0148] For details on determining the target data bit depth, the preset compression error rate, and the preset time-series data compression value range, please refer to the relevant content in Example 1, which will not be repeated here.

[0149] Step 33, determine the set of compression ratios, which can also be understood as determining the adaptive step table.

[0150] The value range of the adaptive step table is the compression ratio range, and the table length of the adaptive step table is the number of compression ratios, which can be determined according to the target number of data bits, the preset compression error rate, and the initial number of data bits.

[0151] For details on how to implement this step, please refer to the relevant content in Example 1, which will not be repeated here.

[0152] After completing steps 31-33 to prepare for compression, you can then proceed with the compression process according to the detailed implementation process of the [Compression Processing Stage].

[0153] [Compression Processing Stage]

[0154] Step 34: Initialize the position index of the adaptive step table = a (1≤a≤T), where T is the length of the adaptive step table, that is, select any compression ratio from the adaptive step table / compression ratio set as the target compression ratio of the time series data to be compressed at the initial time.

[0155] Step 35: After compressing the first time series data to be compressed using the target compression ratio (hereinafter referred to as the first target compression ratio) of the time series data to be compressed at the initial time (for ease of description, it will be referred to as the first time series data to be compressed), the first compression result of the first time series data to be compressed is obtained.

[0156] Step 36: Compare the first compression result with the preset time series data compression value range to obtain the compression degree of the time series data to be compressed at the initial time (hereinafter referred to as the first compression degree for ease of description).

[0157] Step 37: Based on the first compression degree, select a compression ratio that matches the first compression degree from the adaptive step table, and use it as the second target compression ratio for the second time series data to be compressed at the next time step (denoted as the second time step) after the initial time step.

[0158] Step 38: Compress the second time series data to be compressed using the newly selected second target compression ratio.

[0159] Step 39: Repeat the above steps until all time-series data to be compressed has been compressed.

[0160] The following examples will be used to explain the above methods in detail.

[0161] Assume multiple compression ratios are S = [15, 16, 18, 20, 22, 24, 26, 29, 32, 35, 38, 42, 46, 51, 56, 62, 68, 75, 82, 90, 99, 109, 120, 132, 145, 160, 176, 194, 213, 234, 257, 283, 311, 342, 376, 414, 455, 501, 551, 606, 667, 734, 807]. The time series data sequence to be compressed is D = [200, 100, 50, 50, 50, 50, 50]; the initial data bit length is n = 16, and the target data bit length is k = 5; the position of the adaptive step table is initialized to index = 9, corresponding to a compression ratio of 35. The compression process for the above time series data sequence D is as follows:

[0162] For the first time series data 200 in the time series data sequence D to be compressed, its compressed value EN1 can be determined as:

[0163] EN1 = round(200 / 35) = 6

[0164] Among them, since 6 is less than or equal to 2 k-2 -1=7, therefore, it is necessary to select a compression ratio that matches the compression degree from the compression ratio set according to the method of index=index-1 as the target compression ratio of the time series data to be compressed at the next moment, that is, the compression ratio with position index as index=9-1=8 (32) is used as the target compression ratio of the second time series data 100 to be compressed in the time series data sequence D.

[0165] Next, the second time series data 100 in the time series data sequence D to be compressed is compressed using a compression ratio (32), and the compressed value EN2 is:

[0166] EN2 = round(100 / 32) = 3

[0167] Since 3 is still less than or equal to 2 k-2-1 = 7, therefore, it is still necessary to switch the first compression ratio to the second compression ratio that meets the expected data compression quality according to the method of index = index - 1, that is, the compression ratio with position index = index = 8 - 1 = 7 (29) is used as the second compression ratio that meets the expected data compression quality.

[0168] Then, the third time series data 50 in the time series data sequence D to be compressed is compressed using the compression ratio (29), and the compressed value EN3 is:

[0169] EN2 = round(50 / 29) = 2

[0170] This process continues until the last time series data in the time series data sequence D to be compressed is completely compressed.

[0171] The method provided in this application embodiment can, on the one hand, continuously adjust the compression ratio according to the compression degree of the time sequence data to be compressed, avoiding the problem in the prior art that when a single maximum value is used to compress vehicle millimeter-wave radar signals, signals with small amplitudes are easily subject to a large compression loss ratio.

[0172] On the other hand, since this application does not require the maximum value of the time series data to compress the time series data, it does not need to wait until the TN time to perform compression, which can improve the compression timeliness compared with the prior art.

[0173] Example 4

[0174] To address the issue of high storage overhead caused by storing the compression ratios of all compressed data when decompressing compressed data in existing technologies, this application also provides a method for decompressing time-series data.

[0175] Specifically, the implementation flow of the method provided in this application embodiment is as follows: Figure 4 As shown, it includes the following steps:

[0176] Step 41: Obtain the compression result and target compression ratio of the time-series data to be compressed at the initial moment.

[0177] It should be noted that, in the embodiments of this application, if the target compression ratio corresponding to the time series data to be compressed at the initial time is a compression ratio arbitrarily selected from the compression ratio set / adaptive step table, then when decompressing the time series data to be compressed at the initial time, the compression ratio used must be the same as the arbitrarily selected compression ratio.

[0178] Step 42: Compare the compression result with the preset time series data compression value range to obtain the compression degree of the time series data to be compressed.

[0179] Step 43: Based on the degree of compression, select a compression ratio that matches the degree of compression from the set of compression ratios, and use it as the target compression ratio for the time series data to be compressed in the next moment.

[0180] In this embodiment of the application, it is assumed that the preset time-series data compression value range is [0, 2]. k-1 If -1], then based on the degree of compression, a compression ratio matching the degree of compression can be selected from the set of compression ratios as the target compression ratio for the time series data to be compressed at the next time step, in the following manner:

[0181] If abs(EN) i ) is outside the preset time-series data compression value range, and abs(EN) i If abs(EN) is less than the lower bound of the preset time-series data compression value range, then abs(EN) is considered to be... i ) = 0, and according to the method of index = index - p, the target compression ratio in the time series data to be decompressed at the next moment is determined based on the target compression ratio; where abs() represents the absolute value function. k represents the target data bit width.

[0182] If abs(EN) i ) is outside the preset time-series data compression value range, and abs(EN) i If abs(EN) is greater than the upper bound of the preset time-series data compression value range, then abs(EN) is considered to be greater than the upper bound of the preset time-series data compression value range. i ) = 2 k-1 -1, and determine the target compression ratio in the time series data to be decompressed at the next moment according to the method of index = index + p.

[0183] If abs(EN) i ), , 2 k-2 If -1, then the target compression ratio in the time series data to be decompressed at the next moment can be determined according to the method of index = index-1.

[0184] If abs(EN) i )>2 k-2 If -1, then the target compression ratio in the time sequence data to be decompressed at the next moment can be determined according to the method of index = index + 1.

[0185] By doing so, the compression ratios corresponding to all compressed data can be obtained.

[0186] Step 44: Determine whether the target compression ratio for all time-series data to be compressed has been determined.

[0187] If the target compression ratio of the time series data to be compressed at all times has been determined, then proceed to step 45; otherwise, repeat steps 42 and 44 until the target compression ratio of the time series data to be compressed at all times is determined, at which point the loop operation terminates.

[0188] Step 45: Based on the target compression ratio of the time series data to be compressed at all times and the compression results at all times, decompress the time series data to be compressed at all times using a product method.

[0189] In this embodiment of the application, the time series data to be compressed can be decompressed according to the target compression ratio and compression result of the time series data to be compressed in the following manner:

[0190] Di = EN i *S index Formula 6

[0191] Where Di represents the i-th time series data to be compressed in the time series data sequence; EN i S represents the compression result of the i-th time series data to be compressed; index This represents the compression ratio of the i-th time series data to be compressed.

[0192] The method provided in this application embodiment can deduce the compression ratio of the time-series data to be compressed based on the compression result, thus eliminating the need to store the compression ratio of all the time-series data to be compressed. In this way, compared with the prior art, the problem of large storage overhead in the prior art can be solved.

[0193] Example 5

[0194] To address the problems in existing technologies where compression of vehicle-mounted millimeter-wave radar signals using a single maximum value results in excessive compression loss for signals with small amplitudes and poor timeliness, this application provides a time-series data compression device. A schematic diagram of the device's specific structure is shown below. Figure 5 As shown, it includes a selection module 51 and a loop processing module 52. The functions of each module are as follows:

[0195] The selection module 51 is used to select a compression ratio from a pre-determined set of compression ratios for the time series data to be compressed at the initial time, and use it as the target compression ratio.

[0196] The loop processing module 52 is used to repeatedly perform the following operations until all the time-series data to be compressed at all times is compressed, at which point the loop terminates:

[0197] The time series data to be compressed is compressed based on the target compression ratio to obtain the compression result of the time series data to be compressed.

[0198] The compression degree of the time series data to be compressed is obtained by comparing the compression result with the preset compression value range of time series data.

[0199] Based on the degree of compression, a compression ratio that matches the degree of compression is selected from the set of compression ratios and used as the target compression ratio for the time series data to be compressed at the next moment.

[0200] Optionally, the compression device for time-series data may further include a compression ratio determination module, used for:

[0201] Obtain the target number of bits and the preset compression error rate of the time-series data to be compressed;

[0202] Based on the target number of bits and the preset compression error rate, each compression ratio in the compression ratio set is determined according to the preset geometric progression growth pattern.

[0203] The first term of the geometric sequence is determined by the number of bits in the target data, and the common ratio of the geometric sequence is determined by the preset compression error rate.

[0204] Optional, loop processing module 52, for:

[0205] If the compression level meets the first preset condition, then a compression ratio smaller than the target compression ratio is selected from the set of compression ratios and used as the target compression ratio for the time series data to be compressed at the next time step; or,

[0206] If the compression degree meets the second preset condition, then select a compression ratio greater than the target compression ratio from the set of compression ratios, and use it as the target compression ratio for the time series data to be compressed in the next moment.

[0207] The first preset scenario includes the compression result being within the time series data compression value range and close to the lower bound of the time series data compression value range; or the compression result being outside the time series data compression value range and less than the lower bound of the time series data compression value range.

[0208] The second preset scenario includes the compression result being within the time series data compression value range and close to the upper limit of the time series data compression value range; or the compression result being outside the time series data compression value range and greater than the upper limit of the time series data compression value range.

[0209] Optionally, if the compression degree meets the first preset condition, including the compression result being outside the time-series data compression value range and less than the lower bound of the time-series data compression value range, then the loop processing module 52 is used to:

[0210] Sort the compression ratios in the compression ratio set in ascending order to obtain the sorting position of each compression ratio.

[0211] Based on the sorting position, a compression ratio that is a preset position interval away from the target compression ratio and is smaller than the target compression ratio is selected from the set of compression ratios and is used as the target compression ratio for the time series data to be compressed at the next time moment; the preset position interval is determined based on a preset logarithmic operation of the preset compression error rate.

[0212] Optionally, if the compression degree meets the second preset condition, including the compression result being outside the time-series data compression value range but greater than the upper bound of the time-series data compression value range, then the loop processing module 52 is used to:

[0213] Sort the compression ratios in the compression ratio set in ascending order to obtain the sorting position of each compression ratio.

[0214] Based on the sorting position, a compression ratio that is at a preset position interval from the set of compression ratios and is greater than the target compression ratio is selected as the target compression ratio for the time series data to be compressed at the next time step; the preset position interval is determined based on a preset logarithmic operation of a preset compression error rate.

[0215] Using the device provided in this application embodiment, on the one hand, the compression ratio can be continuously adjusted according to the degree of compression, avoiding the problem in the prior art that when a single maximum value is used to compress vehicle millimeter-wave radar signals, signals with small amplitudes are easily subject to a large compression loss ratio.

[0216] On the other hand, since this application does not require the maximum value of the time series data to be used for compression, it does not need to wait until time TN to perform compression. Compared with the prior art, this avoids the problem that the maximum value can only be determined and compression can only be performed at time TN, resulting in poor compression timeliness.

[0217] Example 6

[0218] To address the issue of high storage overhead in existing technologies where the compression ratios of all compressed data need to be stored during decompression, this application also provides a time-series data decompression device, the specific structure of which is shown in the schematic diagram below. Figure 6 As shown, it includes an acquisition module 61, a loop execution module 62, and a decompression module 63, wherein:

[0219] The acquisition module 61 is used to acquire the compression result and target compression ratio of the time-series data to be compressed at the initial moment;

[0220] The loop execution module 62 is used to repeatedly execute the specified operation until the target compression ratio of the time-series data to be compressed at all times is determined and then the specified operation is terminated.

[0221] The decompression module 63 is used to decompress the time-series data to be compressed at all times by multiplying the target compression ratio of the time-series data to be compressed at all times and the compression results at all times.

[0222] The specified operation includes:

[0223] The compression degree of the time series data to be compressed is obtained by comparing the compression result with the preset compression value range of time series data.

[0224] Based on the degree of compression, a compression ratio that matches the degree of compression is selected from the set of compression ratios and used as the target compression ratio for the time series data to be compressed at the next moment.

[0225] The device provided in this application embodiment can deduce the compression ratio of the time-series data to be compressed based on the compression result, thus eliminating the need to store the compression ratio of all the time-series data to be compressed. In this way, compared with the prior art, the problem of large storage overhead in the prior art can be solved.

[0226] Example 7

[0227] Figure 7 To illustrate the hardware structure of an electronic device according to various embodiments of this application, the electronic device may include a processor 701 and a memory 702 storing computer program instructions. Specifically, the processor 701 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of this application.

[0228] Memory 702 may include mass storage for data or instructions. For example, and not limitingly, memory 702 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where suitable, memory 702 may include removable or non-removable (or fixed) media. Where suitable, memory 702 may be internal or external to an electronic device. In a particular embodiment, memory 702 may be a non-volatile solid-state memory.

[0229] In one embodiment, memory 702 may be read-only memory (ROM). In one embodiment, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0230] The processor 701 reads and executes computer program instructions stored in the memory 702 to implement any of the timing data compression or decompression methods in the above embodiments.

[0231] In one example, the electronic device may also include a communication interface 703 and a bus 710. For example, Figure 7 As shown, the processor 701, memory 702, and communication interface 703 are connected through bus 710 and complete communication with each other.

[0232] The communication interface 703 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0233] Bus 710 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 710 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0234] Furthermore, in conjunction with the timing data compression or decompression methods described in the above embodiments, this application can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the timing data compression or decompression methods described in the above embodiments.

[0235] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0236] The above description is merely a specific implementation example of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A method for compressing time-series data, characterized in that, include: For the time series data to be compressed at the initial moment, a compression ratio is selected from a pre-determined set of compression ratios as the target compression ratio; The following operation is performed repeatedly until all time-series data to be compressed has been compressed, at which point the loop terminates: The time series data to be compressed is compressed based on the target compression ratio to obtain the compression result of the time series data to be compressed. The compression degree of the time series data to be compressed is obtained by comparing the compression result with the preset compression value range of time series data. Based on the compression level, a compression ratio matching the compression level is selected from the set of compression ratios and used as the target compression ratio for the time series data to be compressed at the next moment.

2. The method as described in claim 1, characterized in that, Each compression ratio in the set of compression ratios is determined in the following manner: Obtain the target number of bits and the preset compression error rate after compressing the time-series data to be compressed; Based on the target number of bits and the preset compression error rate, each compression ratio in the set of compression ratios is determined according to a preset geometric progression growth pattern. The first term of the geometric sequence is determined by the number of bits in the target data, and the common ratio of the geometric sequence is determined by the preset compression error rate.

3. The method as described in claim 1, characterized in that, Based on the compression level, a compression ratio matching the compression level is selected from the set of compression ratios as the target compression ratio for the time series data to be compressed at the next time step, including: If the compression degree meets the first preset condition, then a compression ratio smaller than the target compression ratio is selected from the set of compression ratios as the target compression ratio for the time series data to be compressed at the next moment; or, If the compression degree meets the second preset condition, then a compression ratio greater than the target compression ratio is selected from the set of compression ratios and used as the target compression ratio for the time series data to be compressed at the next moment. The first preset situation includes the compression result being within the range of the time-series data compression value and close to the lower bound of the time-series data compression value range; or the compression result being outside the range of the time-series data compression value and less than the lower bound of the time-series data compression value range. The second preset scenario includes the compression result being within the range of the time-series data compression value and close to the upper limit of the time-series data compression value range; or the compression result being outside the range of the time-series data compression value and greater than the upper limit of the time-series data compression value range.

4. The method as described in claim 3, characterized in that, If the compression degree meets the first preset condition, including the compression result being outside the time-series data compression value range and less than the lower bound of the time-series data compression value range; then, Selecting a compression ratio smaller than the target compression ratio from the set of compression ratios as the target compression ratio for the time series data to be compressed at the next time step includes: Sort each compression ratio in the set of compression ratios in ascending order to obtain the sorting position of each compression ratio. Based on the sorting position, a compression ratio that is a preset position interval away from the target compression ratio and is smaller than the target compression ratio is selected from the set of compression ratios, and is used as the target compression ratio for the time series data to be compressed at the next moment; the preset position interval is determined based on a preset logarithmic operation of a preset compression error rate.

5. The method as described in claim 3, characterized in that, If the compression degree meets the second preset condition, including the compression result being outside the time-series data compression value range but greater than the upper bound of the time-series data compression value range; then, Selecting a compression ratio from the set of compression ratios that is greater than the target compression ratio as the target compression ratio for the time series data to be compressed at the next time step includes: Sort each compression ratio in the set of compression ratios in ascending order to obtain the sorting position of each compression ratio. Based on the sorting position, a compression ratio that is at a preset position interval from the set of compression ratios and is greater than the target compression ratio is selected as the target compression ratio for the time series data to be compressed at the next moment; the preset position interval is determined based on a preset logarithmic operation of a preset compression error rate.

6. A method for decompressing time-series data, characterized in that, include: Obtain the compression result and target compression ratio of the time-series data to be compressed at the initial moment; The specified operation is executed repeatedly until the target compression ratio of the time-series data to be compressed at all times is determined, at which point the specified operation is terminated. Based on the target compression ratio of the time series data to be compressed at all times and the compression results at all times, the time series data to be compressed at all times is obtained by decompressing using a product method; The specified operation includes: The compression degree of the time series data to be compressed is obtained by comparing the compression result with the preset compression value range of time series data. Based on the degree of compression, a compression ratio that matches the degree of compression is selected from the set of compression ratios and used as the target compression ratio for the time series data to be compressed at the next moment.

7. A compression device for time-series data, characterized in that, This includes a selection module and a loop processing module, wherein: The selection module is used to select a compression ratio from a pre-determined set of compression ratios for the time series data to be compressed at the initial time, and use it as the target compression ratio. The loop processing module is used to repeatedly perform the following operations until all time-series data to be compressed has been compressed, at which point the loop terminates: The time series data to be compressed is compressed based on the target compression ratio to obtain the compression result of the time series data to be compressed. The compression degree of the time series data to be compressed is obtained by comparing the compression result with the preset compression value range of time series data. Based on the compression level, a compression ratio matching the compression level is selected from the set of compression ratios and used as the target compression ratio for the time series data to be compressed at the next moment.

8. A decompression apparatus for time-series data, characterized in that, It includes an acquisition module, a loop execution module, and a decompression module, among which: The acquisition module is used to acquire the compression result and target compression ratio of the time-series data to be compressed at the initial moment; The loop execution module is used to repeatedly execute the specified operation until the target compression ratio of the time-series data to be compressed at all times is determined, at which point the specified operation is terminated. The decompression module is used to decompress the time-series data to be compressed at all times by multiplying the target compression ratio of the time-series data to be compressed at all times and the compression results at all times. The specified operation includes: The compression degree of the time series data to be compressed is obtained by comparing the compression result with the preset compression value range of time series data. Based on the degree of compression, a compression ratio that matches the degree of compression is selected from the set of compression ratios and used as the target compression ratio for the time series data to be compressed at the next moment.

9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the time-series data compression method as described in any one of claims 1 to 5, or implements the time-series data decompression method as described in claim 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the time-series data compression method as described in any one of claims 1 to 5, or implements the time-series data decompression method as described in claim 6.