A CDN monitoring data compression method, device and electronic equipment
By using discrete cosine transform and windowed coding compression techniques, the problem of low compression rate of CDN monitoring data was solved, achieving more efficient data storage and reducing hardware resource consumption.
Patent Information
- Application Number
- CN202111589244.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2041-12-23
AI Technical Summary
The existing CDN monitoring data has a low compression rate, resulting in excessive consumption of hardware storage resources and a huge amount of data.
Discrete cosine transform is used to initially compress CDN monitoring data. Windowing is then applied to further concentrate the data energy before encoding compression, including methods such as entropy coding.
It improves the compression rate of CDN monitoring data, reduces the consumption of hardware storage resources, and maintains the accuracy and reliability of data.
Smart Images

Figure CN114448443B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and more specifically to a method, apparatus, and electronic device for compressing CDN monitoring data. Background Technology
[0002] With the ever-increasing volume of data used by internet users, Content Delivery Networks (CDNs) have become a crucial support for this massive traffic growth. Users obtain the network resources they request through the nearest CDN node, significantly reducing latency and improving user experience. For CDN operators, monitoring and recording the resources, usage, and service quality of each CDN node is essential. These records are crucial for operators to use for billing references, node scheduling, node planning, and node service quality analysis. In the current CDN resource monitoring system, open-source time-series databases, represented by Prometheus and OpenTSDB, are the mainstream. Their main characteristics are: using a specific technical indicator as the smallest observation object, adding one or more tags for differentiation and retrieval, observing the value of the technical indicator at given time intervals, and recording it on a timeline, thus forming a time-series sequence. Assuming monitoring CDN data for one day, if a data sample is recorded at a 5-second interval, there will be 17,280 samples per day. In current time-series database technology, data is recorded completely and stored using binary lossless compression technology. Considering the large number of CDN service domains and the numerous metrics that need to be monitored, which are multiplicative, this further greatly increases the number of time-series sequences that need to be recorded. Even though compression technology has been adopted, the amount of data generated is still enormous, reaching TB levels in a single day, requiring a large amount of hardware storage resources. Therefore, how to improve the compression rate while ensuring data accuracy is an urgent problem to be solved. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a method, apparatus and electronic device for compressing CDN monitoring data, thereby improving the CDN data compression rate.
[0004] According to a first aspect, the present invention provides a method for compressing CDN monitoring data, the method comprising: performing a discrete cosine transform on a target time-series data sequence obtained from a target CDN node to obtain first transformed data; windowing the first transformed data to obtain second transformed data; and encoding and compressing the second transformed data to obtain target compressed data.
[0005] Optionally, the step of windowing the first transformed data to obtain the second transformed data includes: windowing the first transformed data based on a preset raised cosine window function to obtain the second transformed data.
[0006] Optionally, the step of generating the preset raised cosine window function includes: calculating the frequency response of the initial raised cosine window function; calculating the main lobe width of the raised cosine window function based on the frequency response; calculating the energy ratio within the main lobe based on the main lobe width, wherein the energy ratio within the main lobe is used to characterize the energy ratio between the main lobe and the side lobes; if the energy ratio within the main lobe is greater than a preset threshold, then the initial raised cosine window function is used as the preset raised cosine window function; if the energy ratio within the main lobe is less than the preset threshold, then the weighting coefficients of the initial raised cosine window function are adjusted, and the process returns to the step of calculating the frequency response of the initial raised cosine window function.
[0007] Optionally, before encoding and compressing the second transformed data to obtain the target compressed data, the method further includes: truncating the second transformed data based on the main lobe width of the preset raised cosine window function.
[0008] Optionally, the method further includes: performing amplitude recovery on the truncated second transformed data so that the amplitude of the truncated second transformed data is restored to be the same as that of the first transformed data.
[0009] Optionally, the step of encoding and compressing the second transformed data to obtain the target compressed data includes: entropy encoding and compressing the second transformed data to obtain the target compressed data.
[0010] According to a second aspect, the present invention provides a CDN monitoring data compression device, the device comprising: a first compression module for performing a discrete cosine transform on a target time-series data sequence obtained from a target CDN node to obtain first transformed data; a second compression module for windowing the first transformed data to obtain second transformed data; and a third compression module for encoding and compressing the second transformed data to obtain target compressed data.
[0011] Optionally, before the third compression module, the device further includes a truncation module for truncating the second transformed data based on the main lobe width of the preset raised cosine window function.
[0012] According to a third aspect, embodiments of the present invention provide an electronic device, including: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the method described in the first aspect, or any optional embodiment of the first aspect.
[0013] According to a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer instructions for causing the computer to perform the method described in the first aspect, or any alternative embodiment of the first aspect.
[0014] The technical solution provided in this application has the following advantages:
[0015] The technical solution provided in this application first processes the target time-series data sequence acquired by the target CDN node using Discrete Cosine Transform (DCT). Compared to Fourier Transform, DCT offers better energy concentration in converting time-domain data into a spectrum. Due to delays in CDN monitoring data acquisition metrics, coupled with timer jitter and other factors, the resulting time-series sequences often contain noise. CDN operators do not require the acquired monitoring data to be completely identical to the actual situation; they only need the monitoring data to be within an acceptable accuracy range. Therefore, DCT can automatically retain the main low-frequency components and effectively eliminate high-frequency components (corresponding to spikes in the time-series data sequence), thereby significantly compressing the CDN data within an acceptable range of data fluctuations. Next, windowing is applied to the first transformed data obtained from the DCT to further concentrate the parts that characterize the data trend. Finally, encoding compression further reduces the data volume while preserving data information. Through these three compression operations, the compression rate of ultra-long CDN node data is improved, and the consumption of hardware storage resources is reduced. Attached Figure Description
[0016] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings:
[0017] Figure 1 This diagram illustrates the steps of a CDN monitoring data compression method according to one embodiment of the present invention.
[0018] Figure 2 A frequency domain plot of the window function is shown in one embodiment of the present invention;
[0019] Figure 3 This diagram illustrates the effect of DCT spectrum windowing on bandwidth data in one embodiment of the present invention.
[0020] Figure 4 This diagram illustrates the DCT spectrum windowing effect of bandwidth data in one embodiment of the present invention.
[0021] Figure 5 This diagram illustrates the DCT spectrum windowing effect of QPS data for bandwidth data in one embodiment of the present invention.
[0022] Figure 6 This invention illustrates a comparison between the original and reconstructed sequences of CDN node bandwidth data in one embodiment of the present invention.
[0023] Figure 7 This diagram illustrates the structure of a CDN monitoring data compression device according to one embodiment of the present invention.
[0024] Figure 8 A schematic diagram of an electronic device according to one embodiment of the present invention is shown. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] Please see Figure 1 In one embodiment, a method for compressing CDN monitoring data specifically includes the following steps:
[0027] Step S101: Perform a discrete cosine transform on the target time-series data sequence obtained from the target CDN node to obtain the first transformed data.
[0028] Step S102: Window the first transformed data to obtain the second transformed data.
[0029] Step S103: Encode and compress the second transformed data to obtain the target compressed data.
[0030] Specifically, the Discrete Cosine Transform (DCT) is a transform related to the Fourier Transform. It is similar to the Discrete Fourier Transform (DFT) but uses only real numbers. The DCT is essentially a DFT of approximately twice the length. While the DFT periodically expands the signal, the DCT first mirrors the signal and then periodically expands it. This approach allows for a smooth transition between the expanded signals, whereas direct periodic expansion introduces jumps, which correspond to high-frequency components in the frequency domain. Therefore, the DCT has better energy concentration than the DFT, naturally eliminating high-frequency interference and components when converting the target time-series data sequence to the frequency domain. CDN operators do not need the collected monitoring data to perfectly match the actual situation; they only need the monitoring data to be within an acceptable accuracy range. Therefore, the DCT can automatically preserve important low-frequency components and effectively eliminate high-frequency components (corresponding to spikes in the time-series data sequence). Discrete cosine transform is widely used in the field of image compression. In this embodiment, applying discrete cosine transform to the target time-series data sequence obtained by CDN nodes also achieves excellent compression results. Compared with traditional techniques that only use encoding compression, using discrete cosine transform to perform preliminary compression on CDN node data can first eliminate non-essential data and improve data compression efficiency.
[0031] Subsequently, for the first transformed data obtained from the DCT transform, to avoid spectral leakage and further highlight the main low-frequency data in the CDN data, thus further concentrating the data energy, the first transformed data is windowed to obtain the second transformed data. Finally, the second transformed data is encoded and compressed to obtain the final target compressed data. Compared with existing technologies, the compressed data has more accurate characteristics and a smaller data volume. Encoding and compression methods include, but are not limited to, statistical coding, predictive coding, transform coding, and entropy coding. In this embodiment, entropy coding is used to compress the target compressed data. Entropy coding is coding that does not lose any information according to the entropy principle during the coding process. Information entropy is the average information content of the information source (a measure of uncertainty). Common entropy coding methods include Shannon coding, Huffman coding, and arithmetic coding. This achieves lossless data compression and further ensures the accuracy and reliability of the compressed target time-series data sequence.
[0032] Specifically, in one embodiment, step S102 above includes the following steps:
[0033] Step 1: Window the first transformed data using a preset raised cosine window function to obtain the second transformed data. Specifically, the raised cosine window can be viewed as the sum of the spectra of three rectangular time windows, or as a weighted sum of three sinc(t) type functions. Compared to other window functions such as rectangular windows, it has a wider main lobe and smaller side lobes, enabling it to transform the first transformed data obtained from the aperiodic target time series data sequence into periodic data. Furthermore, because the larger the main lobe and the smaller the side lobes, the better it can eliminate high-frequency interference and energy leakage. Therefore, the raised cosine window function makes the information energy more concentrated.
[0034] In this embodiment, to further improve the processing effect of the raised cosine function, the weighting coefficients of the raised cosine function are adaptively adjusted. The specific adjustment steps are as follows:
[0035] 1. Calculate the frequency response of the initial raised cosine window function;
[0036] 2. Calculate the main lobe width of the raised cosine window function based on the frequency response;
[0037] 3. Calculate the energy ratio within the main lobe based on the main lobe width. The energy ratio within the main lobe is used to characterize the energy ratio between the main lobe and the side lobes.
[0038] 4. If the energy ratio within the main lobe is greater than a preset threshold, then the initial raised cosine window function will be used as the preset raised cosine window function;
[0039] 5. If the energy ratio within the main lobe is less than the preset threshold, adjust the weighting coefficients of the initial raised cosine window function and return to the step of calculating the frequency response of the initial raised cosine window function.
[0040] Specifically, select appropriate initial values α0 for the weighting coefficients to initialize the raised cosine window function: Where M = T / t + 1 indicates that the target time-series data sequence has M sampling points, and n represents any one of the discretized M sampling points. The frequency response (i.e., the window function spectrum) of the window function is calculated based on the initial value α0 of the weighting coefficients from the previous step, as shown in the following formula:
[0041]
[0042] Next, the main lobe width of the window function is calculated using the frequency response of the window function described above:
[0043] B = min({f|H(f) = 0})
[0044] Finally, the energy ratio within the main lobe was calculated. That is, the ratio of the main lobe area to the side lobe area in the spectrum, such as Figure 2 As shown, when the energy ratio R N Satisfy R N>P, where P is the preset threshold, configured based on expert experience, used to characterize the retention accuracy of the target time-series data sequence. If the window function corresponding to the current α already meets the above requirements, then the current window function will be used to window the first transformed data. The window function is determined as follows: Otherwise, in this embodiment, the Monte Carlo method is used to reselect the value of α, and the energy ratio within the main lobe is repeatedly calculated until a suitable α is obtained, thereby determining the final window function and the main lobe width B. In this embodiment, the proportion of main lobe energy after windowing the DCT spectrum is proposed as a measure of the accuracy of the reconstructed sequence. The weighting coefficients of the raised cosine window function are adaptively adjusted to further ensure that the adjusted window function has a better ability to concentrate data energy (i.e., the main information components in the data) and improve the data compression accuracy.
[0045] Specifically, in one embodiment, based on step one, before step S103 above, the following steps are further included:
[0046] Step Two: Truncate the second transform data based on the main lobe width of the preset raised cosine window function. Specifically, after calculating the main lobe width B, it is known that the spectrum of the second transform data within the main lobe range consists of important low-frequency components, while the side lobes are mostly interference data. Therefore, to further improve the data compression rate, the portion of the second transform data with the main lobe width B is retained, while the portion outside the main lobe width B is discarded. This achieves ultra-high data compression rate while preserving the vast majority of useful data information.
[0047] Specifically, in one embodiment, based on step two, before step S103 above, the following steps are also included:
[0048] Step 3: Perform amplitude restoration on the truncated second-transform data to restore its amplitude to be the same as that of the first-transform data. Specifically, windowing data using a window function typically results in a smaller amplitude in the frequency domain compared to the original data. Therefore, to avoid amplitude variations affecting data accuracy, amplitude restoration is also required for the truncated second-transform data in this embodiment. Specific technical means are as follows:
[0049] First, calculate the coefficient of recovery. Where G[0] is the value of the first transformed data before windowing at the first sampling point, G * [0] is the value of the second transformed data after windowing at the first sampling point. Let F[n] = F′[n] * c, where F′[n] is the truncated second transformed data and F[n] is the second transformed data after amplitude recovery.
[0050] Specifically, in one embodiment, the steps of the CDN monitoring data compression method described above are illustrated by the following specific application examples:
[0051] The time-series data of bandwidth, QPS, and traffic hit rate of a domain name on a CDN node of a CDN operator are compressed and stored within a 24-hour period. The sampling interval for this time-series data sample is 20 seconds.
[0052] The compression steps are as follows:
[0053] 1. Set the precision P = 0.995, sampling period T = 86400s, and sampling interval t = 20s;
[0054] 2. The initialization parameter of the window function is set to α0 = 0.5. Through iteration, α is finally determined to be 0.46, and correspondingly, the main lobe width B = 26.
[0055] 3. Read the time-series data of bandwidth, QPS and traffic hit rate from the time-series database of the target CDN node from 00:00:00 on 2021-10-19 to 23:59:59, and denote them as X1[n], X2[n] and X3[n] respectively;
[0056] 4. Perform DCT transformation on X1[n], X2[n], and X3[n] respectively to obtain DCT transformation coefficients G1[n], G2[n], and G3[n], where the transformation length is...
[0057] 5. Apply the window function W(n, 0.46) obtained in step 2 to the DCT transform coefficients G1[n], G2[n], and G3[n] respectively to further improve the signal energy concentration. The windowed spectrum is then obtained. and Each as Figure 3 , Figure 4 and Figure 5 As shown, the coefficient of recovery for all three is 12.5. (The text then abruptly shifts to a different topic:) and The first 26 terms are multiplied by the recovery coefficient to form the compressed representations F1[n], F2[n], and F3[n] of the original sequences X1[n], X2[n], and X3[n];
[0058] 6. In the post-processing module, F1[n], F2[n] and F3[n] are losslessly compressed using Huffman coding. Finally, an index of the tags and compressed data is created using a MySQL database, and the binary data is stored on an HDD hard disk.
[0059] The steps for decompressing data when reading it are as follows:
[0060] 1. Load the configuration parameters from the file, including: period T = 86400s, interval t = 20s;
[0061] 2. Given the starting timestamp index = 2021-10-19 00:00:00, the domain index = example.com, the node index = XXX, and the metric index = {bandwidth, QPS, traffic hit rate}, retrieve the corresponding binary data from MySQL and obtain sequences F1[n], F2[n], and F3[n] based on Huffman coding and decoding.
[0062] 3. Performing Inverse Discrete Cosine Transform (IDCT) on F1[n], F2[n], and F3[n] respectively, yields the reconstructed approximate representations of the source sequences X1[n], X2[n], and X3[n]. and The length of IDCT Taking bandwidth data as an example, the comparison between the source sequence and the reconstructed sequence is as follows: Figure 6 As shown in the figure. The results show that this method achieves a compression rate of up to 0.59% while maintaining accuracy, meaning the compressed size is less than 1% of the original size.
[0063] Through the above steps, the technical solution provided in this application first processes the target time-series data sequence acquired by the target CDN node using Discrete Cosine Transform (DCT). Compared to Fourier Transform, DCT has better energy concentration in the process of converting time-domain data into a spectrum. Due to delays in CDN data acquisition metrics, coupled with timer jitter and other factors, the resulting time-series sequences often contain noise. CDN operators do not need the collected monitoring data to be completely consistent with the actual situation; they only need the monitoring data to be within an acceptable accuracy range. Therefore, DCT can automatically retain the main low-frequency components and effectively eliminate high-frequency components (corresponding to spikes in the time-series data sequence), thereby significantly compressing the CDN data within an acceptable range of data fluctuations. Next, windowing is applied to the first transformed data obtained from the DCT to further concentrate the parts that represent data trends. Finally, encoding compression further reduces the data volume while preserving data information. Through these three compression operations, the compression rate of ultra-long CDN node data is improved, and the occupation of hardware storage resources is reduced.
[0064] like Figure 7 As shown, this embodiment also provides a CDN monitoring data compression device, which includes:
[0065] The first compression module 101 is used to perform a discrete cosine transform on the target time-series data sequence obtained from the target CDN node to obtain the first transformed data. For details, please refer to the relevant description of step S101 in the above method embodiment, which will not be repeated here.
[0066] The second compression module 102 is used to window the first transformed data to obtain the second transformed data. For details, please refer to the relevant description of step S102 in the above method embodiment, which will not be repeated here.
[0067] The third compression module 103 is used to encode and compress the second transformed data to obtain the target compressed data. For details, please refer to the relevant description of step S103 in the above method embodiment, which will not be repeated here.
[0068] Specifically, in one embodiment, before the aforementioned third compression module, the device further includes:
[0069] The truncation module is used to truncate the second transform data based on the main lobe width of a preset raised cosine window function.
[0070] The present invention provides a CDN monitoring data compression device for executing the CDN monitoring data compression method provided in the above embodiments. Its implementation method and principle are the same. For details, please refer to the relevant description of the above method embodiments, which will not be repeated here.
[0071] Through the collaborative efforts of the aforementioned components, the technical solution provided in this application first processes the target time-series data sequence acquired by the target CDN node using Discrete Cosine Transform (DCT). Compared to Fourier Transform, DCT offers better energy concentration in converting time-domain data into a spectrum. Due to latency in CDN data acquisition metrics, coupled with timer jitter and other factors, the resulting time-series sequences often contain noise. CDN operators do not require the collected monitoring data to be completely identical to the actual situation; they only need the monitoring data to be within an acceptable accuracy range. Therefore, DCT can automatically retain the main low-frequency components and effectively eliminate high-frequency components (corresponding to spikes in the time-series data sequence), thereby significantly compressing the CDN data within an acceptable range of data fluctuations. Next, windowing is applied to the first transformed data obtained from the DCT to further concentrate the parts that characterize the data trend. Finally, encoding compression further reduces the data volume while preserving data information. Through these three compression operations, the compression rate of ultra-long CDN node data is improved, and the consumption of hardware storage resources is reduced.
[0072] Figure 8 An electronic device according to an embodiment of the present invention is shown. The device includes a processor 901 and a memory 902, which can be connected via a bus or other means. Figure 8 Taking the example of a connection between China and Israel via a bus.
[0073] Processor 901 can be a Central Processing Unit (CPU). Processor 901 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.
[0074] The memory 902, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the above method embodiments. The processor 901 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory 902, thereby implementing the methods in the above method embodiments.
[0075] The memory 902 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor 901, etc. Furthermore, the memory 902 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 902 may optionally include memory remotely located relative to the processor 901, and these remote memories may be connected to the processor 901 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0076] One or more modules are stored in memory 902, and when executed by processor 901, they perform the methods described in the above method embodiments.
[0077] The specific details of the aforementioned electronic device can be understood by referring to the relevant descriptions and effects in the above method embodiments, and will not be repeated here.
[0078] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The implemented program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.
[0079] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for compressing CDN monitoring data, characterized in that, The method includes: The first transformed data is obtained by performing a discrete cosine transform on the target time-series data sequence obtained from the target CDN node. Windowing the first transformed data to obtain second transformed data; the step of windowing the first transformed data to obtain the second transformed data includes: windowing the first transformed data based on a preset raised cosine window function to obtain the second transformed data; the step of generating the preset raised cosine window function includes: initializing the raised cosine window function: Where M represents the number of sampling points in the target time series data sequence, n represents any one of the M discretized sampling points, and α represents the weighting coefficient; The frequency response of the initial raised cosine window function is calculated as follows: In the formula, H(f) represents the frequency response of the initial raised cosine window function, T is the time length of the target time series data, and f represents the frequency; The main lobe width of the raised cosine window function is calculated based on the frequency response, using the formula B = min({f|H(f) = 0}), where B represents the main lobe width of the raised cosine window function. The energy ratio within the main lobe is calculated based on the main lobe width. This energy ratio characterizes the energy ratio between the main lobe and the side lobes. If the energy ratio within the main lobe is greater than a preset threshold, then the initial raised cosine window function is used as the preset raised cosine window function; if the energy ratio within the main lobe is less than the preset threshold, then the weighting coefficients of the initial raised cosine window function are adjusted, and the process returns to the step of calculating the frequency response of the initial raised cosine window function. The second transformed data is truncated based on the main lobe width of the preset raised cosine window function; the amplitude of the truncated second transformed data is restored so that the amplitude of the truncated second transformed data is restored to be the same as that of the first transformed data; The second transformed data is encoded and compressed to obtain the target compressed data.
2. The method according to claim 1, characterized in that, The step of encoding and compressing the second transformed data to obtain the target compressed data includes: The target compressed data is obtained by entropy encoding compression of the second transformed data.
3. A compression device for CDN monitoring data, characterized in that, The device includes: The first compression module is used to perform a discrete cosine transform on the target time-series data sequence obtained from the target CDN node to obtain the first transformed data. The second compression module is used to window the first transformed data to obtain second transformed data; the step of windowing the first transformed data to obtain the second transformed data includes: windowing the first transformed data based on a preset raised cosine window function to obtain the second transformed data; the step of generating the preset raised cosine window function includes: initializing the raised cosine window function. Where N represents the number of sampling points in the target time series data sequence, n represents any one of the M discretized sampling points, and α represents the weighting coefficient; The frequency response of the initial raised cosine window function is calculated as follows: In the formula, H(f) represents the frequency response of the initial raised cosine window function, T is the time length of the target time series data, and f represents the frequency; The main lobe width of the raised cosine window function is calculated based on the frequency response, using the formula B = min({f|H(f) = 0}), where B represents the main lobe width of the raised cosine window function. The energy ratio within the main lobe is calculated based on the main lobe width. This energy ratio characterizes the energy ratio between the main lobe and the side lobes. If the energy ratio within the main lobe is greater than a preset threshold, then the initial raised cosine window function is used as the preset raised cosine window function; if the energy ratio within the main lobe is less than the preset threshold, then the weighting coefficients of the initial raised cosine window function are adjusted, and the process returns to the step of calculating the frequency response of the initial raised cosine window function. The truncation module is used to truncate the second transformed data based on the main lobe width of a preset raised cosine window function; and to perform amplitude recovery on the truncated second transformed data so that the amplitude of the truncated second transformed data is restored to be the same as that of the first transformed data. The third compression module is used to encode and compress the second transformed data to obtain the target compressed data.
4. An electronic device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method as described in any one of claims 1-2.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the method as described in any one of claims 1-2.
Citation Information
Patent Citations
Image compression encoder
JP2000201352A