Electrocardiogram P wave detection method, analysis device and storage medium

文档序号:928514 发布日期:2021-03-05 浏览:20次 中文

阅读说明:本技术 一种心电图p波检测方法、分析装置以及存储介质 (Electrocardiogram P wave detection method, analysis device and storage medium ) 是由 吴治怡 欧凤 周峰 邱四海 严彬彬 陈德伟 谢胜利 吕俊 吴宗泽 杨其宇 于 2021-01-29 设计创作,主要内容包括:本申请公开了一种心电图P波检测方法、分析装置以及存储介质,其中,该心电图分析方法包括:从心电图中确定满足预设要求的多个心拍;确定多个心拍的平均心拍模板;根据平均心拍模板确定参考P波;根据参考P波确定多个心拍中每一心拍的P波。通过上述方式,能够提高对P波的检测准确性。(The application discloses an electrocardiogram P wave detection method, an electrocardiogram P wave analysis device and a storage medium, wherein the electrocardiogram analysis method comprises the following steps: determining a plurality of heartbeats meeting preset requirements from an electrocardiogram; determining an average heart beat template of a plurality of heart beats; determining a reference P wave according to the average heart beat template; a P-wave for each of a plurality of heartbeats is determined from the reference P-wave. By the mode, the detection accuracy of the P wave can be improved.)

1. A method for detecting P-waves of an electrocardiogram, the method comprising:

determining a plurality of heartbeats meeting preset requirements from an electrocardiogram;

determining an average heart beat template for the plurality of heart beats;

determining a reference P wave according to the average heart beat template;

determining a P-wave for each of the plurality of heartbeats from the reference P-wave.

2. The method of claim 1,

the method for determining a plurality of heartbeats meeting preset requirements from the electrocardiogram comprises the following steps:

a plurality of heartbeats of the same type and having RR interval lengths satisfying a preset interval threshold are determined from the electrocardiogram.

3. The method of claim 2,

the determining a plurality of heartbeats of the same type and with RR interval length satisfying a preset interval threshold from an electrocardiogram comprises:

classifying all heartbeats in the electrocardiogram;

judging whether the candidate RR intervals in each type of heartbeat meet the following conditions:

RR-T≤RR i ≤RR+T

if yes, determining that the heart beat corresponding to the candidate RR interval is one of a plurality of heart beats meeting a preset interval threshold;

wherein the content of the first and second substances,RRto target the RR interval time length,Tin order to set the length of time,RR i is the candidate RR interval time length.

4. The method of claim 1,

the determining an average heart beat template for the plurality of heart beats includes:

taking a sampling point region between a first number of sampling points before a first R wave corresponding to each heartbeat and a second number of sampling points after a second R wave corresponding to the next heartbeat as an electrocardiogram fragment to obtain a plurality of electrocardiogram fragments;

and performing median operation on the values of a plurality of corresponding sampling points in the plurality of electrocardiogram fragments to obtain the values of the corresponding sampling points in the average heart beat template.

5. The method of claim 1,

before determining a plurality of heartbeats meeting preset requirements from the electrocardiogram, the method comprises the following steps:

collecting electrocardiosignals;

and carrying out high-pass filtering processing on the electrocardiosignal by adopting a Butterworth filter and adopting the following formula:

wherein y represents the filtered output; x represents the input cardiac signal; x [ n-k ]]Input representing the first k times; y [ n-k ]]An output representing the first k times; bkAnd akRespectively corresponding filter coefficients of the Butterworth filter;

performing M-point moving average filtering on the filtered electrocardiosignals by adopting the following formula:

y[n]=(x[n-M/2]+…+x[n-1]+x[n]+x[n+1]+…x[n+M/2])/M

wherein the content of the first and second substances,y[n]representing the filtered output;x[n-M/2]input representing the first M/2 moments;x[n-1]an input representing a previous time instant;x[n]an input representing a current time;x[n+1]an input representing a subsequent time;x[n+M/2]input representing the last M/2 moments;Mrepresenting the number of sampling points corresponding to the sliding window;

generating the electrocardiogram based on the filtered cardiac electrical signals.

6. The method of claim 1,

determining a reference P wave according to the average heart beat template comprises:

determining a T wave end point after a first R wave in the mean beat template and a QRS wave start point before a second R wave in the mean beat template;

determining a reference P wave between said T wave end point and said QRS wave start point.

7. The method of claim 6,

said determining a reference P wave between said T wave end point and said QRS wave start point comprises:

determining the average value of the corresponding absolute values of all sampling points between the T wave terminal point and the QRS wave starting point;

and acquiring the maximum value between the T wave terminal point and the QRS wave starting point, which is greater than the average value, as the peak value of the reference P wave.

8. The method of claim 1,

the determining a P-wave for each of the plurality of heartbeats from the reference P-wave comprises:

determining candidate P waves in each heartbeat according to the position of the reference P wave in the average heartbeat template;

and when the time limit and the amplitude value corresponding to the candidate P wave meet preset conditions, determining the candidate P wave as the P wave corresponding to the heartbeat.

9. An electrocardiogram analysis apparatus comprising a processor and a memory, the memory being arranged to store program data and the processor being arranged to execute the program data to implement the method of any one of claims 1 to 8.

10. A computer-readable storage medium, in which program data are stored which, when being executed by a processor, are adapted to carry out the method according to any one of claims 1-8.

Technical Field

The present application relates to the field of electrocardiogram analysis technology, and in particular, to an electrocardiogram P-wave detection method, an electrocardiogram P-wave analysis device, and a storage medium.

Background

Electrocardiography (ECG) is a technique that uses an electrocardiograph to record from the body surface the pattern of electrical activity changes produced by each cardiac cycle of the heart. With the pursuit of health and the continuous development of science and technology, the dynamic electrocardiographic examination is increasingly popular as a new technology for continuously recording the electrocardiographic activity of 24 hours or more in the daily life of a patient and assisting a computer to perform analysis processing. Compared with the common electrocardiogram, the dynamic electrocardiogram can continuously record about 10 ten thousand cardiac cycles within 24 hours, so that arrhythmia, myocardial ischemia and the like which are not easy to be found in routine body surface electrocardiogram examination can be found, the detection rate of non-continuous arrhythmia, especially transient arrhythmia and transient myocardial ischemia attack can be improved, and the clinical application range of the electrocardiogram is well expanded.

A typical heart beat mainly comprises a P wave, a QRS wave and a T wave, and a doctor can diagnose diseases according to the change of the waveform of the heart beat of the electrocardiogram. The P wave reflects the depolarization process of the atrium, and in electrocardiogram analysis, parameters such as time limit, amplitude, shape, PR interval, P wave electric axis and the like of the P wave are important judgment bases of arrhythmia analysis. The P-wave is also an important criterion for analyzing whether normal conduction can be achieved between the atria and the ventricles. When the atrioventricular conduction is normal, the P wave is transmitted to the QRS wave after a certain time, and the P wave and the QRS wave are in one-to-one correspondence; when the conduction is abnormal, the time for the P wave to be transmitted is prolonged, even the P wave cannot be transmitted, and the P wave can be transmitted in the electrocardiogram according to the law of the P wave. The accurate positioning of the P wave has important significance for perfecting the automatic diagnosis of the electrocardiogram. The detection accuracy of the P wave in the prior art is low, and more application scenes cannot be met.

Disclosure of Invention

In order to solve the above problems, the present application provides an electrocardiographic P-wave detecting method, an analyzing apparatus, and a storage medium, which can improve the accuracy of detecting P-waves.

The technical scheme adopted by the application is as follows: an electrocardiogram P-wave detection method is provided, which comprises the following steps: determining a plurality of heartbeats meeting preset requirements from an electrocardiogram; determining an average heart beat template of a plurality of heart beats; determining a reference P wave according to the average heart beat template; a P-wave for each of a plurality of heartbeats is determined from the reference P-wave.

Wherein, confirm a plurality of heartbeats that satisfy preset requirement from the heart electrograph, include: a plurality of heartbeats of the same type and having RR interval lengths satisfying a preset interval threshold are determined from the electrocardiogram.

Wherein, a plurality of heartbeats of the same type and RR interval length satisfying a preset interval threshold are determined from the electrocardiogram, and the method comprises the following steps: classifying all heartbeats in the electrocardiogram; judging whether the candidate RR intervals in each type of heart beat meet the following conditions:RR-T≤RR i ≤RR+T(ii) a If yes, determining the heart beat corresponding to the candidate RR interval as one of a plurality of heart beats meeting a preset interval threshold; wherein the content of the first and second substances,RRto target the RR interval time length,Tin order to set the length of time,RR i is the candidate RR interval time length.

Wherein determining an average heart beat template for a plurality of heart beats comprises: taking a sampling point region between a first number of sampling points before a first R wave corresponding to each heartbeat and a second number of sampling points after a second R wave corresponding to the next heartbeat as an electrocardiogram fragment to obtain a plurality of electrocardiogram fragments; and performing median operation on the values of a plurality of corresponding sampling points in the plurality of electrocardiogram fragments to obtain the values of the corresponding sampling points in the average heart beat template.

Wherein, before confirming a plurality of heartbeats meeting the preset requirement from the electrocardiogram, the method comprises the following steps: collecting electrocardiosignals; and carrying out high-pass filtering processing on the electrocardiosignal by adopting a Butterworth filter and adopting the following formula:(ii) a Wherein y represents the filtered output; x represents the input cardiac signal; x [ n-k ]]Input representing the first k times; y [ n-k ]]An output representing the first k times; bkAnd akRespectively corresponding filter coefficients of the Butterworth filter; performing M-point moving average filtering on the filtered electrocardiosignals by adopting the following formula:y[n]=(x[n-M/2]+…+x[n-1]+x[n]+x[n+1]+…x[n+M/2])/M(ii) a Wherein, y [ n ]]Representing the filtered output;x[n-M/2]input representing the first M/2 moments;x[n-1]an input representing a previous time instant; x [ n ]]An input representing a current time; x [ n +1]]An input representing a subsequent time; x [ n + M/2]]Input representing the last M/2 moments; m represents the number of sampling points corresponding to the sliding window; generating the electrocardiogram based on the filtered cardiac electrical signals.

Wherein determining a reference P-wave from the average heart beat template comprises: determining a T wave endpoint after averaging a first R wave in the beat template and a QRS wave onset before averaging a second R wave in the beat template; between the end of the T wave and the start of the QRS wave, a reference P wave is determined.

Wherein, between the T wave terminal point and the QRS wave starting point, determining a reference P wave comprises: determining the average value of the corresponding absolute values of all sampling points between the T wave terminal point and the QRS wave starting point; and acquiring the maximum value between the T wave end point and the QRS wave start point, which is larger than the average value, as the peak value of the reference P wave.

Wherein determining a P-wave for each of a plurality of heartbeats from a reference P-wave comprises: determining candidate P waves in each heartbeat according to the position of the reference P waves in the average heartbeat template; and when the time limit and the amplitude value corresponding to the candidate P wave meet the preset conditions, determining the candidate P wave as the P wave corresponding to the heartbeat.

Another technical scheme adopted by the application is as follows: there is provided an electrocardiogram analysis apparatus comprising a processor and a memory, the memory being arranged to store program data and the processor being arranged to execute the program data to implement a method as described above.

Another technical scheme adopted by the application is as follows: there is provided a computer readable storage medium having stored therein program data for implementing the method as described above when executed by a processor.

The electrocardiogram P wave detection method provided by the application comprises the following steps: determining a plurality of heartbeats meeting preset requirements from an electrocardiogram; determining an average heart beat template of a plurality of heart beats; determining a reference P wave according to the average heart beat template; a P-wave for each of a plurality of heartbeats is determined from the reference P-wave. Through the mode, utilize the mode of seeking average heart beat template on the one hand, can equalize the interference in every heart beat, make the interference that corresponds the heart beat of big interference reduce, when confirming the P ripples of every heart beat, can reduce the influence that the interference in the single heart beat detected to the P ripples, improve the detection accuracy to the P ripples, on the other hand can avoid detecting all sampling points in every heart beat, improves the detection efficiency to the P ripples in every heart beat.

Drawings

FIG. 1 is a schematic flow chart of a first embodiment of a method for detecting P-waves in an electrocardiogram provided by the present application;

FIG. 2 is a schematic diagram of an electrocardiogram fragment of the electrocardiogram provided herein;

FIG. 3 is a schematic flow chart of step 12 provided herein;

FIG. 4 is a schematic flow chart of step 13 provided herein;

FIG. 5 is a schematic flow chart of step 14 provided herein;

FIG. 6 is a flowchart illustrating a second embodiment of the method for detecting P-waves in an electrocardiogram provided by the present application;

FIG. 7 is a schematic diagram of a generation scenario of an average heart beat template provided herein;

FIG. 8 is a schematic diagram of a scenario for generating an average heart beat template provided herein;

FIG. 9 is a schematic diagram of a scenario of generation of a reference P-wave in an average heart beat template provided herein;

FIG. 10 is a schematic diagram of candidate P-waves provided herein;

FIG. 11 is a schematic diagram of an application scenario of the electrocardiogram P-wave detection method provided by the present application;

FIG. 12 is a schematic structural diagram of an embodiment of an electrocardiogram analysis apparatus provided in the present application;

FIG. 13 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

The terms "first", "second", etc. in this application are used to distinguish between different objects and not to describe a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.

Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.

Referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of a method for detecting an electrocardiogram P-wave, which includes:

step 11: a plurality of heartbeats meeting preset requirements are determined from the electrocardiogram.

Referring to fig. 2, an electrocardiogram fragment will be described. As shown in fig. 2, the abscissa of the electrocardiogram represents time, and the ordinate of the electrocardiogram represents detection signal values (e.g., voltage values) (the abscissa and ordinate are not shown in fig. 2). Wherein the electrocardiogram comprises a plurality of electrocardiogram segments, one electrocardiogram segment is shown in fig. 2. Specifically, an electrocardiogram fragment mainly includes the PR interval and the QT interval, and the QT interval includes the QRS interval and the JT interval.

The P-wave is an atrial depolarization wave, representing activation of both the left and right atria. Since the sinoatrial node is located under the right atrial subintium, activation passes first to the right atrium and later to the left atrium. The depolarization in the right atrium is thus also completed slightly earlier than in the left atrium. Clinically for practical purposes, the anterior portion of the P-wave represents the right atrial activation and the posterior portion represents the left atrial activation. The analysis of P wave has important significance for the diagnosis and differential diagnosis of arrhythmia.

Wherein, the P wave parameter includes: at least one of P wave time limit, P wave form, P wave amplitude, P wave occurrence time and whether corresponding QRS waves exist.

The P wave time limit refers to a time period between the starting time and the ending time of the P wave, the P wave amplitude comprises a maximum signal value, a minimum signal value or a difference value between the maximum signal value and the minimum signal value at the P wave end, the P wave generating time represents the P wave starting time, and whether a corresponding QRS wave exists refers to whether an immediately following QRS wave exists on the P wave back surface.

Further, the P-wave form state can be determined according to the P-wave parameters, and the P-wave form state can be classified according to different classification modes, for example, the P-wave can be divided into an upright P-wave, an inverted P-wave, a positive-negative bidirectional P-wave and a negative-positive bidirectional P-wave.

In some embodiments, the heart beats may be classified in the above classification manner.

In some embodiments, the electrocardiosignals are collected by using a mobile electrocardio device, the collected electrocardiosignals are filtered, and step 11 is performed on the filtered electrocardiosignals.

In some embodiments, multiple heartbeats of the same type and RR interval length satisfying a preset interval threshold may be determined from the electrocardiogram.

Specifically, after acquiring the electrocardiosignals, performing heartbeat division on the electrocardiosignals to obtain a plurality of heartbeats, and determining heartbeat types for the plurality of heartbeats. In determining each heartbeat type, a corresponding RR interval length is also acquired for each heartbeat. In an application scenario, an RR interval between an R wave corresponding to each heartbeat and an R wave corresponding to a previous heartbeat may be used as an RR interval of the heartbeat. In another application scenario, an RR interval between the R-wave corresponding to each heartbeat and the R-wave corresponding to the next heartbeat may be used as the RR interval of the heartbeat. A plurality of beats corresponding to each type is determined according to the type corresponding to each beat and the RR interval length.

Step 12: an average heart beat template for a plurality of heart beats is determined.

Referring to fig. 3, step 12 may be the following steps:

step 121: and taking a sampling point region between a first number of sampling points before the first R wave corresponding to each heartbeat and a second number of sampling points after the second R wave corresponding to the next heartbeat as an electrocardiogram fragment to obtain a plurality of electrocardiogram fragments.

And after determining the plurality of heartbeats meeting the preset requirement, processing each of the plurality of heartbeats according to the step 121 again to obtain the corresponding electrocardiogram fragment. It can be understood that the length of the electrocardiographic segment at this time is greater than the corresponding heartbeat length. In this way all waveforms between each heartbeat and the next heartbeat can be acquired.

Step 122: and averaging the plurality of electrocardiogram fragments to obtain an average heart beat template.

In some embodiments, each sampling point corresponds to a coordinate point in the electrocardiographic segment, because the electrocardiographic segment actually comprises a plurality of sampling points of the electrocardiographic signal. The corresponding sampling points in each electrocardiogram fragment can be averaged to obtain a plurality of average sampling points, and the electrocardiogram fragments formed by the average sampling points are used as an average heart beat template.

Step 13: a reference P-wave is determined from the average heart beat template.

In some embodiments, referring to fig. 4, step 13 may specifically be the following step:

step 131: a T wave endpoint is determined after a first R wave in the beat template is averaged, and a QRS wave onset is determined before a second R wave in the beat template is averaged.

In some implementations, in the average heart beat template, the largest peak point occurring after the first R-wave is then determined as the T-wave peak point, and the lowest point occurring the first time after the T-wave peak point is the T-wave end point. For example, after the first R-wave, peak point a, peak point B, peak point C, and peak point D appear successively. And determining the peak point C as a T wave peak point, wherein the lowest point between the peak point C and the peak point D is a T wave terminal point.

And determining the starting point of the QRS wave before the second R wave, wherein the Q point is a trough in the QRS wave, and then determining the nearest peak point before the Q point as the starting point of the QRS wave. For example, point E, point F, point G, and point H appear successively before point Q. And if the point E is smaller than the point F, the point F is smaller than the point G, and the point H is smaller than the point G, the point H is the peak point closest to the point Q, and the point C is determined as the starting point of the QRS wave.

Step 132: between the end of the T wave and the start of the QRS wave, a reference P wave is determined.

In some embodiments, the largest value of all sample points between the end of the T wave and the beginning of the QRS wave is determined to be the reference P wave.

In some embodiments, in case of negative values in the coordinate system established between the T wave end point and the QRS wave start point, the absolute value of each sample point is calculated, and the largest value in the absolute values is used as the peak value of the reference P wave.

Step 14: a P-wave for each of a plurality of heartbeats is determined from the reference P-wave.

In some embodiments, referring to fig. 5, step 14 may specifically be the following step:

step 141: candidate P-waves are determined in each beat based on the position of the reference P-wave in the average beat template.

In this embodiment, the electrocardiographic segment in step 121 may be used as a heartbeat for determining the candidate P-wave at this time.

Because the average heart beat template is obtained based on the electrocardio segments, the position of the reference P wave in the average heart beat template also has a corresponding position on each heart beat, and the sampling point corresponding to the position is taken as the peak value of the candidate P wave of the heart beat.

Step 142: and when the time limit and the amplitude value corresponding to the candidate P wave meet the preset conditions, determining the candidate P wave as the P wave corresponding to the heartbeat.

In some embodiments, the amplitude and the time limit corresponding to the P-wave are obtained according to the peak value of the P-wave, and when the amplitude and the time limit meet preset conditions, the candidate P-wave is determined to be the P-wave of the corresponding heart beat.

Different from the prior art, the method for detecting the electrocardiogram P-wave provided by the embodiment comprises the following steps: determining a plurality of heartbeats meeting preset requirements from an electrocardiogram; determining an average heart beat template of a plurality of heart beats; determining a reference P wave according to the average heart beat template; a P-wave for each of a plurality of heartbeats is determined from the reference P-wave. Through the mode, utilize the mode of seeking average heart beat template on the one hand, can equalize the interference in every heart beat, make the interference that corresponds the heart beat of big interference reduce, when confirming the P ripples of every heart beat, can reduce the influence that the interference in the single heart beat detected to the P ripples, improve the detection accuracy to the P ripples, on the other hand can avoid detecting all sampling points in every heart beat, improves the detection efficiency to the P ripples in every heart beat.

Referring to fig. 6, fig. 6 is a schematic flow chart of a second embodiment of the electrocardiogram analysis method provided by the present application, and the method includes:

step 601: all heartbeats in the electrocardiogram are classified.

In some embodiments, all heartbeats in the electrocardiogram are filtered prior to step 601. For example, in the process of detecting the P wave, in order to suppress other signal components such as baseline interference, QRS wave, T wave, and the like, the preprocessing reduces interference of other signal components to the P wave by performing high-pass and smooth filtering on the electrocardiosignal. In other embodiments, other high-pass, low-pass, and band-pass filters may be used to filter the cardiac electrical signal.

In an application scene, electrocardiosignals are collected, 0.5Hz high-pass filtering processing is carried out on the electrocardiosignals, and low-frequency interference such as a base line is inhibited. The high-pass filter adopts a Butterworth (Butterworth) filter of an order II, and the implementation mode is as follows:

wherein y represents the filtered output; x represents the input cardiac signal; x [ n-k ]]Input representing the first k times; y [ n-k ]]An output representing the first k times; bkAnd akRespectively, the filter coefficients corresponding to the Butterworth filter.

Then, M-point moving average filtering is carried out on the electrocardiosignal, and burr interference in the electrocardiosignal is inhibited to enable the waveform to be smooth. The realization mode is as follows:

y[n]=(x[n-M/2]+…+x[n-1]+x[n]+x[n+1]+…x[n+M/2])/M

wherein y [ n ] represents the filtered output; x [ n-M/2] represents the input of the first M/2 moments; x [ n-1] represents the input at the previous time; x [ n ] represents the input at the current time; x [ n +1] represents the input at the next moment; x [ n + M/2] represents the input of M/2 later moments; m represents the number of samples corresponding to the sliding window.

And generating an electrocardiogram based on the filtered electrocardiosignals, dividing the electrocardiosignals in the electrocardiogram according to heartbeats to obtain a plurality of heartbeats, and classifying all heartbeats. Specifically, the classification may be made according to parameters of each heartbeat.

Step 602: judging whether the candidate RR intervals in each type of heart beat meet the following conditions:

RR-T≤RR i ≤RR+T

wherein the content of the first and second substances,RRis a target RR interval time length, T is a set time length,RR i is the candidate RR interval time length. If yes, go to step 603, and if not, discard the heartbeat corresponding to the candidate RR interval.

It is understood that depending on the classification, multiple heartbeats within each class are determined.

Step 603: and determining the heart beat corresponding to the candidate RR interval as one of a plurality of heart beats meeting the preset interval threshold.

When the candidate RR interval is satisfied, the candidate RR interval is determined to be close to the target RR interval.

Step 604: and taking a sampling point region between a first number of sampling points before the first R wave corresponding to each heartbeat and a second number of sampling points after the second R wave corresponding to the next heartbeat as an electrocardiogram fragment to obtain a plurality of electrocardiogram fragments.

Step 605: and performing median operation on the values of a plurality of corresponding sampling points in the plurality of electrocardiogram fragments to obtain the values of the corresponding sampling points in the average heart beat template.

In some embodiments, referring to FIG. 7, step 604-605 is illustrated:

the fig. 7 includes A, B, C, D and E five ecg segments, wherein A, B, C and D are ecg segments of the same type obtained by the above steps and satisfying the preset interval threshold. Wherein, a = { a1, a2, a3 … …, an }, B = { B1, B2, B3 … …, bn }, C = { C1, C2, C3 … …, cn }, D = { D1, D2, D3 … …, dn }, E is an average heart beat template generated by a, B, C, D correspondingly, E = { E1, E2, E3 … …, en }, wherein E = { E1, E2, E3 … …, en }, and E =iThe calculation method of (c) is as follows:

ei=median(ai,bi,ci,di)。

wherein, mean is a calculation method for taking a median,namely, a toi,bi,ci,diSorting, assigning the intermediate sorted number to ei(ii) a The range of i is 1 to n. E.g. ai=9,bi=10,ci=8,di=9, c after sortingi,ai, di,biAnd thus, if there are even number of electrocardiogram fragments, then calculate aiAnd diAverage value of (d), assigning the average value to ei. When the number of the electrocardio segments is odd, directly taking the middle value and assigning the value to ei. Through the mode, the segments with similar characteristics are aggregated to generate the average heart beat template, and the influence of interference existing in a single heart beat on P wave detection can be effectively reduced. Because the detection only focuses on the average heart beat template, compared with the detection of heart beats one by one, the calculation amount is reduced, and the operation efficiency of the algorithm can be further improved. When the average heart beat template is generated, the mean value is replaced by a median method, when high-tip interference or obvious baseline interference exists in a single segment, the average heart beat template is not influenced, and the probability of P wave false detection is effectively reduced.

Step 606: a T wave endpoint is determined after a first R wave in the beat template is averaged, and a QRS wave onset is determined before a second R wave in the beat template is averaged.

Referring to fig. 8, step 606 is illustrated:

as shown in fig. 8, in the average heart beat template, the maximum peak point appearing after the first R-wave is determined as the T-wave peak point, as shown in fig. 8 as "T-wave", and the lowest point appearing for the first time after the T-wave peak point is the T-wave end point. Before the second R wave, the starting point of the QRS wave is determined, the Q point is a trough in the QRS wave, and then the nearest peak point before the Q point is determined as the starting point of the QRS wave, such as the 'starting point of the QRS wave' shown in fig. 8.

Step 607: and determining the average value of the corresponding absolute values of all sampling points between the T wave end point and the QRS wave start point.

Step 608: and acquiring the maximum value between the T wave end point and the QRS wave start point, which is larger than the average value, as the peak value of the reference P wave.

Referring to fig. 9, the sampling points from the end point of the T wave to the start point of the QRS wave shown in fig. 8 are taken as the range of sampling points for searching the reference P wave. And calculating the average value of the absolute values of all sampling points in the range as a threshold value for searching the P wave peak point. All the sampling points in fig. 9 are traversed, and when the maximum point with the absolute value larger than the threshold is encountered, the maximum point is saved as a reference P-wave (as shown in fig. 9, two reference P-waves appear). The threshold is calculated based on the absolute value, not only the positive P-wave is considered, but also the negative P-wave can be detected. Compared with a method for calculating the threshold based on the maximum value in the traditional method, the average value can effectively avoid the influence of high-peak interference on threshold calculation, so that the probability of P-wave missing detection caused by overhigh threshold is reduced. The end point of the T wave and the start point of the QRS wave are determined, the detection range is further narrowed, the calculation amount is reduced, and meanwhile, the interference of the T wave and the QRS wave on the P wave detection is reduced. Since all the maximum points in the whole search range are detected, the detection of all the P waves in the range is realized.

Step 609: candidate P-waves are determined in each beat based on the position of the reference P-wave in the average beat template.

Step 610: and when the time limit and the amplitude value corresponding to the candidate P wave meet the preset conditions, determining the candidate P wave as the P wave corresponding to the heartbeat.

Referring to FIG. 10, the steps 609-610 are explained:

because the average heart beat template is obtained based on the electrocardio segments, the position of the reference P wave in the average heart beat template also has a corresponding position on each heart beat, and the sampling point corresponding to the position is taken as the peak value of the candidate P wave of the heart beat. And solving the amplitude and the time limit corresponding to the P wave according to the peak value of the P wave, and determining the candidate P wave as the P wave of the corresponding heart beat when the amplitude and the time limit meet preset conditions.

Candidate P-waves in corresponding beats 1, 2, and n may be determined from the reference P-wave in the average beat template in fig. 10.

In some embodiments, the reference P-wave corresponds to a sampling point on the heartbeat that is not the peak point of the P-wave, and the peak point may be determined from sampling points surrounding the sampling point on the heartbeat. If the absolute value of the former sampling point of the first sampling point corresponding to the reference P wave on the heartbeat is larger than the absolute value of the first sampling point, and the absolute value of the latter sampling point is smaller than the absolute value of the first sampling point, the fact that a peak exists on the right side of the first sampling point indicates that the peak point exists on the right side of the first sampling point, and the peak point is determined as the candidate P wave.

For another example, if the absolute value of the previous sampling point of the second sampling point corresponding to the reference P-wave in one heartbeat is smaller than the absolute value of the second sampling point, and the absolute value of the next sampling point is greater than the absolute value of the second sampling point, it indicates that a peak exists on the left side of the second sampling point, and the peak point is determined on the left side of the second sampling point, and is determined as the candidate P-wave.

For another example, if the absolute value of the previous sampling point of the third sampling point corresponding to the first heartbeat of the reference P-wave is smaller than the absolute value of the third sampling point, and the absolute value of the subsequent sampling point is smaller than the absolute value of the third sampling point, it indicates that the third sampling point is a peak value, and the peak value point is determined as the candidate P-wave.

In an application scenario, after a candidate P wave peak point is determined, the amplitude and the time limit of the candidate P wave are calculated, the calculated amplitude and time limit are compared with a threshold, and when the threshold is met, the candidate P wave is determined to be a P wave corresponding to a heartbeat.

Specifically, according to the candidate P wave peak position, two turning points on the corresponding left side and right side are searched, and time limit and amplitude are calculated by utilizing the two turning points and the peak point.

The calculation method is as follows:

time limit = P end - P start

Amplitude = (#)ECG[P peak ]- ECG[P start ]|+ |ECG[P peak ]- ECG[P end ]|)/2

Wherein the content of the first and second substances,P end represents the turning point on the right side of the candidate P-wave peak,P start represents the turning point on the left side of the candidate P-wave peak,ECG [P peak ]representing candidate P-wave peaks in an ECG signalTo a corresponding value;ECG[P start ]representing the corresponding value at the turning point on the left side of the candidate P wave peak in the ECG signal;ECG[P end ]representing the corresponding value at the inflection point to the right of the candidate P-wave peak in the ECG signal.

And after the time limit is calculated, comparing the time limit and the amplitude corresponding to the reference P wave, and when the time limit of the candidate P wave is greater than the time limit of the reference P wave and the amplitude of the candidate P wave is greater than the amplitude of the reference P wave, determining the candidate P wave as the P wave corresponding to the heart beat.

By the mode, P-wave missing detection and false detection caused by improper manual setting of the fixed threshold can be avoided. And (3) calculating the amplitude and time limit corresponding to all candidate P waves in each heartbeat, comparing the amplitude and time limit with those of reference P waves, and reserving the P waves meeting the conditions as a final P wave detection result. By judging the amplitude and time limit of the candidate P waves in each heartbeat, the condition that the P waves exist in the average heartbeat template and partial heartbeats do not have corresponding P waves and are detected by mistake is avoided.

In this embodiment, when the detection is performed in the average heart beat template, the detection range is not limited to a section of range before the R wave, but all sampling points from the end point of the T wave to the start point of the R wave are determined, so that the synchronous detection of all P waves is realized. The method can be conveniently applied to long-time electrocardiosignal P wave positioning with large signal interference, and has good improvement effect on the complete analysis of the electrocardiosignals.

Referring to fig. 11, fig. 11 shows a P-wave detection result of an electrocardiographic signal by using the method of the embodiment of the present application, and it can be seen in the figure that when one P-wave and a plurality of P-waves exist in an RR interval, the method of the embodiment of the present application can effectively and accurately locate a peak point of a P-wave for a single or a plurality of continuously occurring P-waves.

Referring to fig. 12, fig. 12 is a schematic structural diagram of an embodiment of an electrocardiogram analysis apparatus 200 provided in the present application, where the electrocardiogram analysis apparatus 200 includes a processor 201 and a memory 202, the memory 202 is used for storing program data, and the processor 201 is used for executing the program data to implement the following methods:

determining a plurality of heartbeats meeting preset requirements from an electrocardiogram; determining an average heart beat template of a plurality of heart beats; determining a reference P wave according to the average heart beat template; a P-wave for each of a plurality of heartbeats is determined from the reference P-wave.

It is understood that, the processor 201 in this embodiment may also implement any method step in the foregoing embodiments, which is not described herein again.

In addition, it can be understood that the electrocardiogram analyzing apparatus 200 further includes a collector interface (not shown), the collector interface is connected to an external electrocardiogram collector, and the electrocardiogram collector is further connected to the electrodes through a plurality of leads, so as to collect electrocardiogram data when the electrodes are applied to the human body.

In addition, the electrocardiogram analyzing apparatus 200 further includes a display screen (not shown) for displaying the electrocardiogram and the corresponding analysis data. Further, the display screen is a touch display screen and is used for obtaining touch instructions of a user to operate the electrocardiogram and the analysis process of the electrocardiogram.

In one embodiment, the ecg analysis device 200 is a mobile ecg device for performing dynamic ecg examinations, and is becoming popular as a new technique for continuously recording ecg activities of 24 hours or more in a patient's daily life and assisting a computer in analysis processing. Compared with the common electrocardiogram, the dynamic electrocardiogram can continuously record about 10 ten thousand cardiac cycles within 24 hours, so that arrhythmia, myocardial ischemia and the like which are not easy to be found in routine body surface electrocardiogram examination can be found, the detection rate of non-continuous arrhythmia, especially transient arrhythmia and transient myocardial ischemia attack can be improved, and the clinical application range of the electrocardiogram is well expanded.

Referring to fig. 13, fig. 13 is a schematic structural diagram of an embodiment of a computer-readable storage medium 300 provided in the present application, in which program data 301 is stored, and when the program data 301 is executed by a processor, the method is implemented as follows:

determining a plurality of heartbeats meeting preset requirements from an electrocardiogram; determining an average heart beat template of a plurality of heart beats; determining a reference P wave according to the average heart beat template; a P-wave for each of a plurality of heartbeats is determined from the reference P-wave.

It is understood that the computer-readable storage medium 300 in this embodiment may also implement any method in the above-described embodiments, which is not described herein again.

In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made according to the content of the present specification and the accompanying drawings, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:心电图起搏检测方法、心电图分析装置及可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!