Waveform data compression method and system based on dynamic block division and bimodal optimization
Through the method of dynamic blocking and bimodal optimization, the problems of detail loss and redundant calculation caused by device differences in waveform compression are solved, and efficient waveform data compression is achieved, which is suitable for scenarios such as medical monitoring and industrial sensors.
Patent Information
- Application Number
- CN202510475160.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-04-16
AI Technical Summary
Existing waveform compression technology has problems such as fixed blocking leading to detail loss of low-pixel devices, redundant calculation of high-pixel devices, insufficient extreme value sampling, and uneven remainder distribution leading to waveform phase shift.
The method of dynamic blocking and dual extreme value optimization is adopted. Through parameter input, dynamic blocking processing, dual-channel remainder salting and dual extreme value extraction optimization, adaptive allocation of data points and adjustment of extreme value density are achieved to ensure waveform accuracy and resource utilization efficiency.
It achieves a balance between display accuracy and computing resources for different pixel devices, retains the characteristics of key signal areas, is suitable for low-power devices, and maintains waveform integrity and visual consistency.
Smart Images

Figure CN120017842B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data compression, and in particular to a waveform data compression method and system based on dynamic blocking and bipolar value optimization. Background Art
[0002] Existing waveform compression technology has the following defects:
[0003] 1. Fixed block compression: Traditional methods use fixed-length data blocks, which results in loss of details on low-pixel devices and redundant calculations on high-pixel devices.
[0004] 2. Insufficient extreme value sampling: Single extreme value sampling cannot retain key features in the waveform mutation area (such as the R peak of the ECG signal).
[0005] 3. Uneven distribution of remainders: Simple truncation or concentrated distribution of remainder points will cause waveform phase shift and affect visual consistency. Summary of the Invention
[0006] The purpose of the present invention is to overcome the deficiencies of the prior art and to provide a waveform data compression method and system based on dynamic blocking and bi-extreme value optimization.
[0007] The object of the present invention is achieved through the following technical solutions: In a first aspect, the present invention provides: a waveform data compression method based on dynamic blocking and bipolar value optimization, comprising the following steps:
[0008] Parameter input stage: input the number of data points, sampling rate and display pixels, and determine whether the minimum pixel requirements are met. If so, the dynamic block processing stage is executed;
[0009] Dynamic block processing stage: Calculate the benchmark block and benchmark data block according to the input parameters;
[0010] Dual-channel remainder salting stage: salting is performed on the push side and the rendering side to distribute data points;
[0011] Double extreme value extraction optimization stage: Data is divided into blocks according to the salting mark, and the maximum and minimum values are extracted. Then, the weight is judged and the extreme value density is dynamically adjusted based on the signal change rate.
[0012] Compressed data output stage: output extreme value pair sequence, original data copy and extreme value list.
[0013] Preferably, the dynamic block processing stage further includes the following steps:
[0014] Establish a dynamic mapping relationship between display pixels and data blocks;
[0015] Define the reference unit and split the display pixel Px according to the reference unit. The block base C = max(⌊display pixel Px / reference unit⌋, 1), and the remainder allocation number Z = display pixel Px % reference unit;
[0016] Calculate the data block parameters, basic data block length q = ⌊sampling rate Rate / display pixel Px⌋, remainder point mod=sampling rate Rate % display pixel Px;
[0017] Perform boundary protection. If q = 0, correct q to 1 to avoid excessive aggregation of data points.
[0018] Preferably, the dual-channel remainder salting stage further includes the following steps:
[0019] Evenly distribute the remainder points in the time dimension and space dimension to eliminate phase offset;
[0020] Perform salt spreading on the push side and calculate the salt spreading interval = 20 / Z; insert the remainder point and traverse the remainder distribution number (i=1→Z): insertion position = round(i×salt spreading interval);
[0021] Perform salting on the rendering side and calculate the salting density = Px / mod; allocate remainder points and traverse the number of remainder points (y=1→mod): allocation position = round(y × salting density).
[0022] Preferably, the bimodal value extraction optimization stage further comprises the following steps:
[0023] Extract the basic extreme value, determine the block length, and then force the extraction of the maximum value Max and minimum value Min of each block;
[0024] Dynamically calculate the weight W = α×(Max-Min) + β×|S_current - S_prev|, where α is the amplitude difference weight, β is the slope change weight, S_current is the average slope of the current block, and S_prev is the average slope of the previous block. If W is greater than the weight threshold, the sub-extreme value is appended and the append flag is recorded. If W for a preset number of consecutive blocks is greater than the weight threshold, β is reduced.
[0025] Preferably, the reference unit is 20 pixels.
[0026] Preferably, the α=0.3, the β=0.7, the weight threshold=15, and the preset number=3.
[0027] A second aspect of the present invention provides: a waveform data compression system based on dynamic blocking and bimodal optimization, for implementing any of the above-mentioned waveform data compression methods based on dynamic blocking and bimodal optimization, comprising:
[0028] The parameter input module is used to input the number of data points, sampling rate and display pixels, and determine whether the minimum pixel requirements are met. If so, dynamic block processing is performed;
[0029] Dynamic block processing module, used for calculating reference blocks and reference data blocks according to input parameters;
[0030] A dual-channel remainder salting module is used to distribute data points for salting on the push side and salting on the rendering side.
[0031] The dual extreme value extraction optimization module is used to extract data by block length according to the salt spreading mark, extract the maximum and minimum values, then make weight judgments and dynamically adjust the extreme value density based on the signal change rate;
[0032] Compressed data output module, used to output extreme value pair sequence, original data copy and extreme value list.
[0033] The third aspect of the present invention provides: a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, any of the above-mentioned waveform data compression methods based on dynamic blocking and bipolar value optimization is implemented.
[0034] A fourth aspect of the present invention provides: a computer program product comprising instructions, which, when running on a terminal, enables the terminal to execute any of the above-mentioned waveform data compression methods based on dynamic blocking and bipolar value optimization.
[0035] The beneficial effects of the present invention are:
[0036] 1) Through a three-level linkage architecture of dynamic blocking, salting, and extreme values, an automatic balance between display accuracy and computing resources is achieved. High-pixel devices improve details by increasing the number of blocks, while low-pixel devices maintain waveform integrity through a salting algorithm.
[0037] 2) Pixel Adaptation: Display resolution is dynamically bound to data blocks to adapt to low-power, low-pixel devices.
[0038] 3) Feature fidelity: Enhance the extreme value density in key signal areas through the weight model.
[0039] 4) Resource efficiency: The algorithm's memory usage is stable at the O(1) level, making it suitable for embedded devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a flow chart of a waveform data compression method based on dynamic blocking and bi-extreme value optimization. DETAILED DESCRIPTION
[0041] The following will clearly and completely describe the technical solutions of the present invention in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0042] The method proposed in the present invention is particularly suitable for scenarios requiring high-precision waveform restoration, such as medical monitoring equipment and industrial sensor monitoring.
[0043] See Figure 1 The first aspect of the present invention provides: a waveform data compression method based on dynamic blocking and bimodal optimization, comprising the following steps:
[0044] Parameter input stage: input the number of data points, sampling rate and display pixels, and determine whether the minimum pixel requirements are met. If so, the dynamic block processing stage is executed;
[0045] Dynamic block processing stage: Calculate the benchmark block and benchmark data block according to the input parameters;
[0046] Dual-channel remainder salting stage: salting is performed on the push side and the rendering side to distribute data points;
[0047] Double extreme value extraction optimization stage: Data is divided into blocks according to the salting mark, and the maximum and minimum values are extracted. Then, the weight is judged and the extreme value density is dynamically adjusted based on the signal change rate.
[0048] Compressed data output stage: output extreme value pair sequence, original data copy and extreme value list.
[0049] In this embodiment, the input parameters are: number of data points Count, sampling rate Rate, and display pixel Px; through the three-level linkage of parameter calculation, allocation rules, and dynamic optimization, a complete logical closed loop from data input to compressed output is achieved, meeting the accuracy and efficiency requirements of different application scenarios.
[0050] In some embodiments, the dynamic block processing stage further includes the following steps:
[0051] Establish a dynamic mapping relationship between display pixels and data blocks;
[0052] Define the reference unit and split the display pixel Px according to the reference unit. The block base C = max(⌊display pixel Px / reference unit⌋, 1), and the remainder allocation number Z = display pixel Px % reference unit;
[0053] Calculate the data block parameters, basic data block length q = ⌊sampling rate Rate / display pixel Px⌋, remainder point mod=sampling rate Rate % display pixel Px;
[0054] Perform boundary protection. If q = 0, correct q to 1 to avoid excessive aggregation of data points.
[0055] In this embodiment, a dynamic mapping relationship between display pixels and data blocks is established to ensure optimal waveform feature preservation on devices with different resolutions. Reference unit division: The reference unit (the smallest visible unit) is defined as 20 pixels, and the total number of displayed pixels is divided by the reference unit: Block cardinality: C = max(⌊Px / 20⌋, 1) (ensuring at least one block) Remainder allocation number: Z = Px % 20 (recording the remaining pixels that cannot be fully allocated to the reference unit). Data block parameter calculation: Basic data block length: q = ⌊Rate / Px⌋ (the number of basic sampling points corresponding to each pixel) Remainder point number: mod = Rate % Px (remaining sampling points that cannot be evenly divided).
[0056] Boundary protection mechanism: If q = 0 (high-resolution scenes), it is forced to q = 1 to prevent excessive data point aggregation. Block logic closed loop: Total number of blocks: Total_Blocks = C × 20 + Z. Data allocation verification: Total number of allocated points = (C × 20 × q) + (Z × (q + 1)) + mod verification formula: Total number of allocated points = Rate (to ensure no data loss). Boundary protection: Enforce q ≥ 1 to avoid data block overload, and max(C, 1) to prevent zero block errors.
[0057] In some embodiments, the dual-channel remainder salting stage further includes the following steps:
[0058] Evenly distribute the remainder points in the time dimension and space dimension to eliminate phase offset;
[0059] Perform salt spreading on the push side and calculate the salt spreading interval = 20 / Z; insert the remainder point and traverse the remainder distribution number (i=1→Z): insertion position = round(i×salt spreading interval);
[0060] Perform salting on the rendering side and calculate the salting density = Px / mod; allocate remainder points and traverse the number of remainder points (y=1→mod): allocation position = round(y × salting density).
[0061] In this embodiment, remainder points are evenly distributed across the temporal (data stream) and spatial (display pixel) dimensions to eliminate phase shift. Salting on the push side (in the temporal dimension): The salting interval is calculated as follows: salting interval = 20 / Z (where Z is the remainder allocation number). Remainder point insertion rule: Traverse the remainder allocation number (i = 1 → Z): Insertion position = round(i × salting interval). For example, when Z = 5, insertion points are 4, 8, 12, 16, and 20 (with 4-pixel intervals). Remainder points are dynamically inserted into Z blocks (index position is round(i * salting interval), i = 1, 2, ..., Z), rounded up.
[0062] Rendering-side salting (spatial dimension): Salting density calculation: Salting density = Px / mod (mod is the number of remainder points). Remainder point allocation rule: Traverse the remainder points (y = 1 → mod): Allocation position = round(y × salting density). Example: When mod = 3 and Px = 1200, the allocated points are 400, 800, and 1200. In the original data, the remainder points (y = 1, 2, ..., mod) are allocated according to round(y * salting density), rounding up.
[0063] Mathematical constraints: Use the round() function and integer operations to ensure that the remainder is allocated to an integer number of pixels.
[0064] In some embodiments, the bipolar value extraction optimization stage further includes the following steps:
[0065] Extract the basic extreme value, determine the block length, and then force the extraction of the maximum value Max and minimum value Min of each block;
[0066] Dynamically calculate the weight W = α×(Max-Min) + β×|S_current - S_prev|, where α is the amplitude difference weight, β is the slope change weight, S_current is the average slope of the current block, and S_prev is the average slope of the previous block. If W is greater than the weight threshold, the sub-extreme value is appended and the append flag is recorded. If W for a preset number of consecutive blocks is greater than the weight threshold, β is reduced.
[0067] In this embodiment, detail resolution in signal mutation regions is enhanced while preserving waveform envelope characteristics. Block length determination: If the current block contains a push-side salting point, then the data block length is q+1; otherwise, the data block length is q. Extreme value sampling rule: The maximum (Max) and minimum (Min) values of each block are extracted. The secondary extreme values, i.e., the second-largest and second-smallest values, are recorded and appended with flags for subsequent data reconstruction. If W for a preset number of consecutive blocks exceeds the weight threshold, β is reduced to prevent overfitting.
[0068] In some embodiments, the reference unit is 20 pixels.
[0069] In some embodiments, the α=0.3, the β=0.7, the weight threshold=15, and the preset number=3.
[0070] In this embodiment, feature fidelity verification: fidelity index: feature retention rate = (number of captured key points / total number of theoretical key points) × 100%.
[0071] Logical closed-loop verification: dynamic block → salt distribution, the block base C determines the denominator value of the salt interval calculation; the remainder distribution number Z also affects the number of salt points on the push end and the distribution density on the rendering end.
[0072] Salt distribution → extreme value extraction. The location of the salting point determines the block length (q or q+1); the block length directly affects the extreme value extraction range.
[0073] Extreme value optimization → Block adjustment, additional flags are output by the dynamic weight model, which in turn trigger dynamic fine-tuning of the block length; after the secondary extreme value is added, the S_prev slope of the subsequent blocks is recalculated.
[0074] A second aspect of the present invention provides: a waveform data compression system based on dynamic blocking and bimodal optimization, for implementing any of the above-mentioned waveform data compression methods based on dynamic blocking and bimodal optimization, comprising:
[0075] The parameter input module is used to input the number of data points, sampling rate and display pixels, and determine whether the minimum pixel requirements are met. If so, dynamic block processing is performed;
[0076] Dynamic block processing module, used for calculating reference blocks and reference data blocks according to input parameters;
[0077] A dual-channel remainder salting module is used to distribute data points for salting on the push side and salting on the rendering side.
[0078] The dual extreme value extraction optimization module is used to extract data by block length according to the salt spreading mark, extract the maximum and minimum values, and then make weight judgments and dynamically adjust the extreme value density based on the signal change rate;
[0079] Compressed data output module, used to output extreme value pair sequence, original data copy and extreme value list.
[0080] The third aspect of the present invention provides: a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, any of the above-mentioned waveform data compression methods based on dynamic blocking and bipolar value optimization is implemented.
[0081] A fourth aspect of the present invention provides: a computer program product comprising instructions, which, when running on a terminal, enables the terminal to execute any of the above-mentioned waveform data compression methods based on dynamic blocking and bipolar value optimization.
[0082] The foregoing description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein and should not be construed as excluding other embodiments. Rather, the present invention can be used in various other combinations, modifications, and environments and can be modified within the scope of the concept described herein through the above teachings or techniques or knowledge in the relevant field. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention are intended to be protected by the appended claims.
Claims
1. A waveform data compression method based on dynamic block segmentation and bi-extreme value optimization, characterized by: The following steps are involved: Parameter input stage: input the number of data points, sampling rate and display pixels, and determine whether the minimum pixel requirements are met. If so, the dynamic block processing stage is executed; Dynamic block processing stage: Calculate the benchmark block and benchmark data block according to the input parameters; Dual-channel remainder salting stage: salting is performed on the push side and the rendering side to distribute data points; Double extreme value extraction optimization stage: Data is divided into blocks according to the salting mark, and the maximum and minimum values are extracted. Then, the weight is judged and the extreme value density is dynamically adjusted based on the signal change rate. Compressed data output stage: output extreme value pair sequence, original data copy and extreme value list; The dynamic block processing stage further comprises the following steps: Establish a dynamic mapping relationship between display pixels and data blocks; Define the reference unit and split the display pixel Px according to the reference unit. The block cardinality C = max(⌊display pixel Px / reference unit⌋, 1), and the remainder allocation number Z = display pixel Px % reference unit. Calculate the data block parameters, basic data block length q = ⌊sampling rate Rate / display pixel Px⌋, remainder point mod=sampling rate Rate % display pixel Px; Perform boundary protection. If q = 0, correct q to 1 to avoid excessive aggregation of data points. The bipolar value extraction optimization stage further comprises the following steps: Extract the basic extreme value, determine the block length, and then force the extraction of the maximum value Max and minimum value Min of each block; Dynamically calculate the weight W = α×(Max-Min) + β×|S_current - S_prev|, where α is the amplitude difference weight, β is the slope change weight, S_current is the average slope of the current block, and S_prev is the average slope of the previous block. If W is greater than the weight threshold, the sub-extreme value is appended and the append flag is recorded. If W for a preset number of consecutive blocks is greater than the weight threshold, β is reduced.
2. The waveform data compression method based on dynamic block segmentation and bimodal optimization according to claim 1, characterized in that: The dual-channel remainder salting stage further includes the following steps: Evenly distribute the remainder points in the time dimension and space dimension to eliminate phase offset; Perform salt spreading on the push side and calculate the salt spreading interval = 20 / Z; insert the remainder point and traverse the remainder distribution number (i=1→Z): insertion position = round(i×salt spreading interval); Perform salting on the rendering side and calculate the salting density = Px / mod; allocate remainder points and traverse the number of remainder points (y=1→mod): allocation position = round(y × salting density).
3. The waveform data compression method based on dynamic block segmentation and bimodal optimization according to claim 1, characterized in that: The reference unit is 20 pixels.
4. The waveform data compression method based on dynamic block segmentation and bimodal optimization according to claim 1, characterized in that: The α=0.3, the β=0.7, the weight threshold=15, and the preset number=3.
5. A waveform data compression system based on dynamic block segmentation and bi-extreme value optimization, characterized by: A waveform data compression method based on dynamic blocking and bi-extreme value optimization according to any one of claims 1 to 4, comprising: The parameter input module is used to input the number of data points, sampling rate and display pixels, and determine whether the minimum pixel requirements are met. If so, dynamic block processing is performed; Dynamic block processing module, used for calculating reference blocks and reference data blocks according to input parameters; A dual-channel remainder salting module is used to distribute data points for salting on the push side and salting on the rendering side. The dual extreme value extraction optimization module is used to extract data by block length according to the salt spreading mark, extract the maximum and minimum values, and then make weight judgments and dynamically adjust the extreme value density based on the signal change rate; Compressed data output module, used to output extreme value pair sequence, original data copy and extreme value list.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are loaded and executed by the processor, the waveform data compression method based on dynamic blocking and bipolar value optimization as described in any one of claims 1 to 4 is implemented.
7. A computer program product comprising instructions, characterized in that: When the computer program product is run on a terminal, the terminal is enabled to execute the waveform data compression method based on dynamic blocking and bipolar value optimization according to any one of claims 1 to 4.
Citation Information
Patent Citations
Audio data processing method and device
CN110970048A
Intelligent analysis system based on instantaneous elastography technology
CN119523529A