CN115153572A - Electrocardio abnormality detection and identification method and system under small sample scene - Google Patents

Electrocardio abnormality detection and identification method and system under small sample scene Download PDF

Info

Publication number
CN115153572A
CN115153572A CN202210770445.2A CN202210770445A CN115153572A CN 115153572 A CN115153572 A CN 115153572A CN 202210770445 A CN202210770445 A CN 202210770445A CN 115153572 A CN115153572 A CN 115153572A
Authority
CN
China
Prior art keywords
abnormal
electrocardio
training
inputting
prototype
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210770445.2A
Other languages
Chinese (zh)
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.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
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 Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN202210770445.2A priority Critical patent/CN115153572A/en
Publication of CN115153572A publication Critical patent/CN115153572A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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
    • 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
    • A61B5/7267Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

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

Abstract

The invention discloses an electrocardio abnormity detection and identification method and system under a small sample scene, which can be used for training a high-performance electrocardio abnormity detection and abnormity identification model under the condition that a large number of normal electrocardio samples and small samples with marked abnormal samples exist, and can effectively solve the problems of training, application and deployment of an intelligent electrocardio diagnosis model under the small abnormal sample scene. The Euclidean distance between a feature vector and a support vector is obtained by inputting the electrocardiosignal to be detected into a pre-trained characterization learning model based on the depth support vector data description through calculation, and is compared with an early warning threshold value to detect whether the electrocardiosignal is abnormal or not; the Euclidean distance between a feature vector and a prototype vector obtained by inputting an abnormal electrocardiosignal to be identified into a pre-trained electrocardio abnormal category identification model is input into a Softmax activation function to obtain the probability that the obtained electrocardio sample belongs to various types of abnormity, and the abnormal category with the maximum probability is identified.

Description

Electrocardio abnormality detection and identification method and system under small sample scene
Technical Field
The invention belongs to the field of intelligent electrocardio diagnosis, and particularly relates to an electrocardio abnormality detection and identification method and system under a small sample scene.
Background
Electrocardiographic measurement techniques play an important auxiliary role in modern diagnostics of cardiovascular diseases. The application of artificial intelligence technology greatly promotes the development of intelligent electrocardio diagnosis technology, such as convolutional neural network, residual neural network, long-term and short-term memory network, self-encoder and generation countermeasure network, and the like, which is beneficial to the accurate diagnosis and timely treatment of cardiovascular diseases. Most intelligent electrocardiographic diagnostic methods, however, rely on a large number of accurately labeled data sets. The electrocardiosignals are used as medical data, have the characteristics of privacy, sensitivity and the like, and the labeling process also needs to be carried out by a professional doctor, so that a large number of accurately labeled electrocardio data sets are usually difficult to obtain. The electrocardiogram data set which can be obtained generally is composed of a large number of normal electrocardiogram samples and a small number of abnormal samples with accurate labels. The unbalanced data distribution can greatly influence the performance of the existing intelligent electrocardio diagnosis method.
Disclosure of Invention
Aiming at the defects or the improvement requirements of the prior art, the invention provides the electrocardio abnormality detection and identification method and system under the small sample scene, which can effectively solve the difficult problems of training, application and deployment of the intelligent electrocardio diagnosis model under the small abnormal sample scene.
In order to achieve the above object, according to a first aspect of the present invention, there is provided a method for detecting an electrocardiographic abnormality in a small sample scene, including:
s101, dividing the large sample normal electrocardiosignals into a normal training set D Training And normal verification set D Positive test (ii) a Will D Training Abnormal electrocardiosignal D of small sample Different from each other Inputting a prototype network;
s102, for D Training Inputting a feature vector obtained by a prototype network, and taking an average value to obtain a support vector c;
s103, based on the objective function
Figure BDA0003723893820000021
Training the prototype network to obtain a trained electrocardio abnormality detection model; wherein omega (theta) is a regularization term of the prototype network parameters,
Figure BDA0003723893820000022
f Θ (x is the feature vector obtained by inputting the sample x into the prototype network, d (f) Θ (x) C) is f Θ (x) Euclidean distance to c;
s104, calculating D Positive test Inputting Euclidean distance between a feature vector obtained by the trained electrocardio abnormality detection model and a support vector c, and taking a 99 percentile of the Euclidean distance as an early warning threshold;
s105, inputting the electrocardiosignals to be detected into the trained electrocardio abnormality detection model to obtain the characteristic vectors of the electrocardiosignals to be detected; if the Euclidean distance of the feature vector support vector c of the electrocardiosignal to be detected is larger than the early warning threshold value, the detection result is abnormal, otherwise, the detection result is normal.
According to a second aspect of the present invention, there is provided a method for identifying categories of abnormal electrocardio in a small sample scene, including:
s201, from any
Figure BDA0003723893820000023
Intermediate random sampling N S The samples form a support set S k From
Figure BDA0003723893820000024
Middle random sampling N Q The samples form a query set Q k (ii) a Wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003723893820000025
represents D Training The subset of samples with a medium label of k,
Figure BDA0003723893820000026
wherein x i For abnormal cardiac signals of small samples, y i E {1, \8230;, K } is the corresponding anomalyA category label;
s202, adding S k The feature vector obtained by inputting the prototype network is averaged to obtain S k Prototype vector e of the anomaly class in k
S203, based on the objective function
Figure BDA0003723893820000027
Figure BDA0003723893820000031
Training the prototype network to obtain a trained electrocardio abnormal category identification model; wherein, g Φ (x) Feature vectors obtained after inputting the sample x into the prototype network, d (g) Φ (x),e k ) Is g Φ (x) And e k The Euclidean distance of (c);
s204, D Training The feature vector input to the trained electrocardio abnormal category identification model is averaged to obtain D Training A prototype vector of medium anomaly class;
s205, inputting the abnormal electrocardiosignals to be identified into the trained electrocardio abnormal category identification model to obtain the feature vectors of the abnormal electrocardiosignals to be identified, and connecting the feature vectors of the abnormal electrocardiosignals to be identified with the D Training And inputting Euclidean distance between prototype vectors of medium abnormal classes into a Softmax activation function to obtain the probability that the abnormal electrocardiosignals to be identified belong to each abnormal class, and outputting the abnormal class with the maximum probability.
According to a third aspect of the present invention, there is provided a method for detecting and identifying an abnormal electrocardiographic condition in a small sample scene, comprising:
s1, obtaining an identification result of the electrocardiosignal to be detected by adopting the electrocardio-abnormality detection method in the first aspect, and ending if the detection result of the electrocardiosignal to be detected is normal; if the detection result of the electrocardiosignal to be detected is abnormal, entering S2;
s2, identifying the abnormal category of the electrocardiosignal to be detected by adopting the electrocardio abnormal category identification method of the second aspect to obtain an abnormal category identification result.
According to a fourth aspect of the present invention, there is provided a system for detecting an abnormal electrocardiographic condition in a small sample scene, comprising: a computer-readable storage medium and a processor;
the computer readable storage medium is used for storing executable instructions;
the processor is configured to read executable instructions stored in the computer-readable storage medium and execute the method according to the first aspect.
According to a fifth aspect of the present invention, there is provided a system for identifying an abnormal cardiac electrical condition in a small sample scene, including: a computer-readable storage medium and a processor;
the computer-readable storage medium is used for storing executable instructions;
the processor is configured to read executable instructions stored in the computer-readable storage medium and execute the method according to the second aspect.
According to a sixth aspect of the present invention, there is provided a system for detecting and identifying an abnormal electrocardiographic function in a small sample scene, comprising: a computer-readable storage medium and a processor;
the computer-readable storage medium is used for storing executable instructions;
the processor is configured to read executable instructions stored in the computer-readable storage medium and execute the method according to the third aspect.
In general, compared with the prior art, the above technical solution contemplated by the present invention can achieve the following beneficial effects:
the invention divides an intelligent electrocardio diagnosis task into two subtasks of electrocardio abnormality detection and electrocardio abnormality identification, provides an electrocardio abnormality detection method based on deep support vector data description and an electrocardio abnormality identification method based on a prototype network, trains a high-performance electrocardio abnormality detection and abnormality identification model under the condition that a large number of normal electrocardio samples and small samples are marked with abnormal samples, and can effectively solve the problems of training, application and deployment of the intelligent electrocardio diagnosis model under the scene of the small abnormal samples.
Further, the method for detecting the abnormal electrocardio-sample under the small sample scene divides a normal electrocardio-sample into a normal training set and a normal verification set; training a characterization learning model based on deep support vector data description by adopting the normal training set and a small number of abnormal electrocardio samples; applying the trained model to the normal verification set to determine an early warning threshold value, and taking the early warning threshold value as a single-value classification electrocardio abnormality detection model; the early warning threshold value is determined by an abnormal score of 99% negative samples in the verification set, and the abnormal score is represented by a Euclidean distance between an output vector and a support vector of the characterization learning model. The method can be used for mining typical normal state representation, so that whether the electrocardio abnormal phenomenon occurs or not can be robustly detected.
Further, according to the method for recognizing the electrocardio abnormal category in the small sample scene, a support set and a query set are obtained by sampling from the small sample abnormal training set with the mark; adopting the support set and the query set to train an original network, and taking the trained original network as a multi-classification electrocardiogram abnormity identification model; the support set and the query set are sample sets with known labels, the support set is used for calculating prototype vectors of various anomalies, and the query set is used for a reverse optimization model. The method can efficiently utilize the existing small sample abnormal data set, thereby accurately classifying the generated electrocardio abnormality.
The method for detecting and identifying the electrocardio abnormality under the small sample scene comprises the steps of firstly inputting electrocardiosignals to be detected of a monitored person into a pre-trained single-value classification electrocardio abnormality detection model to obtain an electrocardio abnormality score of the monitored person, comparing the electrocardio abnormality score with the early warning threshold value to determine whether the electrocardio of the monitored person is abnormal or not, inputting a data sample into the pre-trained electrocardio abnormality identification model if the electrocardio abnormality is detected to be abnormal, calculating Euclidean distances between output characteristic vectors and various abnormal prototype vectors, inputting the Euclidean distances into a Softmax activation function, and obtaining the probability of various electrocardio abnormalities of the monitored person. The method separates the detection and identification processes of the electrocardio abnormality, can effectively improve the utilization rate of a small sample abnormal data set by the model compared with the traditional classification method, overcomes the great difficulty brought to the model training process by the serious data unbalance phenomenon, and enables the model to realize the robust detection of the electrocardio abnormality and the accurate identification of the abnormal category.
Drawings
Fig. 1 is a structural diagram of a backbone portion of a one-dimensional depth residual convolution neural network provided in an embodiment of the present invention;
FIG. 2 is a flowchart of a training method of a single-value classification electrocardiographic abnormality detection model in a small sample scene according to an embodiment of the present invention;
FIG. 3 is a flowchart of a multi-class cardiac electrical anomaly identification model training method under a small sample scene according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for detecting and identifying an abnormal cardiac electrical condition according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an apparatus for detecting and identifying abnormal electrocardiography according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electrocardiographic abnormality detection and identification system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Example one
The embodiment of the invention provides an electrocardio abnormality detection method under a small sample scene, which comprises the following steps:
s101, dividing the large sample normal electrocardiosignals into a normal training set D Training And normal verification set D Positive test (ii) a Will D Training Abnormal electrocardiosignal D of small sample Different from each other Inputting the prototype network.
S102, for D Training Inputting a feature vector obtained by a prototype network, and taking an average value to obtain a support vector c;
s103, based on the objective function
Figure BDA0003723893820000061
Training the prototype network to obtain a trained electrocardio abnormality detection model (namely a single-value classification electrocardio abnormality detection model under a small sample scene); wherein omega (theta) is a regularization term of the prototype network parameters,
Figure BDA0003723893820000062
Figure BDA0003723893820000063
f Θ (x) Feature vectors obtained after inputting the sample x into the prototype network, d (f) Θ (x) C) is f Θ (x) Euclidean distance to c;
s104, calculating D Positive test Inputting the Euclidean distance between the feature vector obtained by the trained electrocardio abnormality detection model and the support vector c, and taking 99 percentile as an early warning threshold value;
s105, inputting the electrocardiosignal to be detected into the trained electrocardio abnormality detection model to obtain a characteristic vector of the electrocardiosignal to be detected; if the Euclidean distance of the feature vector support vector c of the electrocardiosignal to be detected is larger than the early warning threshold value, the detection result is abnormal, otherwise, the detection result is normal.
Further, the calculation formula of the support vector c is as follows:
Figure BDA0003723893820000064
further, the prototype network comprises: the system comprises a one-dimensional convolutional neural network, a maximum pooling layer, a residual convolutional module and an average pooling layer.
In this embodiment, a discrimination model capable of distinguishing a normal electrocardiographic signal from an abnormal electrocardiographic signal is trained in a small sample scene based on an unsupervised or semi-supervised mode, as shown in fig. 1, where S101 to S105 are model training processes, and S106 to S108 are early warning threshold determination processes. The method comprises the following specific steps: the method comprises the following specific steps:
s101 and S106: acquiring a large number of normal electrocardio samples and a small number of abnormal electrocardio samples, segmenting original electrocardio signals according to the selected window length, and ensuring that each sample contains a plurality of cardiac signals; and dividing the normal electrocardio samples into a normal training set and a normal verification set according to the proportion of 4. S101, obtaining training data required by the single-value classification electrocardio abnormality detection model, wherein the training data comprise a normal training set and abnormal electrocardio samples which are respectively recorded as D Training And D Different from each other . S106, obtaining verification data needed for determining the early warning threshold, wherein the verification data consists of a normal verification set and is marked as D Positive test
S102: inputting the training data into a characterization learning model based on a deep support vector data description. The network structure of the characterization learning model based on the depth support vector data description adopts a backbone part of a one-dimensional depth residual convolution neural network shown in FIG. 2, and comprises the following steps: s001, "7 × 1conv1d,64,/2" represents a one-dimensional convolutional neural network with convolution kernel length of 7, output channel number of 64, step size of 2, and the same other way; s002, "Maxpool, \\ 2" represents the largest pooling layer with step size of 2; s003, a solid curve represents jumping and matrix addition at an element level is implemented, and the other same principles are implemented; s004, a dashed-solid line represents that one-dimensional convolution is used for check of skip-join input downsampling and matrix addition at an element level is carried out, and the other same principles are carried out; s005, "Avgpool" means average pooling layer. The network structure uses 8 residual convolution modules, and outputs 512-dimensional feature vectors after 5 times of downsampling and 1 time of average pooling.
Recording the characterization learning model based on the depth support vector data description as f Θ (. The) theta is the set of model parameters to be optimized. Given an input data sample x, the output feature vector is f Θ (x)。
S103: the feature vectors of the normal training set (obtained by inputting the normal training set into the prototype network) are averaged to obtain a support vector, as follows:
Figure BDA0003723893820000081
where c is the support vector.
S104: computing output feature vector f Θ (x) Euclidean distance from the support vector c, x ∈ D Training As the abnormality score of the sample,
Figure BDA0003723893820000082
s105: an optimization objective is constructed such that the volume of the hypersphere enveloped by the normal eigenvectors is as small as possible, while the anomalous eigenvectors are as far away from the hypersphere as possible, as follows:
Figure BDA0003723893820000083
where Ω (Θ) is the model parameter regularization term, preventing overfitting. l (x) is a loss function of the input data sample x, and the specific form is as follows:
Figure BDA0003723893820000084
this objective is optimized using Adam's algorithm.
S107: and inputting the normal verification set into the trained model to obtain the characteristic vector.
S108: calculating Euclidean distance between the feature vector and the support vector of the normal verification set as an abnormal score, and taking 99 percentile as an early warning threshold value as follows:
Figure BDA0003723893820000085
where τ is the determined early warning threshold.
It should be noted that the large samples in all embodiments of the present invention mean that the number of samples is on the order of thousands and more, such as 1000 or more; small samples mean that the number of samples is in the order of a hundred.
Example two
The embodiment of the invention provides an electrocardio abnormal category identification method under a small sample scene, which comprises the following steps:
s201, from any
Figure BDA0003723893820000086
Intermediate random sampling N S Each sample constitutes a support set S k From
Figure BDA0003723893820000087
Middle random sampling N Q The samples form a query set Q k (ii) a Wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003723893820000091
is shown by D Training The subset of samples with a medium label of k,
Figure BDA0003723893820000092
wherein x is i For abnormal cardiac signals of small samples, y i E {1, \ 8230;, K } is a corresponding exception class label;
s202, mixing S k The feature vectors obtained by inputting the prototype network are averaged to obtain prototype vectors e of corresponding different categories k
S203, based on the objective function
Figure BDA0003723893820000093
Figure BDA0003723893820000094
Training the prototype network to obtain a trained electrocardio abnormal category identification model (namely a multi-classification electrocardio abnormal identification model under a small sample scene); wherein, g Φ (x) Feature vectors obtained after inputting a sample x into the prototype network, d (g) Φ (x),e k ) Is g Φ (x) And e k The Euclidean distance of (c);
s204, adding D Training The feature vector input to the trained electrocardio abnormal category identification model is averaged to obtain D Training Prototype vectors of medium anomaly class;
s205, inputting the abnormal electrocardiosignals to be identified into the trained electrocardio abnormal category identification model to obtain the feature vectors of the abnormal electrocardiosignals to be identified, and connecting the feature vectors of the abnormal electrocardiosignals to be identified with the D Training Inputting Euclidean distance between prototype vectors of medium abnormal classes into a Softmax activation function to obtain the probability that the abnormal electrocardiosignals to be identified belong to each abnormal class, and outputting the abnormal class with the maximum probability.
Further, e k The calculation formula of (c) is:
Figure BDA0003723893820000095
further, the prototype network comprises a backbone part of the one-dimensional depth residual convolutional neural network (comprising the one-dimensional convolutional neural network, a maximum pooling layer, a residual convolutional module and an average pooling layer), an average layer, a Euclidean distance calculation layer and a Softmax activation function.
The average layer is used for calculating the average value of output vectors of various abnormal samples in the support set input into the backbone part of the one-dimensional depth residual convolutional neural network, namely calculating the prototype of various abnormal samples in the support set. After the prototype network optimization process is finished, all abnormal training data samples need to be input into the prototype network, and prototype vectors of various types of abnormalities in all abnormal training data samples are calculated through the average layer, so that a subsequent prediction task can be conveniently used.
The distance calculation layer is used for calculating Euclidean distances between feature vectors obtained by inputting the query set into the prototype network and various abnormal prototype vectors.
And the Softmax activation function is used for obtaining the probability that the electrocardio samples belong to various abnormal categories according to the input Euclidean distance.
The prototype network is optimized by minimizing the prediction penalty of the query set.
Fig. 3 is a flowchart of a multi-class cardiac electrical anomaly recognition model training method in a small sample scene according to a second embodiment of the present invention. The embodiment is based on metric learning, and a discrimination model capable of identifying specific categories of abnormal electrocardiosignals is trained in a small sample scene. The method comprises the following specific steps:
s201 and S202: the cardiologist labels the specific categories (e.g., atrial fibrillation, sinus rhythm, etc.) of the abnormal cardiac samples obtained in the first embodiment to obtain a small abnormal sample training set with labels, and the training set is recorded as
Figure BDA0003723893820000101
Wherein x is i As input ECG samples, y i E {1, \8230;, K } is the corresponding category label.
Figure BDA0003723893820000102
Represents D Training The subset of samples with a middle label of k. From any of
Figure BDA0003723893820000103
Intermediate random sampling N S The samples form a support set S k From
Figure BDA0003723893820000104
Intermediate random sampling N Q The samples form a query set Q k
S203: inputting the support set samples into a prototype network and outputting feature vectors, and respectively averaging the feature vectors of each type of abnormal electrocardio samples in the support set to obtain the prototype vector of each type of abnormality, wherein the method comprises the following steps:
Figure BDA0003723893820000105
wherein e is k Prototype vector for class k exceptions, g Φ (. Cndot.) represents a prototype network whose set of parameters to be optimized is combined to Φ. The structure of the prototype network employs the one-dimensional depth residual shown in fig. 1The backbone portion of the convolutional neural network.
S204: and inputting the query set samples into the prototype network and outputting the feature vectors. Calculating Euclidean distances between the feature vectors of the query set samples and various abnormal prototype vectors, as follows:
Figure BDA0003723893820000111
s205: inputting the Euclidean distance calculated in S204 into a Softmax activation function to obtain the probability that the query set sample belongs to various types of electrocardio anomalies:
Figure BDA0003723893820000112
s206: an optimization target is constructed, so that the feature vector of the abnormal sample in the query set is as close as possible to the prototype vector of the similar abnormality and as far away as possible from the prototype vector of the heterogeneous abnormality, as follows:
Figure BDA0003723893820000113
this objective is optimized using the Adam algorithm.
S201 to S206 need to be repeatedly executed a plurality of times. After the prototype network training is finished, all the abnormal electrocardio samples with labels are input into the prototype network training device, and the prototype vectors of various abnormal samples are calculated through the average pooling layer so as to facilitate the use of a subsequent prediction task.
EXAMPLE III
The embodiment of the invention provides an electrocardio abnormality detection and identification method under a small sample scene, which comprises the following steps:
s1, obtaining an identification result of the electrocardiosignal to be detected by adopting the electrocardio abnormality detection method in the embodiment one, and ending if the detection result of the electrocardiosignal to be detected is normal; if the detection result of the electrocardiosignal to be detected is abnormal, entering S2;
and S2, identifying the abnormal category of the electrocardiosignal to be detected by adopting the electrocardio abnormal category identification method in the second embodiment to obtain an abnormal category identification result.
Fig. 4 is a flowchart of a method for detecting and identifying an abnormal cardiac electrical condition according to an embodiment of the present invention. In the embodiment, the characterization learning model, the support vector, the early warning threshold, the prototype network and the prototype vector which are provided by the first embodiment and the second embodiment and are based on the deep support vector data description are used for realizing the abnormal detection and the abnormal recognition of the electrocardiosignals of the monitored personnel. The method comprises the following specific steps:
s301: and obtaining an electrocardio sample of the monitored person.
S302: and inputting the obtained electrocardio samples into the trained characterization learning model based on the deep support vector data description in the first embodiment to obtain the feature vectors.
S303: and calculating the Euclidean distance between the feature vector obtained in the step S302 and the support vector provided in the first embodiment to serve as the abnormal score of the obtained electrocardio sample.
S304: and comparing the abnormal score obtained in the step S303 with the early warning threshold value provided in the first embodiment. And if the obtained abnormal score is smaller than the early warning threshold value, outputting normal. Otherwise, an anomaly is detected.
S305: and if the detection result is abnormal, inputting the electrocardio sample into the original network trained in the second embodiment to obtain the feature vector.
S306: the euclidean distances between the feature vectors obtained in S305 and all the anomaly prototype vectors provided in example two are calculated.
S307: and inputting the Euclidean distance obtained in the step S306 into a Softmax activation function to obtain the probability that the input electrocardiosignals belong to various anomalies.
S308: and outputting the abnormal class with the highest probability.
The embodiment of the invention provides an electrocardio abnormality detection system under a small sample scene, which comprises: a computer-readable storage medium and a processor;
the computer-readable storage medium is used for storing executable instructions;
the processor is configured to read executable instructions stored in the computer-readable storage medium and execute the method according to embodiment one.
The embodiment of the invention provides an electrocardio abnormality recognition system under a small sample scene, which comprises: a computer-readable storage medium and a processor;
the computer-readable storage medium is used for storing executable instructions;
the processor is configured to read executable instructions stored in the computer-readable storage medium and execute the method according to embodiment two.
The embodiment of the invention provides an electrocardio abnormality detection and identification system under a small sample scene, which comprises the following components: a computer-readable storage medium and a processor;
the computer-readable storage medium is used for storing executable instructions;
the processor is used for reading the executable instructions stored in the computer-readable storage medium and executing the method of the third embodiment.
Fig. 5 is a schematic structural diagram of an electrocardiographic abnormality detection and identification device according to an embodiment of the present invention. The concrete modules comprise:
the electrocardiosignal acquisition module 401 is configured to acquire an electrocardiosignal of a monitored person.
And the electrocardiosignal segmentation module 402 is configured to segment the original electrocardiosignal according to the selected window length to obtain an electrocardio sample. The selected window length is required to ensure that each sample contains multiple heartbeat signals.
The electrocardiogram anomaly detection module 403 is configured to input the segmented electrocardiogram samples into a characterization learning model based on the deep support vector data description, perform anomaly scoring on the electrocardiogram samples, compare the anomaly scoring with an early warning threshold, and detect whether the electrocardiogram samples are abnormal or not.
And the abnormal category identification module 404 is configured to input the segmented electrocardiograph samples into a prototype network, and identify abnormal categories of the segmented electrocardiograph samples.
The characterization learning model based on the deep support vector data description is trained by a training method of a single-value classification electrocardio abnormality detection model in a small sample scene provided by the first example, and the prototype network is trained by a training method of a multi-classification electrocardio abnormality recognition model in a small sample scene provided by the second example.
Fig. 6 is a schematic structural diagram of an electrocardiographic abnormality detection and identification system according to an embodiment of the present invention. The specific components include a storage device 502, an input device 503, an output device 504, an electrocardiograph acquisition device 505, and a processor 506, which are interconnected via a bus 501. It should be noted that the components and structure of the system for detecting and identifying abnormal cardiac electrical activity shown in fig. 6 are merely exemplary, and other components and structures may be provided as needed.
The storage device 502 is used for storing various computer programs and data, and includes various forms of computer-readable storage media, including volatile memories such as a Random Access Memory (RAM) and a cache memory (cache), or non-volatile memories such as a Read Only Memory (ROM), a hard disk, and a flash memory.
The input device 503 is used for receiving instructions input from the outside of the user, and may include one or more of a microphone, a keyboard, a mouse, a touch screen, and the like.
The output device 504 is used for outputting various information such as video or audio to the outside, and its components may include one or more of a display screen and a speaker.
The electrocardiogram acquisition device 505 is used for acquiring electrocardiogram signals of the monitored user and storing the acquired electrocardiogram signals in the storage device 502 for use by other components.
The processor 506 is configured to run a computer program stored in the storage device 502 to implement any one of the methods for detecting/identifying an abnormal cardiac electrical condition or training an abnormal cardiac electrical condition/identification model according to the embodiments of the present invention. The processor may be implemented in at least one of a Programmable Logic Array (PLA), a Field Programmable Gate Array (FPGA), and a Digital Signal Processor (DSP), and may use a combination of one or more of the processing units having instruction execution capabilities or data processing capabilities to control the other components to implement the intended functions.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for detecting electrocardio abnormality in a small sample scene is characterized by comprising the following steps:
s101, dividing the large sample normal electrocardiosignals into a normal training set D Training And normal verification set D Positive test (ii) a Will D Training Abnormal electrocardiosignal D of small sample Different from each other Inputting a prototype network;
s102, for D Training Inputting a feature vector obtained by a prototype network, and taking an average value to obtain a support vector c;
s103, based on the objective function
Figure FDA0003723893810000011
Training the prototype network to obtain a trained electrocardio abnormality detection model; wherein omega (theta) is a regularization term of the prototype network parameters,
Figure FDA0003723893810000012
f Θ (x) Feature vectors obtained after inputting the sample x into the prototype network, d (f) Θ (x) C) is f Θ (x) Euclidean distance to c;
s104, calculating D Positive test Inputting Euclidean distance between a feature vector obtained by the trained electrocardio abnormality detection model and a support vector c, and taking a 99 percentile of the Euclidean distance as an early warning threshold;
s105, inputting the electrocardiosignals to be detected into the trained electrocardio abnormality detection model to obtain the characteristic vectors of the electrocardiosignals to be detected; if the Euclidean distance of the feature vector support vector c of the electrocardiosignal to be detected is larger than the early warning threshold value, the detection result is abnormal, otherwise, the detection result is normal.
2. The method of claim 1, wherein the support vector c is calculated by the formula:
Figure FDA0003723893810000013
3. the method of claim 1, wherein the prototype network comprises: the system comprises a one-dimensional convolutional neural network, a maximum pooling layer, a residual convolutional module and an average pooling layer.
4. A method for recognizing the category of electrocardio abnormality in a small sample scene is characterized by comprising the following steps:
s201, from any
Figure FDA0003723893810000014
Middle random sampling N S The samples form a support set S k From
Figure FDA0003723893810000015
Intermediate random sampling N Q The samples form a query set Q k (ii) a Wherein the content of the first and second substances,
Figure FDA0003723893810000021
is shown by D Training The subset of samples with a middle label of k,
Figure FDA0003723893810000022
wherein x is i For abnormal cardiac signals of small samples, y i E {1, \ 8230;, K } is a corresponding exception class label;
s202, mixing S k The feature vector obtained by inputting the prototype network is averaged to obtain S k Prototype vector e of the anomaly class in k
S203, based on the objective function
Figure FDA0003723893810000023
Figure FDA0003723893810000024
Training the prototype network to obtain a trained electrocardio abnormal category identification model; wherein, g Φ (x) Feature vectors obtained after inputting a sample x into the prototype network, d (g) Φ (x),e k ) Is g Φ (x) And e k The Euclidean distance of (c);
s204, adding D Training The feature vector input to the trained electrocardio abnormal category identification model is averaged to obtain D Training Prototype vectors of medium anomaly class;
s205, inputting the abnormal electrocardiosignals to be identified into the trained electrocardio abnormal category identification model to obtain the feature vectors of the abnormal electrocardiosignals to be identified, and connecting the feature vectors of the abnormal electrocardiosignals to be identified with the D Training Inputting Euclidean distance between prototype vectors of medium abnormal classes into a Softmax activation function to obtain the probability that the abnormal electrocardiosignals to be identified belong to each abnormal class, and outputting the abnormal class with the maximum probability.
5. The method of claim 4, wherein e is k The calculation formula of (2) is as follows:
Figure FDA0003723893810000025
6. the method of claim 4, wherein the prototype network comprises: the system comprises a one-dimensional convolution neural network, a maximum pooling layer, a residual convolution module and an average pooling layer.
7. A method for detecting and identifying electrocardio abnormality in a small sample scene is characterized by comprising the following steps:
s1, obtaining an identification result of the electrocardiosignal to be detected by adopting the electrocardio abnormality detection method as claimed in any one of claims 1 to 3, and ending if the detection result of the electrocardiosignal to be detected is normal; if the detection result of the electrocardiosignal to be detected is abnormal, entering S2;
s2, identifying the abnormal category of the electrocardiosignal to be detected by adopting the electrocardio abnormal category identification method as claimed in any one of claims 4 to 6 to obtain an abnormal category identification result.
8. The utility model provides an abnormal detection system of electrocardio under small sample scene which characterized in that includes: a computer-readable storage medium and a processor;
the computer readable storage medium is used for storing executable instructions;
the processor is configured to read executable instructions stored in the computer-readable storage medium and execute the method according to any one of claims 1-3.
9. An electrocardio abnormality recognition system under a small sample scene is characterized by comprising: a computer-readable storage medium and a processor;
the computer-readable storage medium is used for storing executable instructions;
the processor is configured to read executable instructions stored in the computer-readable storage medium and execute the method according to any one of claims 4-6.
10. An electrocardio anomaly detection and identification system under a small sample scene is characterized by comprising: a computer-readable storage medium and a processor;
the computer readable storage medium is used for storing executable instructions;
the processor is configured to read executable instructions stored in the computer-readable storage medium and execute the method of claim 7.
CN202210770445.2A 2022-06-30 2022-06-30 Electrocardio abnormality detection and identification method and system under small sample scene Pending CN115153572A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210770445.2A CN115153572A (en) 2022-06-30 2022-06-30 Electrocardio abnormality detection and identification method and system under small sample scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210770445.2A CN115153572A (en) 2022-06-30 2022-06-30 Electrocardio abnormality detection and identification method and system under small sample scene

Publications (1)

Publication Number Publication Date
CN115153572A true CN115153572A (en) 2022-10-11

Family

ID=83489082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210770445.2A Pending CN115153572A (en) 2022-06-30 2022-06-30 Electrocardio abnormality detection and identification method and system under small sample scene

Country Status (1)

Country Link
CN (1) CN115153572A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117951632A (en) * 2024-03-27 2024-04-30 合肥工业大学 PU contrast learning anomaly detection method and system based on multi-mode prototype network

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117951632A (en) * 2024-03-27 2024-04-30 合肥工业大学 PU contrast learning anomaly detection method and system based on multi-mode prototype network

Similar Documents

Publication Publication Date Title
KR102451795B1 (en) ECG signal detection method
CN111160139B (en) Electrocardiosignal processing method and device and terminal equipment
Kiranyaz et al. Convolutional neural networks for patient-specific ECG classification
CN107832737B (en) Artificial intelligence-based electrocardiogram interference identification method
US7174205B2 (en) Cardiac diagnostic system and method
CN111565633A (en) Time series data learning and analyzing method using artificial intelligence
CN112426160A (en) Electrocardiosignal type identification method and device
CN111345817B (en) QRS complex position determination method, device, equipment and storage medium
CN112690802B (en) Method, device, terminal and storage medium for detecting electrocardiosignals
Rohmantri et al. Arrhythmia classification using 2D convolutional neural network
Zhou et al. K-margin-based residual-convolution-recurrent neural network for atrial fibrillation detection
CN111657925A (en) Electrocardiosignal classification method, system, terminal and storage medium based on machine learning
CN114970637A (en) Lightweight arrhythmia classification method based on deep learning
CN111067512B (en) Ventricular fibrillation detection device, ventricular fibrillation detection model training method and equipment
WO2023097780A1 (en) Classification method and device for classifying patient‑ventilator asynchrony phenomenon in mechanical ventilation process
Deeba et al. Learning from imbalanced data: A comprehensive comparison of classifier performance for bleeding detection in endoscopic video
Wan et al. A novel atrial fibrillation automatic detection algorithm based on ensemble learning and multi-feature discrimination
Sharan et al. Detecting cough recordings in crowdsourced data using cnn-rnn
WO2024098553A1 (en) Method and system for analyzing and identifying electrocardiogram, and storage medium
CN111938691A (en) Basic heart sound identification method and equipment
CN115153572A (en) Electrocardio abnormality detection and identification method and system under small sample scene
CN115444428A (en) Multi-lead electrocardiogram positive and abnormal classification method, system, medium, equipment and terminal
Li Detection of premature ventricular contractions using densely connected deep convolutional neural network with spatial pyramid pooling layer
Alwan et al. Structured prediction for differentiating between normal rhythms, ventricular tachycardia, and ventricular fibrillation in the ECG
Bashir et al. Real-time automated cardiac health monitoring by combination of active learning and adaptive feature selection

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