A method and system for detecting and identifying electrocardiogram abnormalities in a small sample scenario

Through deep support vector data description and prototype network, it solves the problem of ECG diagnosis model training in small sample scenarios, achieves high-performance ECG anomaly detection and identification, overcomes the problem of data imbalance, and improves the robustness and identification of the model. accuracy.

CN115153572BActive Publication Date: 2024-09-13HUAZHONG UNIV OF SCI & TECH
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202210770445.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2024-09-13
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

Existing intelligent ECG diagnosis methods are difficult to effectively train and deploy in small sample scenarios. They are limited by the imbalanced data distribution of a large number of normal ECG samples and a small number of abnormal samples, which affects model performance.

Method used

Using a representation learning method and prototype network based on deep support vector data description, by inputting normal ECG signals and abnormal ECG signals into the prototype network, calculating support vectors and prototype vectors, single-value classification and multi-classification ECG abnormality detection and The recognition model uses Euclidean distance and Softmax activation function to set early warning thresholds and identify abnormal categories.

Benefits of technology

A high-performance ECG abnormality detection and identification model is trained in a small sample scenario, which can effectively detect ECG abnormalities and accurately identify abnormal categories, overcome the problem of data imbalance, and improve the robustness and utilization of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115153572B
    Figure CN115153572B
Patent Text Reader

Abstract

The present invention discloses a method and system for detecting and identifying ECG anomalies in a small sample scenario. With a large number of normal ECG samples and a small number of labeled abnormal samples, a high-performance ECG anomaly detection and anomaly identification model is trained, which can effectively deal with the training, application and deployment problems of intelligent ECG diagnostic models in small abnormal sample scenarios. The Euclidean distance between the feature vector obtained by inputting the ECG signal to be detected into a pre-trained representation learning model based on deep support vector data description and the support vector is calculated, and compared with the warning threshold to detect whether it is abnormal or not; the Euclidean distance between the feature vector obtained by inputting the abnormal ECG signal to be identified into a pre-trained ECG abnormality category recognition model and the prototype vector is input into the Softmax activation function to obtain the probability that the obtained ECG sample belongs to each type of abnormality, and the abnormal category with the highest probability is identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent ECG diagnosis, and more specifically, relates to a method and system for detecting and identifying ECG anomalies in a small sample scenario. Background Art

[0002] Electrocardiogram measurement technology plays an important auxiliary role in modern cardiovascular disease diagnosis. The application of artificial intelligence technology has greatly promoted the development of intelligent ECG diagnosis technology, such as convolutional neural networks, residual neural networks, long short-term memory networks, autoencoders and generative adversarial networks, which is conducive to the accurate diagnosis and timely treatment of cardiovascular diseases. However, most intelligent ECG diagnosis methods rely on a large number of accurately labeled data sets. As medical data, ECG signals have the characteristics of privacy and sensitivity, and their labeling process also needs to be performed by professional doctors. Therefore, a large number of accurately labeled ECG data sets are usually difficult to obtain. The ECG data sets that are usually available are often composed of a large number of normal ECG samples and a small number of abnormal samples with accurate labels. This unbalanced data distribution will greatly affect the performance of existing intelligent ECG diagnosis methods. Summary of the invention

[0003] In response to the above defects or improvement needs of the prior art, the present invention provides a method and system for detecting and identifying ECG anomalies in a small sample scenario, which can effectively address the difficulties in training, application and deployment of intelligent ECG diagnostic models in small abnormal sample scenarios.

[0004] To achieve the above object, according to a first aspect of the present invention, a method for detecting ECG anomalies in a small sample scenario is provided, comprising:

[0005] S101, divide the large sample normal ECG signal into a normal training set D 正训 With the normal validation set D 正验 ; D 正训 With small sample abnormal ECG signal D 异 Enter the prototype network;

[0006] S102, D 正训 Take the mean of the feature vectors obtained by inputting the prototype network to obtain the support vector c;

[0007] S103, based on the objective function The prototype network is trained to obtain a trained ECG abnormality detection model; wherein Ω(Θ) is a regularization term of the prototype network parameters, f Θ (x is the feature vector obtained after inputting sample x into the prototype network, d(f Θ (x),c) is f Θ (x) The Euclidean distance from c;

[0008] S104, calculate D 正验 The Euclidean distance between the feature vector and the support vector c obtained by inputting it into the trained ECG abnormality detection model, and taking its 99th percentile as the warning threshold;

[0009] S105, input the ECG signal to be detected into the trained ECG abnormality detection model to obtain the feature vector of the ECG signal to be detected; if the Euclidean distance of the support vector c of the feature vector of the ECG signal to be detected is greater than the warning threshold, the detection result is abnormal, otherwise the detection result is normal.

[0010] According to a second aspect of the present invention, a method for identifying electrocardiogram abnormality categories in a small sample scenario is provided, comprising:

[0011] S201, from any Random sampling N S The samples form the support set S k ,from Random sampling N Q The samples form the query set Q k ;in, Indicates D 异训 The sample subset with label k in , where x i is a small sample of abnormal ECG signals, y i ∈{1,…,K} is the corresponding abnormal category label;

[0012] S202, S k The feature vector obtained by inputting the prototype network is averaged to obtain S k The prototype vector e of the abnormal category in k ;

[0013] S203, based on the objective function The prototype network is trained to obtain a trained ECG abnormality category recognition model; wherein, g Φ (x) is the feature vector obtained after inputting sample x into the prototype network, d(g Φ (x),e k ) is g Φ (x) and e k The Euclidean distance of

[0014] S204, D 异训 The feature vectors obtained by inputting the trained ECG abnormality classification recognition model are averaged to obtain D 异训 Prototype vector of the abnormal category in ;

[0015] S205, inputting the abnormal ECG signal to be identified into the trained ECG abnormality category recognition model to obtain a feature vector of the abnormal ECG signal to be identified, and comparing the feature vector of the abnormal ECG signal to be identified with the D 异训 The Euclidean distance between the prototype vectors of the abnormal categories is input into the Softmax activation function to obtain the probability that the abnormal ECG signal to be identified belongs to each abnormal category, and the abnormal category with the largest probability is output.

[0016] According to a third aspect of the present invention, a method for detecting and identifying electrocardiogram anomalies in a small sample scenario is provided, comprising:

[0017] S1, using the ECG abnormality detection method as described in the first aspect to obtain the recognition result of the ECG signal to be detected, if the detection result of the ECG signal to be detected is normal, then end; if the detection result of the ECG signal to be detected is abnormal, then enter S2;

[0018] S2, using the ECG abnormality category recognition method as described in the second aspect to recognize the abnormal category of the ECG signal to be detected, and obtaining an abnormal category recognition result.

[0019] According to a fourth aspect of the present invention, there is provided a system for detecting ECG anomalies in a small sample scenario, comprising: a computer-readable storage medium and a processor;

[0020] The computer-readable storage medium is used to store executable instructions;

[0021] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method as described in the first aspect.

[0022] According to a fifth aspect of the present invention, there is provided a system for identifying ECG anomalies in a small sample scenario, comprising: a computer-readable storage medium and a processor;

[0023] The computer-readable storage medium is used to store executable instructions;

[0024] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method as described in the second aspect.

[0025] According to a sixth aspect of the present invention, there is provided a system for detecting and identifying ECG anomalies in a small sample scenario, comprising: a computer-readable storage medium and a processor;

[0026] The computer-readable storage medium is used to store executable instructions;

[0027] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method as described in the third aspect.

[0028] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:

[0029] The present invention divides the intelligent ECG diagnosis task into two subtasks: ECG anomaly detection and ECG anomaly recognition. It proposes an ECG anomaly detection method based on deep support vector data description and an ECG anomaly recognition method based on prototype network. It trains high-performance ECG anomaly detection and anomaly recognition models with a large number of normal ECG samples and a small number of labeled abnormal samples, which can effectively address the difficulties in training, application and deployment of intelligent ECG diagnosis models in small abnormal sample scenarios.

[0030] Furthermore, the ECG anomaly detection method in a small sample scenario provided by the present invention divides normal ECG samples into a normal training set and a normal validation set; uses the normal training set and a small number of abnormal ECG samples to train a representation learning model based on deep support vector data description; applies the trained model to the normal validation set to determine the warning threshold, and uses it as a single-value classification ECG anomaly detection model; wherein the warning threshold is determined by the anomaly score containing 99% of negative samples in the validation set, and the anomaly score is represented by the Euclidean distance between the output vector of the representation learning model and the support vector. This method can mine typical normal representations, thereby robustly detecting whether ECG anomalies occur.

[0031] Furthermore, the ECG abnormality category recognition method in a small sample scenario provided by the present invention obtains a support set and a query set by sampling from a labeled small sample abnormality training set; the support set and the query set are used to train a prototype network, and the trained prototype network is used as a multi-classification ECG abnormality recognition model; wherein the support set and the query set are both sample sets with known labels, the support set is used to calculate the prototype vectors of various abnormalities, and the query set is used to reversely optimize the model. This method can efficiently utilize the existing small sample abnormality data set, thereby accurately classifying the ECG abnormalities that occur.

[0032] Furthermore, the ECG anomaly detection and identification method in a small sample scenario provided by the present invention first inputs the ECG signal to be detected of the monitored person into a pre-trained single-value classification ECG anomaly detection model to obtain the ECG anomaly score of the monitored person, compares the ECG anomaly score with the warning threshold, determines whether the monitored person has ECG anomaly, and if it is detected as abnormal, inputs the data sample into the pre-trained ECG anomaly identification model, calculates the Euclidean distance between the output feature vector and various abnormal prototype vectors, and inputs it into the Softmax activation function to obtain the probability of the monitored person having various ECG anomalies. This method separates the detection and identification process of ECG anomalies. Compared with traditional classification methods, it can effectively improve the utilization rate of the model for small sample abnormal data sets, overcome the great difficulties brought to the model training process by severe data imbalance, and enable the model to achieve both robust detection of ECG anomalies and accurate identification of their abnormal categories. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A structural diagram of the backbone part of a one-dimensional deep residual convolutional neural network provided by an embodiment of the present invention;

[0034] Figure 2 A flowchart of a single-value classification ECG anomaly detection model training method in a small sample scenario provided by an embodiment of the present invention;

[0035] Figure 3 A flowchart of a multi-classification ECG abnormality recognition model training method in a small sample scenario provided by an embodiment of the present invention;

[0036] Figure 4 A flowchart of a method for detecting and identifying an ECG anomaly provided in an embodiment of the present invention;

[0037] Figure 5 A schematic diagram of the structure of an ECG anomaly detection and identification device provided in an embodiment of the present invention;

[0038] Figure 6 A schematic diagram of the structure of an ECG anomaly detection and identification system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0040] Embodiment 1

[0041] The embodiment of the present invention provides a method for detecting an abnormal electrocardiogram in a small sample scenario, including:

[0042] S101, divide the large sample normal ECG signal into a normal training set D 正训 With the normal validation set D 正验 ; D 正训 With small sample abnormal ECG signal D 异 Enter the Prototype Network.

[0043] S102, D 正训 Take the mean of the feature vectors obtained by inputting the prototype network to obtain the support vector c;

[0044] S103, based on the objective function The prototype network is trained to obtain a trained ECG anomaly detection model (i.e., a single-value classification ECG anomaly detection model in a small sample scenario); wherein Ω(Θ) is a regularization term of the prototype network parameters, f Θ (x) is the feature vector obtained after inputting sample x into the prototype network, d(f Θ (x),c) is f Θ (x) The Euclidean distance from c;

[0045] S104, calculate D 正验 The Euclidean distance between the feature vector and the support vector c obtained by inputting it into the trained ECG abnormality detection model, and taking its 99th percentile as the warning threshold;

[0046] S105, input the ECG signal to be detected into the trained ECG abnormality detection model to obtain the feature vector of the ECG signal to be detected; if the Euclidean distance of the support vector c of the feature vector of the ECG signal to be detected is greater than the warning threshold, the detection result is abnormal, otherwise the detection result is normal.

[0047] Furthermore, the calculation formula of the support vector c is:

[0048]

[0049] Furthermore, the prototype network includes: a one-dimensional convolutional neural network, a maximum pooling layer, a residual convolution module and an average pooling layer.

[0050] This embodiment is based on an unsupervised or semi-supervised approach to train a discrimination model that can distinguish normal ECG signals from abnormal ECG signals in a small sample scenario, such as Figure 1 As shown, S101 to S105 are the model training process, and S106 to S108 are the warning threshold determination process. The specific steps include:

[0051] S101 and S106: Obtain a large number of normal ECG samples and a small number of abnormal ECG samples, segment the original ECG signals according to the selected window length, and ensure that each sample contains multiple heartbeat signals; divide the normal ECG samples into a normal training set and a normal verification set according to a ratio of 4:1. S101 obtains the training data required for the single-value classification ECG abnormality detection model, including the normal training set and the abnormal ECG samples, which are respectively recorded as D 正训 With D 异 S106 obtains the verification data required to determine the warning threshold, which consists of a normal verification set, denoted as D 正验 .

[0052] S102: Input the training data into a representation learning model based on deep support vector data description. The network structure of the representation learning model based on deep support vector data description adopts Figure 2 The backbone of the one-dimensional deep residual convolutional neural network shown in the figure includes: S001, "7*1Conv1D,64, / 2" represents a one-dimensional convolutional neural network with a convolution kernel length of 7, 64 output channels, and a stride of 2, and the same applies to the others; S002, "Maxpool,\2" represents a maximum pooling layer with a stride of 2; S003, the solid curve represents skip connection and element-level matrix addition, and the same applies to the others; S004, the dashed and solid lines represent the use of a one-dimensional convolution kernel to downsample the skip-connected input and implement element-level matrix addition, and the same applies to the others; S005, "Avgpool" represents an average pooling layer. The network structure uses 8 residual convolution modules, and after 5 downsamplings and 1 average pooling, it outputs a 512-dimensional feature vector.

[0053] The representation learning model based on deep support vector data description is denoted as f Θ (·), Θ is the set of model parameters to be optimized. Given an input data sample x, the output feature vector is f Θ (x).

[0054] S103: Take the mean of the feature vectors of the normal training set (obtained by inputting the normal training set into the prototype network) to obtain the support vector, as shown below:

[0055]

[0056] Where c is the support vector.

[0057] S104: Calculate output feature vector f Θ (x) is the Euclidean distance between the support vector c, x∈D 正训 , as the abnormality score of the sample,

[0058]

[0059] S105: Construct an optimization target so that the volume of the envelope hypersphere of the normal feature vector is as small as possible, and the abnormal feature vector is as far away from the hypersphere as possible, as shown below:

[0060]

[0061] Where Ω(Θ) is the model parameter regularization term to prevent overfitting. l(x) is the loss function of the input data sample x, and its specific form is:

[0062]

[0063] The Adam algorithm is used to optimize this objective.

[0064] S107: Input the normal verification set into the trained model to obtain a feature vector.

[0065] S108: Calculate the Euclidean distance between the normal validation set feature vector and the support vector as the anomaly score, and take its 99th percentile as the warning threshold, as shown below:

[0066]

[0067] Where τ is the determined warning threshold.

[0068] It should be pointed out that in all embodiments of the present invention, a large sample refers to a number of samples in the thousands or more, such as 1,000 or more; a small sample refers to a number of samples in the hundreds or so.

[0069] Embodiment 2

[0070] The embodiment of the present invention provides a method for identifying electrocardiogram (ECG) abnormality categories in a small sample scenario, including:

[0071] S201, from any Random sampling N S The samples form the support set S k ,from Random sampling N Q The samples form the query set Q k ;in, Indicates D 异训 The sample subset with label k in , where x i is a small sample of abnormal ECG signals, y i ∈{1,…,K} is the corresponding abnormal category label;

[0072] S202, S k The feature vector obtained by inputting the prototype network is averaged to obtain the prototype vector e of each abnormal category k ;

[0073] S203, based on the objective function The prototype network is trained to obtain a trained ECG abnormality category recognition model (i.e., a multi-classification ECG abnormality recognition model in a small sample scenario); wherein, g Φ (x) is the feature vector obtained after inputting sample x into the prototype network, d(g Φ (x),e k ) is g Φ (x) and e k The Euclidean distance of

[0074] S204, D 异训 The feature vectors obtained by inputting the trained ECG abnormality classification recognition model are averaged to obtain D 异训 Prototype vector of the abnormal category in ;

[0075] S205, inputting the abnormal ECG signal to be identified into the trained ECG abnormality category recognition model to obtain a feature vector of the abnormal ECG signal to be identified, and comparing the feature vector of the abnormal ECG signal to be identified with the D 异训 The Euclidean distance between the prototype vectors of the abnormal categories is input into the Softmax activation function to obtain the probability that the abnormal ECG signal to be identified belongs to each abnormal category, and the abnormal category with the largest probability is output.

[0076] Furthermore, k The calculation formula is:

[0077]

[0078] Furthermore, the prototype network includes the backbone of a one-dimensional deep residual convolutional neural network (including a one-dimensional convolutional neural network, a maximum pooling layer, a residual convolution module and an average pooling layer), an average layer, a Euclidean distance calculation layer and a Softmax activation function.

[0079] The averaging layer is used to calculate the average value of the output vector of each type of abnormal sample in the support set input into the backbone part of the one-dimensional deep residual convolutional neural network, that is, to calculate the prototype of each type of abnormality in the support set. After the prototype network optimization process is completed, all abnormal training data samples need to be input into the prototype network, and the prototype vectors of each type of abnormality in all abnormal training data samples are calculated through the averaging layer to facilitate the use of subsequent prediction tasks.

[0080] The distance calculation layer is used to calculate the Euclidean distance between the feature vector obtained by inputting the query set into the prototype network and various types of abnormal prototype vectors.

[0081] The Softmax activation function is used to obtain the probability that the ECG sample belongs to each abnormal category according to the input Euclidean distance.

[0082] The prototypical network is optimized by minimizing the prediction loss on the query set.

[0083] Figure 3 A flowchart of a multi-classification ECG abnormality recognition model training method in a small sample scenario provided by the second embodiment of the present invention. This embodiment is based on metric learning and trains a discriminant model that can identify specific categories of abnormal ECG signals in a small sample scenario. The specific steps include:

[0084] S201 and S202: A cardiologist labels the specific categories (e.g., atrial fibrillation, sinus rhythm, etc.) of the abnormal ECG samples obtained in Example 1 to obtain a labeled small sample abnormal training set, denoted as where x i is the input ECG sample, y i ∈{1,…,K} is the corresponding category label. Indicates D 异训 A subset of samples with label k in . Random sampling N S The samples form the support set S k ,from Random sampling N Q The samples form the query set Q k .

[0085] S203: Input the support set samples into the prototype network and output the feature vector. Take the mean of the feature vectors of each type of abnormal ECG samples in the support set to obtain the prototype vector of each type of abnormality, as shown below:

[0086]

[0087] Among them, e k is the prototype vector of the k-th type of anomaly, g Φ (·) represents the prototype network, and its parameter set to be optimized is Φ. The structure of the prototype network adopts Figure 1 The backbone of the 1D deep residual convolutional neural network shown in .

[0088] S204: Input the query set sample into the prototype network and output the feature vector. Calculate the Euclidean distance between the feature vector of the query set sample and each type of abnormal prototype vector, as shown below:

[0089]

[0090] S205: Input the Euclidean distance calculated in S204 into the Softmax activation function to obtain the probability that the query set samples belong to each type of ECG abnormality:

[0091]

[0092] S206: Construct an optimization goal so that the feature vector of the abnormal sample in the query set is as close as possible to the prototype vector of the same type of abnormality and as far away as possible from the prototype vector of the different type of abnormality, as shown below:

[0093]

[0094] The Adam algorithm is used to optimize this objective.

[0095] S201 to S206 need to be repeated multiple times. After the prototype network training is completed, all labeled abnormal ECG samples are input into it, and the prototype vectors of various abnormal samples are calculated through the average pooling layer to facilitate the use of subsequent prediction tasks.

[0096] Embodiment 3

[0097] The embodiment of the present invention provides a method for detecting and identifying electrocardiogram anomalies in a small sample scenario, including:

[0098] S1, using the ECG abnormality detection method as described in the first embodiment to obtain the recognition result of the ECG signal to be detected, if the detection result of the ECG signal to be detected is normal, then end; if the detection result of the ECG signal to be detected is abnormal, then enter S2;

[0099] S2, using the ECG abnormality category recognition method as described in the above-mentioned embodiment 2 to recognize the abnormal category of the ECG signal to be detected, and obtain an abnormal category recognition result.

[0100] Figure 4 A flowchart of a method for detecting and identifying ECG anomalies provided by an embodiment of the present invention. This embodiment uses the representation learning model, support vector, warning threshold, prototype network, and prototype vector described based on deep support vector data provided by Embodiment 1 and Embodiment 2 to achieve abnormal detection and abnormal identification of ECG signals of monitored persons. The specific steps include:

[0101] S301: Obtaining an electrocardiogram sample of the monitored person.

[0102] S302: Input the obtained ECG sample into the representation learning model based on deep support vector data description trained in the first embodiment to obtain a feature vector.

[0103] S303: Calculate the Euclidean distance between the feature vector obtained in S302 and the support vector provided in the first embodiment as the obtained ECG sample abnormality score.

[0104] S304: Compare the abnormality score obtained in S303 with the warning threshold provided in Example 1. If the abnormality score obtained is less than the warning threshold, then the output is normal. Otherwise, it is detected as abnormal.

[0105] S305: If detected as abnormal, the ECG sample is input into the prototype network trained in the second embodiment to obtain a feature vector.

[0106] S306: Calculate the Euclidean distance between the feature vector obtained in S305 and all abnormal prototype vectors provided by Example 2.

[0107] S307: Input the Euclidean distance obtained in S306 into the Softmax activation function to obtain the probability that the input ECG signal belongs to each type of abnormality.

[0108] S308: Output the abnormal category with the highest probability.

[0109] An embodiment of the present invention provides an ECG anomaly detection system in a small sample scenario, including: a computer-readable storage medium and a processor;

[0110] The computer-readable storage medium is used to store executable instructions;

[0111] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method described in the first embodiment.

[0112] An embodiment of the present invention provides an ECG anomaly recognition system in a small sample scenario, comprising: a computer-readable storage medium and a processor;

[0113] The computer-readable storage medium is used to store executable instructions;

[0114] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method described in the second embodiment.

[0115] An embodiment of the present invention provides a system for detecting and identifying electrocardiogram anomalies in a small sample scenario, including: a computer-readable storage medium and a processor;

[0116] The computer-readable storage medium is used to store executable instructions;

[0117] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method described in embodiment three.

[0118] Figure 5A schematic diagram of the structure of an ECG abnormality detection and identification device provided by an embodiment of the present invention. The specific modules include:

[0119] The ECG signal acquisition module 401 is used to acquire the ECG signal of the monitored person.

[0120] The ECG signal segmentation module 402 is used to segment the original ECG signal according to the selected window length to obtain ECG samples. The selected window length needs to ensure that each sample contains multiple heart beat signals.

[0121] The ECG anomaly detection module 403 is used to input the segmented ECG samples into a representation learning model based on deep support vector data description, perform anomaly scoring on the ECG samples and compare them with a warning threshold to detect whether they are abnormal.

[0122] The abnormality category identification module 404 is used to input the segmented ECG samples into the prototype network to identify the abnormality category thereof.

[0123] Among them, the representation learning model based on deep support vector data description is trained by the single-value classification ECG anomaly detection model training method under the small sample scenario provided by Example 1, and the prototype network is trained by the multi-classification ECG anomaly recognition model training method under the small sample scenario provided by Example 2.

[0124] Figure 6 The schematic diagram of the structure of an ECG abnormality detection and identification system provided by an embodiment of the present invention. The specific components include a storage device 502, an input device 503, an output device 504, an ECG acquisition device 505 and a processor 506, and these components are interconnected through a bus 501. It should be noted that Figure 6 The components and structures of the ECG abnormality detection and identification system shown are only exemplary, and other components and structures may be provided as required.

[0125] The storage device 502 is used to store various computer programs and data, and its composition includes various forms of computer-readable storage media, including volatile memories such as random access memory (RAM) and cache memory, or non-volatile memories such as read-only memory (ROM), hard disk and flash memory.

[0126] The input device 503 is used to receive external input instructions from the user, and may include one or more of a microphone, a keyboard, a mouse, a touch screen, and the like.

[0127] The output device 504 is used to output various information such as video or audio to the outside world, and its composition may include one or more of a display screen and a speaker.

[0128] The ECG acquisition device 505 is used to acquire the ECG signal of the monitored user, and store the acquired ECG signal in the storage device 502 for use by other components.

[0129] The processor 506 is used to run the computer program stored in the storage device 502 to implement any of the ECG abnormality detection / identification methods or ECG abnormality detection / identification model training methods described in any embodiment of the present invention. The processor can be implemented in at least one hardware form of a programmable logic array (PLA), a field programmable gate array (FPGA) and a digital signal processor (DSP), and can use a combination of one or more processing units with instruction execution capability or data processing capability to control other components to achieve a given function.

[0130] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting ECG anomalies in a small sample scenario. It is characterized in that include: S101, divide the large sample normal ECG signal into a normal training set D 正训 With the normal validation set D 正验 ; D 正训 With small sample abnormal ECG signal D 异 Enter the prototype network; S102, D 正训 Take the mean of the feature vectors obtained by inputting the prototype network to obtain the support vector c; S103, based on the objective function The prototype network is trained to obtain a trained ECG abnormality detection model; wherein Ω(Θ) is a regularization term of the prototype network parameters, l(x) is a loss function of the input data sample x, f Θ (x) is the feature vector obtained after inputting sample x into the prototype network, d(f Θ (x),c) is f Θ (x) The Euclidean distance from c; S104, calculate D 正验 The Euclidean distance between the feature vector and the support vector c obtained by inputting it into the trained ECG abnormality detection model, and taking its 99th percentile as the warning threshold; S105, inputting the ECG signal to be detected into the trained ECG abnormality detection model to obtain the feature vector of the ECG signal to be detected; if the Euclidean distance between the feature vector of the ECG signal to be detected and the support vector c is greater than the warning threshold, the detection result is abnormal, otherwise the detection result is normal; The calculation formula of support vector c is:

2. The method according to claim 1, It is characterized in that The prototype network includes: a one-dimensional convolutional neural network, a maximum pooling layer, a residual convolution module and an average pooling layer.

3. A method for identifying ECG abnormality categories in a small sample scenario. It is characterized in that include: S201, from any Random sampling N S The samples form the support set S k ,from Random sampling N Q The samples form the query set Q k ;in, Indicates D 异训 The sample subset with label k in , where x i is a small sample of abnormal ECG signals, y i ∈{1,…,K} is the corresponding abnormal category label; S202, S k The feature vector obtained by inputting the prototype network is averaged to obtain S k The prototype vector e of the abnormal category in k ; S203, based on the objective function The prototype network is trained to obtain a trained ECG abnormality category recognition model; wherein, g Φ (x) is the feature vector obtained after inputting sample x into the prototype network, d(g Φ (x),e k ) is g Φ (x) and e k The Euclidean distance of S204, to D 异训 The feature vectors obtained by inputting the trained ECG abnormality classification recognition model are averaged to obtain D 异训 Prototype vector of the abnormal category in ; S205, inputting the abnormal ECG signal to be identified into the trained ECG abnormality category recognition model to obtain a feature vector of the abnormal ECG signal to be identified, and comparing the feature vector of the abnormal ECG signal to be identified with the D 异训 The Euclidean distance between the prototype vectors of the abnormal categories is input into the Softmax activation function to obtain the probability that the abnormal ECG signal to be identified belongs to each abnormal category, and the abnormal category with the greatest probability is output; e k The calculation formula is:

4. The method according to claim 3, It is characterized in that The prototype network includes: a one-dimensional convolutional neural network, a maximum pooling layer, a residual convolution module and an average pooling layer.

5. A method for detecting and identifying ECG anomalies in a small sample scenario. It is characterized in that include: S1, using the ECG abnormality detection method according to any one of claims 1-2 to obtain a recognition result of the ECG signal to be detected, if the detection result of the ECG signal to be detected is normal, then end; if the detection result of the ECG signal to be detected is abnormal, then enter S2; S2, using the ECG abnormality category recognition method as described in any one of claims 3-4 to identify the abnormal category of the ECG signal to be detected, and obtain an abnormal category recognition result.

6. An ECG abnormality detection system in a small sample scenario, It is characterized in that include: A computer readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method according to any one of claims 1-2.

7. An ECG abnormality recognition system in a small sample scenario, It is characterized in that include: A computer readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method according to any one of claims 3-4.

8. An ECG abnormality detection and recognition system in a small sample scenario, It is characterized in that include: A computer readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is configured to read the executable instructions stored in the computer-readable storage medium and execute the method according to claim 5.

Citation Information

Patent Citations

  • Automatic electrocardiogram classification method, system and device based on deep learning

    CN110974214A

  • Partially-shielded face recognition small sample learning method

    CN112149500A

  • Electrocardiosignal classification model training method and device, and electrocardiosignal classification method and device

    CN112353402A

  • Medical image automatic labeling method and system under small sample condition

    CN113592029A

  • Method of detecting anomalous data, machine computing unit, computer program

    EP3719711A2