Method for generating a heart disease prediction model, server, and computer program

A deep learning-based method for electrocardiogram analysis improves heart disease prediction accuracy by preprocessing, self-supervised learning, and ensemble learning, addressing the limitations of statistical methods in detecting cardiac risks.

JP7709232B2Active Publication Date: 2025-07-16SYNERGY A I CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2024140097
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2024-08-06
Filing Date
2024-08-21
Publication Date
2025-07-16
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

Existing electrocardiogram analysis methods, primarily statistical, struggle to accurately predict and stratify the risk of future cardiac diseases like atrial fibrillation due to their inability to handle non-linear patterns and are affected by noise, leading to inadequate detection and increased health risks.

Method used

A deep learning-based method involving preprocessing, masking-based self-supervised learning, clustering, and ensemble learning of tree models to generate a heart disease prediction model using electrocardiogram data, extracting HRV characteristics and latent vectors to improve prediction accuracy.

Benefits of technology

Enhances the prediction accuracy of heart diseases by providing early detection and personalized health insights, reducing the time and effort required for medical analysis, and enabling prompt interventions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007709232000006
    Figure 0007709232000006
  • Figure 0007709232000007
    Figure 0007709232000007
  • Figure 0007709232000008
    Figure 0007709232000008
Patent Text Reader

Abstract

To provide a method for generating a heart disease prediction model.SOLUTION: The method includes obtaining a plurality of electrocardiogram data, and generating a model for predicting heart disease on the basis of the plurality of electrocardiogram data.SELECTED DRAWING: Figure 9
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Various embodiments of the present invention relate to a method for providing a neural network model for predicting future-occurring cardiac diseases in patients. More specifically, the present invention relates to a technique for evaluating and predicting the risks of arrhythmias including atrial fibrillation and other cardiac diseases based on electrocardiogram data by utilizing a deep learning model.

Background Art

[0002] Electrocardiogram (ECG) data is widely used as an important tool for recording the electrical activity of the heart and diagnosing the heart condition. Existing multi-lead electrocardiographs have played a central role in detecting cardiac rhythm and electrical conduction abnormalities and diagnosing cardiac diseases, especially arrhythmias such as atrial fibrillation. Arrhythmias including atrial fibrillation are common diseases characterized by irregular or abnormal heartbeats, and often present with no symptoms or mild symptoms and are difficult to detect without appropriate screening. If such arrhythmias are left untreated, they may lead to serious health complications such as stroke, heart failure, and sudden cardiac death. In particular, atrial fibrillation is one of the important arrhythmia types because it is associated with an increased risk of stroke and heart failure. Therefore, early detection and intervention for atrial fibrillation and arrhythmias are very important for effectively managing these diseases. On the other hand, existing electrocardiographs mainly focus on diagnosis and have limitations in predicting or stratifying the risks of future cardiac diseases. This is because existing electrocardiogram analysis methods mainly rely on statistical analysis. Statistical methodologies do not fully reflect non-linear and complex patterns and are difficult to precisely evaluate the individual cardiac conditions of patients and the risks of various arrhythmias. Furthermore, statistic-based models are inferior in performance compared to deep learning-based probabilistic models when processing large amounts of data. Electrocardiogram data may be affected by signal overlaps such as muscle movement, respiration, and electrical noise generated from other equipment. These external factors may reduce the accuracy of statistical methodologies and thus pose a major obstacle to accurately stratifying and quantifying the risks of cardiac diseases.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] The problem to be solved by the present invention is devised in response to the aforementioned background art, and is to provide a technique capable of predicting and stratifying the risk of future heart diseases based on electrocardiogram data. The problem to be solved by the present invention is not limited to the above - mentioned problems, and other problems not mentioned above will be clearly understood by those of ordinary skill in the art from the following description.

Means for Solving the Problems

[0005] A method for generating a heart disease prediction model according to an embodiment of the present invention for solving the above problems is disclosed. The method may include a step of acquiring a plurality of electrocardiogram data, and a step of generating a model for predicting heart diseases based on the plurality of electrocardiogram data. In an alternative embodiment, the step of generating the model for predicting heart diseases includes a step of constructing a learning dataset based on the plurality of electrocardiogram data, and a step of generating a heart disease risk prediction model by performing learning on one or more network functions based on the learning dataset. The learning dataset includes a first learning dataset and a second learning dataset classified for different learning purposes, and the heart disease risk prediction model may be characterized by hierarchically providing prediction information regarding the risk of future heart diseases based on the electrocardiogram data of a patient. In an alternative embodiment, the first training dataset may include data for training corresponding to the process of converting the characteristics of the electrocardiogram data into a characteristic space, and the second training dataset may include data for calibration related to heart risk prediction. In an alternative embodiment, the step of constructing the training dataset includes a step of performing preprocessing on the plurality of electrocardiogram data, and the step of performing the preprocessing includes a step of performing noise preprocessing on the plurality of electrocardiogram data, a step of dividing the plurality of preprocessed electrocardiogram data into a predetermined window size to generate a plurality of ROI signals, and a step of extracting HRV characteristic information in units of leads of the plurality of electrocardiogram data, and the HRV characteristic information may include index information related to the variability between heartbeats. In an alternative embodiment, the step of generating the heart disease risk prediction model may include a step of generating an embedding model through masking-based self-supervised learning using the first training dataset, an embedding execution step of extracting a latent vector corresponding to each of the plurality of ROI signals corresponding to the second training dataset using the embedding model, a step of performing clustering on the latent vector using a clustering model, and a step of constructing a vector database (DB, Database) based on the latent vector and information on each cluster corresponding to each latent vector. In an alternative embodiment, the step of generating the embedding model includes: inducing self-supervised learning in a self-reconstruction model to process the data included in the first training dataset as input so that the self-reconstruction model generates an output similar to the input data; and extracting an encoder from the self-reconstruction model that has completed the learning to generate the embedding model. The self-reconstruction model is a neural network model that masks a part of the input data and restores the masked part, and can include a dimensionality reduction network function and a dimensionality restoration network function. In an alternative embodiment, the clustering model performs clustering based on the similarity distance between the latent vectors corresponding to each of the plurality of ROI signals. The step of performing the clustering can include extracting a representative vector for each of a plurality of clusters corresponding to the clustering result. In an alternative embodiment, the method can include: obtaining electrocardiogram data of a person to be predicted; performing preprocessing on the electrocardiogram data of the person to be predicted; using the embedding model to generate a plurality of latent vectors corresponding to the preprocessed electrocardiogram data; comparing each of the plurality of latent vectors with each of the representative vectors corresponding to each of the plurality of clusters to classify each of the plurality of latent vectors into one of the plurality of clusters; and generating hierarchical information regarding the risk of heart disease based on the classification result in which each of the plurality of latent vectors is classified into the plurality of clusters. In an alternative embodiment, the step of generating the heart disease risk prediction model may include: obtaining user meta information corresponding to each of the plurality of electrocardiogram data; obtaining the plurality of latent vectors and cluster information corresponding to the plurality of latent vectors from the vector database; performing learning on a plurality of tree models based on the HRV characteristic information, the user meta information, the plurality of latent vectors, and the cluster information corresponding to the latent vectors, and performing ensemble learning to integrate the outputs of each tree model to generate the heart disease risk prediction model. In an alternative embodiment, the step of generating the model for predicting heart disease may further include: classifying the obtained plurality of electrocardiogram data into a training data set, a validation data set, and a test data set; obtaining ROI electrocardiogram data divided into a predetermined window size from each of the electrocardiogram data classified into the training data set, the validation data set, and the test data set; corresponding to inputting the first ROI electrocardiogram data obtained from the electrocardiogram data included in the training data set into a deep learning model for predicting a patient's heart disease, training the deep learning model to predict each heart disease class of the first ROI electrocardiogram data; and applying the second ROI electrocardiogram data obtained from the electrocardiogram data included in the validation data set to the trained deep learning model to determine a threshold for classifying the heart disease class. In an alternative embodiment, the determining step may include: collecting probability scores for each of the ROI electrocardiogram data separated from the same electrocardiogram data for each of the second ROI electrocardiogram data; averaging the probability scores for each of the collected second ROI electrocardiogram data to derive a final probability score; and finely adjusting a threshold for classifying the heart disease class based on the derived final probability score. In an alternative embodiment, the determined threshold value can be stored together with the weights of the deep learning model.

[0006] According to another embodiment of the present invention, a server for performing a method of generating a heart disease prediction model is disclosed. The server includes a memory storing one or more instructions, and a processor executing the one or more instructions stored in the memory, and the processor can perform the method of generating the heart disease prediction model described above by executing the one or more instructions. According to another embodiment of the present invention, a computer program stored in a computer-readable recording medium is disclosed. The computer program is coupled to a computer which is hardware and can perform a method of generating a heart disease prediction model. Other specific matters of the present invention are included in the detailed description and the drawings.

Advantages of the Invention

[0007] According to various embodiments of the present invention, by extracting ROI electrocardiogram data from a patient's electrocardiogram data and applying the extracted ROI electrocardiogram data to a deep learning model, the prediction accuracy of the patient's heart disease can be improved. In addition, the present invention can provide an effect that a patient can grasp his or her own health condition and prevent heart disease by predicting the risk of future heart disease using a plurality of machine learning models. This enables early detection and prompt response to heart disease, protecting the patient's life and providing an opportunity to improve the treatment outcome. In addition, the present invention can provide an effect of increasing the screening efficiency and reducing the opportunity cost in the medical field by significantly reducing the physical time of medical staff who have to analyze electrocardiogram data one by one through an automated AI-based processing process. In addition, the present invention can further improve the prediction accuracy of heart disease risk by performing an ensemble using a plurality of tree series machine learning models in order to ensemble HRV characteristic information, latent vectors extracted from an embedding model, and metadata such as the patient's age. The effects of the present invention are not limited to the above-described effects, and other effects not described above will be clearly understood by those skilled in the art from the following description.

Brief Description of the Drawings

[0008]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5a

Figure 5b

Figure 5c

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Mode for Carrying Out the Invention

[0009] Specific structural or functional descriptions of the embodiments are disclosed only for the purpose of illustration and can be realized in various forms. Therefore, the actually realized form is not limited to the disclosed specific embodiments only, and the scope of this specification includes modifications, equivalents, or alternatives included in the technical idea described in the embodiments. Terms such as first or second can be used to describe various components, but these terms should be interpreted only for the purpose of distinguishing one component from another. For example, the first component can be named the second component, and similarly, the second component can be named the first component. When a component is described as being "connected to" another component, it should be understood that it may be directly connected or connected to the other component, or there may be another component intervening between them. The singular forms include the plural forms as well, unless the context clearly dictates otherwise. In this document, each of the phrases such as "A or B", "at least one of A and B", "at least one of A or B", "A, B or C", "at least one of A, B and C", and "at least one of A, B or C" can include any one of the items listed together in the corresponding phrase of that phrase, or all possible combinations thereof. In this specification, terms such as "comprise" or "have" are used to specify the presence of the described features, numbers, steps, operations, components, parts, or combinations thereof, and it should be understood that they do not preclude in advance the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof. Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains. Terms defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the relevant art, and should not be interpreted in an idealized or overly formal sense unless clearly defined herein. Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. In describing with reference to the accompanying drawings, identical components will be denoted by the same reference numerals regardless of the reference signs, and redundant descriptions thereof will be omitted. The present invention can acquire a plurality of electrocardiogram data corresponding to a plurality of patients and generate a model for predicting heart diseases based on the acquired plurality of electrocardiogram data. In an embodiment, the model for predicting heart diseases can be a neural network model that extracts important patterns and features from the electrocardiogram data and predicts the possibility of heart diseases based thereon. The computing device of the present invention processes a plurality of electrocardiogram data into a form suitable for learning, and uses the processed data to train a model for predicting heart diseases. According to one embodiment, the present invention can generate and provide a deep learning model and a heart disease risk prediction model as models for predicting heart diseases. In an embodiment, the present invention can process a plurality of electrocardiogram data into various forms, train neural networks in different ways, and generate and provide various prediction models. Hereinafter, with reference to various drawings, a method for generating a model for predicting heart diseases will be described in detail.

[0010] FIG. 1 is a configuration diagram of a computing device for performing a method for generating a heart disease prediction model according to an embodiment of the present invention. As shown in FIG. 1, the computing device 100 may include one or more processors 110 and a memory 120 for loading or storing a program 130 executed by the processor 110. The components included in the computing device 100 in FIG. 1 are merely examples, and it can be understood that an ordinary technician in the technical field to which the present invention belongs can further include other general-purpose components in addition to the components shown in FIG. 1. The processor 110 controls the overall operation of each component of the computing device 100. The processor 110 can be configured to include at least one of a CPU (Central Processing Unit), an MPU (Micro Processor Unit), an MCU (Micro Controller Unit), a GPU (Graphic Processing Unit), an NPU (Neural Processing Unit), a DSP (Digital Signal Processor), or any form of processor well-known in the technical field of the present invention. Further, the processor 110 can perform operations on at least one application or program for executing the methods / operations according to various embodiments of the present invention. The computing device 100 can be provided with one or more processors. Memory 120 stores one or a combination of two or more of various data, instructions, and information used by components (e.g., processor 110) included in computing device 100. Memory 120 can include volatile memory and / or non-volatile memory. Program 130 can include one or more actions in which the methods / operations according to various embodiments of the present invention are implemented, and can be stored in the form of software in memory 120. Here, the actions correspond to the instruction words implemented in program 130. For example, program 130 includes actions of classifying electrocardiogram data obtained from a plurality of patients into a training data set, a verification data set, and a test data set, actions of obtaining ROI electrocardiogram data divided into a predetermined window size from each of the electrocardiogram data classified into the training data set, the verification data set, and the test data set, actions of training a deep learning model to predict each heart disease class of the first ROI electrocardiogram data by inputting the first ROI electrocardiogram data obtained from the electrocardiogram data included in the training data set into the deep learning model for predicting a patient's heart disease, and actions of determining a threshold for classifying heart disease classes by applying the second ROI electrocardiogram data obtained from the electrocardiogram data included in the verification data set to the trained deep learning model, and can include instructions for performing the actions. According to an embodiment, the ROI electrocardiogram data divided into a predetermined window size can mean, but is not limited to, individual heartbeats. Hereinafter, although the individual heartbeats can be described as an example for the ROI electrocardiogram data divided into a predetermined window size for convenience of explanation according to the embodiment, the type of the ROI electrocardiogram data applied to each embodiment is not limited thereto.

[0011] When program 130 is loaded into memory 120, processor 110 can perform the methods / operations according to various embodiments of the present invention by executing a plurality of operations for implementing program 130. The execution screen of program 130 can be displayed via display 140. In the case of FIG. 1, display 140 is represented as a separate device connected to computing device 100. However, in the case of computing device 100 such as a terminal that a user can carry, such as a smartphone or a tablet, display 140 can be a component of computing device 100. The screen represented on display 140 can be either before inputting information into the program or the execution result of the program. FIG. 2 is a flowchart showing a learning method of a deep learning model for predicting heart disease according to an embodiment of the present invention. The learning method of the deep learning model shown in FIG. 2 is performed by the processor of the computing device shown in FIG. 1. In step 210, the processor can classify the electrocardiogram data acquired from a plurality of patients into a training data set, a validation data set, and a test data set. First, the electrocardiogram data acquired from a plurality of patients can be classified into groups of True-Normal Sinus Rhythm (T-NSR), Atrial Fibrillation-Normal Sinus Rhythm (AF-NSR), and Clinically Important Arrhythmia-Normal Sinus Rhythm (CIA-NSR). At this time, the electrocardiogram data acquired from a plurality of patients can be 10-second 12-lead electrocardiogram data, but the type of such electrocardiogram data is only one example and is not limited to the above example.

[0012] On the one hand, clinically important arrhythmia (CIA) can include atrial arrhythmia, ventricular arrhythmia, atrial fibrillation, and BBB (bundle branch block). Atrial arrhythmia is an arrhythmia originating from the atrium, meaning a persistent arrhythmia of 30 seconds or more or a non-persistent arrhythmia within 30 seconds, and can include atrial premature complex, or sustained / non-sustained atrial rhythm, etc. Ventricular arrhythmia is an arrhythmia originating from the ventricle, meaning a persistent arrhythmia of 30 seconds or more or a non-persistent arrhythmia within 30 seconds, and can include ventricular premature complex, or sustained / non-sustained ventricular arrhythmia, etc. Atrial fibrillation can mean an arrhythmia showing irregular ventricular contractions due to the absence of regular electrical signals and contractions in the atrium. Finally, BBB can mean an arrhythmia showing a characteristic electrocardiogram pattern due to the interruption of signal transmission in the right bundle or left bundle that transmits cardiac signals through the ventricle. The T-NSR group can be composed of electrocardiograms of patients without a history of atrial fibrillation or arrhythmia and with three or more normal sinus rhythm electrocardiograms in a year. The AF-NSR group can be composed of electrocardiograms of patients in whom a normal sinus rhythm electrocardiogram is paired with an atrial fibrillation or atrial flutter electrocardiogram that occurred within 14 days from the normal sinus rhythm electrocardiogram. Similarly, the CIA-NSR group can be composed of electrocardiograms of patients in whom a normal sinus rhythm electrocardiogram is paired with an arrhythmia electrocardiogram that occurred within 14 days from the normal sinus rhythm electrocardiogram. The processor can classify the electrocardiogram data belonging to the thus divided T-NSR group, AF-NSR group, and CIA-NSR group into a training data set, a validation data set, and a test data set applicable to a deep learning model for cardiac disease prediction. As an example, FIG. 3 is a diagram showing a method for classifying electrocardiogram data according to an embodiment of the present invention. The processor can classify electrocardiogram data 310 belonging to the T-NSR group, AF-NSR group, and CIA-NSR group according to different heart diseases to be predicted. As an example, the processor can classify electrocardiogram data 310 into electrocardiogram data 320 belonging to the T-NSR group and AF-NSR group for predicting atrial fibrillation, and electrocardiogram data 330 belonging to the T-NSR group and CIA-NSR group for predicting arrhythmia.

[0013] After that, the processor can classify the electrocardiogram data 320 and 330 classified according to each heart disease into a training data set, a verification data set, and a test data set based on any date on which the electrocardiogram data 320 and 330 were generated. As an example, as shown in FIG. 3, when the electrocardiogram data 320 and 330 are acquired between May 23, 2017 and May 23, 2022, the processor can classify the electrocardiogram data 320 and 330 based on an arbitrary date (for example, June 11, 2021). The electrocardiogram data before that date is classified into the training data set and the verification data set at a certain ratio, and the electrocardiogram data after that date (including that date) is classified into the test data set. In the example of FIG. 3, the electrocardiogram data 320 and 330 are classified into the training data set (60%), the verification data set (20%), and the test data set (20%). However, such a classification ratio is only an example and is not limited to the above example. In step 220, the processor can obtain individual heartbeats from each of the electrocardiogram data classified into the training data set, the verification data set, and the test data set. The processor can perform preprocessing on the 10-second 12-lead electrocardiogram data classified into the training data set, the verification data set, and the test data set in order to obtain accurate and reliable data. More specifically, the processor can receive the input of electrocardiogram data classified into a training dataset, a validation dataset, and a test dataset in the form of an XML (eXtensible Markup Language) file. The processor can parse the input data into a fixed-form data part such as the patient's name, age, gender, etc. and an unstructured data part consisting of continuous signals. Then, the processor can perform noise removal preprocessing on the unstructured data part consisting of continuous signals and distinguish the key markers of heartbeats. The processor can obtain discontinuous individual heartbeats from the unstructured data consisting of continuous signals through the key markers of heartbeats thus distinguished. As an example, referring to FIG. 4, the processor can decode 10-second 12-lead electrocardiogram data by Base64 encryption and then pass it through an IIR Butterworth SOS filter with a moving average kernel and a power line noise filter for noise removal and cleansing. Next, the processor can segment the noise-removed 10-second 12-lead electrocardiogram data into individual heartbeats using a QRS peak sensing algorithm. As a result, the processor can obtain a plurality of discontinuous individual heartbeats from a single 10-second 12-lead electrocardiogram data as shown in FIG. 3, and the individual heartbeats thus obtained can be used to train a deep learning model for more accurate heart disease prediction.

[0014] In step 230, corresponding to inputting the first individual heartbeat obtained from the electrocardiogram data included in the training dataset into a deep learning model for predicting the patient's heart disease, the processor can train the deep learning model to predict each heart disease class of the first individual heartbeat. At this time, the processor can be trained to predict each heart disease class of the first individual heartbeat using any one of the deep learning models including ResNet-18, Conv1D including LSTM (Long Short-Term Memory), and Conv1D including a transformer. As an example, ResNet-18 as shown in FIG. 5a is a deep learning model that can extract essential features of an input using convolutional operations such as various Convolutional Neural Networks (CNNs). To solve the Vanishing Gradient problem of the CNN architecture, ResNet-18 can perform residual learning via skip connections, which is a method in which input data skips multiple layers on the network and is directly connected to the output layer, as shown in FIG. 5a. Since the deep learning model of ResNet-18 requires a fixed-length input, the processor can fix the length of the individual heartbeat to the average length of all individual heartbeats. As an example, when the average length of all individual heartbeats is 700, the processor can perform slicing on individual heartbeats with a heartbeat length longer than 700, and for individual heartbeats with a heartbeat length shorter than 700, zero-padding can be performed to fix the length to 700. As another example, Conv1D including LSTM as shown in FIG. 5b can capture all local time patterns and long-distance time patterns from sequential data. At this time, the Conv1D layer is excellent at perceiving local time patterns, and the LSTM layer is excellent at modeling long-term dependencies. As another example, the Conv1D including a transformer as shown in FIG. 5c can capture all local patterns and global dependencies of the input data. At this time, the transformer layer is suitable for modeling global dependencies, and the Conv1D layer can be effective in perceiving local patterns. Different from ResNet-18 with a fixed input length, the Conv1D including a transformer has the advantage of being able to accommodate various input sizes. On the other hand, FIG. 6 is a diagram showing the learning steps of a deep learning model according to an embodiment of the present invention. Referring to FIG. 6, the processor can optimize the parameters of the deep learning model using binary cross-entropy with logarithmic loss and the AdamW optimizer with an initial learning rate of 0.0001. At this time, binary cross-entropy is a loss function that reduces the difference between the prediction result and the actual correct answer in the learning of the deep learning model, and the AdamW optimizer is an algorithm that participates in the update of the actual deep learning model based on such a loss function. The processor can obtain probability values in the range of 0 to 1 for each heart disease class of the first individual heartbeat by applying the sigmoid function to the output of the deep learning model optimized for such binary cross-entropy and the AdamW optimizer.

[0015] In step 240, the processor can apply the second individual heartbeat rate obtained from the electrocardiogram data included in the verification dataset to the learned deep learning model to determine a threshold for classifying heart disease classes. More specifically, as shown in FIG. 6, the processor collects probability values for each individual heartbeat separated from the same electrocardiogram data for each of the second individual heartbeats, collects the probability values for all the second individual heartbeats collected, and after averaging the probability values for all the second individual heartbeats collected to derive a final probability score, an optimal threshold for classifying heart disease classes can be fine-tuned based on the derived final probability score. At this time, the optimal threshold can be obtained by applying a threshold between 0 and 1 in 0.01 units and achieving the highest F1 score in the validation dataset for the heart disease class, i.e., the T-NSR and AF-NSR classes or the T-NSR and CIA-NSR classes. At this time, the F1 score can be defined as in Equation 1 below.

Equation

[0016] As an example, FIG. 8 is a diagram showing heart disease prediction steps using a deep learning model according to an embodiment of the present invention. Referring to FIG. 8, after the processor loads the weights and threshold values of the learned deep learning model, it can derive a probability value for each of the individual heartbeats. The processor can obtain the average value of the probability values of all the individual heartbeats thus derived. As an example, when the average value of the probability values for determining T-NSR, i.e., the T-NSR Logit value, is greater than the first threshold value θ1 and the average value of the probability values for determining CIA-NSR, i.e., the CA-NSR Logit value, is less than the second threshold value θ2, the processor can determine that the heart disease class of the patient is in a normal state, i.e., T-NSR. Alternatively, when the T-NSR Logit value is greater than the first threshold value θ1 and the CIA-NSR Logit value is greater than the second threshold value θ2, the processor can compare the T-NSR Logit value and the CIA-NSR Logit value and select the larger value as the final prediction. As an example, when the CIA-NSR Logit value is greater than the T-NSR Logit value, the processor can determine that the heart disease class of the patient is CIA-NSR in which arrhythmia may occur. Further, when the T-NSR Logit value is smaller than the first threshold θ1 and the CIA-NSR Logit value is smaller than the second threshold θ2, the processor can compare the T-NSR Logit value and the CIA-NSR Logit value and select the larger value as the final prediction. Finally, when the T-NSR Logit value is smaller than the first threshold θ1 and the CIA-NSR Logit value is larger than the second threshold θ2, the processor can determine that the heart disease class of the corresponding patient is CIA-NSR in which arrhythmia may occur. These four methods of classifying such heart disease classes can be similarly applied to the classification of T-NSR and AF-NSR. Hereinafter, with reference to FIGS. 9 to 14, a method of using HRV characteristic information, a latent vector, cluster information corresponding to the latent vector, and metadata according to an embodiment of the present invention, and a method of predicting heart disease by ensembling a plurality of tree model outputs will be specifically described.

[0017] FIG. 9 shows an exemplary flowchart relating to a method for generating a heart disease prediction model according to an embodiment of the present invention. According to an embodiment of the present invention, the method for generating a heart disease prediction model may include a step (S1000) of acquiring a plurality of electrocardiogram data. According to an embodiment, the plurality of electrocardiogram data are acquired corresponding to a plurality of patients and can be collected in various ways. In one embodiment, the electrocardiogram data in the present invention can mean multi-lead electrocardiogram (ECG) data related to recording the electrical activity of the heart and evaluating the heart state. The multi-lead electrocardiogram data includes heart electrical signals obtained through various leads (i.e., leads), thereby providing comprehensive information on the rhythm, electrical conduction state, and other heart functions of the heart. In an embodiment, the plurality of electrocardiogram data obtained from a plurality of patients can include normal electrocardiogram data, electrocardiogram data related to arrhythmia, and electrocardiogram data for other heart conditions. In a specific embodiment, the electrocardiogram data obtained from a plurality of patients can be classified into groups of True-Normal Sinus Rhythm (T-NSR), Atrial Fibrillation-Normal Sinus Rhythm (AF-NSR), and Clinically Important Arrhythmia-Normal Sinus Rhythm (CIA-NSR). At this time, the electrocardiogram data obtained from a plurality of patients can be 10-second 12-lead electrocardiogram data, but the type of such electrocardiogram data is not limited to this example. In one embodiment, the acquisition of the plurality of electrocardiogram data can be to receive or load the data stored in the memory 120. The acquisition of the plurality of electrocardiogram data can be to receive or load the plurality of electrocardiogram data from other storage media, other computing devices, or separate processing modules within the same computing device based on wired / wireless communication means. As an example, a user (e.g., a patient or a healthcare provider) can connect to the computing device 100 via a user terminal, receive the provision of a user interface for predicting heart disease from the computing device 100, and transmit the electrocardiogram data to the computing device 100 in a manner of dragging and dropping the electrocardiogram data onto the provided user interface.

[0018] According to various embodiments, the computing device 100 of the present invention can perform data augmentation on the plurality of acquired electrocardiogram data. Specifically, the computing device 100 can enhance the training data for the learning of the neural network by performing data augmentation using lead pairs. Specifically, in each case of electrocardiogram data, it can be acquired by lead. For example, electrocardiogram data can be collected in various lead configurations such as 1-lead, 3-lead, 12-lead, etc., which is used to record the electrical activities in various parts of the heart and evaluate a more comprehensive heart condition. For example, in the case of a 12-lead signal, many signals can be acquired in a relatively short time, but the total data volume may be limited. On the other hand, a 1-lead (one-lead) signal is recorded for a longer time, but the data diversity is limited. When these two types of data are used together, a more accurate heart condition evaluation is possible, but in practice, the number of such data pairs may be insufficient. To solve this problem, the computing device 100 of the present invention can generate a reconstruction model that generates other lead data based on one lead data. The reconstruction model serves to receive one-lead data as input and generate multi-lead data based on it. This process has the effect of expanding the one-lead data to 3-lead or more leads (12-lead) to enhance the learning data as if there were more lead data. The learning of the reconstruction model includes the process of learning the correlation between one-lead and multi-lead data. For this purpose, the reconstruction model is learned using paired data in which both one-lead and multi-lead data exist. In the learning process, the model learns how to reproduce multi-lead data from one-lead data, and at this time, it learns the characteristics of the one-lead data and the pattern of the multi-lead signal that can be inferred from it. After the model learning is completed, the reconstruction model can generate multi-lead signals even with only one-lead data, thereby compensating for the lack of actual multi-lead data. As a result, the data diversity increases, and the generalization performance of the model is improved. The multi-lead data thus generated (i.e., the enhanced multi-lead data) is used together with the existing multi-lead data for neural network learning, enabling the model to learn more diverse lead configurations and improve the prediction performance for various heart conditions. Consequently, data augmentation by the reconstruction model substantially increases the amount of learning data, enhances the prediction accuracy of the model, and strengthens the reliability of the heart disease prediction model. This helps medical staff diagnose the patient's health condition more accurately and establish more effective treatment and prevention plans. According to an embodiment of the present invention, the method for generating a heart disease prediction model may include a step (S2000) of constructing a learning data set based on a plurality of electrocardiogram data. In one embodiment, constructing a learning data set through a plurality of electrocardiogram data is a process of collecting and configuring various data to learn the important features and patterns of each electrocardiogram data. As a result, a data set including various cases and patterns necessary for predicting heart diseases is generated.

[0019] According to an embodiment, the learning data set of the present invention includes various data related to the prediction of heart diseases, and may include a training data set for training a neural network model, a validation data set for evaluating and optimizing the performance of the model, and test data for evaluating the generalization performance of the model. In one embodiment, the learning data set may include a first learning data set and a second learning data classified for different learning purposes. The first learning data set and the second learning data set may be data classified for learning different neural network models. The first learning data set and the second learning data set can be classified by the computing device 100. For example, the first training dataset is used in the training process of the embedding model, and this dataset focuses on extracting and representing the main features of the electrocardiogram data. The second training dataset is used for training a model to predict the risk of heart disease, and this dataset can be used for calibration and performance evaluation to improve the accuracy of the prediction model. Specifically, the first training dataset can include data for training corresponding to the process of converting the characteristics of the electrocardiogram data into a characteristic space. The first training dataset is data for ECG Representation Learning, which can be used to extract and embed various characteristics and patterns of the electrocardiogram data signal. Also, the second training dataset can include data for calibration related to predicting the risk of the heart. That is, the second training dataset is data for correcting the risk of the heart and can be used to more accurately apply the risk predicted by the model. According to an embodiment, the step of constructing the training dataset can include the step of performing preprocessing on a plurality of electrocardiogram data. FIG. 10 is a flowchart exemplarily showing a preprocessing process for a plurality of electrocardiogram data according to an embodiment of the present invention. Referring to FIG. 10, the preprocessing method for a plurality of electrocardiogram data can include a step of performing noise preprocessing on the plurality of electrocardiogram data (S2100), a step of dividing the plurality of noise-preprocessed electrocardiogram data into a predetermined window size to obtain a plurality of ROI signals (S2200), and a step of extracting HRV (Heart Rate Variability) characteristic information in the lead unit of the plurality of electrocardiogram data (S2300). In one embodiment, the HRV characteristic information can include index information related to the variability between heartbeats.

[0020] More specifically, first, preprocessing for noise removal is performed on the plurality of electrocardiogram data obtained in step S2100. Here, the preprocessing for noise removal includes lowpass filtering and noise removal, which are for removing the baseline noise of the electrocardiogram signal. Specifically, lowpass filtering removes high-frequency components from the electrocardiogram data through a frequency band limiting method to improve the purity of the signal, and noise removal utilizes time series analysis techniques to reduce unnecessary noise from the electrocardiogram data and make important signal components clearer. Such a preprocessing process minimizes the distortion of the electrocardiogram signal and contributes to improving the signal quality for more accurately evaluating heart activity. Also, according to an embodiment, the computing device 100 can perform data augmentation to enhance the diversity and robustness of model learning. The computing device 100 performs data augmentation by simulating various noise patterns, enabling the model to learn and adapt to various noise situations that may occur in the actual environment. In a specific embodiment, during the preprocessing process of electrocardiogram data, various noises that may occur in the actual electrocardiogram measurement environment, such as Gaussian noise, Jitter noise, Random Time Warping, Scaling, Amplitude Modulation, and Phase Shifting, are artificially added to increase the dataset, enabling the model to learn and adapt to the noises that may occur in various environments. Such a process of adding and removing noises has the advantage of improving the quality of the data and the generalization performance of the model. After that, the electrocardiogram data that has been noise-removed in step S2200 is divided into a predetermined window size and organized into a plurality of ROI signals. According to an embodiment, the ROI signal is defined as a range including at least 3 to 5 QRS Complexes (heartbeats) in units of a deformable window size containing meaningful heartbeats from each of the electrocardiogram data. In one embodiment, the QRS Complex indicates the depolarization of the ventricles during the electrical activity of the heart and can contribute to identifying the start and end of heartbeats as the main features in the electrocardiogram. For example, each ROI signal can be divided into units of 30 seconds to 1 minute, which is useful for analyzing important patterns in the electrocardiogram signal and identifying the regularity and abnormalities of heartbeats. The computing device 100 can extract the ROI signal and organize it into data that can more accurately analyze the main characteristics of heartbeats. This plays an important role in identifying specific patterns and signs of abnormalities in the electrocardiogram signal and evaluating the risk of heart disease. Also, in step (S2300), the HRV characteristic information extraction process is performed. The HRV characteristic information is an index for measuring the periodic change of heartbeats over time and is an important signal characteristic reflecting the activity of the heart. For example, the computing device 100 divides the electrocardiogram data into units of 30 seconds to 1 minute to obtain a plurality of ROI signals and extracts the HRV characteristics corresponding to each ROI signal. This is to more accurately evaluate the overall activity of the heart by analyzing data in a longer time range than the existing bit-by-bit analysis. The computing device 100 derives the HRV characteristics from each ROI signal by means such as frequency analysis or time-domain analysis. In a specific embodiment, the computing device 100 can apply various analysis techniques to extract the HRV characteristic information corresponding to each ROI signal. As a specific example, the computing device can extract the HRV characteristic information through the evaluation of high-frequency and low-frequency components by spectral analysis and the statistical analysis of the NN interval.

[0021] Spectral analysis evaluates the heart rate variability in the frequency domain. The high-frequency component mainly reflects the activity of the parasympathetic nervous system, and the low-frequency component indicates the mixed activity of the sympathetic and parasympathetic nervous systems. This is useful for understanding the balance state of the autonomic nervous system. The statistical analysis of the NN interval evaluates the variability of the heart rate interval in the time domain to quantify the activity of the heart's autonomic nervous system. This can be an important indicator for evaluating the irregularity of heartbeats, stress response, heart health, etc. In one embodiment, the HRV characteristic information extracted in lead units may include RMSSD (Root Mean Square of Successive Differences), SDNN (Standard Deviation of NN intervals), SDANN (Standard Deviation of Average NN intervals), etc. Specifically, RMSSD means the square root of the mean of the squares of the differences between consecutive heart rate intervals and mainly reflects the influence of the parasympathetic nervous system. SDNN indicates the standard deviation of all normal heart rate intervals and shows the overall variability of the autonomic nervous system. SDANN measures the standard deviation of the average heart rate intervals over a certain period to evaluate the long-term heart rate variability. These indicators play an important role in evaluating the activity of the heart's autonomic nervous system and comprehensively analyzing the heart health state. That is, the HRV characteristic information reflects various aspects of the heart rate variability, is used to evaluate the irregularity of heartbeats, autonomic nervous system activity, etc., and can be the basis for predicting the risk of heart disease. According to one embodiment of the present invention, the method for generating a heart disease prediction model may include a step (S3000) of generating a heart disease risk prediction model by performing learning on one or more network functions based on a learning dataset. FIG. 11 is a flowchart exemplarily showing a process of performing embedding on a latent vector according to an embodiment of the present invention and constructing a vector database based on the execution result. Referring to FIG. 11, the step of generating a heart disease risk prediction model may include a step of generating an embedding model (S3100) through masking-based self-supervised learning using a first training dataset, an embedding execution step of extracting a latent vector corresponding to each of a plurality of ROI signals corresponding to a second training dataset by using the embedding model (S3200), a step of performing clustering on the latent vectors by using a clustering model (S3300), and a step of constructing a vector database (DB, DataBase) based on the latent vectors and information on each cluster corresponding to each latent vector (S3400).

[0022] More specifically, in step S3100, the computing device 100 can generate an embedding model based on the first training dataset. The embedding model can be a model trained to represent complex patterns of electrocardiogram data in a low-dimensional space. When a plurality of ROI signals corresponding to electrocardiogram data are input, the embedding model can generate a latent vector corresponding to each ROI signal. Here, the latent vector may be a low-dimensional vector that compressively represents important features of the electrocardiogram data. This is a data representation that has been converted into a form containing the main information of the signal to make it easier to understand and analyze the electrocardiogram signal, which is high-dimensional data. The latent vector can be used to evaluate the health status of the heart based on the pattern of the electrocardiogram data or to provide useful information for detecting signs of disease. A specific description of the method for generating the embedding model will be described later with reference to FIGS. 12 and 13 below. FIG. 12 is a flowchart exemplarily showing a process of generating an embedding model according to an embodiment of the present invention. FIG. 13 is an exemplary diagram for explaining a process of generating an embedding model from a self-reconstruction model and a learned self-reconstruction model according to an embodiment of the present invention. Referring to FIG. 12, the step of generating the embedding model may include: a step (S3110) of inducing self-supervised learning in the self-reconfiguration model by processing the data included in the first training dataset as an input, such that the self-reconfiguration model generates an output similar to the input data; and a step (S3120) of extracting an encoder from the self-reconfiguration model that has completed learning to generate the embedding model. The self-reconfiguration model can be a model designed to inherently learn important features of data during the learning process through input and output. In one embodiment, the self-reconfiguration model is a neural network model that masks a part of the input data and restores the masked part, and can include an encoder (or a dimensionality reduction network function) and a decoder (or a dimensionality restoration network function). In one embodiment, the self-reconfiguration model of the present invention can be, but is not limited to, a MAE (Masked AutoEncoder) that learns important patterns from electrocardiogram data and accurately restores the masked signal. The self-reconfiguration model can effectively learn important features of the data through a process of intentionally hiding a part of the electrocardiogram signal (specifically, each ROI signal) and reconstructing the entire signal based on the remaining part. The self-reconfiguration model learns in a manner that minimizes the reconstruction error between the input and the output, thereby effectively extracting and representing important characteristics of the signal. The self-reconfiguration model has an advantage in understanding and utilizing the inherent structure of the data, especially when the data is complex or incomplete. More specifically, as shown in FIG. 13, the self-reconstruction model 800 can learn important features through a process of reducing the dimension of the input data and then restoring it again. The self-reconstruction model can include an encoder (or dimensionality reduction network function) 810 and a decoder (or dimensionality restoration network function) 820. The self-reconstruction model 800 converts high-dimensional data into a low-dimensional latent space via the encoder 810, compressing the core information of the data and reducing noise in this process. Then, using the decoder 820, it attempts to restore the compressed low-dimensional representation to the original high-dimensional space, thereby learning and reproducing the important patterns of the data.

[0023] According to an embodiment, the computing device 100 can induce the self-reconstruction model 800 to be learned via a masking learning method. In this method, a part of the input data is intentionally masked, and the model is learned to restore the masked part. For example, without applying a mask, the self-reconstruction model may be biased towards learning noise rather than the QRS Complex, so that it can be made to focus on learning important features through masking. Thereby, the model develops the ability to extract important patterns and features from the remaining part of the input data and accurately restore the masked information. This has the advantage of being able to operate robustly even on noisy and incomplete parts of the data. Also, since it is possible to understand the context of the data and learn important features in the process of restoring the masked part, it is very useful for analyzing and interpreting complex medical data such as electrocardiogram data. By applying a mask, the model can focus on major signals such as the QRS Complex, enabling highly reliable data analysis for accurate diagnosis and evaluation of heart diseases. That is, in order to enhance the reliability in the analysis and interpretation of electrocardiogram data, the present invention trains a self-reconstruction model in a masking learning method to focus on important heart signals. This enables the model to understand the context of the data and learn the main features, so as to accurately grasp and restore core signals such as QRS Complex. The self-reconstruction model aims to reproduce the entire signal. After masking a specific meaningful range of the signal, it focuses on restoring the masked part. As a specific example, significant parts are masked within the entire range of the electrocardiogram signal so that about three QRS Complexes are included within this masked area. The self-reconstruction model intensively learns this area, and the loss function is calculated only for this area. In such a manner, the model can learn the features of the data centered around important signals, thereby more accurately understanding and reproducing the overall context of the data. As a result, it can operate robustly against noise and incomplete parts that may occur in electrocardiogram data, enabling highly reliable data analysis necessary for the early diagnosis and evaluation of heart diseases. Such an approach can minimize the loss of important information in the analysis of electrocardiogram signals, support accurate heart condition assessment, and significantly improve the interpretation of medical data. According to one embodiment, the self - reconstruction model 800 can include at least one hidden layer, and an odd number of hidden layers can be arranged between the input and output layers. The number of nodes in each layer can be reduced from the number of nodes in the input layer to an intermediate layer called the bottleneck layer (encoder), and then symmetrically expanded from the bottleneck layer to the output layer (symmetric to the input layer). In this case, in FIG. 13, it is shown that the layers of the encoder 810 and the decoder 820 are symmetric, but the present invention is not limited thereto, and the nodes of the layers of the encoder 810 and the decoder 820 may or may not be symmetric. The self - reconstruction model 800 can perform non - linear dimensionality reduction. The number of input and output layers can correspond to the number of items of the input data remaining after pre - processing the input data. The number of nodes in the hidden layers included in the encoder 810 in the structure of the self - reconstruction model 800 can have a structure that decreases as it is farther from the input layer. If the number of nodes in the bottleneck layer (the layer with the fewest nodes located between the encoder and the decoder) is too small, there is a possibility that a sufficient amount of information cannot be transmitted, so it can also be maintained above a specific number (for example, more than half of the input layer, etc.).

[0024] In an embodiment, the computing device 100 causes the self - reconstruction model to be learned via a plurality of ROI signals corresponding to the first learning dataset, whereby the model learns important features and patterns of the electrocardiogram data. The learned self - reconstruction model is applied to each of the plurality of electrocardiogram data, masks a part of the input data, and extracts and analyzes the main features of the electrocardiogram signal through the process of restoring this masked part. In summary, the computing device 100 induces learning in the masking learning method of the self - reconstruction model in order to ensure high reliability in the analysis and interpretation of electrocardiogram data. In this process, the self - reconstruction model focuses on major signals such as QRS Complex and learns the inherent distribution of heartbeats. While the self - reconstruction model reproduces the original signal of the electrocardiogram data, it effectively learns important features that the electrocardiogram data itself has, such as the peak of QRS Complex. In the next step S3120, an encoder is extracted from the self-reconstruction model that has completed learning to generate an embedding model. Since the encoder part in the learned self-reconstruction model is learned to compress important features of high-dimensional data and remove noise (i.e., pre-training with the first training dataset), it can output low-dimensional latent vectors corresponding to the input data (e.g., a plurality of ROI signals included in the second training dataset). According to an embodiment, in the case of the generated embedding model, since it compresses and represents the features of data, it can be characterized in that the similarity between the input data can be effectively reflected in the latent space. For example, corresponding to similar input data, the embedding model outputs latent vectors on a similar latent space. For example, the second latent vector of the second ROI signal similar to the first ROI signal is located on a latent space similar to the first latent vector corresponding to the first ROI signal. That is, they are arranged at close positions on the latent space. Conversely, when the input data are different from each other (i.e., there is a large difference), the embedding model arranges these data at positions far from each other within the latent space. Thereby, the similarity and difference between the data can be clearly distinguished based on the characteristic patterns of the electrocardiogram data, which can be used in the process of diagnosing and evaluating heart diseases. That is, the present invention induces the self-reconstruction model to be self-learned using the first training dataset, and extracts an encoder from the self-reconstruction model that has completed learning to form an embedding model. After generating the embedding model using the first training dataset, the computing device 100 can perform embedding to extract latent vectors corresponding to each of the plurality of ROI signals corresponding to the second training dataset using the embedding model. More specifically, each ROI signal included in the second learning dataset is provided as an input to the embedding model by the computing device 100, and the embedding model compresses the main features of the signal and outputs a low-dimensional latent vector. The latent vector simply represents the complex pattern of the ROI signal and reflects the similarity and difference between each ROI signal in the latent space. For example, among the ROI signals of the electrocardiogram data included in the second learning dataset, signals with similar patterns are output as latent vectors at positions close to each other in the latent space.

[0025] Thereafter, in step (S3300), the computing device 100 can perform clustering on the latent vectors using a clustering model. According to an embodiment, the computing device 100 can perform clustering on the latent vectors using a clustering model. As an example, the clustering model is a model learned to perform clustering using the latent vectors extracted by the embedding model, and can be a KNN (K-Nearest Neighbors) model. In one embodiment, the clustering model can be characterized by performing clustering based on the similarity distance between the latent vectors corresponding to each of the plurality of ROI signals. More specifically, in the clustering process, the distance or similarity between each latent vector is calculated to determine how close or similar these vectors are. Here, the distance is generally calculated using a measurement method such as Euclidean distance or cosine similarity. For example, the distance between the latent vector A extracted from a specific ROI signal and the latent vector B extracted from another ROI signal is calculated to evaluate how similar these two vectors are. If the distance between A and B is close, these two vectors can be regarded as representing electrocardiogram signals containing the same or similar patterns. The clustering model groups the latent vectors into multiple clusters based on such distance information. In the case of the KNN model, clustering is performed by finding the K nearest neighbor vectors of a specific vector and including the vector in the cluster to which those neighbor vectors belong. For example, when K = 3, find the three nearest neighbor vectors of the potential vector A, and assign A to the cluster to which the majority of those neighbor vectors belong among the clusters to which they belong. Such a process is repeated for all potential vectors, and finally, vectors sharing similar features are grouped into the same cluster. This process is useful for classifying various patterns in electrocardiogram data and analyzing how each pattern is related to a specific type or risk level of heart disease. For example, if a particular cluster contains signals related to irregularities in the heartbeat, that cluster can be used as an indicator of diseases such as arrhythmia. As a more specific example, when performing clustering for each potential vector using a clustering model, four clusters can be formed. In this clustering process, vectors are grouped based on the similarity between each potential vector. Assuming there are four clusters: the first cluster, the second cluster, the third cluster, and the fourth cluster, these clusters can represent different electrocardiogram patterns. For example, the first cluster can contain signals with a normal heartbeat pattern, and the second cluster can contain signals with specific abnormalities such as arrhythmia. The third cluster and the fourth cluster can contain signals reflecting different types of heart diseases or conditions respectively. In the above description, it is explained that four clusters (or groups) can be formed, but this is only an example, and the actual number of clusters can vary depending on the characteristics of the data and the settings of the clustering model.

[0026] Such clustering can automatically identify specific patterns or abnormalities in electrocardiogram data and analyze the characteristics of each cluster to provide information useful for the early diagnosis and management of heart diseases. The clustering results provide important data for medical experts to comprehensively evaluate the patient's condition and establish a customized treatment plan. Also, in step S3400, the computing device 100 can construct a vector database based on the latent vectors and the information for each corresponding cluster of each latent vector. The vector database of the present invention can be a NoSQL database server for storing and managing embedded vectors, cluster membership information, and information on the distances between vectors. The vector database of the present invention is optimized for the analysis and management of latent vectors extracted from various electrocardiogram data. Thereby, the characteristic patterns of electrocardiogram signals can be systematically stored and retrieved and utilized as needed. As an example, the vector database of the present invention can assist in risk assessment and status monitoring based on a patient's electrocardiogram data. When newly collected electrocardiogram data of a specific patient is input, the latent vectors extracted from the data can be compared with the existing vectors stored in the vector database to evaluate the similarity. Through this similarity evaluation, it is possible to determine which cluster the patient's electrocardiogram data belongs to and which previously observed pattern the cluster is similar to. Also, in an embodiment, the computing device 100 can extract a representative vector for each of the plurality of clusters corresponding to the clustering result, that is, a principal vector. Such a principal vector is a vector representing each cluster and can represent the center of the latent vectors within the cluster. More specifically, when the data stored in the vector database is huge, for example, it may take a long time to search for 300,000 electrocardiogram data. Generally, when new electrocardiogram data of a specific patient is input, it is divided into a plurality of ROI signals in the preprocessing process, and 80 to 120 embedding vectors are generated through the embedding process for each ROI signal. For example, if the new electrocardiogram data is compared individually with all the vectors stored in the database, it may be inefficient due to a large amount of computation. This takes a lot of time and is not suitable for situations where real-time analysis is required. Thereby, in order to shorten the search time and improve efficiency, the latent vectors generated based on the patient's electrocardiogram data can be compared with the principal vectors of each cluster to quickly identify similar clusters. In this process, the inner product of each embedding vector and the principal vector is calculated to evaluate the similarity, and based on this information, it is determined which cluster the electrocardiogram data belongs to.

[0027] This method makes it possible to quickly identify relevant clusters by comparing with the principal vectors representing each cluster instead of comparing the entire data one by one. As a result, rapid analysis and efficient management of electrocardiogram data are possible, which plays an important role in quickly evaluating the risk of heart disease and monitoring the patient's condition in real time. Also, in an embodiment, through the following process, heart disease prediction information for the electrocardiogram data of the person to be predicted can be generated. In an embodiment, a method for generating heart disease prediction information for an electrocardiogram data of a person to be predicted may include steps of: acquiring the electrocardiogram data of the person to be predicted; performing preprocessing on the electrocardiogram data of the person to be predicted; generating a plurality of latent vectors corresponding to the preprocessed electrocardiogram data by using an embedding model; comparing each of the plurality of latent vectors with each of representative vectors corresponding to each of a plurality of clusters, and classifying each of the plurality of latent vectors into one of the plurality of clusters; and generating hierarchical information regarding the risk of heart disease based on a classification result in which each of the plurality of latent vectors is classified into the plurality of clusters. In an embodiment, the person to be predicted may be an individual who has undergone an electrocardiogram examination for the purpose of evaluating and managing the risk of heart disease. This may be people who receive a general health check, people who have a family history of heart disease, or patients who have been previously diagnosed with heart disease or shown related symptoms. The person to be predicted can continuously evaluate the heart condition through regular electrocardiogram monitoring and utilize the computing device 100 of the present invention for early detection and prevention of heart disease. More specifically, after acquiring the electrocardiogram data of the person to be predicted, the data is preprocessed to remove noise and purify the signal. Here, the preprocessing can include a process of removing unnecessary signal components and emphasizing important signal features to improve the quality of the electrocardiogram data as described in the foregoing explanation, and can include a process of dividing each electrocardiogram signal into appropriate units (predetermined window size) for processing. The predetermined window size can generally be defined as a section containing important information in the electrocardiogram data, for example, a length of about 30 seconds to 1 minute. In this process, the electrocardiogram data is divided at regular time intervals, and each section can be analyzed independently. The preprocessed electrocardiogram data is input into an embedding model (for example, an encoder extracted from a self-reconstruction model pre-trained via a first training dataset), and latent vectors (or embedding vectors) are generated from each data. The generated latent vectors are compared with existing vectors stored in a vector database, and each vector is classified into a specific cluster according to the similarity. Since each cluster has a specific pattern reflecting the heart state, the risk of heart disease is evaluated according to which cluster the latent vector belongs to.

[0028] In addition, the computing device 100 can generate hierarchical information regarding the risk of heart disease based on the classification result in which a plurality of latent vectors are classified into a plurality of clusters. More specifically, in the case of electrocardiogram data of a person to be predicted, in the preprocessing process, it is divided into specific time units and acquired as a plurality of ROI signals, and each ROI signal is processed as an input of the embedding model, whereby latent vectors for each of the plurality of ROI signals are generated. In this case, prediction information regarding the risk of heart disease can be generated according to the classification result regarding how each latent vector is classified into which cluster. As a more specific example, when the electrocardiogram data of a person to be predicted is composed of 10 ROI signals of 30 seconds each, each of the 10 ROI signals is converted into 10 latent vectors via an embedding model, and the 10 vectors can be classified into one of a predetermined four clusters. Here, each predetermined cluster indicates a specific heart state, the first cluster may be a cluster showing the highest risk, and the risk may be lower as the fourth cluster is reached. The computing device 100 can predict the overall risk according to how the 10 input signals are classified into each cluster. For example, if eight signals belong to the first cluster and two signals belong to the second cluster, it can be evaluated that the risk of the patient having a heart disease is very high. On the contrary, when five signals belong to the second cluster, three signals belong to the third cluster, and two signals belong to the fourth cluster, the risk can be evaluated as moderate. If two belong to the third cluster and eight belong to the fourth cluster, the risk is evaluated as low, and if all ten belong to the fourth cluster, the risk of the patient having a heart disease can be evaluated as very low. That is, the computing device 100 of the present invention utilizes an embedding model to analyze the ROI signals of the electrocardiogram data to obtain potential vectors, and evaluates which of the predetermined clusters each potential vector belongs to via a clustering model based on the learning dataset, so as to predict the risk of the patient having a heart disease in a hierarchical form. In other words, the computing device 100 compares the potential vectors generated by the embedding model with the predetermined clusters, grasps the cluster to which each vector belongs, and evaluates the patient's heart condition multidimensionally based on this information. Such a hierarchical risk prediction method improves the accuracy of electrocardiogram data analysis and helps in comprehensively understanding the patient's heart condition. Therefore, the computing device of the present invention can provide important information for medical experts to establish appropriate preventive measures or treatment plans by systematically and clearly hierarchically presenting the risk of the patient having a heart disease. This enables early detection and appropriate response to heart diseases, contributing to the health management of patients.

[0029] FIG. 14 shows an exemplary flowchart for explaining the process of generating a heart disease risk prediction model through ensemble learning of a plurality of tree series models according to an embodiment of the present invention. Referring to FIG. 14, the steps of generating a heart disease risk prediction model can include: a step of obtaining user meta-information corresponding to each of a plurality of electrocardiogram data (S3500), a step of obtaining a plurality of latent vectors and cluster information corresponding to the plurality of latent vectors from a vector database (S3600), and a step of performing learning on a plurality of tree models based on HRV characteristic information, user meta-information, a plurality of latent vectors, and cluster information corresponding to the latent vectors, and performing ensemble learning to integrate the outputs of each tree model to generate a heart disease risk prediction model (S3700). More specifically, in step S3500, the step of obtaining user meta-information can include the process of collecting personal health information such as the patient's age, gender, medical history, and lifestyle habits. Such information well reflects the individual's health status and characteristics and has an important impact on the interpretation of electrocardiogram data. In particular, such meta-information is utilized as an important variable necessary for more accurately evaluating the risk of heart disease. This enables customized prediction and evaluation considering the patient's individual health factors. In step S3600, a plurality of latent vectors and cluster information corresponding to each vector are obtained from the vector database. The latent vectors summarize the characteristics of the electrocardiogram data, and the cluster information indicates a specific heart condition or disease pattern to which the vector belongs. This allows confirming which cluster the patient's electrocardiogram data belongs to and evaluating the risk of heart disease indicated by that cluster. In step S3700, a plurality of tree models are trained based on HRV characteristic information, user meta-information, latent vectors, and cluster information. Each tree model predicts the risk of heart disease using various tree-based machine learning algorithms such as decision trees, random forests, and gradient boosting trees. Here, the cluster information can be obtained from the vector database and can include the cluster information to which each vector belongs and information regarding the distances between the vectors. For example, the cluster information provides which cluster each potential vector belongs to and distance information indicating the similarity or difference between vectors within the cluster. Such information plays an important role in evaluating which cluster a specific electrocardiogram pattern belongs to and how similar or different this pattern is compared to other electrocardiogram data. Thereby, the characteristics of the electrocardiogram data can be analyzed, and it is possible to more accurately grasp whether the data is related to a specific disease or condition. More specifically, the process of training a plurality of tree series models based on HRV characteristic information, user meta information, potential vectors, and cluster information is as follows. First, the HRV characteristic information is a heart rate variability index extracted from electrocardiogram data and reflects the activity of the cardiac autonomic nervous system. The user meta information is information indicating the individual health status of a patient, such as age, gender, medical history, and lifestyle habits. The potential vector is a value representing the characteristics of electrocardiogram data in a low-dimensional space, and the cluster information indicates which heart condition or disease these vectors are related to. These various types of information are used as input variables for training a plurality of tree-based models. For example, the random forest model constructs a plurality of decision trees using these input variables and provides a final prediction by integrating the results of each tree. The gradient boosting tree corrects the errors of the previous model at each step through continuous model training and aims for a more precise prediction.

[0030] In this case, the cluster information can be particularly important. The distance information between the cluster to which each potential vector belongs and other vectors is used to more deeply understand the characteristics of the electrocardiogram data and evaluate the risk of heart disease. Such information acts as an important decision-making factor in a plurality of tree models, and each model learns the data pattern based on this information. In the final ensemble process, the prediction results of individual tree models are integrated to derive a single comprehensive prediction result. In this process, the weights of each model are adjusted to enhance the reliability and accuracy of the final prediction. The ensemble process complements the weaknesses of individual models and combines their strengths to provide more robust and consistent predictions. As a result, such comprehensive learning and ensemble processes make it possible to accurately and precisely predict the risk of heart disease by reflecting the multidimensional characteristics of electrocardiogram data. Subsequently, ensemble learning is performed to integrate the outputs of each tree model, which combines the prediction results of individual models to improve the accuracy and reliability of the final prediction. Through ensemble learning, the risk of heart disease can be predicted more precisely, enabling a comprehensive evaluation of the patient's health status and the establishment of early diagnosis and preventive treatment plans. That is, the present invention can combine the strengths of various models through ensemble learning for multiple tree series models to provide higher prediction performance than a single model and improve the robustness against data noise and variations. This enables the model to provide consistent predictions for various patient data and reduce the uncertainty of predictions. In summary, the computing device of the present invention is characterized by using three neural network models to more accurately predict the risk of heart disease. First, the embedding model converts electrocardiogram data into a low-dimensional latent vector to summarize important signal features. Second, the clustering model clusters the latent vectors to determine the cluster to which each vector belongs. Finally, the heart disease risk prediction model combines HRV characteristic information, user meta information, latent vectors, and cluster information to predict the risk of heart disease. Through such an integrated approach, the computing device can more precisely and consistently predict the risk of heart disease. In particular, during the final heart disease risk prediction process, multiple tree series models are used by leveraging four variables: HRV characteristic information, user meta information, latent vectors, and cluster information. These models each generate their own outputs. Through ensemble learning, these outputs are integrated to generate the final output, that is, the result of predicting the risk of heart disease. Such a configuration improves the prediction accuracy of heart disease risk and enables a more multi-dimensional and comprehensive evaluation through various combinations of variables. This more accurately reflects the individual health status of patients and plays an important role in enabling medical staff to clearly understand the risks of patients and establish optimal treatment plans.

[0031] As a result, the heart disease risk prediction model generated through the completion of the final learning can hierarchically provide prediction information regarding the future risk of heart disease based on the patient's electrocardiogram data. The hierarchically structured information multi-dimensionally evaluates the health status of the patient's heart and plays an important role in establishing an individualized treatment plan. This contributes to the early detection and management of heart disease by enabling medical staff to more clearly understand the risks of patients and take more precise treatment and preventive measures. Specifically, this system comprehensively analyzes electrocardiogram data and the patient's meta information to classify the likelihood of heart disease occurrence into various risk levels. For example, by hierarchically providing risks such as low, medium, and high, medical staff can clearly understand how much attention should be paid to a specific patient. As a result, patients in the high-risk group are more likely to receive early diagnosis and treatment, while patients in the low-risk group can reduce unnecessary examinations and enable efficient health management. Consequently, it can play an important role in supporting the efficient allocation of medical resources, preventing complications caused by heart disease, and improving the quality of patients' lives. The embodiments described above can be implemented by hardware components, software components, and / or combinations of hardware components and software components. For example, the apparatuses, methods, and components described in the embodiments can be implemented using a general-purpose computer or a special-purpose computer, such as, for example, a processor, a controller, an ALU (arithmetic logic unit), a digital signal processor, a microcomputer, an FPGA (field programmable gate array), a PLU (programmable logic unit), a microprocessor, or any other device capable of executing and responding to instructions. The processing device can execute an operating system (OS) and software applications running on the operating system. Further, the processing device can also access, store, operate on, process, and generate data in response to the execution of the software. For ease of understanding, the processing device may be described as being one, but those of ordinary skill in the art will understand that the processing device can include multiple processing elements and / or multiple types of processing elements. For example, the processing device can include multiple processors or one processor and one controller. Also, other processing configurations, such as a parallel processor, are possible. Software can include a computer program, code, instruction, or a combination of one or more of these, and can configure a processing device to operate as desired, or can instruct the processing device independently or collectively. Software and / or data can be interpreted by a processing device or can be stored in any type of machine, component, physical device, virtual equipment, computer storage medium or device to provide instructions or data to the processing device. Software can be distributed on a computer system connected to a network and can be stored or executed in a distributed manner. Software and data can be stored in a computer-readable recording medium.

[0032] The method according to the embodiment is realized in the form of program instructions executed via various computer means and can be recorded on a computer-readable medium. The computer-readable medium can store program instructions, data files, data structures, etc. alone or in combination, and the program instructions recorded on the medium may be specially designed and configured for the embodiment or may be those known to and usable by those skilled in the art of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, magnetic tapes, optical media such as CD-ROMs, DVDs, magneto-optical media such as floptical disks, and hardware devices specially configured to store and execute program instructions such as ROMs, RAMs, flash memories. Examples of program instructions include not only machine language code created by a compiler but also high-level language code that can be executed by a computer using an interpreter or the like. The above-described hardware device may be configured to operate as one or more software modules to perform the operations of the embodiment, and vice versa. As described above, although the embodiment has been described with reference to the limited drawings, those of ordinary skill in the art can apply various technical modifications and variations based thereon. For example, the described technology may be performed in an order different from the described method, and / or the components of the described system, structure, device, circuit, etc. may be combined or coupled in a form different from the described method, or may be replaced or substituted by other components or equivalents, and appropriate results can still be achieved. Therefore, other realizations, other embodiments, and equivalents to the claims also fall within the scope of the claims described below.

Description of Reference Numerals

[0033] 100 Computing device 110 Processor 120 Memory 130 Program 140 Display

Claims

1. In a method performed by one or more processors of a computing device, obtaining a plurality of electrocardiogram data; generating a model for predicting heart disease based on the plurality of electrocardiogram data, the step of generating the model for predicting heart disease constructing a training dataset based on the plurality of electrocardiogram data; generating a heart disease risk prediction model by performing training on one or more network functions based on the training dataset, the training dataset includes a first training dataset and a second training dataset classified for different training purposes; the heart disease risk prediction model hierarchically provides prediction information regarding the risk of future heart disease based on a patient's electrocardiogram data; the step of constructing the training dataset includes performing preprocessing on the plurality of electrocardiogram data; the step of performing the preprocessing includes performing noise preprocessing on the plurality of electrocardiogram data; dividing the plurality of noise-preprocessed electrocardiogram data into a predetermined window size to generate a plurality of ROI signals; extracting HRV characteristic information in the lead unit of the plurality of electrocardiogram data, the HRV characteristic information includes index information regarding the variability between heartbeats; A method for generating a heart disease prediction model.

2. The first training dataset includes data for training corresponding to the process of converting the characteristics of electrocardiogram data into a characteristic space; The second training dataset includes data for calibration related to heart risk prediction. The method for generating a heart disease prediction model according to Claim 1.

3. The step of generating the heart disease risk prediction model includes generating an embedding model through masked self-supervised learning using the first training dataset; an embedding execution step of extracting a latent vector corresponding to each of the plurality of ROI signals corresponding to the second training dataset by using the embedding model; performing clustering on the latent vectors by using a clustering model; A method for generating a heart disease prediction model according to claim 1, comprising: constructing a vector database (DB, Database) based on the latent vectors and information for each cluster corresponding to each latent vector.

4. The step of generating the embedding model includes: inducing self-supervised learning in a self-reconstruction model to process the data included in the first training dataset as input, so that the self-reconstruction model generates an output similar to the input data; extracting an encoder from the self-reconstruction model that has completed the learning to generate the embedding model. The self-reconstruction model is: a neural network model that masks a part of the input data and restores the masked part, and includes a dimensionality reduction network function and a dimensionality restoration network function, and is a method for generating a heart disease prediction model according to claim 3.

5. The clustering model is: characterized by performing clustering based on the similarity distance between the latent vectors corresponding to each of the plurality of ROI signals. The step of performing the clustering includes: extracting a representative vector for each of the plurality of clusters corresponding to the clustering result, and is a method for generating a heart disease prediction model according to claim 3.

6. The method includes: obtaining electrocardiogram data of a person to be predicted; performing preprocessing on the electrocardiogram data of the person to be predicted; generating a plurality of latent vectors corresponding to the preprocessed electrocardiogram data by using the embedding model; comparing each of the plurality of latent vectors with each of the representative vectors corresponding to each of the plurality of clusters, and classifying each of the plurality of latent vectors into one of the plurality of clusters; generating hierarchical information regarding the risk of heart disease based on the classification result in which each of the plurality of latent vectors is classified into the plurality of clusters, and is a method for generating a heart disease prediction model according to claim 5.

7. The step of generating the heart disease risk prediction model includes: obtaining user meta-information corresponding to each of the plurality of electrocardiogram data. obtaining the plurality of potential vectors and cluster information corresponding to the plurality of potential vectors from the vector database; performing learning on a plurality of tree models based on the HRV characteristic information, the user meta information, the plurality of potential vectors, and the cluster information corresponding to the potential vectors, and performing ensemble learning to integrate the outputs of the respective tree models to generate the heart disease risk prediction model, the method for generating a heart disease prediction model according to claim 3.

8. In a method performed by one or more processors of a computing device, obtaining a plurality of electrocardiogram data; generating a model for predicting heart disease based on the plurality of electrocardiogram data, the step of generating the model for predicting heart disease includes: classifying the obtained plurality of electrocardiogram data into a training data set and a validation data set; obtaining ROI electrocardiogram data divided into a predetermined window size from each of the electrocardiogram data classified into the training data set and the validation data set; corresponding to inputting the first ROI electrocardiogram data obtained from the electrocardiogram data included in the training data set into a deep learning model for predicting a patient's heart disease, training the deep learning model to predict each heart disease class of the first ROI electrocardiogram data; applying the second ROI electrocardiogram data obtained from the electrocardiogram data included in the validation data set to the trained deep learning model to determine a threshold for classifying the heart disease class, the method for generating a heart disease prediction model further comprising.

9. the determining step includes: collecting probability scores for each of the ROI electrocardiogram data separated from the same electrocardiogram data for each of the second ROI electrocardiogram data; averaging the probability scores collected for each of the second ROI electrocardiogram data to derive a final probability score; fine-tuning a threshold for classifying the heart disease class based on the derived final probability score, the method for generating a heart disease prediction model according to claim 8.

10. The method for generating a heart disease prediction model according to claim 8, wherein the determined threshold value is stored together with the weights of the deep learning model.

11. A memory for storing one or more instructions, A processor for executing the one or more instructions stored in the memory, comprising: The processor is a server that performs the method according to claim 1 or 8 by executing the one or more instructions.

12. A computer program stored in a computer-readable recording medium so as to be capable of performing the method according to claim 1 or 8, coupled to a computer that is hardware.

Citation Information

Patent Citations

  • Electrocardiogram analysis support device, program, electrocardiogram analysis support method and electrocardiogram analysis support system

    JP2022148631A

  • ECG-based future atrial fibrillation prediction system and method

    JP2022550705A

  • Learned model generation method, teacher data generation device, learning model generation device, and disease development risk prediction device

    JP2023025436A

  • System for preprocessing of conversion 2 dimensional electrocardiogram to 3 dimensional electrocardiogram and predicting cardiac disorder through artificial intelligence

    KR1020220104583A

  • Deep neural network pre-training method for classifying electrocardiogram (ECG) data

    US20220084679A1