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

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

Patent Information

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

AI Technical Summary

Benefits of technology

【0007】 本発明の様々な実施形態によれば、患者の心電図データからROI心電図データを抽出し、抽出されたROI心電図データをディープラーニングモデルに適用することにより、患者の心臓疾患予測精度を向上させることができる。 また、本発明は、複数の機械学習モデルを利用して将来の心臓疾患のリスクを予測することにより、患者が本人の健康状態を把握し、心臓疾患を予防することができる効果を提供することができる。これにより、心臓疾患の早期発見と迅速な対応を可能にして、患者の生命を保護し、治療結果を改善することができる機会を提供する。 また、本発明は、心電図データを一々分析しなければならない医療スタッフの物理的時間を自動化されたAIベースの処理過程を介して大幅に減少させることにより、スクリーニングの効率性を高め、医療現場の機会費用を減少させることができる効果を提供することができる。 また、本発明は、HRV特性情報と、埋め込みモデルから抽出された潜在ベクトルと、患者の年齢などのメタデータとをアンサンブルするために、複数のツリー系列機械学習モデルを用いてアンサンブルを行うことにより、心臓疾患リスクの予測精度をさらに向上させることができる。 本発明の効果は、上述した効果に限定されず、上述していない別の効果は、以降の記載から通常の技術者に明確に理解できるであろう。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025031652000001_ABST
    Figure 2025031652000001_ABST
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 cardiac disease in a patient, and more particularly, to a technique for assessing and predicting the risk of arrhythmias, including atrial fibrillation, and other cardiac diseases based on electrocardiogram data using a deep learning model. [Background technology]

[0002] Electrocardiogram (ECG) data is widely used as an important tool to record electrical activity of the heart and diagnose cardiac conditions. Existing multi-lead electrocardiograms have played a key role in diagnosing cardiac diseases such as arrhythmias, especially atrial fibrillation, by detecting abnormalities in cardiac rhythm and electrical conduction. Arrhythmias, including atrial fibrillation, are common diseases characterized by irregular or abnormal heartbeats and are often asymptomatic or have mild symptoms and are difficult to detect without proper medical examinations. If left untreated, such arrhythmias can 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 of atrial fibrillation and arrhythmias is crucial for effectively managing these diseases. On the other hand, existing electrocardiogram machines mainly focus on diagnosis and are limited in predicting or stratifying the risk of future heart disease. This is because existing electrocardiogram analysis methods mainly rely on statistical analysis. Statistical methodologies do not adequately reflect nonlinear and complex patterns, making it difficult to precisely evaluate a patient's individual cardiac condition and the risk of various arrhythmias. In addition, statistical-based models perform less well than deep learning-based probabilistic models when processing large amounts of data. ECG data can be affected by overlapping signals such as muscle movement, breathing, and electrical noise from other equipment. These external factors can reduce the accuracy of statistical methodologies, resulting in significant obstacles to accurately stratifying and quantifying the risk of heart disease. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Korean Patent Publication No. 10-2022-0104583 Summary of the Invention [Problem to be solved by the invention]

[0004] The problem to be solved by the present invention has been devised in response to the above-mentioned background technology, and is to provide a technology that can predict and stratify the future risk of heart disease based on electrocardiogram data. The problems to be solved by the present invention are not limited to the problems described above, and other problems not described above will be clearly understood by those skilled in the art from the following description. [Means for solving the problem]

[0005] In order to solve the above problems, a method for generating a cardiac disease prediction model according to an embodiment of the present invention is disclosed. The method can include the steps of acquiring a plurality of electrocardiogram data and generating a model for cardiac disease prediction based on the plurality of electrocardiogram data. In an alternative embodiment, the step of generating a model for cardiac disease prediction includes the steps of constructing a learning dataset based on the plurality of electrocardiogram data, and generating a cardiac disease risk prediction model by performing learning on one or more network functions based on the learning dataset, wherein the learning dataset includes a first learning dataset and a second learning dataset classified for different learning purposes, and the cardiac disease risk prediction model may be characterized in providing hierarchical prediction information on future cardiac disease risk based on the patient's electrocardiogram data. In an alternative embodiment, the first training data set may include data for training corresponding to a process of transforming features of electrocardiogram data into a feature space, and the second training data set may include data for calibration related to cardiac risk prediction. In an alternative embodiment, the step of constructing the learning dataset includes a step of pre-processing the plurality of electrocardiogram data, the pre-processing step including a step of performing noise pre-processing on the plurality of electrocardiogram data, a step of dividing the noise pre-processed plurality of electrocardiogram data into a predetermined window size to generate a plurality of ROI signals, and a step of extracting HRV characteristic information on a lead-by-lead basis of the plurality of electrocardiogram data, the HRV characteristic information including index information regarding variability between heartbeat intervals. In an alternative embodiment, the step of generating the heart disease risk prediction model may include the steps of: generating an embedding model through masking-based self-supervised learning using the first training data set; performing an embedding step of extracting latent vectors corresponding to each of a plurality of ROI signals corresponding to the second training data set using the embedding model; performing clustering on the latent vectors using a clustering model; and constructing a vector database (DB, DataBase) based on information on the latent vectors and each cluster corresponding to each latent vector. In an alternative embodiment, the step of generating the embedded model includes the steps of: processing data included in the first training data set as input to a self-reconstruction model, and inducing self-supervised learning 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 embedded model, wherein the self-reconstruction model is a neural network model that masks a portion of the input data and restores the masked portion, and may include a dimensionality reduction network function and a dimensionality restoration network function. In an alternative embodiment, the clustering model is characterized by performing clustering based on a similarity distance between latent vectors corresponding to each of the plurality of ROI signals, and the step of performing the clustering may include a step of extracting a representative vector for each of a plurality of clusters corresponding to the clustering result. In an alternative embodiment, the method may include the steps of acquiring electrocardiogram data of the subject to be predicted, performing preprocessing on the electrocardiogram data of the subject to be predicted, generating a plurality of latent vectors corresponding to the electrocardiogram data after the preprocessing 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, and generating stratification 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 the steps of acquiring user meta-information corresponding to each of the plurality of electrocardiogram data, acquiring the plurality of latent vectors and cluster information corresponding to the plurality of latent vectors from the vector database, and performing ensemble learning to train 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 integrating outputs of each tree model to generate the heart disease risk prediction model. In an alternative embodiment, the step of generating a model for cardiac disease prediction may further include the steps of classifying the acquired plurality of electrocardiogram data into a training dataset, a validation dataset, and a test dataset; acquiring ROI electrocardiogram data divided into a predetermined window size from each of the electrocardiogram data classified into the training dataset, the validation dataset, and the test dataset; training the deep learning model to predict a cardiac disease class of each of the first ROI electrocardiogram data in response to inputting a first ROI electrocardiogram data acquired from the electrocardiogram data included in the training dataset into a deep learning model for predicting a cardiac disease of a patient; and applying a second ROI electrocardiogram data acquired from the electrocardiogram data included in the validation dataset to the trained deep learning model to determine a threshold for classifying the cardiac disease class. In an alternative embodiment, the determining step may include a step of collecting a probability score for each ROI electrocardiogram data separated from the same electrocardiogram data for each of the second ROI electrocardiogram data, a step of averaging the probability scores for each of the collected second ROI electrocardiogram data to derive a final probability score, and a step of fine-tuning a threshold for classifying the cardiac disease class based on the derived final probability score. In an alternative embodiment, the determined thresholds may be stored along with the weights of the deep learning model.

[0006] According to another embodiment of the present invention, a server for performing the method for generating a cardiac disease prediction model is disclosed, the server including a memory for storing one or more instructions and a processor for executing the one or more instructions stored in the memory, the processor executing the one or more instructions to perform the method for generating a cardiac disease prediction model described above. According to another embodiment of the present invention, there is disclosed a computer program stored on a computer readable recording medium, said computer program being coupled to a hardware computer for performing the method for generating a cardiac disease prediction model. Further details of the invention are contained in the detailed description and the drawings. Effect of the Invention

[0007] According to various embodiments of the present invention, the accuracy of predicting cardiac disease in a patient can be improved by extracting ROI electrocardiogram data from the patient's electrocardiogram data and applying the extracted ROI electrocardiogram data to a deep learning model. In addition, the present invention can provide an effect of enabling patients to grasp their own health conditions and prevent heart disease by predicting future risks of heart disease using multiple machine learning models, thereby enabling early detection and rapid response to heart disease, providing an opportunity to protect patients' lives and improve treatment outcomes. In addition, the present invention can provide the effect of improving screening efficiency and reducing opportunity costs in the medical field by significantly reducing the physical time spent by medical staff analyzing electrocardiogram data one by one through an automated AI-based processing process. In addition, the present invention can further improve the accuracy of predicting heart disease risk by ensembling multiple tree-based machine learning models to ensemble HRV characteristic information, latent vectors extracted from the embedding model, and metadata such as patient age. The effects of the present invention are not limited to those described above, 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] FIG. 2 is a block diagram of a computing device for performing a method for generating a cardiac disease prediction model according to an embodiment of the present invention. [Diagram 2] 1 is a flowchart illustrating a method for training a deep learning model for predicting cardiac disease according to an embodiment of the present invention. [Diagram 3] FIG. 2 is a diagram illustrating a method for classifying electrocardiogram data according to an embodiment of the present invention. [Figure 4] FIG. 2 illustrates a method for segmenting electrocardiogram data into individual heart beats according to an embodiment of the present invention. [Figure 5a] FIG. 1 illustrates types of deep learning models according to an embodiment of the present invention. [Figure 5b] FIG. 1 illustrates types of deep learning models according to an embodiment of the present invention. [Figure 5c] FIG. 1 illustrates types of deep learning models according to an embodiment of the present invention. [Figure 6] FIG. 2 illustrates the learning steps of a deep learning model according to one embodiment of the present invention. [Figure 7] 1 is a flowchart illustrating a method for predicting cardiac disease using a trained deep learning model according to an embodiment of the present invention. [Figure 8] FIG. 1 illustrates steps of cardiac disease prediction using a deep learning model according to an embodiment of the present invention. [Figure 9]1 is an exemplary flowchart of a method for generating a cardiac disease prediction model according to an embodiment of the present invention. [Figure 10] 1 is a flowchart illustrating an example of a pre-processing process for a plurality of electrocardiogram data according to an embodiment of the present invention. [Figure 11] 10 is a flowchart illustrating an example process of embedding a latent vector and constructing a vector database based on the embedding result according to an embodiment of the present invention. [Figure 12] 1 is a flowchart illustrating an example process for generating an embedded model according to an embodiment of the present invention. [Figure 13] 1 is an exemplary diagram illustrating a self-reconstruction model according to an embodiment of the present invention, and a process of generating an embedded model from the trained self-reconstruction model; FIG. [Figure 14] 1 is an exemplary flowchart illustrating a process of generating a heart disease risk prediction model through ensemble learning of multiple tree sequence models according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] Specific structural or functional descriptions for the embodiments are disclosed for illustrative purposes only and can be modified and implemented in various forms. Therefore, the actual implementation is not limited to the specific embodiments disclosed, and the scope of this specification includes modifications, equivalents, or alternatives included in the technical ideas described in the embodiments. Although terms such as first or second may be used to describe various components, these terms should be construed only for the purpose of distinguishing one component from another component, for example, a first component may be named a second component, and similarly, a second component may be named a first component. When an element is described as being "coupled" to another element, it should be understood that the element may be directly coupled or connected to the other element, or there may be other elements intervening therebetween. A singular expression includes a plural expression unless the context clearly indicates otherwise. In this document, each of 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 of the items listed together in the corresponding phrase, or all possible combinations thereof. In this specification, terms such as "comprise" or "have" specify the presence of a described feature, number, step, operation, component, part, or combination thereof, and should be understood not to preclude 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 a person of ordinary skill in the art. Terms defined in commonly used dictionaries should be interpreted to have a meaning consistent with the contextual meaning of the relevant art, and should not be interpreted in an idealized or overly formal sense unless expressly defined herein. Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. In the description with reference to the accompanying drawings, the same components are designated by the same reference numerals regardless of the reference numerals, and duplicated description thereof will be omitted. The present invention can obtain a plurality of electrocardiogram data corresponding to a plurality of patients, and generate a model for predicting heart disease based on the obtained plurality of electrocardiogram data. In an embodiment, the model for predicting heart disease can be a neural network model that extracts important patterns and features from the electrocardiogram data and predicts the possibility of heart disease based on the extracted patterns and features. The computing device of the present invention processes the plurality of electrocardiogram data into a form suitable for learning, and uses the processed data to train the model for predicting heart disease. According to an embodiment, the present invention may generate and provide a deep learning model and a heart disease risk prediction model as a model for predicting heart disease. In an embodiment, the present invention may process a plurality of electrocardiogram data into various forms, train neural networks in different ways, and generate and provide various prediction models. Hereinafter, a method for generating a model for predicting heart disease will be described in detail with reference to various drawings.

[0010] FIG. 1 is a configuration diagram of a computing device that performs a method for generating a heart disease prediction model according to an embodiment of the present invention. As shown in Fig. 1, computing device 100 may include one or more processors 110 and a memory 120 that loads or stores a program 130 executed by processor 110. The components included in computing device 100 in Fig. 1 are merely examples, and a person skilled in the art to which the present invention pertains will appreciate that other general-purpose components may be included 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 may include at least one of a central processing unit (CPU), a micro processor unit (MPU), a micro controller unit (MCU), a graphic processing unit (GPU), a neural processing unit (NPU), a digital signal processor (DSP), or any other type of processor well known in the art. The processor 110 may also perform calculations for at least one application or program for executing methods / operations according to various embodiments of the present invention. The computing device 100 may include one or more processors. Memory 120 stores one or more combinations of various data, instructions, and information used by components (e.g., processor 110) included in computing device 100. Memory 120 may include volatile memory and / or non-volatile memory. The program 130 may include one or more actions for implementing the methods / operations according to various embodiments of the present invention, and may be stored in the memory 120 in the form of software. Here, the actions correspond to commands implemented by the program 130. For example, the program 130 may include instructions for performing an operation of classifying electrocardiogram data acquired from a plurality of patients into a training dataset, a validation dataset, and a test dataset, an operation of acquiring ROI electrocardiogram data divided into a predetermined window size from each of the electrocardiogram data classified into the training dataset, the validation dataset, and the test dataset, an operation of training the deep learning model to predict each cardiac disease class of the first ROI electrocardiogram data in response to inputting the first ROI electrocardiogram data acquired from the electrocardiogram data included in the training dataset into a deep learning model for predicting a cardiac disease of the patient, and an operation of applying the second ROI electrocardiogram data acquired from the electrocardiogram data included in the validation dataset to the trained deep learning model to determine a threshold for classifying a cardiac disease class. According to the embodiment, the ROI electrocardiogram data divided into a predetermined window size may mean an individual heart beat, but is not limited thereto. In the following, for convenience of explanation according to the embodiment, the ROI electrocardiogram data divided into a predetermined window size may be described as an individual heart beat, but the type of ROI electrocardiogram data applied to each embodiment is not limited thereto.

[0011] When the program 130 is loaded into the memory 120, the processor 110 executes a number of operations to implement the program 130, thereby performing the methods / operations according to various embodiments of the present invention. An execution screen of the program 130 may be displayed via the display 140. In the case of Fig. 1, the display 140 is shown as a separate device connected to the computing device 100, but in the case of the computing device 100 being a terminal that a user can carry around, such as a smartphone or a tablet, the display 140 may be a component of the computing device 100. The screen displayed on the display 140 may be a screen before information is input to the program or a result of the execution of the program. FIG. 2 is a flowchart illustrating a method for training a deep learning model for predicting heart disease according to one 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 may classify 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 may be classified into groups of True-Normal Sinus Rhythm (T-NSR), Afib-Normal Sinus Rhythm (AF-NSR), and Clinically Important Arrhythmia-Normal Sinus Rhythm (CIA-NSR). In this case, the electrocardiogram data acquired from a plurality of patients may be 10-second 12-lead electrocardiogram data, but the type of electrocardiogram data is merely an example and is not limited to the above example.

[0012] Meanwhile, clinically important arrhythmia (CIA) can include atrial arrhythmia, ventricular arrhythmia, atrial fibrillation, and bundle branch block (BBB). Atrial arrhythmia is arrhythmia caused by the atrium, and means a sustained arrhythmia lasting 30 seconds or more or a non-sustained arrhythmia lasting 30 seconds or less, and can include atrial premature complex, or sustained / non-sustained atrial rhythm, etc. Ventricular arrhythmia is arrhythmia caused by the ventricle, and means a sustained arrhythmia lasting 30 seconds or more or a non-sustained arrhythmia lasting 30 seconds or less, and can include ventricular premature complex, or sustained / non-sustained ventricular arrhythmia, etc. Atrial fibrillation can mean an arrhythmia that shows irregular ventricular contraction due to the absence of regular electrical signals and contractions of the atrium. Finally, BBB can refer to arrhythmias that result from a blockage of the right or left bundle branch, which transmits cardiac impulses through the ventricles, resulting in characteristic electrocardiographic patterns. The T-NSR group can consist of ECGs from patients with no history of atrial fibrillation or arrhythmia and at least three normal sinus rhythm ECGs in a year. The AF-NSR group can consist of ECGs from patients with a normal sinus rhythm ECG paired with an atrial fibrillation or atrial flutter ECG that occurred within 14 days of the normal sinus rhythm ECG. Similarly, the CIA-NSR group can consist of ECGs from patients with a normal sinus rhythm ECG paired with an arrhythmic ECG that occurred within 14 days of the normal sinus rhythm ECG. The processor can classify the electrocardiogram data belonging to the T-NSR group, AF-NSR group, and CIA-NSR group thus divided into a training dataset, a validation dataset, and a test dataset that can be applied to a deep learning model for predicting heart disease. As an example, Fig. 3 is a diagram illustrating a method for classifying electrocardiogram data according to an embodiment of the present invention. The processor may classify electrocardiogram data 310 belonging to a T-NSR group, an AF-NSR group, and a CIA-NSR group according to the cardiac disease to be predicted. As an example, the processor may classify the electrocardiogram data 310 into electrocardiogram data 320 belonging to a T-NSR group and an AF-NSR group for predicting atrial fibrillation, and electrocardiogram data 330 belonging to a T-NSR group and a CIA-NSR group for predicting arrhythmia.

[0013] The processor may then classify each cardiac disease-specific electrocardiogram data 320, 330 into a training data set, a validation data set, and a test data set based on any date on which the electrocardiogram data 320, 330 was generated. As an example, as shown in FIG. 3, if the electrocardiogram data 320, 330 were acquired between May 23, 2017 and May 23, 2022, the processor can classify the electrocardiogram data 320, 330 into a training data set and a validation data set based on an arbitrary date (for example, June 11, 2021) at a certain ratio, and classify the electrocardiogram data after the appropriate date (including the appropriate date) into a test data set. In the example of FIG. 3, the electrocardiogram data 320, 330 are classified into a training data set (60%), a validation data set (20%), and a test data set (20%), but such classification ratios are merely one example and are not limited to the above example. In step 220, the processor may obtain individual heart beats from each of the electrocardiogram data classified into the training data set, the validation data set, and the test data set. The processor may perform pre-processing on the 10-second 12-lead electrocardiogram data classified into the training data set, the validation data set, and the test data set to obtain accurate and reliable data. More specifically, the processor may receive input of electrocardiogram data classified into a training data set, a validation data set, and a test data set in an XML (eXtensible Markup Language) file format. The processor may parse a typical data portion, such as a patient's name, age, and sex, and an atypical data portion consisting of a continuous signal from the input data. The processor may then perform pre-processing to remove noise from the atypical data portion consisting of a continuous signal, and classify key markers of heart beats. The processor may obtain discrete individual heart beats from the atypical data consisting of a continuous signal through the key markers of heart beats thus classified. 4, the processor may decode the 10-second, 12-lead ECG data from 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. The processor may then segment the denoised 10-second, 12-lead ECG data into individual heart beats using a QRS peak detection algorithm. As a result, the processor can obtain multiple discrete individual heart beats from a single 10-second 12-lead electrocardiogram data, as shown in FIG. 3, and the individual heart beats thus obtained can be used to train a deep learning model for more accurate cardiac disease prediction.

[0014] At step 230, in response to inputting the first individual heart beats obtained from the electrocardiogram data included in the training dataset into the deep learning model for predicting cardiac disease in the patient, the processor trains the deep learning model to predict a cardiac disease class for each of the first individual heart beats. At this time, the processor can train the deep learning model to predict the cardiac disease class of each of the first individual cardiac beats using any of the deep learning models ResNet-18, Conv1D including LSTM (Long Short-Term Memory), and Conv1D including a transformer. As an example, ResNet-18, as shown in Figure 5a, is a deep learning model that can extract essential features of the input using convolutional operations such as various Convolutional Neural Networks (CNNs). To solve the vanishing gradient problem of CNN architectures, ResNet-18 can perform residual learning via skip connections, a method in which input data skips multiple layers on the network and is directly connected to the output layer, as shown in Figure 5a. Since the ResNet-18 deep learning model requires a fixed length input, the processor can fix the length of an individual heart beat to the average length of all individual heart beats. As an example, if the average length of all individual heart beats is 700, the processor can fix the length to 700 by performing slicing for individual heart beats having a heart beat length longer than 700 and zero padding for individual heart beats having a heart beat length shorter than 700. As another example, Conv1D with LSTM as shown in Fig. 5b can capture both local and long-range temporal patterns from sequential data, where the Conv1D layer is good at sensing local temporal patterns and the LSTM layer is good at modeling long-term dependencies. As another example, Conv1D with a transformer as shown in Fig. 5c can capture all the local patterns and global dependencies of the input data. In this case, the transformer layer is suitable for modeling global dependencies, and the Conv1D layer can be effective in sensing local patterns. Unlike ResNet-18, which has a fixed input length, Conv1D with a transformer has the advantage of being able to accommodate various input sizes. Meanwhile, FIG. 6 is a diagram showing a learning step of a deep learning model according to an embodiment of the present invention. Referring to FIG. 6, the processor can optimize parameters of the deep learning model using binary cross entropy with logarithmic loss and AdamW optimizer with an initial learning rate of 0.0001. In this case, the binary cross entropy is a loss function that reduces the difference between a prediction result and an actual correct answer in learning of the deep learning model, and the AdamW optimizer is an algorithm involved in updating the actual deep learning model based on such a loss function. The processor can obtain a probability value for each cardiac disease class of the first individual heart beat in the range of 0 to 1 by applying a sigmoid function to the output of the deep learning model optimized by such binary cross entropy and AdamW optimizer.

[0015] At step 240, the processor may apply the second individual cardiac rate obtained from the electrocardiogram data included in the validation dataset to the trained deep learning model to determine a threshold for distinguishing cardiac disease classes. More specifically, the processor can collect probability values ​​for each individual heart beat separated from the same electrocardiogram data for each second individual heart beat, collect probability values ​​for each of all collected second individual heart beats, average the probability values ​​for all collected second individual heart beats to derive a final probability score, and then fine-tune the optimal threshold for classifying cardiac disease classes based on the derived final probability score, as shown in FIG. 6 . In this case, the optimal threshold can be obtained by applying a threshold between 0 and 1 in units of 0.01 to achieve the highest F1 score in the validation dataset for the cardiac disease classes, i.e., the T-NSR and AF-NSR classes or the T-NSR and CIA-NSR classes. In this case, the F1 score can be defined as follows:

number

[0016] As an example, Fig. 8 is a diagram showing a cardiac disease prediction step using a deep learning model according to an embodiment of the present invention. Referring to Fig. 8, after loading the weights and thresholds of the trained deep learning model, the processor can derive a probability value for each individual cardiac beat. The processor can calculate an average value of all the probability values ​​of the individual cardiac beats thus derived. As an example, the processor can determine that the patient's cardiac disease class is normal, i.e., T-NSR, if the T-NSR Logit value, which is the average of the probability values ​​for determining T-NSR, is greater than a first threshold θ1 and the CA-NSR Logit value, which is the average of the probability values ​​for determining CIA-NSR, is less than a second threshold θ2. Alternatively, when the T-NSR Logit value is greater than the first threshold θ1 and the CIA-NSR Logit value is greater than the second threshold θ2, the processor may compare the T-NSR Logit value with the CIA-NSR Logit value and select the greater value as the final prediction. As an example, when the CIA-NSR Logit value is greater than the T-NSR Logit value, the cardiac disease class of the patient may be determined as CIA-NSR, which may cause arrhythmia. In addition, when the T-NSR Logit value is smaller than a first threshold θ1 and the CIA-NSR Logit value is smaller than a 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, if the T-NSR Logit value is smaller than the first threshold θ1 and the CIA-NSR Logit value is greater than the second threshold θ2, the processor can determine that the cardiac disease class of the patient is CIA-NSR, which may cause arrhythmia. These four methods of classifying cardiac disease classes can be similarly applied to classifying T-NSR and AF-NSR. Below, with reference to Figures 9 to 14, a method of using HRV characteristic information, latent vectors, cluster information corresponding to the latent vectors, and metadata according to one embodiment of the present invention, and a method of predicting heart disease by ensembling multiple tree model outputs will be specifically described.

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

[0018] According to various embodiments, the computing device 100 of the present invention can perform data augmentation on the acquired electrocardiogram data. In particular, the computing device 100 can perform data augmentation using lead pairs to augment training data for training a neural network. More specifically, ECG data can be acquired on a lead-by-lead basis, for example, ECG data can be collected in various lead configurations, such as 1-lead, 3-lead, 12-lead, etc., which are used to record electrical activity in various parts of the heart and assess a more comprehensive cardiac condition. For example, in the case of a 12-lead signal, many signals can be acquired over a relatively short period of time, but the total amount of data can be limited, whereas a 1-lead signal is recorded for a longer period of time, but the variety of data is limited. If these two types of data are used together, a more accurate cardiac status assessment can be made, 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 receives one-lead data as input and generates 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), thus enhancing the training data as if there were more lead data. The training of the reconstruction model includes a process of learning the correlation between one-read and multi-read data. For this purpose, the reconstruction model is trained using paired data in which both one-read and multi-read data are present. During the training process, the model learns how to reproduce multi-read data from one-read data, and at this time, learns the characteristics of the one-read data and the patterns of multi-read signals that can be inferred from them. After model training is complete, the reconstruction model can generate multi-lead signals even with only one-lead data, thereby compensating for the lack of actual multi-lead data. This increases the diversity of the data and improves the generalization performance of the model. The multi-lead data generated in this way (i.e., augmented multi-lead data) can be used for neural network training together with the existing multi-lead data to further allow the model to learn various lead configurations and improve its prediction performance for various cardiac conditions. As a result, data augmentation by the reconstruction model substantially increases the amount of training data, improving the model's prediction accuracy and enhancing the reliability of the heart disease prediction model, thereby helping medical staff to more accurately diagnose patients' health conditions and establish more effective treatment and prevention plans. According to one embodiment of the present invention, a method for generating a cardiac disease prediction model may include a step (S2000) of constructing a learning dataset based on a plurality of electrocardiogram data. In one embodiment, constructing a learning dataset through multiple electrocardiogram data is a process of collecting and organizing various data to learn important features and patterns of each electrocardiogram data, thereby generating a dataset containing various cases and patterns required for predicting heart disease.

[0019] According to an embodiment, the learning dataset of the present invention includes various data related to the prediction of heart disease, and may include a training dataset for training a neural network model, a validation dataset for evaluating and optimizing the performance of the model, and test data for evaluating the generalization performance of the model. In one embodiment, the training data set may include a first training data set and a second training data set classified for different training purposes. The first training data set and the second training data set may be classified for training different neural network models. The first training data set and the second training data set may be classified by the computing device 100. For example, a first training dataset is used in the process of training an embedding model, where the dataset focuses on extracting and representing key features of electrocardiogram data, and a second training dataset is used to train a model for predicting the risk of heart disease, where the dataset can be used for calibration and performance evaluation to improve the accuracy of the predictive model. Specifically, the first training data set may include data for learning corresponding to a process of transforming electrocardiogram data characteristics into a feature space. The first training data set is data for ECG representation learning and can be used to extract and embed various characteristics and patterns of electrocardiogram data signals. The second training data set may include data for calibration related to cardiac risk prediction. That is, the second training data set is data for correcting cardiac risk and can be used to more accurately predict the risk predicted by the model. According to an embodiment, constructing the training data set may include performing pre-processing on the plurality of electrocardiogram data. FIG. 10 is a flowchart illustrating an example of a pre-processing process for a plurality of electrocardiogram data according to an embodiment of the present invention. 10, the pre-processing method for the plurality of electrocardiogram data may include a step of performing noise pre-processing for the plurality of electrocardiogram data (S2100), a step of dividing the plurality of electrocardiogram data subjected to noise pre-processing into a predetermined window size to obtain a plurality of ROI signals (S2200), and a step of extracting HRV (Heart Rate Variability) characteristic information for each lead of the plurality of electrocardiogram data (S2300). In one embodiment, the HRV characteristic information may include index information regarding variability between heartbeat intervals.

[0020] More specifically, first, pre-processing for noise removal is performed on the plurality of electrocardiogram data acquired in step S2100. Here, the pre-processing for noise removal includes low-pass filtering and noise removal, which is for removing baseline noise from the electrocardiogram signal. Specifically, low-pass filtering removes high-frequency components from the electrocardiogram data through a frequency band limiting method to increase signal purity, and noise removal utilizes a time series analysis technique to reduce unnecessary noise from the electrocardiogram data to make important signal components clearer. Such pre-processing steps minimize distortion of the electrocardiogram signal and contribute to improving signal quality for more accurate evaluation of cardiac activity. Furthermore, according to an embodiment, the computing device 100 may perform data augmentation to increase the diversity and robustness of model learning. The computing device 100 performs data augmentation by simulating various noise patterns, thereby enabling the model to learn and adapt to various noise conditions that may occur in a real environment. In a specific embodiment, in the process of pre-processing the electrocardiogram data, various noises that may occur in an 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 data set, so that the model can learn and adapt to noises that may occur in various environments. Such a process of adding and removing noise has the advantage of improving the quality of the data and improving the generalization performance of the model. Then, in step S2200, the noise-removed electrocardiogram data is divided into a predetermined window size and organized into a plurality of ROI signals. In some embodiments, the ROI signal is defined as a range including at least 3 to 5 QRS complexes (heart beats) in a deformable window size unit that includes a meaningful heart beat 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 the heart beat as a key feature in the electrocardiogram. For example, each ROI signal can be divided into 30 seconds to 1 minute units, which is useful for analyzing important patterns in the electrocardiogram signal and identifying regularities and abnormalities in the heart beat. The computing device 100 extracts the ROI signal and organizes it into data that can more accurately analyze key characteristics of the heart beat, which plays an important role in identifying certain patterns and indications of abnormalities in the ECG signal and assessing the risk of heart disease. Also, in step S2300, an HRV characteristic information extraction process is performed. HRV characteristic information is an index that measures periodic changes in heart rate over time, and is an important signal characteristic that reflects cardiac activity. For example, the computing device 100 divides the electrocardiogram data into 30-second to 1-minute intervals to obtain a plurality of ROI signals, and extracts HRV characteristics corresponding to each ROI signal. This is to more accurately evaluate the overall cardiac activity by analyzing data over a longer time range than the existing bit-by-bit analysis. The computing device 100 derives the HRV characteristic from each ROI signal by a method such as frequency analysis or time domain analysis. In a specific embodiment, the computing device 100 may apply various analysis techniques to extract HRV characteristic information corresponding to each ROI signal. As a specific example, the computing device may extract the HRV characteristic information through evaluation of high and low frequency components by spectral analysis and statistical analysis of NN intervals.

[0021] Spectral analysis evaluates heart rate variability in the frequency domain, with high frequency components reflecting mainly parasympathetic nervous system activity, and low frequency components indicating mixed sympathetic and parasympathetic nervous system activity, which is useful for understanding the balance state of the autonomic nervous system. Statistical analysis of NN intervals evaluates the variability of heart rate intervals in the time domain to quantify cardiac autonomic nervous system activity, which may be an important indicator in assessing heart rate irregularities, stress responses, cardiac 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 root mean square of the difference between successive heartbeat intervals, and mainly reflects the influence of the parasympathetic nervous system. SDNN indicates the standard deviation of all normal heartbeat intervals, and indicates the overall variability of the autonomic nervous system. SDANN measures the standard deviation of the average heartbeat intervals over a certain period to evaluate long-term heart rate variability. These indices play an important role in evaluating the activity of the cardiac autonomic nervous system and comprehensively analyzing the health of the heart. That is, the HRV characteristic information reflects various aspects of heart rate variability, and is used to evaluate the irregularity of heartbeats, autonomic nervous system activity, etc., and can be a basis for predicting the risk of heart disease. According to one embodiment of the present invention, a method for generating a cardiac disease prediction model may include a step (S3000) of generating a cardiac disease risk prediction model by training one or more network functions based on a training dataset. FIG. 11 is a flowchart illustrating an example process of embedding a latent vector and constructing a vector database based on the embedding result according to an embodiment of the present invention. Referring to FIG. 11, the step of generating a heart disease risk prediction model may include a step of generating an embedding model through masking-based self-supervised learning using a first learning dataset (S3100), an embedding execution step of extracting latent vectors corresponding to each of a plurality of ROI signals corresponding to a second learning dataset using the embedding model (S3200), a step of performing clustering on the latent vectors using a clustering model (S3300), and a step of constructing a vector database (DB, Database) based on information on the latent vectors and each cluster corresponding to each latent vector (S3400).

[0022] More specifically, in step S3100, computing device 100 may generate an embedding model based on the first training data set. The embedding model may be a model trained to represent complex patterns of electrocardiogram data in a low-dimensional space. When multiple ROI signals corresponding to electrocardiogram data are input, the embedding model can generate latent vectors corresponding to each ROI signal. Here, the latent vector may be a low-dimensional vector that condenses important features of the electrocardiogram data, which is a data representation that is converted into a form that contains the main information of the signal to make it easier to understand and analyze the high-dimensional electrocardiogram signal. The latent vector can provide information that is useful for assessing the health of the heart or detecting signs of disease based on the patterns of the electrocardiogram data. A detailed description of the method for generating an embedded model will be given below with reference to FIGS. 12 is a flowchart illustrating an example of a process for generating an embedded model according to an embodiment of the present invention. FIG. 13 is an example diagram illustrating a process for generating an embedded model from a self-reconstruction model and a trained self-reconstruction model according to an embodiment of the present invention. Referring to FIG. 12, the step of generating an embedded model may include a step (S3110) of processing data included in a first learning data set as input to a self-reconstruction model to induce self-supervised learning so that the self-reconstruction model generates an output similar to the input data, and a step (S3120) of extracting an encoder from the self-reconstruction model that has completed learning to generate an embedded model. A self-reconstructing model can be a model designed to inherently learn important features of the data in the process of learning through inputs and outputs. In one embodiment, the self-reconstruction model is a neural network model that masks a part of input data and restores the masked part, and may include an encoder (or a dimension reduction network function) and a decoder (or a dimension restoration network function). In one embodiment, the self-reconstruction model of the present invention may be, but is not limited to, a Masked AutoEncoder (MAE) that learns important patterns in electrocardiogram data and accurately restores masked signals. The self-reconstruction model can effectively learn important features of the data through the process of intentionally concealing parts of the ECG signal (specifically, each ROI signal) and reconstructing the entire signal based on the remaining parts. Self-reconstruction models learn in a way that minimizes reconstruction errors between inputs and outputs, and thus can effectively extract and represent important characteristics of signals. Self-reconstruction models have the advantage of understanding and exploiting the underlying structure of 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 by reducing the dimension of input data and then restoring it. The self-reconstruction model can include an encoder (or a dimension reduction network function) 810 and a decoder (or a dimension restoration network function) 820. The self-reconstruction model 800 converts high-dimensional data into a low-dimensional latent space through the encoder 810, compressing the core information of the data and reducing noise in the process. Then, the decoder 820 is used to restore the compressed low-dimensional representation to the original high-dimensional space, thereby learning and reproducing important patterns of the data.

[0023] According to an embodiment, the computing device 100 can induce the self-reconstruction model 800 to be trained via a masking learning method. In this method, a portion of the input data is intentionally masked, and the model is trained to restore the masked portion. For example, without masking, the self-reconstruction model may learn biasedly to noise rather than QRS complex, so that the masking allows the model to learn by concentrating on important features. This allows the model to develop the ability to extract important patterns and features from the remaining portion of the input data and accurately restore the masked information. This has the advantage of being robust to noise and incomplete portions of data. In addition, the process of restoring the masked portions allows the model to understand the context of the data and learn important features, making it extremely useful for analyzing and interpreting complex medical data such as ECG data. By applying the mask, the model can focus on key signals such as the QRS Complex, enabling reliable data analysis for accurate diagnosis and evaluation of cardiac disease. That is, to increase the reliability of the analysis and interpretation of electrocardiogram data, the present invention trains a self-reconstruction model using a masking learning method to focus on important cardiac signals, allowing the model to understand the context of the data and learn key features so that it can accurately capture and restore core signals such as QRS complexes. The self-reconstruction model aims to reproduce the entire signal, and focuses on masking a specific meaningful range of the signal and then restoring the masked portion. As a specific example, the significant portion of the entire range of the ECG signal is masked so that about three QRS complexes are included in this masked region. The self-reconstruction model focuses on learning this region, and the loss function is calculated only for this region. In this way, the model learns the features of the data centered on the important signals, and can therefore more accurately understand and reproduce the overall context of the data. As a result, it is robust to noise and imperfections that may occur in ECG data, enabling reliable data analysis for early diagnosis and evaluation of cardiac diseases. Such an approach can minimize the loss of important information in the analysis of ECG signals, aiding in accurate cardiac status assessment and significantly improving medical data interpretation. According to an embodiment, the self-reconfiguration model 800 may include at least one hidden layer, and an odd number of hidden layers may be disposed between the input and output layers. The number of nodes in each layer may be reduced from the number of nodes in the input layer to an intermediate layer called a bottleneck layer (encode), and then expanded symmetrically with the reduction from the bottleneck layer to the output layer (symmetric with the input layer). In this case, although FIG. 13 shows that the layers of the encoder 810 and the decoder 820 are symmetric, the present invention is not limited thereto, and the nodes in the layers of the encoder 810 and the decoder 820 may or may not be symmetric. The self-reconfiguration model 800 may perform nonlinear dimensionality reduction. The number of input layers and output layers may correspond to the number of items of input data remaining after preprocessing of the input data. The structure of the self-reconfiguration model 800 may have a structure in which the number of nodes in the hidden layer included in the encoder 810 decreases as it moves away from the input layer. The number of nodes in the bottleneck layer (the layer with the fewest nodes located between the encoder and decoder) may also be kept above a certain number (e.g., more than half of the input layer), since if it is too small, a sufficient amount of information may not be conveyed.

[0024] In an embodiment, the computing device 100 trains a self-reconstruction model through a plurality of ROI signals corresponding to a first training data set, so that the model learns important features and patterns of the electrocardiogram data. The trained self-reconstruction model is applied to each of the plurality of electrocardiogram data to extract and analyze key features of the electrocardiogram signal through a process of masking and restoring a portion of the input data. In summary, the computing device 100 induces learning in a masked learning manner of the self-reconstruction model to ensure high reliability in the analysis and interpretation of electrocardiogram data. In this process, the self-reconstruction model focuses on key signals such as QRS complexes to learn the inherent distribution of heartbeats. While the self-reconstruction model reproduces the original signal of the electrocardiogram data, it effectively learns important features of the electrocardiogram data itself, such as the peak of the QRS complex. In the next step S3120, an encoder is extracted from the trained self-reconstruction model to generate an embedded model. The encoder part in the trained self-reconstruction model is trained (i.e., pre-trained with the first training data set) to compress important features of high-dimensional data and remove noise, and can output a low-dimensional latent vector corresponding to input data (e.g., multiple ROI signals included in the second training data set). According to the embodiment, the generated embedding model can be characterized in that it can effectively reflect the similarity between input data in the latent space since the data features are compressed and expressed. For example, in response to similar input data, the embedding model outputs a latent vector in a similar latent space. For example, the second latent vector of a second ROI signal similar to a first ROI signal is located in a latent space similar to the first latent vector corresponding to the first ROI signal. That is, they are located in a close position in the latent space. Conversely, when the input data are different from each other (i.e., have large differences), the embedding model places them far apart in the latent space, which allows for clear classification of similarities and differences between the data based on the characteristic patterns of ECG data, which can be utilized in the process of diagnosing and evaluating heart diseases. That is, the present invention induces a self-reconstruction model to self-train using a first training data set, and extracts an encoder from the self-reconstruction model that has completed training to form an embedded model. The computing device 100 can generate an embedding model using the first training data set, and then perform embedding using the embedding model to extract latent vectors corresponding to each of a plurality of ROI signals corresponding to the second training data set. More specifically, each ROI signal included in the second training data set 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 to output a low-dimensional latent vector. The latent vector is a concise representation of the complex patterns of the ROI signals, and reflects the similarities and differences between each ROI signal in a latent space. For example, among the ROI signals of the electrocardiogram data included in the second training data set, signals with similar patterns are output as latent vectors located close to each other in the latent space.

[0025] Then, in step (S3300), computing device 100 can perform clustering on the latent vectors using a clustering model. According to an embodiment, computing device 100 may utilize a clustering model to perform clustering on the latent vectors. As an example, the clustering model is a model trained to perform clustering using latent vectors extracted by the embedding model, and may be a KNN (K-Nearest Neighbors) model. In one embodiment, the clustering model can be characterized by performing clustering based on a similarity distance between latent vectors corresponding to each of a plurality of ROI signals. More specifically, the clustering process calculates the distance or similarity between each latent vector to determine how close or similar these vectors are, where the distance is typically calculated using a metric such as Euclidean distance or cosine similarity. For example, the distance between latent vector A extracted from a specific ROI signal and 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 considered to represent ECG 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 neighboring vectors of a particular vector and including that vector in the cluster to which those neighboring vectors belong. For example, if K=3, find the three nearest neighboring vectors of latent vector A and assign A to the majority of the clusters to which those neighboring vectors belong. This process is repeated for all latent vectors, and finally vectors that share similar features are grouped into the same cluster. This process is useful for classifying different patterns in electrocardiogram data and analyzing how each pattern correlates with a particular 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 a disease such as arrhythmia. As a more specific example, when clustering each latent vector using a clustering model, four clusters can be formed. In this clustering process, vectors are grouped based on the similarity between each latent vector. Assuming there are four clusters, a first cluster, a second cluster, a third cluster, and a fourth cluster, each of which may represent a different electrocardiogram pattern. For example, the first cluster may include a signal having a normal heartbeat pattern, and the second cluster may include a signal having a particular abnormality, such as arrhythmia. The third and fourth clusters may include signals reflecting different types of cardiac diseases or conditions. In the above description, it is described that four clusters (or groups) may be formed, but this is merely an example, and the actual number of clusters may 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 the ECG data and analyze the characteristics of each cluster to provide information useful for the early diagnosis and management of cardiac disease. The clustering results provide important data for medical professionals to comprehensively evaluate a patient's condition and develop a customized treatment plan. Additionally, in step S3400, computing device 100 may build a vector database based on the latent vectors and information for each cluster corresponding to each latent vector. The vector database of the present invention may be a NoSQL database server for storing and managing embedding vectors, cluster membership information, and information on the distance between each vector. The vector database of the present invention is optimized for analyzing and managing latent vectors extracted from various electrocardiogram data, thereby allowing characteristic patterns of electrocardiogram signals to be systematically stored and retrieved for use as needed. As an example, the vector database of the present invention can assist in risk assessment and condition monitoring based on a patient's electrocardiogram data. When newly collected electrocardiogram data of a particular patient comes in, the latent vectors extracted from the data can be compared to existing vectors stored in the vector database to evaluate the similarity. Through this similarity evaluation, it can be known which cluster the patient's electrocardiogram data belongs to and which previously observed patterns the cluster resembles. In addition, in an embodiment, the computing device 100 can extract a representative vector for each of a plurality of clusters corresponding to the clustering result, such a principal vector is a vector that represents each cluster and can represent the center of the latent vectors in the cluster. More specifically, when the data stored in the vector database is huge, it may take a lot of time to search, for example, 300,000 pieces of electrocardiogram data. In general, when new electrocardiogram data of a specific patient is input, it is divided into multiple ROI signals in the pre-processing process, and 80 to 120 embedded vectors are generated through an embedding process for each ROI signal. For example, when new electrocardiogram data is individually compared with all vectors stored in the database, it may be inefficient due to the large amount of calculation. This takes a lot of time and is not suitable for situations where real-time analysis is required. In this way, to shorten the search time and improve efficiency, the latent vector generated based on the patient's ECG data can be compared with the principal vector of each cluster to quickly identify similar clusters. In this process, the dot product between each embedding vector and the principal vector is calculated to evaluate the similarity, and based on this information, it is determined which cluster the ECG data belongs to.

[0027] This method allows for rapid identification of related clusters by comparing with the principal vector representing each cluster, instead of comparing the entire data one by one. As a result, rapid analysis and efficient management of ECG data is possible, which plays an important role in quickly assessing the risk of heart disease and monitoring the condition of patients in real time. In addition, in an embodiment, cardiac disease prediction information for the electrocardiogram data of a prediction subject can be generated through the following process. In an embodiment, a method for generating heart disease prediction information for electrocardiogram data of a subject to be predicted includes the steps of acquiring electrocardiogram data of the subject to be predicted, performing preprocessing on the electrocardiogram data of the subject to be predicted, generating a plurality of latent vectors corresponding to the electrocardiogram data after preprocessing using an embedding model, comparing each of the plurality of latent vectors with a respective representative vector 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 stratification information regarding the risk of heart disease based on the classification result in which each of the plurality of latent vectors is classified into a plurality of clusters. In an embodiment, the prediction subject may be an individual who has undergone an electrocardiogram examination for the purpose of assessing and managing the risk of heart disease. This may be people undergoing general health checkups, people with a family history of heart disease, or patients who have previously been diagnosed with or have related symptoms of heart disease. The prediction subject may continuously assess their 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 electrocardiogram data of a prediction target, the data is preprocessed to remove noise and refine the signal. Here, as described above, the preprocessing may include a process of removing unnecessary signal components and emphasizing important signal features in order to improve the quality of the electrocardiogram data, and may include a process of dividing each electrocardiogram signal into appropriate units (predetermined window size) for processing. The predetermined window size may 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 to an embedding model (e.g., an encoder extracted from a self-reconstruction model previously trained via a first training data set), and a latent vector (or embedding vector) is generated from each data. The generated latent vector is compared with existing vectors stored in a vector database, and each vector is classified into a specific cluster according to the degree of similarity. Since each cluster has a specific pattern that reflects a heart condition, the risk of heart disease is evaluated depending on which cluster the latent vector belongs to.

[0028] In addition, the computing device 100 may generate stratified information on the risk of heart disease based on a 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 prediction subject, the data is divided into specific time units in a preprocessing process and acquired as a plurality of ROI signals, and each ROI signal is processed as an input of an embedding model to generate a latent vector for each of the plurality of ROI signals. In this case, prediction information on the risk of heart disease may be generated according to the classification result as to which cluster each latent vector is classified into and to what extent. As a more specific example, if the ECG data of a prediction subject is composed of ten 30-second ROI signals, each of the ten ROI signals is converted into ten latent vectors via an embedding model, and the ten vectors can be classified into one of four predetermined clusters, where each predetermined cluster indicates a particular cardiac condition, with the first cluster being the highest risk cluster and the fourth cluster being the lowest risk cluster. Computing device 100 can predict the overall risk depending on how the ten input signals fall into each cluster. For example, if eight signals belong to cluster 1 and two to cluster 2, the patient's risk of heart disease can be assessed as very high. On the other hand, if five signals belong to cluster 2, three to cluster 3, and two to cluster 4, the risk can be assessed as medium. If two belong to cluster 3 and eight to cluster 4, the risk can be assessed as low, and if all ten belong to cluster 4, the patient's risk of heart disease can be assessed as very low. That is, the computing device 100 of the present invention can predict the patient's risk of heart disease in a hierarchical form by analyzing the ROI signal of the electrocardiogram data using the embedding model to obtain latent vectors, and evaluating which of the predetermined clusters each latent vector belongs to through the clustering model based on the learning dataset. In other words, the computing device 100 compares the latent vectors generated by the embedding model with the predetermined clusters to determine which cluster each vector belongs to, and multidimensionally evaluates the patient's heart condition based on this information. Such a hierarchical risk prediction method improves the accuracy of electrocardiogram data analysis and helps to comprehensively understand the patient's cardiac condition. Therefore, the computing device of the present invention can provide a systematic and clear hierarchical provision of a patient's cardiac disease risk, thereby providing important information for medical professionals to establish appropriate preventive measures or treatment plans. This enables early detection of cardiac disease and appropriate treatment, thereby contributing to the health management of patients.

[0029] FIG. 14 illustrates an exemplary flowchart for explaining a process of generating a heart disease risk prediction model through ensemble learning of multiple tree sequence models according to an embodiment of the present invention. Referring to FIG. 14, the step of generating a heart disease risk prediction model may include a step of acquiring user meta information corresponding to each of the multiple electrocardiogram data (S3500), a step of acquiring multiple latent vectors and cluster information corresponding to the multiple latent vectors from a vector database (S3600), and a step of performing ensemble learning to learn multiple tree models based on the HRV characteristic information, user meta information, the multiple latent vectors, and the cluster information corresponding to the latent vectors, and integrating the outputs of each tree model to generate a heart disease risk prediction model (S3700). More specifically, in step S3500, the step of acquiring user meta-information may include a process of collecting personal health information such as a patient's age, sex, medical history, and lifestyle habits. Such information well reflects an individual's health condition and characteristics and has a significant impact on the interpretation of electrocardiogram data. In particular, such meta-information is utilized as an important variable required for more accurately assessing the risk of heart disease. This enables customized prediction and evaluation taking into account the patient's personal health factors. In step S3600, multiple latent vectors and cluster information corresponding to each vector are obtained from the vector database. The latent vector summarizes the characteristics of the electrocardiogram data, and the cluster information indicates the pattern of a specific cardiac condition or disease to which the vector belongs. This makes it possible to confirm which cluster the patient's electrocardiogram data belongs to and evaluate the risk of cardiac disease indicated by that cluster. In step S3700, multiple tree models are trained based on the HRV characteristic information, the user meta information, the latent vector, and the cluster information, and 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 a vector database and can include cluster information of each vector and information on the distance between the vectors. For example, the cluster information provides which cluster each latent vector belongs to and distance information indicating the similarity or difference between the vectors within the cluster. Such information plays an important role in evaluating which cluster a particular electrocardiogram pattern belongs to and how similar or different this pattern is compared to other electrocardiogram data. This allows the characteristics of the electrocardiogram data to be analyzed and more accurately determined whether the data is related to a particular disease or condition. More specifically, the process of training a plurality of tree sequence models based on the HRV characteristic information, the user meta information, the latent vector, and the cluster information is as follows. First, HRV characteristic information is a heart rate variability index extracted from electrocardiogram data and reflects the activity of the cardiac autonomic nervous system. User meta information is information indicating an individual's health condition, such as a patient's age, sex, medical history, and lifestyle. A latent vector is a value that expresses the features of electrocardiogram data in a low-dimensional space, and cluster information indicates which cardiac condition or disease these vectors are associated with. These various pieces of information are used as input variables to train multiple tree-based models. For example, a random forest model uses these input variables to construct multiple decision trees and combines the results of each tree to provide a final prediction. Gradient boosting trees aim to achieve more accurate predictions by correcting the errors of previous models at each step through successive model training.

[0030] In this case, the cluster information may be particularly important. The distance information of each latent vector between the cluster to which it belongs and other vectors is used to better understand the characteristics of the ECG data and to assess the risk of heart disease. Such information acts as an important decision factor in the multiple tree models, which learn patterns in the data based on this information. In the final ensemble process, the prediction results of the individual tree models are integrated to derive one overall prediction result. During this process, the weights of each model are adjusted to improve the reliability and accuracy of the final prediction. The ensemble process compensates for the weaknesses of the individual models and combines their strengths to provide more robust and consistent predictions. As a result, such a comprehensive learning and ensemble process can reflect the multidimensional characteristics of ECG data and accurately and precisely predict the risk of heart disease. Then, ensemble learning is performed to integrate the output of each tree model, which combines the prediction results of the individual models to improve the accuracy and reliability of the final prediction. Through ensemble learning, the risk of heart disease can be predicted more accurately, which can comprehensively evaluate the patient's health status and establish early diagnosis and preventive treatment plans. That is, the present invention combines the strengths of various models through ensemble learning of multiple tree sequence models to provide better predictive performance than a single model and improves robustness to noise and fluctuations in data, thereby enabling the model to provide consistent predictions for various patient data and reducing prediction uncertainty. In summary, the computing device of the present invention is characterized by utilizing three neural network models to more accurately predict the risk of heart disease. First, the embedding model converts ECG data into low-dimensional latent vectors to summarize important signal features. Second, the clustering model clusters the latent vectors to determine which cluster each vector belongs to. 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. This integrated approach allows the computing device to more accurately and consistently predict the risk of heart disease. In particular, in the final heart disease risk prediction process, multiple tree sequence models are used using four variables: HRV characteristic information, user meta information, latent vector, and cluster information, and these models generate their own outputs. Through ensemble learning, these outputs are integrated to generate the final output, i.e., the result of predicting the risk of heart disease. This configuration improves the accuracy of predicting the risk of heart disease and enables a more multidimensional and comprehensive assessment through the combination of various variables. This more accurately reflects the individual health condition of the patient and plays an important role in helping medical staff clearly understand the patient's risk and establish an optimal treatment plan.

[0031] As a result, the heart disease risk prediction model generated through the final learning completion can provide hierarchical prediction information on the future risk of heart disease based on the patient's electrocardiogram data. The hierarchical information plays an important role in multidimensionally evaluating the patient's heart health and 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 patient's risk and take more precise treatment and preventive measures. Specifically, the system classifies the likelihood of developing heart disease into various risk levels by comprehensively analyzing ECG data and patient meta-information. For example, by providing a risk hierarchy of low, medium, and high, medical staff can clearly understand how much attention they should pay to a particular patient. This increases the likelihood that high-risk patients will receive early diagnosis and treatment, while low-risk patients will reduce unnecessary tests and achieve efficient health management. As a result, it can play an important role in supporting the efficient allocation of medical resources, preventing complications from heart disease, and improving the quality of life of patients. The above-described embodiments may be implemented using hardware components, software components, and / or a combination of hardware and software components. For example, the devices, methods, and components described in the embodiments may be implemented using a general-purpose computer or a special-purpose computer, such as a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and software applications executed on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to the execution of software. For ease of understanding, the processing device may be described as being one, but a person skilled in the art will understand that the processing device may include multiple processing elements and / or multiple types of processing elements. For example, the processing device may include multiple processors or one processor and one controller. Other processing configurations are also possible, such as parallel processors. The software may include a computer program, code, instructions, or a combination of one or more of these, and may configure or, independently or collectively, instruct a processing device to operate as desired. The software and / or data may be stored on any type of machine, component, physical device, virtual device, computer storage medium, or device to be interpreted by or provide instructions or data to a processing device. The software may also be distributed over computer systems connected to a network, and stored or executed in a distributed manner. The software and data may be stored on a computer-readable recording medium.

[0032] The method according to the embodiment can be realized in the form of program instructions executed by various computer means and recorded on a computer readable medium. The computer readable medium can store the program instructions, data files, data structures, and the like, alone or in combination, and the program instructions recorded on the medium may be those specially designed and configured for the embodiment, or may be those known and available to those skilled in the art of computer software. Examples of computer readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and hardware devices specially configured to store and execute program instructions, such as ROMs, RAMs, and flash memories. Examples of program instructions include not only machine language code, such as that produced by a compiler, but also high-level language code that can be executed by a computer using an interpreter, for example. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa. As described above, although the embodiments have been described with reference to the drawings, those having ordinary skill in the art may apply various technical modifications and variations based thereon. For example, the described techniques may be performed in a different order from that described, and / or the components of the described systems, structures, devices, circuits, etc. may be combined or joined in a different manner from that described, or may be counterbalanced or replaced by other components or equivalents, and still achieve suitable results. Accordingly, other implementations, other embodiments, and equivalents of the claims are within the scope of the following claims. [Explanation of symbols]

[0033] 100 Computing Devices 110 Processor 120 Memory 130 Programs 140 Display

Claims

1. 1. A method performed by one or more processors of a computing device, comprising: acquiring a plurality of electrocardiogram data; generating a model for cardiac disease prediction based on the plurality of electrocardiogram data.

2. The step of generating a model for predicting heart disease comprises: constructing a learning data set based on the plurality of electrocardiogram data; and generating a heart disease risk prediction model by training one or more network functions based on the training data set; The learning data set includes a first learning data set and a second learning data set classified into different learning purposes, The method for generating a heart disease prediction model according to claim 1 , characterized in that the heart disease risk prediction model provides hierarchical prediction information regarding future heart disease risk based on the patient's electrocardiogram data.

3. the first training data set includes data for training corresponding to a process of transforming characteristics of electrocardiogram data into a characteristic space; The method for generating a cardiac disease prediction model according to claim 2 , wherein the second training data set includes data for calibration related to cardiac risk prediction.

4. The step of constructing the learning data set includes: A step of pre-processing the plurality of electrocardiogram data; The step of performing the pre-processing includes: performing noise pre-processing on the plurality of electrocardiogram data; Dividing the plurality of noise pre-processed electrocardiogram data into a predetermined window size to generate a plurality of ROI signals; extracting HRV characteristic information for each lead of the plurality of electrocardiogram data; The method for generating a cardiac disease prediction model according to claim 2 , wherein the HRV characteristic information includes index information relating to beat-to-beat variability.

5. The step of generating the heart disease risk prediction model comprises: generating an embedding model via masking-based self-supervised learning using the first training dataset; an embedding step of extracting latent vectors corresponding to each of a plurality of ROI signals corresponding to the second training data set using the embedding model; performing clustering on the latent vectors using a clustering model; and constructing a vector database (DB) based on the latent vectors and information on each cluster corresponding to each latent vector.

6. The step of generating the embedding model comprises: processing data included in the first training data set as input to a self-reconstruction model to induce self-supervised learning such that the self-reconstruction model generates an output similar to the input data; Extracting an encoder from the trained self-reconstruction model to generate the embedding model; The self-reconstruction model is The method for generating a cardiac disease prediction model according to claim 5, further comprising a neural network model for masking a portion of input data and restoring the masked portion, the neural network model including a dimension reduction network function and a dimension restoration network function.

7. The clustering model is A clustering method is characterized in that a clustering is performed based on a similarity distance between latent vectors corresponding to each of the plurality of ROI signals; The step of performing clustering includes: The method for generating a cardiac disease prediction model according to claim 5 , further comprising the step of extracting a representative vector for each of a plurality of clusters corresponding to the clustering result.

8. The method comprises: A step of acquiring electrocardiogram data of a prediction subject; A step of performing pre-processing on the electrocardiogram data of the prediction subject; utilizing the embedding model to generate a plurality of latent vectors corresponding to the pre-processed electrocardiogram data; comparing each of the latent vectors with a representative vector corresponding to each of the clusters to classify each of the latent vectors into one of the clusters; and generating stratified 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.

9. The step of generating the heart disease risk prediction model comprises: acquiring 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; and performing ensemble learning to train a plurality of tree models based on the HRV characteristic information, the user meta information, the plurality of latent vectors, and cluster information corresponding to the latent vectors, and to integrate outputs of each tree model to generate the heart disease risk prediction model.

10. The step of generating a model for predicting heart disease comprises: classifying the acquired plurality of electrocardiogram data into a training data set and a validation data set; A step of 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; In response to inputting first ROI electrocardiogram data obtained from the electrocardiogram data included in the training data set into a deep learning model for predicting a cardiac disease of a patient, training the deep learning model to predict a cardiac disease class of each of the first ROI electrocardiogram data; The method for generating a cardiac disease prediction model according to claim 1 , further comprising: applying a second ROI electrocardiogram data obtained from the electrocardiogram data included in the validation dataset to the trained deep learning model to determine a threshold for classifying the cardiac disease class.

11. The determining step includes: collecting a probability score for each of the second ROI electrocardiogram data separated from the same electrocardiogram data; averaging the probability scores for each of the collected second ROI electrocardiogram data to derive a final probability score; and fine-tuning a threshold for dividing the cardiac disease classes based on the derived final probability score.

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

13. a memory for storing one or more instructions; a processor for executing the one or more instructions stored in the memory; A server, the processor performing the method of claim 1 by executing the one or more instructions.

14. A computer program stored on a computer-readable recording medium so that the computer program can execute the method according to claim 1 when 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

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

    US20220084679A1

  • Method for generating multiple pieces of standard electrocardiogram data on basis of deep learning algorithm

    WO2023022516A1