CN113872607A - Quality-guaranteeing compression method and device for physiological monitoring data and terminal equipment - Google Patents

Quality-guaranteeing compression method and device for physiological monitoring data and terminal equipment Download PDF

Info

Publication number
CN113872607A
CN113872607A CN202111150859.7A CN202111150859A CN113872607A CN 113872607 A CN113872607 A CN 113872607A CN 202111150859 A CN202111150859 A CN 202111150859A CN 113872607 A CN113872607 A CN 113872607A
Authority
CN
China
Prior art keywords
data
preset
integer
searched
compression
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111150859.7A
Other languages
Chinese (zh)
Other versions
CN113872607B (en
Inventor
黎彤亮
范瑞琴
李晓云
赵环宇
冯春雨
史玉盼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute Of Applied Mathematics Hebei Academy Of Sciences
Original Assignee
Institute Of Applied Mathematics Hebei Academy Of Sciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute Of Applied Mathematics Hebei Academy Of Sciences filed Critical Institute Of Applied Mathematics Hebei Academy Of Sciences
Priority to CN202111150859.7A priority Critical patent/CN113872607B/en
Publication of CN113872607A publication Critical patent/CN113872607A/en
Application granted granted Critical
Publication of CN113872607B publication Critical patent/CN113872607B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention is suitable for the technical field of data compression, and provides a quality-guaranteeing compression method and device for physiological monitoring data and terminal equipment, wherein the method comprises the following steps: acquiring an original data value of target monitoring data; calculating initial compressed data of the target monitoring data according to the original data value and the compression coefficient; calculating an error data interval corresponding to the initial compressed data according to the initial compressed data and a preset error limit value; determining data to be searched contained in an error data interval from preset data to be searched as compressed data according to a preset search rule, and storing coefficients of the data to be searched to a first sequence; and assigning values to the tag sequences according to the compressed data according to a preset tag rule. The quality-guaranteeing compression method for the physiological monitoring data can independently compress each target monitoring data, has good real-time performance and high compression efficiency, and effectively reduces the power consumption of data transmission in the physiological data monitoring process.

Description

Quality-guaranteeing compression method and device for physiological monitoring data and terminal equipment
Technical Field
The invention belongs to the technical field of data compression, and particularly relates to a quality-guaranteeing compression method and device for physiological monitoring data and terminal equipment.
Background
The physiological monitoring data includes flow data such as electroencephalogram data and electrocardiograph data, and is usually a data sequence which arrives sequentially, largely, rapidly and continuously. Such flow data can be viewed as a dynamic data set that grows over time, and is of great significance in the medical field. The dynamic electroencephalogram, electrocardio-signal and other physiological data graphs are the means for screening cardiovascular diseases and monitoring disease conditions which are commonly used in clinic, and continuous physiological data can be used as an important diagnosis and evaluation basis.
In the process of acquiring and analyzing physiological monitoring data, in order to prolong the endurance time of the monitoring system and realize long-time and stable monitoring, the power consumption of the monitoring system needs to be fully controlled. Because the data volume of the physiological monitoring data is huge, if the data cannot be effectively compressed, a large amount of energy is consumed in the data transmission process, the application of the monitoring system is limited, and the service life of the monitoring system is influenced. For example, in a conventional electroencephalogram data monitoring system, each sensor node continuously acquires surrounding data and forms sensor stream data, the energy carried by each sensor is very limited, and 80% of the energy is consumed in the data transmission process.
Conventionally, compression methods of stream data include a hierarchical compression method and a non-hierarchical compression method. The hierarchical compression method is mainly realized based on a wavelet decomposition algorithm and a Shift transformation-based compression algorithm, such as an F-Shift compression algorithm, an S + -Shift compression algorithm and the like. The non-hierarchical compression method is mainly based on a Piecewise Constant Approximation (PCA) algorithm, a Piecewise Linear Approximation (PLA) algorithm, a maximum error bounded PCA algorithm, a continuous Piecewise PLA algorithm and a discontinuous Piecewise PLA algorithm. Both algorithms need to receive subsequent data before compression is performed, and the real-time performance is poor.
Disclosure of Invention
In view of this, embodiments of the present invention provide a quality-guaranteeing compression method and apparatus for physiological monitoring data, and a terminal device, which can ensure real-time performance of compression of the physiological monitoring data.
The first aspect of the embodiments of the present invention provides a quality-guaranteeing compression method for physiological monitoring data, including:
acquiring an original data value of target monitoring data;
calculating initial compressed data of the target monitoring data according to the original data value and the compression coefficient;
calculating an error data interval corresponding to the initial compressed data according to the initial compressed data and a preset error limit value;
determining data to be searched contained in the error data interval from a preset data set to be searched as compressed data according to a preset search rule, and storing coefficients of the data to be searched to a first sequence;
and assigning a value to the tag sequence according to the compressed data according to a preset tag rule.
A second aspect of an embodiment of the present invention provides a quality-guaranteeing compression apparatus for physiological monitoring data, including:
the original data acquisition module is used for acquiring an original data value of the target monitoring data;
the initial compressed data calculation module is used for calculating initial compressed data of the target monitoring data according to the original data value and the compression coefficient;
the error data interval calculation module is used for calculating an error data interval corresponding to the initial compressed data according to the initial compressed data and a preset error limit value;
the first sequence generation module is used for determining data to be searched contained in the error data interval from a preset data set to be searched as compressed data according to a preset search rule, and storing coefficients of the data to be searched to a first sequence;
and the tag sequence generation module is used for assigning values to the tag sequences according to the compressed data according to a preset tag rule.
A third aspect of the embodiments of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method as described above.
A fifth aspect of embodiments of the present invention provides a computer program product, which, when run on a terminal device, causes the electronic device to perform the steps of the method according to any one of the first aspect.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: the quality-guaranteeing compression method of the physiological monitoring data comprises the steps of obtaining an original data value of target monitoring data; calculating initial compressed data of the target monitoring data according to the original data value and the compression coefficient; calculating an error data interval corresponding to the initial compressed data according to the initial compressed guard data and a preset error limit value; determining data to be searched contained in an error data interval from preset data to be searched as compressed data according to a preset search rule, and storing coefficients of the data to be searched to a first sequence; and assigning values to the tag sequences according to the compressed data according to a preset tag rule. The quality-guaranteeing compression method for the physiological monitoring data provided by the embodiment of the invention can independently compress each target monitoring data, has good real-time performance and high compression efficiency, and effectively reduces the power consumption of data transmission in the physiological data monitoring process.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic flow chart illustrating an implementation of a quality assurance compression method for physiological monitoring data according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a quality assurance compression apparatus for physiological monitoring data according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
In the practical application of physiological monitoring data such as electroencephalogram and electrocardio and signals such as environmental monitoring data, the signals acquired by the sensors are limited by the limitations of the equipment and the influence of the environment, and errors generally exist. When such errors are controlled within a certain range, the normal application of data is not affected.
Fig. 1 is a schematic flow chart illustrating an implementation of a quality assurance compression method for physiological monitoring data according to an embodiment of the present invention. Referring to fig. 1, in some embodiments, a quality assurance compression method for physiological monitoring data provided by the embodiments of the present invention may include steps S101 to S105.
S101: and acquiring the original data value of the target monitoring data.
In some embodiments, the target monitoring data includes, but is not limited to, physiological data such as electroencephalogram data, electrocardiograph data, etc., and may also include other flow data having a data structure similar to the physiological data.
Specifically, the quality-guaranteeing compression method for physiological monitoring data provided by this embodiment obtains raw data values of target monitoring data according to a time sequence, and compresses each raw data value one by one.
S102: and calculating initial compressed data of the target monitoring data according to the original data value and the compression coefficient.
In some embodiments, before S101, the method may further include:
and acquiring the compressed preset integer storage digit of the target monitoring data. And calculating a preset integer range of the compressed target monitoring data according to the preset integer storage digit. And acquiring a value range of the target monitoring data. And calculating a compression coefficient according to the value range and the preset integer range, wherein the compression coefficient is used for adjusting the value range to be within the preset integer range.
Specifically, the number of bits of the preset integer is recorded as xbit, x is an integer greater than zero, and is the number of bits required for storing the integer part of the compressed data as a binary number.
Specifically, the value range is a value range of the target detection data in a normal state, and for an abnormal value outside the normal value range, the abnormal value may not be within a preset integer range after being adjusted by a compression coefficient.
For example, the value interval of certain target detection data is a first interval [ -236, 10000], but normal data is concentrated between a second interval [ -236, 510], and then the compression coefficient can be determined according to the value of the second interval.
In one specific example, x is 8, and the data interval in which 8 bits can be stored is the third interval [ -128,127 ]. To adjust the value in the second interval to the third interval, the compression factor 510/127< Z is taken to be the smallest integer 5 that satisfies the above inequality.
Optionally, if the compression coefficient is a number greater than 1, adjusting the value range to the preset integer range according to the compression coefficient includes: each original data is divided by the compression factor.
Optionally, if the compression coefficient is a positive number smaller than 1, adjusting the value range to the preset integer range according to the compression coefficient includes: each raw data is multiplied by a compression coefficient.
S103: and calculating an error data interval corresponding to the initial compressed data according to the initial compressed data and a preset error limit value.
In some embodiments, S103 may include:
taking the difference between the initial compressed data and the first error limit value as the minimum value of an error data interval;
and taking the sum of the initial compressed data and the second error limit value as the maximum value of the error data interval.
Specifically, the expression of the error data interval includes:
Figure BDA0003287125720000051
wherein the content of the first and second substances,
Figure BDA0003287125720000052
for the interval of error data at time t,d tis the minimum value of the error data interval at time t,
Figure BDA0003287125720000053
is the maximum value of the error data interval at time t,
Figure BDA0003287125720000054
is the first error limit value and is,
Figure BDA0003287125720000055
is the second error limit.
S104: and according to a preset search rule, determining data to be searched contained in the error data interval from a preset data set to be searched as compressed data, and storing coefficients of the data to be searched to a first sequence.
In some embodiments, the coefficients include integer coefficients and fractional coefficients; the expression of the data to be searched comprises:
mab=a+b×I;
wherein m isabThe data to be searched represented by integer coefficients and decimal coefficients; a is an integer coefficient, and the value range of a is a preset integer storage digitAn integer that can be stored; b is a decimal coefficient, and the value range of b is a non-negative integer which can be stored by a preset decimal storage digit number; i is a constant, I is 1/(b)max+1)。
Specifically, a preset decimal storage digit is recorded as ybit, y is a non-negative integer, and is the digit required by storing the decimal coefficient of the compressed data into binary number.
In this embodiment, the sum of x and y is less than the number of bits required to store the binary number of the original data.
Specifically, the value range of b is [0, p-1 ]],0<p≤2y(ii) a And p is an integer;
Figure BDA0003287125720000061
in some embodiments, the preset search rule comprises an integer search rule; s104 may include:
searching integer coefficients satisfying an integer search rule; the integer search rule includes that when the fractional coefficient is zero, the integer coefficient exists so that the corresponding data to be searched is included in the error data interval.
And taking the data to be searched corresponding to the integer coefficient meeting the integer search rule as compressed data.
In some embodiments, the preset search rules include decimal search rules; s104 may include:
if the integer coefficient meeting the integer search rule does not exist, searching the integer coefficient and the decimal coefficient meeting the decimal search rule; the decimal search rule includes the existence of an integer coefficient and a decimal coefficient, so that the corresponding data to be searched is contained in the error data interval.
And taking the integer coefficient meeting the decimal searching rule and the data to be searched corresponding to the decimal coefficient as compressed data.
In this embodiment, if there is an integer that satisfies the preset search rule, the fractional part does not need to be stored, and the occupation of the storage space can be further reduced.
In some embodiments, S104 may include: and if the data to be searched contained in the error data interval does not exist in the data set to be searched, storing the initial compressed data to the first sequence.
Specifically, S104 may include: obtaining integer parts of upper and lower bounds of error data interval
Figure BDA0003287125720000062
And
Figure BDA0003287125720000063
if it is not
Figure BDA0003287125720000064
Then from
Figure BDA0003287125720000065
Starting a search, searching whether there is a suitable a so that b is 0,
Figure BDA0003287125720000066
is included in the data interval
Figure BDA0003287125720000067
If the value is present, the search is stopped, the value a at this time is taken as the compression result, and b does not need to be stored.
If it is not
Figure BDA0003287125720000068
Then order
Figure BDA0003287125720000069
Search for whether there is a suitable b such that
Figure BDA00032871257200000610
Is contained in
Figure BDA00032871257200000611
If the value is present, the search is stopped, and the value a, b at this time is taken as the compression result.
If not found to cause
Figure BDA00032871257200000612
Is contained in
Figure BDA00032871257200000613
A, b, then storing the initial compressed data.
When storing the first sequence, the binary numbers are stored sequentially in the natural order of the time sequence.
S105: and assigning values to the tag sequences according to the compressed data according to a preset tag rule.
In some embodiments, the marker sequence includes a second sequence and a third sequence, and the marker stored in the second sequence is used for indicating whether data to be searched meeting a preset search rule exists or not; the flag stored in the third sequence is used to indicate whether the data to be searched satisfying the preset search rule contains a fractional part.
Specifically, the second sequence and the third sequence are binary sequences, and each bit in the sequences corresponds to one original data.
Optionally, if there is data to be searched meeting a preset search rule, storing a 1 in a corresponding position of the second sequence; and if the data to be searched meeting the preset search rule does not exist, storing a 0 in the second preview.
Optionally, if the fractional value of the data to be searched meeting the preset search rule is zero, storing a 1 in the corresponding position of the third sequence; and if the decimal part of the data to be searched meeting the preset search rule is not zero, storing a 0 in the corresponding position of the third sequence.
The quality-guaranteeing compression method for the physiological monitoring data provided by the embodiment of the invention can independently compress each target monitoring data, has good real-time performance and high compression efficiency, and effectively reduces the power consumption of data transmission in the physiological data monitoring process.
In some embodiments, after S105, the method may further include S106 decompressing the first sequence.
S106: and calculating a decompression sequence of the target monitoring data according to the first sequence, the compression coefficient and the mark sequence.
In some embodiments, the compressed data in the first sequence is restored to decompressed data, which is an approximation of the original data that meets the target detected data error requirement, based on the flags and compression coefficients stored in the second and third sequences.
Specifically, the tag values of the corresponding positions in the second sequence and the third sequence are obtained, the numerical value of the corresponding digit in the first sequence is obtained according to the tag values, the initial decompressed data is calculated according to the obtained numerical value, and finally the decompressed data is obtained according to the initial decompressed data and the compression coefficient.
For example, the label of the corresponding position in the second sequence is 0, which indicates that the initial compressed data is correspondingly stored in the first sequence, and the binary numbers of the corresponding number of bits are sequentially obtained as the initial decompressed data.
For example, the label of the corresponding position in the second sequence is 1, which indicates that the coefficient of the data to be searched is correspondingly stored in the first sequence. If the mark of the corresponding position of the third sequence is 1, the compressed data has no decimal part, binary numbers of x bits are sequentially acquired, and the binary numbers are converted into decimal numbers to be used as initial decompressed data. If the mark of the corresponding position of the third sequence is 0, the compressed data has a decimal part, the binary number of x bits is obtained in sequence as a, the binary number of y bits is obtained as b, and the method is based on the formula mabThe initial decompressed data is calculated as a + b × I.
Quality-assured compression is a data compression method that ensures that the error of each data point is within a given range, and the error of the compressed data and the original data value is smaller than a given value in a given measurement space. The quality-guaranteeing compression method based on the flow data processing can effectively improve the compression rate and ensure the precision of subsequent query. Quality assurance compression includes mean error compression and maximum error compression, where mean error compression, i.e., L2The measurement means that the integral average error (Euclidean distance) between the compressed data estimation value and the original data value is smaller than a preset critical value; maximum error compression, i.e. LMetric means that the error per data point is less than a given threshold value, thereby improving the compression quality. Since the mean compression is based on the overall characteristics of the compressed dataVolume, or measured on a fixed window basis, this approach generally does not guarantee the quality of analysis results based on compressed summaries. The average error and bulk characteristics of the average error compression do not match the continuous, infinite characteristics of the stream data. And the maximum error compression can control the error of each data point and is more suitable for the calculation of the stream data.
In this embodiment, if the power consumption required for data compression of the electroencephalogram, electrocardiograph and other physiological monitoring data is much less than the communication power consumption required for quality-guaranteeing compression of the physiological monitoring data, the reduction multiple of the overall power consumption of the monitoring system is proportional to the compression ratio.
The method provided by the embodiment of the invention firstly judges whether the error interval of each data point can contain given fixed discrete data, if so, the given fixed discrete data is used for representing the error, the obtained data can be processed in time without waiting for the arrival of subsequent data, and the real-time performance is high; on the other hand, the compression method provided by the embodiment of the invention has high compression efficiency, and can effectively reduce the storage space, thereby reducing the communication bandwidth requirement and the communication power consumption.
In one specific example, the target physiological monitoring data is electroencephalographic data, wherein a segment thereof includes a raw data set D0=[1220.2,36.8,54.2,-67.3,80.2,-45.6,56.3,12.3]。
According to the nature of the electroencephalogram data, the values are mainly distributed in-100, 100.
In this example, the preset integer storage bit number is 5 bits, corresponding to a preset integer range of [ -16,15 ].
In order to compress the electroencephalogram data of [ -100, 100] into the preset integer range [ -16,15], the compression coefficient is calculated to be 7, i.e. each original electroencephalogram data is divided by 7.
The original data set D0Is divided by 7 to obtain an initial compressed data set D1=[d1,d2,d3,d4,d5,d6,d7,d8]=[174.314,5.257,7.743,-9.614,11.457,-6.514,8.043,1.538]。
Construction of a set of error data intervals D from an initial compressed data setE={[173.456,174.590],[5.101,5.678],[6.553,8.017],[-10.12,-9.345],[10.980,12.021],[-6.958,-5.321],[7.345,8.347],[1.309,2.567]}。
In this example, the predetermined fractional storage bit number is 3 bits since 23Thus, p has a value in the range of (0, 8)]And correspondingly, I is 1/p is 0.125. Then
Figure BDA0003287125720000091
a∈[-16,15],b∈[0,7]。
And judging the error data intervals in the error data interval set one by one.
For example, for the first error data interval
Figure BDA0003287125720000092
Lower bound integer thereof
Figure BDA0003287125720000093
173, an upper integer
Figure BDA0003287125720000094
Are 174, are all out of the range of preset integers [ -16,15 [)]There is no interval in which the error data can be in the first error data interval
Figure BDA0003287125720000095
Is/are as follows
Figure BDA0003287125720000096
Thus, the first initial compressed data 174.314 is stored directly as the first compressed data into the first sequence, where the first initial compressed data is stored as a 32-bit floating point number, occupying 32 bits. Meanwhile, 0 is stored at the corresponding position of the second sequence B, and 0 is stored at the corresponding position of the third sequence.
For the second error data interval
Figure BDA0003287125720000097
Thereon is provided withBoundary integer
Figure BDA0003287125720000098
And lower bound integer
Figure BDA0003287125720000099
All are 5, then order
Figure BDA00032871257200000910
Search for b ∈ [0, 7]]In such a way that
Figure BDA00032871257200000911
Belonging to a second error data interval
Figure BDA00032871257200000912
B of (1). When b is 1, 2, 3, 4, and 5, the above condition can be satisfied, and at this time, the integer part of the second initial compressed data occupies 5 bits, and the fractional part occupies 3 bits. At the same time, the corresponding position of the second sequence B is stored as 1, in the third sequence ByStore 0 in the corresponding location of
Optionally, it is sequentially verified from 1 to 7 whether b can satisfy the above condition, and when b is found to satisfy the above condition 1, the search is stopped, and b is assigned to 1. At this time
Figure BDA0003287125720000101
And storing a-5 and b-1 as second compressed data to the first sequence.
Optionally, it is sequentially verified from 1 to 7 whether b can satisfy the above conditions, and when b is verified to be 1, 2, 3, 4, and 5, preset conditions can be satisfied, and when b is verified to be 6, the search is stopped. And taking the median of the possible values of b as the value of b, and assigning b to be 3. At this time, the process of the present invention,
Figure BDA0003287125720000102
and storing a-5 and b-3 as second compressed data to the first sequence.
Optionally, it is sequentially verified from 1 to 7 whether b can satisfy the above conditions, and when b is verified to be 1, 2, 3, 4, and 5, preset conditions can be satisfied, and when b is verified to be 1, 4, and 5, preset conditions can be satisfiedWhen 6, it cannot be satisfied, i.e. the search is stopped. For each possible value of b
Figure BDA0003287125720000103
The difference from the second original compressed data, b is assigned to 2 based on the smallest difference. At this time, the process of the present invention,
Figure BDA0003287125720000104
and storing a-5 and b-2 as second compressed data to the first sequence.
For the third error data interval
Figure BDA00032871257200001015
Lower bound integer thereof
Figure BDA0003287125720000105
Integer of upper bound
Figure BDA0003287125720000106
Starting the search with a-6, when a-7 or 8, there is b-0 such that
Figure BDA0003287125720000107
Belonging to a third error data interval
Figure BDA0003287125720000108
At the moment, the third compressed data does not need to store a decimal part, and only an integer part needs to occupy 5 bits. At the same time, the corresponding position of the second sequence B is stored as 1, and the third sequence ByIs stored as 1.
Optionally, whether a can satisfy the above conditions is sequentially verified from 6 to 8, and when a is found to satisfy 7, the search is stopped, and a is assigned to 7. At this time
Figure BDA0003287125720000109
Store a 7 as the third compressed data to the first sequence.
Optionally, verifying whether a can satisfy the above conditions from 6 to 8 in sequence, and calculating each satisfactionThe value of the upper condition corresponds to
Figure BDA00032871257200001010
The difference from the third original compressed data, a is assigned to 8 according to the smallest difference, at which time
Figure BDA00032871257200001011
Store a 8 as the third compressed data to the first sequence.
Similarly, for the fourth error data interval
Figure BDA00032871257200001016
Lower bound integer thereof
Figure BDA00032871257200001012
Integer of upper bound
Figure BDA00032871257200001013
Starting the search from a-10, when a-10, there is b-0 such that
Figure BDA00032871257200001014
Belonging to a third error data interval
Figure BDA0003287125720000111
And storing a to-10 as fourth compressed data to the first sequence, wherein the fourth compressed data occupies 5 bits. At the same time, the corresponding position of the second sequence B is stored as 1, and the third sequence ByIs stored as 1.
Similarly, for the fifth error data interval
Figure BDA0003287125720000112
Lower bound integer thereof
Figure BDA0003287125720000113
Integer of upper bound
Figure BDA0003287125720000114
Starting the search with a-10, when a-11 or 12, there is b-0 such that
Figure BDA0003287125720000115
Belonging to the fifth error data interval
Figure BDA0003287125720000116
And storing a to 11 as fifth compressed data to the first sequence according to a preset rule (or storing a to 12 as fifth compressed data to the first sequence according to another preset rule), and occupying 5 bits. At the same time, the corresponding position of the second sequence B is stored as 1, and the third sequence ByIs stored as 1.
Similarly, for the sixth error data interval
Figure BDA0003287125720000117
When a is-6, b is 0 so that
Figure BDA0003287125720000118
Belonging to the sixth error data interval
Figure BDA0003287125720000119
And storing a to-6 as the sixth compressed data into the first sequence, wherein the compressed data occupies 5 bits. At the same time, the corresponding position of the second sequence B is stored as 1, and the third sequence ByIs stored as 1.
Similarly, for the seventh error data interval
Figure BDA00032871257200001110
When a is 8, b is 0 so that
Figure BDA00032871257200001111
Belongs to the seventh error data interval
Figure BDA00032871257200001112
And storing a to 8 as seventh compressed data into the first sequence, wherein the seventh compressed data occupies 5 bits. At the same time, the corresponding position of the second sequence B is stored as 1, and the third sequence ByIs stored as 1.
Similarly, for the eighth error data interval
Figure BDA00032871257200001113
When a is 2, b is 0 so that
Figure BDA00032871257200001114
Belongs to the eighth error data interval
Figure BDA00032871257200001115
And storing a to 2 as eighth compressed data to the first sequence, wherein the first sequence occupies 5 bits. At the same time, the corresponding position of the second sequence B is stored as 1, and the third sequence ByIs stored as 1.
In this example, the original data in the original data set is stored in the form of 32-bit floating point numbers, and the above-mentioned segment contains 8 original data, and needs to occupy 8 × 32 bits — 256 bits. After the compression method provided by the embodiment of the invention, the storage space occupied by the first secondary system sequence is 32bit + (8bit +5bit) +6 × 5bit ═ 70 bit. The second sequence B occupies 8 bits, and the third sequence ByThe occupied storage space is 86 bits in total, and the compression method provided by the embodiment of the invention can obviously reduce the occupied storage space, thereby reducing the power consumption in the data transmission process and improving the service life and the reliability of the monitoring system.
Further, the method provided by the embodiment of the invention decompresses the compressed data.
In particular, according to the second sequence B and the third sequence ByThe compressed data stored in the first sequence is decompressed.
For example, the first position in the second sequence B stores a value of 0, which indicates that the first compressed data in the first sequence is the original compressed data directly stored, the first 32 bits in the first binary sequence are read as the first compressed data, and the first compressed data is multiplied by the compression coefficient of 7, so as to obtain the first decompressed data 1220.20.
The second position in the second sequence B stores data 1, and the third sequence ByHas data of 0 in the second storage position, the secondThe two compressed data occupy 8-bit storage space, wherein the first 5 bits are integer part, and the last 3 bits are decimal part. The 8-bit data is read and restored to obtain a-5 and b-1, i.e. the second compressed data is 5.125. And multiplied by a compression factor of 7 to obtain a second decompressed data of 35.88. (or according to a further predetermined rule, b is 3 and the second decompressed data is 37.63; or according to a further predetermined rule, b is 2 and the second decompressed data is 36.75).
The third position in the second sequence B stores data 1, and the third sequence ByThe data in the third storage position in (1) indicates that only the integer part of the third compressed data occupies 5 bits and the fractional part is not stored. The above 5-bit data is read and restored to obtain a ═ 7, that is, the third compressed data is 7. And multiplied by a compression factor of 7 to obtain a third decompressed data of 49. (or according to another preset rule, get a-8 and the third decompressed data is 56).
Similarly, the fourth to eight decompressed data are-70, 77(84), -42, 56, 14, respectively.
According to the data compressed by the method provided by the embodiment of the invention, the decompressed data corresponding to each original data can be obtained after decompression calculation, and each decompressed data is within the set error range of the corresponding original data.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 2 is a schematic structural diagram of a quality assurance compression device for physiological monitoring data according to an embodiment of the present invention. Referring to fig. 2, the quality-guaranteeing compression apparatus 20 for physiological monitoring data according to an embodiment of the present invention may include an original data acquiring module 210, an initial compressed data calculating module 220, an error data interval calculating module 230, a first sequence generating module 240, and a marker sequence generating module 250.
The raw data obtaining module 210 is configured to obtain a raw data value of the target monitoring data.
And an initial compressed data calculating module 220, configured to calculate initial compressed data of the target monitoring data according to the original data value and the compression coefficient.
And an error data interval calculating module 230, configured to calculate an error data interval corresponding to the initial compressed data according to the initial compressed data and a preset error limit.
The first sequence generating module 240 is configured to determine, according to a preset search rule, data to be searched included in the error data interval from a preset data set to be searched as compressed data, and store coefficients of the data to be searched to the first sequence.
And a tag sequence generating module 250, configured to assign a value to the tag sequence according to a preset tag rule and compression.
The quality-guaranteeing compression device for the physiological monitoring data provided by the embodiment of the invention can independently compress each target monitoring data, has good real-time performance and high compression efficiency, and effectively reduces the power consumption of data transmission in the physiological data monitoring process.
In some embodiments, the coefficients include integer coefficients and fractional coefficients; the expression of the data to be searched comprises:
mab=a+b×I;
wherein m isabThe data to be searched represented by integer coefficients and decimal coefficients; a is an integer coefficient, and the value range of a is an integer which can be stored by a preset integer storage bit number; b is a decimal coefficient, and the value range of b is a non-negative integer which can be stored by a preset decimal storage digit number; i is a constant, I is 1/(b)max+1)。
In some embodiments, the preset search rule includes an integer search rule, and the first sequence generating module 240 is specifically configured to:
searching integer coefficients satisfying an integer search rule; the integer search rule comprises that when the decimal coefficient is zero, the integer coefficient exists so that the corresponding data to be searched is contained in an error data interval;
and taking the data to be searched corresponding to the integer coefficient meeting the integer search rule as compressed data.
In some embodiments, the preset search rule includes a decimal search rule, and the first sequence generating module 240 is specifically configured to:
if the integer coefficient meeting the integer search rule does not exist, searching the integer coefficient and the decimal coefficient meeting the decimal search rule; the decimal search rule comprises an integer coefficient and a decimal coefficient, so that the corresponding data to be searched is contained in an error data interval;
and taking the integer coefficient meeting the decimal searching rule and the data to be searched corresponding to the decimal coefficient as compressed data.
In some embodiments, the first sequence generation module 240 is further configured to:
and if the data to be searched contained in the error data interval does not exist in the data set to be searched, storing the initial compressed data to the first sequence.
In some embodiments, the quality assurance compression apparatus 20 for physiological monitoring data may further include a compression coefficient calculation module for obtaining a preset integer storage bit number after compressing the target monitoring data. And calculating a preset integer range of the compressed target monitoring data according to the preset integer storage digit. And acquiring a value range of the target monitoring data. And calculating a compression coefficient according to the value range and the preset integer range, wherein the compression coefficient is used for adjusting the value range to be within the preset integer range.
In some embodiments, the quality-assured compression apparatus 20 of physiological monitoring data may further include a decompression sequence generation module for calculating a decompression sequence of the target monitoring data according to the first sequence, the compression coefficient, and the tag sequence.
Fig. 3 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 3, the terminal device 30 of this embodiment includes: a processor 300, a memory 310, and a computer program 320, such as a quality assurance compression program of physiological monitoring data, stored in the memory 310 and executable on the processor 300. The processor 30, when executing the computer program 320, implements the steps of the quality-assured compression method embodiments of physiological monitoring data, such as the steps S101 to S105 shown in fig. 1. Alternatively, the processor 300, when executing the computer program 320, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 210 to 250 shown in fig. 2.
Illustratively, the computer program 320 may be partitioned into one or more modules/units that are stored in the memory 310 and executed by the processor 300 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 320 in the terminal device 30. For example, the computer program 320 may be divided into an original data acquisition module, an initial compressed data calculation module, an error data interval calculation module, a first sequence generation module, a marker sequence generation module.
The terminal device 30 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 300, a memory 310. Those skilled in the art will appreciate that fig. 3 is merely an example of a terminal device 30 and does not constitute a limitation of terminal device 30 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 300 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 310 may be an internal storage unit of the terminal device 30, such as a hard disk or a memory of the terminal device 30. The memory 310 may also be an external storage device of the terminal device 30, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 30. Further, the memory 310 may also include both an internal storage unit and an external storage device of the terminal device 30. The memory 310 is used for storing the computer programs and other programs and data required by the terminal device. The memory 310 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A method for quality assurance compression of physiological monitoring data, comprising:
acquiring an original data value of target monitoring data;
calculating initial compressed data of the target monitoring data according to the original data value and the compression coefficient;
calculating an error data interval corresponding to the initial compressed data according to the initial compressed data and a preset error limit value;
determining data to be searched contained in the error data interval from a preset data set to be searched as compressed data according to a preset search rule, and storing coefficients of the data to be searched to a first sequence;
and assigning a value to the tag sequence according to the compressed data according to a preset tag rule.
2. A method of quality-assured compression of physiological monitoring data according to claim 1, wherein the coefficients comprise integer coefficients and fractional coefficients; the expression of the data to be searched comprises:
mab=a+b×I;
wherein m isabThe data to be searched represented by integer coefficients and decimal coefficients; a is an integer coefficient, and the value range of a is an integer which can be stored by a preset integer storage bit number; b is a decimal coefficient, and the value range of b is a non-negative integer which can be stored by a preset decimal storage digit number; i is a constant, I is 1/(b)max+1),bmaxThe maximum value of b.
3. A method of quality-assured compression of physiological monitoring data according to claim 2, wherein the predetermined search rules comprise integer search rules; the determining, according to a preset search rule, data to be searched included in the error data interval from a preset data set to be searched as compressed data includes:
searching for integer coefficients that satisfy the integer search rule; the integer search rule comprises that when the decimal coefficient is zero, the integer coefficient exists so that the corresponding data to be searched is contained in the error data interval;
and taking the data to be searched corresponding to the integer coefficient meeting the integer search rule as compressed data.
4. A method of quality-assured compression of physiological monitoring data according to claim 3, wherein the predetermined search rules comprise fractional search rules; the determining, according to a preset search rule, data to be searched included in the error data interval from a preset data set to be searched as compressed data includes:
if the integer coefficient meeting the integer search rule does not exist, searching the integer coefficient and the decimal coefficient meeting the decimal search rule; the decimal search rule comprises an integer coefficient and a decimal coefficient, so that corresponding data to be searched is contained in the error data interval;
and taking the integer coefficient meeting the decimal search rule and the data to be searched corresponding to the decimal coefficient as compressed data.
5. The method for quality-assured compression of physiological monitoring data according to claim 1, wherein the determining the data to be searched included in the error data interval from the preset data set to be searched as compressed data according to the preset search rule, and storing the coefficients of the data to be searched to the first sequence comprises:
and if the data to be searched contained in the error data interval does not exist in the data set to be searched, storing the initial compressed data to a first sequence.
6. A method of quality-assured compression of physiological monitor data according to any of claims 1-5, wherein prior to obtaining the raw data values of the target monitor data, the method further comprises:
acquiring a preset integer storage digit after the target monitoring data is compressed;
calculating a preset integer range of the compressed target monitoring data according to the preset integer storage digit;
acquiring a value range of the target monitoring data;
and calculating a compression coefficient according to the value range and the preset integer range, wherein the compression coefficient is used for adjusting the value range to be within the preset integer range.
7. A method for quality-assured compression of physiological monitor data according to any one of claims 1 to 5, wherein after assigning values to the tag sequences according to the preset tag rules, the method comprises:
and calculating a decompression sequence of the target monitoring data according to the first sequence, the compression coefficient and the mark sequence.
8. An apparatus for quality assurance compression of physiological monitoring data, comprising:
the original data acquisition module is used for acquiring an original data value of the target monitoring data;
the initial compressed data calculation module is used for calculating initial compressed data of the target monitoring data according to the original data value and the compression coefficient;
the error data interval calculation module is used for calculating an error data interval corresponding to the initial compressed data according to the initial compressed data and a preset error limit value;
the first sequence generation module is used for determining data to be searched contained in the error data interval from a preset data set to be searched as compressed data according to a preset search rule, and storing coefficients of the data to be searched to a first sequence;
and the tag sequence generation module is used for assigning values to the tag sequences according to the compressed data according to a preset tag rule.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202111150859.7A 2021-09-29 2021-09-29 Quality-guaranteeing compression method and device for physiological monitoring data and terminal equipment Active CN113872607B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111150859.7A CN113872607B (en) 2021-09-29 2021-09-29 Quality-guaranteeing compression method and device for physiological monitoring data and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111150859.7A CN113872607B (en) 2021-09-29 2021-09-29 Quality-guaranteeing compression method and device for physiological monitoring data and terminal equipment

Publications (2)

Publication Number Publication Date
CN113872607A true CN113872607A (en) 2021-12-31
CN113872607B CN113872607B (en) 2022-06-28

Family

ID=78992711

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111150859.7A Active CN113872607B (en) 2021-09-29 2021-09-29 Quality-guaranteeing compression method and device for physiological monitoring data and terminal equipment

Country Status (1)

Country Link
CN (1) CN113872607B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6654713B1 (en) * 1999-11-22 2003-11-25 Hewlett-Packard Development Company, L.P. Method to compress a piecewise linear waveform so compression error occurs on only one side of the waveform
US20060220984A1 (en) * 2005-03-30 2006-10-05 Nec Corporation Image processing, compressing, decompressing, transmitting, sending and receiving devices and methods, programs thereof and displaying device
CN102931999A (en) * 2012-10-16 2013-02-13 河海大学 Spatio-temporal data lossy compression method based on Fourier transformation
CN110971239A (en) * 2019-12-17 2020-04-07 河北省科学院应用数学研究所 Mean value calculation method and device based on data compression and terminal equipment
CN112487880A (en) * 2020-11-13 2021-03-12 河北省科学院应用数学研究所 Median filter, device and system based on maximum error criterion
CN113381766A (en) * 2021-06-25 2021-09-10 河北省科学院应用数学研究所 Method, terminal and storage medium for electrocardiogram data compression
CN113381767A (en) * 2021-06-25 2021-09-10 河北省科学院应用数学研究所 Method, terminal and storage medium for electrocardiogram data compression

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6654713B1 (en) * 1999-11-22 2003-11-25 Hewlett-Packard Development Company, L.P. Method to compress a piecewise linear waveform so compression error occurs on only one side of the waveform
US20060220984A1 (en) * 2005-03-30 2006-10-05 Nec Corporation Image processing, compressing, decompressing, transmitting, sending and receiving devices and methods, programs thereof and displaying device
CN102931999A (en) * 2012-10-16 2013-02-13 河海大学 Spatio-temporal data lossy compression method based on Fourier transformation
CN110971239A (en) * 2019-12-17 2020-04-07 河北省科学院应用数学研究所 Mean value calculation method and device based on data compression and terminal equipment
CN112487880A (en) * 2020-11-13 2021-03-12 河北省科学院应用数学研究所 Median filter, device and system based on maximum error criterion
CN113381766A (en) * 2021-06-25 2021-09-10 河北省科学院应用数学研究所 Method, terminal and storage medium for electrocardiogram data compression
CN113381767A (en) * 2021-06-25 2021-09-10 河北省科学院应用数学研究所 Method, terminal and storage medium for electrocardiogram data compression

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李晓云 等: "L∞准则的最大误差图像压缩算法", 《中国图像图形学报》 *

Also Published As

Publication number Publication date
CN113872607B (en) 2022-06-28

Similar Documents

Publication Publication Date Title
CN111078755B (en) Time sequence data storage query method and device, server and storage medium
CN102597948B (en) The method and apparatus of the block floating point compression of signal data
CN111008230B (en) Data storage method, device, computer equipment and storage medium
CN112953550B (en) Data compression method, electronic device and storage medium
CN113644917B (en) Method, terminal and storage medium for electroencephalogram and electrocardio data compression
CN110995273B (en) Data compression method, device, equipment and medium for power database
JP2012506665A (en) Method and apparatus for compressing and decompressing data records
CN110704439B (en) Data storage method and device
CN116915259A (en) Bin allocation data optimized storage method and system based on internet of things
CN113381767B (en) Method, terminal and storage medium for electrocardiogram data compression
CN113872607B (en) Quality-guaranteeing compression method and device for physiological monitoring data and terminal equipment
US10819368B2 (en) Method for compressing and restoring time series data
CN111162792A (en) Compression method and device for power load data
Silva et al. Compression of Different Time Series Representations in Asphyxia Detection
US20230132037A1 (en) Storage system and data processing method in storage system
CN112054805B (en) Model data compression method, system and related equipment
CN109656500B (en) Data display method and device, terminal equipment and computer readable storage medium
CN111597096A (en) Benchmark test method, system and terminal equipment
CN117155404B (en) Data processing method and device, electric energy meter and medium
CN111384974A (en) Confidence quantization method and device of multi-system LDPC code and decoder
CN112447302B (en) Height growth speed evaluation method and terminal equipment
CN115774714A (en) Data processing method, electronic equipment and computer readable storage medium
CN113626461A (en) Information searching method, terminal device and computer readable storage medium
CN116795274A (en) Storage method, device and equipment for information acquisition data and storage medium
CN117880359A (en) Data transmission method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant