Wavelet decomposition-based energy storage time series data adaptive differential compression method and system

CN122951649APending Publication Date: 2026-10-20STATE GRID ENERGY CONSERVATION SERVICE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611429642.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0003]然而,储能系统在充放电切换、功率指令突变及环境扰动等因素影响下,其时序数据呈现非平稳、多尺度特征,既包含反映荷电状态缓慢变化的长期趋势成分,也包含蕴含故障前兆信息的瞬态冲击成分,上述两类方案均难以适应这一特性:数据筛选方法无法区分数据波动源于正常运行扰动还是异常征兆,固定阈值难以匹配调频、调峰等不同工况下数据波动幅度的显著差异,容易在工况切换时丢失关键变化细节或记录大量冗余数据;通用压缩方法则将储能时序数据视为单一平稳信号进行整体处理,缺乏对长期趋势成分与瞬态冲击成分的分层表征能力,导致低频趋势部分因动态范围较大而压缩效率不佳,高频冲击细节又因统一量化处理而被过度平滑,难以满足故障诊断对瞬态波形特征保留的工程需求

Benefits of technology

本发明通过多层小波分解将储能时序数据分离为低频近似分量与多个高频细节分量,对低频近似分量采用分段初判与滑动窗口精调两级串联的自适应差分机制,使差分阶数随局部波动特性在一阶至三阶间自适应调整,降低了差分数据的动态范围;对各高频细节分量按能量高低差异化分配量化位数,使能量集中的层级获得更高的量化精度。实验结果表明,在满充满放平稳工况下,本发明的压缩比达12.8:1,较小波分解加固定差分阶数的方案(6.1:1)提升约110%,较JPEG2000方案(8.3:1)提升约54%;在负荷跟踪、瞬时扰动及混合工况下,压缩比分别为8.5:1、5.9:1和8.6:1,均高于各对比方案。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure SMS_27
    Figure SMS_27
Patent Text Reader

Abstract

This invention belongs to the field of data compression technology and proposes an adaptive differential compression method and system for energy storage time series data based on wavelet decomposition. The steps include: separating continuous time series data into low-frequency approximate components reflecting long-term trends and high-frequency detail components reflecting local fluctuations through multi-level wavelet decomposition; dynamically determining the differential order of the low-frequency approximate components based on their local statistical characteristics for adaptive differential compression to obtain low-frequency differential data; quantizing and encoding each high-frequency detail component according to its energy distribution by allocating quantization bits to obtain high-frequency compressed data; and finally recombining the two types of compressed data according to a preset format to generate a compressed data stream. This invention utilizes wavelet decomposition combined with adaptive differential to achieve layered differential quantization compression of energy storage time series data, balancing waveform fidelity, controllable compression overhead, and a code stream carrying complete decoding parameters, adapting to various energy storage monitoring parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data compression technology, and in particular relates to an adaptive differential compression method and system for energy storage time series data based on wavelet decomposition. Background Technology

[0002] With the large-scale deployment of electrochemical energy storage power stations, the operation and monitoring of energy storage systems rely on high-frequency continuous acquisition of physical quantities such as voltage, current, temperature, and state of charge. A single energy storage power station can have thousands of data acquisition points, with sampling frequencies typically reaching millisecond levels. The daily accumulated amount of raw time-series data can reach hundreds of gigabytes. The efficient storage and transmission of massive amounts of data has become a bottleneck restricting remote operation and maintenance and cloud-edge collaborative management of energy storage systems. To address this issue, existing technologies mainly employ two types of compression schemes: one is a data filtering method based on a fixed sampling period or dead-zone threshold. By setting a dead-zone threshold for parameters such as voltage and current, data points are recorded only when the parameter changes exceed the threshold, thereby reducing the amount of data stored. The other is a general compression method based on transform domain or predictive coding, such as using differential coding or discrete cosine transform to compress the time-series data as a whole to obtain a certain compression ratio.

[0003] However, under the influence of factors such as charging and discharging switching, sudden power command changes, and environmental disturbances, the time-series data of energy storage systems exhibit non-stationary and multi-scale characteristics. It contains both long-term trend components reflecting slow changes in the state of charge and transient impact components containing information about the precursors of faults. Neither of the above two types of solutions can adapt to this characteristic: data screening methods cannot distinguish whether data fluctuations originate from normal operation disturbances or abnormal symptoms, and fixed thresholds are difficult to match the significant differences in the amplitude of data fluctuations under different operating conditions such as frequency regulation and peak regulation. They are prone to losing key change details or recording a large amount of redundant data when switching operating conditions. General compression methods treat energy storage time-series data as a single stationary signal for overall processing. They lack the ability to hierarchically represent long-term trend components and transient impact components. As a result, the low-frequency trend part has poor compression efficiency due to its large dynamic range, and the high-frequency impact details are over-smoothed due to uniform quantization processing, which makes it difficult to meet the engineering requirements of fault diagnosis for the preservation of transient waveform characteristics. Furthermore, the compression parameters of existing methods (such as the differential order and the number of quantization bits) are usually preset to fixed values ​​based on experience, and cannot be dynamically adjusted according to changes in the local statistical characteristics of the data. This makes the compression performance highly dependent on manual parameter tuning, making it difficult to maintain a stable and efficient compression effect under various operating conditions, thus limiting its large-scale deployment and application in energy storage operation and maintenance scenarios. Summary of the Invention

[0004] To address the shortcomings of existing technologies, the present invention aims to provide an adaptive differential compression method and system for energy storage time series data based on wavelet decomposition. This method utilizes wavelet decomposition combined with adaptive differential compression to achieve hierarchical differential quantization compression of energy storage time series data, while maintaining waveform fidelity, controlling compression overhead, and ensuring the bitstream carries complete decoding parameters, thus adapting to various types of energy storage monitoring parameters.

[0005] To achieve the above objectives, the present invention provides an adaptive differential compression method for energy storage time-series data based on wavelet decomposition, comprising: Step 1: Based on wavelet transform theory, continuous time series data is separated into low-frequency approximate components and multiple high-frequency detail components through multi-layer wavelet decomposition. The low-frequency approximate components reflect the long-term variation trend of continuous time series data, while the high-frequency detail components reflect the local fluctuation characteristics of continuous time series data. Step 2: Perform adaptive differential compression on the low-frequency approximation components. Dynamically determine the difference order based on the local statistical characteristics of the low-frequency approximation components and dynamically adjust the difference order based on the window variance. Perform differential operations on the low-frequency approximation components to generate low-frequency differential data. Step 3: Quantize and compress multiple high-frequency detail components. Allocate quantization bits according to the energy distribution characteristics of each high-frequency detail component, quantize and encode each high-frequency detail component, and generate high-frequency compressed data. Step 4: Reassemble the low-frequency differential data and high-frequency compressed data according to the preset data packaging format to generate a compressed data stream of continuous time-series data.

[0006] Preferably, in step 1, the method for obtaining continuous time series data is as follows: With a fixed sampling period, the energy storage terminal continuously collects real-time operating parameters generated during the operation of the energy storage system, including voltage, current, temperature and state of charge. All real-time operating parameters acquired at each acquisition time are timestamped according to the chronological order of acquisition time to form raw time-series data; Missing values ​​in the original time series data are filled in using linear interpolation to form complete continuous time series data.

[0007] Preferably, in step 1, the continuous time-series data is separated into low-frequency approximate components and multiple high-frequency detail components through multi-level wavelet decomposition, including: The db4 wavelet in the orthogonal wavelet family is selected as the basis wavelet function. The first-level discrete wavelet transform is performed on the continuous time series data, decomposing the continuous time series data into the first-level low-frequency approximation coefficients and the first-level high-frequency detail coefficients. The first layer of low-frequency approximation coefficients are further subjected to the next layer of discrete wavelet transform, and the decomposition is carried out layer by layer until the preset number of decomposition layers is reached. Each layer of decomposition produces the corresponding high-frequency detail coefficients and the low-frequency approximation coefficients of the final layer. The preset number of decomposition layers is determined by the overall data length of the original time series data and the time domain characteristic period of the typical operating conditions of the energy storage terminal, so that the decomposed low-frequency approximate components can fully characterize the macroscopic energy change trend during the charging and discharging cycle of the energy storage terminal. After completing the decomposition of all layers, the low-frequency approximation coefficients of the final layer are used as low-frequency approximation components, and the high-frequency detail coefficients generated by each layer decomposition are used as high-frequency detail components of each layer.

[0008] Preferably, in step 2, an adaptive differential compression operation is performed on the low-frequency approximation component, and the difference order is dynamically determined based on the local statistical characteristics of the low-frequency approximation component, including: The low-frequency approximation component is divided into multiple non-overlapping local data segments in chronological order, and each local data segment contains a preset number of continuous data points; Calculate the statistical characteristic parameters within each local data segment. The statistical characteristic parameters include the variance of the local data segment and the amplitude range between the maximum and minimum values ​​within the local data segment. The variance and amplitude range of a local data segment are compared with a preset smoothness judgment threshold. When both variance and amplitude range are less than the preset smoothness judgment threshold, the local data segment is judged as a smooth segment. When either variance or amplitude range is not less than the preset smoothness judgment threshold, the local data segment is judged as a non-smooth segment. The smoothness judgment threshold includes the variance threshold and the range threshold.

[0009] Preferably, in step 2, the difference operation is performed on the low-frequency approximation component, including: For a local data segment that is determined to be a smooth segment, the second-order difference is selected as the difference order. Within the local data segment, the first difference between each data point and its previous data point is first calculated. Then, for two adjacent first differences, the difference between them is calculated as the second difference, generating a sequence of second-order difference values ​​for the local data segment. For local data segments that are determined to be non-smooth segments, the first-order difference is selected as the difference order. The difference between each data point and the previous data point is counted within the local data segment to generate a sequence of first-order difference values ​​for the local data segment. All local data segments are reassembled in chronological order to form initial low-frequency differential data that completely covers the entire low-frequency approximate component.

[0010] Preferably, in step 2, dynamically adjusting the difference order based on the window variance includes: A sliding window is set on the low-frequency approximation component. The sliding window is centered on the currently processed data point and includes several consecutive data points in front of and behind the center point as window data. The window length of the sliding window is dynamically calculated based on the sampling frequency of the energy storage time-series data and the minimum response time of the energy storage system power command. Based on the window length, calculate the mean of all window data within the sliding window, and calculate the variance of all window data within the sliding window; Calculate the adaptive difference order determination factor based on the variance; The adaptive difference order determination factor is compared with the preset first threshold and second threshold. When the adaptive difference order determination factor is less than the first threshold, the difference order at the current center point is determined to be the third difference, which corresponds to the steady working condition. When the adaptive difference order determination factor is greater than or equal to the first threshold and less than or equal to the second threshold, the difference order at the current center point is determined to be second-order difference, corresponding to the normal fluctuation condition. When the adaptive difference order determination factor is greater than the second threshold, the difference order at the current center point is determined to be the first difference, which corresponds to the violent fluctuation condition. For data points whose difference order at the current center point, determined based on window variance, is inconsistent with the difference order of the local data segment where the center point is located, the difference value of the data point is recalculated based on the difference order determined based on window variance. The recalculated difference value is then used to replace the corresponding value in the initial low-frequency difference data. After the replacement is completed, the low-frequency difference data is obtained.

[0011] Preferably, in step 3, generating high-frequency compressed data includes: The sum of the squares of all coefficients in each level of high-frequency detail component is taken as the energy value of the high-frequency detail component. The energy values ​​of each level are sorted in descending order, and the highest quantization bit depth is assigned to the high-frequency detail component with the highest energy value, and the lowest quantization bit depth is assigned to the high-frequency detail component with the lowest energy value. Scalar quantization encoding is performed on the high-frequency detail components of each level according to the allocated quantization bit depth. Each coefficient in the high-frequency detail components of each level is mapped to the corresponding quantization level to generate high-frequency compressed data of the level.

[0012] Preferably, in step 4, generating a compressed data stream of continuous time-series data includes: All quantization index values ​​of low-frequency differential data are obtained as the first data segment, and all quantization index values ​​of high-frequency compressed data at each level are obtained as multiple second data segments. The first data segment and multiple second data segments are arranged sequentially in ascending order of hierarchy, and a preset separator is inserted between adjacent data segments to form a continuous data packet body. A compressed information header is written into the header of the data packet body. The compressed information header includes the number of decomposition layers, the number of quantization bits and quantization step size corresponding to each layer, the quantization step size of low-frequency differential data, the adaptive differential order determination result identifier, the segment length, the sampling frequency, and the Huffman coding code table, thus obtaining the compressed data stream.

[0013] Preferably, the data stream reassembly process also includes lossless entropy encoding of the compressed data stream: After forming a continuous data packet body, the data packet body is processed by run-length encoding, which replaces the identical quantization index value that appears consecutively in the data packet body with a combination of the quantization index value and the number of consecutive occurrences, and generates run-length encoded data. Perform Huffman coding on the run-length encoded data, count the frequency of each symbol in the run-length encoded data, construct a Huffman tree based on the frequency of occurrence, assign a corresponding variable-length code to each symbol, and generate an entropy encoded data stream. The compressed header is merged and encapsulated with the entropy-encoded data stream to generate a compressed data stream that has undergone secondary compression.

[0014] An adaptive differential compression system for energy storage time-series data based on wavelet decomposition, used to implement the above method, includes: The multi-level wavelet decomposition module is used to separate continuous time series data into low-frequency approximate components and multiple high-frequency detail components based on wavelet transform theory. The low-frequency approximate components reflect the long-term variation trend of continuous time series data, while the high-frequency detail components reflect the local fluctuation characteristics of continuous time series data. The low-frequency adaptive differential compression module is used to perform adaptive differential compression operations on low-frequency approximate components. It dynamically determines the difference order based on the local statistical characteristics of the low-frequency approximate components and dynamically adjusts the difference order based on the window variance to perform differential operations on the low-frequency approximate components and generate low-frequency differential data. The high-frequency quantization encoding module is used to quantize and compress multiple high-frequency detail components. It allocates quantization bits according to the energy distribution characteristics of each high-frequency detail component, quantizes and encodes each high-frequency detail component, and generates high-frequency compressed data. The compressed data stream reassembly module is used to reassemble low-frequency differential data and high-frequency compressed data according to a preset data packaging format to generate a compressed data stream of continuous time-series data.

[0015] The present invention has the following beneficial effects: This invention separates energy storage time-series data into low-frequency approximate components and multiple high-frequency detail components through multi-layer wavelet decomposition. For the low-frequency approximate components, an adaptive differential mechanism consisting of segmented initial judgment and sliding window fine-tuning is employed, allowing the differential order to adaptively adjust between first and third order based on local fluctuation characteristics, thus reducing the dynamic range of the differential data. The quantization bits for each high-frequency detail component are differentiated according to energy level, resulting in higher quantization accuracy for energy-concentrated levels. Experimental results show that under stable full-charge and discharge conditions, the compression ratio of this invention reaches 12.8:1, which is approximately 110% higher than the wavelet decomposition plus fixed differential order scheme (6.1:1) and approximately 54% higher than the JPEG2000 scheme (8.3:1). Under load tracking, instantaneous disturbance, and mixed conditions, the compression ratios are 8.5:1, 5.9:1, and 8.6:1, respectively, all higher than the comparative schemes.

[0016] Regarding reconstruction accuracy, the reconstruction signal-to-noise ratio of this invention is superior to the comparative scheme under various operating conditions. Among them, the signal-to-noise ratio reaches 45.2dB under instantaneous disturbance conditions, which is about 10dB higher than the fixed differential order scheme, indicating that the adaptive differential mechanism retains more transient waveform details in the drastic fluctuation section. In terms of real-time performance, the average processing time per frame (1 second, 100 sampling points) of this invention is 8.2ms to 10.3ms, and the average processing time per point is about 0.1ms based on point-by-point equivalent calculation, which is lower than the 10ms sampling period corresponding to the 100Hz sampling frequency, and can meet the real-time compression requirements of energy storage terminals.

[0017] The compressed information header of this invention carries parameters required for decoding, such as the number of decomposition layers, quantization parameters, differential order determination result identifier, and Huffman code table. Combined with run-length encoding and Huffman encoding, the compressed data stream can be decoded independently, facilitating storage and transmission. Attached Figure Description

[0018] Figure 1 This is a schematic flowchart of the method of the present invention; Figure 2 This is a functional block diagram of the system of the present invention. Detailed Implementation

[0019] The embodiments of this application will be further described below with reference to the accompanying drawings.

[0020] Example 1: As Figure 1 As shown, an adaptive differential compression method for energy storage time series data based on wavelet decomposition is presented. The method includes: Step 1: Based on wavelet transform theory, continuous time series data is separated into low-frequency approximate components and multiple high-frequency detail components through multi-layer wavelet decomposition. The low-frequency approximate components reflect the long-term variation trend of continuous time series data, while the high-frequency detail components reflect the local fluctuation characteristics of continuous time series data. Step 2: Perform adaptive differential compression on the low-frequency approximation components. Dynamically determine the difference order based on the local statistical characteristics of the low-frequency approximation components and dynamically adjust the difference order based on the window variance. Perform differential operations on the low-frequency approximation components to generate low-frequency differential data. Step 3: Quantize and compress multiple high-frequency detail components. Allocate quantization bits according to the energy distribution characteristics of each high-frequency detail component, quantize and encode each high-frequency detail component, and generate high-frequency compressed data. Step 4: Reassemble the low-frequency differential data and high-frequency compressed data according to the preset data packaging format to generate a compressed data stream of continuous time-series data.

[0021] In step 1, the continuous time series data is obtained as follows: With a fixed sampling period, the energy storage terminal continuously collects real-time operating parameters generated during the operation of the energy storage system. These real-time operating parameters include voltage, current, temperature, and state of charge. All real-time operating parameters acquired at each acquisition time are timestamped according to the chronological order of acquisition time to form raw time-series data; Missing values ​​in the original time series data are filled in using linear interpolation to form complete continuous time series data.

[0022] Continuous time-series data is separated into low-frequency approximate components and multiple high-frequency detail components through multi-level wavelet decomposition, including: The db4 wavelet in the orthogonal wavelet family is selected as the basis wavelet function. The first-level discrete wavelet transform is performed on the continuous time series data, decomposing the continuous time series data into the first-level low-frequency approximation coefficients and the first-level high-frequency detail coefficients. The first layer of low-frequency approximation coefficients are further subjected to the next layer of discrete wavelet transform, and the decomposition is carried out layer by layer until the preset number of decomposition layers is reached. Each layer of decomposition produces the corresponding high-frequency detail coefficients and the low-frequency approximation coefficients of the final layer. The preset number of decomposition layers is determined by the overall data length of the original time series data and the time domain characteristic period of the typical operating conditions of the energy storage terminal, so that the decomposed low-frequency approximate components can fully characterize the macroscopic energy change trend during the charging and discharging cycle of the energy storage terminal. After completing the decomposition of all layers, the low-frequency approximation coefficients of the final layer are used as low-frequency approximation components, and the high-frequency detail coefficients generated by each layer decomposition are used as high-frequency detail components of each layer.

[0023] The energy storage terminal has a preset fixed sampling interval as the sampling period. The acquisition hardware inside the energy storage terminal continuously collects four types of real-time operating parameters generated during the operation of the energy storage unit, namely voltage parameters, current parameters, temperature parameters, and state of charge parameters, according to the fixed sampling period. After each round of complete parameter acquisition operation, the acquisition hardware outputs a set of acquisition records containing the values ​​of the four types of parameters.

[0024] The data tagging unit inside the energy storage terminal reads the local hardware timing time corresponding to each round of data acquisition, converts the timing time into a unified standard format timestamp, and binds and stores the timestamp with the voltage parameters, current parameters, temperature parameters, and state of charge parameters acquired in the same batch. All the data acquisition records that have been bound are arranged in the order of time corresponding to the timestamps to form the original time series data.

[0025] The data integrity verification unit built into the energy storage terminal traverses all the collected records in the original time series data line by line, and performs an existence check on the four values ​​of voltage parameter, current parameter, temperature parameter and state of charge parameter in each collected record. If any one of the parameters in a single record does not have a valid value, it is determined that there is a data missing at that sampling time. After marking all the sampling points with missing data, a linear interpolation completion operation is performed.

[0026] During the linear interpolation completion operation, for each marked missing sampling point, the nearest complete and valid acquisition record is arranged forward from the timestamp of the missing point as the previous reference record, and the nearest complete and valid acquisition record is arranged backward from the timestamp of the missing point as the next reference record. The parameter change rate corresponding to the two reference records is used as a fixed change rate. Based on the time interval ratio between the missing point and the two reference records, the complete values ​​of the four types of parameters (voltage, current, temperature, and state of charge) corresponding to the missing point are calculated. The calculated complete values ​​are used to replace the blank parameter items at the corresponding missing positions in the original time series data. After all missing points are replaced, complete continuous time series data is generated. All sampling moments in the complete continuous time series data are equipped with complete and valid energy storage operation parameters of the four types.

[0027] The data processing unit retrieves the standardized low-pass filter matching rule and high-pass filter matching rule corresponding to the pre-selected db4 wavelet within the orthogonal wavelet family. It then inputs all sampled values ​​of the complete continuous time series data into the first-level discrete wavelet transform execution unit. The first-level discrete wavelet transform execution unit first performs numerical matching operations on all values ​​of the complete continuous time series data with the low-pass filter matching rule corresponding to the db4 wavelet item by item. Then, it performs numerical matching operations on all values ​​of the complete continuous time series data with the high-pass filter matching rule corresponding to the db4 wavelet item by item. After the two sets of matching operations are completed, a numerical simplification operation with interval retention is performed. All values ​​output by the interval retention low-pass matching operation are used to obtain the first-level low-frequency approximation coefficients, and all values ​​output by the interval retention high-pass matching operation are used to obtain the first-level high-frequency detail coefficients.

[0028] The Daubechies wavelet family (dbN) is a family of wavelets with compact support and orthogonality, where N represents the order of the vanishing moment and the filter length is 2N. The db4 wavelet has a vanishing moment order of 4, a filter length of 8, and a support width of 7. The selection of a wavelet basis requires comprehensive consideration of core characteristics such as vanishing moment, support length, regularity, and orthogonality.

[0029] Compared to the Haar wavelet (db1, vanishing moment of 1, filter length of 2), the Haar wavelet is a discontinuous piecewise constant function. Although computationally efficient, it lacks continuity and is prone to introducing block artifacts in signal processing, making it difficult to effectively capture subtle fluctuations in continuous processes such as charge-discharge switching and power command mutations in energy storage time-series data. Compared to the db2 wavelet (vanishing moment of 2, filter length of 4), the db2 wavelet has limited frequency domain resolution and insufficient accuracy in extracting high-frequency transient components in non-stationary signals such as voltage and current in energy storage systems. Compared to the db6 wavelet (vanishing moment of 6, filter length of 12), the db6 wavelet has better smoothness and stronger frequency domain resolution, but its longer support length leads to a decrease in time domain localization capability. At the same time, the increased filter length brings higher computational complexity and storage overhead. For real-time compression scenarios in energy storage terminals, the performance improvement brought by db6 is limited while the computational cost increases significantly. Therefore, db4 is the optimal balance point between decomposition accuracy and computational efficiency.

[0030] Energy storage time-series data contains both long-term trend components (such as slow changes in state of charge) and transient impact components (such as fault precursor information and spike fluctuations caused by sudden power command changes), exhibiting non-stationary and multi-scale characteristics. The db4 wavelet, with a vanishing moment order of 4, effectively eliminates polynomial trend components of less than 4 in the signal, concentrating energy primarily on low-frequency approximation coefficients. This facilitates efficient processing of low-frequency trend components in subsequent differential compression operations. Furthermore, the db4 wavelet possesses tight support characteristics, exhibiting superior time-domain localization capabilities compared to higher-order wavelets such as db6, enabling precise capture of transient abrupt changes in energy storage signals. In addition, the db4 wavelet has been widely applied and validated in areas such as power quality disturbance detection, wind power generation smoothing, and energy storage system signal decomposition, demonstrating its good adaptability to the decomposition of non-stationary signals in the power storage field.

[0031] The db4 wavelet achieves the optimal balance between vanishing moment order, support length, and computational complexity. It can effectively separate the long-term trend and transient fluctuation components of energy storage time series data, while also meeting the engineering constraints on computational efficiency in real-time compression scenarios of energy storage terminals. Therefore, the db4 wavelet is selected as the basis wavelet function.

[0032] The data processing unit inputs the complete low-frequency approximation coefficients of the first layer into the next layer of discrete wavelet transform execution unit. The discrete wavelet transform execution unit of this layer reuses the low-pass filter matching rule and high-pass filter matching rule corresponding to the db4 wavelet to complete two sets of item-by-item numerical matching operations. After the two sets of matching operations are completed, the numerical simplification operation of the interval retention is performed synchronously. The high-pass matching operation of the interval retention yields the high-frequency detail coefficients corresponding to the current decomposition level, and the low-pass matching operation of the interval retention yields the low-frequency approximation coefficients that can be used to continue decomposition to the next layer. The entire set of discrete wavelet transform operations of this layer is repeated until the number of processing layers reaches the pre-determined number of decomposition layers. Each round of layer processing independently generates the high-frequency detail coefficients specific to the current layer. Only the last round of layer processing retains the low-frequency approximation coefficients that are no longer decomposed to the next layer.

[0033] The decomposition layer determination unit reads the total number of all sampling points within the complete continuous time-series data as the overall data length, and synchronously retrieves the standard duration corresponding to the complete standard charge-discharge cycle of the energy storage terminal as the time-domain characteristic period of the typical operating condition of the energy storage terminal. The maximum number of layer processing times corresponding to the overall data length is used as the upper limit of the number of layers, and the minimum number of layer processing times corresponding to the time-domain characteristic period is used as the lower limit of the number of layers. A fixed integer within the range of the upper and lower limits of the number of layers is selected as the preset decomposition layer number. The layer processing depth corresponding to this fixed integer can ensure that the low-frequency approximation coefficients retained in the last layer after the layer filtering and matching operation completely cover the numerical change trend corresponding to the entire process of energy increase and decrease within a single complete charge-discharge cycle of the energy storage unit, and there will be no situation where the trend information is not sufficiently extracted or unnecessary layers introduce invalid fluctuation information.

[0034] After all layered discrete wavelet transform operations are completed, the data classification and storage unit extracts the low-frequency approximation coefficients output from the last layered processing flow and stores them separately. The low-frequency approximation coefficients of the last layer after classification are used as low-frequency approximation components. The data classification and storage unit simultaneously extracts the high-frequency detail coefficients independently generated by each layered processing flow and stores them in the order of execution of the layered processing. The high-frequency detail coefficients independently classified and stored at each level correspond to the high-frequency detail components of each level. The low-frequency approximation components carry the overall long-term trend of the complete continuous time series data, and the high-frequency detail components of each level carry the local numerical fluctuation characteristics of the complete continuous time series data at different time scales.

[0035] To meet the real-time compression requirements of energy storage terminals, continuous time-series data is divided into continuous data frames according to a fixed frame length. Multi-layer wavelet decomposition, adaptive differential compression, quantization coding, and data stream reassembly are all performed frame by frame. When the sliding window is missing subsequent data points at the frame boundary, the window is truncated with the existing data points in the frame, or the window is buffered until the next frame of data arrives and the window is filled in. The processing delay introduced by this is no more than the duration of one data frame.

[0036] In step 2, an adaptive differential compression operation is performed on the low-frequency approximation component. The difference order is dynamically determined based on the local statistical characteristics of the low-frequency approximation component, including: The low-frequency approximation component is divided into multiple non-overlapping local data segments in chronological order, and each local data segment contains a preset number of continuous data points; Calculate the statistical characteristic parameters within each local data segment. The statistical characteristic parameters include the variance of the local data segment and the amplitude range between the maximum and minimum values ​​within the local data segment. The variance and amplitude range of a local data segment are compared with a preset smoothness judgment threshold. When both variance and amplitude range are less than the preset smoothness judgment threshold, the local data segment is judged as a smooth segment. When either variance or amplitude range is not less than the preset smoothness judgment threshold, the local data segment is judged as a non-smooth segment. The smoothness judgment threshold includes the variance threshold and the range threshold.

[0037] Performing difference operations on low-frequency approximate components includes: For a local data segment that is determined to be a smooth segment, the second-order difference is selected as the difference order. Within the local data segment, the first difference between each data point and its previous data point is first calculated. Then, for two adjacent first differences, the difference between them is calculated as the second difference, generating a sequence of second-order difference values ​​for the local data segment. For local data segments that are determined to be non-smooth segments, the first-order difference is selected as the difference order. The difference between each data point and the previous data point is counted within the local data segment to generate a sequence of first-order difference values ​​for the local data segment. All local data segments are reassembled in chronological order to form initial low-frequency differential data that completely covers the entire low-frequency approximate component; In this approach, the first data point of each local data segment retains its original value as the starting output of that segment, and the remaining data points are calculated with difference values ​​according to the selected difference order. The number of output data points for each segment is equal to the number of input data points for that segment.

[0038] Dynamically adjusting the difference order based on window variance includes: A sliding window is set on the low-frequency approximation component. The sliding window is centered on the currently processed data point and includes several consecutive data points in front of and behind the center point as window data. The window length of the sliding window is dynamically calculated based on the sampling frequency of the energy storage time-series data and the minimum response time of the energy storage system power command; The formula for calculating window length is as follows: ; In the formula, W represents the window length of the sliding window. The function is the floor function, where f represents the sampling frequency of the energy storage time series data. Indicates the minimum response time for power commands from the energy storage system; Based on the window length, calculate the mean of all window data within the sliding window, and calculate the variance of all window data within the sliding window; The adaptive differencing order criterion factor is calculated based on the variance. The formula for calculating the adaptive differencing order criterion factor is as follows: ; In the formula, D is the adaptive difference order criterion factor. The variance of all window data within the sliding window. This represents the average of all window data within the sliding window. It is a very small positive number.

[0039] The adaptive difference order determination factor is compared with the preset first threshold and second threshold. When the adaptive difference order determination factor is less than the first threshold, the difference order at the current center point is determined to be the third difference, which corresponds to the steady working condition. When the adaptive difference order determination factor is greater than or equal to the first threshold and less than or equal to the second threshold, the difference order at the current center point is determined to be second-order difference, corresponding to the normal fluctuation condition. When the adaptive difference order determination factor is greater than the second threshold, the difference order at the current center point is determined to be the first-order difference, corresponding to the severe fluctuation condition.

[0040] The data segmentation processing unit divides the low-frequency approximate component into multiple non-overlapping local data segments in chronological order. Each local data segment contains a fixed preset number of continuous data points. For each local data segment, the data statistical operation unit calculates the variance of all data points within it and the amplitude range between the maximum and minimum values, which are used as the statistical characteristic parameters of that local data segment.

[0041] The data judgment unit incorporates two types of smoothness judgment thresholds: variance threshold and amplitude range threshold. These thresholds are independently calibrated for each physical quantity channel—voltage, current, temperature, and state of charge—based on the statistical fluctuation range of historical data for each channel. For example, for data that has undergone normalization or for a typical voltage channel, the variance threshold can be set to 0.001, and the amplitude range threshold to 0.02. When both the variance and amplitude range of a local data segment are less than the corresponding threshold, the local data segment is determined to be a smooth segment; when the variance or amplitude range is greater than or equal to the corresponding threshold, the local data segment is determined to be a non-smooth segment.

[0042] The difference order matching unit matches second-order differences to smooth segments to remove linear and quadratic trend components and reduce the dynamic range of the difference product; it matches first-order differences to non-smooth segments to avoid excessive amplification of local fluctuation components by higher-order differences. The third-order difference is calculated based on the original values ​​of the low-frequency approximation components. First, the first-order difference between each data point and its preceding data point is calculated point by point. Then, the difference between two adjacent first-order differences is obtained to get the second-order difference. Finally, the difference between two adjacent second-order differences is obtained to get the third-order difference value. The third-order difference is calculated recursively based directly on the original values ​​and is independent of the difference order matched between adjacent data points.

[0043] The data stitching and integration unit stitches the difference value sequences of each local data segment in chronological order to generate initial low-frequency difference data covering all low-frequency approximation components. To address the issue of no preceding data point for the first point of a segment, the following boundary completion strategy is adopted: the first data point within a segment retains its original value and does not participate in the difference calculation; for local data segments matching first-order differences, the first-order difference is calculated starting from the second data point within the segment; for local data segments matching second-order differences, the second data point within the segment uses the first-order difference value as the output, and the second-order difference is calculated starting from the third data point within the segment; no cross-segment differences are performed between segments. Therefore, the number of data points output for each data segment remains consistent with the input, ensuring the integrity and reconstructability of the segmented difference data.

[0044] After recalculating and replacing the differential values ​​of data points with inconsistent order in the initial low-frequency differential data through a sliding window point-by-point determination mechanism to obtain the final low-frequency differential data, quantization encoding processing is performed on the low-frequency differential data. Specifically, the quantization step size is preset according to the overall numerical distribution range of the current batch of low-frequency differential data. The numerical range is divided into multiple quantization intervals with the quantization step size as the interval. Each quantization interval corresponds to a quantization level and a unique integer quantization index value. The quantization interval to which each differential value belongs is determined point by point and the corresponding quantization index value is recorded to form a low-frequency differential data quantization index sequence consistent with the high-frequency compressed data format, which is used for data segment extraction and reassembly in step 4.

[0045] The differential dynamic control unit configures a sliding window on the low-frequency approximate component. The sliding window is centered on the currently processed data point and includes several consecutive data points before and after the center point as window data. In the formula for calculating the window length, the sampling frequency f is determined by the sampling clock frequency of the analog-to-digital converter in the energy storage system and can be read from the terminal configuration information; the minimum response time of the power command... The control cycle and power regulation response delay of the energy storage converter are jointly determined, and can be obtained by factory calibration by the converter manufacturer or by on-site measurement; constant 5 is the minimum lower limit of the window length to ensure that the window contains no less than 5 data points, so as to meet the basic requirements of variance statistics for sample size.

[0046] The window statistics unit calculates the average of all window data within the current coverage area of ​​the sliding window: it sums up the values ​​of all data points within the window, divides them by the total number of data points within the window, and obtains the average of the window data, which serves as the overall numerical benchmark for the current window data.

[0047] After completing the mean calculation, the window statistics unit further calculates the window data variance: it calculates the difference between each data point value and the window data mean, squares each difference, sums them up, and then divides by the total number of data points in the window to obtain the window data variance, which is used to quantify the overall fluctuation and dispersion of the data within the current window.

[0048] The feature determination unit relies on the two types of statistical results, namely the mean and variance of the acquired window data, to carry out feature fusion determination processing. It combines the distinction between the stable and fluctuating characteristics of low-frequency time series data of energy storage to complete feature normalization matching processing, and generates an adaptive differential order determination factor that can accurately quantify the fluctuation level of local data in the current window. This determination factor can distinguish the levels of stable operating conditions, normal fluctuation operating conditions, and severe fluctuation operating conditions with a single indicator.

[0049] The calculation and determination logic of the adaptive difference order determination factor is as follows: First, determine the absolute value of the mean of the window data. Is it greater than the preset lower limit of the mean benchmark? , Set according to the sensor noise floor of the current acquisition channel or the minimum resolution amplitude of the analog-to-digital converter; if Then the decision factor is calculated according to the formula for the adaptive difference order decision factor.

[0050] like If the mean of the window data falls within a noise range near zero, then the decision factor is no longer applicable, and the variance is used directly. Compared with the preset variance threshold When comparing, When configuring the third-order difference, when The first-order difference is configured, and optionally, a second variance threshold is added. ( ),when The second-order difference is configured as a transition mode.

[0051] The variance parameter in the adaptive difference order determination factor calculation formula comes from the final calculation result after the sliding window completes the global dispersion statistics of the local time series data of the low-frequency approximate component. This parameter is obtained by uniformly statistically analyzing the deviation of all window data within the coverage of the sliding window from the window mean. It can accurately quantify the fluctuation dispersion of energy storage operation data within the local interval of the low-frequency approximate component and is a dedicated statistic characterizing the strength of local data fluctuations.

[0052] The mean parameter in the adaptive difference order determination factor calculation formula comes from the final calculation result after the sliding window completes the numerical benchmark statistics of the local time series data of the low-frequency approximation component. This parameter is obtained by averaging the sum of the values ​​of all window data within the coverage of the sliding window with the number of fixed data points in the window. It can accurately calibrate the overall numerical benchmark level of energy storage operation data within the local interval of the low-frequency approximation component and is a dedicated statistic that characterizes the steady-state numerical interval of the local data.

[0053] In the formula for calculating the adaptive difference order criterion factor, the regularization parameter... It is not a fixed constant, but rather based on the smallest effective resolution unit of the current energy storage acquisition channel. Dynamically determined, that is ,in The accuracy is determined by the quantization accuracy of the analog-to-digital converter or the factory calibration accuracy of the sensor. and They have the same dimensions, satisfying the requirement of dimensional consistency in mathematical operations.

[0054] The dynamic setting method avoids fixed values ​​(such as 10). -6To address the issue of different physical quantities (voltage, current, temperature) being overwhelmed in high-amplitude data and excessively dominating the denominator in zero-mean data due to large differences in their numerical magnitudes, the decision factor must objectively reflect the relative fluctuation intensity of local data, i.e., the square form of the coefficient of variation.

[0055] A smaller D value indicates a lower dispersion of data within the window relative to its mean, corresponding to a stable operating condition. In this case, a higher-order difference (third-order difference) is used to compress redundant information to the greatest extent. A larger D value indicates more drastic fluctuations in the data within the window, corresponding to a volatile operating condition. In this case, a lower-order difference (first-order difference) is used to fully preserve transient waveform details. This determination mechanism establishes a strict logical correspondence between the D value and the difference order, ensuring that adaptive differential compression can balance compression efficiency in the stable range with feature fidelity in the volatile range.

[0056] The overall calculation logic of the adaptive differential order determination factor takes the ratio of the fluctuation dispersion of local data of low-frequency approximate components to the steady-state numerical benchmark as the core determination basis. It can uniformly transform low-frequency operation data of energy storage with different amplitude ranges and different fluctuation intensities into quantitative determination indicators of fixed ranges, eliminating the determination bias caused by the influence of data amplitude on the single variance indicator.

[0057] The adaptive difference order determination factor can normalize and fuse the two types of core local feature parameters obtained by sliding window statistics, realize the standardized quantitative output of the fluctuation level of all local data segments of the low-frequency approximate component, and provide a unique, quantifiable and reproducible numerical determination basis for accurate adaptive matching of first-order difference, second-order difference and third-order difference.

[0058] The adaptive differential order determination factor can adapt to the low-frequency data characteristics corresponding to three core operating conditions of energy storage systems: stable charging and discharging, normal load fluctuations, and instantaneous operating condition disturbances. By standardizing the ratio calculation, it distinguishes the local data fluctuation levels corresponding to different operating conditions, ensuring that the low-frequency approximate components in different time intervals can be matched with the optimal differential order, and steadily improving the compression regularity of low-frequency differential data and the accuracy of subsequent data restoration.

[0059] The order determination unit incorporates two fixed judgment benchmarks adapted to the needs of classifying fluctuations in low-frequency time-series data of energy storage. These benchmarks are set as a first threshold and a second threshold. The two thresholds are statistically calibrated based on massive historical time-series data of three typical operating conditions of energy storage power stations: a complete year of charging and discharging, normal load fluctuations, and instantaneous short-circuit fault disturbances. The first threshold is selected as the upper quartile of the distribution of the judgment factor D value under stable operating conditions. This threshold represents the reasonable upper limit of the D value under stable operating conditions and has a relatively small value. The second threshold is selected as the lower quartile of the distribution of the judgment factor D value under drastic fluctuation conditions. This threshold represents the reasonable lower limit of the D value under drastic fluctuation conditions and has a relatively large value. This gives the two thresholds clear physical meaning and actual data support, avoiding the arbitrariness of human presets.

[0060] The order determination unit compares the adaptive differential order determination factor D with the first threshold T1 and the second threshold T2. The determination logic is as follows: When D < T1, the relative fluctuation intensity of the current window data is extremely low, which is determined to be a stable charging and discharging condition. The corresponding third-order differential operation order is configured to compress redundant information in the low-frequency trend to the greatest extent. When T1 ≤ D ≤ T2, the current window data has a certain amplitude fluctuation but has not reached the level of abrupt change. It is determined to be a normal load fluctuation condition. The corresponding second-order differential operation order is configured. When D > T2, the relative fluctuation intensity of the current window data is significantly higher. It is determined to be a violent fluctuation condition (such as charging and discharging switching or power command abrupt change). The corresponding first-order differential operation order is configured to completely preserve the transient waveform details.

[0061] The window traversal unit moves the center reference point of the sliding window point by point according to the inherent temporal arrangement order of the low-frequency approximation component. After each center point movement, the entire processing flow of window data statistics, decision factor generation, and difference order matching is re-executed. This enables dynamic and adaptive adjustment of the difference order of the entire time series data of the low-frequency approximation component point by point without omission, ensuring that each local data region matches the difference operation level that is suitable for its own fluctuation characteristics.

[0062] This embodiment employs a two-stage, cascaded mechanism for determining the difference order: First, based on the variance and amplitude range of each local data segment, it is determined whether it is a smooth or non-smooth segment, and a second-order or first-order difference is matched accordingly, generating initial low-frequency difference data covering all low-frequency approximation components. Then, a sliding window mechanism calculates an adaptive difference order determination factor point-by-point to determine the difference order at each center point. For data points where the window determination order differs from the segment-level order of the local data segment to which the point belongs, the difference value at that point is recalculated based on the original values ​​of the low-frequency approximation components, using the window determination order as the standard, and the corresponding values ​​in the initial low-frequency difference data are replaced. After replacement, the final low-frequency difference data is obtained. The third-order difference is triggered only by the window mechanism under stable operating conditions; its calculation is directly based on the original values ​​and is independent of the order determination results of adjacent data points.

[0063] Step 3 generates high-frequency compressed data, including: The sum of the squares of all coefficients in each level of high-frequency detail component is taken as the energy value of the high-frequency detail component. The energy values ​​of each level are sorted in descending order, and the highest quantization bit depth is assigned to the high-frequency detail component with the highest energy value, and the lowest quantization bit depth is assigned to the high-frequency detail component with the lowest energy value. Scalar quantization encoding is performed on the high-frequency detail components of each level according to the allocated quantization bit depth. Each coefficient in the high-frequency detail components of each level is mapped to the corresponding quantization level to generate high-frequency compressed data of the level.

[0064] The energy statistics processing unit performs global energy statistics on each high-frequency detail component obtained after wavelet decomposition. It enumerates all wavelet coefficients contained in the current high-frequency detail component, performs squaring on each independent wavelet coefficient, and performs global accumulation and integration on all the squared coefficients of the current level. After the accumulation and integration of a single level, a unique corresponding energy value is obtained. This energy value is the overall energy characterization result of the high-frequency detail component of the specific level.

[0065] After calculating the energy values ​​of high-frequency detail components at each level, it is necessary to determine the physical properties of the energy values ​​to distinguish between effective transient impact energy and background noise energy. Even without an effective excitation signal input, the energy storage system's sensors and acquisition channels will still output background noise. This noise energy level can be statistically calibrated using long-term historical time-series data collected by the energy storage terminal under no-load or steady-state operation to obtain the noise energy benchmark value for each wavelet decomposition level. Multiplying this benchmark value by a preset reliability coefficient (usually 1.5~2.0) serves as the noise energy judgment threshold for each level. For a certain level of high-frequency detail component, if its calculated energy value is lower than the noise energy judgment threshold for that level... If the energy value is high, the level is determined to be a noise-dominated frequency band, and the effective transient impulse component in its wavelet coefficients accounts for a very low proportion, so fine quantization is not required. At this time, the preset minimum quantization bit depth, such as 2 bits, is directly assigned to the level, and the level does not participate in the subsequent energy-based quantization bit depth allocation process to avoid using valuable storage resources to characterize noise. For levels with energy values ​​higher than the noise determination threshold of this level, they are regarded as effective signal-dominated frequency bands, and the subsequent energy value sorting and differentiated quantization bit depth allocation operations are continued. The above processing method ensures that the quantization bit depth allocation strategy can adaptively distinguish between noise interference and effective transient characteristics, and while maintaining a high compression ratio, the reconstruction accuracy of key signals is not lost due to noise energy fluctuations.

[0066] The hierarchical sorting processing unit collects and summarizes all the independent energy values ​​corresponding to the high-frequency detail components of all levels, and performs fixed rule sorting based on the numerical value of each energy value. The sorting process follows a unidirectional arrangement rule from large to small values ​​throughout the process. After sorting, an ordered sequence of energy levels corresponding to all high-frequency detail component levels is formed, and the energy ranking of each high-frequency detail component is fully recorded.

[0067] The quantization bit allocation unit has a built-in multi-level fixed quantization bit standard adapted to the high-frequency data feature preservation requirements of energy storage. The multi-level quantization bit is divided into the highest quantization bit, the lowest quantization bit, and the intermediate quantization bit according to the numerical value. The first high-frequency detail component level in the ordered sequence of energy levels is fixedly matched with the highest quantization bit, the last high-frequency detail component level in the ordered sequence of energy levels is fixedly matched with the lowest quantization bit, and the remaining intermediate high-frequency detail component levels are matched with the corresponding level of quantization bit in turn. The matching of quantization bit is completely based on the energy carrying capacity of each level of high-frequency detail component.

[0068] In one exemplary implementation, the quantization bit range is set to 2 bits to 8 bits. Specifically, the high-frequency detail component with the highest energy value is allocated 8 bits of quantization, the high-frequency detail component with the lowest energy value is allocated 2 bits of quantization, and the remaining intermediate levels are allocated corresponding quantization bits via linear interpolation within the 2-8 bit range according to their energy value sorting results. The determination of this range is based on the following: After wavelet decomposition, the dynamic range of the coefficients of the high-frequency detail components at each level of the energy storage time-series data typically does not exceed 10% of the original signal amplitude range. When using 8-bit quantization (corresponding to 256 quantization levels), the quantization signal-to-noise ratio can reach approximately 48 dB, which can completely preserve the amplitude information of transient impact characteristics and meet the fidelity requirements of waveform details for fault diagnosis. While 2-bit quantization (corresponding to 4 quantization levels) has lower precision, it is sufficient to distinguish the approximate energy range of noise disturbances and effective signals, and significantly reduces data storage requirements. Taking a 600V rated voltage energy storage power station as an example, after the voltage signal is decomposed into 5 layers using a dB4 wavelet, the first layer of high-frequency detail components (approximately 62% of the energy) is quantized with 8 bits, with a quantization level interval of 0.234V. The reconstruction error is less than 0.3V, fully meeting the voltage monitoring accuracy requirements of the energy storage system. The fifth layer of high-frequency detail components (less than 5% of the energy) is quantized with 2 bits. Based on the aforementioned upper limit assumption that "the dynamic range of the high-frequency detail components does not exceed 10% of the original signal amplitude," the quantization level interval is at most 600 × 0.1 / 4 = 15V. This layer mainly contains high-frequency measurement noise, and coarse quantization will not affect the signal reconstruction quality. The aforementioned value range of 2 to 8 bits can cover most energy storage application scenarios. Those skilled in the art can flexibly adjust within this range according to the actual data dynamic range and reconstruction accuracy requirements without any creative effort.

[0069] The quantization encoding execution unit retrieves the dedicated quantization bits for each level of high-frequency detail component matching, and performs scalar quantization encoding operation using the allocated quantization bits as the standard for fixed encoding precision at a single level. It generates a fixed number of quantization levels according to the level division rules corresponding to the fixed quantization bits. The total number of these quantization levels is uniquely determined by the quantization bits allocated to the corresponding level.

[0070] The quantization encoding execution unit traverses every wavelet coefficient contained in the high-frequency detail component of the current level, accurately matches and calibrates the actual value of a single wavelet coefficient with all the preset quantization levels of the current level, selects the quantization level that best matches the wavelet coefficient value as the mapping target, completes the accurate mapping and replacement of a single point wavelet coefficient, and continues to complete the point-by-point mapping processing of all wavelet coefficients in the current level.

[0071] After all wavelet coefficients at a single level have completed quantization level mapping, the quantization level results of all mapped levels are reorganized and integrated according to the time sequence of the original high-frequency detail components to form a coded data set with complete structure, time alignment, and precision matching. This coded data set is the high-frequency compressed data of the corresponding level. After all high-frequency detail components at all levels have completed the above quantization and encoding process, the high-frequency compressed data corresponding to all levels is obtained.

[0072] Step 4 involves generating a compressed data stream of continuous time-series data, including: All quantization index values ​​of low-frequency differential data are obtained as the first data segment, and all quantization index values ​​of high-frequency compressed data at each level are obtained as multiple second data segments. The first data segment and multiple second data segments are arranged sequentially in ascending order of hierarchy, and a preset separator is inserted between adjacent data segments to form a continuous data packet body. A compressed information header is written into the header of the data packet body. The compressed information header includes the number of decomposition layers, the number of quantization bits and quantization step size corresponding to each layer, the quantization step size of low-frequency differential data, the adaptive differential order determination result identifier, the segment length, the sampling frequency, and the Huffman coding code table, thus obtaining the compressed data stream.

[0073] The data stream reassembly process also includes lossless entropy encoding of the compressed data stream: After forming a continuous data packet body, the data packet body is processed by run-length encoding, which replaces the identical quantization index value that appears consecutively in the data packet body with a combination of the quantization index value and the number of consecutive occurrences, and generates run-length encoded data. Perform Huffman coding on the run-length encoded data, count the frequency of each symbol in the run-length encoded data, construct a Huffman tree based on the frequency of occurrence, assign a corresponding variable-length code to each symbol, and generate an entropy encoded data stream. The compressed header is merged and encapsulated with the entropy-encoded data stream to generate a compressed data stream that has undergone secondary compression.

[0074] The data segment extraction unit traverses all the data content inside the complete low-frequency differential data, accurately extracts all the quantization index values ​​generated after the low-frequency differential data has been quantized, and collects and integrates all the quantization index values ​​according to the original temporal arrangement structure of the low-frequency differential data. The complete set of quantization index values ​​after collection and integration is fixed as the first data segment.

[0075] The data segment extraction unit traverses the complete data content of each level of high-frequency compressed data, extracts all the quantization index values ​​generated after quantization encoding of the high-frequency compressed data of the corresponding level, and collects and organizes the quantization index values ​​within a single level according to the original time sequence structure of the corresponding high-frequency detail components. Each level independently forms a complete set of quantization index values, and the quantization index value sets obtained from all levels are used as independent second data segments.

[0076] The data sorting and reorganization unit completes the sequential arrangement of the first data segment and all second data segments according to the fixed arrangement rule of the hierarchical depth formed by wavelet decomposition from low to high. The overall arrangement order strictly follows the fixed encapsulation logic of low-frequency trend data first and high-frequency fluctuation data of each level arranged layer by layer, ensuring that the data arrangement structure is completely consistent with the hierarchical generation order of wavelet decomposition.

[0077] The data segmentation processing unit retrieves the system's preset fixed segmentation identifier as the boundary identifier of adjacent data segments. This segmentation identifier is a fixed identifier character exclusive to the energy storage time series data compression and encapsulation scenario. It can accurately distinguish the boundaries of data segments of different types and levels during the decoding stage. This segmentation identifier will be uniformly embedded at the connection position of every two groups of adjacent data segments to achieve independent boundary isolation of each data segment. After all embedding is completed, a data packet with a continuous structure and distinguishable boundaries is formed.

[0078] The header writing unit retrieves all fixed configuration parameters and judgment result parameters generated during the entire data compression process. It collects and organizes the following parameters: the number of decomposition layers determined by the wavelet decomposition process, the quantization bit length and quantization step size corresponding to each high-frequency detail component, the quantization step size used by the low-frequency approximation component, the adaptive differential order judgment result identifier obtained by point-by-point judgment of the low-frequency approximation component, the fixed segment length of each local data segment during segmented differential, the sampling frequency of the original time series data, and the code table constructed by Huffman coding (recorded in the form of a mapping table of each symbol and its corresponding codeword of different lengths). All collected parameter information is then standardized into a compressed header. The standardized compressed header is fixedly written to the front end of the data packet body, completing the construction of the compressed data stream of the basic structure.

[0079] The encoding processing unit performs run-length encoding preprocessing on the formed complete data packet body. It continuously traverses all the quantization index values ​​arranged sequentially inside the data packet body, continuously identifies the set of quantization index values ​​that are consecutive in time position and have completely consistent values, and performs content replacement processing on each set of quantization index values ​​that meet the continuous repetition feature. The continuous arrangement of single repetitive quantization index values ​​is replaced with a combined storage form of quantization index value body and corresponding total number of consecutive occurrences. After all the continuous repetitive data is replaced and integrated, a simplified run-length encoded data is generated.

[0080] The encoding statistics unit performs a full-domain traversal statistics on all independent symbol units within the formed run-length encoded data, and fully records the total number of occurrences of each type of symbol unit within the overall data structure. The overall frequency of occurrence of each type of symbol unit is defined by the total number of occurrences, and this frequency statistics provides a unique basis for subsequent variable-length encoding allocation.

[0081] The encoding construction unit completes the hierarchical construction of the Huffman tree based on the statistical results of the occurrence frequency of various symbol units. The hierarchical structure of the tree is strictly arranged according to the numerical value of the occurrence frequency of the symbols. Symbol units with higher frequency values ​​are assigned shorter codewords, and symbol units with lower frequency values ​​are assigned longer codewords. The data storage volume is reduced and compressed through the differentiated codeword allocation method.

[0082] After the Huffman tree is built, the encoding execution unit replaces the original symbol units inside the run-length encoded data with the corresponding exclusive variable-length codes obtained by matching. After all symbol units are replaced and integrated with variable-length codes, an entropy encoded data stream with a unified format and adapted code length is generated.

[0083] The data encapsulation unit seamlessly integrates the compressed information header stored at the front end with the entropy-encoded data stream arranged at the back end. The splicing process does not change the parameter arrangement structure of the compressed information header or the encoding order of the entropy-encoded data stream, and completely preserves the compression configuration parameters and the code stream data after secondary compression. Finally, it generates a compressed data stream with complete two-level entropy encoding, complete structure, and traceable parameters. This compressed data stream is the final compressed data carrier corresponding to the original continuous time-series data.

[0084] To verify the effectiveness of the method in this embodiment, a series of rigorous comparative tests were conducted, the details of which are as follows: The experiment used actual operating data from an energy storage power station as the test set, including four types of time-series data: voltage, current, temperature, and state of charge. The sampling frequency was 100Hz, and the total data duration was 24 hours, covering three typical operating conditions: full charge / discharge, conventional load tracking, and instantaneous power disturbance. The data was processed in frames with a frame length of 1 second (i.e., 100 sampling points per frame). The average processing time per frame, as described below, refers to the average time required to process one data frame. The experimental platform was an industrial control computer equipped with an Intel Core i7 processor, running Ubuntu 20.04, and the algorithm was implemented using Python 3.8.

[0085] The method in this embodiment (wavelet decomposition, adaptive differential compression, and quadratic entropy coding) is compared with the following three schemes: Scheme 1 is the traditional fixed differential order compression method (the differential order is fixed at second order, and wavelet decomposition is not performed); Scheme 2 is a compression method based on wavelet decomposition but with a fixed differential order (db4 wavelet, 5-level decomposition, and the differential order is fixed at second order); Scheme 3 is the discrete wavelet transform + EBCOT coding method used in the JPEG2000 standard (as a representative of the internationally used multi-scale compression standard).

[0086] Evaluation metrics include compression ratio (the ratio of the total number of bits in the original data to the total number of bits in the compressed data), signal-to-noise ratio of the reconstructed signal, and average processing time per frame.

[0087] The same test dataset was run on each comparison scheme, and the compression ratio, signal-to-noise ratio and single-frame processing time were recorded. The specific comparison results are shown in Table 1.

[0088] Table 1 Performance Comparison under Multiple Operating Conditions

[0089] Experimental results show that, in terms of compression ratio, the method in this embodiment achieves 12.8:1 under stable operating conditions, which is about 110% higher than Scheme 2 and about 54% higher than Scheme 3. Under conditions of severe fluctuations, the compression ratio is relatively lower (5.9:1), but more transient details are preserved under these conditions, meeting design expectations. Regarding reconstruction accuracy, the method in this embodiment outperforms the comparative schemes in signal-to-noise ratio under all operating conditions, especially under conditions of severe fluctuations, where the signal-to-noise ratio reaches 45.2 dB, an improvement of about 10 dB compared to the fixed-difference scheme. This demonstrates that the adaptive differential mechanism can effectively protect… Transient features are not excessively smoothed. Regarding processing time, the method in this embodiment has a single-frame processing time of approximately 8.2ms and 9.1ms under stable and normal fluctuation conditions, respectively, both of which stably meet the real-time compression requirements of the energy storage system at a 100Hz sampling frequency. Under transient disturbance conditions, the single-frame processing time is 10.3ms. Since a single frame corresponds to 1 second (100 sampling points) of collected data, the processing time is much shorter than the frame duration. The average single-point processing time is approximately 0.1ms, calculated point-by-point equivalently, which is far lower than the 10ms sampling period, providing sufficient real-time margin. Furthermore, in actual engineering deployments, conventional optimization methods such as multi-threaded parallel processing and data cache pre-fetching can further reduce processing latency under extreme conditions, ensuring that overall processing performance meets the needs of field applications. Overall, the method in this embodiment significantly outperforms JPEG2000's 16.8ms in processing efficiency, meeting real-time engineering requirements in most operating scenarios, with only slight margin fluctuations under transient disturbance conditions, which do not affect its engineering practicality. Based on the experimental data above, the method in this embodiment achieves a good balance between compression ratio, reconstruction accuracy, and real-time performance, verifying its effectiveness and engineering applicability in energy storage time-series data compression scenarios.

[0090] Example 2: Figure 2 As shown, the adaptive differential compression system for energy storage time-series data based on wavelet decomposition includes the following modules arranged in sequence: The multi-level wavelet decomposition module is used to separate continuous time series data into low-frequency approximate components and multiple high-frequency detail components based on wavelet transform theory. The low-frequency approximate components reflect the long-term variation trend of continuous time series data, while the high-frequency detail components reflect the local fluctuation characteristics of continuous time series data. The low-frequency adaptive differential compression module is used to perform adaptive differential compression operations on low-frequency approximate components. It dynamically determines the difference order based on the local statistical characteristics of the low-frequency approximate components and dynamically adjusts the difference order based on the window variance to perform differential operations on the low-frequency approximate components and generate low-frequency differential data. The high-frequency quantization encoding module is used to quantize and compress multiple high-frequency detail components. It allocates quantization bits according to the energy distribution characteristics of each high-frequency detail component, quantizes and encodes each high-frequency detail component, and generates high-frequency compressed data. The compressed data stream reassembly module is used to reassemble low-frequency differential data and high-frequency compressed data according to a preset data packaging format to generate a compressed data stream of continuous time-series data.

[0091] The implementation details of each module are the same as in Example 1.

[0092] Example 3: An adaptive differential compression device for energy storage time series data based on wavelet decomposition, comprising: One or more processors; Memory, used to store one or more computer programs; When one or more computer programs are executed by one or more processors, the one or more processors perform the method in Embodiment 1.

[0093] Example 4: A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method in Example 1.

Claims

1. An adaptive differential compression method for energy storage time-series data based on wavelet decomposition, characterized in that, The methods include: Step 1: Based on wavelet transform theory, continuous time series data is separated into low-frequency approximate components and multiple high-frequency detail components through multi-layer wavelet decomposition. The low-frequency approximate components reflect the long-term variation trend of continuous time series data, while the high-frequency detail components reflect the local fluctuation characteristics of continuous time series data. Step 2: Perform adaptive differential compression on the low-frequency approximation components. Dynamically determine the difference order based on the local statistical characteristics of the low-frequency approximation components and dynamically adjust the difference order based on the window variance. Perform differential operations on the low-frequency approximation components to generate low-frequency differential data. Step 3: Quantize and compress multiple high-frequency detail components. Allocate quantization bits according to the energy distribution characteristics of each high-frequency detail component, quantize and encode each high-frequency detail component, and generate high-frequency compressed data. Step 4: Reassemble the low-frequency differential data and high-frequency compressed data according to the preset data packaging format to generate a compressed data stream of continuous time-series data.

2. The adaptive differential compression method for energy storage time series data based on wavelet decomposition as described in claim 1, characterized in that, In step 1, the continuous time series data is obtained as follows: With a fixed sampling period, the energy storage terminal continuously collects real-time operating parameters generated during the operation of the energy storage system, including voltage, current, temperature and state of charge. All real-time operating parameters acquired at each acquisition time are timestamped according to the chronological order of acquisition time to form raw time-series data; Missing values ​​in the original time series data are filled in using linear interpolation to form complete continuous time series data.

3. The adaptive differential compression method for energy storage time series data based on wavelet decomposition as described in claim 2, characterized in that, In step 1, continuous time-series data is separated into low-frequency approximate components and multiple high-frequency detail components through multi-level wavelet decomposition, including: The db4 wavelet in the orthogonal wavelet family is selected as the basis wavelet function. The first-level discrete wavelet transform is performed on the continuous time series data, decomposing the continuous time series data into the first-level low-frequency approximation coefficients and the first-level high-frequency detail coefficients. The first layer of low-frequency approximation coefficients are further subjected to the next layer of discrete wavelet transform, and the decomposition is carried out layer by layer until the preset number of decomposition layers is reached. Each layer of decomposition produces the corresponding high-frequency detail coefficients and the low-frequency approximation coefficients of the final layer. The preset number of decomposition layers is determined by the overall data length of the original time series data and the time domain characteristic period of the typical operating conditions of the energy storage terminal, so that the decomposed low-frequency approximate components can fully characterize the macroscopic energy change trend during the charging and discharging cycle of the energy storage terminal. After completing the decomposition of all layers, the low-frequency approximation coefficients of the final layer are used as low-frequency approximation components, and the high-frequency detail coefficients generated by each layer decomposition are used as high-frequency detail components of each layer.

4. The adaptive differential compression method for energy storage time series data based on wavelet decomposition as described in claim 1, characterized in that, In step 2, an adaptive differential compression operation is performed on the low-frequency approximation component. The difference order is dynamically determined based on the local statistical characteristics of the low-frequency approximation component, including: The low-frequency approximation component is divided into multiple non-overlapping local data segments in chronological order, and each local data segment contains a preset number of continuous data points; Calculate the statistical characteristic parameters within each local data segment. The statistical characteristic parameters include the variance of the local data segment and the amplitude range between the maximum and minimum values ​​within the local data segment. The variance and amplitude range of a local data segment are compared with a preset smoothness judgment threshold. When both variance and amplitude range are less than the preset smoothness judgment threshold, the local data segment is judged as a smooth segment. When either variance or amplitude range is not less than the preset smoothness judgment threshold, the local data segment is judged as a non-smooth segment. The smoothness judgment threshold includes the variance threshold and the range threshold.

5. The adaptive differential compression method for energy storage time-series data based on wavelet decomposition as described in claim 4, characterized in that, In step 2, the low-frequency approximate components are subjected to a difference operation, including: For a local data segment that is determined to be a smooth segment, the second-order difference is selected as the difference order. Within the local data segment, the first difference between each data point and its previous data point is first calculated. Then, for two adjacent first differences, the difference between them is calculated as the second difference, generating a sequence of second-order difference values ​​for the local data segment. For local data segments that are determined to be non-smooth segments, the first-order difference is selected as the difference order. The difference between each data point and the previous data point is counted within the local data segment to generate a sequence of first-order difference values ​​for the local data segment. All local data segments are reassembled in chronological order to form initial low-frequency differential data that completely covers the entire low-frequency approximate component.

6. The adaptive differential compression method for energy storage time series data based on wavelet decomposition as described in claim 5, characterized in that, In step 2, the difference order is dynamically adjusted based on the window variance, including: A sliding window is set on the low-frequency approximation component. The sliding window is centered on the currently processed data point and includes several consecutive data points in front of and behind the center point as window data. The window length of the sliding window is dynamically calculated based on the sampling frequency of the energy storage time-series data and the minimum response time of the energy storage system power command. Based on the window length, calculate the mean of all window data within the sliding window, and calculate the variance of all window data within the sliding window; Calculate the adaptive difference order determination factor based on the variance; The adaptive difference order determination factor is compared with the preset first threshold and second threshold. When the adaptive difference order determination factor is less than the first threshold, the difference order at the current center point is determined to be the third difference, which corresponds to the steady working condition. When the adaptive difference order determination factor is greater than or equal to the first threshold and less than or equal to the second threshold, the difference order at the current center point is determined to be second-order difference, corresponding to the normal fluctuation condition. When the adaptive difference order determination factor is greater than the second threshold, the difference order at the current center point is determined to be the first difference, which corresponds to the violent fluctuation condition. For data points whose difference order at the current center point, determined based on window variance, is inconsistent with the difference order of the local data segment where the center point is located, the difference value of the data point is recalculated based on the difference order determined based on window variance. The recalculated difference value is then used to replace the corresponding value in the initial low-frequency difference data. After the replacement is completed, the low-frequency difference data is obtained.

7. The adaptive differential compression method for energy storage time series data based on wavelet decomposition as described in claim 1, characterized in that, Step 3 generates high-frequency compressed data, including: The sum of the squares of all coefficients in each level of high-frequency detail component is taken as the energy value of the high-frequency detail component. The energy values ​​of each level are sorted in descending order, and the highest quantization bit depth is assigned to the high-frequency detail component with the highest energy value, and the lowest quantization bit depth is assigned to the high-frequency detail component with the lowest energy value. Scalar quantization encoding is performed on the high-frequency detail components of each level according to the allocated quantization bit depth. Each coefficient in the high-frequency detail components of each level is mapped to the corresponding quantization level to generate high-frequency compressed data of the level.

8. The adaptive differential compression method for energy storage time-series data based on wavelet decomposition as described in claim 1, characterized in that, Step 4 involves generating a compressed data stream of continuous time-series data, including: All quantization index values ​​of low-frequency differential data are obtained as the first data segment, and all quantization index values ​​of high-frequency compressed data at each level are obtained as multiple second data segments. The first data segment and multiple second data segments are arranged sequentially in ascending order of hierarchy, and a preset separator is inserted between adjacent data segments to form a continuous data packet body. A compressed information header is written into the header of the data packet body. The compressed information header includes the number of decomposition layers, the number of quantization bits and quantization step size corresponding to each layer, the quantization step size of low-frequency differential data, the adaptive differential order determination result identifier, the segment length, the sampling frequency, and the Huffman coding code table, thus obtaining the compressed data stream.

9. The adaptive differential compression method for energy storage time series data based on wavelet decomposition as described in claim 8, characterized in that, The data stream reassembly process also includes lossless entropy encoding of the compressed data stream: After forming a continuous data packet body, the data packet body is processed by run-length encoding, which replaces the identical quantization index value that appears consecutively in the data packet body with a combination of the quantization index value and the number of consecutive occurrences, and generates run-length encoded data. Perform Huffman coding on the run-length encoded data, count the frequency of each symbol in the run-length encoded data, construct a Huffman tree based on the frequency of occurrence, assign a corresponding variable-length code to each symbol, and generate an entropy encoded data stream. The compressed header is merged and encapsulated with the entropy-encoded data stream to generate a compressed data stream that has undergone secondary compression.

10. An adaptive differential compression system for energy storage time-series data based on wavelet decomposition, used to implement the method described in any one of claims 1 to 9, characterized in that, include: The multi-level wavelet decomposition module is used to separate continuous time series data into low-frequency approximate components and multiple high-frequency detail components based on wavelet transform theory. The low-frequency approximate components reflect the long-term variation trend of continuous time series data, while the high-frequency detail components reflect the local fluctuation characteristics of continuous time series data. The low-frequency adaptive differential compression module is used to perform adaptive differential compression operations on low-frequency approximate components. It dynamically determines the difference order based on the local statistical characteristics of the low-frequency approximate components and dynamically adjusts the difference order based on the window variance to perform differential operations on the low-frequency approximate components and generate low-frequency differential data. The high-frequency quantization encoding module is used to quantize and compress multiple high-frequency detail components. It allocates quantization bits according to the energy distribution characteristics of each high-frequency detail component, quantizes and encodes each high-frequency detail component, and generates high-frequency compressed data. The compressed data stream reassembly module is used to reassemble low-frequency differential data and high-frequency compressed data according to a preset data packaging format to generate a compressed data stream of continuous time-series data.