An electrocardiogram data compression method and device
Through high-primary conversion and data segmentation, the high-byte and low-byte data sets are formed, which solves the problem of low data transmission efficiency of multi-lead ECG equipment and realizes more efficient data compression and real-time transmission.
Patent Information
- Application Number
- CN202510459805.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-04-14
AI Technical Summary
The existing ECG data compression methods cannot effectively process a large amount of data from multi-lead wearable ECG devices, resulting in low data transmission efficiency and poor real-time performance.
High-primary conversion is used to divide the ECG data into high-byte values and low-byte values, and store it in sequence to form a high-byte data set and low-byte data set, reducing the amount of encoded value data through encoding processing.
It improves the compression rate of ECG data, reduces the number of batches of data transmission, and improves data transmission efficiency and real-time performance.
Smart Images

Figure CN119995612B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of electrocardiogram (ECG) data compression, and more particularly, to a method and apparatus for compressing ECG data. Background Art
[0002] In order to improve data transmission efficiency and ensure data transmission security, the prior art usually compresses ECG data before transmission. However, with the remarkable development of wearable ECG devices, wearable ECG devices have gradually evolved from the initial single-lead ECG monitoring to multi-lead. Multi-lead wearable ECG devices can provide more comprehensive cardiac electrical signals, and thus more detailed and accurate cardiac health conditions can be obtained, which helps to detect potential cardiac problems. However, the amount of ECG data collected by multi-lead wearable ECG devices has also increased significantly. Without increasing the transmission cost, the existing ECG data compression methods can no longer effectively ensure the efficient transmission of ECG data. Summary of the Invention
[0003] In a first aspect of an embodiment of the present disclosure, a method for compressing ECG data is provided. The method includes performing a high-radix conversion on first digital value data to obtain second digital value data, where the second digital value data includes one or more second digital values; splitting each second digital value in the second digital value data to obtain a high-byte value and a low-byte value of the second digital value; and obtaining the high-byte values of each second digital value in the second digital value data and storing them in sequence to obtain a high-byte data set, and obtaining the low-byte values of each second digital value in the second digital value data and storing them in sequence to obtain a low-byte data set.
[0004] In a second aspect of an embodiment of the present disclosure, an apparatus for compressing ECG data is provided. The apparatus includes a second digital value data acquisition module configured to perform a high-radix conversion on first digital value data to obtain second digital value data, where the second digital value data includes one or more second digital values; a high-low byte value determination module configured to split each second digital value in the second digital value data to obtain a high-byte value and a low-byte value of the second digital value; and a high-low byte data set formation module configured to obtain the high-byte values of each second digital value in the second digital value data and store them in sequence to obtain a high-byte data set, and obtain the low-byte values of each second digital value in the second digital value data and store them in sequence to obtain a low-byte data set.
[0005] In a third aspect of an embodiment of the disclosure, a computer program product is provided, including a computer program which, when executed by a processor, implements the method provided in the first aspect.
[0006] In a fourth aspect of the embodiments of the present disclosure, an electronic device is provided, including one or more processors and a memory associated with the one or more processors. The memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, the method provided according to the first aspect is executed.
[0007] It should be understood that the content described in the summary of the invention section is not intended to limit the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understandable through the following description. Brief Description of the Drawings
[0008] In combination with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent. In the drawings, the same or similar reference numerals denote the same or similar elements, where:
[0009] Figure 1 A flowchart showing a method for compressing electrocardiogram data according to some embodiments of the present disclosure is shown;
[0010] Figure 2 A block diagram showing an electrocardiogram data compression device according to some embodiments of the present disclosure is shown;
[0011] Figure 3 A block diagram showing an electronic device according to some embodiments of the present disclosure is shown. Detailed Description of the Embodiments
[0012] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0013] In the description of the embodiments of the present disclosure, the term "including" and its like shall be understood as an open inclusion, that is, "including but not limited to". The term "based on" shall be understood as "at least partially based on". The term "one embodiment" or "the embodiment" shall be understood as "at least one embodiment". Terms such as "first", "second", etc. may refer to different or the same objects. There may also be other explicit and implicit definitions hereinafter.
[0014] As mentioned above, with the continuous progress of medical technology and the increasing demand for health monitoring, wearable electrocardiogram (ECG) devices have gradually become an important tool for monitoring heart health. The development from single-lead to multi-lead has enabled wearable ECG devices to collect more abundant and detailed ECG data, providing strong support for clinical diagnosis and treatment. However, this progress has also brought new problems: the amount of collected ECG data has increased significantly, resulting in the inability to send Bluetooth data packets in one go, and the data can only be sent in batches multiple times. When the total amount of data to be transmitted remains unchanged, if a better data compression method (i.e., a higher data compression ratio) is adopted, then the number of batches required for data transmission is less; if a common data compression method (i.e., a lower data compression ratio) is adopted, then the number of batches required for data transmission is more. If the number of data batches is more, then the data transmission efficiency is poorer, and thus the real-time nature of data transmission cannot be guaranteed.
[0015] The ECG data compression methods in the prior art are usually as follows: the wearable ECG device automatically obtains first digital value data (the first digital value data is obtained by the wearable ECG device automatically collecting an ECG signal and automatically converting the ECG signal through an analog-to-digital converter), then the wearable ECG device directly encodes the first digital value data to obtain encoded data and a corresponding encoding mapping table, then the wearable ECG device sends the encoded data and the corresponding encoding mapping table to a display device, then the display device decodes the encoded data according to the encoding mapping table to obtain the first digital value data, and finally the display device converts the first digital value data into an ECG signal through a digital-to-analog converter for display.
[0016] The applicant has found that, on the premise of the same encoding method, when the repetition amount of the first digital value in the first digital value data is more, the amount of the encoded value data obtained by encoding is less, and thus the compression effect is better. For example, when the first digital value data is 2048, 2048, 2048, the obtained encoded value data is 1 / 1 / 1, and the amount of the encoded value data is 3; when the first digital value data is 2048, 2049, 2050, the obtained encoded value data is 1 / 01 / 00, and the amount of the encoded value data is 5. And the first digital value obtained by converting the ECG signal is within a certain range, for example, within the range of 0 - 4095. If the repetition amount of the first digital value in the first digital value data can be increased, then the data compression effect can be improved.
[0017] To this end, embodiments of the present disclosure propose an electrocardiogram (ECG) data compression method. In the embodiments of the present disclosure, high-radix conversion is performed on the first digital value data to obtain second digital value data, and the second digital value data includes one or more second digital values; each second digital value in the second digital value data is segmented to obtain the high-byte value and the low-byte value of the second digital value; the high-byte values of each second digital value in the second digital value data are obtained and stored in sequence to obtain a high-byte data set, and the low-byte values of each second digital value in the second digital value data are obtained and stored in sequence to obtain a low-byte data set.
[0018] The present disclosure first performs high-radix conversion on the first digital value to obtain the second digital value, then segments the second digital value to obtain the high-byte value and the low-byte value, and finally forms a high-byte data set and a low-byte data set through the high-byte value and the low-byte value. Taking the first half of the first digital value as an example, if the first digital value in the first digital value data is not subjected to high-radix conversion, then the value of the first half can be any one of 00, 01, 02... 09, 10, 11, 12... 37, 38, 39, 40, with 41 possibilities. If the first digital value in the first digital value data is subjected to high-radix (e.g., hexadecimal) conversion, then the value of the first half can be any one of 00, 01, 02... 09, 0A, 0B... 0F, with only 16 possibilities. Obviously, when the total number of data is the same, high-radix conversion can greatly increase the repetition amount of the first half of the first digital value. The same is true for the second half of the first digital value. Although the present disclosure obtains two data sets of high and low bytes, and subsequent encoding needs to be performed on the data in the two data sets, due to the large number of repetitions of the digital values in each data set, compared with the prior art of directly performing data encoding processing on the first digital value data, it can still effectively reduce the amount of encoded value data, thereby improving the data compression rate of the ECG data compression method. When the data compression rate is increased, the number of batches of ECG data transmission can be reduced, thereby making the data transmission more efficient and the real-time performance of data transmission better.
[0019] Figure 1 shows a flowchart of an electrocardiogram (ECG) data compression method 100 according to some embodiments of the present disclosure. As Figure 1 shown, at block 102, the method 100 may include performing high-radix conversion on the first digital value data to obtain second digital value data, and the second digital value data includes one or more second digital values.
[0020] The wearable electrocardiogram device can collect the electrocardiogram signals of patients (i.e., the personnel whose electrocardiograms are collected). Since the electrocardiogram signals are analog signals, the wearable electrocardiogram device will first automatically convert the electrocardiogram signals into digital signals (i.e., the first digital value data) through an analog-to-digital converter. Then, the wearable electrocardiogram device will encode the digital signals and send them to the display device. After receiving the encoded data, the display device will perform reverse decoding on it to obtain the digital signals (i.e., the first digital value data). The display device will also automatically convert the digital signals into electrocardiogram signals through a digital-to-analog converter for display. In this way, the staff (i.e., the electrocardiogram collection personnel) can see the electrocardiogram signals of the patients. That is to say, the wearable electrocardiogram device itself directly has the first digital value data. In order to improve the data compression effect of the first digital value data, in this embodiment, before encoding the first digital value data, the wearable electrocardiogram device will also perform data processing on the first digital value data, such as performing a high-radix conversion based on the first digital value data to obtain the second digital value data, etc.
[0021] The electrocardiogram signal reflects the electrical activity generated by the heart in each cardiac cycle. When the myocardial cells of the heart depolarize and repolarize, tiny currents are generated. These currents are conducted through body tissues to the skin surface and are detected as voltage changes by the electrodes on the electrocardiogram device. The electrocardiogram signal can be converted into a digital signal through the analog-to-digital converter of the wearable electrocardiogram device. The analog-to-digital converter in this embodiment is a 12-bit analog-to-digital converter, which can quantize the input analog signal into a digital value between 0 and 4095 (i.e., 2 to the 12th power). Of course, before the electrocardiogram signal is converted by the 12-bit analog-to-digital converter, it needs to be amplified first because the electrocardiogram signal is very weak. The amplitude range of a typical electrocardiogram signal is approximately between 0.5 millivolts and 5 millivolts. In short, the first digital value data in this embodiment is the digital value obtained by first amplifying the electrocardiogram signal and then converting it through a 12-bit analog-to-digital converter, and it can be directly obtained through the wearable electrocardiogram device. The first digital value data can be, for example, digital values such as 2052, 2110, 3692, 3784, etc.
[0022] In this embodiment, performing a high-radix conversion based on the first digital value data to obtain the second digital value data specifically includes:
[0023] Converting each first digital value in the first digital value data into hexadecimal to obtain the initial second digital value data, and the initial second digital value data includes one or more initial second digital values.
[0024] Assuming the first digital value data is 2052, 2110, 3692, 3784, then the initial second digital value data is 804, 831, E6C, EC8.
[0025] Determine whether each initial second numerical value in the initial second numerical value data has a four-digit numerical value. When the initial second numerical value does not have a four-digit numerical value, pad the insufficient digits of the initial second numerical value with zeros at the high position to obtain an initial second numerical value with a four-digit numerical value, and use the initial second numerical value with a four-digit numerical value as the second numerical value of the second numerical value data.
[0026] When the first numerical value is 0, the corresponding initial second numerical value is 0; when the first numerical value is 4095, the corresponding initial second numerical value is FFF. That is to say, the initial second numerical value obtained by converting the first numerical value into hexadecimal definitely does not have a four-digit numerical value, so all initial second numerical values need to be padded with zeros at the high position. For example, if the initial second numerical value data is 804, then the initial second numerical value with a four-digit numerical value after padding with zeros at the high position is 0804, and then the corresponding second numerical value is 0804.
[0027] Suppose the initial second numerical value data is 804, 831, E6C, EC8, then the second numerical value data is 0804, 0831, 0E6C, 0EC8. The reason for converting the first numerical value into the second numerical value in hexadecimal in this embodiment is to enable the high-byte numerical values in the subsequent formed high-byte data set to have more repeated bits. Specifically, if the first numerical value in the first numerical value data is not converted into hexadecimal, then the high-byte numerical value can be any one of 00, 01, 02... 09, 10, 11, 12... 37, 38, 39, 40, and there are 41 possibilities for the high-byte numerical value. And the high-byte numerical value obtained through the second numerical value can be any one of 00, 01, 02... 09, 0A, 0B... 0F, and there are only 16 possibilities for the high-byte numerical value. When the total number of high-byte numerical values in the high-byte data set is the same, the setting of the second numerical value data makes the high-byte numerical values in the high-byte data set have more repeated bits. For example, 20 in 2052 and 21 in 2110 are not repeated, but after conversion into hexadecimal, 08 in 0804 and 08 in 0831 are repeated.
[0028] In block 104, method 100 may include splitting each second numerical value in the second numerical value data to obtain the high-byte numerical value and the low-byte numerical value of the second numerical value.
[0029] Among them, splitting each second numerical value in the second numerical value data to obtain the high-byte numerical value and the low-byte numerical value of the second numerical value includes:
[0030] Determine the splitting position of the second numerical value. The splitting position of the second numerical value is half of the total number of digits of the second numerical value. In this embodiment, the second numerical value definitely only has a four-digit numerical value, so the splitting position of the second numerical value is 2.
[0031] Divide the second numerical value based on the number of digits to be segmented. In this embodiment, the first two numerical values and the last two numerical values of each second numerical value are segmented. Suppose the second numerical value is 0806, then it is segmented between "08" and "06", and a virtual segmentation line is assumed to be set between "08" and "06".
[0032] Use the numerical value on the first side of the segmentation line after dividing the second numerical value as the high-byte numerical value, and use the numerical value on the second side of the segmentation line after dividing the second numerical value as the low-byte numerical value. In this embodiment, the numerical value on the left side of the segmentation line is used as the high-byte numerical value, and the numerical value on the right side of the segmentation line is used as the low-byte numerical value.
[0033] Specifically, when the second numerical value data is 0804, 0831, 0E6C, 0EC8, the high-byte numerical value of the first second numerical value (i.e., 0804) is 08, and the low-byte numerical value of the first second numerical value (i.e., 0804) is 04; the high-byte numerical value of the second second numerical value (i.e., 0831) is 08, and the low-byte numerical value of the second second numerical value (i.e., 0831) is 31; the high-byte numerical value of the third second numerical value (i.e., 0E6C) is 0E, and the low-byte numerical value of the second numerical value (i.e., 0E6C) is 6C; the high-byte numerical value of the fourth second numerical value (i.e., 0EC8) is 0E, and the low-byte numerical value of the fourth second numerical value (i.e., 0EC8) is C8.
[0034] In block 106, method 100 may include obtaining the high-byte numerical value of each second numerical value in the second numerical value data and storing them in sequence to obtain a high-byte data set, and obtaining the low-byte numerical value of each second numerical value in the second numerical value data and storing them in sequence to obtain a low-byte data set.
[0035] When the second numerical value data is 0804, 0831, 0E6C, 0EC8, the obtained high-byte data set is: 08, 08, 0E, 0E, and the obtained low-byte data set is: 04, 31, 6C, C8. The reason for forming the high-byte data set and the low-byte data set in this embodiment is to reduce the amount of subsequent encoded value data.
[0036] Suppose the second numerical value data is: 0804, 0831, 086C, 08C8, 0E04, 0E31, 0E6C, 0EC8. If the second numerical value data is directly encoded using an ordinary encoding method, then the obtained encoded data is: 1 / 01 / 001 / 0001 / 00001 / 000001 / 0000001 / 0000000, with a total of 35 encoded value data.
[0037] The ordinary encoding method is as follows: First, obtain the 1st second numerical value (i.e., 0804) in the second numerical value data in sequence, and assign an encoding value (i.e., 1) to the 1st second numerical value (i.e., 0804); then obtain the 2nd second numerical value (i.e., 0831) in the second numerical value data in sequence, and determine whether the 2nd second numerical value (i.e., 0831) has appeared before. If it has appeared before, then directly adopt the encoding value used before. If it has not appeared before, assign a new encoding value (i.e., 01) to the 2nd second numerical value (i.e., 0831) …… Finally, obtain the 8th second numerical value (i.e., 0EC8) in the second numerical value data in sequence, and determine whether the 8th second numerical value (i.e., 0EC8) has appeared before. If it has appeared before, then directly adopt the encoding value used before. If it has not appeared before, assign a new encoding value (i.e., 0000000) to the 8th second numerical value (i.e., 0EC8). When assigning encoding values, the following conditions need to be met: On the premise of being different from the existing encoding values, the encoding digits of the new encoding values need to be as few as possible (for example, the encoding digits of the 1st new encoding value are preferably one digit, and the encoding digits of the 2nd new encoding value are preferably two digits); and except that the units digit of the last encoding value can be 0, the units digit of other encoding values needs to be 1 (for distinguishing between the two adjacent encoding values).
[0038] If the high - byte data set (08, 08, 08, 08, 0E, 0E, 0E, 0E) and the low - byte data set (04, 31, 6C, C8, 04, 31, 6C, C8) of the second numerical value data are obtained first, and then the high - byte numerical values in the high - byte data set are processed for data encoding using the ordinary encoding method (the obtained encoding data is: 1 / 1 / 1 / 1 / 0 / 0 / 0 / 0), and at the same time, the low - byte numerical values in the low - byte data set are processed for data encoding using the ordinary encoding method (the obtained encoding data is: 1 / 01 / 001 / 000 / 1 / 01 / 001 / 000), then there are a total of 26 encoding value data, and obviously the data volume of the encoding value data is effectively reduced. Especially when there are a large number of repetitions of the high - byte numerical values in the high - byte data set and the low - byte numerical values in the low - byte data set, by setting the high - byte data set and the low - byte data set, the data volume of the encoding value data can be very effectively reduced, thereby effectively compressing the data and finally ensuring the efficient transmission of the data.
[0039] Furthermore, in this embodiment, the conversion of the first numerical value data to obtain the second numerical value data may further include:
[0040] Obtain the DC bias voltage of the electrocardiogram signal.
[0041] After the wearable electrocardiogram (ECG) device amplifies the collected electrical signals and before inputting them into the analog-to-digital converter (ADC), a DC bias voltage is added to the amplified ECG signals. The ECG signals themselves are AC signals, and their amplitudes are typically between 0.5 millivolts and 5 millivolts. Since these signals are very weak and modern ECG devices often use single power supplies (such as battery power), they cannot directly process negative voltage signals. Therefore, a DC bias voltage needs to be applied to the ECG signals. The DC bias voltage can raise the ECG signals to an appropriate DC level so that even if there are negative parts, after being lifted, they can remain within a positive voltage range, facilitating subsequent digital processing. The DC bias voltage is a parameter artificially set for the wearable ECG device. After the staff sets the DC bias voltage of the ECG signals for the wearable ECG device, the wearable ECG device can automatically obtain the DC bias voltage of the ECG signals.
[0042] Before using the 12-bit ADC of the wearable ECG device, an input reference voltage also needs to be artificially set. For example, the input reference voltage can be 2.8 volts. When the input reference voltage is 2.8 volts, if the input of the ADC is 0 volts, then the first digital value output by the ADC is 0; if the input of the ADC is 2.8 volts, then the first digital value output by the ADC is 4095. And the DC bias voltage is usually half of the input reference voltage. For example, when the input reference voltage is 2.8 volts, the DC bias voltage is 1.4 volts. Of course, the DC bias voltage can also be set according to actual usage requirements and does not necessarily have to be set as half of the input reference voltage. In short, the staff needs to set the two parameters of the input reference voltage and the DC bias voltage for the wearable ECG device in advance. In this way, when the wearable ECG device collects ECG signals, the wearable ECG device can automatically obtain the DC bias voltage and then can automatically perform relevant processing on the ECG signals.
[0043] Convert the DC bias voltage into a base digital value.
[0044] After obtaining the DC bias voltage of the ECG signals, the DC bias voltage can be converted into a base digital value through the following formula:
[0045]
[0046] where, is the base digital value, is the DC bias voltage, is the reference voltage, is the resolution bits of the ADC. When is 1.4 volts, is 2.8 volts, is 12, It is 2048. That is, the basic digital value converted by the DC bias voltage is 2048.
[0047] Determine whether each first digital value in the first digital value data is less than the basic digital value. When the first digital value is less than the basic digital value, record the arrangement serial number of the first digital value in the first digital value data, and directly use the first digital value as the third digital value in the third digital value data; when the first digital value is not less than the basic digital value, subtract the basic digital value from the first digital value to use as the third digital value in the third digital value data.
[0048] For example, when the first digital value data is 1999, 2013, 2052, 2110, 3692, 3784, first determine whether the first digital value (i.e., 1999) is less than the basic digital value (i.e., 2048). Since the first digital value (i.e., 1999) is less than the basic digital value (i.e., 2048), record the arrangement serial number of the first digital value (i.e., 1999) (for example, the arrangement serial number is 1), and directly use the first digital value (i.e., 1999) as the third digital value in the third digital value data (i.e., 1999); at the same time, determine whether the first digital value (i.e., 2013) is less than the basic digital value (i.e., 2048). Since the first digital value (i.e., 2013) is less than the basic digital value (i.e., 2048), record the arrangement serial number of the first digital value (i.e., 2013) (for example, the arrangement serial number is 2); at the same time, determine whether the first digital value (i.e., 2052) is less than the basic digital value (i.e., 2048). Since the first digital value (i.e., 2052) is not less than the basic digital value (i.e., 2048), subtract the basic digital value (i.e., 2048) from the first digital value (i.e., 2052) to use as the third digital value in the third digital value data (i.e., 4); at the same time, determine whether the first digital value (i.e., 2110) is less than the basic digital value (i.e., 2048). Since the first digital value (i.e., 2110) is not less than the basic digital value (i.e., 2048), subtract the basic digital value (i.e., 2048) from the first digital value (i.e., 2110) to use as the third digital value in the third digital value data (i.e., 62); at the same time, determine whether the first digital value (i.e., 3692) is less than the basic digital value (i.e., 2048). Since the first digital value (i.e., 3692) is not less than the basic digital value (i.e., 2048), subtract the basic digital value (i.e., 2048) from the first digital value (i.e., 3692) to use as the third digital value in the third digital value data (i.e., 1644); at the same time, determine whether the first digital value (i.e., 3784) is less than the basic digital value (i.e., 2048). Since the first digital value (i.e., 3784) is not less than the basic digital value (i.e., 2048), subtract the basic digital value (i.e., 2048) from the first digital value (i.e., 3784) to use as the third digital value in the third digital value data (i.e., 1738). Thus, the third digital value data can be obtained as 1999, 2013, 4, 62, 1644, 1738.
[0049] Convert each third numerical value in the third numerical value data into hexadecimal to obtain initial second numerical value data, where the initial second numerical value data includes one or more initial second numerical values. When the third numerical value data is 1999, 2013, 4, 62, 1644, 1738, the initial second numerical value data converted into hexadecimal is 7CF, 7DD, 4, 3E, 66C, 69A.
[0050] Determine whether each initial second numerical value in the initial second numerical value data has a four-digit numerical value. When the initial second numerical value does not have a four-digit numerical value, pad the insufficient digits of the initial second numerical value with zeros at the high position to obtain an initial second numerical value with a four-digit numerical value, and use the initial second numerical value with a four-digit numerical value as the second numerical value of the second numerical value data.
[0051] If the initial second numerical value data is 7CF, then the initial second numerical value with a four-digit numerical value after padding with zeros at the high position is 07CF, and then the corresponding second numerical value is 07CF. If the initial second numerical value data is 7DD, then the initial second numerical value with a four-digit numerical value after padding with zeros at the high position is 07DD, and then the corresponding second numerical value is 07DD. If the initial second numerical value data is 4, then the initial second numerical value with a four-digit numerical value after padding with zeros at the high position is 0004, and then the corresponding second numerical value is 0004. If the initial second numerical value data is 3E, then the initial second numerical value with a four-digit numerical value after padding with zeros at the high position is 003E, and then the corresponding second numerical value is 003E. If the initial second numerical value data is 66C, then the initial second numerical value with a four-digit numerical value after padding with zeros at the high position is 066C, and then the corresponding second numerical value is 066C. If the initial second numerical value data is 69A, then the initial second numerical value with a four-digit numerical value after padding with zeros at the high position is 069A, and then the corresponding second numerical value is 069A. That is, when the initial second numerical value data is 7CF, 7DD, 4, 3E, 66C, 69A, the second numerical value data is 07CF, 07DD, 0004, 003E, 066C, 069A.
[0052] First, assume that the high byte data set is 06, 06, 06. Then, the data encoding obtained by using the ordinary encoding method is 1 / 1 / 1, and there are 3 encoded value data. Then, assume that the high byte data set is 06, 07, 08. Then, the data encoding obtained by using the ordinary encoding method is 1 / 01 / 00, and there are 5 encoded value data. That is to say, the more the high byte values in the high byte data set repeat, the better. In this way, the amount of encoded value data obtained by encoding is less, which is equivalent to a better compression effect.
[0053] If the second numerical value is directly obtained by hexadecimal conversion from the first numerical value, then the smallest high-byte numerical value is 00 (when the first numerical value is 0, the corresponding second numerical value is 0000), the largest high-byte numerical value is 0F (when the first numerical value is 4095, the corresponding second numerical value is 0FFF), and the high-byte numerical values are between 00, 01... 0F, with 16 possibilities. Now, first subtract the base numerical value from the first numerical value that is greater than or equal to the base numerical value. Then, all the "first numerical values" become between 0 and 2047. If the "first numerical value" is converted to the second numerical value by hexadecimal conversion, then the smallest high-byte numerical value is 00 (when the "first numerical value" is 0, the corresponding second numerical value is 0000), the largest high-byte numerical value is 07 (when the "first numerical value" is 2047, the corresponding second numerical value is 07FF), and the high-byte numerical values are between 00, 01... 07, with only 8 possibilities.
[0054] In this embodiment, by subtracting the base numerical value from the first numerical value, the range of high-byte numerical values in the subsequent formed high-byte data set changes from 00 to 0F to 00 to 07, which can effectively increase the repetition rate of high-byte numerical values in the high-byte data set, and ultimately can effectively reduce the amount of subsequent coded value data.
[0055] In other application scenarios, usually the high-byte data set and the low-byte data set are not obtained, because obtaining the high-byte data set and the low-byte data set may instead increase the amount of coded value data. The reason why this embodiment can obtain the high-byte data set and the low-byte data set is due to the particularity of the electrocardiogram signal. Since the first numerical value data obtained by the wearable electrocardiogram device is in the range of 0 - 4095, when the first numerical value data is converted into the second numerical value data, if the second numerical value data is divided into the high-byte data set and the low-byte data set, because there are a large number of repeated high-byte numerical values in the high-byte data set, the total amount of coded value data can be reduced finally.
[0056] Furthermore, the electrocardiogram data compression method in this embodiment further includes performing data encoding processing on the high-byte numerical values in the high-byte data set, specifically including:
[0057] Determine the high-byte numerical values existing in the high-byte data set. Assume the high-byte data set is: 01, 00, 00, 00, 01, 00, 00, 01, 02, 02. Then the existing high-byte numerical values are: 01, 00, 02.
[0058] Count the occurrence times one of each high-byte numerical value. Among them, the occurrence times one of the high-byte numerical value 01 is 3, the occurrence times one of the high-byte numerical value 00 is 5, and the occurrence times one of the high-byte numerical value 02 is 2.
[0059] Sort the high-byte values in descending order by the number of occurrences to obtain a high-byte value sequence. The high-byte value sequence is: 00, 01, 02.
[0060] Assign a first encoding value to each high-byte value in the high-byte value sequence. Assigning a first encoding value to each high-byte value in the high-byte value sequence includes: obtaining the first high-byte value in the high-byte value sequence and determining whether there is a second high-byte value in the high-byte value sequence. If there is, determine the number of digits of the first encoding value corresponding to the high-byte value, set the units digit of the first encoding value to 1 and set the other bits of the first encoding value to 0; if not, determine the number of digits of the first encoding value corresponding to the high-byte value and set all bits of the first encoding value to 0. Determining the number of digits of the first encoding value corresponding to the high-byte value includes: determining the first deletion count of the high-byte values in the high-byte value sequence; when there is a second high-byte value in the high-byte value sequence, the number of digits of the first encoding value corresponding to the high-byte value is equal to the first deletion count plus one; when there is no second high-byte value in the high-byte value sequence, the number of digits of the first encoding value corresponding to the high-byte value is equal to the first deletion count. Delete the first high-byte value in the high-byte value sequence to obtain a new high-byte value sequence.
[0061] First, the high-byte value sequence is: 00, 01, 02. The first high-byte value is 00 and there is a second high-byte value 01. Therefore, first determine the number of digits of the first encoding value of the high-byte value 00. In the initial state, the first deletion count is 0, so the first deletion count at this time is 0. Since there is a second high-byte value 01 in the high-byte value sequence, the number of digits of the first encoding value of the high-byte value 00 is equal to the first deletion count (i.e., 0) plus one, and finally the number of digits of the first encoding value of the high-byte value 00 is 1. Since the units digit of the first encoding value needs to be set to "1" (in order to distinguish between the previous and subsequent first encoding values, in this embodiment, the units digit of other first encoding values except the last one is set to 1), and the other bits need to be set to "0", the first encoding value of the high-byte value 00 is "1". After the first encoding value of the high-byte value 00 is determined, delete the first high-byte value in the high-byte value sequence (i.e., 00, 01, 02) to obtain a new high-byte value sequence: 01, 02. And at this time, the first deletion count is 1.
[0062] Next, the high-byte numerical sequence is: 01, 02. The first high-byte numerical value is 01, and there is also a second high-byte numerical value 02. Therefore, first determine the number of bits of the first encoded value of the high-byte numerical value 01. The first deletion count at this time is 1. Since there is a second high-byte numerical value 02 in the high-byte numerical sequence, the number of bits of the first encoded value of the high-byte numerical value 01 is equal to the first deletion count (i.e., 1) plus one. Finally, the number of bits of the first encoded value of the high-byte numerical value 00 is obtained as 2. Since the least significant bit of the encoded value one needs to be set to "1" and the other bits need to be set to "0", the first encoded value of the high-byte numerical value 01 is "01". After the first encoded value of the high-byte numerical value 01 is determined, the first high-byte numerical value in the high-byte numerical sequence (i.e., 01, 02) is deleted, obtaining a new high-byte numerical sequence: 02. And the first deletion count at this time is 2.
[0063] Then, the high-byte numerical sequence is: 02. The first high-byte numerical value is 02, and there is no second high-byte numerical value. Therefore, first determine the number of bits of the first encoded value of the high-byte numerical value 02. The first deletion count at this time is 2. Since there is no second high-byte numerical value in the high-byte numerical sequence, the number of bits of the first encoded value of the high-byte numerical value 02 is equal to the first deletion count (i.e., 2). Finally, the number of bits of the first encoded value of the high-byte numerical value 02 is obtained as 2. Since all bits of the encoded value one need to be set to "0", the first encoded value of the high-byte numerical value 02 is "00". After the first encoded value of the high-byte numerical value 02 is determined, the first high-byte numerical value in the high-byte numerical sequence (i.e., 02) is deleted. Since there is no high-byte numerical value in the high-byte numerical sequence at this time, the encoding of each high-byte numerical value with the first encoded value ends.
[0064] Encode all high-byte numerical values in the high-byte data set according to the first encoded value of each high-byte numerical value to obtain high-byte encoded data.
[0065] When the first encoded value of the high-byte numerical value 00 is "1", the first encoded value of the high-byte numerical value 01 is "01", and the first encoded value of the high-byte numerical value 02 is "00", the high-byte data set (i.e., 01, 00, 00, 00, 01, 00, 00, 01, 02, 02) is encoded to obtain high-byte encoded data as: 01 / 1 / 1 / 1 / 01 / 1 / 1 / 01 / 00 / 00 (with 15 encoded value data). Compared with the encoded data obtained by the ordinary encoding method: 1 / 01 / 01 / 01 / 1 / 01 / 01 / 1 / 00 / 00 (with 18 encoded value data), the encoding method of this embodiment can not only reduce the data volume of the encoded value data but also make the encoding steps very simple and efficient.
[0066] The electrocardiogram data compression method in this embodiment further includes performing data encoding processing on the low-byte numerical values in the low-byte data set, specifically including:
[0067] [[ID=~2]]Determine the low byte values present in the low byte dataset. Assume the low byte dataset is: 6C, 5B, 5B, 5B, 5B, 5B, 3A, 3A, 5B, 6C. Then the low byte values present are: 6C, 5B, 3A.
[0068] [[ID=~5]]Count the number of occurrences of each low byte value. Among them, the number of occurrences of the low byte value 6C is 2, the number of occurrences of the low byte value 5B is 6, and the number of occurrences of the low byte value 3A is 2.
[0069] [[ID=~8]]Sort the low byte values in descending order of the number of occurrences to obtain the low byte value sequence. Among them, the low byte value sequence is: 5B, 6C, 3A.
[0070] [[ID=~11]]Assign a coding value two to each low byte value in the low byte value sequence. Among them, assigning a coding value two to each low byte value in the low byte value sequence includes: obtaining the first low byte value in the low byte value sequence; determining whether there is a second low byte value in the low byte value sequence. If so, determine the number of bits of the coding value two corresponding to the low byte value, set the units digit of the coding value two to 1 and set the other bits of the coding value two to 0; if not, determine the number of bits of the coding value two corresponding to the low byte value and set all bits of the coding value two to 0. Among them, determining the number of bits of the coding value two corresponding to the low byte value includes: determining the second deletion count of the low byte values in the low byte value sequence; when there is a second low byte value in the low byte value sequence, the number of bits of the coding value two corresponding to the low byte value is equal to the second deletion count plus one; when there is no second low byte value in the low byte value sequence, the number of bits of the coding value two corresponding to the low byte value is equal to the second deletion count. Delete the first low byte value in the low byte value sequence to obtain a new low byte value sequence.
[0071] First, the sequence of low-byte values is: 5B, 6C, 3A. The first low-byte value is 5B, and there is also a second low-byte value 6C. Therefore, first determine the number of bits of the second encoding value of the low-byte value 5B. In the initial state, the second deletion count is 0, so the second deletion count at this time is 0. Since there is a second low-byte value 6C in the sequence of low-byte values, the number of bits of the second encoding value of the low-byte value 5B is equal to the second deletion count (i.e., 0) plus one, and finally the number of bits of the second encoding value of the low-byte value 5B is obtained as 1. Since the least significant bit of the encoding value two needs to be set to "1" (in order to distinguish between the two encoding values two before and after, in this embodiment, the least significant bit of the other encoding values two except the last one is set to 1), and the other bits need to be set to "0", so the second encoding value of the low-byte value 5B is "1". After the second encoding value of the low-byte value 5B is determined, the first low-byte value in the sequence of low-byte values (i.e., 5B, 6C, 3A) is deleted, and a new sequence of low-byte values is obtained: 6C, 3A. And at this time, the second deletion count is 1.
[0072] Next, the sequence of low-byte values is: 6C, 3A. The first low-byte value is 6C, and there is also a second low-byte value 3A. Therefore, first determine the number of bits of the second encoding value of the low-byte value 6C. The second deletion count at this time is 1. Since there is a second low-byte value 3A in the sequence of low-byte values, the number of bits of the second encoding value of the low-byte value 6C is equal to the second deletion count (i.e., 1) plus one, and finally the number of bits of the second encoding value of the low-byte value 6C is obtained as 2. Since the least significant bit of the encoding value two needs to be set to "1", and the other bits need to be set to "0", so the second encoding value of the low-byte value 6C is "01". After the second encoding value of the low-byte value 6C is determined, the first low-byte value in the sequence of low-byte values (i.e., 6C, 3A) is deleted, and a new sequence of low-byte values is obtained: 3A. And at this time, the second deletion count is 2.
[0073] Then, the sequence of low-byte values is: 3A. The first low-byte value is 3A, and there is no second low-byte value. Therefore, first determine the number of bits of the second encoding value of the low-byte value 3A. The second deletion count at this time is 2. Since there is no second high-byte value in the sequence of low-byte values, the number of bits of the second encoding value of the low-byte value 3A is equal to the second deletion count (i.e., 2), and finally the number of bits of the second encoding value of the low-byte value 3A is obtained as 2. Since all bits of the encoding value two need to be set to "0", so the second encoding value of the low-byte value 3A is "00". After the second encoding value of the low-byte value 3A is determined, the first low-byte value in the sequence of low-byte values (i.e., 3A) is deleted. Since there is no low-byte value in the sequence of low-byte values at this time, the assignment of the second encoding value to each low-byte value ends.
[0074] Encode all the low - byte values in the low - byte dataset according to the second encoding value of each low - byte value to obtain low - byte encoded data.
[0075] When the second encoding value of the low - byte value 5B is "1", the second encoding value of the low - byte value 6C is "01", and the second encoding value of the low - byte value 3A is "00", the low - byte dataset (i.e., 6C, 5B, 5B, 5B, 5B, 5B, 3A, 3A, 5B, 6C) is encoded to obtain the low - byte encoded data: 01 / 1 / 1 / 1 / 1 / 1 / 00 / 00 / 1 / 01 (with 14 encoded - value data). Compared with the encoded data obtained by the existing encoding method: 1 / 01 / 01 / 01 / 01 / 01 / 00 / 00 / 01 / 1 (with 18 encoded - value data), the encoding method of this embodiment can not only further reduce the data volume of the encoded - value data but also make the encoding steps very simple and efficient.
[0076] The entire workflow of this embodiment is as follows:
[0077] After the wearable electrocardiogram device directly obtains the first digital - value data (e.g., 1999, 2013, 2052, 2110, 2269, 2255), then the third digital - value data (1999, 2013, 4, 62, 221, 207) is obtained from the first digital - value data (by recording the arrangement serial number if it is less than the base digital value and subtracting the base digital value if it is greater than or equal to the base digital value), and then the third digital - value data is converted into hexadecimal to obtain the second digital - value data (07CF, 07DD, 0004, 003E, 00DD, 00CF). Then, the high - byte dataset (07, 07, 00, 00, 00, 00) and the low - byte dataset (CF, DD, 04, 3E, DD, CF) are obtained. Next, the high - byte dataset is encoded to obtain the high - byte encoded data (0 / 0 / 1 / 1 / 1 / 1) and the low - byte dataset is encoded to obtain the low - byte encoded data (1 / 01 / 001 / 000 / 01 / 1), and an encoding mapping table is also formed. Finally, the high - byte encoded data (0 / 0 / 1 / 1 / 1 / 1), the low - byte encoded data (1 / 01 / 001 / 000 / 01 / 1), and the encoding mapping table are sent to the display device.
[0078] After receiving the high - byte encoded data (0 / 0 / 1 / 1 / 1 / 1), the low - byte encoded data (1 / 01 / 001 / 000 / 01 / 1), and the encoding mapping table, the display device first decodes the data according to the encoding mapping table (in the high - byte encoding mapping table, the encoding value "0" corresponds to the high - byte value "07", and the encoding value "1" corresponds to the high - byte value "00"; in the low - byte encoding mapping table, the encoding value "1" represents the low - byte value "CF", the encoding value "01" represents the low - byte value "DD", the encoding value "001" represents the low - byte value "04", and the encoding value "000" represents the low - byte value "3E") to obtain the high - byte data set (07, 07, 00, 00, 00, 00) and the low - byte data set (CF, DD, 04, 3E, DD, CF). Then, it obtains the second digital value data (07CF, 07DD, 0004, 003E, 00DD, 00CF) from the high - byte data set and the low - byte data set, and then reversely converts the second digital value data into the third digital value data (1999, 2013, 4, 62, 221, 207). Then, the third digital value data (in the way that the recorded arrangement serial number remains unchanged and the unrecorded arrangement serial number is added with the basic digital value) is reversely converted into the first digital value data (1999, 2013, 2052, 2110, 2269, 2255). Finally, the display device can also convert the first digital value data into an electrocardiogram signal through a digital - to - analog converter for display.
[0079] The data compression method of this embodiment can not only improve the data compression ratio, making the data transmission efficiency increased and the data transmission real - time performance good, but also has the advantages of simple data compression steps and the ability to maintain the integrity of the original data (i.e., lossless compression).
[0080] Figure 2 The block diagram of an electrocardiogram data compression device 200 according to some embodiments of the present disclosure is shown. The device 200 includes a second digital value data acquisition module 202 configured to perform a high - radix conversion on the first digital value data to obtain the second digital value data, where the second digital value data includes one or more second digital values. A high - and - low byte value determination module 204 configured to divide each second digital value in the second digital value data to obtain the high - byte value and the low - byte value of the second digital value. A high - and - low byte data set formation module 206 configured to obtain the high - byte value of each second digital value in the second digital value data and store them in sequence to obtain the high - byte data set, and obtain the low - byte value of each second digital value in the second digital value data and store them in sequence to obtain the low - byte data set.
[0081] Figure 3A block diagram of an electronic device 300 showing some embodiments of the present disclosure is presented. The device 300 includes a processor 301 that can execute various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 302 and loaded into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the device 300 can also be stored. The processor 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0082] Each of the processes and processes described above, such as method 100, can be executed by the processor 301. For example, in some embodiments, method 100 can be implemented as a software program that is tangibly included in a machine-readable medium. In some embodiments, part or all of the software program can be loaded and / or installed onto the device 300 via the ROM 302. When the software program is loaded into the RAM 303 and executed by the processor 301, one or more actions of the method 100 described above can be executed.
[0083] The functions described above herein can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0084] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. This program code can be provided to the processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program code is executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are
[0085] implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0086] The present disclosure may be a method, apparatus, system, and / or program product. The program product may include a machine-readable storage medium having thereon machine-readable program instructions for performing aspects of the present disclosure. The machine-readable program instructions described herein may be downloaded from the machine-readable storage medium to various computing / processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network (LAN), a wide area network (WAN), and / or a wireless network. The network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the machine-readable program instructions from the network and forwards the machine-readable program instructions for storage in a machine-readable storage medium in each computing / processing device.
[0087] The machine program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state-setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The machine-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider). In some embodiments, by using the state information of the machine-readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute the machine-readable program instructions to implement aspects of the present disclosure.
[0088] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. Further, although the operations are depicted in a particular order, this should be understood to require that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the foregoing discussion, these should not be construed as limitations on the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, the various features that are described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination in multiple embodiments.
[0089] Although the subject matter has been described in language specific to structural features and / or methodological acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A method for compressing electrocardiogram data, characterized in that, Including: Performing a high - radix conversion on the first digital value data to obtain second digital value data, where the second digital value data includes one or more second digital values; Dividing each of the second digital values in the second digital value data to obtain the high - byte value and the low - byte value of the second digital value; And Obtaining the high - byte value of each second digital value in the second digital value data and storing them in sequence to obtain a high - byte data set, and obtaining the low - byte value of each second digital value in the second digital value data and storing them in sequence to obtain a low - byte data set; Performing a high - radix conversion on the first digital value data to obtain second digital value data includes: Obtaining the DC bias voltage of the electrocardiogram signal; Converting the DC bias voltage into a basic digital value; Determining whether each first digital value in the first digital value data is less than the basic digital value. When the first digital value is less than the basic digital value, recording the arrangement serial number of the first digital value in the first digital value data, and directly using the first digital value as the third digital value in the third digital value data; when the first digital value is not less than the basic digital value, subtracting the basic digital value from the first digital value to be used as the third digital value in the third digital value data; Converting each of the third digital values in the third digital value data into hexadecimal to obtain initial second digital value data, where the initial second digital value data includes one or more initial second digital values; Determining whether each of the initial second digital values in the initial second digital value data has four digits of value. When the initial second digital value does not have four digits of value, padding the insufficient digits of the initial second digital value with zeros at the high - order positions to obtain an initial second digital value with four digits of value, and using the initial second digital value with four digits of value as the second digital value of the second digital value data.
2. The method according to claim 1, wherein Dividing each of the second digital values in the second digital value data to obtain the high - byte value and the low - byte value of the second digital value includes: Determining the division digit of the second digital value, where the division digit of the second digital value is half of the total number of digits of the second digital value; Dividing the second digital value based on the division digit; Using the digital value on the first side of the division line after dividing the second digital value as the high - byte value, and using the digital value on the second side of the division line after dividing the second digital value as the low - byte value.
3. The method according to claim 1, characterized in that, It further includes performing data encoding processing on the high - byte values in the high - byte data set, including: Determining the high - byte values existing in the high - byte data set; Counting the number of occurrences one of each high - byte value; Sorting the high - byte values in descending order according to the number of occurrences one to obtain a high - byte value sequence; Assigning a coding value one to each high - byte value in the high - byte value sequence; Encoding all the high - byte values in the high - byte data set according to the coding value one of each high - byte value to obtain high - byte encoded data; The method further includes performing data encoding processing on the low - byte values in the low - byte data set, including: Determine the low - byte numerical values existing in the low - byte data set; Count the occurrence times of each of the low - byte numerical values; Sort the low - byte numerical values in descending order according to the occurrence times to obtain a low - byte numerical value sequence; Assign an encoding value to each of the low - byte numerical values in the low - byte numerical value sequence; Encode all the low - byte numerical values in the low - byte data set according to the encoding value of each low - byte numerical value to obtain low - byte encoded data.
4. The method according to claim 3, characterized in that, Assigning an encoding value to each of the high - byte numerical values in the high - byte numerical value sequence includes: Obtain the first high - byte numerical value in the high - byte numerical value sequence; Determine whether there is a second high - byte numerical value in the high - byte numerical value sequence. If so, determine the number of bits of the encoding value of the corresponding high - byte numerical value, set the least - significant bit of the encoding value to 1 and set the other bits of the encoding value to 0; if not, determine the number of bits of the encoding value of the corresponding high - byte numerical value and set all bits of the encoding value to 0; Delete the first high - byte numerical value in the high - byte numerical value sequence to obtain a new high - byte numerical value sequence; Assigning an encoding value to each of the low - byte numerical values in the low - byte numerical value sequence includes: Obtain the first low - byte numerical value in the low - byte numerical value sequence; Determine whether there is a second low - byte numerical value in the low - byte numerical value sequence. If so, determine the number of bits of the encoding value of the corresponding low - byte numerical value, set the least - significant bit of the encoding value to 1 and set the other bits of the encoding value to 0; if not, determine the number of bits of the encoding value of the corresponding low - byte numerical value and set all bits of the encoding value to 0; Delete the first low - byte numerical value in the low - byte numerical value sequence to obtain a new low - byte numerical value sequence.
5. The method according to claim 4, characterized in that Determining the number of bits of the encoding value of the corresponding high - byte numerical value includes: Determine the first deletion number of high - byte numerical values in the high - byte numerical value sequence; When there is a second high - byte numerical value in the high - byte numerical value sequence, the number of bits of the encoding value of the corresponding high - byte numerical value is equal to the first deletion number plus 1; when there is no second high - byte numerical value in the high - byte numerical value sequence, the number of bits of the encoding value of the corresponding high - byte numerical value is equal to the first deletion number; Determining the number of bits of the encoding value of the corresponding low - byte numerical value specifically includes: Determine the second deletion number of low - byte numerical values in the low - byte numerical value sequence; When there is a second low - byte numerical value in the low - byte numerical value sequence, the number of bits of the encoding value of the corresponding low - byte numerical value is equal to the second deletion number plus 1; when there is no second low - byte numerical value in the low - byte numerical value sequence, the number of bits of the encoding value of the corresponding low - byte numerical value is equal to the second deletion number.
6. An electrocardiogram data compression device, characterized in that, Includes: A second numerical value data acquisition module, configured to perform a high - radix conversion on the first numerical value data to obtain second numerical value data, where the second numerical value data includes one or more second numerical values; A high - and - low byte numerical value determination module, configured to split each of the second numerical values in the second numerical value data to obtain the high - byte numerical value and the low - byte numerical value of the second numerical value; And A high and low byte data set forming module, configured to obtain the high byte numerical value of each of the second numerical values in the second numerical value data and store them in sequence to obtain a high byte data set, and obtain the low byte numerical value of each of the second numerical values in the second numerical value data and store them in sequence to obtain a low byte data set; Performing a high-radix conversion on the first numerical value data to obtain the second numerical value data includes: Obtaining the DC bias voltage of the electrocardiogram signal; Converting the DC bias voltage into a basic numerical value; Determining whether each first numerical value in the first numerical value data is less than the basic numerical value. When the first numerical value is less than the basic numerical value, recording the arrangement serial number of the first numerical value in the first numerical value data, and directly using the first numerical value as the third numerical value in the third numerical value data; when the first numerical value is not less than the basic numerical value, subtracting the basic numerical value from the first numerical value to be used as the third numerical value in the third numerical value data; Converting each of the third numerical values in the third numerical value data into hexadecimal to obtain initial second numerical value data, where the initial second numerical value data includes one or more initial second numerical values; Determining whether each of the initial second numerical values in the initial second numerical value data has four-digit numerical values. When the initial second numerical value does not have four-digit numerical values, padding the insufficient digits of the initial second numerical value with zeros in the high positions to obtain an initial second numerical value with four-digit numerical values, and using the initial second numerical value with four-digit numerical values as the second numerical value of the second numerical value data.
7. A computer program product, characterized in that, Including a computer program, which when executed by a processor implements the steps of the method according to any one of claims 1-5.
8. An electronic device, characterized in that, Including: One or more processors, and A memory associated with the one or more processors, the memory being used to store program instructions, and the program instructions, when read and executed by the one or more processors, execute the steps of the method according to any one of claims 1-5.
Citation Information
Patent Citations
Data compression apparatus, data compression program and image-taking apparatus
CN101933327A
Data compression circuit
JP1994232758A