CN110141244A - Electrocardiogram personal identification method - Google Patents
Electrocardiogram personal identification method Download PDFInfo
- Publication number
- CN110141244A CN110141244A CN201910538626.0A CN201910538626A CN110141244A CN 110141244 A CN110141244 A CN 110141244A CN 201910538626 A CN201910538626 A CN 201910538626A CN 110141244 A CN110141244 A CN 110141244A
- Authority
- CN
- China
- Prior art keywords
- test
- coefficient vector
- signal
- train
- sample
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/117—Identification of persons
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
- A61B5/346—Analysis of electrocardiograms
- A61B5/349—Detecting specific parameters of the electrocardiograph cycle
- A61B5/352—Detecting R peaks, e.g. for synchronising diagnostic apparatus; Estimating R-R interval
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7203—Signal processing specially adapted for physiological signals or for diagnostic purposes for noise prevention, reduction or removal
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7253—Details of waveform analysis characterised by using transforms
- A61B5/726—Details of waveform analysis characterised by using transforms using Wavelet transforms
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7264—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
- A61B5/7267—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Pathology (AREA)
- Biomedical Technology (AREA)
- Heart & Thoracic Surgery (AREA)
- Medical Informatics (AREA)
- Molecular Biology (AREA)
- Surgery (AREA)
- Animal Behavior & Ethology (AREA)
- Biophysics (AREA)
- Public Health (AREA)
- Veterinary Medicine (AREA)
- Artificial Intelligence (AREA)
- Signal Processing (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physiology (AREA)
- Psychiatry (AREA)
- Cardiology (AREA)
- Evolutionary Computation (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
Abstract
本发明公开了心电图身份识别方法,它包括:1)导入数据;2)去除心电信号的噪声;3)提取R波;4)构建特征;5)对样本进行自动识别6)输出分类结果a。与现有技术相比,本发明的优势是:采用心跳信号进行识别,有效减小了身份识别需要的信号采集时间,减小了计算成本,本方法中对训练集采用k‑medoids聚类,使得本方法对含噪声的信号进行身份识别的鲁棒性比较好,对小样本起到的作用更加明显。The invention discloses an electrocardiogram identification method, which comprises: 1) importing data; 2) removing noise of electrocardiogram signals; 3) extracting R waves; 4) constructing features; 5) automatically identifying samples; 6) outputting classification results a . Compared with the prior art, the advantages of the present invention are: the heartbeat signal is used for identification, which effectively reduces the signal acquisition time required for identification and reduces the calculation cost. In this method, k-medoids clustering is used for the training set, The robustness of the method for identification of noisy signals is better, and the effect on small samples is more obvious.
Description
技术领域technical field
本发明涉及医学信号处理技术领域,更确切地说一种心电图身份识别方法。The invention relates to the technical field of medical signal processing, more specifically an electrocardiogram identification method.
背景技术Background technique
生物特征识别技术(Biometrics) 是指通过计算机与光学、声学、生物传感器和生物统计学原理等高科技手段密切 结合,利用人体固有的生理特性(如指纹、人脸、虹膜、脑电波、脉搏等)或行为 特征(如笔迹、语音、步态等)来进行个人身份的认证。生物特征识别技术具有不会遗忘、不易伪造或被盗、随身携带和随时随地可用等优点,比传统的身份认证方法更加安全、保密、方便。Biometrics refers to the close combination of computer and high-tech means such as optics, acoustics, biosensors and biostatistics principles, using the inherent physiological characteristics of the human body (such as fingerprints, face, iris, brain waves, pulse, etc.). ) or behavioral characteristics (such as handwriting, voice, gait, etc.) for personal identity authentication. Biometric identification technology has the advantages of not being forgotten, not easily forged or stolen, portable and available anytime, anywhere, and is more secure, confidential and convenient than traditional identity authentication methods.
近年来借助于人体内蕴的心电信号ECG( Electrocardiogram)进行身份识别的方法广受关注。ECG 是从人体体表采集的反映心脏心动的电位信号,人体的生理条件差异使得ECG 具有许多个体特征。相较指纹、语音以及手掌,ECG 作为一种活体生物信号,具备易检测、难复制的特点。利用心电信号进行身份识别的定义为:给定一条心电信号,判定该信号所属人的身份。利用心电信号进行自动身份识别的系统或装置通常基于模式识别技术进行实现。In recent years, the method of identification by means of ECG (Electrocardiogram) inherent in the human body has attracted wide attention. ECG is a potential signal collected from the human body surface that reflects the heartbeat. The differences in the physiological conditions of the human body make ECG have many individual characteristics. Compared with fingerprints, voices and palms, ECG, as a living biological signal, is easy to detect and difficult to replicate. The definition of using ECG signal for identification is: given an ECG signal, determine the identity of the person to which the signal belongs. A system or device for automatic identification using ECG signals is usually implemented based on pattern recognition technology.
在这种情况下,与心电图相关的辅助设备发展迅速,随着信息领域的科技进步,特别是随着模式识别技术的进展,在实际应用中利用心电图设备进行身份识别的效果也越来越好。In this case, the auxiliary equipment related to ECG is developing rapidly. With the advancement of science and technology in the field of information, especially with the progress of pattern recognition technology, the effect of using ECG equipment for identification in practical applications is getting better and better. .
心电图设备的核心是心电图身份识别系统,在已公开的基于心电信号的身份识别技术中大多数采取的是多特征点提取方案,多特征点提取方案操作复杂、运算量庞大。因此关于心跳信号的识别方法开始兴起,此类方法的主要优势在于从心电信号中分割一些独立的心跳信号来识别,提高了心电信号身份识别的实际应用效果。The core of the ECG equipment is the ECG identification system. Most of the published identification technologies based on ECG signals adopt multi-feature point extraction schemes, which are complicated in operation and huge in computation. Therefore, the identification methods of heartbeat signals have begun to emerge. The main advantage of such methods is that some independent heartbeat signals are identified from the ECG signals, which improves the practical application effect of ECG signal identification.
发明内容SUMMARY OF THE INVENTION
本发明的目的是为解决用一段较长时间的心电图进行身份识别时间长、成本高的问题,而提供一种心电图身份识别方法。The purpose of the present invention is to provide an electrocardiogram identification method in order to solve the problems of long time and high cost for identification using a long period of electrocardiogram.
心电图身份识别方法,它包括:ECG identification method, which includes:
1)导入数据1) Import data
从外部采集N个人的单导联心电信号,每人采集两条,N大于50,存储为数组变量S,共计2N条。对2N条心电信号的2N个标签存储为变量label_L;Collect the single-lead ECG signals of N people from the outside, and collect two pieces of each person, N is greater than 50, and store it as an array variable S, with a total of 2N pieces. 2N labels of 2N ECG signals are stored as variable label_L;
2)去除心电信号的噪声2) Remove the noise of the ECG signal
对数组变量S内每一个数组执行小波分解重构算法,结果存储为数组变量S1;Execute the wavelet decomposition and reconstruction algorithm for each array in the array variable S, and store the result as the array variable S1;
3)提取R波3) Extract the R wave
在数组变量S1内每一个数组中找到m个R波峰值点位置,共计2N*m个位置,在每个位置前取99点,在每个位置后取100点,包含当前位置点共计取200点作为一条R波。2N*m个位置提取到2N*m条R波,依次放入2N*m行、200列的矩阵中,记该变量为Y,作为构建特征方法的输入信号;对应变量Y内2N*m条R波的2N*m个标签存储为变量label;Find m R wave peak point positions in each array in the array variable S1, a total of 2N*m positions, take 99 points before each position, take 100 points after each position, and take a total of 200 points including the current position. point as an R wave. 2N*m positions are extracted to 2N*m R waves, which are sequentially placed in a matrix of 2N*m rows and 200 columns, and this variable is recorded as Y, as the input signal of the feature construction method; 2N*m waves in the corresponding variable Y The 2N*m labels of the R wave are stored as the variable label;
4)构建特征4) Build features
a.将Y中的R波划分训练集和测试集,把从N个人的第一条信号中提取的N*m条R波作为训练集,第二条信号中提取的N*m条R波,作为测试集,分别存放在N*m行、200列的矩阵中,记为train和test;从变量label中划分出训练集和测试集对应的标签,分别存放在长度为N*m的数组中,训练集标签记为train_label,测试集标签记为test_label;将训练集train和测试集test分别分割为N*m*20段,每一段长度为10,分别存放在N*m*20行、10列的矩阵中,记为train_f和test_f;a. Divide the R waves in Y into training set and test set, take N*m R waves extracted from the first signal of N people as the training set, and N*m R waves extracted from the second signal as the training set. The test set is stored in a matrix of N*m rows and 200 columns, denoted as train and test; the labels corresponding to the training set and the test set are divided from the variable label, and stored in an array of length N*m respectively, The training set label is recorded as train_label, and the test set label is recorded as test_label; the training set train and test set test are divided into N*m*20 segments, each segment is 10 in length, and stored in N*m*20 rows and 10 columns respectively In the matrix of , denoted as train_f and test_f;
b.对train_f执行k-medoids聚类,设置聚类簇数为50,聚类后得到大小为50*10的矩阵,记为C1,将C1转置得到10*50的矩阵,记为C,对train_f和C计算欧式距离,计算结果存放在N*m*20行、50列的矩阵中,记为train_sample_f;对test_f和C计算欧式距离,计算结果存放在N*m*20行、50列的矩阵中,记为test_sample_f;b. Perform k-medoids clustering on train_f, set the number of clusters to 50, get a matrix of size 50*10 after clustering, denoted as C1, transpose C1 to get a matrix of 10*50, denoted as C, Calculate the Euclidean distance for train_f and C, and store the calculation result in a matrix of N*m*20 rows and 50 columns, denoted as train_sample_f; calculate the Euclidean distance for test_f and C, and store the calculation results in N*m*20 rows and 50 columns In the matrix of , denoted as test_sample_f;
c.将训练集样本train_sample_f和测试集样本test_sample_f分别按照列优先的原则变维为N*m行、1000列的矩阵并归一化到[0,1]之间,记为train_sample和test_sample;c. Transform the training set sample train_sample_f and the test set sample test_sample_f into a matrix of N*m rows and 1000 columns according to the principle of column priority, and normalize them to [0,1], denoted as train_sample and test_sample;
train_sample即为构建好的测试集特征,test_sample即为构建好的测试集特征;train_sample is the constructed test set feature, and test_sample is the constructed test set feature;
5)对样本进行自动识别5) Automatically identify samples
将训练集特征train_sample进行稀疏,把稀疏后的训练集特征以及对应的标签train_label全部输入到LR分类器中进行训练,LR分类器训练结束后,保留参数,再将测试集特征test_sample进行稀疏,把稀疏后的测试集特征以及对应的标签test_label输入到训练好的LR分类器进行测试;Sparse the training set feature train_sample, and input all the sparsed training set features and the corresponding label train_label into the LR classifier for training. After the LR classifier is trained, keep the parameters, and then sparse the test set feature test_sample. The sparse test set features and the corresponding label test_label are input to the trained LR classifier for testing;
识别结果为判断R波所属个体的判断准确率a;The recognition result is the judgment accuracy rate a for judging the individual to which the R wave belongs;
6)输出分类结果a。6) Output the classification result a.
所述小波分解重构算法为:The wavelet decomposition and reconstruction algorithm is:
a.小波分解:选择Harr函数作为小波基。数组变量S内每一个数组分解得到近似系数向量cA1,细节系数向量cD1;对cA1分解得到近似系数向量cA2, 细节系数向量cD2;对cA2分解得到近似系数向量cA3, 细节系数向量cD3;对cA3分解得到近似系数向量cA4, 细节系数向量cD4;对cA4分解得到近似系数向量cA5, 细节系数向量cD5;对cA5分解得到近似系数向量cA6, 细节系数向量cD6;对cA6分解得到近似系数向量cA7, 细节系数向量cD7;对cA7分解得到近似系数向量cA8, 细节系数向量cD8;a. Wavelet decomposition: choose Harr function as the wavelet basis. Each array in the array variable S is decomposed to obtain approximate coefficient vector cA1, detail coefficient vector cD1; decompose cA1 to obtain approximate coefficient vector cA2, detail coefficient vector cD2; decompose cA2 to obtain approximate coefficient vector cA3, detail coefficient vector cD3; decompose cA3 Obtain approximate coefficient vector cA4, detail coefficient vector cD4; decompose cA4 to obtain approximate coefficient vector cA5, detail coefficient vector cD5; decompose cA5 to obtain approximate coefficient vector cA6, detail coefficient vector cD6; decompose cA6 to obtain approximate coefficient vector cA7, detail coefficient Vector cD7; decompose cA7 to obtain approximate coefficient vector cA8, detail coefficient vector cD8;
b.去除噪声:对需要去噪的信号cD2,采用软阈值方式去噪。各层系数降噪所需要的阈值不同,采用STDC作为噪声强度估计;b. Remove noise: For the signal cD2 that needs to be removed, use the soft threshold method to remove noise. The thresholds required for noise reduction of each layer coefficient are different, and STDC is used as the noise intensity estimation;
STDC公式:stdc2 = median(|cD2|)/0.6745,其中median(M)为计算M的平均值;STDC formula: stdc2 = median(|cD2|)/0.6745, where median(M) is the mean of calculating M;
计算出每一层的阈值:Calculate the threshold for each layer:
thr2=(2*log(length(cD2)))^(1/2)*stdc2,其中length(cD2)为计算细节向量cD2的长度;thr2=(2*log(length(cD2)))^(1/2)*stdc2, where length(cD2) is the length of the calculated detail vector cD2;
对需要去噪的信号cD2,将cD2中模值小于3* thr2的系数置零,将模值大于3* thr2的系数做处理:大于3* thr2的系数统一减去3* thr2,小于-3* thr2的系数统一加3* thr2For the signal cD2 that needs to be de-noised, set the coefficients whose modulus value is less than 3* thr2 in cD2 to zero, and process the coefficients whose modulus value is greater than 3* thr2: uniformly subtract 3* thr2 from the coefficients greater than 3* thr2, and less than -3 * The coefficient of thr2 is uniformly added 3* thr2
计算后得到去噪后的信号cd2;After the calculation, the denoised signal cd2 is obtained;
对cD3、cD4、cD5、cD6、cD7、cD8也采用上述软阈值方式去除噪声,得到cd3、cd4、cd5、cd6、cd7、cd8。The above soft threshold method is also used to remove noise for cD3, cD4, cD5, cD6, cD7, and cD8 to obtain cd3, cd4, cd5, cd6, cd7, and cd8.
c.小波重构:对分解得到的系数向量cA8置零并赋给ca8,对cd8完成小波重构得到信号ca7;对cd7完成小波重构得到信号ca6;对cd6完成小波重构得到信号ca5;对cd5完成小波重构得到信号ca4;对ca4完成小波重构得到信号ca3;对cd3完成小波重构得到信号ca2;对cd2完成小波重构得到信号ca1;ca1即为S内一个数组执行小波分解重构算法的结果。c. Wavelet reconstruction: set the coefficient vector cA8 obtained by decomposition to zero and assign it to ca8, complete wavelet reconstruction for cd8 to obtain signal ca7; complete wavelet reconstruction for cd7 to obtain signal ca6; complete wavelet reconstruction for cd6 to obtain signal ca5; complete wavelet reconstruction for cd6 to obtain signal ca5; Complete wavelet reconstruction to obtain signal ca4; complete wavelet reconstruction for ca4 to obtain signal ca3; complete wavelet reconstruction for cd3 to obtain signal ca2; complete wavelet reconstruction for cd2 to obtain signal ca1; ca1 is an array in S to perform wavelet decomposition and reconstruction the result of the algorithm.
与现有技术相比,本发明的优势是:采用心跳信号进行识别,有效减小了身份识别需要的信号采集时间,减小了计算成本,本方法中对训练集采用k-medoids聚类,使得本方法对含噪声的信号进行身份识别的鲁棒性比较好,对小样本起到的作用更加明显。Compared with the prior art, the present invention has the advantages that the heartbeat signal is used for identification, which effectively reduces the signal acquisition time required for identification and reduces the calculation cost. In this method, k-medoids clustering is used for the training set, The robustness of the method for identification of noisy signals is better, and the effect on small samples is more obvious.
具体实施方式Detailed ways
实施例1一种心电图身份识别方法Embodiment 1 A kind of electrocardiogram identification method
下面结合具体的实施方式对本发明作进一步说明。The present invention will be further described below in conjunction with specific embodiments.
具体实例中使用国际通行心电图数据库ECG-ID,该数据库的数据及使用说明公开于行业内周知的physionet .org网站。ECG-ID 数据集包含310录音, 从90个主题获得 (44个男性和46位女性)。每一个记录含有一个导联的信号, 记录在30秒的持续时间, 并数字化在500赫兹与12位分辨率超过标称±10 mv 范围。在本实例中,共使用55个人的单导联心电信号,每人采集两条通过工作在计算机上的软件系统和行业内所周知的Matlab仿真环境进行实现。In the specific example, the international electrocardiogram database ECG-ID is used, and the data and usage instructions of the database are published on the well-known physionet.org website in the industry. The ECG-ID dataset contains 310 recordings obtained from 90 subjects (44 males and 46 females). Each recording contains the signal of one lead, recorded over a 30 s duration, and digitized at 500 Hz with 12-bit resolution over the nominal ±10 mV range. In this example, a total of 55 people's single-lead ECG signals are used, and each person collects two signals through a software system working on a computer and a well-known Matlab simulation environment in the industry.
本实施例的详细步骤如下:The detailed steps of this embodiment are as follows:
一.导入数据one. Import Data
从外部采集55个人的单导联心电信号,每人采集两条,存储为数组变量S,所述的数组变量S存储共计110条心电信号。对应数组变量S内110条心电信号的110个标签存储为变量label_L。The single-lead ECG signals of 55 people are collected from the outside, and each person collects two pieces of ECG signals, which are stored as an array variable S, and the array variable S stores a total of 110 ECG signals. The 110 labels corresponding to the 110 ECG signals in the array variable S are stored as variable label_L.
二.去除心电信号的噪声two. Remove noise from ECG signals
对数组变量S内每一个数组执行小波分解重构算法,结果存储为数组变量S1,S1内每个数组对应S内一个数组执行小波分解重构算法的结果。所述小波分解重构算法为:The wavelet decomposition and reconstruction algorithm is performed on each array in the array variable S, and the result is stored as an array variable S1, and each array in S1 corresponds to the result of the wavelet decomposition and reconstruction algorithm performed on an array in S. The wavelet decomposition and reconstruction algorithm is:
(1)小波分解(1) Wavelet decomposition
选择Harr函数作为小波基。对数组变量S内每一个数组分解得到近似系数向量cA1,细节系数向量cD1;对cA1分解得到近似系数向量cA2, 细节系数向量cD2;对cA2分解得到近似系数向量cA3, 细节系数向量cD3;对cA3分解得到近似系数向量cA4, 细节系数向量cD4;对cA4分解得到近似系数向量cA5, 细节系数向量cD5;对cA5分解得到近似系数向量cA6, 细节系数向量cD6;对cA6分解得到近似系数向量cA7, 细节系数向量cD7;对cA7分解得到近似系数向量cA8, 细节系数向量cD8。Select the Harr function as the wavelet basis. Decompose each array in the array variable S to obtain approximate coefficient vector cA1, detail coefficient vector cD1; decompose cA1 to obtain approximate coefficient vector cA2, detail coefficient vector cD2; decompose cA2 to obtain approximate coefficient vector cA3, detail coefficient vector cD3; Decompose to obtain approximate coefficient vector cA4, detail coefficient vector cD4; decompose cA4 to obtain approximate coefficient vector cA5, detail coefficient vector cD5; decompose cA5 to obtain approximate coefficient vector cA6, detail coefficient vector cD6; decompose cA6 to obtain approximate coefficient vector cA7, detail coefficient vector Coefficient vector cD7; decompose cA7 to obtain approximate coefficient vector cA8 and detail coefficient vector cD8.
(2)去除噪声(2) remove noise
对需要去噪的信号cD2,采用软阈值方式去噪。各层系数降噪所需要的阈值不同,采用STDC作为噪声强度估计For the signal cD2 that needs to be de-noised, a soft threshold method is used to de-noise. The thresholds required for the noise reduction of the coefficients of each layer are different, and STDC is used as the noise intensity estimation
STDC公式:stdc2 = median(|cD2|)/0.6745,其中median(M)为计算M的平均值STDC formula: stdc2 = median(|cD2|)/0.6745, where median(M) is the mean of calculating M
计算出每一层的阈值:Calculate the threshold for each layer:
thr2=(2*log(length(cD2)))^(1/2)*stdc2,其中length(cD2)为计算细节向量cD2的长度thr2=(2*log(length(cD2)))^(1/2)*stdc2, where length(cD2) is the length of the calculated detail vector cD2
对需要去噪的信号cD2,将cD2中模小于3* thr2的系数全部置零,而将模大于3* thr2的做一个比较特殊的处理,大于3* thr2的系数统一减去3* thr2,小于-3* thr2的系数统一加3* thr2For the signal cD2 that needs to be de-noised, set all coefficients in cD2 whose modulus is less than 3* thr2 to zero, and do a special treatment for those whose modulus is greater than 3* thr2. The coefficients greater than 3* thr2 are uniformly subtracted by 3* thr2, Coefficients less than -3* thr2 are uniformly added to 3* thr2
计算后得到去噪后的信号cd2。After the calculation, the denoised signal cd2 is obtained.
对cD3、cD4、cD5、cD6、cD7、cD8也采用上述软阈值方式去除噪声。得到cd3、cd4、cd5、cd6、cd7、cd8。The above soft threshold method is also used to remove noise for cD3, cD4, cD5, cD6, cD7, and cD8. Get cd3, cd4, cd5, cd6, cd7, cd8.
(3)小波重构(3) Wavelet reconstruction
对分解得到的系数向量cA8直接置零并赋给ca8,对ca8,cd8完成小波重构得到信号ca7;对ca7,cd7完成小波重构得到信号ca6;对ca6,cd6完成小波重构得到信号ca5;对ca5,cd5完成小波重构得到信号ca4;对ca4,cd4完成小波重构得到信号ca3;对ca3,cd3完成小波重构得到信号ca2;对ca2,cd2完成小波重构得到信号ca1。ca1即为S内一个数组执行小波分解重构算法的结果。The coefficient vector cA8 obtained by decomposing is directly set to zero and assigned to ca8, and the wavelet reconstruction of ca8 and cd8 is completed to obtain the signal ca7; the wavelet reconstruction of ca7 and cd7 is completed to obtain the signal ca6; the wavelet reconstruction of ca6 and cd6 is completed to obtain the signal ca5 ; Complete wavelet reconstruction for ca5, cd5 to obtain signal ca4; complete wavelet reconstruction for ca4, cd4 to obtain signal ca3; complete wavelet reconstruction for ca3, cd3 to obtain signal ca2; complete wavelet reconstruction for ca2, cd2 to obtain signal ca1. ca1 is the result of performing the wavelet decomposition and reconstruction algorithm for an array in S.
三.提取R波three. Extract R waves
(1)在数组变量S1内每一个数组中找到13个R波峰值点位置(心电图数据库ECG-ID有个别单导联心电图信号只有13个R波峰值点),共计1430个位置。在每个位置前取99点,在每个位置后取100点,包含当前位置点共计取200点作为一条R波,1430个位置提取到1430条R波,将这些R波依次放入1430行、200列的矩阵中,命名该变量为Y。(1) Find 13 R wave peak points in each array in the array variable S1 (the ECG database ECG-ID has only 13 R wave peak points for individual single-lead ECG signals), a total of 1430 positions. Take 99 points before each position and 100 points after each position, including the current position, take a total of 200 points as an R wave, extract 1430 R waves from 1430 positions, and put these R waves into 1430 lines in turn , 200-column matrix, name the variable Y.
(2)Y将会作为构建特征方法的输入信号。对应变量Y内1430条R波的1430个标签存储为变量label。(2) Y will be used as the input signal to construct the feature method. The 1430 labels corresponding to the 1430 R waves in variable Y are stored as variable label.
四.构建特征Four. build feature
所述构建特征方法的输入信号为Y,Y内存储着从110条心电信号中提取的1430条R波。The input signal of the feature building method is Y, and Y stores 1430 R waves extracted from 110 ECG signals.
(1)将Y中的R波划分训练集和测试集,将从每个人第一条信号中提取的715条R波作为训练集,存放在715行、200列的矩阵中并命名为train,将从每个人第二条信号中提取的715条R波,存放在715行、200列的矩阵中并命名为test。从变量label中划分出训练集和测试集对应的标签,得到训练集标签存放在长度为715的数组中,命名为train_label。得到测试集标签存放在长度为715的数组中,命名为test_label。将训练集train分割为14300段,每一段长度为10,存放在14300行、10列的矩阵中,命名为train_f;将测试集test分割为14300段,每一段长度为10,存放在14300行、10列的矩阵中,命命名为test_f。(1) Divide the R waves in Y into the training set and the test set, and use the 715 R waves extracted from each person's first signal as the training set, which are stored in a matrix of 715 rows and 200 columns and named as train, The 715 R waves extracted from each person's second signal are stored in a matrix of 715 rows and 200 columns and named test. The labels corresponding to the training set and the test set are divided from the variable label, and the training set labels are stored in an array of length 715, named train_label. The obtained test set label is stored in an array of length 715 named test_label. Divide the training set train into 14300 segments, each segment is 10 in length, stored in a matrix of 14300 rows and 10 columns, named train_f; the test set test is divided into 14300 segments, each segment is 10 in length, stored in 14300 rows, 10-column matrix, named test_f.
(2)对train_f进行k-medoids聚类,聚类数为50,聚类后得到大小为50*10的矩阵,命名为C1。将C1转置得到10*50的矩阵,命名为C,对train_f和C计算欧式距离.计算结果存放在14300行、50列的矩阵中,命名为train_sample_f;对test_f和C计算欧式距离. 计算结果存放在14300行、50列的矩阵中,命名为test_sample_f。(2) Perform k-medoids clustering on train_f, the number of clusters is 50, and a matrix of size 50*10 is obtained after clustering, named C1. Transpose C1 to get a 10*50 matrix, named C, and calculate the Euclidean distance for train_f and C. The calculation result is stored in a matrix of 14300 rows and 50 columns, named train_sample_f; calculate the Euclidean distance for test_f and C. The calculation result Stored in a matrix of 14300 rows and 50 columns, named test_sample_f.
在matlab中kmedoids的用法为:The usage of kmedoids in matlab is:
[C1,~] = kmedoids(train_f,50)[C1,~] = kmedoids(train_f,50)
在matlab中dist函数计算欧式距离:The dist function in matlab calculates the Euclidean distance:
train_sample_f=dist(train_f,C);train_sample_f=dist(train_f,C);
(3)将训练集样本train_sample_f按照列优先的原则变维为715行、1000列的矩阵并归一化(在matlab中用mapminmax函数实现,下同)到[0,1]之间,命名为train_sample;将测试集样本train_sample_f按照列优先的原则变维为715行、1000列的矩阵并归一化到[0,1]之间,命名为test_sample。(3) Transform the training set sample train_sample_f into a matrix of 715 rows and 1000 columns according to the principle of column priority and normalize it (implemented with the mapminmax function in matlab, the same below) to [0,1], named as train_sample; transform the test set sample train_sample_f into a matrix with 715 rows and 1000 columns according to the principle of column priority and normalize it to [0,1], named test_sample.
train_sample即为构建好的测试集特征,test_sample即为构建好的测试集特征。train_sample is the constructed test set feature, and test_sample is the constructed test set feature.
五.对样本进行自动识别five. Automatic identification of samples
将训练集特征train_sample进行稀疏,把稀疏后的训练集特征以及对应的标签train_label全部输入到LR分类器中进行训练,LR分类器训练结束后,保留参数,再将测试集特征test_sample进行稀疏,把稀疏后的测试集特征以及对应的标签test_label输入到训练好的LR分类器进行测试。Sparse the training set feature train_sample, and input all the sparsed training set features and the corresponding label train_label into the LR classifier for training. After the LR classifier is trained, keep the parameters, and then sparse the test set feature test_sample. The sparse test set features and the corresponding label test_label are input to the trained LR classifier for testing.
测试结束后网络会自动给出识别结果。识别结果为判断R波所属个体的判断准确率a。After the test, the network will automatically give the recognition result. The recognition result is the judgment accuracy rate a for judging the individual to which the R wave belongs.
六、输出分类结果a。6. Output the classification result a.
结果显示在表1中The results are shown in Table 1
。 .
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910538626.0A CN110141244A (en) | 2019-06-20 | 2019-06-20 | Electrocardiogram personal identification method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910538626.0A CN110141244A (en) | 2019-06-20 | 2019-06-20 | Electrocardiogram personal identification method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110141244A true CN110141244A (en) | 2019-08-20 |
Family
ID=67596138
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910538626.0A Pending CN110141244A (en) | 2019-06-20 | 2019-06-20 | Electrocardiogram personal identification method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110141244A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112257518A (en) * | 2020-09-30 | 2021-01-22 | 西安交通大学第二附属医院 | ECG identification method based on WT and WOA-PNN algorithm |
CN117496256A (en) * | 2023-11-14 | 2024-02-02 | 中国人民解放军军事科学院系统工程研究院 | Small sample electromagnetic signal identification method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4000461A (en) * | 1973-10-04 | 1976-12-28 | Textronix, Inc. | R-wave detector |
WO2005112748A2 (en) * | 2004-05-10 | 2005-12-01 | Meddorna, Llc | Method and apparatus for detecting physiologic signals |
CN107122788A (en) * | 2017-03-09 | 2017-09-01 | 吉林大学 | A kind of personal identification method and device based on electrocardiosignal |
CN108537100A (en) * | 2017-11-17 | 2018-09-14 | 吉林大学 | A kind of electrocardiosignal personal identification method and system based on PCA and LDA analyses |
CN109165556A (en) * | 2018-07-24 | 2019-01-08 | 吉林大学 | One kind being based on GRNN personal identification method |
-
2019
- 2019-06-20 CN CN201910538626.0A patent/CN110141244A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4000461A (en) * | 1973-10-04 | 1976-12-28 | Textronix, Inc. | R-wave detector |
WO2005112748A2 (en) * | 2004-05-10 | 2005-12-01 | Meddorna, Llc | Method and apparatus for detecting physiologic signals |
CN107122788A (en) * | 2017-03-09 | 2017-09-01 | 吉林大学 | A kind of personal identification method and device based on electrocardiosignal |
CN108537100A (en) * | 2017-11-17 | 2018-09-14 | 吉林大学 | A kind of electrocardiosignal personal identification method and system based on PCA and LDA analyses |
CN109165556A (en) * | 2018-07-24 | 2019-01-08 | 吉林大学 | One kind being based on GRNN personal identification method |
Non-Patent Citations (1)
Title |
---|
金林鹏等: "面向临床心电图分析的深层学习算法", 《中国科学:信息科学》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112257518A (en) * | 2020-09-30 | 2021-01-22 | 西安交通大学第二附属医院 | ECG identification method based on WT and WOA-PNN algorithm |
CN117496256A (en) * | 2023-11-14 | 2024-02-02 | 中国人民解放军军事科学院系统工程研究院 | Small sample electromagnetic signal identification method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105411565B (en) | Heart rate variability tagsort method based on broad sense multi-scale wavelet entropy | |
CN103714281B (en) | A kind of personal identification method based on electrocardiosignal | |
Sasikala et al. | Robust r peak and qrs detection in electrocardiogram using wavelet transform | |
Karvounis et al. | An automated methodology for fetal heart rate extraction from the abdominal electrocardiogram | |
CN110786850B (en) | Electrocardiosignal identity recognition method and system based on multi-feature sparse representation | |
Chang et al. | DeepHeart: A deep learning approach for accurate heart rate estimation from PPG signals | |
CN108537100A (en) | A kind of electrocardiosignal personal identification method and system based on PCA and LDA analyses | |
Belgacem et al. | Person identification system based on electrocardiogram signal using LabVIEW | |
CN105320969A (en) | A heart rate variability feature classification method based on multi-scale Renyi entropy | |
CN104473631B (en) | A method and system for instantaneous heart rate recognition based on non-negative blind separation of fetal ECG | |
Khan et al. | Biometric authentication system based on electrocardiogram (ECG) | |
CN112472065A (en) | Disease detection method based on cough sound recognition and related equipment thereof | |
CN115363586B (en) | A psychological stress level assessment system and method based on pulse wave signal | |
CN110141245A (en) | An ECG Feature Vector Extraction Method | |
CN113647908B (en) | Training of waveform recognition model, and electrocardiographic waveform recognition method, device and equipment | |
CN102783945A (en) | Fetal electrocardiogram signal extracting method based on wavelet threshold denoising | |
Chiu et al. | Discrete wavelet transform applied on personal identity verification with ECG signal | |
CN104644160A (en) | Electrocardiogram pseudo-difference signal identification method and device | |
CN116109589A (en) | An image processing method applied to the diagnosis of congestive heart failure | |
CN110141244A (en) | Electrocardiogram personal identification method | |
CN112336369A (en) | Coronary heart disease risk index evaluation system of multichannel heart sound signals | |
Zhong et al. | Maternal ECG removal using short time Fourier transform and convolutional auto-encoder | |
KR102630840B1 (en) | EMG signal-based recognition information extraction system and EMG signal-based recognition information extraction method using the same | |
CN115299910A (en) | A Privacy-Preserving Natural Heart Rate Recognition Method | |
CN110169767A (en) | A kind of search method of electrocardiosignal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190820 |
|
RJ01 | Rejection of invention patent application after publication |