[summary of the invention]
The present invention is based on the characteristics of ecg wave form, a kind of self-adaptive high-efficiency storage method of dynamic electrocardiogram (ECG) data is provided.
Above-mentioned purpose is realized by following technical scheme:
A kind of self-adaptive high-efficiency storage method of dynamic electrocardiogram (ECG) data comprises the steps:
(1) the electrocardiogram (ECG) data fragment of collection certain-length;
(2) said electrocardiogram (ECG) data fragment is carried out the extraction of characteristic point, characteristic point comprises main ripple maximum point [P in each cardiac cycle QRS wave group at least
R(i), V
R(i)], P
R(i) be the position, V
R(i) be corresponding voltage magnitude; Defining each cardiac cycle data length is K second, and data length K gets 0.60S, and with main ripple maximum point P in the QRS wave group
R(i) be benchmark, P
R(i) distribute 0.20S, P before
R(i) distribute 0.40S afterwards; With each main ripple maximum point is benchmark, according to the cardiac cycle data length of definition the electrocardiogram (ECG) data fragment is divided;
The electrocardiogram (ECG) data of a certain cardiac cycle after (3) selection is divided is preserved the total data and the template code name of this first template as first template, and stores the whole electrocardiogram (ECG) datas before first template;
(4) judge pre-stored cardiac cycle main ripple maximum point and its formerly the interval of the main ripple maximum point of cardiac cycle whether less than K second; Be then to carry out (a), otherwise carry out (b): (a) remove and its lap of cardiac cycle other data of preserving the pre-stored cardiac cycle formerly; (b) before the storage pre-stored cardiac cycle, its data behind the cardiac cycle formerly; And the data of pre-stored cardiac cycle and immediate template are carried out characteristic point coincide and judge; If characteristic point is coincide then is stored the corresponding template code name; If misfit then the data of this pre-stored cardiac cycle are established as new template, and give new template code name;
(5) repeating step (4);
It is characterized in that: said characteristic point also comprises each cardiac cycle: P ripple maximum point [P
P(i), V
P(i)], T ripple maximum point [P
T(i), V
T(i)], QRS wave group minimum point [P
D(i), V
D(i)].
The method for distilling of said characteristic point is specially: 1. obtain main ripple maximum point in i the cardiac cycle QRS wave group, the position is designated as P
R(i), corresponding voltage magnitude is designated as V
R(i), 2. at main ripple maximum point P
R(i) 0.07S seeks the voltage magnitude maximum of points in the 0.20S scope of data before, and the position is designated as P
P(i), corresponding voltage magnitude is designated as V
P(i), 3. at main ripple maximum point P
R(i) 0.07S seeks the voltage magnitude maximum of points in the 0.40S scope of data afterwards, and the position is designated as P
T(i), corresponding voltage magnitude is designated as V
T(i), 4. at P
P(i) and P
T(i) in the scope of data, seek the amplitude minimum point between, the position is designated as P
D(i), corresponding voltage magnitude is designated as V
D(i).
Said data and immediate template with the pre-stored cardiac cycle carried out the method that characteristic point is coincide and judged; Be specially: at first; Main ripple maximum point with pre-stored cardiac cycle data and immediate template is a benchmark; Judge whether further feature point position coincide, and is then to judge preliminary coincideing, otherwise judgement is misfitted with template; After tentatively coincideing with template, judge whether the corresponding amplitude of four characteristic points is consistent relatively with template characteristic point amplitude,, judge that then this periodic waveform aroused in interest and template are identical as if unanimity; If inconsistent, then judge and misfit with template.
Template is corrected four characteristic point amplitudes of cardiac cycle before coincideing and judging, correcting process is following:
(1) asks for the first template QRS wave group master ripple maximum point 0.10S meansigma methods of eight data amplitudes before, and ask for the first template QRS wave group master ripple maximum point 0.10S meansigma methods of eight data amplitudes afterwards, ask both meansigma methods mean again;
(2) ask for each cardiac cycle P
R(i) meansigma methods of adjacent eight data amplitudes before the 0.10S, and ask for each cardiac cycle P
R(i) meansigma methods of adjacent eight data amplitudes after the 0.10S; Ask both meansigma methods mean (i) again; As drift value, deduct the amplitude that the corresponding drift value of this cardiac cycle is the characteristic point after the rectification with the difference of mean (i) and mean with the amplitude of four characteristic points of each cardiac cycle.
Judge whether the characteristic point of pre-stored cardiac cycle coincide with the characteristic point of template, and concrete judge process is following:
(1) judge in the pre-stored cardiac cycle that whether the absolute value of the difference of corresponding characteristic point position is all less than corresponding specific threshold value, promptly in other characteristic point positions except that main ripple maximum point and template | (P
P(i)-P
P(template))-(P
R(i)-P
R(template)) |<th1, | (P
T(i)-P
T(template))-(P
R(i)-P
R(template)) |<th2, and | (P
D(i)-P
D(template))-(P
R(i)-P
R(template)) |<th3, wherein, th1, th2, the threshold value of th3 for judging are to judge that then this cardiac cycle and template are tentatively identical, otherwise judge that this cardiac cycle and template misfit;
(2) after judgement tentatively coincide with template, judge | (V
P(i)-V
P(template)) | * a+| (V
T(i)-V
T(template)) | * b+| (V
D(i)-V
D(template)) | * c+| (V
R(i)-V
R(template)) | whether less than certain specific threshold value th4, wherein, a, b, c are respectively weight coefficient, are to judge that then this cardiac cycle and template coincide, otherwise judge that this cardiac cycle and template misfit.
The determination methods of the immediate template of said selection is: with V
R(i), V
T(i) and V
D(i) with value as a reference, three amplitudes of this of which template and with these three amplitudes and approaching of pre-stored cardiac cycle, then choose this template as immediate template.
Beneficial effect of the present invention is: it can be according to heart rate and the adaptive selection data storage method of ecg wave form characteristic information, thereby a kind of electrocardiogram (ECG) data storage scheme on electrocardio master ripple fetched basis is provided.Particularly; When heart rate is big (interval of the main ripple maximum point of pre-stored cardiac cycle and the main ripple maximum point of cardiac cycle formerly is less than the cardiac cycle data length of definition); The forward and backward ecg wave form of dividing may overlap; Destroy the repeatability of ecg wave form,, select all storage data for the waveform before the better recovering and storing; When the main ripple maximum point of pre-stored cardiac cycle when formerly the interval of the main ripple maximum point of cardiac cycle is not less than the cardiac cycle data length of definition; Set up template corresponding according to the ecg wave form situation; When storing, identical waveform replaces with the template code name; The memory space of the data that significantly reduced has like this improved the storage efficiency of data, and has kept good waveform credibility.Method provided by the invention also is convenient to operation, and the compression artefacts rate is lower.
[specific embodiment]
Be elaborated below in conjunction with the most preferred embodiment of accompanying drawing to self-adaptive high-efficiency storage method of dynamic electrocardiogram (ECG) data.
Referring to Fig. 1, at first gather the electrocardiogram (ECG) data fragment of the length-specific that comprises some cardiac cycles, if there is the baseline drift influence, then to carry out the Digital High Pass Filter that cut-off frequency is 0.05Hz, the influence of filtering baseline drift to the electrocardiogram (ECG) data fragment.Certainly, if do not have baseline drift or eliminated baseline drift through hardware, then this step can be omitted.Divide the electrocardiogram (ECG) data fragment according to cardiac cycle, according to empirical value, each cardiac cycle definition of data length is 0.60s, and with main ripple maximum point P in each QRS wave group
R(i) be benchmark, P
R(i) distribute 0.20S, P before
R(i) distribute 0.40S afterwards.
Referring to Fig. 2, next each cardiac cycle is carried out the extraction of characteristic point respectively, be example with i cardiac cycle, concrete grammar is: 1. extract main ripple maximum point in i the cardiac cycle QRS wave group, the position is designated as P
R(i), corresponding voltage magnitude is designated as V
R(i), 2. at main ripple maximum point P
R(i) 0.07S (in 0.13S) in the 0.20S scope of data seeks the voltage magnitude maximum of points before, and the position is designated as P
P(i), corresponding voltage magnitude is designated as V
P(i), 3. at main ripple maximum point P
R(i) 0.07S (in 0.33S) in the 0.40S scope of data seeks the voltage magnitude maximum of points afterwards, and the position is designated as P
T(i), corresponding voltage magnitude is designated as V
T(i), 4. at P
P(i) and P
T(i) in the scope of data, seek the amplitude minimum point between, the position is designated as P
D(i), corresponding voltage magnitude is designated as V
D(i), the characteristic point of extraction is as shown in Figure 3.By on can know that the characteristic point of each cardiac cycle comprises main ripple maximum point [P in the QRS wave group
R(i), V
R(i)], P ripple maximum point [P
P(i), V
P(i)], T ripple maximum point [P
T(i), V
T(i)], QRS wave group minimum point [P
D(i), V
D(i)].
In conjunction with shown in Figure 1, preserve the 2nd QRS wave group master ripple maximum point P
R(2) electrocardiogram (ECG) data (second cardiac cycle promptly dividing) of 0.4s was as first template after 0.2s arrived before the position; Preserve the total data and the template code name of this first template; It includes the electrocardio amplitude data of four characteristic point corresponding position information and amplitude information and 0.60S, uses the template electrocardiogram (ECG) data of this 0.60S to carry out the identical judgement of template (hereinafter detailed description) as sliding window.Selecting second cardiac cycle mainly is the electrocardiogram (ECG) data potentially unstable of first cardiac cycle as the reason of template, and the cardiac cycle that can certainly select other is as first template.In addition, also store first template whole electrocardiogram (ECG) datas before.
The electrocardiogram (ECG) data of each cardiac cycle will be explained as follows in conjunction with Fig. 4 and Fig. 1 according to heart rate and the adaptive selection data storage method of ecg wave form characteristic information after first template:
At first, judge the main ripple maximum point P in the 3rd cycle aroused in interest
R(3) with the main ripple maximum point P of second cardiac cycle
RWhether interval (2) is less than 0.60 second; If less than 0.60 second (being that current heart rate is greater than 100 times); Explanation overlaps according to the front and back ecg wave form of dividing, and destroys the repeatability of ecg wave form, does not carry out the judgement that template is coincide this moment; For the waveform before the better recovering and storing, remove other data with the 3rd cycle aroused in interest of eclipsed part for storage of second cardiac cycle.If the main ripple maximum point P in the 3rd cycle aroused in interest
R(3) with main ripple maximum point P in the second moving cycle
R(2) interval is not less than 0.60 second (be heart rate less than 100 situation under), then carries out template and coincide and judge: first template is moved P backward
R(3)-P
R(2) individual data length; Promptly the main ripple maximum point with the 3rd cycle aroused in interest and first template is a benchmark; Whether the waveform of being judged for the 3rd cycle aroused in interest by the contrast of four characteristic points coincide with first template, if characteristic point is identical then store the first template code name, store second cardiac cycle after, the data before the 3rd cycle aroused in interest; If misfit then the data in the 3rd cycle aroused in interest be established as second template; By that analogy, carry out the judgement and the storage of next cardiac cycle data, and accomplish the storage of whole data slot according to this process.
If had two during with cope match-plate pattern, the judgement of pre-stored cardiac cycle and storing process select immediate with it template to carry out.Under the situation that a plurality of electrocardio templates are arranged, according to the main wave amplitude V of pre-stored cardiac cycle
R, V
TAnd V
DCarry out the match selection of template, for example with V
R, V
TAnd V
DWith value as a reference, three amplitudes of this of which template and with these three amplitudes and approaching of pre-stored cardiac cycle, then choose this template as immediate template, carry out the judgement that whether coincide according to the template of coupling.
With the 3rd cycle aroused in interest and first template be example, explain based on characteristic point and judge the concrete grammar whether cardiac cycle data and the immediate template of pre-stored coincide:
At first, correct four characteristic point amplitudes in the 3rd cycle aroused in interest, reduce the influence that baseline drift brings waveform.If do not have baseline drift influence then this step can be omitted.
Secondly, first template is moved P backward
R(3)-P
R(2) individual data length, promptly the main ripple maximum point with the 3rd cycle aroused in interest and first template is a benchmark, judges that whether further feature point position coincide, if coincide then judge that the 3rd cycle aroused in interest and first template are tentatively identical, carries out next step judgement; If misfit, judge that then the 3rd cycle aroused in interest and first template misfit.
Then, if after the 3rd cycle aroused in interest and first template are tentatively coincide, and then whether the amplitude of back four characteristic points correspondence of judgement rectification is consistent relatively with the first template characteristic point amplitude, if consistent, judges that then the 3rd periodic waveform aroused in interest and first template are identical; If inconsistent, judge that then the 3rd periodic waveform aroused in interest and first template misfit.
In the said method, following to four characteristic point amplitudes of heart cycle waveform correcting process:
(1) asks for the position P of QRS wave group master ripple in first template
R(2) meansigma methods of eight data amplitudes before the 0.10S, and ask for the position P of QRS wave group master ripple
R(2) meansigma methods of eight data amplitudes after the 0.10S is asked both meansigma methods mean again.
(2) ask for each cardiac cycle P
R(i) meansigma methods of adjacent eight data amplitudes before the 0.10S, and ask for the position P of QRS wave group master ripple
R(i) meansigma methods of adjacent eight data amplitudes after the 0.10S; Ask both meansigma methods mean (i) again; As drift value, deduct the amplitude that the corresponding drift value of this cardiac cycle is the characteristic point after the rectification with the difference of mean (i) and mean with the amplitude of four characteristic points of each cardiac cycle.
What be worth explanation is; Judge in the said method whether the characteristic point of pre-stored cardiac cycle coincide with the characteristic point of template; The characteristic point of position and amplitude and template that is not meant pre-stored cardiac cycle characteristic point is identical; And the difference that is meant the characteristic point of pre-stored cardiac cycle characteristic point position and amplitude and template promptly thinks identical less than setting, and concrete judge process is following:
(1) be example with first template, the absolute value of judging in the pre-stored cardiac cycle difference of corresponding characteristic point position in four characteristic point positions and first template is all less than corresponding specific threshold value, then judge and template tentatively identical.If | (P
P(i)-P
P(2))-(P
R(i)-P
R(2)) |<th1, | (P
T(i)-P
T(2))-(P
R(i)-P
R(2)) |<th2, and | (P
D(i)-P
D(2))-(P
R(i)-P
R(2)) |<th3, wherein, th1, th2, the th3 threshold value for judging, the error condition in the time of should be according to sampling are got one and are a bit larger tham zero value, get 0.004S like th1, and th2 gets 0.004S, and th3 gets 0.006S, judges that then this cardiac cycle and first template are tentatively identical.
(2) after judgement tentatively coincide with template, judge | (V
P(i)-V
D(2)) | * a+| (V
T(i)-V
T(2)) | * b+| (V
D(i)-V
D(2)) | * c+| (V
R(i)-V
R(2)) | whether (wherein, a, b, c are respectively weight coefficient, and the value of a, b, c can perhaps require to confirm flexibly according to physiological feature, the empirical value of acquisition target targetedly, in view of V less than certain specific threshold value th4
TWith V
PAmplitude is relatively large, because of factors such as sampling unavoidably can cause the existence of adjacent two cardiac cycle eigenvalue differences, thus it is provided with corresponding lower weight coefficient, so that coincide judgement objectively.For example present embodiment is rule of thumb confirmed as a=1.5 with it, and b=1 c=1.5), is to judge that then this cardiac cycle and template coincide, otherwise judges that this cardiac cycle and template misfit.
Whether coincide when judging in heart cycle waveform and template, when gathering or some other objective factor, adjacent two main wave amplitudes can be variant, and at P
P(i) and P
T(i) minimum amplitude point position also can some difference between, so coincideing when judging, reduce its weight coefficient relatively, so that it more tallies with the actual situation, improves the reliability of storage.