A kind of electrocardiosignal is processed and data compression methodTechnical field
The present invention relates to a kind of ecg signal data and process and data compression method, be specially adapted to data record and the processing in Significance of Continuous Ecg Monitoring field.
Background technology
Cardiovascular and cerebrovascular disease is the commonly encountered diseases of a kind of serious threat life (particularly middle-aged and elderly people more than 50 years old).Every year is died from the number of cardiovascular and cerebrovascular disease up to 1,500 ten thousand people in the whole world, occupies the various causes of the death the first.Cardiovascular and cerebrovascular disease has become the highest No.1 killer of human Death causes, also is " the noiseless demon " of health of people! Therefore, the patient being carried out the heart real time monitoring changes significant to Prevention of cardiovascular disease with timely discovery anomalous ecg.
The pyroelectric monitor instrument is that anomalous ecg is changed the complementary diagnostic device that carries out the real-time dynamic monitoring early warning, equipment generally has the electrocardiogram (ECG) data of continuous monitoring whenever and wherever possible in 24 hours and recording user, the functions such as the collection of information, storage, analysis and early warning, its chief value is be used to finding that all kinds of arrhythmias and ST section change, for clinical diagnosis and treatment provide important evidence.
The feature point extraction of electrocardiosignal and waveform recognition are the keys of ECG analyzing and diagnosing, and wherein the detection of QRS ripple is the basis of electrocardiosignal automatic analysis, and its accuracy and reliability directly have influence on the performance of ECG real-time monitor system.Only have after the QRS wave group is determined, other parameter informations of electrocardiosignal, as: ST section, P ripple, heart rate etc. just can detect.
At present, the QRS wave detecting method is various, " Detection of ECG characteristic points usingWavelet Transforms[J] " (Cuiwei Li, Chong xun Zheng, Changfeng Tai et al, IEEETransactions on Biomedical Engineering, 1995,42 (1): 21-28) propose Wavelet Transformation Algorithm, but the large realization of its amount of calculation is complicated, is unsuitable for real-time processing." QRS Detection for Pacemakers in a NoisyEnvironment using a Time Lagged Artificial Neural Network[C] " (Neves Rodrigues, Owall, V., Sornmo, L.et al, IEEE International Symposium on Circuits and Systems, Sydney:NSW, 2001,2 (1): 101-103), " An approach to QRS Complex Detection UsingMathematical Morphology[J] " (Trahanias P.E., IEEE Transactions on BiomedicalEngineering, 1993,40 (2): 201-205), " Real-Time QRS DetectionAlgorithm " (J.Pan, Tompkins.A, IEEE Transactions on Biomedical Engineering, 1985,230-236), " QRSSlopes for Detection and Characterization of Myocardial Ischemia[J] " (Pueyo, E., Sornmo, L., Laguna, P.et al, IEEE Transactions on Biomedical Engineering, 2008,55 (2): 468-477) reach " Complexes Detection for ECG Signal:the Difference OperationMethod[J] " (, Wang, WJ.QRS Computer Methods and Programs in Biomedicine, 2008,91 (3): 245-254) propose many detection algorithms, but in the real-time detection of ambulatory ecg signal QRS ripple, also be difficult to accomplish accurate and real-time unification, especially in mobile continuous cardiac monitoring field, the ECG signal sampling algorithm is more immature, the online acquisition that adopt more, the strategy process of off-line diagnosis is guarded, and is difficult to reach the effect of real-time monitoring.Its main cause is, continuously human body is carried out detection record, and data volume is greater than conventional ECG signal sampling, and noisiness is large.24 hours electrocardios of continuous monitoring change, quantity of information than the large 2000-3000 of ordinary electrocardiogram doubly, this brings a lot of difficulties for data storage and processing, especially the detecting instrument of carrying, memory space and disposal ability are all limited, a large amount of data like this are carried out complex calculations be difficult to especially realize.
Summary of the invention
The purpose of this invention is to provide a kind of method that electrocardiosignal is processed computation complexity that reduces.
In order to achieve the above object, technical scheme of the present invention has provided a kind of electrocardiosignal and has processed and data compression method, it is characterized in that, step is:
The sampled point of 3 continuous electrocardiosignaies is designated as respectively Vi, Vi+1 and Vi+2 on step 1, the acquisition time;
Step 2, Vi, Vi+1 and Vi+2 are labeled as respectively M0, M1 and M2;
Step 3, the slope k 1 of calculating line segment (M0, M1) and the slope k 2 of line segment (M1, M2);
Step 4, the poor absolute value Q of slope calculations, Q=|k2-k1|;
Step 5, judge slope differences absolute value Q whether less than default threshold values δ, if, then enter step 6a, otherwise, enter step 6b, wherein threshold values δ sets as required, and threshold values δ is larger, and then data compression effect is better, but the data sensitive degree is lower; Threshold values δ is less, and then data compression effect is poorer, but the data sensitive degree is higher;
The corresponding sampled point Vi+1 of step 6a, cancellation M1 enters step 7;
Step 6b, the corresponding sampled point Vi of reservation M0 are labeled as M0 with the corresponding sampled point Vi+1 of M1, enter step 7;
Step 7, the corresponding sampled point Vi+2 of M2 is labeled as M1;
Step 8, judge whether all sampled points all are disposed, or judge whether sampling finishes, if not, then will with sampled point Vi+2 in time continuous sampled point Vi+3 be labeled as M2, return step 3 and continue to carry out.
Preferably, described sampled point obtains by described electrocardiosignal being carried out real-time sampling, then when carrying out describedstep 8, need only judge whether sampling finishes.
Preferably, before described step 1, also comprise:
Described electrocardiosignal is sampled, acquisition is by N sampled point, sampled point arranged take the time as order obtained the sampled point sequence, begun carry out step 1 by first sampled point in the sampled point sequence, then when carrying out describedstep 8, need only judge whether all sampled points all are disposed.
Preferably, described threshold values δ ∈ (Δ k/10, Δ k/5), wherein, Δ k is that the slope of ECG P wave band is maximum poor.
Advantage of the present invention is: the method is effective trap signal noise not only, also can reach packed data, reduces and processes complexity, reduces the purpose of amount of calculation, is specially adapted to continuous electrocardio monitoring, field that data volume is large.
Description of drawings
Fig. 1 is the embodiment schematic diagram of electrocardiosignal processing provided by the invention and data compression method, mainly for online acquisition and processing;
Fig. 2 is an embodiment to the concrete grammar process of standard method shown in Figure 1;
Fig. 3 is an embodiment to the concrete grammar process of standard method shown in Figure 1;
Fig. 4 is an embodiment to the concrete grammar process of standard method shown in Figure 1, mainly is for the Data Post after the data acquisition and compression.
The specific embodiment
For the present invention is become apparent, hereby with preferred embodiment, and cooperate accompanying drawing to be described in detail below.
Embodiment 1
As shown in Figure 1, a kind of electrocardiosignal that the present embodiment provides is processed and data compression method, is when electrocardiosignal is sampled, finishes in real time date processing and compression, and its concrete steps are:
Step 100 is determined the threshold values δ of slope, and threshold values δ is larger, then data compression effect better (that is, the point of rejecting is more), but data sensitive degree lower (that is, may reject some useful information points); δ is less for the slope threshold values, then data compression effect poorer (that is, the data point of rejecting is just few), but data sensitive degree higher (that is, keeping all right to the minor variations of initial data);
Step 101, real-time sampling obtain 3 sampled point V0, V1, V2 continuous in time;
Step 102 is labeled as M0 with sampled point V0;
Step 103, with sampled point V1 and sampled point V2 respectively standard be M1, M2, its main purpose is the convenience for the back cycle calculations;
Step 104 is calculated the slope k 1 of line segment (M0, M1) and the slope k 2 of line segment (M1, M2);
Step 105, the poor absolute value Q of slope calculations, Q=|k2-k1|;
Step 106 judges that whether slope differences absolute value Q is less than threshold values δ, if less than δ, illustrate that then M0, M1, the corresponding V0 of M2, V1, three sampled point trend of V2 are consistent substantially, execution instep 107a then, otherwise explanation line segment M0M1 has certain difference with line segment M1M2 trend,execution 107b;
Step 107a: cast out the corresponding sampled point of M1, this sampled point no longer participates in storage and calculates, and can reduce like this number a little, entersstep 108;
Step 107b: keep the corresponding sampled point of M0, the corresponding sampled point of M1 is labeled as M0;
Step 108: the corresponding sampled point of M2 is labeled as M1;
Step 109: judge whether sampling finishes, and namely whether also has new sampled point, if there is not new sampled point, then carries out 110b, otherwise carry out 110a;
Step 110a: the sampled point that obtains of will newly sampling is labeled as M2, then returns execution instep 104;
Step 110b: sampling finishes, and all sampled points that are not eliminated are desired data, and process finishes.
Figure 2 shows that a specific embodiment to method shown in Figure 1.
Among Fig. 2, unit of time is second, and voltage unit is mv, and sample frequency is 1000Hz, threshold values δ=1 (mv/s), among Fig. 2, M0, the coordinate of M1 and the corresponding sampled point of M2 is respectively (0.000,0.0031) (0.001,0.0035), (0.002,0.0033), then
k1=(0.0035-0.0031)/(0.001-0.000)=-0.2(v/s);
k2=(0.0033-0.0035)/(0.002-0.001)=-0.1(v/s);
Q=|-0.1-0.2|=0.3 (v/s), Q<δ so the corresponding sampled point of cancellation M1 is labeled as M1 with the corresponding sampled point of M2, connects and lower next sampled data points (0.003,0.0025) is labeled as M2, proceeds computing, can get:
k1=(0.0033-0.0031)/(0.002-0)=0.1(mv/s);
k2=-1(mv/s);
Q=|-1-0.1|=1.1 (v/s), then Q〉δ, keep the corresponding sampled point of M1.
Figure 3 shows that another specific embodiment to method shown in Figure 1.
Among Fig. 3, unit of time is second, and voltage unit is mv, and sample frequency is 1000Hz, threshold values δ=1.5 (mv/s), M0, the coordinate of M1 and the corresponding sampled point of M2 is respectively (1.003,0.0031) (1.004,0.004), (1.005,0.0025) can get:
k1=(0.004-0.0031)/(1.004-1.003)=0.9(mv/s);
k2=(0.0025-0.004)/(1.005-1.004)=-1.5(mv/s);
Q=|-1.5-0.9|=2.4 (mv/s), Q>δ, the corresponding sampled point of M1 keeps, give up the corresponding sampled point of M0, the corresponding sampled point of M1 is labeled as M0, the corresponding sampled point of M2 is labeled as M1, to next sampled point (1.006,0.0015) be labeled as M2, proceed computing, can get:
k1=(0.0025-0.004)/(1.005-1.004)=-1.5(mv/s);
k2=(0.0015-0.0025)/(1.006-1.005)=-1(mv/s);
Q=|-1-(1.5) |=0.5 (v/s), Q<δ gives up the corresponding sampled point of M1, and the corresponding sampled point of M2 is labeled as M1.
Embodiment 2
Be illustrated in figure 4 as another embodiment of the present invention, this example is for to sample to electrocardiosignal, acquisition is by N sampled point, sampled point arranged take the time as order obtained the sampled point sequence, begun the process that data are processed by first sampled point in the sampled point sequence.
As shown in Figure 4, the difference with procedure shown in Figure 1 is:
Step 401 is got front 3 data: V0, V1, the V2 of sampled point sequence;
Step 409 judges whether all data in the sampled point sequence are handled, if also have data not to be marked, and execution instep 410a then, otherwise execution instep 410b;
Step 410a is labeled as M2 with new sampled point adjacent with sampled point V2 in the sampled point sequence, and then execution instep 404;
Step 410b, process finishes, and all points that are not eliminated are desired data.
Step 400 in the present embodiment, step 402 are identical with corresponding steps among the embodiment 1 to step 408.
In the situation that can also consist of without departing from the spirit and scope of the present invention many very embodiment of big difference that have.Should be appreciated that except as defined by the appended claims, the invention is not restricted at the specific embodiment described in the description.