Electrocardiosignal quality evaluation method, device, equipment and medium
By preprocessing and feature extraction of ECG signal data, combined with the quality assessment model, the problem of insufficient precision in ECG signal quality assessment is solved, and the accuracy and detail of the assessment are improved, especially for signals in the capacitive coupling mode. Quality assessment.
Patent Information
- Application Number
- CN202411028608.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology has insufficient precision in ECG signal quality assessment, especially the signal assessment effect measured by capacitive coupling method is poor, resulting in limited accuracy of clinical diagnosis.
By preprocessing the ECG signal data to be processed, time domain features, frequency domain features, autocorrelation features and target wave features are extracted, and these feature information are input into the trained quality assessment model to achieve a more fine-grained and comprehensive ECG analysis. Electrical signal quality assessment.
It improves the accuracy of ECG signal quality assessment, provides more detailed data guidance information, supports better analysis of clinical scenarios, and enhances the precision of signal quality assessment for capacitive coupling detection methods.
Smart Images

Figure BDA0004971424180000081 
Figure BDA0004971424180000082 
Figure BDA0004971424180000083
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electrocardiogram signal processing, and in particular to a method, device, equipment and medium for evaluating the quality of electrocardiogram signals. Background Art
[0002] With the continuous development of mobile devices and Internet technology, electrocardiogram (ECG), as a comprehensive expression of cardiac electrical activity, has been increasingly used in the diagnosis of cardiovascular diseases. It can represent the myocardial potential generated during the periodic contraction and relaxation of the heart, and contains a large amount of information related to physiological diseases. In the process of acquiring ECG signals, the capacitive coupling ECG monitoring technology can be used to continuously monitor the ECG waveform without direct contact with human skin. However, ECG signals, especially non-contact ECG signals measured by capacitive coupling, are weak, unstable, and low-frequency. They are easily interfered by various noises during the acquisition process, which causes quality problems of ECG signals. In order to improve the accuracy of clinical diagnosis, it is particularly important to study how to evaluate the quality of ECG signals.
[0003] At present, the related technology adopts a binary classification method to evaluate the quality of ECG signals, and divides the ECG signals into two types: acceptable and unacceptable. However, this quality assessment method is relatively rough and simple, resulting in poor precision in signal quality assessment, especially when evaluating capacitively coupled ECG signals. Summary of the invention
[0004] The purpose of this application is to provide a method, device, equipment and medium for quality assessment of electrocardiogram signals, which can determine the corresponding quality assessment results in a more fine-grained and comprehensive manner, thereby further improving the accuracy of quality assessment.
[0005] To achieve the above objectives, this application provides the following solutions:
[0006] In a first aspect, the present application provides a method for evaluating the quality of an electrocardiogram signal, comprising:
[0007] Obtaining ECG signal data to be processed;
[0008] Preprocessing the ECG signal data to be processed to obtain a plurality of ECG signal segments;
[0009] Performing feature extraction processing on each of the ECG signal segments to obtain feature information of the ECG signal data to be processed, wherein the feature information includes at least one of the following: time domain features, frequency domain features, autocorrelation features, and target wave features; the autocorrelation features are used to characterize the correlation between characteristic wave groups of each cardiac cycle in the ECG signal segment, and the target wave features are features of any type of wave in the ECG signal segment;
[0010] The characteristic information is input into a trained quality assessment model to obtain a quality assessment result corresponding to the quality assessment model, wherein the quality assessment model is trained based on sample electrocardiogram signal data and corresponding annotation results.
[0011] In a second aspect, the present application provides a device for evaluating the quality of an electrocardiogram signal, comprising:
[0012] An acquisition module, used for acquiring the ECG signal data to be processed;
[0013] A preprocessing module, used for preprocessing the ECG signal data to be processed to obtain a plurality of ECG signal segments;
[0014] A feature extraction module, used for performing feature extraction processing on each of the ECG signal segments to obtain feature information of the ECG signal data to be processed, wherein the feature information includes at least one of the following: time domain feature, frequency domain feature, autocorrelation feature and target wave feature; the autocorrelation feature is used to characterize the correlation between characteristic wave groups of each cardiac cycle in the ECG signal segment, and the target wave feature is a feature of any type of wave in the ECG signal segment;
[0015] The quality assessment module is used to input the feature information into a trained quality assessment model to obtain a quality assessment result corresponding to the quality assessment model, wherein the quality assessment model is trained based on sample ECG signal data and corresponding annotation results.
[0016] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any one of the above-mentioned methods for evaluating the quality of electrocardiogram signals.
[0017] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for evaluating the quality of electrocardiogram signals.
[0018] The present application provides a method, device, equipment and medium for evaluating the quality of an electrocardiogram signal. The method obtains the electrocardiogram signal data to be processed, pre-processes the electrocardiogram signal data to be processed, obtains a plurality of electrocardiogram signal segments, then performs feature extraction processing on each electrocardiogram signal segment, obtains feature information of the electrocardiogram signal data to be processed, and the feature information includes at least one of the following: time domain feature, frequency domain feature, autocorrelation feature and target wave feature. Finally, the feature information is input into a trained quality evaluation model to obtain a quality evaluation result corresponding to the quality evaluation model. Compared with the prior art, the technical solution of the present application can extract the feature information of the electrocardiogram signal data to be processed in a more fine-grained manner because the electrocardiogram signal data to be processed is pre-processed into a plurality of electrocardiogram signal segments, and the feature information is the time domain feature, frequency domain feature, autocorrelation feature and target wave feature of the unique expression form of the capacitive coupling detection method, thereby providing more detailed data guidance information for subsequent quality evaluation; on the other hand, by inputting the feature information into the trained quality evaluation model, the corresponding quality evaluation result can be determined in a more fine-grained and comprehensive manner, thereby improving the accuracy of the quality evaluation, thereby improving data support for specific clinical scenarios and facilitating better clinical analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 This is a diagram of an application environment of a method for evaluating the quality of an electrocardiogram signal in an embodiment of the present application;
[0021] Figure 2 A flowchart of a method for evaluating the quality of an electrocardiogram signal provided in one embodiment of the present application;
[0022] Figure 3 A schematic diagram of the structure of a method for evaluating the quality of an electrocardiogram signal provided in one embodiment of the present application;
[0023] Figure 4 A schematic diagram of a flow chart of a method for determining target wave characteristics provided in one embodiment of the present application;
[0024] Figure 5 A schematic diagram of the structure of a method for evaluating the quality of an electrocardiogram signal provided in an embodiment of the present application;
[0025] Figure 6 A schematic diagram of a sample ECG signal segment for determining a signal quality level provided in an embodiment of the present application;
[0026] Figure 7 A schematic diagram of a sample ECG signal segment showing a signal quality score provided in an embodiment of the present application;
[0027] Figure 8 A schematic diagram of signal quality levels annotated by four annotators in Experiment 1 provided in an embodiment of the present application;
[0028] Fig. 9 A schematic diagram of signal quality scores annotated by three annotators in Experiment 2 provided in an embodiment of the present application;
[0029] Fig.10 A schematic diagram of the structure of a classification confusion matrix provided in one embodiment of the present application;
[0030] Fig.11 A schematic diagram of R value, RMSE value and distribution information between the method of the present application and the 43-feature method, 13SQIs method and Two-stream-CNN method provided in one embodiment of the present application;
[0031] Fig.12 A schematic diagram of functional modules of an electrocardiogram signal quality assessment device provided in one embodiment of the present application;
[0032] Fig.13 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0034] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0035] The quality assessment method of the electrocardiogram signal provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the ECG signal data to be processed to the server 104. After receiving the ECG signal data to be processed, the server 104 preprocesses and extracts features of the ECG signal data to be processed, obtains feature information, and inputs it into the trained quality assessment model to obtain the corresponding quality assessment result. The server 104 can feedback the quality assessment result to the terminal 102.
[0036] Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptops, smart phones, tablet computers, Internet of Things devices, medical devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Medical devices can be medical device hosts with ECG data collection, display, analysis functions, etc. The server 104 can be implemented as an independent server or a server cluster composed of multiple servers, and can also be a cloud server.
[0037] In an exemplary embodiment, Figure 2 As shown, a method for evaluating the quality of an electrocardiogram signal is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps 201 to 204. Among them:
[0038] Step 201, obtaining the ECG signal data to be processed.
[0039] It should be noted that the above-mentioned ECG signal data to be processed refers to the ECG signal data that needs to be evaluated for quality, which may include a curve graph of the changes in electrical activity generated by each cardiac cycle of the heart. The ECG signal data to be processed may be data obtained by a capacitive coupling ECG detection method, which may be single-channel ECG signal data or multi-channel ECG signal data.
[0040] Optionally, the above-mentioned ECG signal data to be processed can be imported and obtained from an external device, or can be obtained in real time using capacitive coupling ECG detection, or can be obtained from a database or blockchain. This application does not impose any limitation on the method of obtaining the ECG signal data to be processed.
[0041] It is understandable that the capacitive coupling ECG detection method can continuously monitor the ECG waveform without direct contact with human skin. The core of the capacitive coupling ECG monitoring technology is to use the capacitive coupling model of skin-dielectric-electrode, rather than the conventional skin-electrode model, to understand ECG signal acquisition, and to design appropriate supporting hardware, software and algorithms accordingly. In other words, the ECG signal is coupled to the electrode through an equivalent capacitor to be input into the back-end measurement circuit. The dielectric in the equivalent capacitor is composed of air layers, clothing and other textiles. In this way, the electrode can measure the ECG through clothing, sheets, etc. instead of directly contacting the skin, so it can be measured in the form of mattresses, cushions, cushions and other products.
[0042] Exemplarily, the above-mentioned ECG signal data to be processed can be obtained by measuring the object to be processed through a mattress, wherein the above-mentioned object to be processed can be a user, and the electrodes can be laid on top of an ordinary mattress in a certain form and covered with a bed sheet, for example, they can be arranged evenly or in a specific shape. The user can lie on the bed with normal clothes on, and the potential difference at the corresponding position of his torso can be collected, and the potential difference can be processed to obtain the ECG signal data to be processed. The above-mentioned capacitive coupling ECG detection method enables the user to sleep normally, is completely unaffected by the measuring instrument, can turn over freely in bed, and is not restricted by wire harnesses.
[0043] Step 202 , preprocessing the ECG signal data to be processed to obtain a plurality of ECG signal segments.
[0044] It should be noted that the above-mentioned multiple ECG signal segments refer to the ECG signal data to be processed in a preset time period. The preset time period is customized according to actual needs. The ECG signal segment can be, for example, the ECG signal data to be processed within 5s or 10s.
[0045] Specifically, after obtaining the ECG signal data to be processed, the ECG signal data to be processed can be filtered and segmented to obtain multiple ECG signal segments. The processed signal data is first filtered to obtain the processed signal data, and the processed signal data is segmented to obtain multiple ECG signal segments.
[0046] The above-mentioned ECG signal segments may include different wave groups, each wave group represents a cardiac cycle, and a wave group includes a P wave, a QRS wave, a T wave and a U wave.
[0047] As an implementable method, the computer device can use a bandpass filter to filter the ECG signal data to be processed in each channel to obtain processed ECG signal data. The cutoff frequency of the bandpass filter can be customized according to actual needs, for example, it can be 0.5Hz and 40Hz respectively. Then the processed ECG signal data is segmented to obtain multiple ECG signal segments, for example, 5s ECG signal segments or 10s ECG signal segments.
[0048] In this embodiment, after the ECG signal data to be processed is obtained, it is filtered to obtain processed signal data, which can effectively eliminate low-frequency noise (such as baseline drift) and high-frequency noise (such as interference from muscle movement) in the ECG signal data to be processed, while retaining the relevant frequency components in the ECG signal data to be processed to facilitate the subsequent extraction of corresponding feature information, and divide the processed signal data into multiple ECG signal segments, so that the feature information of the ECG signal can be obtained in a finer granularity later.
[0049] Step 203, performing feature extraction processing on each ECG signal segment to obtain feature information of the ECG signal data to be processed, wherein the feature information includes at least one of the following: time domain feature, frequency domain feature, autocorrelation feature and target wave feature.
[0050] It should be noted that after acquiring multiple ECG signal segments, the time domain features, frequency domain features, autocorrelation features and target wave features of each ECG signal segment can be extracted. Among them, the time domain features refer to the characteristics of the ECG signal segment on the time axis, the frequency domain features are used to describe the energy distribution, frequency components, spectrum shape and other information of the heart point signal, the autocorrelation is used to characterize the correlation between the characteristic wave groups of each cardiac cycle in the ECG signal segment, and the target wave feature is the feature of any type of wave in the ECG signal segment, and the any type of wave can be an R wave, a P wave or a T wave. Preferably, the target wave can be an R wave. Since the R wave has the largest amplitude and is easier to extract features, the robustness of extracting the R wave feature is the highest. Optionally, the above-mentioned feature information can be expressed in the form of a feature vector or a feature matrix.
[0051] Among them, the above-mentioned time domain features include at least one of the following: peak value, root mean square, variance, morphological length, maximum window power, crest factor, pulse factor, marginal factor, shape factor, skewness, and kurtosis of the ECG signal segment; the frequency domain features include at least one of the following: frequency entropy, center frequency, mean square frequency, variance frequency, baseline signal quality index, and power signal quality index; the target wave features include at least one of the following: target wave index, target wave variance, target wave interval variance, target wave interval kurtosis, target wave interval skewness, relative energy signal quality index, relative standard deviation signal quality index, and average template matching correlation coefficient.
[0052] In this embodiment, by extracting the target wave features, the distribution of indicators such as the target wave interval and peak value in the ECG signal segment can be observed to determine whether the signal contains abnormal noise. By extracting time domain features, frequency domain features and autocorrelation features, statistical feature information unique to the ECG coupling monitoring method can be extracted, thereby improving the precision of the ECG signal quality assessment.
[0053] Step 204, input the feature information into the trained quality assessment model to obtain a quality assessment result corresponding to the quality assessment model, where the quality assessment model is trained based on the sample ECG signal data and the corresponding annotation results.
[0054] It should be noted that the above-mentioned quality assessment model is a machine learning model that learns the ability to assess signal quality by training sample ECG signal data. The quality assessment model is a machine learning model that has the ability to perform quality assessment with feature information as input and quality assessment results as output. The quality assessment model may include a multi-layer neural network structure, and the network structures of different layers process the input data differently, and transmit the output results to the next network layer until the last network layer is processed to obtain the quality assessment results of the ECG signal data to be processed. The quality assessment model may also be other machine learning models such as support vector machine (SVM) and random forest. The quality assessment model may be constructed according to different quality assessment requirements, and the corresponding output results are different. For example, when the quality assessment requirements are higher, the quality assessment results output by the corresponding quality assessment model are more refined, and the quality assessment model is a regression model; when the quality assessment requirements are lower, the quality assessment results output by the corresponding quality assessment model are relatively rough, and the quality assessment model is a classification model. The above-mentioned quality assessment results may include at least three, and the input parameters corresponding to different quality assessment models may be the same, and the output quality assessment results may be different.
[0055] After obtaining the characteristic information of the ECG signal data to be processed, the characteristic information can be respectively input into the pre-built quality assessment model to obtain the quality assessment result corresponding to the quality assessment model. When the quality assessment model is a classification model, the corresponding quality assessment result can be, for example, the signal quality level; when the quality assessment model is a regression model, the corresponding signal quality score can also be used.
[0056] For example, the quality assessment model includes a classification model and a regression model. Figure 3As shown, after obtaining the ECG signal data 3-1 to be processed, the ECG signal data 3-1 to be processed can be preprocessed to obtain multiple ECG signal segments 3-2, and feature extraction processing can be performed on each ECG signal segment 3-2 to obtain feature information 3-3, and then the feature information 3-3 is input into a pre-trained quality assessment model 3-4, for example, a pre-trained classification model 3-5 to obtain a corresponding signal quality level 3-6, or the feature information 3-3 is input into a pre-trained regression model 3-7 to obtain a corresponding signal quality score 3-8, thereby completing the quality assessment operation.
[0057] The present application provides a quality assessment method for an ECG signal. Since the ECG signal data to be processed is preprocessed into multiple ECG signal segments, the characteristic information of the ECG signal data to be processed can be extracted in a more fine-grained manner, and the characteristic information is the time domain characteristics, frequency domain characteristics, autocorrelation characteristics and target wave characteristics of the unique expression form of the capacitive coupling detection method, thereby providing more detailed data guidance information for subsequent quality assessment; on the other hand, by inputting the characteristic information into a trained quality assessment model, the quality assessment result can be determined in a more fine-grained and comprehensive manner, and the accuracy of the quality assessment is improved, thereby improving data support for specific clinical scenarios and facilitating better clinical analysis.
[0058] In another exemplary embodiment of the present application, in order to accurately determine the characteristic information of the ECG signal data to be processed, the ECG signal data to be processed may be preprocessed, such as Figure 4 As shown, the above step 202 is replaced by the following steps 301 to 303:
[0059] Step 301 , performing time domain feature analysis on each ECG signal segment to obtain time domain features, and obtaining a power spectrum density function of the ECG signal segment, analyzing the power spectrum density function to obtain frequency domain features.
[0060] Step 302: Obtain the vector element values corresponding to each time point in each ECG signal segment, and determine the autocorrelation features according to the vector element values.
[0061] Specifically, for each ECG signal segment, time domain features can be extracted, including the peak value, root mean square, variance, morphological length, maximum window power, crest factor, pulse factor, marginal factor, shape factor, skewness, and kurtosis of the ECG signal segment.
[0062] In order to eliminate the potential differences in feature distribution caused by the change in amplitude range between different ECG signal segments, the amplitude of the ECG signal segment can be adjusted to the range of [-1,1] to normalize it. The normalization process can be performed by the following formula to obtain the normalized signal segment vector. For each channel, all feature data are normalized to a mean of 0 and a standard deviation of 1 by the z-score method. The normalized signal segment vector can be expressed by the following formula:
[0063]
[0064] Where x is the ECG signal segment numerical vector, x[i] represents the value of the position corresponding to the i-th sampling point in the ECG signal segment numerical vector x, max(abs(x[i])) refers to the maximum value determined by taking the absolute value of each value in the ECG signal segment numerical vector x, and x[i] represents the value of the i-th sampling point in the ECG signal segment numerical vector x. scale It refers to the normalized signal segment vector obtained by dividing each element of the ECG signal segment numerical vector x by max(abs(x[i])).
[0065] Generally, the peak value corresponds to the R wave in the ECG signal. The root mean square RMS of the ECG signal segment is used to provide information about the overall energy or amplitude distribution of the ECG signal segment over time, wherein a higher RMS value generally indicates a larger amplitude or energy in the signal. The root mean square RMS can be expressed by the following formula:
[0066]
[0067] The variance Var of the above ECG signal segment quantifies the degree of variability or fluctuation within the signal. It provides insights into the stability or consistency of the signal quality. Var can be expressed by the following formula:
[0068]
[0069] The morphological length ML of the above ECG signal segment is used to represent the extended length of the signal along the time axis. ML can be expressed by the following formula:
[0070]
[0071] The maximum window power MWP can be obtained by applying a sliding window with a length of 1.5s and a sliding step of 0.5s to the ECG signal segment. The MWP can be expressed by the following formula:
[0072]
[0073] The crest factor CF is the ratio of the peak-to-peak value (PtP) to its root mean square (RMS) value, which quantifies the sharpness or kurtosis of the signal. The higher the CF value, the clearer the signal curve. The RMS value in the formula is calculated by the above formula (2), and the peak-to-peak value (PtP) is the numerical difference between the maximum peak value and the minimum valley value in the ECG signal segment. CF can be expressed by the following formula:
[0074]
[0075] The above-mentioned pulse factor IF is used to reflect the size of sudden changes or spikes in the signal by measuring the mutations or pulses in the ECG signal segment. The IF can be expressed by the following formula:
[0076]
[0077] The above marginal factor MF is used to reflect the complexity and volatility within the time series. MF can be expressed by the following formula:
[0078]
[0079] The above shape factor SF is obtained by the ratio of the pulse factor IF to the marginal factor CF. A higher shape factor SF value indicates that there are relatively more pulses or extreme peaks in the signal. SF can be expressed by the following formula:
[0080]
[0081] The above skewness x skew It refers to the degree and direction of the deviation of the data in the ECG signal from the mean value, which is used to represent the distribution shape information of the signal. skew It can be expressed by the following formula:
[0082]
[0083] The above kurtosis x kurt Used to quantify the kurtosis or flatness of the ECG signal distribution relative to the normal distribution. kurt It can be expressed by the following formula:
[0084]
[0085] Wherein, in the above formulas (1)-(11), N represents the number of sampling points, μ represents the mean value of the ECG signal segment, σ represents the standard deviation of the ECG signal segment, x[i-1] represents the value corresponding to the position of the i-1th sampling point in the ECG signal segment numerical vector x, max(x) is the maximum value in the ECG signal segment numerical vector x, and min(x) is the minimum value in the ECG signal segment numerical vector x.
[0086] The above autocorrelation feature is a measure of the correlation between the signal and itself at each time point, and is used to analyze periodic and repetitive patterns within the signal, such as periodic signals masked by noise. Its autocorrelation feature can be expressed by the following formula:
[0087]
[0088] Where pks is a vector consisting of the peak values of the autocorrelation function in order, sum(pks) is the sum of the vector elements, and max(pks) is the maximum value of the vector element.
[0089] As an implementable method, the computer device can obtain the power spectrum density function of the electrocardiogram signal, analyze the power spectrum density function, and obtain the frequency domain feature. The above frequency domain feature includes at least one of the following: frequency entropy, center frequency, mean square frequency, variance frequency, baseline signal quality index, and power signal quality index.
[0090] The above frequency entropy (Entropy) is used to measure the randomness or irregularity of the signal frequency distribution. Entropy can be expressed by the following formula:
[0091]
[0092] The above center frequency fft CF Used to characterize the location where the signal energy is mainly concentrated, fft CF It can be expressed by the following formula:
[0093]
[0094] The above mean square frequency fft MSF It involves the weighted average of the product between the power of the frequency component and the square of its corresponding frequency. It describes the average position of a certain frequency distribution or energy distribution in the signal frequency domain. MSF It can be expressed by the following formula:
[0095]
[0096] The above variance frequency fft VF It is the weighted average of the squared differences between a frequency component and its weighted average, multiplied by their corresponding energy or power. It quantifies the dispersion distributed within a signal, FFT VF It can be expressed by the following formula:
[0097]
[0098] The above-mentioned baseline signal quality index basSQI (Signal Quality Index, SQI) refers to the ratio of the baseline (0-1Hz) power to the total power in the signal spectrum (0-40Hz), which quantifies the relative power level of the baseline signal relative to the entire signal spectrum. baseline The total signal power P is obtained by calculating the sum of the values corresponding to 0-1Hz in the power spectrum density vector of the ECG signal segment. total1 By calculating the sum of the values corresponding to 0-40Hz in the power spectral density vector of the ECG signal segment, we can get:
[0099]
[0100] The power signal quality index is also called pSQI, power SQI, which refers to the ratio of the power of the QRS complex to the total power in the high-pass signal spectrum. It quantifies the relative power level of the QRS complex relative to the entire signal spectrum within the frequency range. Among them, the QRS complex is generally 5-15Hz, the high-pass signal spectrum is generally 5-40Hz, and the QRS complex power P QRS The total power of the high-pass signal Ptotal2 is obtained by calculating the sum of the values corresponding to 5-15Hz in the power spectral density vector of the ECG segment, and the sum of the values corresponding to 5-40Hz in the power spectral density vector of the ECG segment:
[0101]
[0102] Among them, in the above formulas (13)-(18), p i represents the probability of occurrence of each frequency component in the signal spectrum, n represents the number of frequency components, f i Represents the value of the frequency component, P(f i ) represents the power spectral density of each frequency component, P total2 is the total power of the high-pass signal, P QRS is the power of the QRS complex in the ECG signal segment, P baseline is the baseline power, P total1 is the total signal power.
[0103] Step 303: Detect the target wave in each ECG signal segment to obtain the target wave feature.
[0104] The target wave refers to a waveform in an electrocardiogram signal segment, which may include a P wave, a T wave, and an R wave. The target wave feature is a feature corresponding to the target wave.
[0105] Optionally, in the process of obtaining the target wave feature, the target wave in the ECG signal segment can be detected to determine the position and amplitude of the target wave, and the target wave feature can be determined based on the position and amplitude of the target wave. Specifically, taking the target wave as the R wave as an example, the R wave detection method can be used to identify the position and amplitude of the R wave in the ECG signal segment, and then the R wave feature is determined based on the position and amplitude of the R wave. The R wave features include: R wave index, R variance, RR interval variance (Rvar), RR interval kurtosis (RRIvar), R wave interval skewness (RRIskew), relative energy signal quality index eSQI, relative standard deviation signal quality index rsdSQI, and average template matching correlation coefficient AVEcorr.
[0106] Among them, the above-mentioned R wave index is the average of the two smallest R wave peak amplitudes; the R variance is the variance of all R wave peak amplitudes, which represents the variability or discreteness of the R wave peak amplitude, and it quantifies the degree to which the amplitude of the R wave peak deviates from the average amplitude; the RR interval variance (Rvar) refers to the variance of the RR interval, which represents the variability of the time difference between consecutive R wave peaks, and it is used to evaluate the statistical discreteness of the heartbeat interval; the RR interval kurtosis (RRIvar) describes the distribution of the RR interval sequence, specifically evaluating its clarity or flatness; the R wave interval skewness (RRIskew) represents the symmetry of the RR interval; the relative energy signal quality index eSQI can also be expressed as relative energy SQI, which refers to the ratio of the energy of the QRS complex to the total energy of the entire signal spectrum; the relative standard deviation signal quality index rsdSQI is also called the relative standard deviation SQI, which is used to measure the degree of amplitude variation within the QRS complex relative to its average value; the average template matching correlation coefficient AVEcorr refers to the average correlation coefficient between each QRS complex and the average QRS complex morphology in the signal.
[0107] In this embodiment, by performing feature extraction processing on each ECG signal segment, the feature information of the ECG signal data to be processed can be accurately determined, so as to obtain the feature information unique to the capacitive coupling detection method, and provide detailed data guidance information for subsequent quality assessment of the ECG signal.
[0108] In one embodiment, the quality assessment model may include a classification model or a regression model. In order to more accurately determine the quality assessment result, the present application embodiment provides a specific implementation method for obtaining the quality assessment result corresponding to the quality assessment model. Figure 5 As shown, the method includes:
[0109] Step 401: input feature information into a classification model to obtain a signal quality level of the ECG signal data to be processed.
[0110] Step 402: input the feature information into a regression model to obtain a signal quality score of the ECG signal data to be processed.
[0111] It should be noted that the above signal quality levels are divided according to the degree of influence of noise on the identification of QRS complexes in ECG signal segments, and the signal quality scores are determined according to the degree of influence of noise on P waves, T waves and QRS complexes in ECG signal segments. The above classification model and regression model are both trained models, and the degree of division of ECG signal segments input by the classification model and the regression model can be the same or different. The classification model can be a Random Forest (RF) classifier, and the regression model can be a Random Forest (RF) regressor.
[0112] As an implementable method, after acquiring the characteristic information, the characteristic information can be input into the classification model to perform quality assessment on multiple ECG signal segments in the ECG signal data to be processed, and the signal quality level of the ECG signal data to be processed is obtained. The signal quality level is determined according to whether the noise interferes with the identification of the QRS wave group, for example, it can include four levels, namely, level 1, level 2, level 3, and level 4. Among them, level 1 is slight noise, which is specifically manifested as satisfactory ECG signal quality, clear and visible QRS wave group, subtle noise, and does not hinder the identification of QRS wave group; level 2 is tolerable noise, which is specifically manifested as the presence of obvious baseline offset. Although there is an obvious baseline offset, more than 75% of QRS wave groups can be identified; level 3 is a large amount of noise. Due to the influence of factors such as baseline drift and noise, the noise of this signal quality level has more than 25% and less than 75% of QRS wave groups that can be identified; level 4 is excessive noise, which is specifically manifested as unacceptable ECG signal, which cannot identify any QRS wave group, and most of its ECG signal segments are composed of pure noise.
[0113] As another feasible method, the characteristic information is input into the regression model to perform quality assessment on multiple ECG signal segments in the ECG signal data to be processed, and the signal quality score of the ECG signal data to be processed is obtained. The signal quality score is determined according to the degree of influence of noise on the P wave, T wave and QRS complex in the ECG signal segment, and can include six scores, for example, 10 points, 8 points, 6 points, 4 points, 2 points and 0 points. Among them, 10 points are clean waveforms, and the waveform of this value is specifically manifested as clear P wave, T wave and QRS complex, without visible noise or artifacts; 8 points are small noise waveforms, and the waveform of this value is specifically manifested as visible P wave, T wave and QRS complex, and there may be small transient high amplitude pulses or baseline drifts, which do not interfere with noise identification; 6 points are medium noise waveforms, and the waveform of this value is specifically manifested as a recognizable QRS complex, but no more than 30% of the P wave and T wave are severely distorted by transient high amplitude pulses or baseline drifts; 4 points are significant noise waveforms, which are specifically characterized by a recognizable QRS complex, but more than 30% of the P wave and T wave are distorted by transient high-amplitude pulses or baseline drift; 2 points are severe noise waveforms, which are specifically characterized by the presence of only one QRS complex that is unrecognizable due to noise, and the severity of the transient high-amplitude pulse or baseline drift exceeds the numerical level 4, making the P wave and T wave unrecognizable; 0 points are extreme noise waveforms, which are specifically characterized by more than two unrecognizable QRS complexes. The severity of the transient high-amplitude pulse and baseline drift exceeds the numerical level 2, and there may be significant fluctuations caused by motion artifacts, resulting in poor overall recording quality.
[0114] It can be understood that the granularity of the quality assessment of ECG signals by the above signal quality level is smaller than that by the signal numerical score, that is, the quality assessment of ECG signals by the signal numerical score is more precise than that by the signal quality level.
[0115] Among them, the above-mentioned classification model is constructed through the following steps: obtaining sample ECG signal data, preprocessing the sample ECG signal data, and obtaining multiple sample ECG signal fragments; the sample ECG signal fragments are annotated with signal quality level annotation results; the sample ECG signal fragments are divided into k parts; k-1 sample ECG signal fragments are selected as training sets, and another sample ECG signal fragment is used as a verification set. The parameters in the classification model to be trained are optimized through the training set to obtain the classification model to be verified, and the verification set is input into the classification model to be verified to obtain the prediction result; k>1; repeat the above steps k times to obtain k prediction results, determine the performance index according to the k prediction results, and determine the classification model to be verified with the best performance index as the classification model.
[0116] It should be noted that the above-mentioned sample ECG signal data can be obtained by performing capacitive coupling detection on the experimenter's ECG signal, which can include multiple single-channel sample ECG signal segments, and can also include multi-channel sample ECG signal segments. The signal quality level labeling result can be determined by manually labeling each sample ECG signal segment in the sample ECG signal data. After obtaining the sample ECG signal data, the sample ECG signal data can be preprocessed to obtain multiple sample ECG signal segments. Four independent labelers can be responsible for labeling the signal quality level for each single-channel sample ECG signal segment. Among them, for multi-channel sample ECG signal segments, the signal quality level can be separately labeled for each channel. If more than three labelers reach a consensus on the quality labeling level of a given sample ECG signal segment, the labeling result will be used as the signal quality level labeling result. Otherwise, expert intervention will be initiated to determine the final signal quality level labeling result.
[0117] Optionally, in the process of optimizing the parameters in the classification model to be trained through the training set to obtain the classification model to be verified, the training set can be subjected to feature extraction processing to obtain sample feature information, and the sample feature information is input into the classification model to be trained to obtain an output result, and a loss function is constructed according to the output result and the signal quality level labeling result corresponding to the training set. The classification model to be trained is iteratively trained according to the minimization of the loss function to obtain the classification model to be verified.
[0118] After the output result is obtained, a loss function can be constructed based on the output result and the signal quality level labeling result of the training set, and the classification model to be trained is optimized according to the minimization of the loss function to obtain the classification model to be verified. According to the difference between the output result and the signal quality level labeling result, the parameters in the classification model to be trained are updated to achieve the purpose of training the classification model to be trained. Among them, updating the parameters in the classification model to be trained can be updating the matrix parameters such as the weight matrix and the bias matrix in the classification model to be trained. Among them, the above-mentioned weight matrix and bias matrix include but are not limited to the matrix parameters in the convolution layer, feedforward network layer, and fully connected layer in the classification model to be trained.
[0119] In the above-mentioned iterative training process of the classification model to be trained, k prediction results are obtained by repeating k times, and then the k prediction results are merged to obtain a merged result, and the performance index is determined based on the merged result and the signal quality level labeling result corresponding to the verification set. The performance index may include at least one of the following: accuracy, sensitivity, precision, harmonic mean, and acceptable repeatability.
[0120] Similarly, in the embodiment of the present application, the process of training the regression model is similar to the process of the classification model, by acquiring sample ECG signal data and preprocessing the sample ECG signal data to obtain multiple sample ECG signal segments, and the sample ECG signal segments are divided into k parts, k-1 of the sample ECG signal segments are selected as training sets, and another sample ECG signal segment is used as a verification set. The parameters in the regression model to be trained are optimized through the training set to obtain a regression model to be verified, and the verification set is input into the regression model to be verified to obtain a prediction result, and the process is repeated k times to obtain k prediction results. The performance index is determined according to the k prediction results, and the regression model to be verified with the best performance index is determined as the regression model.
[0121] In this embodiment, in the process of constructing the classification model and the regression model, two groups of experiments can be set up, namely: (1) a two-channel short-term simulated sleep experiment and (2) an eight-channel nighttime real-time sleep monitoring experiment. Among them, experiment (1) is an experiment for training the classification model, and experiment (2) is an experiment for training the regression model. All participants in both groups of experiments met specific criteria, including no history of cardiovascular disease, good health, full behavioral ability, and the ability to follow instructions during the study. Before the experiment began, all participants provided written informed consent. The participants wore their own clothes without any clothing optimized for capacitively coupled ECG signal recording, as shown in Table 1. The above participants can be compared in terms of the number of channels, number of subjects, signal acquisition environment, lying position, recording time, sampling rate (Hz), purpose, etc., as shown in Table 1 below:
[0122] Table 1
[0123]
[0124] As a feasible method, there are 26 participants (subjects) in the above experiment 1, including 18 males and 8 females, recruited at an age of 21-38 years old, with an average age between (29.35-3.69) and (29.35+3.69), and the signal acquisition system is a dual-channel non-contact smart mattress system based on dry capacitive coupling flexible electrodes to collect ECG signals. The experimental paradigm is a short-term simulated sleep experiment under restricted posture. Before the formal start of the experiment, each participant was instructed to lie flat on the smart mattress in a supine position for at least 3 minutes to ensure signal stability. Throughout the experiment, the participants adopted four different sleeping positions, including supine, left side, right side, and prone. After fully relaxing, they maintained each sleeping position for 5-6 minutes, and the experimental operator synchronously recorded the ECG signal and sleeping posture information.
[0125] After setting up the signal collection environment, we can record (3.56-5.8) for each participant.
[0126] A data set of (33.56+5.8) minutes in length, including signals during the task and transition signals during the waiting process for stabilization, is used as sample ECG signal data. The sample ECG signal data is then preprocessed to obtain the preprocessed signal, which is then divided into 5-second sample ECG signal segments. A total of 16,324 single-channel sample ECG signal segments are obtained for the two channels.
[0127] After the sample ECG signal segments are determined, the sample ECG signal segments are labeled, which can be done manually using a signal quality evaluation method based on grade classification, and each sample ECG signal segment is labeled to obtain a signal quality grade labeling result. The signal quality grade labeling result can be, for example, Figure 6 Each sample ECG signal segment shown corresponds to a signal quality level annotation result, including level 1, level 2, level 3 and level 4. Figure 6 Schematic diagram of sample ECG signal fragments of level 1 to level 4 from top to bottom. The data set of Experiment 1 is called Data Set 1, and the classification model can be constructed by using the leave-one-out cross-validation algorithm. Among them, for the training process of the classification model in each fold, the data from 25 experimental participants can be used as the training set to train the classification model to be trained to obtain the classification model to be verified, and the data of the remaining participant can be used as the verification set to verify the trained classification model to be verified to evaluate its performance, and the above process is repeated 26 times to obtain 26 output results, and then the 26 output results are merged to obtain the corresponding performance indicators, which can be five, including accuracy Acc, sensitivity Se, precision P+, harmonic mean F1, and acceptable repeatability.
[0128] The above accuracy Acc is used to measure the overall correctness of the predictions made by the classification model, and is calculated as the ratio of correctly predicted samples to total samples. Acc can be expressed by the following formula:
[0129]
[0130] The above sensitivity Se is used to measure the true positive rate correctly identified by the classification model. Se can be expressed by the following formula:
[0131]
[0132] The above accuracy P+ represents the proportion of actual positive results among the predicted positive results. P+ can be expressed by the following formula:
[0133]
[0134] The above harmonic mean F1 refers to the harmonic mean between the precision P+ and the sensitivity Se. F1 can be expressed by the following formula:
[0135]
[0136] Among them, in the above formulas (19) to (22), true positive TP represents the number of sample ECG signal segments correctly identified as positive in the verification set, true negative TN represents the number of sample ECG signal segments correctly identified as negative in the verification set, false positive FP represents the number of sample ECG signal segments incorrectly identified as positive in the verification set, and false negative FN represents the number of sample ECG signal segments incorrectly identified as negative in the verification set.
[0137] It should be noted that due to the lack of clear boundaries between adjacent levels, some sample ECG signal segments may be located at fuzzy boundaries, which makes it challenging to clearly assign them to specific categories. Therefore, the concept of acceptable overlap accuracy (AOA) is introduced for adjacent levels to handle these situations. For example, if a sample ECG signal segment originally labeled as level 2 is incorrectly classified as level 1 or level 3 by the model, this misclassification is considered acceptable within the AOA. Acceptable repeatability recognizes that the predicted and actual levels are very close or adjacent (within one level), and the prediction is within an acceptable error range due to the overlapping or fuzzy nature of these segments. By incorporating the concept of AOA, the classification model can better handle and explain the inherent uncertainty of certain ECG segments, allowing for more detailed and flexible classification when clear distinctions between categories may be challenging.
[0138] As another feasible method, there are 4 participants (subjects) in the above-mentioned Experiment 2, including 4 males, recruited at an age of 25-40 years old, with an average age between (32.25-5.34) and (32.25+5.34), and the signal acquisition system is an eight-channel non-contact intelligent mattress system based on dry-capacitive coupling flexible electrodes to record ECG signals. The experimental paradigm is a real-time monitoring experiment of sleep at night under unconstrained sleep conditions. The test time is based on the sleep habits of the subjects, from about 11 pm to 8 am the next morning. Before the formal start of the experiment, the participants were asked to lie in the center of the mattress with their shoulders about 10 cm above the top edge of the mattress, covering the positive electrode. Participants are free to change their posture or move their bodies while sleeping to reflect the natural sleep state.
[0139] After setting up the signal collection environment, we can record data for each participant for 4 nights, and record a data set of minutes between (468.3-37.6) and (468.3+37.6) as sample ECG signal data every night. Then, we preprocess the sample ECG signal data to obtain the preprocessed ECG signal, and divide the preprocessed ECG signal into 10-second sample ECG signal segments. Considering that the workload is related to the labeling and sample size, we randomly select 30 segments from the night ECG signals collected every night, and obtain a total of 3840 single-channel ECG signal segments from 16 nights of sleep signals for further analysis.
[0140] After the sample ECG signal segments are determined, the sample ECG signal segments are labeled, which can be done manually using a signal quality evaluation method based on numerical scoring, and each sample ECG signal segment is labeled to obtain a signal quality score labeling result. The signal quality score labeling result can be, for example, Figure 7 As shown in the figure, each sample ECG signal segment corresponds to a signal quality score annotation result, including 10, 8, 6, 4, 0 points and motion artifacts. Figure 7 Schematic diagram of sample ECG signal segments corresponding to 10, 8, 6, 4, 0 and motion artifacts from top to bottom. The data set of Experiment 2 is called Dataset 2, and the regression model can be constructed using the leave-one-out cross-validation algorithm. Among them, for the training process of the regression model in each fold, the data from 15 nights can be used as the training set to train the regression model to be trained to obtain the regression model to be verified, and the data from the remaining 1 night can be used as the verification set to verify the regression model to be verified to evaluate its scoring fitting ability. The above process is repeated 16 times to obtain 16 output results, and then the 16 output results are merged to obtain the corresponding performance indicators. The performance indicators can be three, including the mean square error (RMSE), the correlation coefficient (R value) and the acceptable prediction interval coverage probability (APICP).
[0141] The above RMSE is used to quantify the average error between the predicted value and the actual value, and measures the square root of the average square difference between the predicted value and the observed value. The smaller the RMSE, the higher the accuracy of the model prediction evaluation score. The RMSE can be expressed by the following formula:
[0142]
[0143] Where n is the number of observations, y i is the actual signal quality score, is the predicted signal quality score.
[0144] The R value (also called sim) is used to measure the strength and direction of the linear relationship between the predicted signal quality score and the actual signal quality score. The sim can be expressed by the following formula:
[0145]
[0146] in, is the actual signal quality score y i The mean of The quality scores of all prediction signals The mean of .
[0147] It is understood that acceptable prediction intervals are used for adjacent numerical scores, taking into account the possibility of overlap between adjacent numerical scores. For example, if an ECG segment that was initially rated as 2 is incorrectly predicted as 0 or 4, this misprediction is considered acceptable. This acceptability is based on the difference between the predicted and actual numerical scores falling within an acceptable close range (within the adjacent numerical scores). To evaluate how effectively this acceptable prediction interval captures the true value, the Acceptable Prediction Intervals Coverage Probability (APICP) at different biases is calculated. APICP is used to measure the proportion of samples where the acceptable prediction interval contains the actual observed value and the difference between the predicted and actual numerical scores remains within the set bias limit. We defined three detailed numerical score biases for APICP evaluation: numerical score bias of 0.67 (0.67-off), numerical score bias of 1.33 (1.33-off), and numerical score bias of 2 (2-off). These biases represent an acceptable range within which the predicted numerical score can deviate from the actual numerical score and still be considered to be within an acceptable interval. For example, the APICP value under 2-off is 95%, which means that in 95% of the samples, the acceptable prediction interval contains the actual observation value, and the difference between the predicted value and the actual value does not exceed the set numerical deviation 2.
[0148] In the above experiment 1, four annotators may annotate the signal quality level of each sample ECG signal segment. The four annotators are Annotator-1, Annotator-2, Annotator-3, and Annotator-4. The distribution of the signal quality levels they annotate is as follows: Figure 8 As shown, in Experiment 2, three annotators can annotate the signal quality score of each sample ECG signal segment. The three annotators are Annotator-1, Annotator-2, and Annotator-3. The distribution of the signal quality levels they annotate is as follows: Fig. 9 As shown above Figure 8 and Fig. 9It shows the consistency of annotators in evaluating the signal quality level or signal quality score. In Experiment 1, most of the sample ECG signal segments were labeled as level 1 signal quality. Among them, the probability value labeled by Annotator-1 was 64.94%, the probability value labeled by Annotator-2 was 55.95%, the probability value labeled by Annotator-3 was 40.64%, and the probability value labeled by Annotator-4 was 55.52%. In contrast, the proportion labeled as level 3 signal quality was relatively small. In Experiment 2, most of the sample ECG signal segments were evaluated as 0 and 4 points, and a small part was 10 points.
[0149] Among them, as shown in Table 2 below, Table 2 shows the signal quality level distribution results of all annotators in Experiment 1, represented by the mean μ and standard deviation σ. In Experiment 1, the average signal quality levels and standard deviations among Annotator-1, Annotator-2, and Annotator-4 were very close, while the average signal quality level of Annotator-3 was slightly higher.
[0150] Table 2
[0151]
[0152] Please refer to Table 3 below. Table 3 shows the signal quality score distribution results of three annotators for ECG signal segments in Experiment 2, represented by the mean μ and standard deviation σ:
[0153] Table 3
[0154]
[0155] In addition, the Fleiss Kappa coefficients of the two experiments, Experiment 1 and Experiment 2, can be calculated to evaluate the consistency among annotators in the experiment. The Fleiss Kappa coefficient of Experiment 1 was 0.67, and the Fleiss Kappa coefficient of Experiment 2 was 0.62, indicating a relatively high consistency among annotators and verifying the reliability of the proposed signal quality evaluation strategy.
[0156] It can be understood that the above Fleiss Kappa coefficient is a statistic used to measure the degree of consistency between multiple columns of discrete unordered data or multiple columns of discrete ordered data. It is particularly suitable for the situation where multiple evaluators perform category marking on the same batch of samples, and it evaluates the degree of consistency of the marking by calculating the consistency among the evaluators. Its value range is between [-1, 1]. K = -1 indicates complete inconsistency; -1 < k < 0 indicates that the observed consistency is less than the chance consistency, which is meaningless; k = 0 indicates that the consistency is completely caused by chance; 0 < k ≤ 0.40 indicates poor consistency; 0.40 < k ≤ 0.60 indicates moderate consistency; 0.60 < k ≤ 0.80 indicates a relatively high degree of consistency;
[0157] k > 0.80 indicates excellent agreement.
[0158] Fig.10 A schematic diagram of a classification confusion matrix provided in an embodiment of the present application, wherein the numerical value in the 4*4 confusion matrix represents the number of ECG signal segments that fall within a certain condition. For example, the numerical value in the upper left corner of the confusion matrix represents the situation where 8287 sample ECG signal segments belong to the predicted signal quality level of level 1 and the actual labeled signal quality level category is also level 1. The 4*2 bar in the lower left corner represents the sensitivity (first column) and false negative rate (second column) of the corresponding category, and the 2*4 bar in the upper right corner represents the specificity (first row) and false positive rate (second row) of the corresponding category.
[0159] Among them, the diagonal elements of the above 4*4 matrix represent the correctly classified sample ECG signal fragments, while the non-diagonal elements represent the misclassification between different quality levels. The results show that misclassification is prone to occur between adjacent quality levels. Specifically, among the 3324 (the sum of the second row of the matrix) samples marked as level 2, 1348 samples were misclassified as level 1. Similarly, among the 1443 (the sum of the third row of the matrix) samples marked as level 3, 418 samples were misclassified as level 2. This phenomenon may be due to the similarity of features between adjacent quality levels, resulting in a higher probability of misclassification. On the contrary, quality levels that are farther away may present more obvious feature differences, resulting in a lower probability of misclassification.
[0160] The 26 features + random forest classifier RF method provided in this embodiment is compared with other signal quality assessment methods, and the performance indicators of the signal quality classification results are calculated, as shown in Table 4, including the other signal quality assessment methods 13SQIs features + support vector machine (Support Vector Machine, SVM) method, 43features features + quadratic support vector machine (quadratic SVM) method, and two-stream convolutional neural network (Two-stream-CNN) method. The above performance indicators include Se value (Sensitivity in the table), P+ value (Precision in the table), F1 value (F1-Score in the table), Acc value (Accuracy in the table) and AOA value (OverlapAccuracy in the table).
[0161] Table 4
[0162]
[0163] It can be seen that the performance indicators of the 26-feature + random forest RF classifier provided in the embodiment of the present application include an Acc value (Accuracy in the table) of 81.0%, a Se value (Sensitivity in the table) of 77.5%, a P+ value (Precision in the table) of 75.5%, an F1 value (F1-Score in the table) of 76.4%, and an AOA value (Overlap Accuracy in the table) of 99.1%. It can be seen from the performance indicators in the above table that the methods provided in the embodiments of the present application are superior to the existing ECG signal quality classification methods.
[0164] It should be noted that the high Acc value and Se value in the above performance indicators indicate that the model has a strong performance in effectively identifying positive samples. Since the features of each sample ECG signal fragment are extracted in advance in the embodiment of the present application, the sample feature information is obtained, so that the RF classifier provided by the present application determines the best performance index compared with other classifiers. Among them, the high P+ and F1 values reflect the excellent performance of the proposed model in minimizing false positives while distinguishing positives. This shows that while the model accurately identifies high-quality signals, it also effectively reduces the situation where low-quality signals are misclassified as high-quality signals. By capturing key features related to low-quality signals (such as basSQI and pSQI), the model effectively distinguishes and correctly classifies. In addition, using unique features such as MWP and ACFpeak, it is possible to accurately distinguish the subtle differences between adjacent quality levels, thereby producing high AOA values. In addition, comprehensive and accurate labeling and evaluation strategies help to dig deep into specific signal characteristics.
[0165] The classification model provided in this embodiment can quickly identify the overall level of the signal and obtain the corresponding signal quality level, which is convenient for effectively screening out the signal features in the large data set, making the operation more efficient and streamlined.
[0166] See also Fig.11 As shown, Fig.11The scatter plot, residual plot and residual distribution plot of the signal quality score evaluation method of 26 features + random forest RF provided in the embodiment of the present application compared with the three existing methods, and its performance indicators include R value and RMSE. The R value of the method obtained by calculation in the present embodiment is 0.934, which is the maximum value among the four methods, indicating that there is a strong positive correlation between the predicted signal quality score and the actual signal quality score in the present embodiment, showing the strong explanatory power of the regression model for the data. And the RMSE value of the method for determining the signal quality score provided in the embodiment of the present application is the smallest, which is 1.105, indicating that the prediction accuracy is the highest, the data fit is the best, and the prediction result is the most reliable. Please refer to Table 5, which shows the acceptable data ratio of Experiment 2 under different numerical rating deviations, which can include information on APICP under different numerical rating deviations (0.67-Off, 1.33-Off and 2-Off). The APICP values of the 26-feature + random forest RF method provided in Experiment 2 are 53.0%, 71.3% and 81.4% respectively, which are significantly better than other 13-SQIs SVM methods (referred to as 13SQIs in the table), 43-features Quadratic SVM methods (referred to as 43features in the table) and Two-Stream CNN methods. The comparison results are shown in Table 5 below:
[0167] Table 5
[0168] Bias / Methodology 13SQIs 43features Two-stream-CNN This method ±0.67 44.7% 25.7% 43.2% 53.0% ±1.33 64.4% 44.5% 65.7% 71.3% ±2 77.7% 59.3% 79.1% 81.4%
[0169] Specifically, the 26 feature information extracted in the above experiment 2 comprehensively captures the key aspects and nuances in the ECG signal segments, which can enable the model to better identify the complex patterns and trends inherent in the data. Specifically, the 26 feature information includes time domain features, frequency domain features, autocorrelation features, and R-wave features extracted from the ECG signal. Among them, an R-wave detector is used, which uses a double averaging method to identify the R-wave features in the ECG signal segment, and then the statistical features of the RR interval variance, the average template matching correlation coefficient AVEcorr, and the ACFpeak are calculated to highlight more periodic features in the signal. In addition, the local change information is characterized by MWP.
[0170] Compared with the traditional 13-SQIs SVM method, the 26-feature method provided in this application not only deeply studies the overall performance, but also pays close attention to the local changes within the signal. This comprehensive strategy enables the method to capture specific change information within the signal, thereby enhancing the model's ability to identify complex details. Compared with the traditional 43-features Quadratic SVM method, the 26-feature method provided in this application simplifies the complexity of feature extraction and model training while reducing the risk of overfitting and improving computational efficiency. Compared with the Two-Stream CNN method, the 26-feature method provided in this application does not require a large number of complex nonlinear calculations, reducing computational complexity. A more sophisticated regression model for determining the quality score of the ECG signal is established in this application, which extracts subtle change features of the ECG signal segments, thereby achieving a highly accurate quantitative evaluation of the quality of the ECG signal.
[0171] In an exemplary embodiment, Fig.12 As shown, the embodiment of the present application also provides an electrocardiogram signal quality assessment device for implementing the electrocardiogram signal quality assessment method involved above. An electrocardiogram signal quality assessment device is provided, comprising:
[0172] An acquisition module 610 is used to acquire the ECG signal data to be processed;
[0173] A preprocessing module 620, used for preprocessing the ECG signal data to be processed to obtain a plurality of ECG signal segments;
[0174] The feature extraction module 630 is used to perform feature extraction processing on each ECG signal segment to obtain feature information of the ECG signal data to be processed, wherein the feature information includes at least one of the following: time domain feature, frequency domain feature, autocorrelation feature and target wave feature; the autocorrelation feature is used to characterize the correlation between characteristic wave groups of each cardiac cycle in the ECG signal segment, and the target wave feature is the feature of any type of wave in the ECG signal segment;
[0175] The quality assessment module 640 is used to input feature information into a trained quality assessment model to obtain a quality assessment result corresponding to the quality assessment model. The quality assessment model is trained based on sample ECG signal data and corresponding annotation results.
[0176] As an optional implementation, the feature extraction module 630 is specifically used for:
[0177] Performing time domain feature analysis on each ECG signal segment to obtain time domain features, and obtaining the power spectrum density function of the ECG signal segment, and analyzing the power spectrum density function to obtain frequency domain features;
[0178] Obtaining vector element values corresponding to each time point in each ECG signal segment, and determining autocorrelation features according to the vector element values;
[0179] Detect the target wave in each ECG signal segment and obtain the target wave feature.
[0180] Optionally, the feature extraction module 630 is further used to:
[0181] Detecting the target wave in the ECG signal segment and determining the position and amplitude of the target wave;
[0182] Determine the target wave characteristics based on the position and amplitude of the target wave.
[0183] Optionally, the quality assessment module 640 is specifically used to:
[0184] Inputting the characteristic information into the classification model to obtain the signal quality level of the ECG signal data to be processed; and / or,
[0185] The feature information is input into the regression model to obtain the signal quality score of the ECG signal data to be processed; wherein, the signal quality level is divided according to the degree of influence of noise on the identification of QRS complex in the ECG signal segment, and the signal quality score is determined according to the degree of influence of noise on the P wave, T wave and QRS complex in the ECG signal segment.
[0186] Optionally, the classification model is constructed as follows:
[0187] Acquire sample ECG signal data, pre-process the sample ECG signal data, and obtain a plurality of sample ECG signal segments; the sample ECG signal segments are annotated with signal quality level annotation results;
[0188] Divide the sample ECG signal fragments into k parts;
[0189] Select k-1 sample ECG signal fragments as the training set, and another sample ECG signal fragment as the verification set. Use the training set to optimize the parameters in the classification model to be trained to obtain the classification model to be verified, and input the verification set into the classification model to be verified to obtain the prediction result; k>1;
[0190] Repeat the above steps k times to obtain k prediction results, determine the performance index according to the k prediction results, and determine the classification model to be verified with the best performance index as the classification model.
[0191] Optionally, the above device is also used for:
[0192] Perform feature extraction on the training set to obtain sample feature information;
[0193] Input the sample feature information into the classification model to be trained to obtain the output result;
[0194] Construct a loss function based on the output results and the signal quality level labeling results corresponding to the training set;
[0195] According to the minimization of the loss function, the classification model to be trained is iteratively trained to obtain the classification model to be verified.
[0196] Optionally, the time domain features include at least one of the following: peak value, root mean square, variance, morphological length, maximum window power, crest factor, pulse factor, marginal factor, shape factor, skewness, and kurtosis of the ECG signal segment;
[0197] The frequency domain features include at least one of the following: frequency entropy, center frequency, mean square frequency, variance frequency, baseline signal quality index, power signal quality index;
[0198] The target wave feature includes at least one of the following: target wave index, target wave variance, target wave interval variance, target wave interval kurtosis, target wave interval skewness, relative energy signal quality index, relative standard deviation signal quality index, and average template matching correlation coefficient.
[0199] The ECG signal quality assessment device provided in the present embodiment can extract feature information of the ECG signal data to be processed in a finer granularity by preprocessing the ECG signal data to be processed into multiple ECG signal segments, and the feature information is the time domain features, frequency domain features, autocorrelation features and target wave features in the unique form of the capacitive coupling detection method, thereby providing more detailed data guidance information for subsequent quality assessment; on the other hand, by inputting the feature information into a trained quality assessment model, the corresponding quality assessment results can be determined in a finer granularity and comprehensively, thereby improving the accuracy of the quality assessment, thereby improving data support for specific clinical scenarios and facilitating better clinical analysis.
[0200] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Fig.13As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store quality assessment data of electrocardiogram signals. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for quality assessment of electrocardiogram signals is implemented.
[0201] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0202] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0203] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0204] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0205] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0206] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A method for evaluating the quality of an electrocardiogram signal, characterized in that: The quality assessment method of the electrocardiogram signal comprises: Obtaining ECG signal data to be processed; Preprocessing the ECG signal data to be processed to obtain a plurality of ECG signal segments; Performing feature extraction processing on each of the ECG signal segments to obtain feature information of the ECG signal data to be processed, wherein the feature information includes at least one of the following: time domain features, frequency domain features, autocorrelation features, and target wave features; the autocorrelation features are used to characterize the correlation between characteristic wave groups of each cardiac cycle in the ECG signal segment, and the target wave features are features of any type of wave in the ECG signal segment; The characteristic information is input into a trained quality assessment model to obtain a quality assessment result corresponding to the quality assessment model, wherein the quality assessment model is trained based on sample electrocardiogram signal data and corresponding annotation results.
2. The method for evaluating the quality of an electrocardiogram signal according to claim 1, characterized in that: Performing feature extraction processing on each of the ECG signal segments to obtain feature information of the ECG signal data to be processed includes: Performing time domain feature analysis on each of the electrocardiogram signal segments to obtain the time domain features; Acquire the power spectral density function of the electrocardiogram signal segment, analyze the power spectral density function, and obtain the frequency domain feature; Obtaining vector element values corresponding to each time point in each of the electrocardiogram signal segments, and determining the autocorrelation feature according to the vector element values; Detect the target wave in each of the electrocardiogram signal segments to obtain the target wave feature.
3. The method for evaluating the quality of an electrocardiogram signal according to claim 2, characterized in that: Detecting a target wave in each of the electrocardiogram signal segments to obtain the target wave characteristics includes: Detecting a target wave in the electrocardiogram signal segment, and determining a position and an amplitude of the target wave; The target wave characteristics are determined according to the position and amplitude of the target wave.
4. The method for evaluating the quality of an electrocardiogram signal according to claim 1, characterized in that: The quality assessment model includes a classification model or a regression model. The feature information is input into the trained quality assessment model to obtain a quality assessment result corresponding to the quality assessment model, including: The characteristic information is input into the classification model to obtain the signal quality level of the ECG signal data to be processed; and / or, the characteristic information is input into the regression model to obtain the signal quality score of the ECG signal data to be processed; wherein, the signal quality level is divided according to the influence of noise on the identification of QRS complex in the ECG signal segment, and the signal quality score is determined according to the influence of noise on the P wave, T wave and QRS complex in the ECG signal segment.
5. The method for evaluating the quality of an electrocardiogram signal according to claim 4, characterized in that: The classification model is constructed in the following steps: Acquire sample ECG signal data, pre-process the sample ECG signal data, and obtain a plurality of sample ECG signal segments; the sample ECG signal segments are annotated with signal quality level annotation results; Dividing the sample ECG signal segment into k parts; Select k-1 sample ECG signal segments as a training set, and another sample ECG signal segment as a validation set, optimize the parameters in the classification model to be trained through the training set to obtain the classification model to be verified, and input the validation set into the classification model to be verified to obtain a prediction result; k>1; Repeat the above steps k times to obtain k prediction results, determine the performance index according to the k prediction results, and determine the classification model to be verified with the best performance index as the classification model.
6. The method for evaluating the quality of an electrocardiogram signal according to claim 5, characterized in that: Optimizing the parameters in the classification model to be trained by using the training set to obtain the classification model to be verified, including: Performing feature extraction processing on the training set to obtain sample feature information; Inputting the sample feature information into the classification model to be trained to obtain an output result; Constructing a loss function according to the output result and the signal quality level labeling result corresponding to the training set; According to the minimization of the loss function, the classification model to be trained is iteratively trained to obtain the classification model to be verified.
7. The method for evaluating the quality of an electrocardiogram signal according to any one of claims 1 to 6, characterized in that: The time domain features include at least one of the following: peak value, root mean square, variance, morphological length, maximum window power, crest factor, pulse factor, marginal factor, shape factor, skewness, and kurtosis of the ECG signal segment; The frequency domain features include at least one of the following: frequency entropy, center frequency, mean square frequency, variance frequency, baseline signal quality index, power signal quality index; The target wave feature includes at least one of the following: target wave index, target wave variance, target wave interval variance, target wave interval kurtosis, target wave interval skewness, relative energy signal quality index, relative standard deviation signal quality index, and average template matching correlation coefficient.
8. A device for evaluating the quality of an electrocardiogram signal, characterized in that: The electrocardiogram signal quality assessment device comprises: An acquisition module, used for acquiring the ECG signal data to be processed; A preprocessing module, used for preprocessing the ECG signal data to be processed to obtain a plurality of ECG signal segments; A feature extraction module, used for performing feature extraction processing on each of the ECG signal segments to obtain feature information of the ECG signal data to be processed, wherein the feature information includes at least one of the following: time domain feature, frequency domain feature, autocorrelation feature and target wave feature; the autocorrelation feature is used to characterize the correlation between characteristic wave groups of each cardiac cycle in the ECG signal segment, and the target wave feature is a feature of any type of wave in the ECG signal segment; The quality assessment module is used to input the feature information into a trained quality assessment model to obtain a quality assessment result corresponding to the quality assessment model, wherein the quality assessment model is trained based on sample ECG signal data and corresponding annotation results.
9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for evaluating the quality of electrocardiogram signals described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for evaluating the quality of an electrocardiogram signal described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Electrocardiosignal quality evaluation method and device based on high-dimensional fuzzy recognition
CN102512158A
Monitoring equipment and parameter performance improvement method and system thereof
CN104434310A
An apparatus and method for evaluating multichannel ECG signals
CN105611872A
Electrocardiosignal quality evaluation method
CN107811631A
Quality evaluation method and apparatus, model establishment method and module, and wearable device
CN109643579A
Cited By
Control method and system for balloon counterpulsation system in aorta
CN119587868A
