Electrocardiogram analysis method, terminal device and storage medium based on contrastive learning

Through the electrocardiogram analysis method based on contrast learning, combined with the deep neural network model and manual correction results, targeted analysis of ECG data is solved, and the problem of low accuracy of dynamic ECG analysis in the existing technology is achieved, and fast and accurate ECG analysis is achieved.

CN113935381BActive Publication Date: 2025-04-18纳龙健康科技股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111256198.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-27
Publication Date
2025-04-18
Estimated Expiration
2041-10-27

AI Technical Summary

Technical Problem

Due to the huge data volume and signal complexity, the existing dynamic ECG analysis system has low accuracy of automatic analysis software, and cannot help doctors analyze ECG data and give correct analysis reports in a short period of time.

Method used

The electrocardiogram analysis method based on comparison learning is adopted. By collecting electrocardiogram data, building a deep neural network model, pre-classifying the classified heartbeat, manually correcting the error classification results, and using the correction results for secondary analysis, combining the specific characteristics of the current data, the modified parts of the doctor are learned in a targeted manner, so as to quickly achieve the analysis goal of all data.

Benefits of technology

It improves the accuracy of automatic electrocardiogram analysis, and can help doctors quickly analyze electrocardiogram data and give correct analysis reports in a short period of time, significantly improving diagnostic efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113935381B_ABST
    Figure CN113935381B_ABST
Patent Text Reader

Abstract

The present invention relates to an electrocardiogram analysis method based on contrastive learning, a terminal device and a storage medium, the method comprising: S1: collecting electrocardiogram data to form a training set; S2: constructing a deep neural network model based on contrastive learning, setting the input of the model as a positive reference sample set and a target sample in a triplet, the output of the model as a category label of the target sample, training the model through the training set, and using the trained model as a sample category classification model; S3: pre-classifying the heartbeats to be classified in the electrocardiogram data to be classified; S4: correcting the classification results through manual partial classification, and extracting positive samples from the corrected classification results to form a positive reference sample set; S5: for the uncorrected classification results, inputting them together with the positive reference sample set into a sample category classification model for classification, and determining whether it is a positive sample according to the category label. The present invention can quickly achieve the goal of accurate analysis of all data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electrocardiogram analysis, and in particular to an electrocardiogram analysis method based on contrast learning, a terminal device and a storage medium. Background Art

[0002] Electrocardiogram examination is of great significance for the rapid diagnosis of dangerous cardiovascular diseases such as coronary artery insufficiency, variant angina, acute myocardial infarction, etc. Among them, dynamic electrocardiogram examination generally records continuously for 24 hours. Due to its long-term monitoring characteristics, it has a higher detection rate for these cardiovascular diseases.

[0003] The current commercial dynamic electrocardiogram analysis system takes doctors 15-30 minutes to analyze a dynamic electrocardiogram, which seriously restricts the implementation of dynamic electrocardiogram examinations. However, due to the huge amount of dynamic electrocardiogram data, more than 100,000 heartbeats can be collected in 24 hours, and the total print length is 2,160 meters, which requires a lot of analysis work. Although most dynamic electrocardiogram analysis software on the market can automatically analyze the data, due to the complexity of the dynamic electrocardiogram signal itself and the easy introduction of various interferences during the wearing process, the accuracy of the current automatic analysis software is far from enough to help doctors analyze the electrocardiogram data in a relatively short time and give a correct analysis report.

[0004] Although in recent years, with the application of artificial intelligence in the field of electrocardiography, some deep learning-based methods have also been used for automatic electrocardiogram analysis. However, the method used is to train a general model based on a large data set in the hope of being applicable to each patient. When this approach is applied to dynamic electrocardiograms, due to the large heartbeat base, it is inevitable that some patient data have some unique change characteristics, which reduces the accuracy of the model. Summary of the invention

[0005] In order to solve the above problems, the present invention proposes an electrocardiogram analysis method, terminal device and storage medium based on comparative learning, which can combine the specific features of the current data to specifically learn the parts modified by the doctor, so as to quickly achieve the analysis goal of all data.

[0006] The specific plan is as follows:

[0007] An electrocardiogram analysis method based on contrastive learning comprises the following steps:

[0008] S1: Collecting electrocardiogram data, annotating positive samples and negative samples in the electrocardiogram data, and converting the electrocardiogram data into a triplet format; a triplet includes a set of positive reference samples in a piece of electrocardiogram data, a target sample in the electrocardiogram data, and a category label of the target sample; the triplets corresponding to different electrocardiogram data are combined into a training set;

[0009] S2: Construct a deep neural network model based on contrastive learning. Set the input of the model as the positive reference sample set and the target sample in the triplet. The output of the model is the category label of the target sample. Train the model with the training set and use the trained model as the sample category classification model.

[0010] S3: pre-classifying the heart beats to be classified in the electrocardiogram data to be classified;

[0011] S4: manually correcting part of the classification results in step S3, and extracting positive samples from the corrected classification results to form a positive reference sample set;

[0012] S5: For each uncorrected classification result, the corresponding heartbeat sample is used as the target sample, and is input together with the positive reference sample set in step S4 into the sample category classification model obtained in step S2 for classification. The category label of the target sample output by the sample category classification model is used to determine whether the heartbeat sample is a positive sample.

[0013] Furthermore, the training set includes both triples of positive samples as target samples and triples of negative samples as target samples.

[0014] Furthermore, the category label of the target sample is represented by 1 or 0. When the target sample is positive, the label is 1, otherwise the label is 0.

[0015] Furthermore, the triple format is expressed as or in, represents a set of positive reference samples in an electrocardiogram data, X + , X - They represent the positive target samples and negative target samples of the electrocardiogram data respectively.

[0016] An electrocardiogram analysis terminal device based on contrastive learning includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method described above in the embodiment of the present invention are implemented.

[0017] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described above in an embodiment of the present invention are implemented.

[0018] The present invention adopts the above technical solution, firstly pre-analyzes the ECG data by the traditional dynamic ECG analysis method, then manually corrects a small number of typical misclassifications, and then uses the correction results to perform secondary analysis on other pre-classification results. The secondary analysis combines the specific characteristics of the current data and specifically learns the manually modified parts, so as to quickly achieve the goal of accurate analysis of all data. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 Shown is a flow chart of Embodiment 1 of the present invention. DETAILED DESCRIPTION

[0020] To further illustrate various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementations and advantages of the present invention.

[0021] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.

[0022] Embodiment 1:

[0023] The accuracy of automatic ECG analysis plays a vital role in the quality of doctors' reports and diagnostic efficiency. Some manufacturers have gradually proposed some methods based on deep learning, which have improved the automatic diagnosis accuracy of QRS waves and P waves to a certain extent. The general practice of these methods is to establish a corresponding deep neural network model, and then use the collected big data for corresponding training, so as to obtain more accurate recognition and classification results than traditional methods. In fact, there is no exactly the same ECG in the world. Even for the same person, the ECG collected at different times may have relatively large differences and changes. This is why no matter how clever the model is, there will always be more misjudgments in some dynamic ECGs. At this time, if the doctor's supervisory opinions on the current ECG can be fully utilized, the accuracy of the global automatic ECG analysis will be greatly improved.

[0024] Therefore, the embodiment of the present invention provides an electrocardiogram analysis method based on contrast learning, such as Figure 1 As shown, the method comprises the following steps:

[0025] S1: Collect ECG data, annotate the positive samples and negative samples in the ECG data, and then convert the ECG data into a triplet format; a triplet includes a set of positive reference samples in an ECG data, a target sample in the ECG data, and a category label of the target sample; the triplets corresponding to different ECG data are combined into a training set.

[0026] The electrocardiogram data may be directly collected electrocardiogram data, or may be electrocardiogram data collected from an electrocardiogram database storing historical electrocardiogram data, which is not limited here.

[0027] A positive sample refers to an abnormal electrocardiogram of a certain type of heartbeat, such as premature ventricular beats, preexcited heartbeats, etc. A negative sample is the complement of a positive sample. In this embodiment, the QRS wave corresponding to the more common premature ventricular beats is used as an example for explanation.

[0028] It should be noted that each data in the triplet corresponds to the same electrocardiogram data, the positive reference sample set may be a set of some positive samples, and the target sample is a positive sample or a negative sample outside the positive reference sample set.

[0029] In this embodiment, the triple format is expressed as or in, represents a set of positive reference samples in an electrocardiogram data, X + , X - They represent the positive target sample and negative target sample of the electrocardiogram data respectively. 1 and 0 represent the category label of the target sample. When the target sample is positive, the label is 1, otherwise the label is 0.

[0030] S2: Construct a deep neural network model based on contrastive learning. Set the input of the model as the positive reference sample set and the target sample in the triplet. The output of the model is the category label of the target sample. Train the model with the training set and use the trained model as the sample category classification model.

[0031] The deep neural network model can adopt a network architecture such as ResNet, and the loss function can be selected as cross entropy.

[0032] S3: Pre-classify the heart beats to be classified in the electrocardiogram data to be classified.

[0033] The pre-classification may adopt a traditional dynamic electrocardiogram analysis model to achieve preliminary classification of the electrocardiogram data to be classified, and the type of model is not limited here.

[0034] S4: manually correcting part of the classification results in step S3, and extracting positive samples from the corrected classification results to form a positive reference sample set.

[0035] The artificial person here can be a doctor or other professionals, and there is no restriction here. The positive reference sample set composed of In this embodiment, Represents a collection of manually corrected positive premature ventricular beats.

[0036] S5: For each uncorrected classification result, the corresponding heartbeat sample is used as the target sample, and is input into the sample category classification model together with the positive reference sample set in step S4 for classification. The category label of the target sample output by the sample category classification model is used to determine whether the heartbeat sample is a positive sample.

[0037] In this embodiment, when the category label is 1, the heartbeat sample is determined to be a positive sample; when the category label is 0, the heartbeat sample is determined to be a negative sample.

[0038] The embodiment of the present invention first pre-analyzes the ECG data using the traditional dynamic ECG analysis method, then manually corrects a small number of typical misclassifications, and then uses the correction results to perform secondary analysis on other pre-classification results. The secondary analysis combines the specific features of the current data and specifically learns the manually modified parts, thereby quickly achieving the goal of accurate analysis of all data.

[0039] Embodiment 2:

[0040] The present invention also provides an electrocardiogram analysis terminal device based on comparative learning, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned method embodiment of embodiment 1 of the present invention when executing the computer program.

[0041] Further, as an executable solution, the electrocardiogram analysis terminal device based on contrastive learning can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The electrocardiogram analysis terminal device based on contrastive learning may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the composition structure of the electrocardiogram analysis terminal device based on contrastive learning is only an example of an electrocardiogram analysis terminal device based on contrastive learning, and does not constitute a limitation on the electrocardiogram analysis terminal device based on contrastive learning. It may include more or less components than the above, or a combination of certain components, or different components. For example, the electrocardiogram analysis terminal device based on contrastive learning may also include input and output devices, network access devices, buses, etc., and the embodiments of the present invention do not limit this.

[0042] Further, as an executable solution, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electrocardiogram analysis terminal device based on contrastive learning, and uses various interfaces and lines to connect various parts of the entire electrocardiogram analysis terminal device based on contrastive learning.

[0043] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electrocardiogram analysis terminal device based on contrast learning by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and an application required for at least one function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0044] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.

[0045] If the module / unit integrated in the electrocardiogram analysis terminal device based on contrastive learning is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory) and software distribution medium, etc.

[0046] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.

Claims

1. An electrocardiogram analysis method based on contrastive learning, characterized in that: The following steps are involved: S1: Collecting electrocardiogram data, annotating positive samples and negative samples in the electrocardiogram data, and converting the electrocardiogram data into a triplet format; a triplet includes a set of positive reference samples in a piece of electrocardiogram data, a target sample in the electrocardiogram data, and a category label of the target sample; the triplets corresponding to different electrocardiogram data are combined into a training set; S2: Construct a deep neural network model based on contrastive learning. Set the input of the model as the positive reference sample set and the target sample in the triplet. The output of the model is the category label of the target sample. Train the model with the training set and use the trained model as the sample category classification model. S3: pre-classifying the heart beats to be classified in the electrocardiogram data to be classified; S4: manually correcting part of the classification results in step S3, and extracting positive samples from the corrected classification results to form a positive reference sample set; S5: For each uncorrected classification result, the corresponding heartbeat sample is used as the target sample, and is input together with the positive reference sample set in step S4 into the sample category classification model obtained in step S2 for classification. The category label of the target sample output by the sample category classification model is used to determine whether the heartbeat sample is a positive sample.

2. The electrocardiogram analysis method based on contrastive learning according to claim 1, characterized in that: The training set includes both triplets with positive samples as target samples and triplets with negative samples as target samples.

3. The electrocardiogram analysis method based on contrastive learning according to claim 1, characterized in that: The category label of the target sample is represented by 1 or 0. When the target sample is positive, the label is 1, otherwise the label is 0.

4. The electrocardiogram analysis method based on contrastive learning according to claim 3, characterized in that: The triple format is expressed as or in, represents a set of positive reference samples in an electrocardiogram data, X + , X - They represent the positive target samples and negative target samples of the electrocardiogram data respectively.

5. An electrocardiogram analysis terminal device based on contrastive learning, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the methods of claims 1 to 4 when executing the computer program.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Method and system for locating R-wave position and R-wave automatic detection method using LSTM neural network

    CN110090016A

  • Supervised learning method and device, label prediction method and device, electronic equipment and storage medium

    CN110781934A