Waveform data compression method and system based on dynamic partitioning and double extreme value optimization
Through dynamic blocking, double-channel remainder salting and bi-extreme value optimization, the problems of fixed blocking, insufficient extreme value sampling and uneven remainder allocation in the existing waveform compression technology are solved, and the waveform data compression effect is achieved efficient, resource-saving and feature fidelity is achieved.
Patent Information
- Application Number
- CN202510475160.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-04-16
AI Technical Summary
The existing waveform compression technology has problems such as fixed chunking resulting in the loss of details of low-pixel devices, high-pixel devices redundant calculation, insufficient extreme value sampling resulting in the loss of features of waveform mutation areas, and uneven remainder allocation resulting in waveform phase offset.
The waveform data compression method based on dynamic chunking and bipolar optimization is adopted, and the precise data compression is achieved through dynamic chunking processing, dual-channel remainder salting and bipolar extraction optimization.
It realizes automatic balance between display accuracy and computing resources, adapts to low-power and low-pixel devices, has high fidelity, feature fidelity, and efficient resources, and is suitable for embedded devices.
Smart Images

Figure CN120017842A_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] The existing waveform compression technology has the following defects: 1. Fixed block compression: Traditional methods use fixed-length data blocks, which results in loss of details for low-pixel devices and redundant calculations for high-pixel devices.
[0003] 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).
[0004] 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
[0005] 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 bipolar value optimization.
[0006] The object of the present invention is achieved through the following technical solutions: The first aspect of the present invention provides: a waveform data compression method based on dynamic block division and bipolar value optimization, comprising the following steps: 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, execute the dynamic block processing stage; Dynamic block processing stage: calculate the benchmark block and benchmark data block according to the input parameters; Dual-channel remainder salting stage: salting on the push side and salting on the rendering side to distribute data points; Double extreme value extraction optimization stage: data is taken in blocks according to the salting mark, the maximum and minimum values are extracted, and 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.
[0007] Preferably, 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, split the display pixel Px according to the reference unit, the block base C = max(⌊display pixel Px / reference unit⌋, 1), the remainder allocation number Z = display pixel Px % reference unit; Calculate the data block parameters, the basic data block length q = ⌊sampling rate Rate / display pixel Px⌋, the 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.
[0008] Preferably, 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 end, calculate the salt spreading interval = 20 / Z; insert the remainder point, 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).
[0009] Preferably, the bipolar value extraction optimization stage further comprises the following steps: Extract the basic extreme value, determine the block length, and then force the maximum value Max and minimum value Min of each block to be extracted; 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 secondary extreme value is appended and the append flag is recorded. If W of a preset number of consecutive blocks is greater than the weight threshold, β is reduced.
[0010] Preferably, the reference unit is 20 pixels.
[0011] Preferably, the α=0.3, the β=0.7, the weight threshold=15, and the preset number=3.
[0012] The second aspect of the present invention provides: a waveform data compression system based on dynamic block division and bi-extreme value optimization, which is used to implement any of the above-mentioned waveform data compression methods based on dynamic block division and bi-extreme value optimization, 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; A dynamic block processing module is used to calculate the reference block and the reference data block according to the input parameters; Dual-channel remainder salting module, 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 sequences, copies of original data, and extreme value lists.
[0013] 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.
[0014] 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.
[0015] The beneficial effects of the present invention are: 1) Through the three-level linkage architecture of dynamic blocking, salting and extreme value, an automatic balance between display accuracy and computing resources is achieved. High-pixel devices improve details by increasing the number of blocks, and low-pixel devices maintain waveform integrity through the salting algorithm.
[0016] 2) Pixel adaptation: Display resolution and data blocks are dynamically bound to adapt to low-power, low-pixel devices.
[0017] 3) Feature fidelity: Enhance the extreme value density in key signal areas through the weight model.
[0018] 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
[0019] Figure 1 The flowchart of the waveform data compression method based on dynamic blocking and dual extreme value optimization is shown in FIG. DETAILED DESCRIPTION
[0020] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0021] The method proposed in the present invention is particularly suitable for scenarios such as medical monitoring equipment and industrial sensor monitoring that require high-precision waveform restoration.
[0022] See also Figure 1The first aspect of the present invention provides: a waveform data compression method based on dynamic block division and bipolar value optimization, comprising the following steps: 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, execute the dynamic block processing stage; Dynamic block processing stage: calculate the benchmark block and benchmark data block according to the input parameters; Dual-channel remainder salting stage: salting on the push side and salting on the rendering side to distribute data points; Double extreme value extraction optimization stage: data is taken in blocks according to the salting mark, the maximum and minimum values are extracted, and 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.
[0023] 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 compression output is achieved to meet the accuracy and efficiency requirements of different application scenarios.
[0024] In some embodiments, the dynamic block processing stage further includes the following steps: Establish a dynamic mapping relationship between display pixels and data blocks; Define the reference unit, split the display pixel Px according to the reference unit, the block base C = max(⌊display pixel Px / reference unit⌋, 1), the remainder allocation number Z = display pixel Px % reference unit; Calculate the data block parameters, the basic data block length q = ⌊sampling rate Rate / display pixel Px⌋, the 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.
[0025] In this embodiment, a dynamic mapping relationship between display pixels and data blocks is established to ensure the optimization of waveform feature retention under different resolution devices. Base unit division: define the base unit (minimum visible unit) as 20 pixels, and split the total number of display pixels according to the base unit: Block cardinality: C = max(⌊Px / 20⌋, 1) (ensure at least 1 block) Remainder allocation number: Z = Px % 20 (record the remainder pixels that cannot be fully allocated to the base 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).
[0026] Boundary protection mechanism: If q=0 (high-resolution scene), it is forced to be corrected to q=1 to avoid excessive aggregation of data points. 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: Force q≥1 to avoid data block overload, max(C,1) to prevent zero block errors.
[0027] In some embodiments, 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 end, calculate the salt spreading interval = 20 / Z; insert the remainder point, 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).
[0028] In this embodiment, the remainder points are evenly distributed in the time dimension (data stream) and the space dimension (display pixel) to eliminate phase offset. Push-side salting (timing dimension): Salting interval calculation: Salting interval = 20 / Z (Z is the remainder allocation number). Remainder point insertion rule: Traverse the remainder allocation number (i=1→Z): Insertion position = round(i × salting interval). Example: When Z=5, the insertion points are 4, 8, 12, 16, 20 (interval 4px), and the remainder points are dynamically inserted in Z blocks (index position is round(i* salting interval), i=1,2,...,Z), rounded up.
[0029] Salting on the rendering side (spatial dimension): Salting density calculation: Salting density = Px / mod (mod is the number of remainder points). Remainder point allocation rule: Traverse the number of remainder points (y=1→mod): Allocation position = round(y × salting density). Example: When mod=3 and Px=1200, the allocation 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) and rounded up.
[0030] Mathematical constraints: Use the round() function and integer operations to ensure that the remainder is allocated to integer pixels.
[0031] In some embodiments, the bipolar value extraction optimization stage further includes the following steps: Extract the basic extreme value, determine the block length, and then force the maximum value Max and minimum value Min of each block to be extracted; 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 secondary extreme value is appended and the append flag is recorded. If W of a preset number of consecutive blocks is greater than the weight threshold, β is reduced.
[0032] In this embodiment, while retaining the waveform envelope characteristics, the detail resolution of the signal mutation area is enhanced. Block length determination: If the current block contains a push-end salting point → data block length = q+1; otherwise → data block length = q. Extreme value sampling rule: Force the extraction of the maximum value (Max) and minimum value (Min) of each block. The secondary extreme value is the second largest value and the second smallest value, and the additional identification bit is recorded for subsequent data reconstruction. If W of a preset number of consecutive blocks is greater than the weight threshold, β is reduced to prevent overfitting.
[0033] In some embodiments, the reference unit is 20 pixels.
[0034] In some embodiments, the α=0.3, the β=0.7, the weight threshold=15, and the preset number=3.
[0035] In this embodiment, feature fidelity verification: fidelity index: feature retention rate = (number of key points captured / total number of theoretical key points) × 100%.
[0036] 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.
[0037] Salt distribution → extreme value extraction, the location of the salt point determines the block length (q or q+1); the block length directly affects the extreme value extraction range.
[0038] Extreme value optimization → block adjustment, the additional identification bit output by the dynamic weight model triggers the dynamic fine-tuning of the block length in reverse; after the secondary extreme value is added, the S_prev slope of the subsequent block is recalculated.
[0039] The second aspect of the present invention provides: a waveform data compression system based on dynamic block division and bi-extreme value optimization, which is used to implement any of the above-mentioned waveform data compression methods based on dynamic block division and bi-extreme value optimization, 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; A dynamic block processing module is used to calculate the reference block and the reference data block according to the input parameters; Dual-channel remainder salting module, 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 sequences, copies of original data, and extreme value lists.
[0040] 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.
[0041] 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.
[0042] The above is only 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 regarded as excluding other embodiments, but 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 the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. A waveform data compression method based on dynamic block division and dual extremum optimization, characterized in that: 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, execute the dynamic block processing stage; Dynamic block processing stage: calculate the benchmark block and benchmark data block according to the input parameters; Dual-channel remainder salting stage: salting on the push side and salting on the rendering side to distribute data points; Double extreme value extraction optimization stage: data is taken in blocks according to the salting mark, the maximum and minimum values are extracted, and 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.
2. The waveform data compression method based on dynamic block division and bipolar value optimization according to claim 1, characterized in that: The dynamic block processing stage also includes the following steps: Establish a dynamic mapping relationship between display pixels and data blocks; Define the reference unit, split the display pixel Px according to the reference unit, the block base C = max(⌊display pixel Px / reference unit⌋, 1), the remainder allocation number Z = display pixel Px % reference unit; Calculate the data block parameters, the basic data block length q = ⌊sampling rate Rate / display pixel Px⌋, the 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.
3. The waveform data compression method based on dynamic block division and bipolar value optimization according to claim 2, characterized in that: The dual-channel remainder salting stage also 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 end, calculate the salt spreading interval = 20 / Z; insert the remainder point, 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).
4. The waveform data compression method based on dynamic block division and bipolar value optimization according to claim 1, characterized in that: The bipolar value extraction optimization stage further comprises the following steps: Extract the basic extreme value, determine the block length, and then force the maximum value Max and minimum value Min of each block to be extracted; 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 secondary extreme value is appended and the append flag is recorded. If W of a preset number of consecutive blocks is greater than the weight threshold, β is reduced.
5. The waveform data compression method based on dynamic block division and dual extremum optimization according to claim 2, characterized in that: The reference unit is 20 pixels.
6. The waveform data compression method based on dynamic block division and dual extrema optimization according to claim 4, characterized in that: The α=0.3, the β=0.7, the weight threshold=15, and the preset number=3.
7. A waveform data compression system based on dynamic block division and dual extremum optimization, characterized in that: The method for compressing waveform data based on dynamic block division and bipolar value optimization according to any one of claims 1 to 6 comprises: 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; A dynamic block processing module is used to calculate the reference block and the reference data block according to the input parameters; Dual-channel remainder salting module, 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 sequences, copies of original data and extreme value lists.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and 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-6 is implemented.
9. A computer program product comprising instructions, characterized in that: When the computer program product is run on a terminal, the terminal executes the waveform data compression method based on dynamic blocking and bipolar value optimization as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Audio data processing method and device
CN110970048A
Image processing method, electronic equipment, storage medium and program product
CN118200748A
Danger alarm method, device and equipment based on radar induction and storage medium
CN119091433A
Intelligent analysis system based on instantaneous elastography technology
CN119523529A
Image processing device and image processing method of same
US20220005153A1