An electrocardiogram artifact analysis method based on the optimal score strategy

Through the electrocardiogram artifact analysis method based on the optimal scoring strategy, the artifact caused by poor electrode contact and motion interference is automatically identified, and the problem of low identification efficiency in the prior art is solved, and efficient and accurate artifact identification is achieved.

CN114847962BActive Publication Date: 2025-07-04BIOX INSTR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210394246.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-15
Publication Date
2025-07-04
Estimated Expiration
2042-04-15

AI Technical Summary

Technical Problem

The prior art cannot automatically identify the ECG artifacts of short duration caused by poor electrode contact, muscle tremor, and motor interference introduced during activities, resulting in large workload and low efficiency of technicians.

Method used

The electrocardiogram artifact analysis method based on the optimal scoring strategy is adopted. By identifying feature inflection points, building feature points sets, and evaluating feature combinations using score functions to automatically identify artifacts.

Benefits of technology

It improves the accuracy and efficiency of identification of time-lapse and short artifacts, reduces the need for manual identification, and greatly improves the work efficiency of technicians.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114847962B_ABST
    Figure CN114847962B_ABST
Patent Text Reader

Abstract

The present invention provides an electrocardiogram artifact analysis method based on an optimal scoring strategy, which can automatically identify short-duration electrocardiogram artifacts caused by poor electrode contact, muscle tremors, and motion interference introduced during activity, greatly improving the work efficiency of technicians. In the technical solution of the present invention, characteristic inflection points are found in the heartbeat samples to be analyzed, and among all the characteristic inflection points, the characteristic inflection points with the characteristics of Q point, S point, T start point, and T end point are found, and the characteristic inflection points that do not conform to the QST combined position characteristics are deleted. Then, all combinations of characteristic inflection points that strictly conform to the characteristics between the Q point and the S point, between the S point and the T point, and between the T start point and the T end point are found. Finally, based on characteristic parameters such as the number of sharp notches of each combination, a scoring function is used for scoring to find electrocardiogram wave artifacts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical artificial intelligence, and specifically to an electrocardiogram artifact analysis method based on an optimal scoring strategy. Background Art

[0002] Electrocardiogram artifacts refer to electrocardiogram changes caused by non-cardiac excitations. During the acquisition of ambulatory electrocardiogram data, the detector is in a constantly changing daily life. Due to reasons such as baseline drift, power frequency interference, poor electrode contact, muscle tremors, and motion interference introduced during activities, a large number of artifact data are likely to appear in the electrocardiogram data. For artifacts caused by baseline drift and power frequency interference, since these artifacts have a relatively long duration and can exhibit certain statistical laws, through traditional digital signal filtering preprocessing and feature analysis algorithms, these artifact time periods can be well eliminated or marked. However, for artifacts with short durations such as poor electrode contact, muscle tremors, and motion interference introduced during activities, their impact on electrocardiogram changes may be limited to one cardiac cycle. The existing technology has great inaccuracies in identifying QRST feature artifacts by searching point by point for slope mutations or waveform flatness on the detected heart beats. Therefore, most of these artifacts remain at the level of manual identification, which greatly increases the workload of technicians and reduces work efficiency. Summary of the Invention

[0003] In order to solve the problem that the existing technology cannot automatically identify short-duration electrocardiogram artifacts caused by poor electrode contact, muscle tremors, and motion interference introduced during activities, the present invention provides an electrocardiogram artifact analysis method based on an optimal scoring strategy, which can automatically identify short-duration electrocardiogram artifacts caused by poor electrode contact, muscle tremors, and motion interference introduced during activities, greatly improving the work efficiency of technicians.

[0004] The technical solution of the present invention is as follows: An electrocardiogram artifact analysis method based on an optimal scoring strategy, characterized in that it includes the following steps:

[0005] S1: Obtain a heart beat sample to be analyzed;

[0006] Assume that the length of the heart beat sample to be analyzed is T ms and the sampling rate is f Hz;

[0007] S2: Based on the electrocardiogram of the heart beat sample to be analyzed, find the characteristic inflection points of the heart beat sample to be analyzed;

[0008] The characteristic inflection points are sampling points that can represent the electrocardiogram characteristics of the heart beat sample to be analyzed;

[0009] a1: Initialize set A and set B to be empty;

[0010] Put the first sampling point and the last sampling point in the electrocardiogram of the heartbeat sample to be analyzed into set A;

[0011] a2: Find the sampling point with the smallest abscissa in set A and set it as iStart, and the sampling point with the second smallest abscissa as iEnd;

[0012] a3: Connect iStart and iEnd with a straight line L;

[0013] a4: Find all the points on the electrocardiogram of the heartbeat sample to be analyzed that are between iStart and iEnd, and calculate the perpendicular distance of each of these points from the chord line L one by one;

[0014] Let: the sampling point with the maximum distance be maxI, and the distance corresponding to maxI from L be maxD;

[0015] a5; Compare maxD with the preset threshold Dthd;

[0016] If maxD is greater than the threshold Dthd, then put the sampling point maxI into set A;

[0017] Otherwise, remove iStart from set A and put it into set B;

[0018] a6; Confirm the number of sampling points in set A;

[0019] If the number of sampling points in set A is greater than 1, then loop to execute steps a2 - a6;

[0020] Otherwise, put the sampling points in set A into set B, and execute step S3;

[0021] All the sampling points in set B are the characteristic inflection points;

[0022] S3: Among the characteristic inflection points, find the characteristic inflection points with the characteristics of Q point, S point, T start point, and T end point, and put them into the sets piontQ, pointS, pointTon, and pointToff of characteristic inflection points respectively;

[0023] The Q point is the starting point of the QRS wave; the S point is the ending point of the QRS wave; the T start point is the starting point of the T wave; the T end point is the ending point of the T wave;

[0024] S4: In the set of characteristic points, delete the characteristic inflection points that do not have the abscissa relationship of the QST combination, and put the characteristic inflection points that satisfy the abscissa relationship of the QST combination into set C. The specific method is:

[0025] Let x ∈ set piontQ, y ∈ set pointS, z ∈ set pointTon, and w ∈ set pointToff;

[0026] x, y, z, and w are the abscissas of the characteristic inflection points;

[0027] Form all permutations and combinations of (x, y, z, w);

[0028] Delete the combinations in which (x, y, z, w) does not satisfy the relationship w > z >= y > x;

[0029] The remaining combinations of (x, y, z, w) are the characteristic inflection point combinations that satisfy the QST combination characteristics, and all are placed in set C;

[0030] S5: Obtain each combination of (x, y, z, w) in set C and send it to a preset feature analysis function;

[0031] Send the electrocardiogram between the x-point and the y-point and the feature set in each combination including the x-point and the y-point to the feature analysis function, and calculate the feature between the Q-point and the S-point, denoted as: QS_Feature;

[0032] Send the electrocardiogram between the y-point and the z-point and the characteristic inflection point set in each combination including the y-point and the z-point to the feature analysis function, and calculate the feature between the S-point and the T-point, denoted as: ST_Feature;

[0033] Send the electrocardiogram between the z-point and the w-point and the characteristic inflection point set in each combination including the z-point and the w-point to the feature analysis function, and calculate the feature between the T start point and the T end point, denoted as: T_Feature;

[0034] The working process of the feature analysis function includes the following steps:

[0035] b1: Obtain the electrocardiogram to be analyzed and the set of corresponding characteristic inflection points to be analyzed;

[0036] Denote the set of characteristic inflection points to be analyzed as S;

[0037] b2: Draw a straight line LL with the start point and the end point of the electrocardiogram to be analyzed as the two endpoints;

[0038] b3: Set set ZeroPt, and put the characteristic inflection point with the smallest abscissa in set S into set ZeroPt;

[0039] b4: Denote the point with the largest abscissa in set ZeroPt as PtCurrent;

[0040] b5: Arrange the characteristic inflection points to be analyzed in S in ascending order of abscissa;

[0041] b6: Take out each characteristic inflection point to be analyzed in set S one by one in order and make the following calculations:

[0042] Let the characteristic inflection point to be analyzed participating in the calculation be px, and the next characteristic inflection point to be analyzed adjacent to px be pn;

[0043] Calculation 1: The abscissa of px - the abscissa of PtCurrent point > 100ms, and the vertical distance between all points between px and PtCurrent point and LL < 0.1mv;

[0044] Calculation 2: The abscissa of px - the abscissa of PtCurrent point > 100ms, and the difference between the maximum voltage and the minimum voltage of the electrocardiogram between px and PtCurrent point is greater than 0.3mv;

[0045] Calculation 3: The next characteristic inflection point to be analyzed adjacent to px is pn and exists and (the vertical distance between px and LL - 0.1mv) * (the vertical distance between pn and LL - 0.1mv) < 0, or the vertical distance between px and LL < 0.1mv;

[0046] b7: Judge whether there is a characteristic inflection point to be analyzed that satisfies the following conditions:

[0047] The result of Calculation 1 is true, or the results of both Calculation 2 and Calculation 3 are true at the same time;

[0048] If there is, then implement step b8;

[0049] Otherwise, there is no characteristic inflection point to be analyzed in S that satisfies the conditions, and implement step b9;

[0050] b8: Judge whether the next characteristic inflection point to be analyzed adjacent to px is pn;

[0051] If the next characteristic inflection point pn adjacent to px exists, then use a straight line LM to connect px and pn with the characteristic inflection points px and pn as endpoints;

[0052] On the straight line LM, find the point Lx closest to the straight line LL, record the abscissa and ordinate of the point Lx, and put Lx as a characteristic inflection point into set ZeroPt;

[0053] Loop to execute steps b4 - b8 until all points in set S have participated in the calculation, and then execute step b10;

[0054] Otherwise, if the next characteristic inflection point pn adjacent to px does not exist, then put px into set ZeroPt;

[0055] b9: Assume that there are N characteristic inflection points in set ZeroPt;

[0056] Let \(i = 1\);

[0057] On the electrocardiogram of the heartbeat sample to be analyzed, take the part enclosed by the \(i\)-th characteristic inflection point and the \((i + 1)\)-th characteristic inflection point in the set ZeroPt, and denote it as region \(i\);

[0058] Then, the electrocardiogram wave to be analyzed corresponding to the set ZeroPt includes \(N - 1\) regions;

[0059] b10: Calculate the characteristic parameters of region \(i\);

[0060] The characteristic parameters are used to describe the medical characteristics of the waveform of region \(i\), and they include: the number of sharp notches, the rising slope, the falling slope, the maximum amplitude, and the concavity index;

[0061] The number of sharp notches: reflects the bluntness or broad malformation of the waveform;

[0062] The rising slope and the falling slope: are used to reflect whether the characteristics of region \(i\) belong to the T wave, QRS wave, or ST segment of the electrocardiogram;

[0063] The maximum amplitude: is used to distinguish whether region \(i\) has the characteristics of the QRS wave of the electrocardiogram;

[0064] The concavity index: is used to reflect whether the waveform characteristics of sub-region \(i\) have the characteristics of the bluntness and broad malformation degree of the QRS wave;

[0065] b11: \(i = i + 1\), and loop to execute steps b11~b12 until all \(N - 1\) regions in the set ZeroPt have participated in the calculation;

[0066] Execute step b12;

[0067] b12: The set composed of \(N - 1\) groups of characteristic parameters obtained is the characteristic corresponding to the electrocardiogram wave to be analyzed and the set of the characteristic inflection points to be analyzed input to the characteristic analysis function in step a1;

[0068] S6: Calculate the score for each combination of \((x, y, z, w)\) respectively based on the scoring function;

[0069] The scoring function includes: the line segment scoring function of the QS point, the scoring function between the ST points, and the line segment scoring function between the T starting point and the T ending point;

[0070] Send the electrocardiogram wave and the feature set between the \(x\) point and the \(y\) point and QS_Feature into the line segment scoring function of the QS point for calculation:

[0071] Confirm whether the electrocardiogram wave between the \(x\) point and the \(y\) point meets the following scoring conditions:

[0072] The corresponding number of regions > 3, or the length of the corresponding line segment LL is greater than 250 ms, or the voltage difference between point S and point Q is greater than 1 mV;

[0073] If any one of the conditions is met, the score is set to 0;

[0074] Otherwise, the score is greater than 0;

[0075] Send the electrocardiogram between point y and point z, the set of characteristic inflection points, and ST_Feature into the score function between the ST points for calculation:

[0076] Confirm whether the electrocardiogram between point y and point z meets the following score conditions:

[0077] The number of regions is greater than 1, or the length of the corresponding line segment LL is greater than 200 ms, or the number of sharp notches in the region is greater than 1;

[0078] If it meets the conditions, the score is set to 0;

[0079] Otherwise, the score is greater than 0;

[0080] Send the electrocardiogram between point z and point w, the set of characteristic inflection points, and T_Feature into the line segment score function between the starting point T and the ending point T for calculation:

[0081] Confirm whether the electrocardiogram between point z and point w meets the following score conditions:

[0082] The number of regions is greater than 2, or the length of the corresponding line segment LL is greater than 250 ms;

[0083] If it meets the conditions, the score is set to 0;

[0084] Otherwise, the score is greater than 0;

[0085] S7: Confirm that if the sum of all scores of a set of (x, y, z, w) combinations is 0, then the electrocardiogram corresponding to this set of (x, y, z, w) combinations is an artifact.

[0086] It is further characterized in that:

[0087] The method for constructing the piontQ set includes the following steps:

[0088] c1: Search forward from the R-wave position for characteristic inflection points until the line segment between the characteristic inflection point QR and the previous adjacent characteristic inflection point in the QR search direction meets the following conditions:

[0089] The slope is lower than 0.8 mV / 100 ms, and the abscissa of the R-wave position - the abscissa of the QR position < 200 ms,

[0090] Then mark the characteristic inflection point QR as: iRight

[0091] c2: Search for the characteristic inflection point in the direction of the origin with iRight until the line segment between the characteristic inflection point QL and the previous adjacent characteristic inflection point of QL in the search direction satisfies the following conditions:

[0092] The voltage drop between the start and end points is less than 0.3mv, and "R wave position - QL position < 200ms;

[0093] Mark the characteristic inflection point QL as iLeft;

[0094] c3: Put iLeft and iRight, and all the characteristic inflection points between them into a set, which constitutes the set piontQ;

[0095] The construction method of the pointS set includes the following steps:

[0096] d1: Search for the characteristic inflection point backward from the R wave position;

[0097] d2: If the found characteristic inflection point simultaneously satisfies the following conditions:

[0098] The characteristic inflection point is within 200ms behind the R wave, and the absolute value of the slope satisfied by the line segment between the characteristic inflection point and its previous adjacent characteristic inflection point in the search direction is higher than the preset slope threshold;

[0099] Then, put all the characteristic inflection points that meet the above conditions into a set to form the pointS set;

[0100] Among them, the slope represents the voltage change trend between two characteristic inflection points as: how much voltage changes per 100ms;

[0101] The slope threshold is: 0.6;

[0102] The construction method of the pointTon set:

[0103] Put all the characteristic inflection points in the range of 100 - 250ms behind the R wave position into a set to form the pointTon set;

[0104] The construction method of the pointToff set:

[0105] Confirm the size of the time interval INT between the heartbeat sample to be analyzed and its next heartbeat;

[0106] If INT < 500ms, then put all the characteristic inflection points in the range after 200ms behind the R wave position and before the R wave of the next heartbeat into a set to form the pointToff set;

[0107] Otherwise, if INT ≥ 500 ms, all the characteristic inflection points after 200 ms behind the R-wave position are put into a set to form the pointToff set;

[0108] The calculation method of the characteristic parameters includes:

[0109] The calculation method of the sharp notch number includes the following steps:

[0110] e1: Construct a set M and put the following characteristic inflection points into the set M:

[0111] The i-th and (i + 1)-th characteristic inflection points in the set ZeroPt, and all the characteristic inflection points between the i-th and (i + 1)-th characteristic inflection points on the curve corresponding to the set S;

[0112] When putting them into the set M, put them in order according to their abscissas from small to large;

[0113] e2: Initialize the serial number j = 2;

[0114] e3: Confirm the position of the j-th characteristic inflection point in the set M;

[0115] If the j-th characteristic inflection point is the last point in the set M, execute step e5;

[0116] Otherwise, confirm whether the j-th characteristic inflection point satisfies the following conditions simultaneously:

[0117] It is the maximum or minimum point among the left and right two points, and the amplitude change relative to the left point is greater than the preset threshold Athd;

[0118] If it is satisfied, execute e4;

[0119] Otherwise, if it is not satisfied, delete the j-th characteristic inflection point from the set M and execute step e4;

[0120] e4: j = j + 1, loop to execute steps e3 - e4 until all the characteristic inflection points in the set M have participated in the calculation, and then execute step e5;

[0121] e5: Confirm the number of the existing characteristic inflection points in the set M, denoted as m;

[0122] Sharp notch number = m - 2;

[0123] The calculation method of the rising slope is:

[0124] In the set M, calculate the slope of the line connecting the 2nd characteristic inflection point and the 1st characteristic inflection point;

[0125] The calculation method of the falling slope is:

[0126] In the set M, calculate the slope of the line connecting the second-to-last characteristic inflection point and the last characteristic inflection point;

[0127] The calculation method of the highest amplitude is as follows:

[0128] Calculate the highest vertical distance amplitude of all characteristic inflection points in the set M from the chord line LL;

[0129] The calculation method of the concavity and convexity index is as follows:

[0130] Calculate the area enclosed by the electrocardiogram waveform and the chord line LL between the two characteristic inflection points at the head and tail in the set M, denoted as: SZ;

[0131] The length of the straight line L between the first and last points in the set M is denoted as: len;

[0132] Concavity and convexity index = SZ / (len * highest amplitude * 0.5);

[0133] The scoring function further includes:

[0134] Send the electrocardiogram between the x point and the y point, the feature set, and QS_Feature into the line segment scoring function at the QS point for calculation:

[0135] Confirm whether the electrocardiogram between the x point and the y point meets the following scoring conditions:

[0136] Confirm whether the condition is satisfied:

[0137] The QS point drop is greater than 0.5 mv or 50% of the height of the QS main peak;

[0138] If any one of the conditions is met, the score is set to 1;

[0139] Otherwise, the score is set to 2;

[0140] Send the electrocardiogram between the y point and the z point, the set of characteristic inflection points, and ST_Feature into the scoring function between the ST points for calculation:

[0141] Confirm whether the electrocardiogram between the y point and the z point meets the following scoring conditions:

[0142] Confirm whether the S point and the T point are the same point;

[0143] If so, the score is set to 1;

[0144] Otherwise, the score is set to 2;

[0145] The electrocardiogram wave and the set of characteristic inflection points between point z and point w and T_Feature are sent to the line segment scoring function between the starting point T and the ending point T for calculation:

[0146] Confirm whether the electrocardiogram wave between point z and point w meets the following scoring conditions:

[0147] Confirm that the difference between the rising slope and the falling slope in the T-wave region and the QS region of the same group is less than 20%;

[0148] If so, the score is set to 1;

[0149] Otherwise, the score is set to 2;

[0150] The setting method of the threshold Dthd is as follows:

[0151] D = 0.1mv * the sampling gain of the electrocardiogram data of the heartbeat sample to be analyzed;

[0152] The calculation method of the vertical distance includes:

[0153] f1: Take out each characteristic inflection point in the set M one by one, denoted as: inflection point UP;

[0154] f2: Find the position point with the same abscissa as the inflection point UP in the chord line LL, denoted as: position point LI;

[0155] f3: Calculate the voltage difference between the position point LI and the inflection point UP, that is, obtain the vertical distance between the inflection point UP and the chord line LL.

[0156] An electrocardiogram artifact analysis method based on an optimal scoring strategy provided by the present invention finds characteristic inflection points in the heartbeat sample to be analyzed, finds the characteristic inflection points with the characteristics of the Q point, S point, T starting point, and T ending point among all the characteristic inflection points, deletes the characteristic inflection points that do not conform to the QST combination position characteristics, and then finds all the combinations of characteristic inflection points that strictly conform to the characteristics between the Q point and the S point, between the S point and the T point, and between the T starting point and the T ending point. Finally, based on characteristic parameters such as the sharp notch number of each combination, a scoring function is used for scoring to find the electrocardiogram artifact. The technical solution of the present invention can automatically identify the short-duration electrocardiogram artifacts caused by poor electrode contact, muscle tremors, and motion interference introduced during activities, without manual identification, greatly improving the work efficiency and accuracy. Description of the Drawings

[0157] Figure 1 Is an embodiment of the heartbeat sample to be analyzed;

[0158] Figure 2 Is the first embodiment of iStart and iEnd;

[0159] Figure 3 Example two of iStart and iEnd;

[0160] Figure 4 Example of the characteristic inflection point in set B;

[0161] Figure 5 Example of set piontQ;

[0162] Figure 6 Example of set pointS;

[0163] Such as Figure 7 Example of set pointToff;

[0164] Figure 8 Example of the calculation process of sets ZeroPt and PtCurrent: Figure A is an example of set S, Figure B is an example of the initial state of set ZeroPt, and Figure C is an example after the calculation of set ZeroPt;

[0165] Figure 9 Example of the calculation of the sharp notch number;

[0166] Figure 10 Flow schematic diagram of the electrocardiogram artifact analysis method with the optimal scoring strategy of this method. Detailed implementation method

[0167] The present invention includes an electrocardiogram artifact analysis method based on an optimal scoring strategy, which includes the following steps.

[0168] S1: Obtain the heartbeat sample to be analyzed;

[0169] Let the length of the heartbeat sample to be analyzed be T ms, and the sampling rate be f Hz.

[0170] Such as Figure 1 The heartbeat sample to be analyzed in this embodiment is shown as follows. T = 1000 ms, the R wave is located at the central position. Taking a sampling rate of 128 as an example, the sampling abscissa sequence is 0, 1... 128, and the R wave is located at the position of x = 64.

[0171] S2: Based on the electrocardiogram of the heartbeat sample to be analyzed, find the characteristic inflection points of the heartbeat sample to be analyzed;

[0172] The characteristic inflection point is the sampling point that can represent the electrocardiogram characteristics of the heartbeat sample to be analyzed;

[0173] a1: Initialize sets A and B as empty;

[0174] Put the first sampling point and the last sampling point in the electrocardiogram of the heartbeat sample to be analyzed into set A;

[0175] a2: Find the sampling point with the smallest abscissa in set A and set it as iStart, and the sampling point with the second smallest abscissa as iEnd;

[0176] a3: Connect iStart and iEnd with a straight line L;

[0177] a4: Find all the points on the electrocardiogram of the heartbeat sample to be analyzed that are between iStart and iEnd, and calculate the perpendicular distance from each of these points to the chord line L one by one;

[0178] Let: the sampling point with the maximum distance be maxI, and the distance corresponding to maxI from L be maxD;

[0179] a5; Compare maxD with the preset threshold Dthd;

[0180] If maxD is greater than the threshold Dthd, then put the sampling point maxI into set A;

[0181] Otherwise, remove iStart from set A and put it into set B;

[0182] In an electrocardiogram, the P wave is generally between 0.1mv - 0.3mv, while the heights of the QRS wave and the T wave are both greater than that of the P wave. In this embodiment, the method for setting the threshold Dthd is:

[0183] D = 0.1mv * the sampling gain of the electrocardiogram data of the heartbeat sample to be analyzed;

[0184] Among them, the sampling gain refers to the change in the sampling value represented by a 1mv increase in the signal.

[0185] As Figure 2 shown, for the embodiment where the first sampling point and the last sampling point in the electrocardiogram of the heartbeat sample to be analyzed are iStart and iEnd respectively; as Figure 3 shown, for the second embodiment of iStart and iEnd.

[0186] a6; Confirm the number of sampling points in set A;

[0187] If the number of sampling points in set A is greater than 1, then loop and execute steps a2 - a6;

[0188] Otherwise, put the sampling points in set A into set B, and execute step S3;

[0189] All the sampling points in set B are the characteristic inflection points; as Figure 4 shown, the circles on the curve of the heartbeat sample to be analyzed are the finally calculated characteristic inflection points in set B.

[0190] S3: Among the characteristic inflection points, find the characteristic inflection points with the characteristics of point Q, point S, the starting point T, and the ending point T, and put them into the sets of characteristic inflection points piontQ, pointS, pointTon, and pointToff respectively;

[0191] Point Q is the starting point of the QRS wave; point S is the ending point of the QRS wave; the starting point T is the starting point of the T wave; the ending point T is the ending point of the T wave.

[0192] Among them, the construction method of the piontQ set includes the following steps:

[0193] c1: Search for characteristic inflection points forward (in the direction of the origin) from the position of the R wave until the line segment between the characteristic inflection point QR and the previous adjacent characteristic inflection point in the search direction of QR satisfies the following conditions:

[0194] The slope is lower than 0.8 mv / 100 ms, and the abscissa of the R wave position - the abscissa of the QR position < 200 ms,

[0195] Then record the characteristic inflection point QR as: iRight

[0196] c2: Continue to search for characteristic inflection points in the direction of the origin with iRight until the line segment between the characteristic inflection point QL and the previous adjacent characteristic inflection point of QL in the search direction satisfies the following conditions:

[0197] The voltage drop between the start and end points is lower than 0.3 mv, and "the R wave position - the QL position < 200 ms;

[0198] Record the characteristic inflection point QL as iLeft;

[0199] c3: Put iLeft and iRight, and all the characteristic inflection points between them into the set, which constitutes the set piontQ; the set piontQ is composed of the inflection points iLeft and iRight and the characteristic inflection points between them. As Figure 5 shown, it is an embodiment of the piontQ set.

[0200] The construction method of the pointS set includes the following steps:

[0201] d1: Search for characteristic inflection points backward (in the direction away from the origin) from the position of the R wave;

[0202] d2: If the found characteristic inflection point simultaneously satisfies the following conditions:

[0203] The characteristic inflection point is within 200 ms behind the R wave, and the absolute value of the slope of the line segment between the characteristic inflection point and its previous adjacent characteristic inflection point in the search direction is higher than the preset slope threshold;

[0204] Then, all the characteristic inflection points that meet the above conditions are put into a set to form the pointS set.

[0205] Among them, the slope represents how much the voltage changes per 100 ms for the line segment formed by connecting two characteristic inflection points; in this embodiment, the slope threshold is set to: 0.6, and the line segment between two characteristic inflection points represents that the voltage change trend between the two characteristic inflection points changes by 0.6 mv per 100 ms.

[0206] As Figure 6 shown, it is an embodiment of the pointS set.

[0207] Method for constructing the pointTon set:

[0208] Put all the characteristic inflection points in the range of 100 - 250 ms behind the R-wave position into a set to form the pointTon set;

[0209] Method for constructing the pointToff set:

[0210] Confirm the size of the time interval INT between the heartbeat sample to be analyzed and its next heartbeat;

[0211] If INT < 500 ms, then put all the characteristic inflection points in the range after 200 ms behind the R-wave position and before the R-wave of the next heartbeat into a set to form the pointToff set;

[0212] Otherwise, if INT ≥ 500 ms, then put all the characteristic inflection points after 200 ms behind the R-wave position into a set to form the pointToff set; As Figure 7 shown, it is an embodiment of the pointToff set.

[0213] S4: Delete the characteristic inflection points that do not have the QST combination in the set of characteristic points, and put the characteristic inflection points that meet the QST combination characteristics into set C. The specific method is as follows:

[0214] Let x ∈ set piontQ, y ∈ set pointS, z ∈ set pointTon, and w ∈ set pointToff;

[0215] x, y, z, and w are the abscissas of the characteristic inflection points;

[0216] Form all permutations and combinations of (x, y, z, w);

[0217] Delete the combinations in which (x, y, z, w) in the combination does not satisfy the relationship w > z >= y > x;

[0218] The remaining (x, y, z, w) combinations are the characteristic inflection point combinations that meet the QST combination characteristics, and all are put into the set C.

[0219] S5: Obtain each group (x, y, z, w) combination in the set C and send it to a preset feature analysis function.

[0220] Send the electrocardiogram between the x-point and the y-point and the feature set in each combination including the x-point and the y-point to the feature analysis function, and calculate the feature between the Q-point and the S-point, denoted as: QS_Feature.

[0221] Send the electrocardiogram between the y-point and the z-point and the set of characteristic inflection points in each combination including the y-point and the z-point to the feature analysis function, and calculate the feature between the S-point and the T-point, denoted as: ST_Feature.

[0222] Send the electrocardiogram between the z-point and the w-point and the set of characteristic inflection points in each combination including the z-point and the w-point to the feature analysis function, and calculate the feature between the T start point and the T end point, denoted as: T_Feature.

[0223] Part of the region of an electrocardiogram curve is above the baseline and part is below the baseline. The number of regions into which the electrocardiogram is divided by the baseline is the number of rows N, which is of great significance for characterizing the electrocardiogram. For example, a T wave generally can only be completely above or below the baseline. Therefore, in this method, the electrocardiogram to be analyzed is cut into different regions, and then for each region, 5 characteristic parameters within the region need to be further calculated, including the number of sharp notches, concavity and convexity index, rising slope, falling slope, and maximum amplitude, to judge the characteristics of the region.

[0224] The working process of the feature analysis function includes the following steps.

[0225] b1: Obtain the electrocardiogram to be analyzed and the set of corresponding characteristic inflection points to be analyzed.

[0226] Denote the set of characteristic inflection points to be analyzed as S.

[0227] b2: Using the start point and the end point of the electrocardiogram to be analyzed as two endpoints, draw a straight line LL.

[0228] b3: Set the set ZeroPt, and put the characteristic inflection point with the smallest abscissa in the set S into the set ZeroPt.

[0229] b4: Denote the point with the largest abscissa in the set ZeroPt as PtCurrent.

[0230] b5: Arrange the characteristic inflection points to be analyzed in S in ascending order of abscissa.

[0231] b6: Take out each feature inflection point to be analyzed in set S one by one in order and perform the following calculations:

[0232] Let the feature inflection point to be analyzed participating in the calculation be px, and the next feature inflection point to be analyzed adjacent to px be pn;

[0233] Calculation 1: The abscissa of px - the abscissa of PtCurrent point > 100ms, and the vertical distance between all points between px and the PtCurrent point and LL < 0.1mv;

[0234] Calculation 2: The abscissa of px - the abscissa of PtCurrent point > 100ms, and the difference between the maximum voltage and the minimum voltage of the electrocardiogram between px and the PtCurrent point is greater than 0.3mv;

[0235] Calculation 3: The next feature inflection point to be analyzed adjacent to px is pn and exists and (the vertical distance between px and LL - 0.1mv) * (the vertical distance between pn and LL - 0.1mv) < 0, or the vertical distance between px and LL < 0.1mv.

[0236] As Figure 8 shown, it is a calculation example of set ZeroPt and PtCurrent. As Figure 8 shown in A in, the abscissas of the feature inflection points included in set S are respectively: {1, 2, 3, 4, 5}. As Figure 8 shown in B in the figure, put the feature inflection point with the smallest abscissa (abscissa is 1) into set ZeroPt, and at this time PtCurrent = 1. The straight line LL connects the feature inflection points 1 and 5, and take out the inflection points 1, 2, 3, 4, 5 respectively to participate in the judgment of "Calculation 1, Calculation 2, Calculation 3".

[0237] b7: Judge whether there is a feature inflection point to be analyzed that meets the following conditions:

[0238] The result of Calculation 1 is true, or the results of both Calculation 2 and Calculation 3 are true at the same time;

[0239] If there is, then implement step b8;

[0240] Otherwise, there is no feature inflection point to be analyzed in S that meets the conditions, and implement step b9;

[0241] When the inflection point of the feature to be analyzed meets the conditions, it indicates that this point is the end or start of a peak region. A peak region is formed between every two points, and overall, the input waveform data is described as peak regions alternating above and below the baseline, representing that the analyzed waveform appears alternately above and below the baseline. The characteristics of the QRS complex, ST segment, or T wave of an electrocardiogram appearing alternately above and below the baseline are regular, and those that do not meet this rule will be artifacts. For example, in the QR type of QRS complex, a peak (corresponding to the Q wave) appears below the baseline and a peak (corresponding to the R wave) appears above the baseline.

[0242] In this embodiment, px is inflection point 3, PtCurrent is inflection point 1, and the next inflection point of the feature to be analyzed adjacent to px is pn which exists as inflection point 4, and they meet the conditions of calculation 2 and calculation 3;

[0243] Calculation 2: The abscissa of px (inflection point 3) - the abscissa of point PtCurrent (inflection point 1) > 100 ms, and the difference between the maximum voltage and the minimum voltage of the electrocardiogram wave between px (inflection point 3) and point PtCurrent (inflection point 1) is greater than 0.3 mv;

[0244] Calculation 3: The next inflection point of the feature to be analyzed adjacent to px (inflection point 3) is pn (inflection point 4) exists and (the vertical distance between px and LL - 0.1 mv) * (the vertical distance between pn and LL - 0.1 mv) < 0, then use inflection point 3 as px to perform the calculation of step b8.

[0245] b8: Determine whether the next inflection point of the feature to be analyzed adjacent to px is pn exists;

[0246] If the next inflection point of the feature to be analyzed adjacent to px is pn exists, then use the feature inflection points px and pn as endpoints, connect the two points px and pn with a straight line LM; on the straight line LM, find the point Lx that is closest to the straight line LL, record the abscissa and ordinate of point Lx, and put Lx as the feature inflection point into the set ZeroPt;

[0247] Loop to execute steps b4 - b8 until all the points in the set S have participated in the calculation, then execute step b10;

[0248] Otherwise, if the next inflection point of the feature to be analyzed adjacent to px is pn exists, then put px into the set ZeroPt.

[0249] As Figure 8 shown in Figure C of

[0250] b9: Assume that the set ZeroPt includes N characteristic inflection points;

[0251] Let i = 1;

[0252] On the electrocardiogram of the heartbeat sample to be analyzed, take the part enclosed by the i-th and (i + 1)-th characteristic inflection points in the set ZeroPt, and denote it as region i;

[0253] Then, the electrocardiogram wave to be analyzed corresponding to the set ZeroPt includes N - 1 regions.

[0254] b10: Calculate the characteristic parameters of region i;

[0255] The characteristic parameters are used to describe the medical characteristics of the waveform of region i, and they include: the number of sharp notches, the rising slope, the falling slope, the maximum amplitude, and the concavity-convexity index;

[0256] In this method, the number of sharp notches is used to reflect the bluntness or broad deformity of the waveform; for example, the QRS wave of a sinus heartbeat is thin and narrow without notches, the QRS wave of a ventricular heartbeat will be broad and deformed with notches, and the artifact heartbeat will generate a large number of notches due to random disturbances.

[0257] The rising slope and the falling slope: are used to reflect whether the characteristics of region i belong to the T wave, QRS wave, or ST segment of the electrocardiogram; the rising slope and the falling slope are used to measure whether the region may be the T wave, QRS wave, or ST segment of the electrocardiogram. In the electrocardiogram of the same heartbeat, the falling slope at the end of the QRS wave is larger, generally much higher than that of the T wave. In a section of artifact waveform, high slopes may appear in all regions.

[0258] The maximum amplitude: is used to distinguish whether region i has the characteristics of the QRS wave of the electrocardiogram. The height of the QRS wave is generally at least 0.5 mv.

[0259] The concavity-convexity index: is used to reflect whether the waveform characteristics of sub-region i have the characteristics of the bluntness and broad deformity degree of the QRS wave. In this method, the concavity-convexity index is used to describe whether the rising or falling part of this region is a straight line or a broken line that bends in a certain direction (corresponding to concave and convex respectively). The concavity-convexity can be used to reflect the bluntness and broad deformity degree of the QRS wave. At the same time, the artifact will be manifested as a severely concave broken line, and the sinus QRS wave does not show obvious concavity-convexity.

[0260] In this method, the medical characteristics of the waveform of region i are described based on the characteristic parameters, ensuring that the results obtained by this method meet the actual requirements in actual work, and thus ensuring the accuracy and reliability of the calculation results.

[0261] b11: i = i + 1, loop and execute steps b11~b12 until N - 1 regions in the set ZeroPt have all participated in the calculation;

[0262] Execute step b12.

[0263] b12: The set composed of N - 1 groups of characteristic parameters obtained is the characteristic corresponding to the set of electrocardiogram waves to be analyzed and characteristic inflection points to be analyzed input to the characteristic analysis function in step a1.

[0264] S6: Calculate the score for each combination of each group (x, y, z, w) based on the scoring function.

[0265] The scoring function includes: the line segment scoring function for QS points, the scoring function between ST points, and the line segment scoring function between the starting point and ending point of T.

[0266] Send the electrocardiogram wave and feature set between point x and point y and QS_Feature into the line segment scoring function for QS points for calculation:

[0267] Confirm whether the electrocardiogram wave between point x and point y meets the following scoring conditions:

[0268] The corresponding number of regions > 3, or the length of the corresponding line segment LL is greater than 250 ms, or the voltage difference between point S and point Q is greater than 1 mV;

[0269] If any one of the conditions is met, set the score to 0;

[0270] Otherwise, the score > 0;

[0271] Send the electrocardiogram wave and characteristic inflection point set between point y and point z and ST_Feature into the scoring function between ST points for calculation:

[0272] Confirm whether the electrocardiogram wave between point y and point z meets the following scoring conditions:

[0273] The number of regions is greater than 1, or the length of the corresponding line segment LL is greater than 200 ms, or the number of sharp notches in the region is greater than 1;

[0274] If it meets the conditions, set the score to 0;

[0275] Otherwise, the score > 0;

[0276] Send the electrocardiogram wave and characteristic inflection point set between point z and point w and T_Feature into the line segment scoring function between the starting point and ending point of T for calculation:

[0277] Confirm whether the electrocardiogram wave between point z and point w meets the following scoring conditions:

[0278] The number of regions is greater than 2, or the length of the corresponding line segment LL is greater than 250 ms;

[0279] If the condition is met, the score is set to 0;

[0280] Otherwise, the score is greater than 0.

[0281] Among them, the calculation method of the characteristic parameters includes:

[0282] The calculation method of the sharp notch number includes the following steps:

[0283] e1: Construct a set M and put the following characteristic inflection points into the set M:

[0284] The i-th and (i + 1)-th characteristic inflection points in the set ZeroPt, and all the characteristic inflection points between the i-th and (i + 1)-th characteristic inflection points on the curve corresponding to the set S;

[0285] When putting them into the set M, put them in ascending order according to their abscissas;

[0286] e2: Initialize the serial number j = 2;

[0287] e3: Confirm the position of the j-th characteristic inflection point in the set M;

[0288] If the j-th characteristic inflection point is the last point in the set M, execute step e5;

[0289] Otherwise, confirm whether the j-th characteristic inflection point satisfies the following conditions at the same time:

[0290] It is the maximum or minimum point among the left and right two points, and the amplitude change relative to the left point is greater than the preset threshold Athd; Athd determines how large the local disturbance of the voltage is the notch in the QRS wave. Generally, a disturbance of 0.1 mv is very likely to be caused by interference. In this embodiment, Athd = 0.2 mv;

[0291] If it is satisfied, execute e4;

[0292] Otherwise, if it is not satisfied, delete the j-th characteristic inflection point from the set M and execute step e4;

[0293] e4: j = j + 1, loop and execute steps e3 to e4 until all the characteristic inflection points in the set M have participated in the calculation, and then execute step e5;

[0294] e5: Confirm the number of characteristic inflection points existing in the set M, denoted as m;

[0295] The sharp notch number = m - 2.

[0296] Such as Figure 9As shown, it is an example of calculating the number of sharp notches. In this example, the set S = {1, 2, 3, 4, 5}, and the set ZeroPt = {1, 3.35, 5}. When i = 1, the (i + 1)-th feature is 3.35; on the curve corresponding to the set S, the feature inflection points between 1 and 3.35 are 2 and 3. Then, the set M is {1, 2, 3, 3.35}, where the inflection point 2 does not meet the condition: "being the maximum or minimum point among the two adjacent points on the left and right, and the amplitude change relative to the left point is greater than the preset threshold Athd", so the inflection point 2 is deleted, and finally the set M' = {1, 3, 3.35} is obtained.

[0297] In this example, the number of sharp notches = m - 2 = 3 - 2 = 1.

[0298] The calculation method of the rising slope is as follows:

[0299] In the set M, calculate the slope of the line connecting the second feature inflection point and the first feature inflection point.

[0300] The calculation method of the falling slope is as follows:

[0301] In the set M, calculate the slope of the line connecting the second-to-last feature inflection point and the last feature inflection point.

[0302] The calculation method of the highest amplitude is as follows:

[0303] Calculate the highest vertical distance amplitude between all feature inflection points in the set M and the chord line LL.

[0304] The calculation method of the vertical distance includes:

[0305] f1: Take out each feature inflection point in the set M one by one, denoted as: inflection point UP;

[0306] f2: Find the position point with the same abscissa as the inflection point UP on the chord line LL, denoted as: position point LI;

[0307] f3: Calculate the voltage difference between the position point LI and the inflection point UP, that is, obtain the vertical distance between the inflection point UP and the chord line LL.

[0308] The calculation method of the concavity and convexity index is as follows:

[0309] Calculate the area enclosed by the electrocardiogram waveform and the chord line LL between the two feature inflection points at the head and tail of the set M, denoted as: SZ;

[0310] The length of the straight line L between the two end points of the set M, denoted as: len;

[0311] Convexity index = SZ / (len * maximum amplitude * 0.5). In this method, the convexity index is used to measure the bluntness of the heartbeat curve. Convexity is used to describe whether the rising or falling part of this region is a straight line or a broken line that bends in a certain direction (corresponding to convex and concave respectively). Convexity can be used to reflect the bluntness, broadness, and malformation degree of the QRS wave. At the same time, artifacts will be manifested as severe concave broken lines, and the sinus QRS wave does not show obvious convexity.

[0312] S7: Confirm that if the sum of all scores of a group of (x, y, z, w) combinations exists and is 0, then the electrocardiogram wave corresponding to this group of (x, y, z, w) combinations is an artifact.

[0313] The scoring function in this method further includes the following steps:

[0314] Send the electrocardiogram wave and the feature set between point x and point y and QS_Feature into the line segment scoring function of point QS for calculation:

[0315] Confirm whether the electrocardiogram wave between point x and point y meets the following scoring conditions:

[0316] Confirm whether the condition is satisfied:

[0317] The QS point drop is greater than 0.5 mv or 50% of the QS main peak height;

[0318] If any one of the conditions is satisfied, the score is set to 1;

[0319] Otherwise, the score is set to 2;

[0320] Send the electrocardiogram wave and the feature inflection point set between point y and point z and ST_Feature into the scoring function between ST points for calculation:

[0321] Confirm whether the electrocardiogram wave between point y and point z meets the following scoring conditions:

[0322] Confirm whether point S and point T are the same point;

[0323] If so, the score is set to 1;

[0324] Otherwise, the score is set to 2;

[0325] Send the electrocardiogram wave and the feature inflection point set between point z and point w and T_Feature into the line segment scoring function between the starting point and the ending point of T for calculation:

[0326] Confirm whether the electrocardiogram wave between point z and point w meets the following scoring conditions:

[0327] Confirm that the difference between the rising slope and the falling slope in the T wave region and the QS region of the same group is less than 20%;

[0328] If so, the score is set to 1;

[0329] Otherwise, the score is set to 2.

[0330] In the analysis method of the present invention, not only can artifacts be analyzed and found, but also the Q point / S point, the starting point of the T wave, and the ending point of the T wave of non-artifact heartbeats can be obtained simultaneously. If the score of the heartbeat to be analyzed is greater than 0, it indicates that the heartbeat does not belong to an artifact. The abscissa corresponding to the combination with the maximum score is taken, which is the Q point / S point, the starting point of the T wave, and the ending point of the T wave of the heartbeat. That is, using this method to analyze heartbeat data based on the optimal score strategy can not only determine whether the heartbeat to be analyzed is an artifact, but also if the heartbeat to be analyzed is not an artifact, the most reasonable Q point / S point, the starting point of the T wave, and the ending point of the T wave of the heartbeat can be obtained simultaneously, without having to calculate the features of the non-artifact heartbeats to be analyzed again, greatly saving the calculation time and improving the data analysis efficiency, especially suitable for the analysis application scenario of a large amount of heartbeat data.

[0331] In the electrocardiogram artifact analysis algorithm based on the optimal score strategy provided by the present invention, first, all characteristic inflection points of the heartbeat sample to be analyzed are found, and then the characteristic inflection points with the characteristics of the Q point, S point, T starting point, and T ending point are found to form a set of characteristic points; by judging whether the characteristic inflection points that simultaneously satisfy the abscissa relationship of the QST combination characteristics, the unqualified characteristic points are deleted to obtain the permutation and combination of the characteristic points that satisfy the QST combination abscissa relationship; among the permutation and combinations of the characteristic points that simultaneously satisfy the QST combination characteristics, the characteristics between the Q point and the S point, the characteristics between the S point and the T point, and the characteristics between the T starting point and the T ending point are respectively judged based on the characteristic analysis function, and the permutation and combinations that do not conform to these characteristics are all deleted to obtain the permutation and combination that strictly conforms to the QST combination characteristics; the permutation and combination that completely conforms to the QST combination characteristics is sent to the score function for calculation, and the permutation and combination of the characteristic points with a score of 0 are identified as artifacts. For non-artifact heartbeats, the most reasonable Q point / S point, the starting point of the T wave, and the ending point of the T wave are obtained. The analysis method of the electrocardiogram of the present invention gradually excludes irrelevant characteristic inflection points, gradually narrows the calculation range, accurately simulates the thinking process of medical experts constantly trying to locate the QRST points and verify their medical rationality, and finally diagnoses artifacts. Therefore, it can efficiently identify whether a heartbeat belongs to an artifact sample and locate the key QST characteristic points in an electrocardiogram cycle.

Claims

1. An electrocardiogram artifact analysis method based on an optimal scoring strategy, characterized in that It includes the following steps: S1: Obtain the heartbeat sample to be analyzed; Let the length of the heartbeat sample to be analyzed be T ms and the sampling rate be f Hz; S2: Based on the electrocardiogram of the heartbeat sample to be analyzed, find the characteristic inflection points of the heartbeat sample to be analyzed; The characteristic inflection points are the sampling points that can represent the electrocardiogram characteristics of the heartbeat sample to be analyzed; a1: Initialize sets A and B to be empty; Put the first sampling point and the last sampling point in the electrocardiogram of the heartbeat sample to be analyzed into set A; a2: Find the sampling point with the smallest abscissa in set A and set it as iStart, and the sampling point with the second smallest abscissa as iEnd; a3: Connect iStart and iEnd with a straight line L; a4: Find all the points on the electrocardiogram of the heartbeat sample to be analyzed between iStart and iEnd, and calculate the vertical distance of each of these points from the chord line L one by one; Let: the sampling point with the maximum distance be maxI, and the distance between maxI and L be maxD; a5; Compare maxD with the preset threshold Dthd; If maxD is greater than the threshold Dthd, put the sampling point maxI into set A; Otherwise, remove iStart from set A and put it into set B; a6; Confirm the number of sampling points in set A; If the number of sampling points in set A is greater than 1, loop through steps a2 - a6; Otherwise, put the sampling points in set A into set B and execute step S3; All the sampling points in set B are the characteristic inflection points; S3: Among the characteristic inflection points, find the characteristic inflection points with the characteristics of Q point, S point, T start point, and T end point, and put them into the sets of characteristic inflection points piontQ, pointS, pointTon, and pointToff respectively; The Q point is the starting point of the QRS wave; the S point is the ending point of the QRS wave; the T start point is the starting point of the T wave; the T end point is the ending point of the T wave; S4: Delete the characteristic inflection points that do not have the abscissa relationship of the QST combination in the set of characteristic points, and put the characteristic inflection points that satisfy the abscissa relationship of the QST combination into set C. The specific method is as follows: Let x ∈ set piontQ, y ∈ set pointS, z ∈ set pointTon, and w ∈ set pointToff; x, y, z, w are the abscissas of the characteristic inflection points; Form all permutations and combinations of (x, y, z, w); Delete the combinations in which (x, y, z, w) does not satisfy the relationship w > z >= y > x; The remaining combinations of (x, y, z, w) are the characteristic inflection point combinations that satisfy the QST combination characteristics, and all are put into set C; S5: Obtain each combination of (x, y, z, w) in set C and send it to a preset characteristic analysis function; Send the electrocardiogram wave and the characteristic set between the x point and the y point in each combination including the x point and the y point to the characteristic analysis function, and calculate the characteristics between the Q point and the S point, denoted as: QS_Feature; Send the electrocardiogram and the set of characteristic inflection points between the y - point and the z - point in each combination including the y - point and the z - point into the said feature analysis function, and calculate the feature between the S - point and the T - point, denoted as: ST_Feature; Send the electrocardiogram and the set of characteristic inflection points between the z - point and the w - point in each combination including the z - point and the w - point into the said feature analysis function, and calculate the feature between the T - start point and the T - end point, denoted as: T_Feature; The working process of the said feature analysis function includes the following steps: b1: Obtain the electrocardiogram to be analyzed and the set of corresponding characteristic inflection points to be analyzed; Denote the set of characteristic inflection points to be analyzed as S; b2: Using the start point and the end point of the electrocardiogram to be analyzed as two endpoints, draw a straight line LL; b3: Set the set ZeroPt, and put the characteristic inflection point with the smallest abscissa in the set S into the set ZeroPt; b4: Denote the point with the largest abscissa in the set ZeroPt as PtCurrent; b5: Arrange the characteristic inflection points to be analyzed in S in ascending order of abscissa; b6: Take out each characteristic inflection point in the set S in order one by one and judge them as follows: Let the characteristic inflection point to be analyzed participating in the calculation be px, and the next adjacent characteristic inflection point to be analyzed to px be pn; Calculation 1: The abscissa of px - the abscissa of PtCurrent point > 100ms, and the vertical distance between all points between px and the PtCurrent point and LL < 0.1mv; Calculation 2: The abscissa of px - the abscissa of PtCurrent point > 100ms, and the difference between the maximum voltage and the minimum voltage of the electrocardiogram between px and the PtCurrent point is greater than 0.3mv; Calculation 3: The next adjacent characteristic inflection point to px is pn and (the vertical distance between px and LL - 0.1mv) * (the vertical distance between pn and LL - 0.1mv) < 0, or the vertical distance between px and LL < 0.1mv; b7: Judge whether there exists a characteristic inflection point to be analyzed that satisfies the following conditions: The result of Calculation 1 is true, or the results of both Calculation 2 and Calculation 3 are true at the same time; If it exists, then implement step b8; Otherwise, there is no characteristic inflection point in S that satisfies the condition, and implement step b9; b8: Judge whether the next adjacent characteristic inflection point to px is pn; If the next adjacent characteristic inflection point pn to px exists, then connect px and pn with a straight line LM with the characteristic inflection points px and pn as endpoints; On the straight line LM, find the point Lx closest to the straight line LL, record the abscissa and ordinate of the point Lx, and put Lx as a characteristic inflection point into the set ZeroPt; Loop and execute steps b4 - b8 until all points in the set S have participated in the calculation, and then execute step b10; Otherwise, if the next adjacent characteristic inflection point pn to px does not exist, then put px into the set ZeroPt; b9: Assume that the set ZeroPt includes N characteristic inflection points; Let i = 1; On the electrocardiogram of the heartbeat sample to be analyzed, take the part enclosed between the i-th characteristic inflection point and the (i + 1)-th characteristic inflection point in the set ZeroPt, and denote it as region i; Then, the electrocardiogram wave to be analyzed corresponding to the set ZeroPt includes N - 1 regions; b10: Calculate the characteristic parameters of region i; The characteristic parameters are used to characterize the medical characteristics of the waveform of region i, and include: the number of sharp notches, the rising slope, the falling slope, the highest amplitude, and the concavity-convexity index; The number of sharp notches: reflects the bluntness or broad deformity of the waveform; The rising slope and the falling slope: are used to reflect whether the characteristics of region i belong to the T wave, QRS wave, or ST segment of the electrocardiogram; The highest amplitude: is used to distinguish whether region i has the characteristics of the QRS wave of the electrocardiogram; The concavity-convexity index: is used to reflect whether the waveform characteristics of region i have the characteristics of the bluntness and broad deformity degree of the QRS wave; b11: Let i = i + 1, and loop to execute steps b10 - b11 until all N - 1 regions in the set ZeroPt have participated in the calculation; Execute step b12; b12: The set composed of N - 1 groups of characteristic parameters obtained is the characteristic corresponding to the electrocardiogram wave to be analyzed and the set of characteristic inflection points to be analyzed input to the characteristic analysis function in step b1; S6: Calculate the score for each combination of (x, y, z, w) based on the scoring function; The scoring function includes: the line segment scoring function for the QS point, the scoring function between the ST points, and the line segment scoring function between the T starting point and the T ending point; Send the electrocardiogram wave and the feature set between the x point and the y point and QS_Feature to the line segment scoring function for the QS point for calculation: Confirm whether the electrocardiogram wave between the x point and the y point meets the following scoring conditions: The corresponding number of regions > 3, or the length of the corresponding line segment LL is greater than 250 ms, or the voltage difference between the S point and the Q point is greater than 1 mV; If any one of the conditions is met, the score is set to 0; Otherwise, the score is greater than 0; Send the electrocardiogram wave and the set of characteristic inflection points between the y point and the z point and ST_Feature to the scoring function between the ST points for calculation: Confirm whether the electrocardiogram wave between the y point and the z point meets the following scoring conditions: The number of regions is greater than 1, or the length of the corresponding line segment LL is greater than 200 ms, or the number of sharp notches in the region is greater than 1; If it meets the conditions, the score is set to 0; Otherwise, the score is greater than 0; Send the electrocardiogram wave and the set of characteristic inflection points between the z point and the w point and T_Feature to the line segment scoring function between the T starting point and the T ending point for calculation: Confirm whether the electrocardiogram wave between the z point and the w point meets the following scoring conditions: The number of regions is greater than 2, or the length of the corresponding line segment LL is greater than 250 ms; If it meets the conditions, the score is set to 0; Otherwise, the score is greater than 0; S7: Confirm that if the sum of all scores for a group of (x, y, z, w) combinations is 0, then the electrocardiogram wave corresponding to this group of (x, y, z, w) combinations is an artifact.

2. The electrocardiogram artifact analysis method based on the optimal score strategy according to claim 1, wherein: The construction method of the set piontQ includes the following steps: c1: Search forward from the R-wave position for characteristic inflection points until the line segment between the characteristic inflection point QR and the previous adjacent characteristic inflection point in the QR search direction satisfies the following conditions: The slope is lower than 0.8mv / 100ms, and the abscissa of the R-wave position - the abscissa of the QR position < 200ms, Then record the characteristic inflection point QR as: iRight c2: Continue to search for characteristic inflection points in the direction of the origin with iRight until the line segment between the characteristic inflection point QL and the previous adjacent characteristic inflection point in the search direction of QL satisfies the following conditions: The voltage drop between the start and end points is lower than 0.3mv, and "R-wave position - QL position < 200ms; Record the characteristic inflection point QL as iLeft; c3: Put iLeft and iRight, and all the characteristic inflection points between them into a set, which constitutes the set piontQ.

3. The electrocardiogram artifact analysis method based on the optimal score strategy according to claim 1, characterized in that: The construction method of the set pointS includes the following steps: d1: Search backward for characteristic inflection points from the R-wave position; d2: If characteristic inflection points are found that simultaneously satisfy the following conditions: The characteristic inflection point is within 200ms behind the R-wave, and the absolute value of the slope of the line segment between the characteristic inflection point and its previous adjacent characteristic inflection point in the search direction is higher than the preset slope threshold; Then, put all the characteristic inflection points that meet the above conditions into a set to form the set pointS; Among them, the slope represents the voltage change trend between two characteristic inflection points as: how much voltage changes per 100ms.

4. The electrocardiogram artifact analysis method based on the optimal score strategy according to claim 3, wherein: The slope threshold is: 0.

6.

5. The electrocardiogram artifact analysis method based on the optimal score strategy according to claim 1, characterized in that: The construction method of the set pointTon: Put all the characteristic inflection points in the range of 100 - 250ms behind the R-wave position into a set to form the set pointTon.

6. The electrocardiogram artifact analysis method based on the optimal score strategy according to claim 1, wherein: The construction method of the set pointToff: Confirm the size of the time interval INT between the heart beat sample to be analyzed and its next heart beat; If, INT < 500ms, then put all the characteristic inflection points in the range after 200ms behind the R-wave position and before the R-wave of the next heart beat into a set to form the set pointToff; Otherwise, if INT ≥ 500ms, then put all the characteristic inflection points after 200ms behind the R-wave position into a set to form the set pointToff.

7. The electrocardiogram artifact analysis method based on the optimal scoring strategy according to claim 1, wherein: The calculation method of the characteristic parameters includes: The calculation method of the sharp notch number includes the following steps: e1: Construct a set M and put the following characteristic inflection points into the set M: The i-th and (i + 1)-th characteristic inflection points in the set ZeroPt, and all the characteristic inflection points between the i-th and (i + 1)-th characteristic inflection points on the curve corresponding to the set S; When putting them into the set M, put them in ascending order according to their abscissas; e2: Initialize the serial number j = 2; e3: Confirm the position of the j-th characteristic inflection point in the set M; If the j-th characteristic inflection point is the last point in the set M, execute step e5; Otherwise, confirm whether the j-th characteristic inflection point simultaneously satisfies the following conditions: is the maximum or minimum point among the left and right two points, and the amplitude change relative to the left point is greater than the preset threshold Athd; If satisfied, execute e4; Otherwise, if not satisfied, delete the j-th characteristic inflection point from the set M and execute step e4; e4: j = j + 1, loop and execute steps e3 - e4 until all the characteristic inflection points in the set M have participated in the calculation, then execute step e5; e5: Confirm the number of characteristic inflection points existing in the set M, denoted as m; Sharp notch number = m - 2; The calculation method of the rising slope is as follows: In the set M, calculate the slope of the line connecting the second characteristic inflection point and the first characteristic inflection point; The calculation method of the falling slope is as follows: In the set M, calculate the slope of the line connecting the second-to-last characteristic inflection point and the last characteristic inflection point; The calculation method of the highest amplitude is as follows: Calculate the highest vertical distance amplitude of all the characteristic inflection points in the set M from the chord line LL; The calculation method of the concavity and convexity index is as follows: Calculate the area enclosed by the electrocardiogram waveform and the chord line LL between the two characteristic inflection points at the head and tail in the set M, denoted as: SZ; The length of the line LL between the two end points of the set M is denoted as: len; Concavity and convexity index = SZ / (len * highest amplitude * 0.5).

8. The electrocardiogram artifact analysis method based on the optimal score strategy according to claim 1, characterized in that: The score function further includes: Send the electrocardiogram between the x point and the y point, the feature set and QS_Feature to the line segment score function of the QS point for calculation: Confirm whether the electrocardiogram between the x point and the y point meets the following score conditions: Confirm whether the condition is satisfied: The QS point drop is greater than 0.5 mv or 50% of the QS main peak height; If any one of the conditions is satisfied, the score is set to 1; Otherwise, the score is set to 2; Send the electrocardiogram between the y point and the z point, the set of characteristic inflection points and ST_Feature to the score function between the ST points for calculation: Confirm whether the electrocardiogram between the y point and the z point meets the following score conditions: Confirm whether the S point and the T point are the same point; If so, the score is set to 1; Otherwise, the score is set to 2; Send the electrocardiogram between the z point and the w point, the set of characteristic inflection points and T_Feature to the line segment score function between the T start point and the T end point for calculation: Confirm whether the electrocardiogram between the z point and the w point meets the following score conditions: Confirm that the difference between the rising slope and the falling slope in the T wave region and the QS region of the same group is less than 20%; If so, the score is set to 1; Otherwise, the score is set to 2.

9. The electrocardiogram artifact analysis method based on the optimal score strategy according to claim 1, wherein: The setting method of the threshold Dthd is as follows: Dthd = 0.1 mv * the sampling gain of the electrocardiogram data of the heartbeat sample to be analyzed.

10. The electrocardiogram artifact analysis method based on the optimal score strategy according to claim 7, wherein: The calculation method of the vertical distance includes: f1: Take out each characteristic inflection point in the set M one by one, denoted as: inflection point UP; f2: Find the position point with the same abscissa as the inflection point UP in the chord line LL, denoted as: position point LI; f3: Calculate the voltage difference between the position point LI and the inflection point UP, that is, obtain the vertical distance between the inflection point UP and the chord line LL.

Citation Information

Patent Citations

  • Method and device for recognizing motion artifacts in dynamic electrocardiogram

    CN111297351A

  • System for analyzing electrocardiogram

    JP1996056914A