An ECG signal classification system, method, device, medium, and product
By optimizing multi-scale feature extraction and deep neural network models, and combining contrastive learning and class center constraint mechanisms, the problem that traditional ECG signal classification models cannot identify unseen or unknown types has been solved, achieving comprehensive capture and accurate classification of ECG signals.
Patent Information
- Application Number
- CN202511500776.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-10-21
AI Technical Summary
Traditional ECG signal classification models cannot identify unseen or unknown ECG signal types, and their recognition ability is limited by the limited signal types covered by the training dataset.
By employing multi-scale feature extraction and deep neural network models, combined with data preprocessing, feature extraction, model learning optimization, and confidence interval decision modules, multi-dimensional physiological feature vectors are generated through contrastive learning and class center constraint mechanisms, thereby improving the model's discriminative and generalization abilities.
It enables effective identification of unknown ECG signal types, improves the accuracy and robustness of ECG signal classification, and enhances the ability to detect unknown types.
Smart Images

Figure CN120995247B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of signal processing, in particular to an ECG signal classification system, method, device, medium and product. BACKGROUND
[0002] The classification model relies on the labeling of each known ECG signal, and then fitting, although it has good recognition performance. However, the well-annotated ECG dataset usually only covers limited ECG signal types, and the traditional classification model trained with limited ECG signal types can only recognize those ECG signal types observed in the training set, but cannot recognize unseen or unknown ECG signal types not included in the training data. SUMMARY
[0003] The purpose of the present application is to provide an ECG signal classification system, method, device, medium and product to solve the problem of inability to recognize unseen or unknown ECG signal types.
[0004] To achieve the above purpose, the present application provides the following solutions.
[0005] In a first aspect, the present application provides an ECG signal classification system, comprising the following modules.
[0006] A data preprocessing module is configured to filter and process ECG signals and reconstruct pure signals.
[0007] A feature extraction module is configured to perform multi-scale feature extraction on the pure signals, determine heart rate variability features in time domain, frequency domain and nonlinear domain, and generate a multi-dimensional physiological feature vector suitable for input of a deep neural network model according to the heart rate variability features.
[0008] A model learning and optimization module is configured to, in a model learning stage, guide the deep neural network model to learn discriminative feature representations with distinguishing ability by comparing the multi-dimensional physiological feature vectors, and in a model optimization stage, establish a spatial class center based on a class center restriction mechanism and optimize the deep neural network model; the multi-dimensional physiological feature vector includes positive samples and negative samples.
[0009] A confidence interval decision module is configured to calculate the minimum class center distance of a to-be-tested ECG signal to all spatial class centers, construct a confidence interval, and classify the to-be-tested ECG signal according to the minimum class center distance and the confidence interval to determine an ECG signal type; the ECG signal type includes a known class and an unknown class.
[0010] In a second aspect, the present application provides an ECG signal classification method, comprising the following steps.
[0011] Based on the data preprocessing module, the ECG signal is filtered and processed to reconstruct a pure signal.
[0012] Based on the feature extraction module, the pure signal is subjected to multi-scale feature extraction to determine the heart rate variability features in the time domain, frequency domain and nonlinear domain, and a multi-dimensional physiological feature vector suitable for the input of the deep neural network model is generated according to the heart rate variability features.
[0013] Based on the model learning optimization module, in the model learning stage, the multi-dimensional physiological feature vector is compared to guide the deep neural network model to learn discriminative feature expression with distinguishing ability, and in the model optimization stage, the deep neural network model is optimized based on the class center restriction mechanism to establish a spatial class center; the multi-dimensional physiological feature vector includes positive samples and negative samples.
[0014] Based on the confidence interval decision module, the minimum class center distance of the ECG signal to be tested to all spatial class centers is calculated, a confidence interval is constructed, and the ECG signal to be tested is classified according to the minimum class center distance and the confidence interval to determine the ECG signal type; the ECG signal type includes known classes and unknown classes.
[0015] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the ECG signal classification method described above.
[0016] In a fourth aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the ECG signal classification method described above.
[0017] In a fifth aspect, the present application provides a computer program product comprising a computer program, wherein the computer program is executed by a processor to implement the ECG signal classification method described above.
[0018] According to the specific embodiments provided by the present application, the present application has the following technical effects: by fusing the multi-domain heart rate variability (HRV) features, i.e. the HRV features in the time domain, frequency domain and nonlinear domain, the present application comprehensively captures the multi-domain HRV features of the ECG signal, and improves the feature representation capability; at the same time, based on the contrast learning and the class center restriction mechanism, through the deep neural network model and the confidence interval, the traditional model can only recognize the known types of ECG signals. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0020] Figure 1 A structural schematic diagram of an ECG signal classification system provided by an embodiment of the present application.
[0021] Figure 2 A flowchart of an ECG signal classification method provided by an embodiment of the present application. DETAILED DESCRIPTION
[0022] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0023] In order to make the purposes, characteristics and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0024] As shown in Figure 1 The present application provides an ECG signal classification system, which comprises the following modules.
[0025] A data preprocessing module, configured to filter and process ECG signals and reconstruct pure signals.
[0026] A feature extraction module, configured to perform multi-scale feature extraction on the pure signals, determine heart rate variability features in time domain, frequency domain and nonlinear domain, and generate a multi-dimensional physiological feature vector suitable for input of a deep neural network model according to the heart rate variability features.
[0027] A model learning and optimization module, configured to, in a model learning stage, guide the deep neural network model to learn discriminative feature expression with distinguishing ability by comparing the multi-dimensional physiological feature vector, and in a model optimization stage, establish a spatial class center based on a class center restriction mechanism and optimize the deep neural network model; the multi-dimensional physiological feature vector comprises positive samples and negative samples.
[0028] A confidence interval decision module is configured to calculate minimum class center distances of a to-be-detected ECG signal to all spatial class centers, construct a confidence interval, and classify the to-be-detected ECG signal according to the minimum class center distances and the confidence interval to determine an ECG signal type; the ECG signal type includes a known class and an unknown class.
[0029] In an exemplary embodiment, the data preprocessing module specifically includes the following units.
[0030] A wavelet decomposition unit is configured to perform multi-layer wavelet decomposition on the ECG signal by using a wavelet filter to decompose the ECG signal into approximation coefficients and detail coefficients; the approximation coefficients reflect a low-frequency trend of the ECG signal; and the detail coefficients reflect a high-frequency change of the ECG signal.
[0031] A reconstruction unit is configured to iteratively reconstruct a pure signal from the highest layer to the bottom layer according to the approximation coefficients and the detail coefficients.
[0032] In actual application, the data preprocessing module decomposes the ECG signal by using a wavelet filter.
[0033] At each decomposition level, the ECG signal is decomposed into approximation coefficients of low frequency and detail coefficients of high frequency. The approximation coefficients reflect a low-frequency trend part of the signal, and the detail coefficients reflect a high-frequency change part of the signal.
[0034] The approximation coefficients and the detail coefficients obtained by decomposition are processed, such as threshold quantization, to remove noise. By setting a suitable threshold, the main features of the ECG signal can be retained while the noise is suppressed. The processed coefficients are used for inverse transformation to reconstruct a pure signal.
[0035] The main steps include the following.
[0036] First, the input ECG signal is processed. The ECG signal is decomposed by j layers of wavelets, the approximation coefficients of the jth layer are and the detail coefficients are as follows.
[0037]
[0038]
[0039] The approximation coefficients represent the low-frequency components of the ECG signal, retaining the main shape of the signal; and the detail coefficients represent the high-frequency components of the ECG signal, containing noise and details. is a low-pass filter corresponding to the scaling function used in the j-th level wavelet decomposition, used to extract the approximation (low frequency) component of the signal, where n is defined as the discrete time index; is a high-pass filter corresponding to the wavelet function used in the j-th level wavelet decomposition, used to extract the detail (high frequency) component of the signal; j is the index of the wavelet decomposition level.
[0040] Then the reconstruction of the signal is:
[0041]
[0042] where, is the approximation coefficient of the j-1-th level reconstructed from the j-th level, in the inverse wavelet reconstruction process, by combining the approximation coefficient and the detail coefficient of the j-th level, the signal of the lower level is gradually reconstructed; k is the discrete time index or the position index of the filter coefficient, used to represent the position of the filter or signal in the convolution and reconstruction process.
[0043] From the highest level j-th level to the bottom layer 0-th layer, the signal is iteratively reconstructed, and finally the pure signal is obtained ; is the 0-th level pure signal, i.e. the denoised ECG signal, is the final output signal obtained by iteratively reconstructing from the highest level.
[0044] In an exemplary embodiment, the feature extraction module specifically comprises the following units.
[0045] The positioning unit is configured to position the R-wave peak of the pure signal by using a peak detection algorithm.
[0046] The multi-scale extraction unit is configured to extract the heart rate variability features of the pure signal in the time domain, frequency domain and nonlinear domain based on the R-wave peak and according to the original waveform of the pure signal and the sequence of RR intervals.
[0047] The processing unit is configured to normalize or standardize the heart rate variability features to determine the processed heart rate variability features; wherein the RR interval is the time interval between adjacent R-wave peaks on the electrocardiogram.
[0048] The multi-dimensional physiological feature vector generation unit is configured to generate a multi-dimensional physiological feature vector suitable for the input of a deep neural network model according to the processed heart rate variability features.
[0049] In practical applications, the feature extraction module, for a pure signal, first uses a Pan-Tompkins peak detection algorithm to locate R-wave peaks; then, based on a sequence of RR intervals and an original waveform, multi-scale extracts HRV features in time domain, frequency domain, and nonlinear domain; and finally, normalizes or standardizes the obtained HRV feature vector to generate a D-dimensional physiological feature vector suitable for input of a deep neural network model.
[0050] The R-peak detection is performed on the preprocessed electrocardiogram waveform, and a double-threshold QRS wave detection algorithm with Pan-Tompkins adaptability is used to locate the R-wave peaks of the ECG signal. After accurately identifying the R-peak positions, the subsequent HRV feature extraction can be performed.
[0051] The HRV time-domain features (MeanNN, SDNN, RMSSD, NN50, pNN50), frequency-domain features (very low frequency VLF, low frequency power LF, high frequency power HF, LF / HF), and nonlinear features (ApEn, SampEn, Poincaré SD1 / SD2) are extracted from the sequence of RR intervals and the original waveform to construct a D-dimensional physiological feature vector X d ∈R D The D-dimensional physiological feature vector X d is the HRV feature vector, R D is a D-dimensional real number space, and represents the extracted D-dimensional physiological feature vector X d is a D-dimensional real number vector and belongs to the Euclidean space in mathematics, i.e., a D-dimensional real number space R D .
[0052] In an exemplary embodiment, the model learning optimization module specifically includes the following units.
[0053] The standardization processing unit is configured to perform standardization processing on the multi-dimensional physiological feature vector to determine a processed feature vector.
[0054] The contrast learning unit is configured to perform contrast learning on the processed feature vector in the model learning stage to construct a contrast relationship between positive samples and negative samples. The positive samples are arrhythmia heart rate variability features of the same type, and the arrhythmia heart rate variability features of the same type include low HF features and high LF / HF features of atrial fibrillation patients. The negative samples are difficult samples that are similar to the features of the processed feature vector but have different diagnostic conclusions.
[0055] The guidance unit is configured to guide the deep neural network model to learn discriminative feature representations with distinguishing ability according to the contrast relationship to determine a learned deep neural network model.
[0056] The spatial class center determination unit is configured to introduce a class center restriction mechanism in the model optimization stage, and take the mean vector of the heart rate variability features of each class of arrhythmia as the spatial class center.
[0057] The core loss function determination unit is configured to calculate the Euclidean distance between each sample and the corresponding spatial class center, minimize the Euclidean distance between all samples and the corresponding spatial class center, compress the intra-class distribution, and determine the core loss function in the model optimization stage; the sample is the processed feature vector.
[0058] The optimization unit is configured to optimize the deep neural network model according to the core loss function.
[0059] In actual application, the D-dimensional physiological feature vector X d is normalized to realize equal proportion scaling of the original data.
[0060]
[0061] wherein, is the processed feature vector, is the s-th feature value in the original feature vector is the mean, is the standard deviation, and s is the index of the original feature vector.
[0062] By using the mean and standard deviation of the variable value to convert the original data into data within a certain range, the dimension and order of magnitude are eliminated, the weight of the variable in the analysis is changed to solve the problem of different measurement, and the deep neural network model (referred to as model) is inputted to improve the training efficiency and stability of the model.
[0063] The model learning and optimization module is divided into two stages of model learning and optimization. In the model learning stage, the HRV features are used for comparative learning, and the subjects of learning are positive samples and negative samples. The positive samples are the HRV features of the same class of arrhythmia (such as low HF features and high LF / HF features of atrial fibrillation patients), and the negative samples are samples similar to the original sample but with different diagnostic conclusions, i.e. difficult samples. By constructing such a contrast relationship, the model is guided to learn the discriminative feature expression with distinguishing ability.
[0064] In the model optimization stage, in order to make the HRV features of the same class more closely gathered in the model and the features of different classes more widely separated, a class center restriction mechanism is introduced, i.e. taking the mean vector of the HRV features of each class of arrhythmia as the class center. By minimizing the Euclidean distance between the sample embedding and the corresponding class center, the model compresses the intra-class feature distribution while maintaining the inter-class discrimination, and enhances the generalization ability of the model in the identification of unknown type samples.
[0065] Wherein, the construction of difficult samples, first is to locate the diagnostic key features, D physiological feature vector X d The diagnostic key features of the physiological feature vector X are defined as Wherein t is the diagnostic key feature index. For example, the diagnostic key feature of atrial fibrillation is that the HF feature is lower and the LF / HF feature is higher compared with normal electrocardiogram. .
[0066] Then a large disturbance is applied to the diagnostic key feature, and for each diagnostic key feature, The original value is transformed according to the reverse or enhanced trend of the category.
[0067]
[0068] Wherein, is the transformed original value, and β is a scaling coefficient for controlling the disturbance amplitude, typically 3.
[0069] The overall framework of model learning and optimization first trains an initialization model based on a deep neural network model , which is composed of a multi-layer bidirectional long short-term memory network (Bi-LSTM) and a one-dimensional convolutional neural network (1D-CNN). The number of hidden units of each layer of Bi-LSTM is 128, and the number of channels of 1D-CNN is 64, and the kernel width is 3.
[0070] Then the loss function of positive and negative sample pair comparison learning is constructed ,
[0071]
[0072] Wherein J={1,2,3,...,B} is the set of batch index, B is the total number of batch index, ={ ,y m =y c} represents the set of positive samples, m is the index number, y m represents the type, y c is the class label of the c-th sample, y m =y c , that is, the same type; { ,y m ≠y c} represents the set of negative samples, q is the sample index in the negative sample set; is the multi-dimensional physiological feature vector of the m-th sample, ∈R D ; is the feature vector of the p-th positive sample; is the feature vector of the b-th sample (positive or negative sample); b is the index of the positive or negative sample, which traverses all positive and negative samples; p is the index of the positive sample, which traverses all positive samples; is the vector inner product calculation, which is used to measure the similarity between representations; is the temperature parameter that controls the sharpness of the similarity distribution.
[0073] Then comes the model optimization phase, which introduces a class center restriction mechanism. Take the c-th class as an example. Let all the training samples of the c-th class be mapped to representations as } after mapping, define as the spatial restriction center point of the class, i.e., the spatial class center of the c-th class, as the average of the representation vectors of the c-th class arrhythmia samples extracted in the model, where C is the total number of known classes, i.e., the number of all known classes.
[0074]
[0075] wherein, is the training data of the c-th class.
[0076] Then calculate the Euclidean distance between each sample and its corresponding class center. The Euclidean distance is the straight-line distance between two points in the feature space, i.e. and the Euclidean distance between is defined as follows.
[0077] =
[0078] wherein, D is the dimension of the HRV feature vector, is the e-th feature value of the c-th sample; is the e-th coordinate value of the c-th class center point, and e is the feature dimension index.
[0079] By minimizing the Euclidean distance between all samples and their corresponding class centers, the intra-class distribution is compressed. The core loss function of the model optimization phase is ,
[0080]
[0081] wherein, is the regularization coefficient, is all the learnable network parameters of the feature extractor. In this way, by minimizing the objective function, the same class of samples can be concentrated around their class centers, enhancing the model's ability to distinguish different arrhythmias and improving the recognition robustness of unknown classes.
[0082] The model learning optimization module learns the center vectors of each arrhythmia class at the end of the deep network through contrast learning (positive and negative sample contrast) and class center restriction mechanism, and minimizes the loss function between the same class samples and the class center. , thereby compressing the intra-class distribution and expanding the inter-class difference in the feature space.
[0083] In an exemplary embodiment, the deep neural network model is composed of a multi-layer bidirectional long short-term memory network and a one-dimensional convolutional neural network.
[0084] In an exemplary embodiment, the confidence interval decision module specifically includes the following modules.
[0085] The estimation unit is configured to calculate the minimum class center distance of the to-be-tested ECG signal to all spatial class centers, and estimate the sample variance of the to-be-tested ECG signal.
[0086] The confidence interval construction unit is configured to construct a confidence interval according to the sample variance and the hyperparameters of the optimized deep neural network model.
[0087] The judgment unit is configured to judge whether the minimum class center distance is beyond the confidence interval.
[0088] The unknown class determination unit is configured to determine that the to-be-tested ECG signal is an unknown class when the output result of the judgment unit is yes.
[0089] The known class determination unit is configured to determine that the to-be-tested ECG signal is a known class when the output result of the judgment unit is no, and determine the accurate known type of the to-be-tested ECG signal by using statistical analysis information.
[0090] In actual application, after the model learning and model optimization are completed, the confidence interval decision module is responsible for mapping the embedding representation of each test sample to a “known class” or an “unknown class”, which specifically includes the following three steps.
[0091] Firstly, the class center mentioned above and the Euclidean distance are used, that is, the reference for calculating the Euclidean distance set of each sample in the class to the center .
[0092]
[0093] wherein, is the Euclidean distance of a certain sample in the c-th class to the spatial class center of the class.
[0094] The sample variance is estimated as follows.
[0095]
[0096] where, is the average of Euclidean distance from the sample to the class center of the c-th class.
[0097] Test sample distance judgment, for any test sample x, the embedding representation z is extracted by the model. Calculate the minimum distance of the embedding to all known class centers .
[0098]
[0099] where C is the total number of known classes, i.e., the number of all known classes.
[0100] Finally, the decision criterion for setting the confidence interval is set. Set the hyperparameter , generally take , corresponding to the multiple threshold value of the approximate 95% confidence interval.
[0101] If the distance between the test sample and its nearest class center exceeds the confidence interval of the class distance distribution.
[0102] That is: .
[0103] where, is the confidence interval. The confidence interval is used in the system to measure whether the distance of a test sample from its nearest class center belongs to the normal (training) distance distribution of the class. If it exceeds, it is judged as an unknown class; is the index of the class with the minimum distance to the test sample (the class number of the nearest class center).
[0104] is judged as an unknown class; otherwise, it is classified into the nearest known class. The overall analysis logic is as follows.
[0105]
[0106] The confidence interval decision module can not only use statistical distribution information to ensure accurate classification of known class samples, but also safely identify them as "unknown" types when the samples significantly deviate from any class center, i.e., unknown class, providing reliable prompts for subsequent clinical review.
[0107] The confidence interval decision module is based on the loss function distance distribution of each class sample to the center in the training set, calculates the mean and variance and sets a multiple σ threshold to form the confidence interval. If the test sample distance from its nearest center exceeds the threshold, it is judged as an unknown class, otherwise it is classified into the corresponding known class, realizing the smooth connection from closed set classification to open set detection.
[0108] For example,Figure 2 As shown, the present application provides an ECG signal classification method, comprising the following steps.
[0109] S1: Based on the data preprocessing module, the ECG signal is filtered and processed, and the pure signal is reconstructed.
[0110] S2: Based on the feature extraction module, the pure signal is subjected to multi-scale feature extraction, the heart rate variability features in time domain, frequency domain and nonlinear domain are determined, and the multi-dimensional physiological feature vector suitable for the input of the deep neural network model is generated according to the heart rate variability features.
[0111] S3: Based on the model learning optimization module, in the model learning stage, the multi-dimensional physiological feature vector is compared to guide the deep neural network model to learn the discriminative feature expression with distinguishing ability, and in the model optimization stage, based on the class center restriction mechanism, the spatial class center is established to optimize the deep neural network model; the multi-dimensional physiological feature vector includes positive samples and negative samples.
[0112] S4: Based on the confidence interval decision module, the minimum class center distance of the ECG signal to be tested to all spatial class centers is calculated, the confidence interval is constructed, and the ECG signal to be tested is classified according to the minimum class center distance and the confidence interval to determine the ECG signal type; the ECG signal type includes known class and unknown class.
[0113] Effect: Fully capture the time domain, frequency domain and nonlinear characteristics of the electrocardiogram signal, and improve the feature representation ability.
[0114] Data support: Joint 128-dimensional Bi-LSTM and 64-channel 1D-CNN, the feature discrimination is improved by about 12% compared with single model (comparison experiment not shown).
[0115] The present application covers time domain, frequency domain, nonlinear and morphological multi-angle features, adopts a deep neural network model of Bi-LSTM+1D-CNN, and expands the unknown class detection through the confidence interval.
[0116] In an example embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program. The computer device can be a server or a terminal. The computer device comprises 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. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store to-be-processed data. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through a network connection. The computer program is executed by the processor to implement an ECG signal classification method.
[0117] In an example embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.
[0118] In an example embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.
[0119] In an example embodiment, a computer program product is provided, comprising a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.
[0120] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by computer program instructions related to hardware, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method. Among them, any reference to memory, database or other medium used in each embodiment provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but 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 Random Access Memory, DRAM), etc.
[0121] The database involved in each embodiment provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on blockchain, etc., without being limited thereto. The processor involved in each embodiment provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0122] Each technical feature of the above embodiments can be combined arbitrarily. In order to make the description simple, not all possible combinations of each technical feature in the above embodiments are described, however, as long as the combination of these technical features does not exist contradictory, it should be considered as the scope of the present application.
[0123] The principles and implementation modes of the present application are described by applying specific examples herein, and the above embodiment descriptions are only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed. In conclusion, the content of the present application should not be understood as a limitation.
Claims
1. An ECG signal classification system, characterized in that, include: The data preprocessing module is used to filter the ECG signal and reconstruct a clean signal; The feature extraction module is used to perform multi-scale feature extraction on the pure signal, determine the heart rate variability features in the time domain, frequency domain and nonlinear domain, and generate a multi-dimensional physiological feature vector suitable for input to a deep neural network model based on the heart rate variability features. The model learning and optimization module is used to guide the deep neural network model to learn discriminative feature representations with distinguishing ability by comparing and learning the multidimensional physiological feature vectors during the model learning stage, and to establish spatial class centers and optimize the deep neural network model based on the class center constraint mechanism during the model optimization stage. The multidimensional physiological feature vector includes positive samples and negative samples; the model learning and optimization module specifically includes: A standardization processing unit is used to standardize the multidimensional physiological feature vectors and determine the processed feature vectors. The contrastive learning unit is used to perform contrastive learning on the processed feature vector during the model learning phase to construct a contrastive relationship between positive and negative samples. The positive samples are heart rate variability features of the same type of arrhythmia, including low HF features and high LF / HF features of atrial fibrillation patients. The negative samples are difficult samples that have similar features to the processed feature vector but have different diagnostic conclusions. The guiding unit is used to guide the deep neural network model to learn discriminative feature representations with distinguishing ability based on the comparison relationship, and to determine the learned deep neural network model. The spatial class center determination unit is used to introduce a class center constraint mechanism during the model optimization stage, using the mean vector of heart rate variability features of various arrhythmias as the spatial class center; The core loss function determination unit is used to calculate the Euclidean distance between each sample and the corresponding spatial class center, minimize the Euclidean distance between all samples and their corresponding centers, compress the intra-class distribution, and determine the core loss function for the model optimization stage; the sample is the processed feature vector. An optimization unit is used to optimize the deep neural network model according to the core loss function; The confidence interval decision module is used to calculate the minimum class center distance from the ECG signal under test to all spatial class centers, construct a confidence interval, and classify the ECG signal under test according to the minimum class center distance and the confidence interval to determine the ECG signal type; the ECG signal type includes known class and unknown class.
2. The ECG signal classification system according to claim 1, characterized in that, The data preprocessing module specifically includes: The wavelet decomposition unit is used to perform multi-level wavelet decomposition on the ECG signal using a wavelet filter, decomposing the ECG signal into approximation coefficients and detail coefficients; the approximation coefficients reflect the low-frequency trend of the ECG signal; and the detail coefficients reflect the high-frequency changes of the ECG signal. The reconstruction unit is used to iteratively reconstruct the pure signal from the highest level to the lowest level based on the approximation coefficients and the detail coefficients.
3. The ECG signal classification system according to claim 1, characterized in that, The feature extraction module specifically includes: A positioning unit is used to locate the R-wave peak of the pure signal using a peak detection algorithm; A multi-scale extraction unit is used to extract the heart rate variability features of the pure signal in the time domain, frequency domain, and nonlinear domain based on the R-wave peak and according to the original waveform and RR interval sequence of the pure signal. The processing unit is used to normalize or standardize 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 the electrocardiogram; A multidimensional physiological feature vector generation unit is used to generate a multidimensional physiological feature vector suitable for input to a deep neural network model based on the processed heart rate variability features.
4. The ECG signal classification system according to claim 1, characterized in that, The deep neural network model is composed of a multi-layer bidirectional long short-term memory network and a one-dimensional convolutional neural network.
5. The ECG signal classification system according to claim 1, characterized in that, The confidence interval decision module specifically includes: The estimation unit is used to calculate the minimum class center distance from the ECG signal under test to all spatial class centers, and to estimate the sample variance of the ECG signal under test. The confidence interval construction unit is used to construct confidence intervals based on the sample variance and the hyperparameters of the optimized deep neural network model. The judgment unit is used to determine whether the minimum class center distance exceeds the confidence interval; An unknown class determination unit is used to determine that the ECG signal to be tested is of an unknown class when the output result of the determination unit is yes. A known class determination unit is used to determine that the ECG signal under test is of a known class when the output result of the judgment unit is negative, and to determine the precise known type of the ECG signal under test using statistical analysis information.
6. An ECG signal classification method, characterized in that, The ECG signal classification method is applied to the ECG signal classification system according to any one of claims 1-5, and the ECG signal classification method includes: Based on the data preprocessing module, the ECG signal is filtered to reconstruct a clean signal; Based on the feature extraction module, multi-scale feature extraction is performed on the pure signal to determine the heart rate variability features in the time domain, frequency domain, and nonlinear domain, and a multi-dimensional physiological feature vector suitable for input to a deep neural network model is generated based on the heart rate variability features. Based on the model learning and optimization module, during the model learning phase, the deep neural network model is guided to learn discriminative feature representations with distinguishing capabilities by comparing and learning the multidimensional physiological feature vectors. During the model optimization phase, spatial class centers are established based on the class center constraint mechanism to optimize the deep neural network model. The multidimensional physiological feature vectors include positive samples and negative samples. Based on the confidence interval decision module, the minimum class center distance from the ECG signal under test to all spatial class centers is calculated, a confidence interval is constructed, and the ECG signal under test is classified according to the minimum class center distance and the confidence interval to determine the ECG signal type; the ECG signal type includes known class and unknown class.
7. A computer device, comprising: A memory, a processor, and a computer program stored in 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 having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the ECG signal classification method of claim 6.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the ECG signal classification method of claim 6.
Citation Information
Patent Citations
ECG signal detection method, device, computer equipment and storage medium
CN108926341A
ECG signal analysis method aiming at abnormal heart rhythm classification
CN109907733A