Method and system for improving electrocardiosignal detection accuracy
By performing initial detection, differential conversion and standard R-wave differential waveform construction on the ECG signal, screening and dynamic mean calculation, the problem of low detection accuracy of ECG signal under dynamic conditions is solved, and higher detection accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202311386192.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-24
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art electrocardiograms extracted from the body surface under dynamic conditions are restricted by external interference, human body movement and lead wire connection, resulting in waveform noise and electromyography drift, resulting in low accuracy of computer automatic recognition and requires a lot of manual intervention.
By performing initial detection of the electrocardiogram signal, differential conversion, building standard R-wave differential waveforms, screening R-wave segments with low similarity, and calculating their dynamic mean, re-screening to improve detection accuracy.
It improves the accuracy of electrocardiogram signal detection, reduces the workload of manual intervention, improves the detection efficiency, and reaches the level of medical applications.
Smart Images

Figure CN119867778A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrocardiogram monitoring, and in particular to a method and system for improving the accuracy of electrocardiogram signal detection. Background Art
[0002] The ECG waveform extracted from the body surface under dynamic conditions is different from the ECG under static conditions. It is affected by external interference, human body movement, and lead wire connection. The obtained waveform is full of various noises, electromyographic drift, and motion artifacts, which poses a great obstacle to computer automatic recognition.
[0003] Generally speaking, the detection results of long-term dynamic ECG data are not accurate enough to meet the level of medical applications. ECG technicians need to intervene to correct the waveforms misjudged by the computer to avoid subsequent diagnostic errors. Throughout the process, the identification of the QRS complex is the basis for subsequent intervention. The accuracy of QRS complex identification directly affects the efficiency and workload of subsequent technician intervention. Currently, using the MIT ECG database as the measurement standard, the QRS detection accuracy has not reached the thousandth level. The detection accuracy is low, and a large amount of manual judgment is required in the future. Summary of the invention
[0004] In view of the above analysis, the embodiments of the present invention aim to provide a method and system for improving the accuracy of electrocardiogram signal detection, so as to solve the problem of low accuracy of existing detection.
[0005] On the one hand, an embodiment of the present invention provides a method for improving the accuracy of electrocardiogram signal detection, comprising the following steps:
[0006] Performing initial detection on the ECG signal to obtain an initial detection result, in which the R wave position and type are marked; performing differential conversion on the ECG signal to obtain an ECG differential signal;
[0007] Based on the ECG differential signal, a standard R wave differential waveform corresponding to each type of R wave is constructed;
[0008] Screening out R wave segments with low similarity to corresponding standard R wave differential waveforms from ECG differential signals;
[0009] The dynamic mean of the R wave segments with low similarity is calculated, and the R wave segments with low similarity are re-screened based on the dynamic mean to obtain the final detection result of the ECG signal.
[0010] Based on the further improvement of the above method, the R wave segments with low similarity to the corresponding standard R wave differential waveform are screened out from the ECG differential signal, including:
[0011] Perform integral reduction on each type of standard R wave differential waveform to obtain a standard R wave reduction waveform;
[0012] For each type of standard R wave, extract each R wave segment corresponding to the type in the ECG differential signal, perform integral restoration, and use the restored R wave segment as the target R wave;
[0013] Calculate the ratio of the corresponding signal point of each type of standard R wave restoration waveform and each target R wave of the corresponding type to construct a similarity ratio set;
[0014] The similarity between each target R wave and the standard R wave restoration waveform is determined based on the similarity ratio set, and the target R waves with low similarity are screened out.
[0015] Based on the further improvement of the above method, the dynamic mean of the R wave segments with low similarity is calculated, and the R wave segments with low similarity are re-screened based on the dynamic mean to obtain the final detection result of the ECG signal, including:
[0016] Perform data fitting on the similarity ratio set corresponding to each target R wave with low similarity;
[0017] Calculate the dynamic mean corresponding to each sampling point of the target R wave based on the fitting results;
[0018] The similarity of the target R wave is re-judged based on the dynamic mean corresponding to each sampling point of the target R wave.
[0019] Based on the further improvement of the above method, the similarity of the target R wave is re-judged based on the dynamic mean corresponding to each sampling point of the target R wave, including:
[0020] Calculate the average value s′ of the dynamic mean corresponding to each sampling point of the target R wave x ;
[0021] Calculate the dynamic variance based on the dynamic mean corresponding to each sampling point of the target R wave
[0022] If the mean value s x ′ falls within the confidence interval [S iμ -zσ iμ ,S iμ +zσ iμ ], and If the target R wave is smaller than the second threshold, the similarity between the target R wave and the standard R wave restoration waveform is high, otherwise the similarity is low. j Represents the jth element in the similarity ratio set corresponding to the target R wave, y′ j represents the dynamic mean value corresponding to the jth sampling point of the target R wave, num represents the length of the target R wave, S iμ represents the mean of all values in all similarity sets corresponding to the i-th type of standard R wave, σiμ It represents the variance of all values in all similarity sets corresponding to the i-th type of standard R wave, and z represents the confidence scale.
[0023] Based on the further improvement of the above method, the standard R wave differential waveform corresponding to each type of R wave is constructed based on the ECG differential signal, including:
[0024] For each type of R wave, the central differential waveform of the standard R wave corresponding to the type of R wave is obtained according to the differential mean value of the type of R wave in the ECG differential signal;
[0025] A bidirectional sliding window is used to synchronously slide all such R wave segments, and the boundary differential waveform of the standard R wave corresponding to this type of R wave is obtained according to the differential mean value of the R wave in each sliding window;
[0026] The standard vertebral R wave differential waveform corresponding to this type of R wave is obtained according to the central differential waveform and the boundary differential waveform of the standard R wave corresponding to this type of R wave.
[0027] Based on the further improvement of the above method, a bidirectional sliding window is used to synchronously slide all such R wave segments, and the boundary differential waveform of the standard R wave corresponding to this type of R wave is obtained according to the differential mean value of the R wave in the sliding window, including:
[0028] Determine the left initial position corresponding to the left sliding window and the right initial position corresponding to the right sliding window respectively according to the width of the central differential waveform of the standard R wave;
[0029] Using a left sliding window to slide leftward from the left initial position in all such R wave segments, and determining the left boundary differential waveform of the standard R wave corresponding to the such R wave according to the differential mean of the R wave in each left sliding window;
[0030] A right sliding window is used to slide rightward from the right initial position in all such R wave segments, and the right boundary differential waveform of the standard R wave corresponding to this type of R wave is determined according to the differential mean of the R wave in each right sliding window.
[0031] Based on the further improvement of the above method, for each type of R wave, the central differential waveform of the standard R wave corresponding to the type of R wave is obtained according to the differential mean value of the type of R wave in the ECG differential signal, including:
[0032] For each signal point of the central differential waveform of the standard R wave, the differential mean of all sampling points corresponding to the signal point in this type of R wave is calculated as the value of the signal point; and the central differential waveform of the standard R wave is obtained.
[0033] Based on the further improvement of the above method, a left sliding window is used to slide leftward from the left initial position in all such R wave segments, and the left boundary differential waveform of the standard R wave corresponding to the such R wave is determined according to the differential mean of the R wave in each left sliding window, including:
[0034] S2221, taking each left sliding window at the left initial position as the current sliding window; calculating the differential mean of each sampling point in the current sliding window as the value of the corresponding signal point in the left boundary differential waveform of the standard R wave; the mean of each sampling point in the current sliding window constitutes a first set, and the positive and negative signs corresponding to the current sliding window are obtained according to the positive and negative signs of each value in the first set; sliding the current sliding window to the left by the first step length as the current sliding window;
[0035] S2222, calculating the differential mean of each sampling point in the current sliding window as the value of the corresponding signal point in the differential waveform of the left boundary of the standard R wave; the mean of each sampling point in the current sliding window constitutes a first set, and the positive and negative signs corresponding to the current sliding window are obtained according to the positive and negative signs of each value in the first set;
[0036] S2223. If the positive and negative signs corresponding to the current sliding window are different from those corresponding to the previous sliding window, stop sliding the window to obtain the left boundary differential waveform of the standard R wave; otherwise, slide the current sliding window to the left by the first step length as the current sliding window, and return to step S2222.
[0037] Based on the further improvement of the above method, the positive and negative signs corresponding to the current sliding window are obtained according to the positive and negative signs of each value in the first set, including:
[0038] If the ratio of the number of values with positive signs in the first set to the total number of values in the first set exceeds a first threshold, the current sliding window corresponds to a positive sign, otherwise the current sliding window corresponds to a negative sign.
[0039] On the other hand, an embodiment of the present invention provides a system for improving the accuracy of ECG signal detection, comprising the following modules:
[0040] The initial detection module is used to perform initial detection on the ECG signal to obtain an initial detection result, in which the R wave position and type are marked; and to perform differential conversion on the ECG signal to obtain an ECG differential signal;
[0041] A standard R wave construction module is used to construct a standard R wave differential waveform corresponding to each type of R wave based on the ECG differential signal;
[0042] A low-similarity R-wave screening module is used to screen out R-wave segments with low similarity to the corresponding standard R-wave differential waveform from the ECG differential signal;
[0043] The final detection module is used to calculate the dynamic mean of the R wave segments with low similarity, re-screen the R wave segments with low similarity based on the dynamic mean, and obtain the final detection result of the ECG signal.
[0044] The present invention performs initial detection and differential conversion on the electrocardiogram signal first, regards the differential waveform of the electrocardiogram as the myocardial polarization intensity of a specific position of myocardial conduction, thereby eliminating baseline interference, calculates the standard R wave differential waveform segment corresponding to each type according to the converted electrocardiogram signal, screens out R wave segments with low similarity to the standard R wave based on the standard R wave differential waveform, and re-judges them based on the dynamic mean, so as to screen out R waves with low similarity due to interference, reduce the number of R waves with low similarity, improve the accuracy of detection, reduce the workload of manual participation, and improve the detection efficiency.
[0045] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. In the entire drawings, the same reference symbols represent the same components;
[0047] Figure 1 A flow chart of a method for improving the accuracy of electrocardiogram signal detection according to an embodiment of the present invention;
[0048] Figure 2 The present invention is a block diagram of a system for improving the accuracy of electrocardiogram signal detection. DETAILED DESCRIPTION
[0049] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0050] A specific embodiment of the present invention discloses a method for improving the accuracy of ECG signal detection, such as Figure 1 As shown, the following steps are included:
[0051] S1, performing initial detection on the ECG signal to obtain an initial detection result, in which the R wave position and type are marked; performing differential conversion on the ECG signal to obtain an ECG differential signal;
[0052] S2, constructing a standard R wave differential waveform corresponding to each type of R wave based on the ECG differential signal;
[0053] S3, selecting R wave segments with low similarity to corresponding standard R wave differential waveforms from the ECG differential signal;
[0054] S4. Obtain the dynamic mean of the R wave segments with low similarity, and re-screen the R wave segments with low similarity based on the dynamic mean to obtain the final detection result of the ECG signal.
[0055] The present invention performs initial detection and differential conversion on the electrocardiogram signal first, regards the differential waveform of the electrocardiogram as the myocardial polarization intensity of a specific position of myocardial conduction, thereby eliminating baseline interference, calculates the standard R wave differential waveform segment corresponding to each type according to the converted electrocardiogram signal, screens out R wave segments with low similarity to the standard R wave based on the standard R wave differential waveform, and re-judges them based on the dynamic mean, so as to screen out R waves with low similarity due to interference, reduce the number of R waves with low similarity, improve the accuracy of detection, reduce the workload of manual participation, and improve the detection efficiency.
[0056] At present, in the process of QRS complex identification, the main focus is on processing the original ECG waveform, using filtering and variable threshold judgment methods, with the emphasis on strengthening the distinction of the R wave. The most representative one is the Pan&Tomskins algorithm, which uses a digital bandpass filter (5-15Hz), squares after differentiation, and then performs a moving window integration (150ms). The result of this is to highlight the mutation characteristics of the R wave and reduce the false positive probability caused by the tall T wave; the results are then screened and tested by dynamic thresholds to calibrate the R wave position for subsequent waveform clustering and classification.
[0057] During implementation, in step S1, an ECG signal with marked R wave position and type can be obtained through the Pan&Tomskins algorithm. It should be noted that the ECG signal with R wave classification mark marks the center position of the R wave, generally the peak point, and the type of the R wave mark point. The R wave types include: normal (N), supraventricular premature beats (S), and ventricular premature beats (V).
[0058] In order to eliminate noise interference, the acquired ECG signal is differentially converted, and the differential waveform of the ECG is regarded as the myocardial polarization intensity at a specific position of myocardial conduction.
[0059] For example, the original ECG signal is represented by X = {x 0 ,x 1 ,x 2 ,…,x N}. By (x 1 -x 0)×f to calculate the first signal point d after conversion 1 , through (x 2 -x 1 )×f to calculate the second signal point d after conversion 2 , and so on, we get the ECG differential signal D = {d 1 ,d 2 ,…,d N}, where N represents the total number of signal points in the ECG signal segment. Since the first signal point x in the original ECG signal 0 If there is no difference value, it will be deleted, and the original ECG signal is represented as X = {x 1 ,x 2 ,…,x N}. Where f represents the sampling frequency.
[0060] By differentiating the waveform at each point, the dynamic information of all original ECG data is retained, the AC component of the ECG in the low-frequency band is emphasized, the DC component and baseline drift component are weakened, which is conducive to highlighting the ECG characteristics.
[0061] A standard R wave differential waveform corresponding to each type of R wave is constructed based on the ECG differential signal. Specifically, step S2 includes:
[0062] S21. For each type of R wave, obtain a central differential waveform of a standard R wave corresponding to the type of R wave according to a differential mean value of the type of R wave in the electrocardiographic differential signal;
[0063] S22, using a bidirectional sliding window to synchronously slide all such R wave segments, and obtaining a boundary differential waveform of a standard R wave corresponding to such R wave according to the differential mean value of the R wave in each sliding window;
[0064] S23. Obtain a standard vertebral R wave differential waveform corresponding to this type of R wave according to the central differential waveform and the boundary differential waveform of the standard R wave corresponding to this type of R wave.
[0065] The construction of the standard R wave differential waveform includes the construction of the central part waveform and the construction of the boundary waveform.
[0066] For each type of R wave, the central differential waveform of the standard R wave corresponding to the type of R wave is obtained according to the differential mean value of the type of R wave in the ECG differential signal, including:
[0067] S211. For each signal point of the central differential waveform of the standard R wave, calculate the differential mean of all sampling points corresponding to the signal point in this type of R wave as the value of the signal point; and obtain the central differential waveform of the standard R wave.
[0068] Since the original ECG signal X and the ECG differential signal D are of equal length and correspond one to one, the R wave marker in the original signal can find the corresponding position in the ECG differential signal.
[0069] For example, to construct the central differential waveform of the standard R wave, it is necessary to first determine the width of the central differential waveform of the standard R wave. According to the beating law of the heart, the R wave is generally greater than 60ms. If the sampling interval is 1ms during implementation, the central waveform width can be set to 60 sampling intervals, with the R wave peak as the center, and the left and right widths are 30 sampling intervals respectively, that is, there are 30 signal points on the left and right.
[0070] For each signal point of the central differential waveform of the standard R wave, the differential mean of all sampling points corresponding to the signal point in this type of R wave is calculated as the value of the signal point in the standard R wave.
[0071] For example, the first signal point on the left side of the center position of the central differential waveform of the normal standard R wave, extract the differential value corresponding to the first sampling point on the left side of each normal R wave mark point in the ECG differential signal, calculate the average value, and obtain the value of the first limit point on the left side of the center position of the central differential waveform of the standard R wave. Similarly, after constructing the value of each signal point in the central wave differential shape, the central waveform is obtained, which is expressed as S i ={s i-k ,…,s i-1 ,s i1 ,…,s ik}. Among them, s i-1 is the first signal point on the left side of the center position of the central differential waveform of the i-th type of standard R wave, s i1 is the first signal point to the right of the center position of the central differential waveform of the i-th type of standard R wave, and 2k is the width of the central differential waveform.
[0072] After the central differential waveform is constructed, it is necessary to construct the boundary waveform of the standard R wave differential waveform.
[0073] Specifically, a bidirectional sliding window is used to synchronously slide all such R wave segments, and a boundary differential waveform of a standard R wave corresponding to such R wave is obtained according to the differential mean value of the R wave in each sliding window, including:
[0074] S221, determining a left initial position corresponding to the left sliding window and a right initial position corresponding to the right sliding window respectively according to the width of the central differential waveform of the standard R wave;
[0075] S222, using a left sliding window to slide leftward from the left initial position in all such R wave segments, and determining a left boundary differential waveform of a standard R wave corresponding to such R wave according to a differential mean value of the R wave in each left sliding window;
[0076] S223, using a right sliding window to slide rightward from the right initial position in all such R wave segments, and determining the right boundary differential waveform of the standard R wave corresponding to this type of R wave according to the differential mean of the R wave in each right sliding window.
[0077] First, the initial position of the left sliding window is determined based on half the width of the standard R wave center differential waveform. For example, the width of the center waveform is 60 signal points, that is, 30 signal points on the left and right of the peak. The left initial position is the position of the 31st sampling point on the left side of the R mark point, and the right initial position is the position of the 31st sampling point on the right side of the R mark point.
[0078] The process of determining the left boundary differential waveform and the right boundary differential waveform of the standard R wave is the same, the difference lies in the sliding direction, and the following is explained by taking the construction of the left boundary differential waveform as an example.
[0079] When using a sliding window, you must first determine the window size and sliding step size. During implementation, you can determine the size based on computational efficiency and accuracy. For example, if the sliding window size is determined to be 10 sampling intervals, each sliding window corresponds to 10 sampling points of data, and the sliding step size is 1 sampling interval, then one sampling point is slid to the left each time.
[0080] Specifically, in step S222, the left boundary differential waveform of the standard R wave corresponding to the type of R wave is determined in the following manner:
[0081] S2221, taking each left sliding window at the left initial position as the current sliding window; calculating the differential mean of each sampling point in the current sliding window as the value of the signal point corresponding to the left boundary differential waveform of the standard R wave; the mean of each sampling point in the current sliding window constitutes a first set, and the positive and negative signs corresponding to the current sliding window are obtained according to the positive and negative signs of each value in the first set; sliding the current sliding window to the left by the first step length as the current sliding window;
[0082] S2222, calculating the differential mean of each sampling point in the current sliding window as the value of the corresponding signal point in the differential waveform of the left boundary of the standard R wave; the mean of each sampling point in the current sliding window constitutes a first set, and the positive and negative signs corresponding to the current sliding window are obtained according to the positive and negative signs of each value in the first set;
[0083] S2223. If the positive and negative signs corresponding to the current sliding window are different from those corresponding to the previous sliding window, stop sliding the window to obtain the left boundary differential waveform of the standard R wave; otherwise, slide the current sliding window to the left by the first step length as the current sliding window, and return to step S2222.
[0084] For example, the left initial position is the 31st sampling point on the left side of the R wave marker, and the sequence D = {d 1 ,d 2 ,…,d N} at a certain position R dThere is an R wave marker (the R marker point may be between two sampling points or at a certain sampling point), and the type is normal. The first sampling point to the left of the marker point is d i , then the left sliding window is initially positioned at the marked point R d The 31st to 40th sampling points on the left (counting from right to left), the data in the sliding window is d i-30 ~d i-39 .
[0085] Extract the data of the 31st to 40th sampling points on the left side of each normal R wave mark point, and calculate the mean of each sampling point, that is, calculate the mean of the values of the 31st sampling point on the left side of the normal R wave peak as the value of the 31st signal point on the left side of the standard R wave peak, calculate the mean of the values of the 32nd sampling point on the left side of the normal R wave peak as the value of the 32nd signal point on the left side of the standard R wave peak, and so on. These means constitute the first set.
[0086] According to the signs of the means in the first set, the sign corresponding to the current window is determined. If the ratio of the number of values with positive signs in the first set to the total number of values in the first set exceeds the first threshold, the current sliding window corresponds to a positive sign, otherwise the current sliding window corresponds to a negative sign. During implementation, the first threshold can be set to 2 / 3.
[0087] After obtaining the sign of the first sliding window, the current sliding window is slid to the left by the first step length as the current sliding window; at this time, the data covered by the sliding window is the data of the 32nd to 41st sampling points on the left side of the R wave mark point, and the mean of each sampling point is calculated according to the above process as the data of the 32nd to 41st signal points on the left side of the standard R wave peak (at this time, the 32nd to 40th sampling points have been calculated, so only the mean of the 41st sampling point needs to be calculated), and the means of the 32nd to 41st sampling points constitute a new first set, and the sign corresponding to the current window is determined according to the sign of these means in the new first set. If the sign corresponding to the current sliding window is different from the sign corresponding to the previous sliding window, the sliding window is stopped, and the left boundary waveform of the standard R wave is obtained, that is, the value of the 31st to 41st signal points on the left side of the standard R wave is obtained. If the sign corresponding to the current sliding window is the same as the sign corresponding to the previous sliding window, the current sliding window is slid to the left by the first step length as the current sliding window, and the step S2222 is returned.
[0088] The same process is used to obtain the right boundary differential waveform of the standard R wave. It should be noted that at this time, the sliding window starts to slide to the right from the 31st sampling point on the right side of the R wave mark point.
[0089] The center differential waveform, left boundary differential waveform, and right boundary differential waveform of the standard R wave are obtained, that is, the standard R wave differential waveform corresponding to the R wave type is obtained. The constructed standard R wave differential waveform excludes the influence of DC component and baseline drift; only the medium and low frequency AC component is retained, which is the dynamic information of the ECG waveform. It can make detection judgment more accurate.
[0090] After obtaining the standard R wave differential waveform, all ECG R waves of this type are similarly calculated with reference to the standard R wave. Specifically, step S3 selects R wave segments with low similarity to the corresponding standard R wave differential waveform from the ECG differential signal, including:
[0091] S31, performing integral reduction on each type of standard R wave differential waveform to obtain a standard R wave reduction waveform;
[0092] S32, for each type of standard R wave, extract each R wave segment corresponding to the type from the ECG differential signal, perform integral restoration, and use the restored R wave segment as the target R wave;
[0093] S33, calculating the ratio of each type of standard R wave restoration waveform to each target R wave of the corresponding type and the corresponding signal point to construct a similarity ratio set;
[0094] S33. Determine the similarity between each target R wave and the standard R wave restoration waveform based on the similarity ratio set, and screen out target R waves with low similarity.
[0095] Since the standard R wave is obtained based on the differential waveform, it is necessary to restore it, that is, to convert the standard R wave in the form of integration. The standard R wave differential waveform is represented by S i ={s i-m ,…,s i-1 ,s i1 ,…,s in}, where s i-1 is the first signal point on the left side of the center position of the ith type standard R wave differential waveform, s i1 is the first signal point on the right side of the center position of the i-th standard R-wave differential waveform, s i-m is the left boundary signal point of the i-th standard R-wave differential waveform, s in is the right boundary signal point of the i-th standard R wave differential waveform. The total number of signal points in the standard R wave differential waveform is m+n.
[0096] Integral restoration is to use the following formula to calculate the corresponding integral restored value for each signal point in the standard R wave differential waveform:
[0097]
[0098] Among them, srip represents the value of the pth signal point in the i-th standard R-wave restoration waveform, s iq represents the value of the qth sampling point in the i-th standard R-wave differential waveform, r 0 represents the preset baseline value. p∈[1,m+n]. During implementation, r 0 Take a positive value so that each sr ip The standard R wave restoration waveform is expressed as SR i ={sr i-m ,…,sr i-1 ,sr i1 ,...,sr in For the standard R wave of the i-th type, extract each R wave segment corresponding to the type in the ECG differential signal. That is, find an R wave marker of this type, extract its left m sampling points and right n sampling points to form an R wave segment of this type, and use the same method as above to perform integral reduction to obtain the target waveform, which is expressed as {xr i-m ,…,xr i-1 ,xr i1 ,...,xr in}.
[0099] There are two differences between the standard R wave restoration waveform and the target R wave and the usual ECG wave: they are inverted and the difference in the baseline starting point is removed, thus avoiding the influence of baseline drift.
[0100] Construct the corresponding similarity ratio set as Represented as {y 1 ,y 2 ,…,y num}, num represents the number of elements in the similarity ratio set. If there are M i-th type R waves, M similarity ratio sets will be constructed.
[0101] The data set in the ratio set is the shape ratio of the R waveform. The waveform of the R wave is affected by many random factors, including electrophysiology, muscle movement, external electromagnetic interference, and the characteristics of the sampling circuit itself. These random factors create a ratio set that obeys or approximately obeys a normal distribution.
[0102] Therefore, calculate the mean S of all values in the M similarity ratio sets iμ and variance The corresponding confidence interval is expressed as [S iμ -zσ iμ ,S iμ +zσ iμ ], where z represents the confidence scale corresponding to the confidence level, for example, the value corresponding to 94.5% confidence level is 2.
[0103] For each target R wave, according to the mean value S of the values in the corresponding similarity ratio set x and variance Determine its similarity to the standard R wave differential waveform. If S x falls within the confidence interval [S iμ -zσ iμ ,S iμ +zσ iμ ], and If it is smaller than the second threshold, the target R wave and the standard R wave restored waveform have high similarity, otherwise the similarity is low.
[0104] After similarity judgment is performed on each target R wave, the target R waves with low similarity are screened out. The target R waves with low similarity may be caused by the following reasons:
[0105] (1) Misclassification: the R wave is not of that type;
[0106] (2) Myoelectric or drift interference, which are low-frequency interferences, but still within the effective frequency range of the ECG, and are difficult to remove by filtering. The frequency is generally below 1 to 5 Hz;
[0107] (3) Random external interference, usually caused by static electricity or violent movement, enters the effective frequency range of the R wave (approximately around 10 Hz).
[0108] If the target R wave with low similarity is directly marked as a non-R wave, the R wave deformed due to interference may also be marked as a non-R wave, resulting in inaccurate results. In order to improve the accuracy of detection, the dynamic mean can be used to re-screen these interfered R waves and mark the truly classified R waves as misclassified.
[0109] For target R waves with low similarity, it is generally due to interference caused by (2) and (3). Therefore, re-screening can be performed based on the dynamic mean to improve the accuracy of detection.
[0110] Specifically, step S4 calculates the dynamic mean of the R wave segments with low similarity, and re-screens the R wave segments with low similarity based on the dynamic mean to obtain the final detection result of the ECG signal, including:
[0111] S41, performing data fitting on a set of similarity ratios corresponding to each target R wave with low similarity;
[0112] S42, calculating the dynamic mean corresponding to each sampling point of the target R wave based on the fitting result;
[0113] S43. Re-determine the similarity of the target R wave based on the dynamic mean corresponding to each sampling point of the target R wave.
[0114] Specifically, in step S41, firstly, the serial number in the similarity ratio set is used as the independent variable, and the numerical value corresponding to the serial number is used as the dependent variable to perform data fitting, and the fitting goal is to minimize the sum of the distances from all similarity ratios to the fitting line.
[0115] Substitute each serial number in the similarity ratio set into the fitting line equation to obtain the dynamic mean y′ corresponding to the serial number j , that is, the dynamic mean y′ corresponding to each sampling point of the target R wave is obtained j .
[0116] Re-judgment of the similarity of the target R wave based on the dynamic mean corresponding to each sampling point of the target R wave includes:
[0117] S431, calculate the average value s′ of the dynamic mean corresponding to each sampling point of the target R wave x ;
[0118] That is, calculate the average value s of the dynamic mean corresponding to all sampling points x ′;
[0119] S432, calculating the dynamic variance based on the dynamic mean corresponding to each sampling point of the target R wave Among them, y j Represents the jth element in the similarity ratio set corresponding to the target R wave, y′ j represents the dynamic mean value corresponding to the jth sampling point of the target R wave, and num represents the length of the target R wave;
[0120] S433, if the average value s x ′ falls within the confidence interval [S iμ -zσ iμ ,S iμ +zσ iμ ], and If the target R wave is smaller than the second threshold, the similarity between the target R wave and the standard R wave restoration waveform is high, otherwise the similarity is low. iμ represents the mean of all values in all similarity sets corresponding to the i-th type of standard R wave, σ iμ represents the variance of all values in all similarity sets corresponding to the i-th type standard R wave, and z represents the confidence scale. During implementation, the second threshold value can be determined according to the similarity calculation accuracy requirement.
[0121] By re-detecting the wave, the interfered R wave can be screened out. If the average value s corresponding to the target R wave is x ′ falls within the confidence interval [S iμ -zσ iμ ,S iμ +zσ iμ ], and If the value is less than the second threshold, the target R wave is an interfered R wave, and it is judged that it has a high similarity with the standard R wave restored waveform. Other R waves with low similarity are misclassified R waves, thereby improving the accuracy of detection.
[0122] The embodiment of the present invention discloses a system for improving the accuracy of electrocardiogram signal detection. Figure 2 As shown, it includes the following modules:
[0123] The initial detection module is used to perform initial detection on the ECG signal to obtain an initial detection result, in which the R wave position and type are marked; and to perform differential conversion on the ECG signal to obtain an ECG differential signal;
[0124] A standard R wave construction module is used to construct a standard R wave differential waveform corresponding to each type of R wave based on the ECG differential signal;
[0125] A low-similarity R-wave screening module is used to screen out R-wave segments with low similarity to the corresponding standard R-wave differential waveform from the ECG differential signal;
[0126] The final detection module is used to calculate the dynamic mean of the R wave segments with low similarity, re-screen the R wave segments with low similarity based on the dynamic mean, and obtain the final detection result of the ECG signal.
[0127] The above method embodiments and system embodiments are based on the same principle, and their related parts can be used for reference, and can achieve the same technical effect. The specific implementation process refers to the above embodiment, which will not be repeated here.
[0128] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0129] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for improving the accuracy of electrocardiogram signal detection, characterized in that: The following steps are involved: Performing initial detection on the ECG signal to obtain an initial detection result, in which the R wave position and type are marked; performing differential conversion on the ECG signal to obtain an ECG differential signal; Based on the ECG differential signal, a standard R wave differential waveform corresponding to each type of R wave is constructed; Screening out R wave segments with low similarity to corresponding standard R wave differential waveforms from ECG differential signals; The dynamic mean of the R wave segments with low similarity is calculated, and the R wave segments with low similarity are re-screened based on the dynamic mean to obtain the final detection result of the ECG signal.
2. The method for improving the accuracy of ECG signal detection according to claim 1, characterized in that: The R wave segments with low similarity to the corresponding standard R wave differential waveform are screened out from the ECG differential signal, including: Perform integral reduction on each type of standard R wave differential waveform to obtain a standard R wave reduction waveform; For each type of standard R wave, extract each R wave segment corresponding to the type in the ECG differential signal, perform integral restoration, and use the restored R wave segment as the target R wave; Calculate the ratio of the corresponding signal point of each type of standard R wave restoration waveform and each target R wave of the corresponding type to construct a similarity ratio set; The similarity between each target R wave and the standard R wave restoration waveform is determined based on the similarity ratio set, and the target R waves with low similarity are screened out.
3. The method for improving the accuracy of ECG signal detection according to claim 2, characterized in that: Calculate the dynamic mean of the R wave segments with low similarity, re-screen the R wave segments with low similarity based on the dynamic mean, and obtain the final detection result of the ECG signal, including: Perform data fitting on the similarity ratio set corresponding to each target R wave with low similarity; Calculate the dynamic mean corresponding to each sampling point of the target R wave based on the fitting results; The similarity of the target R wave is re-judged based on the dynamic mean corresponding to each sampling point of the target R wave.
4. The method for improving the accuracy of ECG signal detection according to claim 3, characterized in that: Re-judgment of the similarity of the target R wave based on the dynamic mean corresponding to each sampling point of the target R wave includes: Calculate the average value s′x of the dynamic mean corresponding to each sampling point of the target R wave; Calculate the dynamic variance based on the dynamic mean corresponding to each sampling point of the target R wave If the mean value s′ x falls within the confidence interval [S iμ -zσ iμ ,S iμ +zσ iμ ], and If the target R wave is smaller than the second threshold, the similarity between the target R wave and the standard R wave restoration waveform is high, otherwise the similarity is low. j Represents the jth element in the similarity ratio set corresponding to the target R wave, y′ j represents the dynamic mean value corresponding to the jth sampling point of the target R wave, num represents the length of the target R wave, S iμ represents the mean of all values in all similarity sets corresponding to the i-th type of standard R wave, σ iμ It represents the variance of all values in all similarity sets corresponding to the i-th type of standard R wave, and z represents the confidence scale.
5. The method for improving the accuracy of electrocardiogram signal detection according to claim 1, characterized in that: Based on the ECG differential signal, a standard R wave differential waveform corresponding to each type of R wave is constructed, including: For each type of R wave, the central differential waveform of the standard R wave corresponding to the type of R wave is obtained according to the differential mean value of the type of R wave in the ECG differential signal; A bidirectional sliding window is used to synchronously slide all such R wave segments, and the boundary differential waveform of the standard R wave corresponding to this type of R wave is obtained according to the differential mean value of the R wave in each sliding window; The standard vertebral R wave differential waveform corresponding to this type of R wave is obtained according to the central differential waveform and the boundary differential waveform of the standard R wave corresponding to this type of R wave.
6. The method for improving the accuracy of ECG signal detection according to claim 5, characterized in that: A bidirectional sliding window is used to synchronously slide all such R wave segments, and the boundary differential waveform of the standard R wave corresponding to this type of R wave is obtained according to the differential mean value of the R wave in the sliding window, including: Determine the left initial position corresponding to the left sliding window and the right initial position corresponding to the right sliding window respectively according to the width of the central differential waveform of the standard R wave; Using a left sliding window to slide leftward from the left initial position in all such R wave segments, and determining the left boundary differential waveform of the standard R wave corresponding to the such R wave according to the differential mean of the R wave in each left sliding window; A right sliding window is used to slide rightward from the right initial position in all such R wave segments, and the right boundary differential waveform of the standard R wave corresponding to this type of R wave is determined according to the differential mean of the R wave in each right sliding window.
7. The method for improving the accuracy of ECG signal detection according to claim 5, characterized in that: For each type of R wave, the central differential waveform of the standard R wave corresponding to the type of R wave is obtained according to the differential mean value of the type of R wave in the ECG differential signal, including: For each signal point of the central differential waveform of the standard R wave, the differential mean of all sampling points corresponding to the signal point in this type of R wave is calculated as the value of the signal point; and the central differential waveform of the standard R wave is obtained.
8. The method for improving the accuracy of ECG signal detection according to claim 6, characterized in that: Using a left sliding window to slide leftward from the left initial position in all such R wave segments, determining the left boundary differential waveform of the standard R wave corresponding to the such R wave according to the differential mean of the R wave in each left sliding window, including: S2221, taking each left sliding window at the left initial position as the current sliding window; calculating the differential mean of each sampling point in the current sliding window as the value of the corresponding signal point in the left boundary differential waveform of the standard R wave; the mean of each sampling point in the current sliding window constitutes a first set, and the positive and negative signs corresponding to the current sliding window are obtained according to the positive and negative signs of each value in the first set; sliding the current sliding window to the left by the first step length as the current sliding window; S2222, calculating the differential mean of each sampling point in the current sliding window as the value of the corresponding signal point in the differential waveform of the left boundary of the standard R wave; the mean of each sampling point in the current sliding window constitutes a first set, and the positive and negative signs corresponding to the current sliding window are obtained according to the positive and negative signs of each value in the first set; S2223. If the positive and negative signs corresponding to the current sliding window are different from those corresponding to the previous sliding window, stop sliding the window to obtain the left boundary differential waveform of the standard R wave; otherwise, slide the current sliding window to the left by the first step length as the current sliding window, and return to step S2222.
9. The method for improving the accuracy of ECG signal detection according to claim 8, characterized in that: The positive and negative signs corresponding to the current sliding window are obtained according to the positive and negative signs of each value in the first set, including: If the ratio of the number of values with positive signs in the first set to the total number of values in the first set exceeds a first threshold, the current sliding window corresponds to a positive sign, otherwise the current sliding window corresponds to a negative sign.
10. A system for improving the accuracy of electrocardiogram signal detection, characterized in that: Includes the following modules: The initial detection module is used to perform initial detection on the ECG signal to obtain an initial detection result, in which the R wave position and type are marked; and to perform differential conversion on the ECG signal to obtain an ECG differential signal; A standard R wave construction module is used to construct a standard R wave differential waveform corresponding to each type of R wave based on the ECG differential signal; A low-similarity R-wave screening module is used to screen out R-wave segments with low similarity to the corresponding standard R-wave differential waveform from the ECG differential signal; The final detection module is used to calculate the dynamic mean of the R wave segments with low similarity, re-screen the R wave segments with low similarity based on the dynamic mean, and obtain the final detection result of the ECG signal.