An electrocardiogram diagnosis method, device, medium and program product
By combining algorithms such as weighted cosine similarity, LSTM time-series prediction, and waveform feature verification, the problem of existing ECG AI diagnostic systems being unable to identify new problems has been solved, enabling accurate judgment and classification of new abnormalities and improving the accuracy and safety of ECG diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 纳龙健康科技股份有限公司
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-19
AI Technical Summary
Existing ECG AI diagnostic systems cannot distinguish between newly occurring ECG abnormalities and existing chronic abnormalities, leading to an increased risk of misdiagnosis and missed diagnosis, which affects the accuracy and safety of diagnosis.
By acquiring the AI diagnostic conclusions of the current patient's electrocardiogram and historical doctor's diagnostic data, a weighted cosine similarity algorithm and an LSTM time series prediction model are used, combined with a waveform feature verification algorithm, to identify newly emerging problems. A DQN reinforcement learning model is constructed to optimize process parameters, and an XGBoost model is introduced for result fusion to achieve accurate identification and classification of newly emerging problems.
It significantly improved the accuracy of identifying new problems, reduced the false positive rate, optimized the adaptability and response time of process triggering, and enhanced the accuracy and safety of electrocardiogram diagnosis.
Smart Images

Figure CN122245710A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrocardiogram (ECG) diagnostic technology, and in particular to an ECG diagnostic method, device, medium, and program product. Background Technology
[0002] Electrocardiogram (ECG) diagnosis is a core component of cardiovascular disease screening and treatment. With the development of artificial intelligence (AI) technology, AI-based ECG diagnostic systems have been widely applied in clinical practice, automatically identifying various abnormalities such as ST-segment elevation and bundle branch block. However, existing AI diagnostic systems only analyze data from a single examination, outputting the abnormality type and its confidence level, without establishing a mechanism for comparison with the patient's historical diagnostic records. This makes it impossible to distinguish whether the abnormality is a newly occurring problem or a pre-existing chronic abnormality. This deficiency leads to inaccurate clinical process triggering: on the one hand, chronic abnormalities are misjudged as new problems, triggering unnecessary emergency procedures and wasting medical resources; on the other hand, genuinely new problems fail to trigger warnings because they are not identified, increasing the risk of missed diagnoses and directly affecting the accuracy and clinical safety of ECG diagnosis. Summary of the Invention
[0003] Embodiments of the present invention provide an electrocardiogram (ECG) diagnostic method, device, medium, and program product, which aim to solve the problem that the existing technology is unable to identify new problems by comparing historical diagnostic records, resulting in a decline in the accuracy and safety of ECG diagnosis.
[0004] To achieve the above objectives, in a first aspect, the present invention provides an electrocardiogram (ECG) diagnostic method, comprising the following steps: Obtain the AI diagnosis conclusion of the current patient's electrocardiogram and retrieve the patient's historical doctor diagnosis data; The AI diagnostic conclusion and the historical doctor's diagnostic data are extracted using a predetermined text comparison algorithm, and the similarity between the two entities is compared using a weighted cosine similarity algorithm. When the similarity is lower than the preset similarity threshold, it is preliminarily determined that a new problem has occurred, and the next step of judgment is carried out; the new problem refers to the first appearance or significant progression of ECG abnormalities in the patient's current ECG examination compared with historical doctor's diagnosis data; Extract the quantitative indicators and timestamps of the predetermined abnormality types from the historical doctor diagnosis data and input them into a pre-trained LSTM time series prediction model to predict the theoretical value of no new problems of the abnormality type at the current time. The first deviation between the actual value and the theoretical value of the quantitative indicator of the abnormality type in the current AI diagnostic conclusion is calculated; simultaneously, the second deviation between the actual value and the quantitative indicator value in historical doctor diagnostic data is calculated. When both the first deviation and the second deviation exceed their respective preset deviation thresholds, it is determined that a new problem has occurred.
[0005] Furthermore, the step of extracting entities from the AI diagnostic conclusion and the historical doctor's diagnostic data using a predetermined text comparison algorithm includes the following steps: A Transformer-based pre-trained language model is used to semantically encode the text of the AI diagnostic conclusion and the historical doctor's diagnostic data to obtain the deep feature representation of the text; The deep feature representation is input into a bidirectional long short-term memory network (BiLSTM) for sequence context modeling, and the long-distance dependencies between anomaly types, leads, and quantization metrics in the text are output. The output sequence of the bidirectional long short-term memory network is input into a predetermined conditional random field (CRF) layer, decoded to generate the optimal entity label sequence, thereby extracting a structured diagnostic entity containing the abnormality type, corresponding lead and quantification index.
[0006] Furthermore, the weighted cosine similarity algorithm is calculated using the following formula: , In the formula, The entity representing the AI diagnostic conclusion Entities related to the historical doctor's diagnostic data The similarity between them; Indicates the first The weight of each AI diagnostic conclusion entity. =1, 2, 3; where The weights are respectively for the abnormality type, lead, and quantitative indicator; Let be the feature vector of the entity in the AI diagnostic conclusion, where , , These are the feature vectors of abnormality type, leads, and quantitative indicators in the AI diagnostic conclusion entity, respectively. For the feature vector of the historical doctor's diagnosis data entity, where , , These are the feature vectors of abnormality type, lead, and quantitative indicator in the historical physician diagnosis data entity, respectively.
[0007] Furthermore, when the similarity is within a preset fuzzy range or the first deviation and the second deviation are within a critical threshold range, a waveform feature verification algorithm is used to determine the newly emerging anomaly. The waveform feature verification algorithm includes the following steps: The ReliefF feature selection algorithm is used to filter key distinguishing features from the current ECG waveform and historical ECG waveforms. Feature vectors of key distinguishing features of the current ECG waveform and historical ECG waveforms are extracted using a lightweight CNN model, and the cosine similarity between the two is calculated. If the cosine similarity is lower than the preset waveform similarity threshold, then a new anomaly is confirmed.
[0008] Furthermore, when a new problem is identified, the clinical hazard level of the new problem is determined through a predetermined grading rule base, and the corresponding business node is triggered based on the clinical hazard level and its confidence level.
[0009] Furthermore, a DQN reinforcement learning model is constructed to adaptively optimize the parameters throughout the entire process. The state space of the DQN reinforcement learning model consists of the accuracy of new case detection, the type of misjudgment, the clinical scenario, and the current comparison threshold; the action space consists of adjusting the comparison threshold and optimizing the model parameters, and a reward function is constructed based on the consistency between the judgment and the clinical diagnosis, the number of false triggers and missed triggers, and the response time.
[0010] Furthermore, the judgment results of the text comparison algorithm, the LSTM time series prediction model, and the waveform feature verification algorithm are fused using the XGBoost model to generate the final judgment result.
[0011] In a second aspect, the present invention provides an electrocardiogram (ECG) diagnostic device, including a memory and a processor, wherein the memory stores at least one program, which is executed by the processor to implement the ECG diagnostic method as described above.
[0012] Thirdly, the present invention provides a computer-readable storage medium storing at least one program that is executed by a processor to implement the electrocardiogram diagnosis method as described above.
[0013] Fourthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the electrocardiogram diagnosis method as described above.
[0014] The above technical solution has the following technical effects: By acquiring the AI diagnosis conclusion of the current patient's electrocardiogram (ECG) and accessing the patient's historical doctor's diagnosis data, this invention extracts entities from both the AI diagnosis conclusion and the historical doctor's diagnosis data using a pre-defined text comparison algorithm. The similarity between the two entities is then compared using a weighted cosine similarity algorithm. When the similarity is below a preset similarity threshold, a new problem is preliminarily identified. Quantitative indicators and timestamps of predetermined abnormality types are extracted from the historical doctor's diagnosis data and input into a pre-trained LSTM time-series prediction model to predict the theoretical value of the abnormality type at the current moment, indicating no new problem has occurred. The first deviation between the actual value and the theoretical value of the abnormality type quantitative indicator in the current AI diagnosis conclusion is calculated. Simultaneously, a second deviation between the actual value and the quantitative indicator value in the historical doctor's diagnosis data is also calculated. When both the first and second deviations exceed their respective preset deviation thresholds, a new problem is identified. This invention solves the problem of existing technologies struggling to identify new problems by comparing historical diagnostic records, leading to a decrease in the accuracy and safety of ECG diagnosis. Attached Figure Description
[0015] Figure 1 This is a schematic flowchart of an electrocardiogram (ECG) diagnostic method according to an embodiment of the present invention.
[0016] Figure 2 This is a schematic diagram of the electrocardiogram diagnostic device according to an embodiment of the present invention. Detailed Implementation
[0017] To further illustrate the various embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention and are mainly used to illustrate the embodiments, and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementations and the advantages of the present invention. Components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0018] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.
[0019] Example 1: Figure 1 This is a schematic flowchart of an electrocardiogram (ECG) diagnostic method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the method of this embodiment includes the following steps: The system acquires the AI diagnostic conclusion of the current patient's electrocardiogram (ECG) and retrieves the patient's historical physician diagnostic data. In one specific implementation, the ECG AI diagnostic system automatically parses the newly acquired ECG data and outputs a structured diagnostic conclusion, which includes the abnormality type, relevant leads, and quantitative indicators. Simultaneously, it retrieves historical physician diagnostic data through the patient's unique identifier; this data consists of electronic report texts and structured records from the past three years. If the patient is visiting for the first time, it is marked as having no historical diagnosis and is treated as a newly diagnosed issue by default. If multiple abnormalities exist, each is output as a separate diagnostic conclusion and associated with its corresponding historical data.
[0020] The entities in the AI diagnostic conclusion and historical doctor's diagnostic data are extracted using a predetermined text comparison algorithm, including the following steps: A Transformer-based pre-trained language model is used to semantically encode the text of the AI diagnostic conclusion and the historical doctor's diagnostic data to obtain deep feature representations of the text. Deep feature representations are input into a bidirectional long short-term memory (BiLSTM) network for sequence context modeling, outputting long-distance dependencies between anomaly types, leads, and quantification metrics in the text; The output sequence of the bidirectional long short-term memory network is input into a predetermined conditional random field (CRF) layer, decoded to generate the optimal entity label sequence, thereby extracting a structured diagnostic entity containing the abnormality type, corresponding lead and quantification index.
[0021] Accurate entity alignment is achieved using a weighted cosine similarity algorithm. This algorithm assigns core weights to anomaly types, secondary weights to leads, and auxiliary weights to indicators, while setting a similarity threshold. The weighted cosine similarity algorithm is calculated using the following formula: , In the formula, Entities representing AI diagnostic conclusions Entities related to historical physician diagnostic data The similarity between them; Indicates the first The weight of each AI diagnostic conclusion entity. =1, 2, 3; where The weights for the abnormality type, lead, and quantification index are respectively, satisfying the following conditions. ; Let be the feature vector of the entity in the AI diagnostic conclusion, where , , These are the feature vectors of abnormality type, leads, and quantitative indicators in the AI diagnostic conclusion entity, respectively. For the feature vector of the historical doctor's diagnosis data entity, where , , These are the feature vectors of abnormality type, lead, and quantitative indicator in the historical physician diagnosis data entity, respectively.
[0022] When the similarity is below a preset similarity threshold, a preliminary judgment is made that a new problem is suspected, and the next step of judgment is initiated. A new problem refers to an ECG abnormality that appears for the first time or has significantly progressed compared to the patient's current ECG examination and historical physician diagnostic data. This application uses new problems as the core basis for triggering the process. The clinical logic is that new abnormalities often indicate a substantial change in the patient's condition, requiring priority treatment; while old abnormalities have stabilized and do not require emergency intervention. For example, new ST-segment elevation may indicate an acute myocardial infarction, requiring immediate initiation of emergency procedures; while old ST-segment elevation may be a change following an old myocardial infarction and does not require emergency treatment.
[0023] Extract quantitative indicators and timestamps of predetermined abnormality types from historical physician diagnosis data and input them into a pre-trained LSTM time-series prediction model to predict the theoretical value of the abnormality type at the current moment, where no new problems have occurred. In one specific implementation, the model training uses the mean squared error loss function, as shown in the following formula: ,in The number of historical indicator samples. For the first Real historical index values at any given time These are the model's predicted values.
[0024] The first deviation between the actual value and the theoretical value of the quantitative indicator of the abnormality type in the current AI diagnostic conclusion is calculated; at the same time, the second deviation between the actual value and the quantitative indicator value in the historical doctor's diagnostic data is calculated; where the quantitative indicator value in the historical doctor's diagnostic data adopts the latest historical value.
[0025] When both the first deviation and the second deviation exceed their respective preset deviation thresholds, a new problem is determined to have occurred.
[0026] In one specific implementation, when the similarity is within a preset fuzzy range or the first and second deviations are within a critical threshold range, a waveform feature verification algorithm is used to determine the newly emerging anomaly, including the following steps: The ReliefF feature selection algorithm is used to screen key discriminative features from the current ECG waveform and historical ECG waveforms, such as 12-lead ECG waveforms. Key discriminative features include QRS duration, QT interval, and T wave amplitude, and redundant features are removed to improve efficiency. Specifically, the formula for calculating the ReliefF feature weights is as follows: , In the formula, ECG waveform characteristics The weight, For the sample size, For the same type of nearest neighbor sample set, For the heterogeneous nearest neighbor sample set, For the sample with similar neighbors In features Differences in the above.
[0027] Feature vectors of key distinguishing features of the current ECG waveform and historical ECG waveforms are extracted using a lightweight CNN model, and the cosine similarity between the two is calculated. If the cosine similarity is lower than the preset waveform similarity threshold, then a new anomaly is confirmed.
[0028] In one specific implementation, when a new problem is identified, the clinical hazard level of the new problem is determined through a predefined hierarchical rule base, and the corresponding business node is triggered based on the clinical hazard level and its confidence level.
[0029] Specifically, newly diagnosed or newly progressive problems are classified into new-onset risk levels. This new-onset risk classification is based on the new-onset attribute, combined with an abnormal clinical hazard to construct a classification rule base. This rule base is constructed according to the "Guidelines for the Diagnosis and Treatment of Acute Coronary Syndrome" and the "Standardized Identification and Reporting of Critical ECG Values." Classification is only applied to newly diagnosed or newly progressive problems; non-new-onset problems are not included in the active triggering process. The hierarchical rule base classifies newly occurring abnormalities into four levels: Level I is newly occurring critical value, referring to newly occurring or progressive abnormalities that endanger life and require a response within 10 minutes, including 19 types of abnormalities such as newly occurring ST segment elevation ≥0.2mV and progressive third-degree atrioventricular block; Level II is newly occurring high risk, referring to newly occurring or progressive abnormalities that may deteriorate rapidly and require a response within 30 minutes, including 35 types of abnormalities such as newly occurring left bundle branch block and progressive deep T wave inversion ≥0.5mV; Level III is newly occurring intermediate risk, referring to benign newly occurring abnormalities that require attention and require a response within 24 hours, including 42 types of abnormalities such as newly occurring left anterior fascicular block and newly occurring mild ST segment depression; Level IV is newly occurring low risk, referring to benign newly occurring abnormalities that do not require active triggering of the process, but are only recorded in the log, including 28 types of abnormalities such as newly occurring occasional premature ventricular contractions <5 times / min.
[0030] Based on the newly diagnosed risk level, corresponding business nodes are matched and processes are triggered. AI diagnostic confidence is introduced as an auxiliary adjustment factor for Level I and Level II newly diagnosed issues to avoid false triggers due to extremely low confidence. The node triggering module has built-in rules for binding new risk levels with business nodes: Level I newly diagnosed issues are bound to the "Check Completed" node, triggered when confidence is ≥40%, to strictly control missed diagnoses; Level II newly diagnosed issues are bound to the "Open Report" node, triggered when confidence is ≥70%, to balance sensitivity and specificity; Level III newly diagnosed issues are bound to the "Submit Diagnosis" node, triggered when confidence is ≥80%, to reduce false positives; Level IV newly diagnosed issues are not actively triggered, only logged. For newly diagnosed right bundle branch block in Level II newly diagnosed issues, if identified by AI, an "Open Report" node reminder is triggered; if identified by a doctor but not by AI, verification is performed at the "Submit Diagnosis" node.
[0031] In one specific implementation, a DQN deep Q-network reinforcement learning model is constructed to adaptively optimize the parameters throughout the entire process. Specifically, its state space is defined as the accuracy of new case diagnosis, the type of misjudgment, the clinical scenario, and the current comparison threshold. The misjudgment types include text-level misjudgment, indicator-level misjudgment, and waveform-level misjudgment. The clinical scenario includes emergency, outpatient, and physical examination. The action space includes three types of actions: adjusting the comparison thresholds, optimizing the entity recognition weights of the Transformer-BiLSTM+CRF model, and updating the baseline parameters of the LSTM temporal prediction. The reward function uses the consistency between the new case diagnosis and the clinical diagnosis as the positive reward, the number of false triggers and missed triggers as the negative reward, and the process response time as the negative reward, constructing a comprehensive reward. The calculation formula is as follows: , In the formula, For reward weighting, satisfy ; As an accuracy bonus, the value ranges from 0 to 1; Penalties are imposed for misjudgment, i.e., false triggering and missed triggering; To address the time penalty, the DQN model is periodically trained using labeled data. The model autonomously selects the optimal action and adjusts its parameters based on the current state. The adjustments are only effective after being reviewed and confirmed by a cardiology expert.
[0032] In one specific implementation, ensemble learning is introduced to fuse the outputs of multiple algorithms for decision-making. This ensemble learning uses the XGBoost model, and the fusion decision formula is as follows: , In the formula, For the final judgment result, The number of algorithms participating in the fusion. For the first The weights of each algorithm, For the first Algorithms for samples Determined as The probability of occurrence is determined by fusion decision-making, which reduces the generalization error of a single algorithm and further improves the stability of new occurrence determination.
[0033] When a business node is triggered, the system displays differentiated warnings, reminders, or verification interfaces at the corresponding node. The warning pop-up for the completed check node highlights the newly diagnosed critical value in red and the historical comparison data; the reminder pop-up for the opened report node displays the newly diagnosed flag and indicates that no such anomaly information exists in the past; the verification checklist for the submitted diagnosis node indicates any unmentioned newly diagnosed issues and includes historical screenshots. The system has completed interface development with ECG equipment, the historical diagnostic database, and the HIS system to ensure efficient response to historical data calls and process triggers. The feedback optimization module sets optimization cycles, and each training iteration uses labeled data including newly diagnosed results and clinically confirmed cases. The algorithm's recognition threshold is set, and the step size is adjusted. Updates to the newly diagnosed risk grading rules require expert review to ensure continuous improvement in the accuracy of newly diagnosed cases.
[0034] The beneficial effects of this invention are reflected in: High accuracy in new occurrence diagnosis: The core new occurrence problem judgment module integrates multiple algorithms such as Transformer-BiLSTM+CRF, LSTM temporal prediction, ReliefF feature selection, MobileNetV2 lightweight CNN, XGBoost ensemble learning, and DQN reinforcement learning to construct a technical system of "multi-algorithm collaborative progressive comparison + adaptive optimization". This solves the problems of coarseness and poor generalization ability of traditional single text comparison; it significantly improves the accuracy of new occurrence problem judgment and effectively reduces the misjudgment rate of new and old anomalies. The technical effect is significantly better than conventional comparison methods. New-emergence risk classification science: Constructing a classification system with new-emergence attributes as the core, breaking through the limitations of traditional classification based solely on abnormality type, and achieving a clinical logical fit of prioritizing the treatment of new-emergence critical values and routinely handling old abnormalities; Strong node trigger adaptability: Level I / II / III newly emerging issues are respectively bound to the inspection completion, report opening, and diagnosis submission nodes, forming a closed loop of the entire process of "newly emerging issue discovery-diagnosis-verification", and the response time for new critical value warnings is shortened from 15 minutes to within 7.5 minutes; Its clinical applicability is outstanding: the operation logic is in line with the diagnosis and treatment habit of prioritizing new cases, and the design of historical comparison basis and structured checklist reduces the operation cost of doctors, which can effectively improve doctors' satisfaction and reduce the rate of missed diagnosis of new problems.
[0035] In one specific implementation, this embodiment provides the following scenario-based implementation examples: Case 1: Checking the completion node (Level I process trigger) Step 1: Patient Li (male, emergency room visit, chief complaint of chest pain) completed an electrocardiogram (ECG) examination. The AI system analyzed and output the diagnosis: "ST segment elevation in leads V1-V5", with a confidence level that met the criteria. The system retrieved historical diagnostic data through the patient's unique identifier, showing a historical diagnosis of "sinus rhythm, generally normal" (no ST segment abnormality records). Step 2: Core Step - New Case Judgment (Multi-Algorithm Fusion Triple Comparison): ① Text Comparison: The Transformer-BiLSTM+CRF model analyzes historical diagnostic texts, capturing the global semantic association between "sinus rhythm" and "no ST segment abnormalities." No three-dimensional entities of "ST segment elevation - chest leads - indicators" are extracted. Substituting these into the weighted cosine similarity formula, the similarity is calculated to be below the threshold, initially determining it as a suspected new case; ② Indicator Comparison: No historical ST segment elevation quantitative indicators are available. The LSTM model cannot construct a trend baseline, so baseline deviation calculation is skipped, and "no historical indicators" is directly marked; ③ Waveform Comparison: First, the ReliefF algorithm is used to calculate the weights of each waveform feature, filtering out key features. The features are then extracted using the MobileNetV2 model to compare the current waveforms with historical waveforms in leads V1-V5. The cosine similarity formula is then used to calculate the similarity, which is below a threshold. Finally, the XGBoost ensemble decision formula is used to fuse the three-level comparison results, ultimately classifying it as a "newly emerging issue" and generating a structured report: "Comparison dimensions: text + waveform; Algorithm output: Transformer-BiLSTM+CRF entity mismatch, ReliefF filtering of key features, MobileNetV2 feature similarity below threshold; Judgment criteria: no ST segment elevation entities in the past, significant differences in current waveform features; Feature screenshot: ST segment comparison chart of leads V1-V5." Step 3: The medical grading module, combined with "new onset + ST segment elevation ≥0.2mV", determines it as Grade I (new onset critical value); Step 4: Match the Level I confidence threshold. The current confidence level meets the threshold, thus satisfying the triggering condition. Step 5: Trigger Level I Procedure: ① The doctor's workstation immediately displays a pop-up message and voice prompt: "Patient Li, new ST segment elevation in leads V1-V5, critical value! No such abnormality in historical diagnoses"; ② Simultaneously, a pop-up message and a warning message (with a comparison of historical and current ECG waveforms) are sent to the diagnostic doctor's workstation and mobile device; ③ A message is sent through the HIS system: "Suspected new myocardial infarction in the emergency department, patient information + ECG data have been uploaded"; ④ The system generates a green channel emergency rescue order (marked "New critical value triggered"); Step 6: Process Execution: The examining physician confirms the warning within the specified time, the cardiologist promptly receives the patient, the relevant departments initiate the corresponding diagnosis and treatment process, and the patient is diagnosed with acute anterior wall myocardial infarction (new onset). Step 7: Feedback Record: Mark “New case diagnosis accurate, Level I process triggered effectively, confirmed new myocardial infarction” and include it in the optimized sample.
[0036] Case 2: Open the report node (Level II process trigger) Step 1: Patient Wang (outpatient physical examination) completed the electrocardiogram examination. The AI analysis output two conclusions: ① "Left bundle branch block"; ② "Occasional premature ventricular contractions"; The system retrieved historical diagnostic data through the patient's unique identifier, both of which recorded "sinus rhythm, no conduction block or premature contractions"; Step 2: Core Step - New Case Judgment (Multi-Algorithm Fusion Triple Comparison): ① Text Comparison: The Transformer-BiLSTM+CRF model analyzes historical diagnostic texts, accurately identifying "sinus rhythm" without semantic associations related to "left bundle branch block" or "ventricular premature beats." Substituting these into the weighted cosine similarity formula, the similarity scores are all below the threshold, initially determining it as a suspected new case; ② Indicator Comparison: Without historical corresponding quantitative indicators, the LSTM model cannot construct a trend baseline, so waveform comparison is performed; ③ Waveform Comparison: The ReliefF algorithm calculates relevant feature weights, filters out key features, and the MobileNetV2 model extracts feature vectors. Substituting these into the cosine similarity formula, the similarity scores are all below the threshold; after fusing the results with the XGBoost ensemble decision formula, ① and ② are ultimately determined to be "new cases," generating a structured comparison report containing feature comparison screenshots; Step 3: Risk classification of new cases: ① "New-onset left bundle branch block" is classified as Grade II (new-onset high risk), ② "New-onset occasional premature beats" is classified as Grade IV (new-onset low risk); according to the principle of "choosing the higher risk", the main process is Grade II; Step 4: Assisted Adjustment and Triggering: Match the Level II bound node "Open Report", the AI confidence level meets the standard, and the triggering conditions are met; Step 5: Trigger Level II Process: When the diagnosing physician logs into the ECG system and opens the report, a pop-up window automatically appears at the top: "New High-Risk Warning: Patient Wang has a new left bundle branch block (no such abnormality was found in previous physical examinations). Please complete the diagnosis within the specified time." The report title is highlighted with "New High-Risk - Priority Handling". Step 6: Process Execution: The diagnosing physician completes the diagnosis within the specified time, and based on the patient's symptoms and relevant examinations, confirms the diagnosis as "early stage of dilated cardiomyopathy (new-onset left bundle branch block as a complication)," and issues a further examination order; Step 7: Feedback Record: Mark “New case diagnosis accurate (consistent with clinical diagnosis), Level II process trigger effective” and include it in the optimized sample.
[0037] Case 3: Submitting a diagnostic node (Level III process triggered) Step 1: Patient Zhao (female, 45 years old, outpatient ECG examination) completes the examination, and the AI analysis outputs the conclusion "left anterior fascicular block"; the system retrieves historical diagnostic data (3 examinations in the past 2 years) through the patient's medical card number, all of which record "sinus rhythm, no abnormalities related to fascicular block"; Step 2: Core Step - New Case Judgment (Multi-Algorithm Fusion Triple Comparison): ① Text Comparison: The Transformer-BiLSTM+CRF model analyzes historical diagnostic texts and fails to capture semantic entities related to "left anterior branch block". Substituting the weighted cosine similarity formula, the similarity is calculated to be below the threshold, initially suggesting a new case; ② Indicator Comparison: There are no quantitative indicators related to branch block in the past, and the LSTM model cannot build a trend baseline, so waveform verification is initiated; ③ Waveform Comparison: The ReliefF algorithm calculates the relevant feature weights and filters out key features. The MobileNetV2 model extracts the feature vectors of the current and historical corresponding leads. Substituting the cosine similarity formula, the similarity is calculated to be below the threshold; Substituting the XGBoost ensemble decision formula confirms "new case", generating the judgment criteria: "No left anterior branch block entity was found in the historical examination, and the current waveform features are significantly different from the historical ones" and linking it to the screenshot of the historical report; Step 3: New outbreak risk classification: Determined as Level III (new outbreak medium risk), bind the node "Submit Diagnosis"; Step 4: Assisted Adjustment and Triggering: AI confidence level meets the criteria, triggering conditions are met; Step 5: Trigger Level III Process: When the diagnosing physician writes the report, they only record "sinus rhythm" without mentioning this newly developed problem. After clicking the "Submit Diagnosis" button, the system immediately intercepts the submission and displays a pop-up checklist: "New Problem Check Reminder: No mention of a newly developed intermediate-risk problem—left anterior fascicular block (no such abnormality in the past 2 years). Operation options: 1. Supplement diagnosis 2. Confirm omission (fill in the reason) 3. Mark misdiagnosis"; Step 6: Process Execution: The diagnosing physician clicks "Supplement Diagnosis," jumps to the report editing interface to supplement the relevant description, saves it, and returns to the verification list. The issue is marked as "processed," and the system releases the submission permission. Subsequently, combined with coronary CT examination, the diagnosis is "mild coronary artery stenosis (newly developed left anterior branch block is a compensatory manifestation)." Step 7: Feedback Record: Mark "Accurate new case identification, effective triggering of Level III process, avoiding missed diagnosis of new cases" and include it in the optimization sample.
[0038] Case 4: Open the report node (Level II process trigger - new right bundle branch block, AI recognition) Step 1: Patient Zhang (male, 68 years old, outpatient visit, chief complaint of chest tightness after activity for 2 weeks) completed an electrocardiogram examination. The AI system analyzed and output the diagnosis: "complete right bundle branch block", with confidence level meeting the standard. The system retrieved historical diagnostic data through the patient's unique identifier, showing that all historical diagnoses were "sinus rhythm, no records related to bundle branch block". Step 2: Core Step - New Onset Judgment (Multi-Algorithm Fusion Triple Comparison): ① Text Comparison: The Transformer-BiLSTM+CRF model analyzes historical diagnostic texts, accurately capturing the global semantic association between "sinus rhythm" and "no conduction block." No three-dimensional entity of "right bundle branch block - lead - quantitative indicator" is extracted. Substituting these into the weighted cosine similarity formula, the similarity scores are all below the threshold, initially determining it as a suspected new onset; ② Indicator Comparison: Historical diagnoses lack relevant quantitative indicators for right bundle branch block, and the LSTM model cannot construct a trend baseline, leading to waveform comparison; ③ Waveform Comparison: The ReliefF algorithm calculates relevant feature weights and filters out key indicators. The MobileNetV2 model extracts feature vectors of the current and historical corresponding leads, and calculates the similarity using the cosine similarity formula. The similarity is found to be below a threshold. After fusing the three-level comparison results using the XGBoost ensemble decision formula, the problem is ultimately identified as a "newly discovered issue," generating a structured report: "Comparison dimensions: text + waveform; Algorithm output: Transformer-BiLSTM+CRF entity mismatch, ReliefF filtering of key features, MobileNetV2 feature similarity below threshold; Judgment criteria: no right bundle branch block entity found in historical checks, current waveform features show significant differences; Feature screenshot: corresponding lead waveform comparison chart." Step 3: Risk classification of new cases: Based on the classification rule base, "new-onset complete right bundle branch block" belongs to the abnormal type that may deteriorate rapidly and is classified as Grade II (high risk of new cases). Step 4: Assisted Adjustment and Triggering: Match the Level II bound node "Open Report", the AI confidence level meets the standard, and the triggering conditions are met; Step 5: Trigger Level II Process: When Dr. Liu logs into the ECG system and opens the report, a pop-up window automatically appears at the top: "New High-Risk Warning: Patient Zhang has a new-onset complete right bundle branch block (historical examinations did not show this abnormality). Please complete the diagnosis within the specified time." The report title is highlighted with "New High-Risk - Priority Handling," and the bottom of the pop-up window includes an entry for "Historical Diagnosis Comparison." Step 6: Process Execution: The diagnosing physician completes the diagnosis within the specified time, and based on the patient's chest tightness symptoms and relevant examinations, confirms the diagnosis as "coronary atherosclerotic heart disease, new-onset complete right bundle branch block as a complication of myocardial ischemia," prescribes the corresponding medication, and arranges further treatment; Step 7: Feedback Record: Mark “New case diagnosis is accurate (consistent with clinical diagnosis), Level II process is effectively triggered, and new abnormalities related to myocardial ischemia are detected in a timely manner” and include it in the optimized sample.
[0039] Case 5: Submission of diagnostic node (Level III process triggered - doctor's diagnosis reveals new right bundle branch block, AI fails to recognize) Step 1: Patient Chen (female, 52 years old, outpatient visit, chief complaint of chest tightness after activity for 1 week) completed an electrocardiogram (ECG) examination. The AI system analyzed and output the diagnosis: "Sinus rhythm, generally normal" (no abnormality markings); the system retrieved historical diagnostic data (two examinations in the past year) through the patient's unique identifier, both of which recorded "Sinus rhythm, no bundle branch block-related abnormalities"; after reviewing the images, the diagnosing physician found characteristic waveform changes in leads V1 and V2 and planned to add "complete right bundle branch block" to the diagnostic report; Step 2: Core Step - New Verification Upon Submission (Supplementing Doctor Diagnosis Comparison Logic): After the doctor clicks "Submit Diagnosis," the system initiates a dedicated comparison process between "Doctor Diagnosis Text - Historical Diagnosis" (this process runs in parallel with the AI conclusion comparison process, covering AI missed detection scenarios); the Transformer-BiLSTM+CRF model is used to parse the diagnosis text to be submitted by the doctor, extracting the three-dimensional entity "Complete Right Bundle Branch Block - Leads V1 and V2," and then performing a weighted cosine similarity calculation with the historical diagnosis text, resulting in sim1 (with data from 1 year ago) = 0.17 and sim2 (with data from 6 months ago) = 0.19, both below the similarity threshold; further, historical waveform data is called, and key features such as QRS group width and R' wave amplitude in lead V1 are filtered using the ReliefF algorithm. The MobileNetV2 model calculates the current waveform feature similarity with historical leads V1, V2, and V6 = 0.75 < threshold, and substitutes it into the XGBoost ensemble decision formula to confirm that the anomaly is a "newly occurring problem"; Step 3: New-onset risk grading: Based on the grading rule base, "new-onset complete right bundle branch block" belongs to the abnormal type that may deteriorate rapidly and is judged as Grade II (new-onset high risk); because this new problem was actively identified by the doctor and added to the diagnostic text, the system adapts to the verification process of the submitted diagnostic node and triggers a Grade III verification reminder; Step 4: Assisted adjustment and triggering: Match the Level III binding node "Submit Diagnosis". Since this new case was actively identified by the doctor, no confidence verification is required, and the triggering condition is directly met. Step 5: Trigger Level III Process: The system pop-up displays the verification list: "New Issue Confirmation Reminder: Your submitted diagnosis contains a new high-risk issue—complete right bundle branch block (no such abnormality in the past 1 year). Operation options: 1. Confirm new and supplement diagnostic details 2. Cancel submission and re-examine images 3. Mark as old (supporting evidence required)"; The pop-up also includes entries for "Comparison of Historical Diagnostic Texts" and "Comparison of Waveform Characteristics of Leads V1 and V2"; Step 6: Process Execution: The diagnosing physician clicks "Confirm New Onset and Add Diagnostic Details," adds "Complete right bundle branch block (new onset) in the report. Considering the patient's chest tightness symptoms, further coronary artery blood supply-related examinations are recommended." After saving, the system marks the issue as "Confirmed New Onset" and releases submission permissions. Subsequently, the patient completes a coronary CT scan and is diagnosed with "coronary atherosclerotic heart disease, with new-onset complete right bundle branch block as a complication of myocardial ischemia." The physician adjusts the treatment plan based on the examination results. Step 7: Feedback Record: Mark "AI failed to identify new-onset complete right bundle branch block, doctor diagnosed it, submission node verification is valid; include this case in the AI model optimization sample to improve the ability to identify bundle branch block-type abnormalities", and update the training dataset of the feedback optimization module simultaneously.
[0040] Example 2: Figure 2 This is a schematic diagram of the structure of an electrocardiogram diagnostic device according to an embodiment of the present invention, as shown below. Figure 2 As shown, the device includes a processor 201, a memory 202, a bus 203, and a computer program stored in the memory 202 and executable on the processor 201. The processor 201 includes one or more processing cores. The memory 202 is connected to the processor 201 via the bus 203. The memory 202 is used to store program instructions. When the processor executes the computer program, it implements the steps in the above-described method embodiment of Embodiment 1 of the present invention.
[0041] Furthermore, as an executable solution, the electrocardiogram diagnostic device can be a computer unit, which can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer unit may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above-described structure of the computer unit is merely an example and does not constitute a limitation on the computer unit. It may include more or fewer components, or combine certain components, or use different components. For example, the computer unit may also include input / output devices, network access devices, buses, etc., and this embodiment of the invention does not limit this.
[0042] Furthermore, as an executable solution, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The processor is the control center of the computer unit, connecting various parts of the entire computer unit via various interfaces and lines.
[0043] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the computer unit by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital card (SD card), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0044] Example 3: The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described in the embodiments of the present invention.
[0045] If the modules / units integrated in the computer unit are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0046] Example 4: The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the electrocardiogram diagnosis method as described above.
[0047] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.
Claims
1. An electrocardiogram (ECG) diagnostic method, characterized in that, Includes the following steps: Obtain the AI diagnosis conclusion of the current patient's electrocardiogram and retrieve the patient's historical doctor diagnosis data; The AI diagnostic conclusion and the historical doctor's diagnostic data are extracted using a predetermined text comparison algorithm, and the similarity between the two entities is compared using a weighted cosine similarity algorithm. When the similarity is lower than the preset similarity threshold, it is preliminarily determined that a new problem has occurred, and the next step of judgment is carried out; the new problem refers to the first appearance or significant progression of ECG abnormalities in the patient's current ECG examination compared with historical doctor's diagnosis data; Extract the quantitative indicators and timestamps of the predetermined abnormality types from the historical doctor diagnosis data and input them into a pre-trained LSTM time series prediction model to predict the theoretical value of no new problems of the abnormality type at the current time. The first deviation between the actual value and the theoretical value of the quantitative indicator of the abnormality type in the current AI diagnostic conclusion is calculated; simultaneously, the second deviation between the actual value and the quantitative indicator value in historical doctor diagnostic data is calculated. When both the first deviation and the second deviation exceed their respective preset deviation thresholds, it is determined that a new problem has occurred.
2. The electrocardiogram diagnostic method according to claim 1, characterized in that, The step of extracting entities from the AI diagnostic conclusion and the historical doctor's diagnostic data using a predetermined text comparison algorithm includes the following steps: A Transformer-based pre-trained language model is used to semantically encode the text of the AI diagnostic conclusion and the historical doctor's diagnostic data to obtain the deep feature representation of the text; The deep feature representation is input into a bidirectional long short-term memory network for sequence context modeling, and the long-distance dependencies between anomaly types, leads, and quantification indicators in the text are output. The output sequence of the bidirectional long short-term memory network is input into a predetermined conditional random field layer, decoded to generate the optimal entity label sequence, thereby extracting a structured diagnostic entity containing the abnormality type, corresponding lead and quantification index.
3. The electrocardiogram diagnostic method according to claim 1, characterized in that, The weighted cosine similarity algorithm is calculated using the following formula: , In the formula, The entity representing the AI diagnostic conclusion Entities related to the historical doctor's diagnostic data The similarity between them; Indicates the first The weight of each AI diagnostic conclusion entity. =1, 2, 3; in The weights are respectively for the abnormality type, lead, and quantitative indicator; Let be the feature vector of the entity in the AI diagnostic conclusion, where , , These are the feature vectors of abnormality type, leads, and quantitative indicators in the AI diagnostic conclusion entity, respectively. For the feature vector of the historical doctor's diagnosis data entity, where , , These are the feature vectors of abnormality type, lead, and quantitative indicator in the historical physician diagnosis data entity, respectively.
4. The electrocardiogram diagnostic method according to claim 1, characterized in that, When the similarity is within a preset fuzzy range or the first deviation and the second deviation are within a critical threshold range, a waveform feature verification algorithm is used to determine the newly emerging anomaly. The waveform feature verification algorithm includes the following steps: The ReliefF feature selection algorithm is used to filter key distinguishing features from the current ECG waveform and historical ECG waveforms. Feature vectors of key distinguishing features of the current ECG waveform and historical ECG waveforms are extracted using a lightweight CNN model, and the cosine similarity between the two is calculated. If the cosine similarity is lower than the preset waveform similarity threshold, then a new anomaly is confirmed.
5. The electrocardiogram diagnostic method according to claim 1, characterized in that, When a new problem is identified, the clinical hazard level of the new problem is determined through a predefined grading rule base, and the corresponding business node is triggered based on the clinical hazard level and its confidence level.
6. The electrocardiogram diagnostic method according to claim 2, characterized in that, Furthermore, a DQN reinforcement learning model is constructed to adaptively optimize the parameters throughout the entire process. The state space of the DQN reinforcement learning model consists of the accuracy of new case detection, the type of misjudgment, the clinical scenario, and the current comparison threshold. The action space is used to adjust the comparison threshold and optimize the model parameters, and a reward function is constructed based on the consistency with clinical diagnosis, the number of false triggers and missed triggers, and the response time.
7. The electrocardiogram diagnostic method according to claim 1, characterized in that, Furthermore, the XGBoost model is used to fuse the judgment results of the text comparison algorithm, the LSTM time series prediction model, and the waveform feature verification algorithm to generate the final judgment result.
8. An electrocardiogram (ECG) diagnostic device, characterized in that, The method includes a memory and a processor, the memory storing at least one program, which is executed by the processor to implement the electrocardiogram diagnostic method as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The storage medium stores at least one program, which is executed by a processor to implement the electrocardiogram diagnosis method as described in any one of claims 1-7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the electrocardiogram diagnostic method as described in any one of claims 1-7.