[go: up one dir, main page]

CN120995247B - ECG signal classification system, method, equipment, medium and product - Google Patents

ECG signal classification system, method, equipment, medium and product

Info

Publication number
CN120995247B
CN120995247B CN202511500776.4A CN202511500776A CN120995247B CN 120995247 B CN120995247 B CN 120995247B CN 202511500776 A CN202511500776 A CN 202511500776A CN 120995247 B CN120995247 B CN 120995247B
Authority
CN
China
Prior art keywords
ecg signal
class
unit
determining
heart rate
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.)
Active
Application number
CN202511500776.4A
Other languages
Chinese (zh)
Other versions
CN120995247A (en
Inventor
王慧泉
苗冯博
唐建同
赵军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tiangong University
Original Assignee
Tianjin Polytechnic University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tianjin Polytechnic University filed Critical Tianjin Polytechnic University
Priority to CN202511500776.4A priority Critical patent/CN120995247B/en
Publication of CN120995247A publication Critical patent/CN120995247A/en
Application granted granted Critical
Publication of CN120995247B publication Critical patent/CN120995247B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording for evaluating the cardiovascular system, e.g. pulse, heart rate, blood pressure or blood flow
    • A61B5/024Measuring pulse rate or heart rate
    • A61B5/02405Determining heart rate variability
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • A61B5/352Detecting R peaks, e.g. for synchronising diagnostic apparatus; Estimating R-R interval
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • A61B5/363Detecting tachycardia or bradycardia
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/725Details of waveform analysis using specific filters therefor, e.g. Kalman or adaptive filters
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7253Details of waveform analysis characterised by using transforms
    • A61B5/726Details of waveform analysis characterised by using transforms using Wavelet transforms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/10Pre-processing; Data cleansing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/02Preprocessing
    • G06F2218/04Denoising
    • G06F2218/06Denoising by applying a scale-space analysis, e.g. using wavelet analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/08Feature extraction
    • G06F2218/10Feature extraction by analysing the shape of a waveform, e.g. extracting parameters relating to peaks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching

Landscapes

  • Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Cardiology (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Animal Behavior & Ethology (AREA)
  • Medical Informatics (AREA)
  • Pathology (AREA)
  • Surgery (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physiology (AREA)
  • Psychiatry (AREA)
  • Signal Processing (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Fuzzy Systems (AREA)
  • Software Systems (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)

Abstract

本申请公开了一种ECG信号分类系统、方法、设备、介质及产品,该系统包括:数据预处理模块对ECG信号滤波处理,重构纯净信号;特征提取模块对纯净信号多尺度特征提取,确定时域、频域和非线性域的心率变异性特征,生成多维生理特征向量;模型学习优化模块在模型学习阶段,通过对比学习多维生理特征向量,引导深度神经网络模型学习具备区分能力的判别特征表达,在模型优化阶段,基于类中心限制机制,建立空间类中心;置信区间决策模块计算待测ECG信号到所有空间类中心的最小类中心距离,构建置信区间,对待测ECG信号进行分类,确定ECG信号类型,本申请能够识别出未见或未知ECG信号类型。

This application discloses an ECG signal classification system, method, device, medium, and product. The system includes: a data preprocessing module for filtering ECG signals and reconstructing clean signals; a feature extraction module for multi-scale feature extraction of clean signals, determining heart rate variability features in the time domain, frequency domain, and nonlinear domain, and generating multi-dimensional physiological feature vectors; a model learning and optimization module for guiding a deep neural network model to learn discriminative feature expressions with distinguishing capabilities by comparing and learning multi-dimensional physiological feature vectors during the model learning stage, and establishing spatial class centers based on a class center constraint mechanism during the model optimization stage; and a confidence interval decision module for calculating the minimum class center distance from the ECG signal to be tested to all spatial class centers, constructing confidence intervals, classifying the ECG signal to be tested, and determining the ECG signal type. This application can identify unseen or unknown ECG signal types.

Description

ECG signal classification system, method, equipment, medium and product
Technical Field
The present application relates to the field of signal processing, and in particular, to an ECG signal classification system, method, apparatus, medium and product.
Background
The classification model relies on labeling annotations for each known ECG signal followed by fitting, although good recognition performance is achieved. However, well-annotated ECG data sets typically cover only limited ECG signal types, and conventional classification models trained with limited ECG signal types can only identify those ECG signal types that have been observed in the training set, and cannot identify undiscovered or unknown ECG signal types that are not included in the training data.
Disclosure of Invention
It is an object of the present application to provide an ECG signal classification system, method, apparatus, medium and product to address the inability to identify an unseen or unknown ECG signal type.
In order to achieve the above object, the present application provides the following.
In a first aspect, the present application provides an ECG signal classification system comprising the following modules.
And the data preprocessing module is used for carrying out filtering processing on the ECG signal and reconstructing a clean signal.
And the feature extraction module is used for carrying out multi-scale feature extraction on the pure signals, determining heart rate variability features of a time domain, a frequency domain and a nonlinear domain, and generating multidimensional physiological feature vectors suitable for deep neural network model input according to the heart rate variability features.
The model learning optimization module is used for guiding the deep neural network model to learn the distinguishing characteristic expression with distinguishing capability by contrasting and learning the multidimensional physiological characteristic vector in the model learning stage, establishing a space class center based on a class center limiting mechanism in the model optimization stage, and optimizing the deep neural network model, wherein the multidimensional physiological characteristic vector comprises a positive sample and a negative sample.
The confidence interval decision module is used for calculating the minimum class center distance from the ECG signal to be detected to all the space class centers, constructing a confidence interval, classifying the ECG signal to be detected according to the minimum class center distance and the confidence interval, and determining the ECG signal type, wherein the ECG signal type comprises a known class and an unknown class.
In a second aspect, the present application provides a method of ECG signal classification, comprising the steps of.
And (3) filtering the ECG signal based on the data preprocessing module to reconstruct a clean signal.
And based on a feature extraction module, performing multi-scale feature extraction on the pure signal, determining heart rate variability features of a time domain, a frequency domain and a nonlinear domain, and generating a multi-dimensional physiological feature vector suitable for deep neural network model input according to the heart rate variability features.
Based on a model learning optimization module, in a model learning stage, the multi-dimensional physiological feature vector is used for guiding the deep neural network model to learn the distinguishing feature expression with distinguishing capability through comparison and learning, in a model optimization stage, a space class center is established based on a class center limiting mechanism, and the deep neural network model is optimized, wherein the multi-dimensional physiological feature vector comprises a positive sample and a negative sample.
Based on a confidence interval decision module, calculating the minimum class center distance from an ECG signal to be detected to all space class centers, constructing a confidence interval, classifying the ECG signal to be detected according to the minimum class center distance and the confidence interval, and determining an ECG signal type, wherein the ECG signal type comprises a known class and an unknown class.
In a third aspect, the present application provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the computer program to implement the ECG signal classification method described above.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the ECG signal classification method described above.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the ECG signal classification method described above.
According to the specific embodiment provided by the application, the method has the technical effects that the multi-domain HRV characteristics of the ECG signal are comprehensively captured by fusing the multi-domain heart rate variability (HEART RATE Variability, HRV) characteristics, namely the HRV characteristics of a fixed domain, a frequency domain and a nonlinear domain, the characteristic characterization capability is improved, and meanwhile, the problem that the traditional model can only identify the known type of the ECG signal through a deep neural network model and a confidence interval based on contrast learning and a class center limiting mechanism is solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an ECG signal classification system according to an embodiment of the present application.
Fig. 2 is a flowchart of an ECG signal classification method according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The application will be further described in detail with reference to the drawings and detailed description below in order to make the objects, features and advantages of the application more comprehensible.
As shown in FIG. 1, an embodiment of the present application provides an ECG signal classification system comprising the following modules.
And the data preprocessing module is used for carrying out filtering processing on the ECG signal and reconstructing a clean signal.
And the feature extraction module is used for carrying out multi-scale feature extraction on the pure signals, determining heart rate variability features of a time domain, a frequency domain and a nonlinear domain, and generating multidimensional physiological feature vectors suitable for deep neural network model input according to the heart rate variability features.
The model learning optimization module is used for guiding the deep neural network model to learn the distinguishing characteristic expression with distinguishing capability by contrasting and learning the multidimensional physiological characteristic vector in the model learning stage, establishing a space class center based on a class center limiting mechanism in the model optimization stage, and optimizing the deep neural network model, wherein the multidimensional physiological characteristic vector comprises a positive sample and a negative sample.
The confidence interval decision module is used for calculating the minimum class center distance from the ECG signal to be detected to all the space class centers, constructing a confidence interval, classifying the ECG signal to be detected according to the minimum class center distance and the confidence interval, and determining the ECG signal type, wherein the ECG signal type comprises a known class and an unknown class.
In an exemplary embodiment, the data preprocessing module specifically includes the following units.
The wavelet decomposition unit is used for carrying out multi-layer wavelet decomposition on the ECG signal by utilizing a wavelet filter and decomposing the ECG signal into an approximation coefficient and a detail coefficient, wherein the approximation coefficient reflects the low-frequency trend of the ECG signal, and the detail coefficient reflects the high-frequency change of the ECG signal.
And the reconstruction unit is used for reconstructing the pure signal from the highest layer to the bottommost layer according to the approximate coefficient and the detail coefficient.
In practice, the data preprocessing module decomposes the ECG signal using a wavelet filter.
At each decomposition level, the ECG signal is decomposed into approximation coefficients for low frequencies and detail coefficients for high frequencies. The approximation coefficients reflect the low frequency trend portion of the signal and the detail coefficients reflect the high frequency change portion of the signal.
The decomposed approximation coefficients and detail coefficients are processed, such as thresholding, to remove noise. By setting the appropriate threshold, the main features of the ECG signal can be preserved while suppressing noise. And performing inverse transformation on the processed coefficients to reconstruct the pure signal.
The main steps of the method comprise the following steps.
First for an input ECG signalPerforming j-layer wavelet decomposition, and approximating coefficient of j-th layerAnd detail coefficientThe following is provided.
Wherein the approximation coefficientsRepresenting the low frequency components of the ECG signal, preserving the morphology of the signal body, detail coefficientsRepresenting the high frequency content of the ECG signal, including noise and detail; a low-pass filter corresponding to a scale function used in the j-th layer wavelet decomposition for extracting an approximate (low-frequency) component of the signal, wherein n is uniformly defined as an index of discrete time; The filter is a high-pass filter corresponding to a wavelet function used in the j-th layer wavelet decomposition and is used for extracting detail (high frequency) components of signals, and j is a wavelet decomposition layer number index.
The reconstruction of the signal is followed:
Wherein, the In the reverse wavelet reconstruction process, the approximation coefficient and the detail coefficient of the j layer are combined to reconstruct the lower layer signal step by step, and k is the discrete time index or the position index of the filter coefficient and is used to represent the position of the filter or the signal in the rolling and reconstruction process.
Iterative reconstruction is gradually carried out from the j-th layer of the highest layer to the 0-th layer of the lowest layer, and finally pure signals are obtained;For a clean signal of layer 0, i.e. a denoised ECG signal,Is the final output signal obtained by layer-by-layer reverse reconstruction from the highest layer.
In an exemplary embodiment, the feature extraction module specifically includes the following units.
And the positioning unit is used for positioning the R wave crest of the pure signal by adopting a peak detection algorithm.
And the multiscale extraction unit is used for multiscale extracting heart rate variability characteristics of a time domain, a frequency domain and a nonlinear domain of the clean signal according to the original waveform of the clean signal and the sequence of RR intervals based on the R wave peak.
And the processing unit is used for carrying out normalization or standardization processing on the heart rate variability characteristics to determine the processed heart rate variability characteristics, wherein the RR interval is the time interval between adjacent R wave peaks on an electrocardiogram.
And the multidimensional physiological feature vector generation unit is used for generating multidimensional physiological feature vectors suitable for the deep neural network model input according to the processed heart rate variability features.
In practical application, the feature extraction module firstly adopts a Pan-Tompkins peak detection algorithm to position an R wave crest for pure signals, then extracts HRV features of a time domain, a frequency domain and a nonlinear domain in a multi-scale mode based on an RR interval sequence and an original waveform, and finally performs normalization or standardization processing on the obtained HRV feature vectors to generate D-vitamin feature vectors suitable for deep neural network model input.
R peak detection is carried out on the preprocessed electrocardiographic waveform, a dual-threshold QRS wave detection algorithm with Pan-Tompkins self-adaptability is used for R peak positioning of ECG signals, and subsequent HRV feature extraction can be carried out through accurate identification of the R peak position.
HRV time domain features (MeanNN, SDNN, RMSSD, NN and pNN 50), frequency domain features (very low frequency VLF, low frequency power LF, high frequency power HF and LF/HF) and nonlinear features (ApEn, sampEn, poincar e SD1/SD 2) are extracted from the RR interval sequence and the original waveform, a D vitamin feature vector X d∈RD is constructed, the D vitamin feature vector X d is an HRV feature vector, R D is a D-dimensional real space, the extracted D vitamin feature vector X d is a D-dimensional real value vector, and the D-dimensional real space R D belongs to the mathematical Euclidean space.
In an exemplary embodiment, the model learning optimization module specifically includes the following elements.
And the standardized processing unit is used for carrying out standardized processing on the multidimensional physiological characteristic vector and determining the processed characteristic vector.
The contrast learning unit is used for carrying out contrast learning on the processed feature vectors in a model learning stage to construct a contrast relation between positive samples and negative samples, wherein the positive samples are heart rate variability characteristics of similar heart rate arrhythmias, the heart rate variability characteristics of the similar heart rate arrhythmias comprise low-HF characteristics and high-LF/HF characteristics of atrial fibrillation patients, and the negative samples are difficult samples similar to the characteristics of the processed feature vectors but different in diagnosis conclusion.
And the guiding unit is used for guiding the deep neural network model to learn the distinguishing characteristic expression with distinguishing capability according to the comparison relation, and determining the learned deep neural network model.
The space class center determining unit is used for introducing a class center limiting mechanism in a model optimizing stage, and taking heart rate variability characteristic mean value vectors of various arrhythmias as space class centers.
The core loss function determining unit is used for calculating Euclidean distance between each sample and the center of the corresponding space class, minimizing Euclidean distance between all samples and the corresponding space class, compressing intra-class distribution, and determining a core loss function of a model optimizing stage, wherein the samples are the processed feature vectors.
And the optimizing unit is used for optimizing the deep neural network model according to the core loss function.
In practical application, the D-vitamin feature vector X d is subjected to standardization processing, so that scaling of the original data in equal proportion is realized.
Wherein, the In order to process the feature vector after the processing,For the s-th eigenvalue in the original eigenvectorIs the mean value of the two values,And s is the index of the original feature vector, which is the standard deviation.
The method solves the problem of different metrics by converting the original data into data bounded by a specific range by using the mean value and standard deviation of the variable value, thereby eliminating the influence of dimension and magnitude, and changing the weight of the variable in analysis. The training method is suitable for being input into a deep neural network model (model for short), and the training efficiency and stability of the model are improved.
The model learning optimization module is divided into two stages of model learning and optimization, in the model learning stage, HRV features are used for contrast learning, the main body of learning is a positive sample and a negative sample, the positive sample is HRV features (such as low HF features and high LF/HF features of atrial fibrillation patients) of similar arrhythmia, and the negative sample is a sample similar to the features of the original sample but different in diagnosis conclusion, namely a difficult sample. By constructing the comparison relation, the model is guided to learn the distinguishing characteristic expression with distinguishing capability.
In the model optimization stage, in order to make the HRV features of the same class more tightly gathered in the model and the different classes more separated, a class center limiting mechanism is introduced, namely, the HRV feature mean vector of various arrhythmias is used as a class center, and the Euclidean distance between the sample embedding and the corresponding class center is minimized, so that the model compresses the feature distribution in the class while keeping the degree of distinction between the classes, and the generalization capability of the model in unknown type sample recognition is enhanced.
Wherein, the construction of the difficult sample is firstly to locate the diagnosis key feature, and the diagnosis key feature of the D vitamin feature vector X d is defined asWhere t is the diagnostic key feature index. For example atrial fibrillation, which is characterized by lower HF and higher LF/HF characteristics than normal electrocardiograms
Then applying a large disturbance to the diagnostic key features, for each of whichThe transformation is performed according to category reversal or enhancement trends.
Wherein, the For the transformed original value, beta is the scaling factor controlling the disturbance amplitude, typically taken3。
The model learning and optimizing overall framework first trains an initialization model based on a deep neural network modelThe multi-layer two-way long-short-term memory network (Bi-LSTM) is mixed with a one-dimensional convolutional neural network (1D-CNN), wherein the number of channels with each layer of hidden units 128,1D-CNN of the Bi-LSTM is 64, and the core width is 3.
Then constructing a loss function of positive and negative sample contrast learning,
Where j= {1,2,3,..b } is the set of lot indices, B is the total number of lot indices,={Y m=yc represents a set of positive samples, m is an index number, y m represents a type, y c is a class label of a c-th class sample, and y m=yc is the same type;{ Y m≠yc represents the set of negative samples, q is the sample index in the negative sample set; Is the multidimensional physiological characteristic vector of the m-th sample, ∈RD;Feature vector for the p-th positive sample; B is the index of the positive or negative sample, all positive and negative samples are traversed, p is the index of the positive sample, all positive sample samples are traversed; for vector inner product calculation, the similarity between the representations is measured; the sharpness of the similarity distribution is controlled for the temperature parameter.
Then, a model optimization stage is carried out, a class center limiting mechanism is introduced, and taking the class c as an example, all training samples of the class c are mapped and then expressed as {Definitions ofThe representation vectors extracted in the model for the HRV features of the arrhythmia samples are averaged for the spatial limiting center point of the class, i.e. the spatial class center of class C, where C is the total number of known classes, i.e. the number of all known classes.
Wherein, the Is training data of class c.
Then, the Euclidean distance between each sample and the center of the corresponding class is calculated, wherein the Euclidean distance is the straight line distance between two points in the feature space, namelyAnd (3) withEuclidean distance of (2)The definition is as follows.
=
Wherein D is the dimension of the HRV feature vector,An e-th dimension eigenvalue that is the c-th sample; and e is a feature dimension index, which is the e-th dimension coordinate value of the c-th class center point.
Compressing intra-class distribution by minimizing Euclidean distance of all samples from their corresponding class centers, core loss function at model optimization stage,
Wherein, the For the regularization coefficient(s),All the learnable network parameters for the feature extractor. By minimizing the objective function, the same type of samples can be intensively distributed near the center of the type, the distinguishing capability of the model on different arrhythmia is enhanced, and the identification robustness on unknown types is improved.
The model learning optimization module learns the center vector of each arrhythmia class at the end of the deep network through contrast learning (positive and negative sample contrast) and class center limiting mechanism, and minimizes the loss function between the same class sample and the class centerThereby compressing intra-class distribution and expanding inter-class differences in the feature space.
In one exemplary embodiment, the deep neural network model is composed of a mixture of layers of two-way long and short term memory networks and one-dimensional convolutional neural networks.
In an exemplary embodiment, the confidence interval decision module specifically includes the following modules.
And the estimation unit is used for calculating the minimum class center distance from the ECG signal to be detected to all the space class centers and estimating the sample variance of the ECG signal to be detected.
And the confidence interval construction unit is used for constructing a confidence interval according to the sample variance and the super-parameters of the optimized deep neural network model.
And the judging unit is used for judging whether the minimum class center distance exceeds the confidence interval.
And the unknown class determining unit is used for determining that the ECG signal to be detected is of an unknown class when the output result of the judging unit is yes.
And the known class determining unit is used for determining that the ECG signal to be detected is of a known class when the output result of the judging unit is NO, and determining the accurate known type of the ECG signal to be detected by utilizing the statistical analysis information.
In practical application, after model learning and model optimization are completed, the confidence interval decision module is responsible for mapping the embedded representation of each test sample onto a "known class" or an "unknown class", and specifically includes the following three steps.
First of all using the aforementioned class center and euclidean distance,Namely, calculating the Euclidean distance standard, and calculating the Euclidean distance set from each sample in the class to the center
Wherein, the For a certain sample in class c to the center of the class space classIs a euclidean distance of (c).
Estimating its sample varianceThe following is provided.
Wherein, the For a certain sample in class c to the center of the class space classIs a mean value of euclidean distances of (c).
And judging the distance between the test samples, and extracting an embedded representation z from any one test sample x through a model. Calculating the minimum distance embedded in all known class centers
Where C is the total number of known categories, i.e., the number of all known categories.
Finally, setting decision criterion of confidence interval and setting super parameterGenerally takeCorresponding to a multiple threshold of approximately 95% confidence interval.
If the distance between the test sample and the nearest class center exceeds the confidence interval of the distance distribution.
Namely:
Wherein, the The confidence interval is used for measuring whether the distance between a test sample and the center of the nearest class belongs to the normal (training) distance distribution range of the class or not in the system, and if the distance exceeds the normal (training) distance distribution range, the test sample is judged to be an unknown class; class index (class number of nearest class center) to minimize test sample distance.
If not, the method judges that the class is unknown, otherwise, the method belongs to the nearest known class, and the overall analysis logic is as follows.
The confidence interval decision module can not only ensure the accurate classification of the known class samples by using the statistical distribution information, but also safely identify the samples as 'unknown' types, namely, unknown classes, when the samples deviate from any class center significantly, and provide reliable prompts for subsequent clinical rechecking.
The confidence interval decision module is based on the loss function from each sample in the training set to the center thereofAnd (3) the distance distribution, the mean value and the variance are calculated, a multiple sigma threshold is set to form a confidence interval, if the nearest center of the test sample exceeds the threshold, the test sample is judged to be an unknown class, otherwise, the test sample is classified into a corresponding known class, and smooth connection from closed set classification to open set detection is realized.
As shown in FIG. 2, the present application provides a method of ECG signal classification, comprising the following steps.
And S1, filtering the ECG signal based on the data preprocessing module to reconstruct a clean signal.
And S2, based on a feature extraction module, carrying out multi-scale feature extraction on the pure signals, determining heart rate variability features of a time domain, a frequency domain and a nonlinear domain, and generating multidimensional physiological feature vectors suitable for deep neural network model input according to the heart rate variability features.
And S3, based on a model learning optimization module, in a model learning stage, the multi-dimensional physiological feature vector is used for guiding the deep neural network model to learn the distinguishing feature expression with distinguishing capability through comparison learning, in a model optimization stage, a space class center is established based on a class center limiting mechanism, and the deep neural network model is optimized, wherein the multi-dimensional physiological feature vector comprises a positive sample and a negative sample.
And S4, calculating the minimum class center distance from the ECG signal to be measured to all space class centers based on a confidence interval decision module, constructing a confidence interval, classifying the ECG signal to be measured according to the minimum class center distance and the confidence interval, and determining the ECG signal type, wherein the ECG signal type comprises a known class and an unknown class.
The method has the advantages of comprehensively capturing time domain, frequency domain and nonlinear characteristics of the electrocardiosignal and improving characteristic representation capability.
The data support that the feature discrimination is improved by about 12% compared with a single model by combining 128-dimensional Bi-LSTM and 64-channel 1D-CNN (comparative experiment is not shown).
The application covers time domain, frequency domain, nonlinearity and morphological multi-view features, adopts a Bi-LSTM+1D-CNN deep neural network model, and extends unknown class detection through a confidence interval.
In an exemplary embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor performing the steps of the method embodiments described above when the computer program is executed. The computer device may be a server or a terminal. The computer device includes a processor, a memory, an Input/Output interface (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. Wherein the processor of the computer device is configured 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, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data to be processed. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an ECG signal classification method.
In an exemplary embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor performing the steps of the method embodiments described above when the computer program is executed.
In an exemplary embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method embodiments described above.
In an exemplary embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by hardware associated with computer program instructions, where the computer program may be stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic RandomAccess Memory, DRAM), etc.
The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The principles and embodiments of the present application have been described herein with reference to specific examples, which are intended to facilitate an understanding of the principles and concepts of the application and are to be varied in scope and detail by persons of ordinary skill in the art based on the teachings herein. In view of the foregoing, this description should not be construed as limiting the application.

Claims (9)

1. An ECG signal classification system, comprising:
The data preprocessing module is used for carrying out filtering processing on the ECG signal and reconstructing a clean signal;
the feature extraction module is used for carrying out multi-scale feature extraction on the pure signals, determining heart rate variability features of a time domain, a frequency domain and a nonlinear domain, and generating multidimensional physiological feature vectors suitable for deep neural network model input according to the heart rate variability features;
The model learning optimization module is used for guiding the deep neural network model to learn the distinguishing characteristic expression with distinguishing capability through contrasting and learning the multidimensional physiological characteristic vector in a model learning stage, establishing a space class center based on a class center limiting mechanism in a model optimization stage, and optimizing the deep neural network model, wherein the multidimensional physiological characteristic vector comprises a positive sample and a negative sample, and the model learning optimization module specifically comprises the following steps:
the standardized processing unit is used for carrying out standardized processing on the multidimensional physiological feature vector and determining the processed feature vector;
The contrast learning unit is used for carrying out contrast learning on the processed feature vector in a model learning stage to construct a contrast relation between a positive sample and a negative sample, wherein the positive sample is heart rate variability characteristics of similar heart rate disorder, the heart rate variability characteristics of the similar heart rate disorder comprise low HF characteristics and high LF/HF characteristics of patients suffering from atrial fibrillation, and the negative sample is a difficult sample similar to the characteristics of the processed feature vector but different in diagnosis conclusion;
The guiding unit is used for guiding the deep neural network model to learn the distinguishing characteristic expression with distinguishing capability according to the comparison relation, and determining the learned deep neural network model;
The space class center determining unit is used for introducing a class center limiting mechanism in a model optimizing stage, and taking heart rate variability characteristic mean value vectors of various arrhythmias as space class centers;
the core loss function determining unit is used for calculating Euclidean distance between each sample and the center of the corresponding space class, minimizing Euclidean distance between all samples and the corresponding space class, compressing intra-class distribution, and determining a core loss function of a model optimizing stage, wherein the samples are the processed feature vectors;
an optimizing unit, configured to optimize the deep neural network model according to the core loss function;
The confidence interval decision module is used for calculating the minimum class center distance from the ECG signal to be detected to all the space class centers, constructing a confidence interval, classifying the ECG signal to be detected according to the minimum class center distance and the confidence interval, and determining the ECG signal type, wherein the ECG signal type comprises a known class and an unknown class.
2. The ECG signal classification system of claim 1, wherein the data preprocessing module specifically comprises:
The system comprises a wavelet decomposition unit, a wavelet filter and a filtering unit, wherein the wavelet decomposition unit is used for carrying out multi-layer wavelet decomposition on the ECG signal by utilizing the wavelet filter and decomposing the ECG signal into an approximation coefficient and a detail coefficient;
and the reconstruction unit is used for reconstructing the pure signal from the highest layer to the bottommost layer according to the approximate coefficient and the detail coefficient.
3. ECG signal classification system according to claim 1, characterized in that the feature extraction module comprises in particular:
the positioning unit is used for positioning the R wave crest of the pure signal by adopting a peak detection algorithm;
The multi-scale extraction unit is used for extracting heart rate variability characteristics of a time domain, a frequency domain and a nonlinear domain of the clean signal in a multi-scale mode according to the original waveform of the clean signal and the sequence of RR intervals based on the R wave peak;
the processing unit is used for carrying out normalization or standardization processing on the heart rate variability characteristics and determining the processed heart rate variability characteristics, wherein the RR interval is the time interval between adjacent R wave peaks on an electrocardiogram;
And the multidimensional physiological feature vector generation unit is used for generating multidimensional physiological feature vectors suitable for the deep neural network model input according to the processed heart rate variability features.
4. The ECG signal classification system of claim 1, wherein the deep neural network model is comprised of a mixture of layers of two-way long and short term memory networks and one-dimensional convolutional neural networks.
5. The ECG signal classification system of claim 1, wherein the confidence interval decision module specifically comprises:
the estimating unit is used for calculating the minimum class center distance from the ECG signal to be detected to all the space class centers and estimating the sample variance of the ECG signal to be detected;
the confidence interval construction unit is used for constructing a confidence interval according to the sample variance and the super-parameters of the optimized deep neural network model;
the judging unit is used for judging whether the minimum class center distance exceeds the confidence interval;
The unknown class determining unit is used for determining that the ECG signal to be detected is of an unknown class when the output result of the judging unit is yes;
and the known class determining unit is used for determining that the ECG signal to be detected is of a known class when the output result of the judging unit is NO, and determining the accurate known type of the ECG signal to be detected by utilizing the statistical analysis information.
6. An ECG signal classification method, which is applied to the ECG signal classification system as claimed in any one of claims 1 to 5, the ECG signal classification method comprising:
based on the data preprocessing module, filtering the ECG signal to reconstruct a clean signal;
Based on a feature extraction module, performing multi-scale feature extraction on the pure signal, determining heart rate variability features of a time domain, a frequency domain and a nonlinear domain, and generating a multi-dimensional physiological feature vector suitable for deep neural network model input according to the heart rate variability features;
Based on a model learning optimization module, in a model learning stage, guiding the deep neural network model to learn the distinguishing characteristic expression with distinguishing capability by contrasting and learning the multidimensional physiological characteristic vector, and in a model optimization stage, establishing a space class center based on a class center limiting mechanism, and optimizing the deep neural network model;
Based on a confidence interval decision module, calculating the minimum class center distance from an ECG signal to be detected to all space class centers, constructing a confidence interval, classifying the ECG signal to be detected according to the minimum class center distance and the confidence interval, and determining an ECG signal type, wherein the ECG signal type comprises a known class and an unknown class.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor executes the computer program to implement the ECG signal classification method of claim 6.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the ECG signal classification method of claim 6.
9. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the ECG signal classification method of claim 6.
CN202511500776.4A 2025-10-21 2025-10-21 ECG signal classification system, method, equipment, medium and product Active CN120995247B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202511500776.4A CN120995247B (en) 2025-10-21 2025-10-21 ECG signal classification system, method, equipment, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202511500776.4A CN120995247B (en) 2025-10-21 2025-10-21 ECG signal classification system, method, equipment, medium and product

Publications (2)

Publication Number Publication Date
CN120995247A CN120995247A (en) 2025-11-21
CN120995247B true CN120995247B (en) 2025-12-23

Family

ID=97689165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202511500776.4A Active CN120995247B (en) 2025-10-21 2025-10-21 ECG signal classification system, method, equipment, medium and product

Country Status (1)

Country Link
CN (1) CN120995247B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108926341A (en) * 2018-04-20 2018-12-04 平安科技(深圳)有限公司 Detection method, device, computer equipment and the storage medium of ECG signal
CN109907733A (en) * 2019-04-10 2019-06-21 西北工业大学 A kind of ECG signal analysis method towards abnormal heart rhythms classification

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6411840B1 (en) * 1999-11-16 2002-06-25 Cardiac Intelligence Corporation Automated collection and analysis patient care system and method for diagnosing and monitoring the outcomes of atrial fibrillation
US11534099B2 (en) * 2018-04-27 2022-12-27 Vita-Course Technologies Co., Ltd. Systems and methods for determining an arrhythmia type
CN118013349A (en) * 2023-12-29 2024-05-10 北京工业大学 12-lead ECG signal classification method based on trend feature enhanced neural network
CN118319325A (en) * 2024-03-22 2024-07-12 中国人民解放军总医院第一医学中心 Multi-label arrhythmia discrimination method based on multi-scale neural network model
CN120114060A (en) * 2025-03-10 2025-06-10 东南大学 A method and device for evaluating depression state based on heart rate variability characteristics and parallel neural network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108926341A (en) * 2018-04-20 2018-12-04 平安科技(深圳)有限公司 Detection method, device, computer equipment and the storage medium of ECG signal
CN109907733A (en) * 2019-04-10 2019-06-21 西北工业大学 A kind of ECG signal analysis method towards abnormal heart rhythms classification

Also Published As

Publication number Publication date
CN120995247A (en) 2025-11-21

Similar Documents

Publication Publication Date Title
Jin et al. A novel domain adaptive residual network for automatic atrial fibrillation detection
US10869610B2 (en) System and method for identifying cardiac arrhythmias with deep neural networks
Jiang et al. A novel multi-module neural network system for imbalanced heartbeats classification
De Lannoy et al. Weighted conditional random fields for supervised interpatient heartbeat classification
CN115530788B (en) Arrhythmia classification method based on self-attention mechanism
CN114224360B (en) An EEG signal processing method, equipment and storage medium based on improved EMD-ICA
CN112508110A (en) Deep learning-based electrocardiosignal graph classification method
CN106805965A (en) A kind of electrocardiosignal sorting technique and device
US12446820B2 (en) Method for predicting multi-type electrocardiogram heart rhythms based on graph convolution
CN113768514A (en) Arrhythmia classification method based on convolutional neural network and gated cyclic unit
CN108309284A (en) Electrocardiogram T wave end point detection method and device
CN115836849A (en) Arrhythmia classification method based on comparison test time adaptation
CN115736944A (en) Atrial fibrillation detection model MCNN-BLSTM based on short-time single lead electrocardiosignal
CN114386457B (en) A method, system, device and storage medium for detecting abnormal electrocardiogram signal
CN120995247B (en) ECG signal classification system, method, equipment, medium and product
CN116595434A (en) A Lie Detection Method Based on Dimension and Classification Algorithm
Ammour Atrial fibrillation detection with a domain adaptation neural network approach
US20250040855A1 (en) Apparatus and a method for the improvement of electrocardiogram visualization
CN113712525B (en) Physiological parameter processing method and device and medical equipment
Shantha Selva Kumari et al. Classification of cardiac arrhythmias based on morphological and rhythmic features
Hughes et al. Novel signal shape descriptors through wavelet transforms and dimensionality reduction
CN114419657B (en) ECG identity recognition method based on local fragment sparse representation
Núñez et al. Synthetic ECG Generation for Data Augmentation and Transfer Learning in Arrhythmia Classification
CN112932431B (en) Heart rate identification method based on 1DCNN + Inception Net + GRU fusion network
Tutuko et al. Empowering AI-Diagnosis: Deep Learning Abilities for Accurate Atrial Fibrillation Classification.

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
GR01 Patent grant
GR01 Patent grant