Electrocardiogram diagnosis result generation method and system based on electrocardiogram waveform feature description characters

By using a deep learning model based on a Transformer encoder, combined with an ECG database and keyword matching, ECG diagnostic results are generated, solving the problem of combining flexibility and clinical feature description in existing systems, and achieving a more flexible and intuitive display of diagnostic results.

CN120892552APending Publication Date: 2025-11-04GUANGZHOU XINYU HEALTH TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510928058.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

Existing ECG diagnostic result generation systems lack flexibility and integration with clinical feature descriptions, leading to misdiagnosis or missed diagnosis, and the results are not presented intuitively or easily understood.

Method used

A deep learning model based on the Transformer encoder structure is used to generate diagnostic results by describing text based on ECG waveform features. Keyword extraction and matching are performed using an ECG database to output clear diagnostic evidence and explanations.

Benefits of technology

It improves the system's flexibility and clinical adaptability, enabling it to better handle diverse cases, provide clear diagnostic evidence and interpretation, and enhance the trust of clinical users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120892552A_ABST
    Figure CN120892552A_ABST
Patent Text Reader

Abstract

The invention discloses an electrocardiogram diagnosis result generation method and system based on electrocardiogram waveform feature description characters, and the electrocardiogram diagnosis result generation method based on the electrocardiogram waveform feature description characters is formed by obtaining corresponding diagnosis results through three steps according to the feature description characters. Compared with the prior art, the method has the beneficial effects that 1, a real electrocardio database with a high clinical basis is constructed; and 2, keyword extraction is carried out on the electrocardiogram waveform feature description characters in a deep learning mode, and a dynamic matching mode is utilized to link with a preset electrocardiogram database, so that the output of the system is a classification label, and clear diagnosis basis and explanation can be provided. And 3, the problem of'black box 'property of a deep learning model is solved, so that a user can clearly know how to obtain a diagnosis conclusion, and can more flexibly process variable cases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical signal processing and biomedical engineering technology, and in particular to a method and system for generating electrocardiogram diagnostic results based on textual descriptions of electrocardiogram waveform features. Background Technology

[0002] Numerous ECG diagnostic result generation systems have emerged, categorized into three types. The first type is based on traditional signal processing and pattern recognition. These systems typically rely on traditional signal processing methods, such as filtering, feature extraction of P waves, QRS complexes, and T wave time-domain features, template matching, etc., combined with pattern recognition algorithms, such as support vector machines and decision trees, to analyze ECG signals. The system determines whether certain cardiac symptoms are present based on set thresholds. The second type is based on deep learning ECG diagnostic systems. These systems utilize learning techniques, particularly convolutional neural networks (CNNs) and recurrent neural networks (RNNs), and have achieved good results in ECG signal classification. These systems extract features from raw signals through automated learning, without relying on manually designed features. The third type is based on rule-based or expert systems for ECG diagnosis. Traditional expert systems use predefined rules and knowledge bases to diagnose ECGs; these rules are based on the experience of medical experts. Such systems can provide some diagnostic support but typically depend on the completeness of the rule base.

[0003] However, current ECG diagnostic result generation systems still have the following shortcomings: 1. Lack of flexible matching of feature descriptions: Although existing systems can extract features from ECG signals, they often only classify or match based on fixed features or models, lacking flexibility. For example, traditional rule-based systems rely on hard-coded rules and cannot adapt to different ECG signal feature descriptions or new disease types. This is because traditional signal processing and pattern recognition methods lack the ability to comprehensively identify and match dynamic ECG features, and cannot fully consider the unique physiological state or ECG changes of each patient. Although deep learning methods have better automatic feature extraction capabilities, they are often "black box" models, making it difficult to explain their internal decision-making processes. 2. Inability to effectively combine clinical feature descriptions: Existing systems usually focus on extracting features from the signal level and classifying based on these features, while ignoring feature descriptions related to actual clinical diagnosis, such as patient history and symptoms. This makes the system prone to misdiagnosis or missed diagnosis when faced with complex cases. This is because the feature extraction process of existing technologies is mainly based on data-driven approaches, lacking consideration of diagnostic text descriptions or clinical symptoms, which limits the system's intelligence and clinical adaptability. 3. Results are not intuitive or easy to understand: Existing ECG diagnostic systems typically output a classification result or diagnostic label, lacking the ability to combine the results with specific ECG features and waveform descriptions. Physicians often need extra time and effort to analyze and understand these outputs, impacting the efficiency of clinical applications. This is because many existing systems focus only on the accuracy of the results, neglecting how to effectively integrate diagnostic information with ECG features and waveform displays, thus affecting the interpretability of the results.

[0004] Therefore, it is essential to provide a method and system for generating electrocardiogram diagnostic results based on textual descriptions of electrocardiogram waveform features to address the shortcomings of existing technologies. Summary of the Invention

[0005] The primary objective of this invention is to overcome the shortcomings of existing technologies by providing a method for generating electrocardiogram (ECG) diagnostic results based on textual descriptions of ECG waveform features. This method addresses the "black box" nature of deep learning models and automatically generates diagnostic results.

[0006] The above-mentioned objectives of the present invention are achieved through the following technical measures:

[0007] A method for generating electrocardiogram (ECG) diagnostic results based on textual descriptions of ECG waveform features is provided, comprising the following steps:

[0008] S1. Input the feature description text of the electrocardiogram signal, wherein the feature description text contains descriptions of electrocardiogram parameters, heart rhythm and interpretation of waveform abnormalities;

[0009] S2. Extract keywords from the feature description text of S1 using the trained deep learning model, and obtain the overall semantic vector composed of all keywords.

[0010] S3. The keywords in S2 are matched with the pre-built ECG database using the trained deep learning model to obtain the diagnostic results; the ECG database consists of feature description texts of multiple ECG signals and the diagnostic results corresponding to the feature description texts.

[0011] In S3, matching is performed using cosine similarity.

[0012] In the ECG database, each diagnostic result has a predefined semantic prototype vector.

[0013] S3 is performed through the following steps:

[0014] S3.1, Define the overall semantic vector as z input , will z i Defined as the semantic prototype vector of the i-th diagnostic result in the ECG database;

[0015] S3.2, calculate z using equation (1) input and z i similarity (z input , z i ):

[0016]

[0017] S3.3, Using equation (2), the similarity (z) is calculated. input , z i Transform into a probability distribution P(disease) i |input):

[0018]

[0019] Where α is a set coefficient and is used to control the smoothness of the output probability distribution, z j This refers to the j-th semantic prototype vector in the electrocardiogram database.

[0020] S3.4 Arrange the probability distributions obtained in S3.3 from high to low, and output the first N probability distributions. The N probability distributions are the diagnostic results, where N is an integer greater than or equal to 1.

[0021] Preferably, the aforementioned deep learning model is a text semantic understanding model based on the Transformer encoder structure.

[0022] Preferably, the above deep learning model is configured as follows:

[0023] The Token and Position Embedding layer is used to encode each word in the feature description text into a semantic vector and add the position information corresponding to the word, thereby preserving the sequence structure.

[0024] The Transformer Encoder module is used to extract deep semantic features and output keywords, each keyword being a simplified semantic vector.

[0025] Global Average Pooling – performs a global average operation on all simplified semantic vectors, thereby organizing them into a single overall semantic vector;

[0026] The multilayer perceptron architecture matches the overall semantic vector with the semantic prototype vector in the electrocardiogram database, and finally outputs the diagnostic result.

[0027] Preferably, the Transformer Encoder module described above has two layers, and the two Transformer Encoder modules are connected in series.

[0028] Preferably, each of the above-mentioned ransformer Encoder modules is provided with a multi-head attention mechanism layer, an add&layer normalization layer, a feedforward neural network layer, and an add&norm layer, and the multi-head attention mechanism layer, the add&layer normalization layer, the feedforward neural network layer, and the add&norm layer are stacked from top to bottom, thereby extracting deep semantic features layer by layer.

[0029] Preferably, the above-mentioned multilayer perceptron structure consists of Dense and Dropout.

[0030] Preferably, the training process of the above deep learning model is as follows:

[0031] A1. Construct a dataset consisting of textual descriptions of electrocardiograms and corresponding disease labels;

[0032] A2. Input the dataset into the deep learning model and output the prediction results;

[0033] A3. Optimize the deep learning model with the probability distribution of A2 output and the corresponding disease label by using the cross-entropy loss function, and prevent overfitting by using regularization. Then determine whether it meets the early stop mechanism conditions. If it does not meet the conditions, proceed to A4; if it does meet the conditions, proceed to A5.

[0034] A4. Determine if the maximum number of training iterations has been reached. If yes, proceed to A5; otherwise, return to A2.

[0035] A5. Use the current deep learning model as the deep learning model after training.

[0036] The second objective of this invention is to overcome the shortcomings of existing technologies and provide an electrocardiogram (ECG) diagnostic result generation system based on textual descriptions of ECG waveform features. This ECG diagnostic result generation system can solve the "black box" problem of deep learning models and automatically generate diagnostic results. The above objectives of this invention are achieved through the following technical measures:

[0037] An electrocardiogram (ECG) diagnostic result generation system based on textual descriptions of ECG waveform features is provided, employing the aforementioned method for generating ECG diagnostic results based on textual descriptions of ECG waveform features.

[0038] The electrocardiogram diagnostic result generation system of the present invention includes:

[0039] Data input module – used to receive feature description text of electrocardiogram signals;

[0040] Storage module – used to store the ECG database;

[0041] Keyword extraction module – extracts keywords from the feature description text and generates a total semantic vector composed of all keywords;

[0042] The diagnosis result generation module matches the overall semantic vector with the ECG database and outputs the diagnosis result corresponding to the feature description text.

[0043] This invention discloses a method and system for generating electrocardiogram (ECG) diagnostic results based on ECG waveform feature description text. The method comprises the following steps: S1, inputting feature description text of the ECG signal, which includes ECG parameter descriptions, heart rhythm, and interpretation of waveform abnormalities; S2, extracting keywords from the feature description text of S1 using a trained deep learning model, and obtaining an overall semantic vector composed of all keywords; S3, matching the keywords of S2 with a pre-constructed ECG database using the trained deep learning model to obtain diagnostic results; the ECG database consists of feature description texts of multiple ECG signals and corresponding diagnostic results. Compared with existing technologies, the advantages of this invention are: 1. This invention pre-establishes a unique ECG database, collects feature description texts and corresponding diagnostic results, and constructs a highly clinically reliable ECG database. 2. This invention uses deep learning to extract keywords from the descriptive text of ECG waveform features and links it to a pre-set ECG database using dynamic matching. This ensures that the system's output not only includes classification labels but also provides clear diagnostic evidence and explanations, helping to improve the trust of clinical users and support diagnostic decision-making. 3. It solves the "black box" problem of deep learning models, allowing users to clearly understand how this invention arrives at diagnostic conclusions and to handle diverse cases more flexibly. This flexibility is lacking in existing fixed-feature or fixed-pattern recognition methods, enabling this invention to adapt to new or previously unencountered clinical situations. Attached Figure Description

[0044] The invention will be further described with reference to the accompanying drawings, but the contents of the drawings do not constitute any limitation on the invention.

[0045] Figure 1 This is a flowchart of a method for generating electrocardiogram (ECG) diagnostic results based on textual descriptions of ECG waveform features.

[0046] Figure 2 This is a structural diagram of a deep learning model. Detailed Implementation

[0047] The technical solution of the present invention will be further described in conjunction with the following embodiments.

[0048] Example 1

[0049] A method for generating electrocardiogram (ECG) diagnostic results based on textual descriptions of ECG waveform features, such as... Figure 1 As shown, the following steps are used:

[0050] S1. Input the feature description text of the electrocardiogram signal. The feature description text contains descriptions of electrocardiogram parameters, heart rhythm, and interpretation of waveform abnormalities.

[0051] S2. Extract keywords from the feature description text of S1 using the trained deep learning model, and obtain the overall semantic vector composed of all keywords.

[0052] S3. The keywords in S2 are matched with the pre-built ECG database using the trained deep learning model to obtain the diagnostic results. The ECG database consists of feature description texts of multiple ECG signals and the corresponding diagnostic results. Moreover, each diagnostic result in the ECG database has a predefined semantic prototype vector.

[0053] It should be noted that the feature description text of this invention is based on clinical rule-based description text, which includes descriptions of electrocardiogram (ECG) parameters, heart rhythm, and interpretation of waveform abnormalities, such as premature beats and atrial fibrillation. This feature description text is manually compiled; alternatively, it can be directly generated from ECG signal data using a deep learning model. In this embodiment, the feature description text is specifically manually compiled. Keywords in this invention include atrial tachycardia and PR interval shorter than RP interval.

[0054] Here are two examples of text with specific features:

[0055] Feature description text 1:

[0056] The electrocardiogram showed sinus rhythm with normal P wave amplitude, around 0.12 mV. However, the PR interval tended to be prolonged, approximately 0.21 s, slightly exceeding the normal range (0.12-0.20 s), which may indicate a mild atrioventricular conduction delay. The QRS complex duration was normal, and the heart rate was 78 beats / min, with an overall regular rhythm.

[0057] Extracted keywords: P wave normal, 0.12mV; PR prolonged, 0.21s.

[0058] Feature description text 2:

[0059] The electrocardiogram showed obvious premature ventricular contractions (PVCs), characterized by premature, wide, and bizarre QRS complexes with a duration of approximately 0.16 seconds, without any preceding P wave, and with a complete compensatory pause. Simultaneously, mild ST segment depression was observed in multiple leads, with amplitudes ranging from 0.05 to 0.10 mV, potentially indicating some degree of myocardial ischemia or damage.

[0060] Extracted keywords: normal QRS; heart rate 78; atrioventricular conduction delay.

[0061] In S3, matching is performed using cosine similarity.

[0062] Specifically, in S3, the following steps are taken:

[0063] S3.1, Define the overall semantic vector as z input , will z i Defined as the semantic prototype vector of the i-th diagnostic result in the ECG database;

[0064] S3.2, calculate z using equation (1) input and z i similarity (z input , z i ):

[0065]

[0066] S3.3, Using equation (2), the similarity (z) is calculated. input , z i Transform the condition into a probability distribution P(diseasei|input):

[0067]

[0068] Where α is a set coefficient and is used to control the smoothness of the output probability distribution, z j Let α be the j-th semantic prototype vector in the ECG database; where α can be any value such as 0.4, 0.4, 0.9, 0.95, etc., preferably 0.9 and 0.95.

[0069] S3.4 Arrange the probability distributions obtained in S3.3 from high to low, and output the first N probability distributions. The N probability distributions are the diagnostic results, where N is an integer greater than or equal to 1.

[0070] It should be noted that the present invention introduces the softmax function in order to transform similarity into a probability distribution.

[0071] For example, the overall semantic vector and the j-th semantic prototype vector in the ECG database are as follows:

[0072] z i =[0.5,0.5,0.7],z j = [0.48, 0.52, 0.69];

[0073] Similarity as follows

[0074]

[0075] Let the similarity of another negative sample be 0.45, α be 0.4, and the softmax score (positive sample vs. negative sample):

[0076] exp(sim pos / τ)=exp(0.999 / 0.4)≈15.69

[0077] exp(sim neg / τ)=exp(0.45 / 0.4)≈3.08

[0078] The probability distribution of the overall semantic vector is as follows:

[0079]

[0080] The deep learning model of this invention is a text semantic understanding model based on the Transformer encoder structure. Wherein, as... Figure 2 As shown, the deep learning model is configured as follows:

[0081] The Token and Position Embedding layer is used to encode each word in the feature description text into a semantic vector and add the position information corresponding to the word, thereby preserving the sequence structure.

[0082] The Transformer Encoder module is used to extract deep semantic features and output keywords, each keyword being a simplified semantic vector.

[0083] Global Average Pooling – performs a global average operation on all simplified semantic vectors, thereby organizing them into a single overall semantic vector;

[0084] Multilayer perceptron architecture—matches the overall semantic vector with semantic prototype vectors in the electrocardiogram database, and finally outputs the diagnostic results.

[0085] The Transformer Encoder module consists of two layers, connected in series. Each Transformer Encoder layer includes a Multi-Head Attention layer, an Add & Layer Normalization layer, a Feed Forward neural network layer, and an Add & Norm layer. These layers are stacked from top to bottom to extract deep semantic features layer by layer. The multilayer perceptron structure of this invention consists of Dense and Dropout.

[0086] The training process of the deep learning model of this invention is as follows:

[0087] A1. Construct a dataset consisting of textual descriptions of electrocardiograms and corresponding disease labels;

[0088] A2. Input the dataset into the deep learning model and output the prediction results;

[0089] A3 calculates the loss value between the prediction result output by A2 and the corresponding disease label using the joint loss of cross-entropy loss and cosine similarity comparison loss, and calculates the accuracy between the prediction result and the disease label. The deep learning model is optimized using the loss value. Regularization is used to randomly discard the activation output of some neurons in the neural network to prevent overfitting. Finally, it is determined whether the early stopping mechanism condition is met. If it is not met, proceed to A4; if it is met, proceed to A5. The regularization method is Dropou. The Adam optimizer is used to optimize the deep learning model. The early stopping mechanism condition is to compare the loss value and accuracy of the most recent training rounds to determine whether there has been improvement. That is, if there is no improvement, the early stopping mechanism condition is met and proceed to A5; if there is no improvement, proceed to A4. This embodiment takes the most recent 3 training rounds as an example.

[0090] A4. Determine if the maximum number of training iterations has been reached. If yes, proceed to A5; otherwise, return to A2.

[0091] A4. Determine whether the maximum number of training iterations has been reached. If yes, proceed to A5; otherwise, return to A2. The maximum number of training iterations is any positive integer, such as 10, 20, 50, 100, 200, etc. In this embodiment, it is 100.

[0092] A5. Use the current deep learning model as the deep learning model after training.

[0093] It should be noted that the loss function used in this invention is the cross-entropy loss function and the cosine similarity comparison loss function, which are used to enhance semantic alignment capabilities.

[0094] The beneficial effects of this ECG diagnostic result generation method based on ECG waveform feature description text are as follows: 1. This invention pre-establishes a unique ECG database, collects feature description text and corresponding diagnostic results, and constructs a highly clinically reliable ECG database. 2. This invention uses deep learning to extract keywords from ECG waveform feature description text and links it to the pre-set ECG database using dynamic matching. This ensures that the system's output not only includes classification labels but also provides clear diagnostic evidence and explanations, helping to improve the trust of clinical users and support diagnostic decision-making. 3. It solves the "black box" problem of deep learning models, allowing users to clearly understand how this invention arrives at diagnostic conclusions and to handle varied cases more flexibly. This flexibility is lacking in existing fixed feature or fixed pattern recognition methods, enabling this invention to adapt to new or previously unencountered clinical situations.

[0095] Example 2

[0096] An electrocardiogram (ECG) diagnostic result generation system based on textual descriptions of ECG waveform features is provided, which adopts the ECG diagnostic result generation method based on textual descriptions of ECG waveform features described in Example 1.

[0097] The ECG diagnostic result generation system is configured with the following:

[0098] The settings are as follows:

[0099] Data input module – used to receive feature description text of electrocardiogram signals;

[0100] Storage module – used to store the ECG database;

[0101] Keyword extraction module – extracts keywords from the feature description text and generates a total semantic vector composed of all keywords;

[0102] The diagnosis result generation module matches the overall semantic vector with the ECG database and outputs the diagnosis result corresponding to the feature description text.

[0103] The beneficial effects of this ECG diagnostic result generation system are as follows: 1. This invention pre-establishes a unique ECG database, collects feature description text and corresponding diagnostic results, and constructs a highly clinically reliable ECG database. 2. This invention uses deep learning to extract keywords from ECG waveform feature description text and links it to the pre-set ECG database using dynamic matching. This ensures that the system's output not only includes classification labels but also provides clear diagnostic evidence and explanations, helping to improve the trust of clinical users and support diagnostic decision-making. 3. It solves the "black box" problem of deep learning models, allowing users to clearly understand how this invention arrives at diagnostic conclusions and to handle varied cases more flexibly. This flexibility is lacking in existing fixed feature or fixed pattern recognition methods, enabling this invention to adapt to new or previously unencountered clinical situations.

[0104] Example 3

[0105] A method for generating electrocardiogram diagnostic results based on electrocardiogram waveform feature description text, with other features being the same as in Example 1: In this example, the feature description text is directly generated from electrocardiogram signal data through a deep learning model.

[0106] The specific details of feature description text generation are as follows:

[0107] S1. Acquire electrocardiogram (ECG) signal data;

[0108] S2. Extract ECG feature parameters corresponding to each key waveform in the ECG signal data through the trained key waveform recognition model; wherein, the key waveform recognition model is a ResNet residual network with added self-attention mechanism;

[0109] S3. In the pre-built feature description library, the ECG feature parameters of each key waveform in S2 are mapped to obtain a separate feature description corresponding to each key waveform.

[0110] S4. The ECG feature parameters corresponding to each key waveform obtained in S2 are compared with the corresponding preset thresholds to determine whether there are any abnormalities in the ECG feature parameters and to obtain the abnormality detection results corresponding to each key waveform.

[0111] S5. Analyze the individual feature descriptions of each key waveform obtained in S3 and the anomaly detection results of each key waveform in S4 to obtain the complete feature description text. The complete feature description text here is the feature description text mentioned in Example 1.

[0112] The training process for the key waveform recognition model is as follows:

[0113] A1. Collect historical electrocardiogram (ECG) data. The historical ECG data consists of multiple ECGs of patients with heart disease and multiple ECGs of patients with normal heart disease. Both ECGs of patients with heart disease and ECGs of patients with normal heart disease are labeled and have feature description text. The feature description text is used as a label.

[0114] A2. Preprocess the historical electrocardiogram data of A1, and the preprocessing includes at least one of filtering and denoising, waveform segmentation or feature extraction;

[0115] A3. Input the preprocessed historical ECG data and corresponding labels from A2 into the key waveform recognition model, and output the individual feature descriptions of each key waveform.

[0116] A4. Optimize the key waveform recognition model by combining the individual feature descriptions and corresponding labels of A3 with ten-fold cross-validation. Determine if the maximum number of training iterations has been reached. If yes, proceed to A5; otherwise, return to A3.

[0117] A5. Use the current key waveform recognition model as the key waveform recognition model after training.

[0118] The key waveform recognition model extraction process is divided into three stages from beginning to end: feature extraction, feature enhancement, and Add and ReLU fusion. In the feature extraction stage, the Conv-BN-ReLU module of the ResNet extracts local temporal features, followed by the Conv-BN module to extract higher-order features. The input is then added to the main branch output via the residual connection module in the ResNet, thus preserving the original low-level temporal features, such as the precise position of the waveform's rising edge, thereby improving training stability and preventing deep degradation. In the Add and ReLU fusion stage, the Attention output of the ResNet is fused with the main branch output, enabling the key waveform recognition model to simultaneously extract waveform features and temporal features, resulting in more accurate predictions. In the feature enhancement stage, a self-attention mechanism is used, modeling the global temporal dependencies within the signal, especially the relative positions between different waveforms (e.g., the T-wave often appears after the R-wave).

[0119] It should be noted that the key waveform recognition model identification steps are as follows:

[0120] 1. Using the waveform recognition algorithm in the key waveform recognition model, key waveforms in the electrocardiogram, such as P wave, QRS wave, T wave, F wave, f wave, U wave, delta wave, etc., are identified.

[0121] 2. After identifying the key waveforms, the feature parameters of these waveforms, such as amplitude, duration, and waveform shape, are further extracted using the feature value algorithm in the key waveform identification model.

[0122] 3. Accurate parameter values, such as heart rate, PR interval, and QT interval, are calculated using electrophysiological parameters. These parameters are typically calculated based on standard electrocardiogram (ECG) measurement methods.

[0123] The feature description library of the present invention is constructed based on electrocardiogram (ECG) spectra, and the feature description library consists of multiple ECG feature description templates. Each ECG feature description template includes a feature description and a corresponding parameter threshold range. The ECG feature description templates are feature templates for key waveforms and feature templates between key waveforms.

[0124] In this embodiment, S3 specifically searches for ECG feature description templates that meet the parameter threshold range in the feature description library based on the ECG feature parameters of each key waveform in S2. Then, it determines the individual feature description corresponding to each key waveform based on the found ECG feature description templates. Some feature description templates are shown below.

[0125] Feature description template 1: The feature description is that the P-wave amplitude is normal, the parameter threshold range is the amplitude threshold range, and it is 0.05-0.25mV.

[0126] Feature description template 2: The feature description is a decrease in P-wave amplitude, and the parameter threshold range is the amplitude threshold range, which is <0.05mV.

[0127] Specifically, S5 analyzes the individual feature descriptions of each key waveform obtained in S3 and the anomaly detection results of each key waveform in S4 using a trained supervised learning model to obtain complete feature description text. The supervised learning model is either a support vector machine or a convolutional neural network.

[0128] The training process of the supervised learning model of the present invention is as follows:

[0129] B1. Collect historical electrocardiogram (ECG) data. The historical ECG data consists of multiple ECGs of patients with heart disease and multiple ECGs of patients with normal heart disease. Both ECGs of patients with heart disease and ECGs of patients with normal heart disease have been labeled and their complete feature description texts have been compiled. The complete feature description texts are used as tags.

[0130] B2. Preprocess the historical electrocardiogram data of A1, and the preprocessing includes at least one of filtering and denoising, waveform segmentation or feature extraction;

[0131] B3. Input the preprocessed historical electrocardiogram data from B2 and the corresponding labels into the supervised learning model, and output the feature description text.

[0132] B4. Optimize the supervised learning model with the complete feature description text and corresponding labels in B3 through cross-validation. Determine whether the maximum number of training iterations has been reached. If yes, proceed to B5; otherwise, return to B3.

[0133] B5. Use the current supervised learning model as the supervised learning model after training.

[0134] Compared with Example 1, this example increases the diversity of feature description text sources.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the essence and scope of the technical solutions of the present invention.

Claims

1. A method for generating electrocardiogram (ECG) diagnostic results based on textual descriptions of ECG waveform features, characterized in that, The following steps are to be taken: S1. Input the feature description text of the electrocardiogram signal, wherein the feature description text contains descriptions of electrocardiogram parameters, heart rhythm and interpretation of waveform abnormalities; S2. Extract keywords from the feature description text of S1 using the trained deep learning model, and obtain the overall semantic vector composed of all keywords. S3. The keywords in S2 are matched with the pre-built ECG database using the trained deep learning model to obtain the diagnostic results; the ECG database consists of feature description texts of multiple ECG signals and the diagnostic results corresponding to the feature description texts.

2. The method for generating electrocardiogram diagnostic results based on textual descriptions of electrocardiogram waveform features according to claim 1, characterized in that: In S3, matching is performed using cosine similarity.

3. The method for generating electrocardiogram diagnostic results based on textual descriptions of electrocardiogram waveform features according to claim 2, characterized in that: In the ECG database, each diagnostic result has a predefined semantic prototype vector.

4. The method for generating electrocardiogram diagnostic results based on textual descriptions of electrocardiogram waveform features according to claim 3, characterized in that, S3 is performed through the following steps: S3.1, Define the overall semantic vector as z input , will z i Defined as the semantic prototype vector of the i-th diagnostic result in the ECG database; S3.2, calculate z using equation (1) input and z i similarity (z input , z i ): S3.3, Using equation (2), the similarity (z) is calculated. input , z i Transform into a probability distribution P(disease) i |input): Where α is a set coefficient and is used to control the smoothness of the output probability distribution, z j This refers to the j-th semantic prototype vector in the electrocardiogram database. S3.4 Arrange the probability distributions obtained in S3.3 from high to low, and output the first N probability distributions. The N probability distributions are the diagnostic results, where N is an integer greater than or equal to 1.

5. The method for generating electrocardiogram diagnostic results based on textual descriptions of electrocardiogram waveform features according to any one of claims 1 to 4, characterized in that: The deep learning model is a text semantic understanding model based on the Transformer encoder structure.

6. The method for generating electrocardiogram diagnostic results based on textual descriptions of electrocardiogram waveform features according to claim 5, characterized in that, The deep learning model is configured with: The Token and Position Embedding layer is used to encode each word in the feature description text into a semantic vector and add the position information corresponding to the word, thereby preserving the sequence structure. The Transformer Encoder module is used to extract deep semantic features and output keywords, each keyword being a simplified semantic vector. Global Average Pooling – performs a global average operation on all simplified semantic vectors, thereby organizing them into a single overall semantic vector; The multilayer perceptron architecture matches the overall semantic vector with the semantic prototype vector in the electrocardiogram database, and finally outputs the diagnostic result.

7. The method for generating electrocardiogram diagnostic results based on textual descriptions of electrocardiogram waveform features according to claim 6, characterized in that, The Transformer Encoder module has two layers, and the two layers of Transformer Encoder modules are connected in series.

8. The method for generating electrocardiogram diagnostic results based on textual descriptions of electrocardiogram waveform features according to claim 7, characterized in that: Each Ransformer Encoder module has a multi-head attention mechanism layer, an add & layer normalization layer, a feedforward neural network layer, and an add & normalization layer. The multi-head attention mechanism layer, the add & layer normalization layer, the feedforward neural network layer, and the add & normalization layer are stacked from top to bottom to extract deep semantic features layer by layer. The multilayer perceptron structure consists of Dense and Dropout.

9. The method for generating electrocardiogram diagnostic results based on textual descriptions of electrocardiogram waveform features according to any one of claims 1 to 4, characterized in that: The training process of the deep learning model is as follows: A1. Construct a dataset consisting of textual descriptions of electrocardiograms and corresponding disease labels; A2. Input the dataset into the deep learning model and output the prediction results; A3. Calculate the loss value between the prediction result output by A2 and the corresponding disease label using the joint loss of cross-entropy loss and cosine similarity comparison loss, and calculate the accuracy between the prediction result and the disease label. Optimize the deep learning model using the loss value. Prevent overfitting by randomly discarding the activation output of some neurons in the neural network through regularization. Finally, determine whether the early stopping mechanism conditions are met. If not, proceed to A4; if so, proceed to A5. A4. Determine if the maximum number of training iterations has been reached. If yes, proceed to A5; otherwise, return to A2. A5. Use the current deep learning model as the deep learning model after training.

10. A system for generating electrocardiogram (ECG) diagnostic results based on textual descriptions of ECG waveform features, characterized in that: The method for generating electrocardiogram diagnostic results based on textual descriptions of electrocardiogram waveform features as described in any one of claims 1 to 9 is used. The settings are as follows: Data input module – used to receive feature description text of electrocardiogram signals; Storage module – used to store the ECG database; Keyword extraction module – extracts keywords from the feature description text and generates a total semantic vector composed of all keywords; The diagnosis result generation module matches the overall semantic vector with the ECG database and outputs the diagnosis result corresponding to the feature description text.