CN113872607B - 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
CN113872607B
CN113872607B CN202111150859.7A CN202111150859A CN113872607B CN 113872607 B CN113872607 B CN 113872607B CN 202111150859 A CN202111150859 A CN 202111150859A CN 113872607 B CN113872607 B CN 113872607B
Authority
CN
China
Prior art keywords
data
integer
searched
preset
sequence
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.)
Active
Application number
CN202111150859.7A
Other languages
Chinese (zh)
Other versions
CN113872607A (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, a device and terminal equipment for physiological monitoring data, 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 a value to the tag sequence 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 electroencephalographic data and electrocardiographic data, and is usually a sequence of data that arrives sequentially, massively, 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 based on wavelet decomposition algorithm and is realized based on a Shift transformation compression algorithm, such as F-Shift compression algorithm, 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 implemented, 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 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, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the method are implemented.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, implements 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 a value to the tag sequence 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 illustrate the technical means of the present invention, the following description is given by way of specific examples.
In the practical application of signals such as physiological monitoring data of electroencephalogram, electrocardio and the like and signals such as environmental monitoring data and the like, the signals acquired by the sensors are limited by the limitations of the devices and the influence of the environment, and errors generally exist. When such errors are controlled within a certain range, normal application of data is not affected.
Fig. 1 is a schematic flow chart illustrating an implementation of a quality-based 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 raw 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 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)。
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, 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 based on the flags and compression coefficients stored in the second and third sequences, the decompressed data being an approximation of the original data that meets the target detected data error requirement.
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 corresponding stored in the first sequence is the initial compressed data, 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 fractional part, and the compressed data is obtained in sequenceTaking x-bit binary number, converting the binary number into decimal number as initial decompression data. If the mark of the corresponding position of the third sequence is 0, the compressed data is indicated to have a decimal part, the binary number of x bits is obtained in sequence and is a, the binary number of y bits is obtained and is b, and the formula m is adoptedabThe initial decompressed data is calculated as a + b × I.
Quality assurance compression is a data compression method for ensuring that the error of each data point is within a given range, and the error between compressed data and an original data value is smaller than a given value in a given measurement space. The quality-guaranteeing compression method based on the processing of the streaming data can effectively improve the compression rate and ensure the precision of subsequent query. Quality-preserving compression includes mean error compression and maximum error compression, where the mean error compression is L2The measurement means that the integral average error (Euclidean distance) of the compressed data estimation value and the original data value is smaller than a preset critical value; maximum error compression, i.e. L Metric means that the error per data point is less than a given threshold value, thereby improving the compression quality. Since mean compression is measured by the overall characteristics of the compressed data, or based on a fixed window, this approach generally does not guarantee the quality of the analysis results based on the compression summary. 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 brain electrical 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 the range of-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
Integer of its upper bound
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 sequenceByStore 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 6, 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, it is sequentially verified from 6 to 8 whether a can satisfy the above conditions, and values corresponding to the values satisfying the above conditions are calculated
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 from a-10, when a isAt-10, b-0 is present 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 areaWorkshop
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
Belonging to a 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 B is storedyIs 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 into 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 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 ByThe data of the second storage position in the first compressed data is 0, the second compressed data occupies a storage space of 8 bits, wherein the first 5 bits are an integer part, and the last 3 bits are a 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 corresponding data to be searched is contained in an 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.
In some embodiments, the first sequence generation module 240 is further configured to:
and if the data to be searched which is contained in the error data interval does not exist in the data set to be searched, storing the initial compressed data into the first sequence.
In some embodiments, the quality-assured compression apparatus 20 for physiological monitoring data may further include a compression coefficient calculation module for obtaining a preset number of integer storage bits 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 shelf-life 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 each module/unit in each device embodiment described above, for example, 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, which 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 certain functions, which are used to describe the execution 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 computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. 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 the terminal device 30, and does not constitute a limitation of the terminal device 30, and may include more or fewer components than those shown, or some of the 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 should be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units and modules is only used for illustration, and in practical applications, the above function distribution may be performed by different functional units and modules as needed, that is, the internal structure of the apparatus may be divided into different functional units or modules to perform all or part of the above described 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 used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the present application. For the specific working processes of the units and modules in the system, reference may be made to the corresponding processes in the foregoing method embodiments, which are not described herein again.
In the above embodiments, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described or recited in any 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 technical solution. 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 suitable additions or subtractions depending on the requirements of legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer-readable media may not include electrical carrier signals or telecommunication signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; although the present invention has been described in detail with reference to the foregoing embodiments, it should 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 (8)

1. A method for quality-preserving 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 a 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;
Assigning a value to the tag sequence according to the compressed data according to a preset tag rule;
the coefficients include integer coefficients and fractional coefficients; the expression of the data to be searched comprises:
Figure 446392DEST_PATH_IMAGE001
wherein, the first and the second end of the pipe are connected with each other,
Figure 686881DEST_PATH_IMAGE002
the data to be searched represented by integer coefficients and decimal coefficients;
Figure 371940DEST_PATH_IMAGE003
is a coefficient of an integer number of,
Figure 988866DEST_PATH_IMAGE003
the value range of (1) is an integer which can be stored by a preset integer storage bit number;
Figure 59459DEST_PATH_IMAGE004
is a coefficient of the decimal number,
Figure 736428DEST_PATH_IMAGE004
the value range of (1) is a non-negative integer which can be stored by a preset decimal storage digit number;
Figure 908784DEST_PATH_IMAGE005
is a constant number of times, and is,
Figure 63822DEST_PATH_IMAGE006
Figure 5233DEST_PATH_IMAGE007
is composed of
Figure 853103DEST_PATH_IMAGE004
Maximum value of (a);
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, wherein the method comprises the following steps:
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.
2. A method of quality-assured compression of physiological monitoring data according to claim 1, 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.
3. A method of quality-assured compression of physiological monitoring data according to claim 2, 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.
4. A method for quality-assured compression of physiological monitor data according to any of claims 1-3, wherein before 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.
5. A method of quality-preserving compression of physiological monitor data according to any of claims 1 to 3 wherein, after assigning a value to the sequence of markers according to a predetermined marker rule, 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.
6. 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;
a tag sequence generation module, configured to assign a value to a tag sequence according to the compressed data according to a preset tag rule;
wherein the coefficients include integer coefficients and fractional coefficients; the expression of the data to be searched comprises:
Figure 496443DEST_PATH_IMAGE001
wherein, the first and the second end of the pipe are connected with each other,
Figure 455172DEST_PATH_IMAGE002
the data to be searched is represented by integer coefficients and decimal coefficients;
Figure 251089DEST_PATH_IMAGE003
is a coefficient of an integer number of,
Figure 4282DEST_PATH_IMAGE003
the value range of (1) is an integer which can be stored by a preset integer storage bit number;
Figure 151229DEST_PATH_IMAGE004
is a coefficient of the number of decimal places,
Figure 913649DEST_PATH_IMAGE004
the value range of (1) is a non-negative integer which can be stored by a preset decimal storage digit number;
Figure 810411DEST_PATH_IMAGE005
is a constant number of times, and is,
Figure 734505DEST_PATH_IMAGE006
Figure 368748DEST_PATH_IMAGE007
is composed of
Figure 403700DEST_PATH_IMAGE004
Maximum value of (a);
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, wherein the method comprises the following steps:
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.
7. 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 5 when executing the computer program.
8. 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 5.
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 CN113872607A (en) 2021-12-31
CN113872607B true 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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (5)

* 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
JP4107314B2 (en) * 2005-03-30 2008-06-25 日本電気株式会社 Image processing, compression, expansion, transmission, transmission, reception apparatus and method, program thereof, and display apparatus
CN102931999B (en) * 2012-10-16 2015-10-07 河海大学 Based on the spatio-temporal data lossy compression method of Fourier transform
CN110971239A (en) * 2019-12-17 2020-04-07 河北省科学院应用数学研究所 Mean value calculation method and device based on data compression and terminal equipment
CN113381767B (en) * 2021-06-25 2022-08-26 河北省科学院应用数学研究所 Method, terminal and storage medium for electrocardiogram data compression

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN113872607A (en) 2021-12-31

Similar Documents

Publication Publication Date Title
KR101703208B1 (en) Block floating point compression of signal data
CN111078755B (en) Time sequence data storage query method and device, server and storage medium
CN111008230B (en) Data storage method, device, computer equipment and storage medium
CN113644917B (en) Method, terminal and storage medium for electroencephalogram and electrocardio data compression
US9305369B2 (en) Method and system for data compression
CN110995273B (en) Data compression method, device, equipment and medium for power database
CN110139102B (en) Method, device, equipment and storage medium for predicting video coding complexity
CN112953550A (en) Data compression method, electronic device and storage medium
CN113381767B (en) Method, terminal and storage medium for electrocardiogram data compression
CN110704439B (en) Data storage method and device
CN113872607B (en) Quality-guaranteeing compression method and device for physiological monitoring data and terminal equipment
CN111626360A (en) Method, device, equipment and storage medium for detecting fault type of boiler
CN112822495A (en) Infrared image compression method and device, electronic equipment and storage medium
CN111162792A (en) Compression method and device for power load data
CN108763379B (en) Data compression method, data decompression method, device and electronic equipment
Silva et al. Compression of Different Time Series Representations in Asphyxia Detection
CN115097196A (en) Output voltage acquisition method and analog-to-digital conversion circuit of digital arc welding power supply
CN117155404B (en) Data processing method and device, electric energy meter and medium
Bertogna et al. An optimized ECG android system using data compression scheme for cloud storage
CN112447302B (en) Height growth speed evaluation method and terminal equipment
EP4280465A1 (en) Data recording apparatus, data recording method, and data recording program
CN115774714A (en) Data processing method, electronic equipment 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
CN111245683A (en) RSSI signal strength value calculation method and device

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