Heart beat clustering method and system based on graph association mining enhancement

By constructing a heartbeat correlation graph structure and a multi-head graph attention network, the problems of lack of correlation and insufficient robustness of the existing central beating clustering method are solved, and more accurate heartbeat data classification and diagnostic efficiency are achieved.

CN120277436APending Publication Date: 2025-07-08SHAN DONG MSUN HEALTH TECH GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510327087.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

现有的心搏聚类方法忽略了心搏间的时序、上下文及生理关联,导致相似形态但不同病理特征的心搏错误归类,鲁棒性不足,易受噪声干扰影响。

Method used

By constructing a heartbeat association graph structure, using the multi-head graph attention network to calculate the attention coefficient between nodes, combined with spectral clustering algorithm and post-processing operations, an image embedding representation containing topological associations is generated, and an enhanced feature vector is generated for clustering.

Benefits of technology

It improves the robustness of heartbeat clustering, can correctly distinguish heartbeats with complex noise or waveform variation, provides more accurate heartbeat data classification guidance, shortens diagnosis time, and improves diagnosis efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120277436A_ABST
    Figure CN120277436A_ABST
Patent Text Reader

Abstract

The invention provides a heart beat clustering method and system based on graph association mining enhancement, and belongs to the technical field of electrocardiosignal processing. Constructing a heart beat association graph structure by extracting heart beat characteristics of the electrocardiosignal sample set; then calculating an attention coefficient between nodes in the heart beat correlation graph structure by using the trained multi-head graph attention network to obtain an image embedding representation containing topological correlation; splicing the morphological features and the image embedded representation to generate an enhanced feature vector; clustering the enhanced feature vectors based on a spectral clustering algorithm; and performing post-processing operation on the obtained clustering result to generate heart beat templates containing different categories. According to the method, relevance characteristics between heart beats can be better concerned, and the robustness of heart beat clustering is improved; and guidance can be provided for a doctor to classify the classification of the heart beat data of the patient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electrocardiogram signal processing, and particularly relates to a heart beat clustering method and system based on enhanced graph association mining. Background Art

[0002] The statements in this part only provide background technical information related to the present invention, and do not necessarily constitute prior art.

[0003] Electrocardiogram signal (ECG) is a record of the electrical activity of the heart and is widely used in the diagnosis and monitoring of heart diseases. Heart beat clustering is an important step in electrocardiogram signal analysis and is used for doctors to efficiently batch modify templates. Therefore, clustering heart beat data is a technical problem worthy of research. However, the existing heart beat clustering methods are usually implemented based on feature extraction and clustering algorithms, such as K-means, hierarchical clustering, etc. These methods have some technical problems, for example:

[0004] (1) Lack of correlation: Ignoring the temporal, contextual, and physiological correlations between heart beats (such as the conduction relationship between adjacent heart beats or the correlation of noise interference), resulting in misclassification of heart beats with similar morphologies but different pathological features.

[0005] (2) Feature limitation: Only relying on a single morphological feature, and it is difficult for a single morphological feature to distinguish complex noise or waveform variations (such as irregular heart beats in atrial fibrillation).

[0006] (3) Lack of robustness: Sensitive to signal quality and easily affected by baseline drift and electromyogram interference. Summary of the Invention

[0007] To overcome the above-mentioned deficiencies of the prior art, the present invention provides a heart beat clustering method and system based on enhanced graph association mining, which can better focus on the correlation features between heart beats, improve the robustness of heart beat clustering; and further provide guidance for doctors to classify the heart beat data of patients.

[0008] To achieve the above object, one or more embodiments of the present invention provide the following technical solutions:

[0009] The first aspect of the present invention provides a heart beat clustering method based on enhanced graph association mining.

[0010] A heart beat clustering method based on enhanced graph association mining includes:

[0011] Collecting electrocardiogram data of multiple patients to form an electrocardiogram signal sample set;

[0012] Extracting the heart beat features of the electrocardiogram signal sample set and constructing a heart beat association graph structure; wherein, the heart beat features include morphological features and time domain features;

[0013] Train a multi-head graph attention network; use the trained multi-head graph attention network to calculate the attention coefficients between nodes in the heartbeat correlation graph structure to obtain an image embedding representation containing topological correlations;

[0014] Concatenate the obtained morphological features with the image embedding representation to generate an enhanced feature vector; cluster the enhanced feature vector based on the spectral clustering algorithm; perform post-processing operations on the obtained clustering results to generate heartbeat templates containing different categories.

[0015] Furthermore, extract the heartbeat features of the electrocardiogram signal sample set, including: first, segment the electrocardiogram signal sample set, and each segment is used as an independent single heartbeat segment; subsequently, extract the morphological features and time domain features of each single heartbeat segment simultaneously.

[0016] Furthermore, construct a heartbeat correlation graph structure, including: taking each heartbeat point in the single heartbeat segment as a graph node, constructing an initial edge according to the heartbeat characteristics of each heartbeat point; generating a heartbeat correlation graph structure based on the graph nodes and the initial edge.

[0017] Furthermore, train a multi-head graph attention network, including: initializing the trainable parameters of the multi-head graph attention network; constructing a loss function based on the supervised contrastive loss, combined with the compactness and separability metrics of clustering; training the multi-head graph attention network based on the constructed loss function.

[0018] Furthermore, the calculation formula for the attention coefficient between nodes is expressed as:

[0019]

[0020] where α ij represents the attention coefficient between node i and node j, h i and h j represent the feature vectors of node i and node j respectively, W represents the trainable weight matrix, a T represents the weight vector of the attention mechanism, N i represents the set of neighbor nodes of node i, LeakyReLU() represents the activation function, and h k represents the feature vector of the k-th neighbor node in the neighbor node set N i of.

[0021] Furthermore, cluster the enhanced feature vector based on the spectral clustering algorithm, including: first, preset the neighborhood radius and minimum number of points of the core point; subsequently, adaptively determine the number of clustering clusters based on the silhouette coefficient.

[0022] Further, post - processing operations are performed on the obtained clustering results to generate heartbeat templates containing different categories, including: setting a scale threshold for noise clusters, and removing small - scale clusters with a sample number less than the set scale threshold to generate heartbeat templates containing different categories.

[0023] The second aspect of the present invention provides a heartbeat clustering system enhanced by graph - association mining.

[0024] A heartbeat clustering system enhanced by graph - association mining includes:

[0025] A data acquisition module, configured to: collect electrocardiogram data of multiple patients to form an electrocardiogram signal sample set;

[0026] A heartbeat association graph structure construction module, configured to: extract heartbeat features of the electrocardiogram signal sample set and construct a heartbeat association graph structure; wherein, the heartbeat features include morphological features and time - domain features;

[0027] A model training module, configured to: train a multi - head graph attention network;

[0028] A graph attention mechanism association mining module, configured to: use the trained multi - head graph attention network to calculate the attention coefficients between nodes in the heartbeat association graph structure to obtain an image embedding representation containing topological associations;

[0029] A feature fusion and clustering module, configured to: splice the obtained morphological features and the image embedding representation to generate an enhanced feature vector; perform clustering on the enhanced feature vector based on the spectral clustering algorithm;

[0030] A template generation module, configured to: perform post - processing operations on the obtained clustering results to generate heartbeat templates containing different categories.

[0031] The third aspect of the present invention provides a computer - readable storage medium, on which a program is stored, and when the program is executed by a processor, it implements the steps in a heartbeat clustering method enhanced by graph - association mining as described in the first aspect of the present invention.

[0032] The fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored on the memory and executable on the processor, and when the processor executes the program, it implements the steps in a heartbeat clustering method enhanced by graph - association mining as described in the first aspect of the present invention.

[0033] The above - mentioned one or more technical solutions have the following beneficial effects:

[0034] (1) The present invention constructs a heartbeat correlation graph structure by extracting the heartbeat features of an electrocardiogram (ECG) signal sample set; wherein, the heartbeat features include morphological features and time-domain features; and uses a multi-head graph attention network to calculate the attention coefficients between nodes in the heartbeat correlation graph structure to obtain an image embedding representation containing topological correlations. The present invention simultaneously considers various correlation relationships such as the timing, context, and physiological correlations between heartbeats, and can correctly classify heartbeats with similar morphologies but different pathological features.

[0035] (2) The present invention collects the ECG data of multiple patients as an ECG signal sample set; constructs a heartbeat correlation graph structure by extracting the heartbeat features of the ECG signal sample set; meanwhile, mines the correlation relationships between heartbeats through a graph attention mechanism. The constructed heartbeat correlation graph structure in the present invention reflects both morphological features and time-domain features, rather than relying solely on a single morphological feature. Therefore, even in the face of complex noise or waveform variations, the present invention can distinguish well.

[0036] (3) Before obtaining the ECG data of a patient and extracting the heartbeat features, the present invention performs filtering processing on the ECG signal sample set to remove the influence of baseline drift, electromyogram interference, etc. Therefore, the present invention has better robustness when performing heartbeat clustering.

[0037] Advantages of additional aspects of the present invention will be given in part in the following description, become apparent in part from the following description, or be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings forming a part of this specification are used to provide a further understanding of the present invention. The schematic embodiments and descriptions thereof of the present invention are used to explain the present invention and do not constitute an improper limitation of the present invention.

[0039] Figure 1 It is a flowchart of a heartbeat clustering method based on enhanced graph correlation mining in Embodiment 1 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0040] It should be noted that the following detailed description is exemplary and is intended to provide further illustration of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.

[0041] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention.

[0042] In the case of no conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.

[0043] Embodiment 1

[0044] This embodiment discloses a heartbeat clustering method enhanced based on graph association mining.

[0045] As Figure 1 shown, a heartbeat clustering method enhanced based on graph association mining includes:

[0046] Step S1: Collect electrocardiogram data of multiple patients to form an electrocardiogram signal sample set;

[0047] Step S2: Extract the heartbeat features of the electrocardiogram signal sample set and construct a heartbeat association graph structure; wherein, the heartbeat features include morphological features and time-domain features;

[0048] Step S3: Train a multi-head graph attention network; use the trained multi-head graph attention network to calculate the attention coefficients between nodes in the heartbeat association graph structure to obtain an image embedding representation containing topological associations;

[0049] Step S4: Concatenate the obtained morphological features with the image embedding representation to generate an enhanced feature vector; perform clustering on the enhanced feature vector based on the spectral clustering algorithm; perform post-processing operations on the obtained clustering results to generate heartbeat templates containing different categories.

[0050] Based on the above method, the present invention can better focus on the correlation features between heartbeats and improve the robustness of heartbeat clustering; furthermore, it provides guidance for doctors to divide the classification of patients' heartbeat data. For the convenience of understanding the technical solution of the present invention, the following further explains and illustrates the specific implementation methods in the technical solution of the present invention.

[0051] Step S1: Collect electrocardiogram data of multiple patients to form an electrocardiogram signal sample set.

[0052] Collect electrocardiogram data of multiple patients to form an electrocardiogram signal sample set S = {S1, S2, …, S n}, where each electrocardiogram signal S i corresponds to the original electrocardiogram data of a patient. To ensure the robustness of the subsequent clustering process, filter the electrocardiogram signal S i of each patient in the electrocardiogram signal sample set to remove noise interferences such as baseline drift and electromyogram interference.

[0053] Filter the electrocardiogram signal S i of each patient in the electrocardiogram signal sample set. Specifically, use a Butterworth band-pass filter to filter out noise, and then input it into a notch filter to obtain clean electrocardiogram data. As an alternative embodiment, the filtering of the input electrocardiogram signal S i can adopt band-pass filtering including 0.5 - 40 Hz and notch filtering of 50 Hz power frequency.

[0054] Step S2: Extract the heartbeat features of the electrocardiogram (ECG) signal sample set and construct a heartbeat correlation graph structure; among them, the heartbeat features include morphological features and time-domain features.

[0055] Step S2-1: Extract the heartbeat features of the ECG signal sample set, including: First, segment the ECG signal sample set, and each segment is used as an independent single heartbeat segment; mark the timestamp t for each single heartbeat segment. Subsequently, simultaneously extract the morphological feature F m = [w, h] (i.e., the morphological feature vector) and the time-domain feature F t = [RR, A] (i.e., the time-domain feature vector). Wherein, w represents the wavelet coefficient; h represents the HOG feature, i.e., the histogram of oriented gradients feature; RR represents the RR interval, i.e., the interval time between each heartbeat; A represents the amplitude value. As an optional embodiment, the db4 wavelet basis can be used to decompose the heartbeat signal into 5 layers, and the high-frequency coefficients of the 3rd - 5th layers are extracted as the wavelet feature w. The calculation parameters of the HOG feature h can be set as: the size of each cell is 8×8 sampling points, the number of directions is 9, and the block overlap rate is 50%. In the step of constructing the heartbeat correlation graph structure, in addition to the morphological feature vector F m of the node features, other features that can characterize the heartbeat characteristics, such as frequency-domain features, etc., can also be included.

[0056] Step S2-2: Construct a heartbeat correlation graph structure, including: Take each heartbeat point in the single heartbeat segment as a graph node, and construct an initial edge according to the heartbeat characteristics of each heartbeat point; generate a heartbeat correlation graph structure based on the graph nodes and the initial edges.

[0057] Let the heartbeat correlation graph be G=(V, E), where V represents the set of graph nodes and E represents the set of initial nodes. Take each heartbeat point in the single heartbeat segment as a graph node v∈V, and the node feature is the above-mentioned morphological feature vector F m .

[0058] Construct an initial edge e∈E according to the heartbeat characteristics of each heartbeat point; among them, the heartbeat characteristics include temporal proximity and morphological similarity. In the actual implementation process, the initial edge can be constructed based on either one of the heartbeat characteristics of temporal proximity or morphological similarity. Specifically: Temporal proximity means constructing an initial edge between heartbeats within the sliding window W, and the size of the sliding window W is set according to the time characteristics of the heartbeat; that is, scan all heartbeats from back to front. When scanning to a certain heartbeat, take the first (W - 1) / 2 heartbeats before this heartbeat to establish a connecting edge, and then take the last (W - 1) / 2 heartbeats to establish a connecting edge. And so on until all heartbeats are scanned. Morphological similarity means constructing an edge when the cosine distance d cos between the morphological feature vectors of two heartbeats is less than the set threshold theta. The cosine distance formula is:

[0059]

[0060] Among them, F m1 and F m2 respectively represent the image feature vectors of two heartbeats, and d cos () represents the calculation of cosine distance. As an alternative embodiment, the cosine distance threshold θ can be set to 0.85, and when the difference in RR intervals of two heartbeats exceeds 20%, even if the cosine distance condition is satisfied, no edge connection is established.

[0061] Step S3: Train the multi-head graph attention network; use the trained multi-head graph attention network to calculate the attention coefficients between nodes in the heartbeat association graph structure to obtain an image embedding representation containing topological associations.

[0062] Step S3-1: Train the multi-head graph attention network.

[0063] First, perform data annotation: For some heartbeat samples in the dataset (electrocardiogram signal sample set), invite professional cardiologists to perform similarity annotation based on the typical features of the electrocardiogram signal, the category of the heartbeat, and the relationship before and after, and label the similar heartbeats into the same category, and label the heartbeats into num template categories; where num represents the number of categories into which the heartbeats are pre-divided. In the data annotation method of semi-supervised learning, the proportion of supervised annotation samples in the training set can be adjusted according to the richness of the data and the initial performance of the model, and can be set between 10% - 30% in the initial stage.

[0064] Perform similarity annotation on heartbeat segments; among them, the similarity annotation rule is: For heartbeats with similar morphology (such as the waveform consistency of P waves, QRS complexes, and T waves) and the same relationship of heartbeats before and after, and the same clinical significance, they are labeled into the same similarity group; for heartbeats with significantly different morphologies (such as wide QRS complexes and narrow QRS complexes) or different clinical significances, they are labeled into different groups. Construction of supervision signals: Use the labeled similarity groups as the source of positive sample pairs for supervised contrast learning, that is, heartbeats within the same group are regarded as positive sample pairs, and heartbeats between different groups are automatically regarded as negative sample pairs for calculating the supervised contrast loss function.

[0065] Subsequently, randomly initialize the trainable parameters of the multi-head graph attention network GAT multi ; Based on the supervised contrast loss, construct a loss function L by combining the compactness and separability metrics of clustering; train the multi-head graph attention network based on the constructed loss function. The loss function L can be expressed as:

[0066]

[0067] Among them, λ1 and λ2 represent balance coefficients; represents the clustering separability index, such as the minimum of the inter-cluster distances; C represents the clustering compactness index; L contrastive represents the supervised contrastive loss, which is used to construct positive and negative sample pairs by leveraging the similarity classes of the annotations, pulling closer the features of the same-class samples and pushing away the different-class samples. Its formula is:

[0068]

[0069] where P(i) represents the set of positive samples of the same class as sample i, and sim(z i , z j ) is the cosine similarity between the feature vectors z i and z j ; τ is the temperature coefficient that controls the sharpness of the feature distribution; C is the clustering compactness index, such as the average of the intra-cluster sample distances.

[0070] Divide the dataset S into the training set S train and the validation set S val , and train on the training set. Use the Adam optimizer to iteratively update the model parameters according to the loss function L. The number of iterations is denoted as T. In each iteration, the training set is input into the model in the form of mini-batch data (the batch size is denoted as B) for forward propagation and backpropagation calculations to update the parameters. Evaluate the model performance on the validation set S val , such as judging the clustering effect of the model by calculating metrics such as the silhouette coefficient and the adjusted Rand index (ARI). When the performance metrics on the validation set do not improve for M consecutive iterations, stop training.

[0071] Furthermore, the construction method of the positive sample pairs of the supervised contrastive loss L contrastive is as follows: for each sample i, randomly select K pos samples from the same annotation class as the positive samples; the construction method of the negative sample pairs is: randomly select K neg samples from different annotation classes as the negative samples, and the value range of the temperature coefficient τ is set to 0.05 ≤ τ ≤ 0.5 0.05 ≤ τ ≤ 0.5.

[0072] Furthermore, the dynamic adjustment strategy of the trade-off coefficients λ1 and λ2 is: in the initial stage of training (the first T init iterations), set λ1 = 0.1 and λ2 = 0.1, and then gradually increase to λ1 = 1 and λ2 = 1 to balance the feature learning and the clustering optimization objective.

[0073] Step S3-2: Use the trained multi-head graph attention network to calculate the attention coefficients between the nodes in the heartbeat correlation graph structure to obtain an image embedding representation containing topological associations.

[0074] Use the trained multi-head graph attention network to perform graph attention mechanism correlation mining, that is, adopt the multi-head graph attention network GAT multi Calculate the attention coefficients between nodes. Specifically, the multi-head graph attention network GAT multi Contains 3 heads, the output dimension of each layer of GAT is 64, and the LeakyReLU(α = 0.2) activation function is used. The calculation formula of the attention coefficient between nodes is expressed as:

[0075]

[0076] Among them, α ij Represents the attention coefficient between node i and node j, h i And h j Represent the feature vectors of node i and node j respectively, W represents the trainable weight matrix, a T Represents the weight vector of the attention mechanism, N i Represents the set of neighbor nodes of node i, LeakyReLU() represents the activation function, h k Represents the feature vector of the kth neighbor node in the neighbor node set N i Among them.

[0077] Aggregate neighbor information through multiple layers of GAT (the number of layers is denoted as L) to generate an image embedding representation h' containing topological associations i ; Among them, GAT represents the graph attention mechanism (Graph Attention Networks). Generate an image embedding representation according to the aggregation of neighbor information by multiple layers of GAT. Specifically:

[0078] (1) Initialize node features. First, obtain the generated heartbeat association graph G=(V, E). Each heartbeat is used as a graph node v∈V, and the node features are initialized as the morphological feature vector Fm, which is denoted as the initial node feature vector That is Among them, i represents the ith node.

[0079] (2) Single-layer GAT calculation.

[0080] First, calculate the attention coefficients. For each layer l (l = 1, 2,..., L) of GAT, perform the calculation of the attention coefficient for ; Among them, Represents the attention coefficient between node i and its neighbor node j∈N i , and l represents the lth layer of GAT.

[0081] Subsequently, aggregate neighbor information: According to the calculated attention coefficient α ij , perform a weighted sum of the features of neighbor nodes to obtain the updated feature vector of the current node i at the lth layer That is:

[0082]

[0083] Among them, σ is an activation function (such as ReLU, etc.), which is used to perform a non-linear transformation on the aggregated features.

[0084] (3) Stacking multiple layers of GAT: Repeat the steps of single-layer GAT calculation. From the first layer to the l-th layer, as the number of layers increases, the node features are continuously updated, and the features of each node gradually contain the information of neighbor nodes at farther distances, thereby capturing the heartbeat topological structure and the associations between nodes.

[0085] Obtain the final embedding representation: After l layers of GAT calculation, the feature vector of the node is finally obtained which is the embedding representation containing topological associations Through such multi-layer GAT calculations, the embedding representation of each node not only contains its own feature information but also aggregates the association relationships from the neighbor node heartbeats, providing a rich and more discriminative feature representation for subsequent tasks such as heartbeat clustering.

[0086] Step S4: Concatenate the obtained morphological features with the image embedding representation to generate an enhanced feature vector; perform clustering on the enhanced feature vector based on the spectral clustering algorithm; perform post-processing operations on the obtained clustering results to generate heartbeat templates containing different categories.

[0087] First, concatenate the obtained morphological feature F m with the image embedding representation h' i to generate an enhanced feature vector F enhanced = [F m , h' i .

[0088] Subsequently, perform clustering on the enhanced feature vector based on the spectral clustering algorithm, including: presetting the neighborhood radius ∈ of the core point and the minimum number of points MinPts; then, perform clustering based on the enhanced feature F enhanced and adaptively determine the number of clustering clusters K in combination with the silhouette coefficient S i . The formula for the silhouette coefficient is where a i is the average distance from sample i to other samples in the same cluster, and b i is the average distance from sample i to the nearest sample in a different cluster. As an optional embodiment, the spectral clustering parameters are set as: neighborhood radius ε = 0.3σ (σ is the standard deviation of the enhanced feature), minimum number of points MinPts = 5, and the determination strategy for the number of clusters K is to combine the silhouette coefficient S iand the elbow rule. Among them, the elbow rule is an empirical method for determining the optimal number of clusters for a clustering algorithm. Its core idea is to find the "inflection point" of the error reduction trend by analyzing the change law of the total clustering error (such as the sum of squared distances from samples to cluster centers) corresponding to different cluster numbers k. The specific steps are: (1) Draw the error-cluster number curve: the horizontal axis is the number of clusters k, and the vertical axis is the total error (inertia value); (2) Identify the elbow point: when k increases to the actual number of clusters, the error reduction rate will slow down significantly, forming an inflection point similar to the elbow of an arm; (3) Select the elbow point k value: this point represents the critical value for maximizing the marginal effect of increasing the number of clusters.

[0089] Furthermore, the enhanced feature vectors are clustered based on the spectral clustering algorithm. Specifically, the set of enhanced features is firstly taken out. Each vector corresponds to the feature representation of a heartbeat sample after feature fusion; then setF enjanced The data are input into the standardized spectral clustering method, namely: constructing a similarity matrix, calculating the degree matrix and the Laplace matrix, solving the eigenvalues ​​and eigenvectors of the Laplace matrix, constructing a new feature matrix, normalizing the new feature matrix, calculating the silhouette coefficient, adaptively determining the number of clusters K, performing post-processing based on the core points and neighborhood radius, and obtaining the optimized clustering results. The cluster to which each heartbeat sample belongs is clarified, and the noise clusters are excluded, providing a basis for the subsequent generation of heartbeat templates of various categories.

[0090] Finally, the clustering results are post-processed to generate heartbeat templates containing different categories. Specifically, the size threshold of the noise cluster is set to N. threshold , remove small-scale clusters whose sample number is less than the set size threshold to generate heartbeat templates containing different categories. In the post-processing and template generation steps, the noise cluster is also a small-scale cluster, and the size threshold N of the small-scale cluster is threshold It can be set according to actual conditions (such as the scale of heart beat data and the expected effect of clustering, etc.).

[0091] Based on the above design of the present invention, on the one hand, doctors can batch-diagnose each current cluster through templates. The heartbeat templates of different categories provide standardized reference examples for doctors. When faced with a large amount of electrocardiogram data, doctors do not need to analyze each heartbeat in detail one by one. They only need to quickly compare the patient's heartbeat with these typical templates to quickly determine whether the heartbeat is normal and what type of abnormality it belongs to, greatly shortening the diagnosis time. Especially when dealing with emergency or batch screening cases, the efficiency is significantly improved, and the diagnosis efficiency can be greatly enhanced. On the other hand, in the scenario of heartbeat classification, there are many misdiagnoses in the heartbeat classification algorithm. The present invention can also batch-modify through the clustered templates to improve the efficiency. In addition, the heartbeat templates can help doctors confirm those subtle but key waveform feature differences, so as to make a correct diagnosis, avoid unnecessary treatment risks brought to patients due to misdiagnosis, and also relieve the risk of inaccurate heartbeat classification algorithms. In addition, it should be noted that the heartbeat clustering algorithm provided by the present invention is not the same as the heartbeat classification algorithm, and the existing heartbeat clustering methods only focus on the heartbeat morphology, regarding heartbeats with similar morphology as a cluster, ignoring the fact that the association before and after heartbeats will make the clustering results incomplete.

[0092] Embodiment 2

[0093] This embodiment discloses a heartbeat clustering system enhanced based on graph association mining.

[0094] A heartbeat clustering system enhanced based on graph association mining, comprising:

[0095] A data acquisition module, configured to: collect the electrocardiogram data of multiple patients to form an electrocardiogram signal sample set;

[0096] A heartbeat association graph structure construction module, configured to: extract the heartbeat features of the electrocardiogram signal sample set and construct a heartbeat association graph structure; wherein, the heartbeat features include morphological features and time-domain features;

[0097] A model training module, configured to: train a multi-head graph attention network;

[0098] A graph attention mechanism association mining module, configured to: use the trained multi-head graph attention network to calculate the attention coefficients between nodes in the heartbeat association graph structure to obtain an image embedding representation containing topological associations;

[0099] A feature fusion and clustering module, configured to: splice the obtained morphological features and the image embedding representation to generate an enhanced feature vector; perform clustering on the enhanced feature vector based on the spectral clustering algorithm;

[0100] A template generation module, configured to: perform post-processing operations on the obtained clustering results to generate heartbeat templates containing different categories.

[0101] Embodiment III

[0102] The purpose of this embodiment is to provide a computer-readable storage medium.

[0103] A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the steps in a heartbeat clustering method enhanced based on graph association mining as described in Embodiment I of the present disclosure.

[0104] Embodiment IV

[0105] The purpose of this embodiment is to provide an electronic device.

[0106] An electronic device, including a memory, a processor, and a program stored on the memory and executable on the processor, and when the processor executes the program, it implements the steps in a heartbeat clustering method enhanced based on graph association mining as described in Embodiment I of the present disclosure.

[0107] The steps involved in the devices in the above Embodiments II, III, and IV correspond to those in Method Embodiment I. For specific implementation manners, reference may be made to the relevant description part of Embodiment I. The term "computer-readable storage medium" should be understood to include a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode, or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.

[0108] Those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general computer device. Optionally, they can be implemented by program codes executable by a computing device, so that they can be stored in a storage device for execution by the computing device, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

[0109] Although the specific implementation manners of the present invention have been described above in conjunction with the accompanying drawings, it is not a limitation to the protection scope of the present invention. Those skilled in the art should understand that, based on the technical solutions of the present invention, various modifications or deformations that can be made without creative efforts by those skilled in the art are still within the protection scope of the present invention.

Claims

1. A heartbeat clustering method enhanced based on graph association mining, characterized in that, Including: Collecting electrocardiogram (ECG) data of multiple patients to form an ECG signal sample set; Extracting the heartbeat features of the ECG signal sample set and constructing a heartbeat correlation graph structure; wherein, the heartbeat features include morphological features and time-domain features; Training a multi-head graph attention network; calculating the attention coefficients between nodes in the heartbeat correlation graph structure by using the trained multi-head graph attention network to obtain an image embedding representation containing topological correlations; Concatenating the obtained morphological features with the image embedding representation to generate an enhanced feature vector; clustering the enhanced feature vector based on the spectral clustering algorithm; performing a post-processing operation on the obtained clustering result to generate heartbeat templates containing different categories.

2. The heartbeat clustering method based on graph association mining enhancement according to claim 1, characterized in that Extracting the heartbeat features of the ECG signal sample set includes: first, segmenting the ECG signal sample set, and each segment is used as an independent single heartbeat segment; subsequently, simultaneously extracting the morphological features and time-domain features of each single heartbeat segment.

3. The heartbeat clustering method based on graph association mining enhancement according to claim 1, wherein Constructing a heartbeat correlation graph structure includes: taking each heartbeat point in the single heartbeat segment as a graph node, and constructing an initial edge according to the heartbeat characteristics of each heartbeat point; generating a heartbeat correlation graph structure based on the graph nodes and the initial edges.

4. The heartbeat clustering method based on graph association mining enhancement according to claim 1, wherein Training a multi-head graph attention network includes: initializing the trainable parameters of the multi-head graph attention network; constructing a loss function based on the supervised contrastive loss, combined with the compactness and separability metrics of clustering; training the multi-head graph attention network based on the constructed loss function.

5. The enhanced heartbeat clustering method based on graph association mining as described in claim 1, characterized in that, The calculation formula of the attention coefficient between nodes is expressed as: Among them, α ij represents the attention coefficient between node i and node j, h i and h j represent the feature vectors of node i and node j respectively, W represents the trainable weight matrix, a T represents the weight vector of the attention mechanism, N i represents the set of neighbor nodes of node i, LeakyReLU() represents the activation function, h k represents the feature vector of the k-th neighbor node in the set of neighbor nodes N i .

6. The heartbeat clustering method based on graph association mining enhancement according to claim 1, wherein Clustering the enhanced feature vector based on the spectral clustering algorithm includes: first, presetting the neighborhood radius and minimum number of points of the core points; subsequently, adaptively determining the number of clustering clusters based on the silhouette coefficient.

7. The heartbeat clustering method based on graph association mining enhancement as described in claim 1, wherein Performing a post-processing operation on the obtained clustering result to generate heartbeat templates containing different categories includes: setting a scale threshold for the noise cluster, and removing small-scale clusters with the number of samples less than the set scale threshold to generate heartbeat templates containing different categories.

8. An enhanced heartbeat clustering system based on graph association mining, characterized in that, Including: A data acquisition module configured to: collect ECG data of multiple patients to form an ECG signal sample set; A heartbeat correlation graph structure construction module configured to: extract the heartbeat features of the ECG signal sample set and construct a heartbeat correlation graph structure; wherein, the heartbeat features include morphological features and time-domain features; A model training module configured to: train a multi-head graph attention network; A graph attention mechanism correlation mining module configured to: calculate the attention coefficients between nodes in the heartbeat correlation graph structure by using the trained multi-head graph attention network to obtain an image embedding representation containing topological correlations; A feature fusion and clustering module configured to: concatenate the obtained morphological features with the image embedding representation to generate an enhanced feature vector; cluster the enhanced feature vector based on the spectral clustering algorithm; A template generation module configured to: perform a post-processing operation on the obtained clustering result to generate heartbeat templates containing different categories.

9. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps in a heartbeat clustering method based on graph correlation mining enhancement as described in any one of claims 1-7.

10. An electronic device, comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that When the processor executes the program, it implements the steps in a heartbeat clustering method based on graph correlation mining enhancement as described in any one of claims 1-7.