心电导联智能选择方法和系统ECG lead intelligent selection method and system
技术领域Technical field
本发明涉及医疗监护技术领域,特别是涉及一种心电导联智能选择方法和系统。The present invention relates to the field of medical monitoring technologies, and in particular, to an ECG lead intelligent selection method and system.
背景技术Background technique
心电信号的监测和分析是监护仪、心电图机等仪器的一个重要功能。心电信号的采集通常在多个导联上同时进行,对于采集到的多导联信号,仪器通常只选择一个导联的信号进行后续分析,如QRS(magnetic resonance angiography,磁共振血管造影)检波等。若用来分析的导联的电极与人体接触不良时,采集的心电信号会受到严重干扰。The monitoring and analysis of ECG signals is an important function of instruments such as monitors and electrocardiographs. The acquisition of ECG signals is usually performed simultaneously on multiple leads. For the collected multi-lead signals, the instrument usually selects only one lead signal for subsequent analysis, such as QRS (magnetic resonance angiography) detection. Wait. If the electrode of the lead used for analysis is in poor contact with the human body, the collected ECG signal may be seriously disturbed.
传统的心电导联智能选择方法是在一段长度的信号上计算若干种特征量,然后通过与预先设置的经验参数进行比较,判断信号质量的好坏及选择合适导联。从一段长度的信号上获取的特征量很难反应信号短时间的突变情况,手动设定参数的工作量大,并且泛化能力不强,此外还需要进行QRS检波才能完成信号质量的判断及导联的选择。传统的心电导联智能选择方法存在准确度低的缺点。The traditional ECG intelligent selection method is to calculate several kinds of feature quantities on a signal of a length, and then compare the pre-set empirical parameters to judge the quality of the signal and select a suitable lead. The feature quantity obtained from a signal of a length is difficult to reflect the sudden change of the signal in a short time. The manual setting of the parameter has a large workload and the generalization ability is not strong. In addition, QRS detection is required to complete the signal quality judgment and guidance. The choice of the union. The traditional ECG intelligent selection method has the disadvantage of low accuracy.
发明内容Summary of the invention
基于此,有必要针对上述问题,提供一种准确度高的心电导联智能选择方法和系统。Based on this, it is necessary to provide a highly accurate ECG lead intelligent selection method and system for the above problems.
一种心电导联智能选择方法,包括以下步骤:An intelligent selection method for ECG leads includes the following steps:
对获取的相同时间段的心电导联信号进行特征提取,得到各所述心电导联信号的全局特征量,所述全局特征量包括所述心电导联信号的积分波的最大值和池化的局部特征量;Performing feature extraction on the acquired ECG lead signals of the same time period to obtain a global feature quantity of each of the ECG lead signals, the global feature quantity including a maximum value of the integrated wave of the ECG lead signal and pooling Local feature quantity
根据所述心电导联信号的积分波的最大值和池化的局部特征量对对应心电导联信号进行分类,得到各所述心电导联信号的信号质量等级;
And classifying the corresponding ECG lead signals according to the maximum value of the integrated wave of the ECG lead signal and the localized feature quantity of the pool, to obtain a signal quality level of each of the ECG lead signals;
提取不同信号质量等级的所述心电导联信号的积分波的最大值和池化的局部特征量进行训练得到质量分类器;Extracting a maximum value of the integrated wave of the ECG lead signal of different signal quality levels and a localized feature quantity of the pool to obtain a quality classifier;
根据所述质量分类器对各所述心电导联信号进行筛选,得到并输出最优心电导联信号。Each of the ECG lead signals is filtered according to the quality classifier to obtain and output an optimal ECG lead signal.
一种心电导联智能选择系统,包括:An intelligent guiding system for ECG leads, comprising:
特征提取模块,用于对获取的相同时间段的心电导联信号进行特征提取,得到各所述心电导联信号的全局特征量,所述全局特征量包括所述心电导联信号的积分波的最大值和池化的局部特征量;a feature extraction module, configured to perform feature extraction on the acquired ECG lead signals of the same time period, to obtain a global feature quantity of each of the ECG lead signals, where the global feature quantity includes an integrated wave of the ECG lead signal Maximum and pooled local feature quantities;
信号分类模块,用于根据所述心电导联信号的积分波的最大值和池化的局部特征量对对应心电导联信号进行分类,得到各所述心电导联信号的信号质量等级;a signal classification module, configured to classify the corresponding ECG lead signals according to the maximum value of the integrated wave of the ECG lead signal and the localized feature quantity of the pool, to obtain a signal quality level of each of the ECG lead signals;
模型训练模块,用于提取不同信号质量等级的所述心电导联信号的积分波的最大值和池化的局部特征量进行训练得到质量分类器;a model training module, configured to extract a maximum value of the integrated wave of the ECG lead signal of different signal quality levels and a localized feature quantity of the pool to obtain a quality classifier;
信号筛选模块,用于根据所述质量分类器对各所述心电导联信号进行筛选,得到并输出最优心电导联信号。The signal screening module is configured to filter each of the ECG lead signals according to the quality classifier to obtain and output an optimal ECG lead signal.
上述心电导联智能选择方法和系统,对获取的相同时间段的心电导联信号进行特征提取,得到各心电导联信号的全局特征量;根据心电导联信号的积分波的最大值和池化的局部特征量对对应心电导联信号进行分类,得到各心电导联信号的信号质量等级。提取不同信号质量等级的心电导联信号的积分波的最大值和池化的局部特征量进行训练得到质量分类器;根据质量分类器对各心电导联信号进行筛选,得到并输出最优心电导联信号。通过提取心电导联信号的全局特征量进行信号分类和建模筛选,引入了池化的局部特征值来表达信号的状态,能很好的反映信号在局部时间的突变情况,准确度高。整个过程无需人员进行干预,节约时间及人力资源,在QRS检波前便可完成信号质量的判断及导联的选择,节约计算量。The above-mentioned ECG intelligent selection method and system perform feature extraction on the obtained ECG lead signals in the same time period, and obtain the global feature quantity of each ECG lead signal; the maximum value and pooling of the integrated wave according to the ECG lead signal The local feature quantity classifies the corresponding ECG lead signals to obtain the signal quality level of each ECG lead signal. Extracting the maximum value of the integrated wave of the ECG lead signal of different signal quality levels and the localized feature quantity of the pooling to obtain the quality classifier; screening the ECG lead signals according to the quality classifier to obtain and output the optimal cardiac conductance Linked signal. By extracting the global feature quantity of the ECG lead signal for signal classification and modeling and screening, the localized eigenvalues of the pool are introduced to express the state of the signal, which can well reflect the sudden change of the signal at local time with high accuracy. The whole process requires no personnel intervention, saving time and human resources. Signal quality judgment and lead selection can be completed before QRS detection, saving calculations.
附图说明DRAWINGS
图1为一实施例中心电导联智能选择方法的流程图;
1 is a flow chart of an embodiment of a central electrical lead intelligent selection method;
图2为一实施例中对获取的相同时间段的心电导联信号进行特征提取,得到各心电导联信号的全局特征量的流程图;2 is a flow chart showing feature extraction of an acquired ECG lead signal of the same time period in an embodiment to obtain a global feature quantity of each ECG lead signal;
图3为一实施例中提取心电导联信号的局部特征量的示意图;3 is a schematic diagram of extracting local feature quantities of an ECG lead signal in an embodiment;
图4为一实施例中根据心电导联信号的积分波的最大值和池化的局部特征量对对应心电导联信号进行分类,得到各心电导联信号的信号质量等级的流程图;4 is a flow chart showing the signal quality level of each ECG lead signal by classifying the corresponding ECG lead signals according to the maximum value of the integrated wave of the ECG lead signal and the localized feature quantity of the pooling in an embodiment;
图5为另一实施例中心电导联智能选择方法的流程图;5 is a flow chart of another embodiment of a center conduction intelligent selection method;
图6为一实施例中心电导联智能选择系统的结构图;6 is a structural diagram of an embodiment of a center conduction intelligent selection system;
图7为一实施例中特征提取模块的结构图;7 is a structural diagram of a feature extraction module in an embodiment;
图8为一实施例中信号分类模块的结构图;8 is a structural diagram of a signal classification module in an embodiment;
图9为另一实施例中心电导联智能选择系统的结构图。9 is a structural diagram of another embodiment of a center conduction intelligent selection system.
具体实施方式detailed description
一种心电导联智能选择方法,适用于监护仪、心电图机等仪器的心电导联筛选。如图1所示,上述包括以下步骤:An intelligent selection method for ECG leads is suitable for ECG lead screening of instruments such as monitors and electrocardiographs. As shown in Figure 1, the above steps include the following steps:
步骤S110:对获取的相同时间段的心电导联信号进行特征提取,得到各心电导联信号的全局特征量。Step S110: Perform feature extraction on the acquired ECG lead signals of the same time period to obtain global feature quantities of the respective ECG lead signals.
获取在相同时间段内采集到的心电导联信号进行特征提取,以用作对信号进行筛选。全局特征量具体包括心电导联信号的积分波的最大值和池化的局部特征量,池化的局部特征量即指在信号的局部区域进行计算并池化处理后得到的特征量。在其中一个实施例中,如图2所示,步骤S110包括步骤S112至步骤S116。The ECG lead signals acquired during the same time period are acquired for feature extraction for use as a signal for screening. The global feature quantity specifically includes the maximum value of the integrated wave of the ECG lead signal and the localized feature quantity of the pooling. The localized feature quantity of the pooling refers to the feature quantity obtained by calculating and pooling the local area of the signal. In one of the embodiments, as shown in FIG. 2, step S110 includes steps S112 to S116.
步骤S112:分别计算各心电导联信号的积分波,提取积分波的最大值。对各心电导联信号进行处理得到积分波,并提取积分波的最大值作为对应心电导联信号的全局特征量的一个维度。Step S112: respectively calculating an integrated wave of each ECG lead signal, and extracting a maximum value of the integrated wave. The ECG lead signal is processed to obtain an integrated wave, and the maximum value of the integrated wave is extracted as a dimension corresponding to the global feature quantity of the ECG lead signal.
步骤S113:分别提取各心电导联信号的基线信号和高频噪声信号。提取各心电导联信号的基线信号和高频噪声信号的具体方式并不唯一,可根据实际情况选择,本实施例中利用中值滤波提取中线信号,利用巴特沃斯滤波器提取
高频噪声信号。在其他实施例中,也可以是通过低通滤波器或其他方式获取基线信号,可以是通过切比雪夫滤波器或其他方式获取高频噪声信号。Step S113: respectively extract a baseline signal and a high frequency noise signal of each ECG lead signal. The specific manner of extracting the baseline signal and the high-frequency noise signal of each ECG lead signal is not unique, and may be selected according to actual conditions. In this embodiment, median filtering is used to extract the midline signal, and the Butterworth filter is used to extract.
High frequency noise signal. In other embodiments, the baseline signal may also be acquired by a low pass filter or other means, and the high frequency noise signal may be obtained by a Chebyshev filter or other means.
步骤S114:根据预设长度和步长对各心电导联信号进行切片处理,得到多个信号段切片。对各心电导联信号进行切片处理得到多个信号段切片,如图3所示为本实施例提取心电导联信号的局部特征量的示意图。预设长度和步长的具体取值并不唯一,本实施例中预设长度和步长分别为0.15s和0.05s。Step S114: performing slice processing on each ECG lead signal according to a preset length and a step size to obtain a plurality of signal segment slices. The electrocardiographic signal is sliced to obtain a plurality of signal segment slices. As shown in FIG. 3, a schematic diagram of the local feature quantity of the ECG lead signal is extracted. The specific values of the preset length and the step size are not unique. In this embodiment, the preset length and the step size are 0.15 s and 0.05 s, respectively.
步骤S115:分别提取各信号段切片上心电导联信号的高度、积分波的高度、基线信号的高度以及高频噪声信号的均值、方差、峰度和峭度,作为各信号段切片的局部特征量。Step S115: respectively extracting the height of the ECG lead signal on each slice segment, the height of the integrated wave, the height of the baseline signal, and the mean, variance, kurtosis and kurtosis of the high frequency noise signal as local features of each signal segment slice. the amount.
本实施例中获取各个信号段切片上心电导联信号的高度、积分波的高度、基线信号的高度以及高频噪声信号的均值、方差、峰度和峭度作为对应信号段切片的局部特征量,以用作后续步骤池化处理后进行信号分类和筛选操作。采集心电导联信号以及提取得到的积分波、基线信号和高频噪声信号的相关参数作为局部特征量,提高对信号的短时间突变的反应能力。可以理解,在其他实施例中,也可获取信号段切片上心电导联信号的其他参数作为局部特征量。In this embodiment, the height of the ECG lead signal on each slice segment, the height of the integrated wave, the height of the baseline signal, and the mean, variance, kurtosis, and kurtosis of the high-frequency noise signal are obtained as local feature quantities of the corresponding signal segment slice. , used as a subsequent step pooling process for signal classification and screening operations. The ECG lead signal and the relevant parameters of the extracted integrated wave, baseline signal and high frequency noise signal are collected as local feature quantities to improve the response ability to short-term mutation of the signal. It can be understood that in other embodiments, other parameters of the ECG lead signal on the slice segment can also be acquired as local feature quantities.
步骤S116:对各信号段切片提取的局部特征量进行最大值池化处理,得到池化的局部特征量。对信号段切片提取得到的局部特征量进行最大值池化处理,得到对应心电导联信号的池化的局部特征量作为全局特征量的其他维度,以用作后续进行信号分类和筛选。最大值池化(max pooling)处理指计算所有被池化特征量在各个维度上的最大值,并将此最大值作为池化特征量在该维度上的值。Step S116: performing a maximum pooling process on the local feature quantities extracted by each signal segment slice to obtain a pooled local feature quantity. The local feature quantity extracted from the signal segment slice is subjected to a maximum pooling process to obtain a pooled local feature quantity corresponding to the ECG lead signal as other dimensions of the global feature quantity for subsequent signal classification and screening. The max pooling process refers to calculating the maximum value of all the pooled feature quantities in each dimension, and using this maximum value as the value of the pooled feature quantity in the dimension.
步骤S120:根据心电导联信号的积分波的最大值和池化的局部特征量对对应心电导联信号进行分类,得到各心电导联信号的信号质量等级。通过提取得到的各心电导联信号的全局特征值,可完成对所有心电导联信号的分类,得到对应的信号质量等级。信号质量等级的具体划分可根据实际情况确定,本实施例中信号质量等级包括优秀和不及格两种等级,在其他实施例中也可将信号质量等级分为三种或三种以上的等级。Step S120: classify the corresponding ECG lead signals according to the maximum value of the integrated wave of the ECG lead signal and the localized feature quantity of the pool, and obtain the signal quality level of each ECG lead signal. By extracting the global eigenvalues of the respective ECG lead signals, the classification of all ECG lead signals can be completed, and the corresponding signal quality level can be obtained. The specific division of the signal quality level may be determined according to actual conditions. In this embodiment, the signal quality level includes two levels of excellent and fail, and in other embodiments, the signal quality level may be classified into three or more levels.
在其中一个实施例中,如图4所示,步骤S120包括步骤S122至步骤S126。
In one of the embodiments, as shown in FIG. 4, step S120 includes steps S122 to S126.
步骤S122:利用K均值算法对接收的全局特征量训练样本集进行训练得到多个数据簇,并计算各数据簇的中心位置和最大半径。Step S122: Training the received global feature quantity training sample set by using a K-means algorithm to obtain a plurality of data clusters, and calculating a center position and a maximum radius of each data cluster.
最大半径指数据簇中离中心位置最远的数据与中心位置的距离。同样以信号质量等级包括优秀和不及格两种等级为例,全局特征量训练样本集为通过提取已确认信号质量为优秀的历史心电导联信号的全局特征量得到的样本集,通过K均值算法(K-Means)进行训练得到多个数据簇后作为等级分类器。计算各个数据簇的中心位置和离中心位置最远的本簇数据的距离。K均值算法的训练过程如下:初始化时,给定簇的个数和随机设定各个簇中心的位置。然后反复执行以下两个步骤:1、将特征量分配给距离最近的簇中心。2、求归属于各个簇的特征量的质心,并将其设为新的簇中心。若这两步的执行次数达到预先给定的阈值,或者簇中心位置的变化程度小于预先给定的阈值,则停止训练,并输出当前的各个簇的中心位置。通过K均值算法进行样本训练,分类准确度高。The maximum radius is the distance between the data in the data cluster that is furthest from the center and the center position. Similarly, the signal quality level includes two levels of excellent and failing. The global feature quantity training sample set is a sample set obtained by extracting the global feature quantity of the historical ECG lead signal whose outstanding signal quality is excellent, and passes the K-means algorithm. (K-Means) is trained to obtain multiple data clusters as a classifier. Calculate the distance between the center position of each data cluster and the current cluster data farthest from the center position. The training process of the K-means algorithm is as follows: at initialization, the number of given clusters and the position of each cluster center are randomly set. Then repeat the following two steps: 1. Assign the feature quantity to the nearest cluster center. 2. Find the centroid of the feature quantity attributed to each cluster and set it as the new cluster center. If the number of executions of the two steps reaches a predetermined threshold, or the degree of change of the cluster center position is less than a predetermined threshold, the training is stopped and the current center position of each cluster is output. The sample training is performed by the K-means algorithm, and the classification accuracy is high.
步骤S124:将各心电导联信号的全局特征量分配至离中心位置距离最近的数据簇,并计算全局特征量与最近数据簇的中心位置的距离。分别将各心电导联信号的全局特征量导入等级分类器中分配到离中心位置距离最近的数据簇,计算得到与该数据簇中心位置的距离。Step S124: Allocating the global feature quantity of each ECG lead signal to the data cluster closest to the center position, and calculating the distance between the global feature quantity and the center position of the nearest data cluster. The global feature quantity of each ECG lead signal is respectively introduced into the classifier to be assigned to the data cluster closest to the center position, and the distance from the center position of the data cluster is calculated.
步骤S126:根据全局特征量与最近数据簇的中心位置的距离得到对应心电导联信号的信号质量等级。判断全局特征量与最近数据簇的中心位置的距离是否小于数据簇的最大半径,若是,则对应心电导联信号为优秀;若否,则对应心电导联信号为不合格。Step S126: Obtain a signal quality level of the corresponding ECG lead signal according to the distance between the global feature quantity and the center position of the nearest data cluster. It is determined whether the distance between the global feature quantity and the center position of the nearest data cluster is smaller than the maximum radius of the data cluster, and if so, the corresponding ECG lead signal is excellent; if not, the corresponding ECG lead signal is unqualified.
可以理解,根据信号质量等级的划分不同,对心电导联信号进行分类的方式也会有所不同。例如当信号质量等级为三个时,可根据全局特征量与最近数据簇的中心位置的距离将心电导联信号划分为优秀、普通和不合格。It can be understood that the manner of classifying the ECG lead signals will be different depending on the division of the signal quality levels. For example, when the signal quality level is three, the ECG lead signal can be classified into excellent, normal, and unqualified according to the distance between the global feature quantity and the center position of the nearest data cluster.
此外,步骤S120之后,步骤S130之前,心电导联智能选择方法还可包括以下步骤:In addition, after step S120, before step S130, the ECG intelligent selection method may further include the following steps:
判断信号质量等级为优秀的心电导联信号是否唯一。若是,则将信号质量等级为优秀的心电导联信号作为最优心电导联信号输出;若否,则进行步骤
S130。在计算得到各心电导联信号的信号质量等级后,如果优秀信号只有一个,则可直接作为最优信号输出,节省计算量。Determine whether the signal quality level is excellent or not. If yes, the ECG lead signal with excellent signal quality level is output as the optimal ECG lead signal; if not, the step is performed.
S130. After calculating the signal quality level of each ECG lead signal, if there is only one excellent signal, it can be directly used as the optimal signal output, saving the calculation amount.
步骤S130:提取不同信号质量等级的心电导联信号的积分波的最大值和池化的局部特征量进行训练得到质量分类器。同样以信号质量等级包括优秀和不合格为例,在计算得到各心电导联信号的信号质量等级后,提取部分优秀和不合格心电导联信号的全局特征量进行训练得到质量分类器。Step S130: extracting the maximum value of the integrated wave of the ECG lead signal of different signal quality levels and the localized feature quantity of the pooling to perform the training to obtain the quality classifier. Similarly, taking the signal quality level including excellent and unqualified as an example, after calculating the signal quality level of each ECG lead signal, the global feature quantity of some excellent and unqualified ECG lead signals is extracted and trained to obtain a quality classifier.
本实施例中步骤S130具体为,将不同信号质量等级的心电导联信号的全局特征量输入到支持向量机算法(support vector machine,SVM)进行训练,得到超平面作为质量分类器。支持向量机的训练过程如下:对于不同信号质量等级的心电导联信号的特征量,将位于边界地区的特征量视为该类信号的支持向量。利用核函数将支持向量映射到高维特征空间后,计算出一个位于不同种类的支持向量之间的最佳超平面,即与不同种类的支持向量的间距之和最大的超平面,该超平面被用作质量分类器。利用支持向量机算法进行训练得到质量分类器,可解决小样本情况下的机器学习问题,提高泛化性能。能将特征量映射到高纬度的核空间中,提高分类的准确度。可以理解,在其他实施例中,也可采样其他机器算法进行训练得到质量分类器,例如决策树,随机森林,神经网络等。In the embodiment, step S130 is specifically: inputting a global feature quantity of the ECG lead signal of different signal quality levels to a support vector machine (SVM) for training, and obtaining a hyperplane as a quality classifier. The training process of the support vector machine is as follows: For the feature quantity of the ECG lead signal of different signal quality levels, the feature quantity located in the boundary area is regarded as the support vector of the signal of the type. After the support vector is mapped to the high-dimensional feature space by the kernel function, an optimal hyperplane between different kinds of support vectors is calculated, that is, the hyperplane with the largest sum of the spacings of different kinds of support vectors, the hyperplane Used as a quality classifier. The support vector machine algorithm is used to train the quality classifier, which can solve the machine learning problem in the small sample case and improve the generalization performance. The feature quantity can be mapped to the high-latitude kernel space to improve the classification accuracy. It can be understood that in other embodiments, other machine algorithms can also be sampled for training to obtain quality classifiers, such as decision trees, random forests, neural networks, and the like.
利用机器学习算法来训练分类器。设定好训练参数后机器学习算法能自动的在大量的数据上训练出分类器。整个训练过程无需用户进行干预,节约时间及人力资源。A machine learning algorithm is utilized to train the classifier. After setting the training parameters, the machine learning algorithm can automatically train the classifier on a large amount of data. The entire training process does not require user intervention, saving time and human resources.
步骤S140:根据质量分类器对各心电导联信号进行筛选,得到并输出最优心电导联信号。根据训练得到的质量分类器对所有心电导联信号进行筛选,识别出一个信号质量相对更加优秀的心电导联信号。输出最优心电导联信号具体可以是发送至显示器进行显示以便观察,也可以是发送至存储器进行存储。Step S140: screening each ECG lead signal according to the quality classifier to obtain and output an optimal ECG lead signal. According to the trained quality classifier, all ECG signals are screened to identify a ECG lead signal with relatively better signal quality. The output of the optimal ECG lead signal may be sent to the display for display for observation, or may be sent to the memory for storage.
在其中一个实施例中,步骤S140具体包括步骤142和步骤144。In one embodiment, step S140 specifically includes step 142 and step 144.
步骤142:计算心电导联信号的全局特征量与超平面的距离。计算相同时间段来自不同心电导联信号的全局特征量与超平面的距离。Step 142: Calculate the distance between the global feature quantity of the ECG lead signal and the hyperplane. Calculate the distance between the global feature quantity and the hyperplane from different ECG lead signals for the same time period.
步骤144:根据全局特征量与超平面的距离对心电导联信号进行筛选,得
到最优心电导联信号并输出。根据全局特征量与超平面的距离对心电导联信号进行筛选的具体方式并不唯一,可以是根据距离按从大到小进行排序,提取前预设个数全局特征量对应的心电导联信号作为最优心电导联信号;也可以是直接提取与超平面距离大于预设距离值的全局特征量对应的心电导联信号作为最优心电导联信号。本实施例中将距离超平面最远的全局特征量对应的心电导联信号作为最优心电导联信号,确保信号筛选可靠性。Step 144: Filter the ECG lead signal according to the distance between the global feature quantity and the hyperplane.
The optimal ECG lead signal is output and output. The specific method for screening the ECG lead signal according to the distance between the global feature quantity and the hyperplane is not unique, and may be sorted according to the distance from the largest to the smallest, and the ECG lead signal corresponding to the preset number of global feature quantities is extracted. As the optimal ECG lead signal, the ECG lead signal corresponding to the global feature quantity whose distance from the hyperplane is greater than the preset distance value may be directly extracted as the optimal ECG lead signal. In this embodiment, the ECG lead signal corresponding to the global feature quantity farthest from the hyperplane is used as the optimal ECG lead signal to ensure signal screening reliability.
在其中一个实施例中,如图5所示,步骤S140之后,心电导联智能选择方法还包括步骤S150。In one embodiment, as shown in FIG. 5, after step S140, the ECG intelligent selection method further includes step S150.
步骤S150:通过基于QRS检波的方法建立金标准,对最优心电导联信号进行检验。Step S150: The gold standard is established by the method based on QRS detection, and the optimal ECG signal is tested.
在评价筛选效果时,建立一个数据的金标准来与步骤S140得到的筛选结果进行比较。本实施例中基于QRS检波的方法来建立金标准(Gold standard),金标准是指当前临床医学界公认的诊断疾病的最可靠、最准确、最好的诊断方法。首先采用QRS检波算法对各个导联的心电信号进行QRS检波,标出R波的位置。然后与QRS检波的金标准进行比较,计算出QRS检波的F1值(F1score)。如果F1值等于1(检波的结果与金标准完全一致),则将该导联的信号质量标为优秀,反之则不合格。在选择心电导联信号时,将F1值最高的导联设为信号质量最佳的心电导联信号。When evaluating the screening effect, a gold standard of data is established to compare with the screening result obtained in step S140. In this embodiment, a gold standard is established based on the QRS detection method. The gold standard refers to the most reliable, accurate, and best diagnostic method for diagnosing diseases recognized by the current clinical medical community. First, the QRS detection algorithm is used to perform QRS detection on the ECG signals of each lead, and the position of the R wave is marked. Then, compared with the gold standard of QRS detection, the F1 value (F1score) of the QRS detection is calculated. If the F1 value is equal to 1 (the result of the detection is exactly the same as the gold standard), the signal quality of the lead is marked as excellent, and vice versa. When the ECG lead signal is selected, the lead with the highest F1 value is set as the ECG lead signal with the best signal quality.
检查通过金标准得到的心电导联信号与步骤S140中得到的最优心电导联信号是否相同,以检测信号筛选是否准确。由于QRS检波是心电信号分析的基础。QRS检波的结果正确与否直接关系到后续分析的准确度。QRS检波算法对噪声有一定的鲁棒性,即使存在噪声也不一定会影响到检波的效果。利用QRS检波的结果建立的金标准,能保证心电信号质量与检波结果的一致性。建立数据金标准评估筛选效果,既能提高分类的准确度,还降低了工作量。It is checked whether the ECG lead signal obtained by the gold standard is the same as the optimal ECG lead signal obtained in step S140 to detect whether the signal screening is accurate. Since QRS detection is the basis for ECG signal analysis. The correctness of the QRS detection is directly related to the accuracy of the subsequent analysis. The QRS detection algorithm is robust to noise, and even if there is noise, it does not necessarily affect the detection effect. The gold standard established by the results of QRS detection can ensure the consistency of ECG signal quality and detection results. Establishing a data gold standard to evaluate the screening effect can not only improve the accuracy of classification, but also reduce the workload.
利用上述心电导联智能选择方法对某一数据库的数据上进行验证。一共46例心电数据,每段数据均有2个导联,长度为30分钟。测试时,从第0秒开始,每5秒选择一次导联,每次选择的数据长度为5秒。最后在选择的导联数据上进行QRS检波。导联选择的总体准确度在95%以上,QRS检波的准确率
与敏感率均在99.5%以上。The above-mentioned ECG intelligent selection method is used to verify the data of a certain database. A total of 46 cases of ECG data, each paragraph has 2 leads, the length is 30 minutes. During the test, starting from the 0th second, the lead is selected every 5 seconds, and the data length selected each time is 5 seconds. Finally, QRS detection is performed on the selected lead data. The overall accuracy of lead selection is above 95%, and the accuracy of QRS detection
The sensitivity rate is above 99.5%.
上述心电导联智能选择方法,通过提取心电导联信号的全局特征量进行信号分类和建模筛选,引入了池化的局部特征值来表达信号的状态,能很好的反映信号在局部时间的突变情况,准确度高。整个过程无需人员进行干预,节约时间及人力资源,在QRS检波前便可完成信号质量的判断及导联的选择,节约计算量。The above-mentioned ECG intelligent selection method extracts the global feature quantity of the ECG lead signal for signal classification and modeling and screening, and introduces the localized feature value of the pool to express the state of the signal, which can well reflect the signal at local time. The mutation is highly accurate. The whole process requires no personnel intervention, saving time and human resources. Signal quality judgment and lead selection can be completed before QRS detection, saving calculations.
本发明还提供了一种心电导联智能选择系统,适用于监护仪、心电图机等仪器的心电导联筛选。如图6所示,上述系统包括特征提取模块110、信号分类模块120、模型训练模块130和信号筛选模块140。The invention also provides an intelligent guiding system for ECG lead, which is suitable for screening ECG leads of instruments such as monitors and electrocardiographs. As shown in FIG. 6, the above system includes a feature extraction module 110, a signal classification module 120, a model training module 130, and a signal screening module 140.
特征提取模块110用于对获取的相同时间段的心电导联信号进行特征提取,得到各心电导联信号的全局特征量。The feature extraction module 110 is configured to perform feature extraction on the acquired ECG lead signals of the same time period to obtain global feature quantities of the respective ECG lead signals.
获取在相同时间段内采集到的心电导联信号进行特征提取,以用作对信号进行筛选。全局特征量包括心电导联信号的积分波的最大值和池化的局部特征量,池化的局部特征量即指在信号的局部区域进行计算并池化处理后得到的特征量。在其中一个实施例中,如图7所示,特征提取模块110包括第一提取单元112、第二提取单元113、第一处理单元114、第三提取单元115和第二处理单元116。The ECG lead signals acquired during the same time period are acquired for feature extraction for use as a signal for screening. The global feature quantity includes the maximum value of the integrated wave of the ECG lead signal and the localized feature quantity of the pooling. The localized feature quantity of the pooling refers to the feature quantity obtained by calculating and pooling the local area of the signal. In one of the embodiments, as shown in FIG. 7, the feature extraction module 110 includes a first extraction unit 112, a second extraction unit 113, a first processing unit 114, a third extraction unit 115, and a second processing unit 116.
第一提取单元112用于分别计算各心电导联信号的积分波,提取积分波的最大值。对各心电导联信号进行处理得到积分波,并提取积分波的最大值作为对应心电导联信号的全局特征量的一个维度。The first extracting unit 112 is configured to separately calculate an integrated wave of each ECG lead signal and extract a maximum value of the integrated wave. The ECG lead signal is processed to obtain an integrated wave, and the maximum value of the integrated wave is extracted as a dimension corresponding to the global feature quantity of the ECG lead signal.
第二提取单元113用于分别提取各心电导联信号的基线信号和高频噪声信号。提取各心电导联信号的基线信号和高频噪声信号的具体方式并不唯一,可根据实际情况选择,本实施例中利用中值滤波提取中线信号,利用巴特沃斯滤波器提取高频噪声信号。在其他实施例中,也可以是通过低通滤波器或其他方式获取基线信号,可以是通过切比雪夫滤波器或其他方式获取高频噪声信号。The second extracting unit 113 is configured to separately extract a baseline signal and a high frequency noise signal of each ECG lead signal. The specific manner of extracting the baseline signal and the high frequency noise signal of each ECG lead signal is not unique, and may be selected according to actual conditions. In this embodiment, median filtering is used to extract the midline signal, and the Butterworth filter is used to extract the high frequency noise signal. . In other embodiments, the baseline signal may also be acquired by a low pass filter or other means, and the high frequency noise signal may be obtained by a Chebyshev filter or other means.
第一处理单元114用于根据预设长度和步长对各心电导联信号进行切片处理,得到多个信号段切片。对各心电导联信号进行切片处理得到多个信号段切
片。预设长度和步长的具体取值并不唯一,本实施例中预设长度和步长分别为0.15s和0.05s。The first processing unit 114 is configured to perform slice processing on each ECG lead signal according to a preset length and a step size to obtain a plurality of signal segment slices. Slicing each ECG lead signal to obtain multiple signal segments
sheet. The specific values of the preset length and the step size are not unique. In this embodiment, the preset length and the step size are 0.15 s and 0.05 s, respectively.
第三提取单元115用于分别提取各信号段切片上心电导联信号的高度、积分波的高度、基线信号的高度以及高频噪声信号的均值、方差、峰度和峭度,作为各信号段切片的局部特征量。The third extracting unit 115 is configured to separately extract the height of the ECG lead signal on each slice segment, the height of the integrated wave, the height of the baseline signal, and the mean, variance, kurtosis and kurtosis of the high frequency noise signal as the signal segments. The local feature quantity of the slice.
本实施例中获取各个信号段切片上心电导联信号的高度、积分波的高度、基线信号的高度以及高频噪声信号的均值、方差、峰度和峭度作为对应信号段切片的局部特征量,以用作后续步骤池化处理后进行信号分类和筛选操作。采集心电导联信号以及提取得到的积分波、基线信号和高频噪声信号的相关参数作为局部特征量,提高对信号的短时间突变的反应能力。可以理解,在其他实施例中,也可获取信号段切片上心电导联信号的其他参数作为局部特征量。In this embodiment, the height of the ECG lead signal on each slice segment, the height of the integrated wave, the height of the baseline signal, and the mean, variance, kurtosis, and kurtosis of the high-frequency noise signal are obtained as local feature quantities of the corresponding signal segment slice. , used as a subsequent step pooling process for signal classification and screening operations. The ECG lead signal and the relevant parameters of the extracted integrated wave, baseline signal and high frequency noise signal are collected as local feature quantities to improve the response ability to short-term mutation of the signal. It can be understood that in other embodiments, other parameters of the ECG lead signal on the slice segment can also be acquired as local feature quantities.
第二处理单元116用于对各信号段切片提取的局部特征量进行最大值池化处理,得到池化的局部特征量。对信号段切片提取得到的局部特征量进行最大值池化处理,得到对应心电导联信号的池化的局部特征量作为全局特征量的其他维度,以用作后续进行信号分类和筛选。The second processing unit 116 is configured to perform a maximum pooling process on the local feature quantities extracted by each signal segment slice to obtain a pooled local feature quantity. The local feature quantity extracted from the signal segment slice is subjected to a maximum pooling process to obtain a pooled local feature quantity corresponding to the ECG lead signal as other dimensions of the global feature quantity for subsequent signal classification and screening.
信号分类模块120用于根据心电导联信号的积分波的最大值和池化的局部特征量对对应心电导联信号进行分类,得到各心电导联信号的信号质量等级。通过提取得到的各心电导联信号的全局特征值,可完成对所有心电导联信号的分类,得到对应的信号质量等级。信号质量等级的具体划分可根据实际情况确定,本实施例中信号质量等级包括优秀和不及格两种等级,在其他实施例中也可将信号质量等级分为三种或三种以上的等级。The signal classification module 120 is configured to classify the corresponding ECG lead signals according to the maximum value of the integrated wave of the ECG lead signal and the localized feature quantity of the pool, to obtain the signal quality level of each ECG lead signal. By extracting the global eigenvalues of the respective ECG lead signals, the classification of all ECG lead signals can be completed, and the corresponding signal quality level can be obtained. The specific division of the signal quality level may be determined according to actual conditions. In this embodiment, the signal quality level includes two levels of excellent and fail, and in other embodiments, the signal quality level may be classified into three or more levels.
在其中一个实施例中,如图8所示,信号分类模块120包括第一分类单元122、第二分类单元124和第三分类单元126。In one of the embodiments, as shown in FIG. 8, the signal classification module 120 includes a first classification unit 122, a second classification unit 124, and a third classification unit 126.
第一分类单元122用于利用K均值算法对接收的全局特征量训练样本集进行训练得到多个数据簇,并计算各数据簇的中心位置和最大半径。The first classifying unit 122 is configured to train the received global feature quantity training sample set by using a K-means algorithm to obtain a plurality of data clusters, and calculate a center position and a maximum radius of each data cluster.
最大半径指数据簇中离中心位置最远的数据与中心位置的距离。样以信号质量等级包括优秀和不及格两种等级为例,全局特征量训练样本集为通过提取已确认信号质量为优秀的历史心电导联信号的全局特征量得到的样本集,通过
K均值算法进行训练得到多个数据簇后作为等级分类器。计算各个数据簇的中心位置和离中心位置最远的本簇数据的距离。通过K均值算法进行样本训练,分类准确度高。The maximum radius is the distance between the data in the data cluster that is furthest from the center and the center position. For example, the signal quality level includes two levels of excellent and failing. The global feature quantity training sample set is a sample set obtained by extracting the global feature quantity of the historical ECG lead signal with the confirmed signal quality as excellent.
The K-means algorithm is trained to obtain multiple data clusters as a classifier. Calculate the distance between the center position of each data cluster and the current cluster data farthest from the center position. The sample training is performed by the K-means algorithm, and the classification accuracy is high.
第二分类单元124用于将各心电导联信号的全局特征量分配至离中心位置距离最近的数据簇,并计算全局特征量与最近数据簇的中心位置的距离。分别将各心电导联信号的全局特征量导入等级分类器中分配到离中心位置距离最近的数据簇,计算得到与该数据簇中心位置的距离。The second classification unit 124 is configured to allocate the global feature quantity of each ECG lead signal to the data cluster closest to the center position, and calculate the distance between the global feature quantity and the center position of the nearest data cluster. The global feature quantity of each ECG lead signal is respectively introduced into the classifier to be assigned to the data cluster closest to the center position, and the distance from the center position of the data cluster is calculated.
第三分类单元126用于根据全局特征量与最近数据簇的中心位置的距离得到对应心电导联信号的信号质量等级。判断全局特征量与最近数据簇的中心位置的距离是否小于数据簇的最大半径,若是,则对应心电导联信号为优秀;若否,则对应心电导联信号为不合格。The third classifying unit 126 is configured to obtain a signal quality level of the corresponding ECG lead signal according to the distance between the global feature quantity and the center position of the nearest data cluster. It is determined whether the distance between the global feature quantity and the center position of the nearest data cluster is smaller than the maximum radius of the data cluster, and if so, the corresponding ECG lead signal is excellent; if not, the corresponding ECG lead signal is unqualified.
可以理解,根据信号质量等级的划分不同,对心电导联信号进行分类的方式也会有所不同。例如当信号质量等级为三个时,可根据全局特征量与最近数据簇的中心位置的距离将心电导联信号划分为优秀、普通和不合格。It can be understood that the manner of classifying the ECG lead signals will be different depending on the division of the signal quality levels. For example, when the signal quality level is three, the ECG lead signal can be classified into excellent, normal, and unqualified according to the distance between the global feature quantity and the center position of the nearest data cluster.
模型训练模块130用于提取不同信号质量等级的心电导联信号的积分波的最大值和池化的局部特征量进行训练得到质量分类器。同样以信号质量等级包括优秀和不合格为例,在计算得到各心电导联信号的信号质量等级后,提取部分优秀和不合格心电导联信号的全局特征量进行训练得到质量分类器。The model training module 130 is configured to extract the maximum value of the integrated wave of the ECG lead signal of different signal quality levels and the localized feature quantity of the pool to perform the training to obtain the quality classifier. Similarly, taking the signal quality level including excellent and unqualified as an example, after calculating the signal quality level of each ECG lead signal, the global feature quantity of some excellent and unqualified ECG lead signals is extracted and trained to obtain a quality classifier.
本实施例中模型训练模块130提取不同信号质量等级的心电导联信号的积分波的最大值和池化的局部特征量进行训练得到质量分类器具体为,将不同信号质量等级的心电导联信号的全局特征量输入到支持向量机算法进行训练,得到超平面作为质量分类器。In this embodiment, the model training module 130 extracts the maximum value of the integrated wave of the ECG lead signal of different signal quality levels and the localized feature quantity of the pool to obtain the quality classifier, specifically, the ECG lead signal of different signal quality levels. The global feature quantity is input to the support vector machine algorithm for training, and the hyperplane is obtained as the quality classifier.
利用支持向量机算法进行训练得到质量分类器,可解决小样本情况下的机器学习问题,提高泛化性能。能将特征量映射到高纬度的核空间中,提高分类的准确度。The support vector machine algorithm is used to train the quality classifier, which can solve the machine learning problem in the small sample case and improve the generalization performance. The feature quantity can be mapped to the high-latitude kernel space to improve the classification accuracy.
此外,信号分类模块120在得到各心电导联信号的信号质量等级后,还可用于判断信号质量等级为优秀的心电导联信号是否唯一。若是,则将信号质量等级为优秀的心电导联信号作为最优心电导联信号输出;若否,则控制模型训
练模块130提取不同信号质量等级的心电导联信号的积分波的最大值和池化的局部特征量进行训练得到质量分类器。在计算得到各心电导联信号的信号质量等级后,如果优秀信号只有一个,则可直接作为最优信号输出,节省计算量。In addition, after obtaining the signal quality level of each ECG lead signal, the signal classification module 120 can also be used to determine whether the ECG lead signal with excellent signal quality level is unique. If yes, the ECG lead signal with excellent signal quality level is output as the optimal ECG lead signal; if not, the control model training
The training module 130 extracts the maximum value of the integrated wave of the ECG lead signal of different signal quality levels and the localized feature quantity of the pool to train the quality classifier. After calculating the signal quality level of each ECG lead signal, if there is only one excellent signal, it can be directly used as the optimal signal output, saving the calculation amount.
信号筛选模块140用于根据质量分类器对各心电导联信号进行筛选,得到并输出最优心电导联信号。根据训练得到的质量分类器对所有心电导联信号进行筛选,识别出一个信号质量相对更加优秀的心电导联信号。输出最优心电导联信号具体可以是发送至显示器进行显示以便观察,也可以是发送至存储器进行存储。The signal screening module 140 is configured to filter each ECG lead signal according to the quality classifier, and obtain and output an optimal ECG lead signal. According to the trained quality classifier, all ECG signals are screened to identify a ECG lead signal with relatively better signal quality. The output of the optimal ECG lead signal may be sent to the display for display for observation, or may be sent to the memory for storage.
在其中一个实施例中,信号筛选模块140具体包括第一筛选单元和第二筛选单元。In one embodiment, the signal screening module 140 specifically includes a first screening unit and a second screening unit.
第一筛选单元用于计算心电导联信号的全局特征量与超平面的距离。计算相同时间段来自不同心电导联信号的全局特征量与超平面的距离。The first screening unit is configured to calculate the distance between the global feature quantity of the ECG lead signal and the hyperplane. Calculate the distance between the global feature quantity and the hyperplane from different ECG lead signals for the same time period.
第二筛选单元用于根据全局特征量与超平面的距离对心电导联信号进行筛选,得到最优心电导联信号并输出。根据全局特征量与超平面的距离对心电导联信号进行筛选的具体方式并不唯一,可以是根据距离按从大到小进行排序,提取前预设个数全局特征量对应的心电导联信号作为最优心电导联信号;也可以是直接提取与超平面距离大于预设距离值的全局特征量对应的心电导联信号作为最优心电导联信号。本实施例中将距离超平面最远的全局特征量对应的心电导联信号作为最优心电导联信号,确保信号筛选可靠性。The second screening unit is configured to filter the ECG lead signal according to the distance between the global feature quantity and the hyperplane to obtain an optimal ECG lead signal and output. The specific method for screening the ECG lead signal according to the distance between the global feature quantity and the hyperplane is not unique, and may be sorted according to the distance from the largest to the smallest, and the ECG lead signal corresponding to the preset number of global feature quantities is extracted. As the optimal ECG lead signal, the ECG lead signal corresponding to the global feature quantity whose distance from the hyperplane is greater than the preset distance value may be directly extracted as the optimal ECG lead signal. In this embodiment, the ECG lead signal corresponding to the global feature quantity farthest from the hyperplane is used as the optimal ECG lead signal to ensure signal screening reliability.
在其中一个实施例中,如图9所示,心电导联智能选择系统还可包括信号检验模块150。In one of the embodiments, as shown in FIG. 9, the ECG intelligent selection system can further include a signal verification module 150.
信号检验模块150用于在信号筛选模块140根据质量分类器对各心电导联信号进行筛选,得到并输出最优心电导联信号之后,通过基于QRS检波的方法建立金标准,对最优心电导联信号进行检验。The signal checking module 150 is configured to filter the ECG lead signals according to the quality classifier after the signal screening module 140 obtains and outputs the optimal ECG lead signal, and then establishes a gold standard based on the QRS detection method to optimize the cardiac conductance. The joint signal is tested.
本实施例中基于QRS检波的方法来建立金标准并对筛选结果进行比较的具体方式在上述心电导联智能选择方法进行了详细的解释说明,在此不再赘述。由于QRS检波是心电信号分析的基础。QRS检波的结果正确与否直接关系到后续分析的准确度。QRS检波算法对噪声有一定的鲁棒性,即使存在噪声
也不一定会影响到检波的效果。利用QRS检波的结果建立的金标准,能保证心电信号质量与检波结果的一致性。建立数据金标准评估筛选效果,既能提高分类的准确度,还降低了工作量。In the embodiment, the method for establishing a gold standard based on the QRS detection method and comparing the screening results is explained in detail in the above-mentioned ECG intelligent selection method, and details are not described herein again. Since QRS detection is the basis for ECG signal analysis. The correctness of the QRS detection is directly related to the accuracy of the subsequent analysis. The QRS detection algorithm is robust to noise even if noise is present
It does not necessarily affect the effect of detection. The gold standard established by the results of QRS detection can ensure the consistency of ECG signal quality and detection results. Establishing a data gold standard to evaluate the screening effect can not only improve the accuracy of classification, but also reduce the workload.
上述心电导联智能选择系统,通过提取心电导联信号的全局特征量进行信号分类和建模筛选,引入了池化的局部特征值来表达信号的状态,能很好的反映信号在局部时间的突变情况,准确度高。整个过程无需人员进行干预,节约时间及人力资源,在QRS检波前便可完成信号质量的判断及导联的选择,节约计算量。The above-mentioned ECG intelligent selection system performs signal classification and modeling screening by extracting the global feature quantity of the ECG lead signal, and introduces the localized feature value of the pool to express the state of the signal, which can well reflect the signal at local time. The mutation is highly accurate. The whole process requires no personnel intervention, saving time and human resources. Signal quality judgment and lead selection can be completed before QRS detection, saving calculations.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, All should be considered as the scope of this manual.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。
The above-described embodiments are merely illustrative of several embodiments of the present invention, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the invention. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the invention. Therefore, the scope of the invention should be determined by the appended claims.