Exercise electrocardiogram real-time analysis and sudden death risk early warning system based on edge calculation

By deploying lightweight models on edge computing nodes, real-time analysis of exercise electrocardiogram signals solves the problem of the inability to identify malignant arrhythmias in real time in existing technologies. It enables accurate assessment of cardiac function status and timely triggering of defibrillation intervention during exercise, adapting to the physiological changes in exercise scenarios.

CN122050847APending Publication Date: 2026-05-15ANHUI PROVINCIAL HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610488750.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-14
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing exercise ECG monitoring technology cannot achieve real-time and accurate analysis of malignant arrhythmias in outdoor scenarios, lacks closed-loop linkage with defibrillation intervention devices, cannot proactively initiate defibrillation preparation when risks are identified, and relies on cloud computing, which affects timeliness.

Method used

A lightweight inference computing model is deployed on edge computing nodes to analyze motion electrocardiogram signals in real time. Combining heart rate variability characteristics and time-domain characteristics, it outputs a cardiac function status score and triggers a state inversion process when malignant arrhythmia precursors are identified, reconstructs physiological event sequences, generates standardized warning logs, and triggers defibrillation intervention.

Benefits of technology

It enables real-time identification and precise location of malignant arrhythmias during exercise, generates detailed warning logs, and promptly triggers defibrillation preparation, enhancing the real-time nature and relevance of warnings and adapting to changes in physiological characteristics during exercise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122050847A_ABST
    Figure CN122050847A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electrocardiogram monitoring edge calculation, in particular to an edge calculation-based exercise electrocardiogram real-time analysis and sudden death risk early warning system, which comprises a signal preprocessing module for completing exercise electrocardiogram signal acquisition and preprocessing, and a feature extraction module for extracting time domain and heart rate variability features to form a feature set; the edge reasoning module outputs a real-time cardiac function state score at an edge computing node through a lightweight model, and the risk early warning module judges a malignant arrhythmia precursor in combination with a preset threshold value. And if the precursor exists, the state inversion module reconstructs a physiological event sequence by relying on the electrocardiogram historical signal and the characteristic time sequence change, and the early warning generation module locates a risk starting moment and a leading inducement and generates an early warning log with a timestamp and an event type. According to the method, the real-time analysis of the exercise electrocardiogram edge end is realized, the risk precursor traceability early warning is completed, and the requirements of exercise scene electrocardiogram monitoring and sudden death risk early warning are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of edge computing technology for electrocardiogram (ECG) monitoring, and more particularly to a real-time exercise ECG analysis and sudden cardiac death risk warning system based on edge computing. Background Technology

[0002] Today, people are enthusiastic about challenging extreme sports, with marathons and fun runs becoming popular choices. However, when the intensity of exercise exceeds an individual's physiological capacity, there is a significant risk of triggering sudden cardiac death. According to clinical data from hospitals, there are thousands of cases of exercise-related sudden cardiac death in my country every year, with running accounting for a very high proportion, and amateur enthusiasts making up a significant portion. These cases are often sudden cardiac deaths, and routine resting electrocardiograms are insufficient to detect abnormal cardiac electrophysiology during exercise, leading to potential risks going undetected. Exercise-related sudden cardiac death occurs rapidly and is extremely critical, with only four minutes as the golden window for rescue. In outdoor settings, professional medical assistance often cannot arrive in time, and automated external defibrillators (AEDs) in public places are difficult to use immediately due to low accessibility and high operational requirements. Currently, while some wearable devices with ECG monitoring capabilities exist, providing continuous ECG data, most are limited to data recording and simple alerts. They lack the ability to analyze early signs of malignant arrhythmias in real time and accurately, and they fail to form a closed-loop linkage with defibrillation intervention devices. This prevents them from proactively initiating defibrillation preparation while identifying risks, thus missing valuable early intervention opportunities. Therefore, there is an urgent need for an integrated system that combines real-time ECG monitoring, intelligent risk warning, and simultaneous defibrillation preparation to provide continuous safety protection for sports enthusiasts.

[0003] Traditional exercise ECG monitoring technologies primarily focus on acquiring and analyzing static ECG signals. Some dynamic exercise ECG monitoring solutions employ cloud-based data processing. They first acquire exercise ECG signals through front-end devices, perform basic filtering and correction, extract conventional ECG time-domain features and heart rate variability characteristics, and then upload the feature data to a cloud server. The cloud-based model then analyzes the ECG state, using fixed thresholds to determine the presence of arrhythmia risk, and only outputs simple risk warnings. These technologies rely on the cloud for core inference calculations and lack lightweight inference models adapted to the exercise scenario deployed at the edge. The integration of ECG analysis with exercise status is low, and risk assessment relies solely on single threshold comparisons, without adapting to changes in physiological characteristics during exercise.

[0004] Conventional exercise ECG early warning schemes can only determine the presence or absence of risk, but cannot perform source analysis on the precursors of sudden malignant arrhythmias. They lack a mechanism to reconstruct physiological events using historical ECG signal fragments and temporal changes in ECG characteristics, and cannot accurately pinpoint the onset time and dominant trigger of the risk. Warning information is merely vague prompts, lacking a standardized warning log containing timestamps and event types, and thus cannot fully record the key physiological processes involved in the risk. This invention aims to achieve lightweight real-time inference calculation of exercise ECG characteristics at the edge, outputting a cardiac function status score that fits the exercise state. Simultaneously, when identifying risk precursors, it performs state inversion of the physiological event sequence, pinpointing the onset time and trigger of the risk and generating a standardized warning log. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a real-time exercise ECG analysis and sudden death risk warning system based on edge computing.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: a real-time exercise electrocardiogram analysis and sudden death risk warning system based on edge computing, comprising: The signal preprocessing module uses a wearable ECG acquisition device to acquire continuous ECG signals during exercise, performs bandpass filtering and baseline drift correction on the continuous ECG signals, and obtains the preprocessed ECG waveform. The feature extraction module extracts time-domain features, including R-wave peak value, QRS width and T-wave morphology, based on the preprocessed ECG waveform, and also extracts heart rate variability features to form an exercise ECG feature set. The edge inference module inputs the exercise ECG feature set into a lightweight inference computing model deployed on an edge computing node. The lightweight inference computing model outputs a real-time cardiac function status score based on the feature distribution under the current exercise state. The risk warning module, based on the cardiac function status score and combined with a pre-set risk threshold, determines whether there are any precursors to sudden malignant arrhythmias at the current moment; If the state inversion module determines that there is a precursor, it triggers a state inversion process. The state inversion process uses the historical segments of the continuous electrocardiogram signal and the temporal changes of the exercise electrocardiogram feature set to reconstruct the sequence of key physiological events that led to the current risk state. The early warning generation module locates the starting time and dominant trigger of the risk based on the key physiological event sequence, and generates an early warning log containing a timestamp and event type. When it determines that there are signs of malignant arrhythmia, it promptly triggers alarms in the form of sound, light and electricity, and at the same time controls the defibrillation unit integrated into the wearable data acquisition device to perform defibrillation intervention.

[0007] As a further aspect of the present invention, the continuous electrocardiogram signal is subjected to bandpass filtering and baseline drift correction to obtain a preprocessed electrocardiogram waveform, including: The continuous electrocardiogram signal is acquired by a single-lead electrode attached to the chest of the target subject, and exercise intensity data is recorded simultaneously. The continuous electrocardiogram signal is processed using a digital filter to remove high-frequency electromyographic interference with frequencies above 150 Hz and power frequency noise below 0.5 Hz. By detecting the local minimum point of the signal amplitude in the electrocardiogram (ECG) signal, a slowly changing baseline curve is fitted, and the baseline curve is subtracted from the continuous ECG signal to eliminate baseline drift caused by respiration. The ECG signal after denoising and drift removal is segmented, with each segment having a fixed length of one cardiac cycle. A Hanning window is used to smooth the transition between segments, resulting in a continuous preprocessed ECG waveform.

[0008] As a further aspect of the present invention, based on the preprocessed electrocardiogram waveform, time-domain features including R-wave peak value, QRS width, and T-wave morphology are extracted, and heart rate variability features are also extracted to form an exercise electrocardiogram feature set, including: In each segment of the preprocessed ECG waveform, the R-wave peak is located by the first derivative zero-crossing method, and its amplitude is recorded as the R-wave peak value. The time interval between the start and end points of the R wave is measured to obtain the QRS wave width, and the presence of notches or stutters within the QRS wave is detected. After the R-wave peak, find the start and end points of the T-wave, and calculate the height and slope of the T-wave. When the T-wave is inverted or peaked, it is marked as an abnormal T-wave pattern. The time intervals between several consecutive R wave peaks are taken as the RR interval sequence. The RR interval sequence is differentially processed to obtain the difference sequence of adjacent heartbeat intervals. The standard deviation of the difference sequence is calculated as a feature of heart rate variability. The R-wave peak value, QRS width, T-wave morphology, and heart rate variability characteristics are arranged in chronological order and combined to form the exercise electrocardiogram feature set.

[0009] As a further aspect of the present invention, the lightweight inference calculation model outputs a real-time cardiac function status score based on the feature distribution under the current motion state, including: A pre-trained decision tree ensemble model is loaded on an edge computing node, the decision tree ensemble model taking the exercise ECG feature set as input; During each calculation, a subset of features matching the current exercise intensity data is selected from the exercise ECG feature set. The feature subset contains only ECG indicators related to the current metabolic level. The feature subset is input into the decision tree ensemble model, and multiple decision trees perform splitting judgments in parallel, with each tree outputting a binary classification result; The outputs of multiple decision trees are weighted and voted on, and the voting results are mapped to a value between 0 and 100, which is the real-time cardiac function status score.

[0010] As a further aspect of the present invention, if the judgment result indicates the presence of a precursor, a state inversion process is triggered. This state inversion process utilizes historical segments of the continuous electrocardiogram signal and temporal changes in the exercise electrocardiogram feature set to reconstruct the sequence of key physiological events leading to the current risk state, including: When the cardiac function status score is lower than the risk threshold, the data from the most recent two minutes of the continuous electrocardiogram signal is extracted as a historical segment. The historical segments are resampled, divided into several small time windows, and the exercise ECG feature set is recalculated once in each time window; Arrange the electrocardiogram feature sets within each time window in chronological order and plot them as feature trajectory diagrams. On the feature trajectory map, the inflection point where the feature trajectory changes abruptly is identified, and the time window corresponding to the inflection point is the moment when the key physiological event occurs. The occurrence times of each key physiological event are linked together in chronological order to form the sequence of key physiological events.

[0011] As a further aspect of the present invention, based on the key physiological event sequence, locating the starting point and dominant trigger of the risk includes: Traverse the sequence of key physiological events, find the first entry with an abnormal T-wave morphology, and mark the time corresponding to the entry as a candidate start time; Examine the heart rate variability characteristics within a time window prior to the candidate start time. If the heart rate variability characteristics show a significant downward trend, then the candidate start time is confirmed as the start time of the risk. Analyze the changes in exercise intensity before and after the starting moment. If the exercise intensity increases sharply in a short period of time, then excessive exercise load is identified as the dominant cause. If the exercise intensity is stable, further examine the changes in QRS width before and after the start time. If the QRS width increases, electrolyte imbalance or myocardial ischemia is identified as the dominant cause.

[0012] As a further aspect of the present invention, it also includes: The risk recording module associates the warning log with the current cardiac function status score to form a complete risk event record; The mode switching module continuously monitors the changes in cardiac function status scores in the risk event records. When the score is below the safety line for two consecutive time windows, the system operation mode is switched to high-frequency sampling mode. The cyclical early warning module, in high-frequency sampling mode, repeatedly executes the entire process from the output score of the lightweight inference calculation model to the generation of risk event records until the cardiac function status score recovers to the safe range, and the early warning ends. The warning log is correlated with the current cardiac function status score to form a complete risk event record, including: Create a data structure to store complete information for a single warning, the data structure including a timestamp field, a warning log field, and a scoring snapshot field; Fill the timestamp field and the warning log field with the risk start time, dominant trigger type and event type contained in the warning log; Read the cardiac function status score at the moment the warning was triggered, and store it together with the exercise intensity data at that time into the score snapshot field; The data structure is serialized and then written to a local cache queue.

[0013] As a further aspect of the present invention, the continuous monitoring of changes in cardiac function status scores in the risk event records, and the switching of the system operation mode to a high-frequency sampling mode when the score is below the safety line for two consecutive time windows, includes: Set a fixed monitoring time window length, and at the end of each time window, read the latest cardiac function status score within the time window; Maintain a counter, and increment the value of the counter by one whenever a cardiac function status score is detected to be below the safety threshold; When the value of the counter reaches a preset threshold number of times, it is determined that the current state is in a state of continuous high risk. Once a sustained high-risk state is determined, immediately modify the sampling rate configuration of the data acquisition module, increasing the sampling frequency to more than twice the original frequency, and complete the switch to high-frequency sampling mode.

[0014] As a further aspect of the present invention, in the high-frequency sampling mode, the entire process from the output score of the lightweight inference calculation model to the generation of a risk event record is repeatedly executed until the cardiac function status score recovers to the safe range, thus ending the warning, includes: In high-frequency sampling mode, the call interval of the lightweight inference computing model is shortened so that it outputs a new cardiac function status score every fixed short interval. The score of the new output is reassessed. If the score is still below the risk threshold, the state inversion process is retried and the warning log is updated. In the new round of state inversion process, we focus on the subtle waveform changes brought about by high-frequency sampling to capture the signs of premature ventricular contractions or short runs of ventricular tachycardia. The system continuously tracks the trend of changes in cardiac function status scores. When the score is detected to rise continuously to a safe range and remain stable, the counter is reset and the system operation mode is switched back to the normal sampling mode. At the same time, the complete record of this warning is marked as ended.

[0015] As a further aspect of the present invention, it also includes: The closed-loop feedback module packages and uploads the complete risk event record and the corresponding raw continuous electrocardiogram signal to the cloud server after each warning. The cloud server uses offline analysis tools to assess the accuracy of this warning and generate a correction factor; The correction factor is distributed to the edge computing node. In the next run, the lightweight inference computing model will incorporate the correction factor for fine-tuning when calculating the cardiac function status score. The adjusted scores are used to backtest the historical data. If the results show that the false alarm rate has decreased, the current correction factor is fixed as the benchmark for the next update.

[0016] Compared with the prior art, the advantages and positive effects of the present invention are as follows: A lightweight inference computing model is deployed on edge computing nodes. This model inputs a motion-based electrocardiogram (ECG) feature set integrating temporal and heart rate variability characteristics. The model then performs calculations based on the feature distribution under the current exercise state, outputting a real-time cardiac function status score. This technology eliminates the need to transmit ECG data to the cloud, mitigating the impact of network transmission on the timeliness of ECG analysis. It adapts to the real-time requirements of continuous monitoring during exercise. The lightweight model is matched to the hardware computing power of edge computing nodes, enabling localized ECG analysis. The cardiac function status score aligns with physiological changes during exercise, ensuring that ECG assessments fit the actual monitoring needs of exercise scenarios. The real-time performance and scenario adaptability of the score output are enhanced.

[0017] When a sudden, malignant arrhythmia precursor is detected, a state inversion process is triggered. By reconstructing a sequence of key physiological events using historical segments of continuous electrocardiogram (ECG) signals and temporal changes in exercise ECG feature sets, this sequence determines the onset time and dominant trigger of the risk, generating an early warning log containing timestamps and event types. This technology enables source analysis of risk precursors, overcoming the limitations of conventional early warning systems that only determine the existence of risk. It accurately pinpoints the time node and triggering factors of risk occurrence. The early warning log comprehensively records risk-related event information, refining the dimensions of early warning information and distinguishing it from conventional, vague early warning prompts. It fully preserves the physiological process information of risk occurrence, making the early warning content more targeted and clearly presenting the complete physiological logic from risk occurrence to manifestation. Attached Figure Description

[0018] Figure 1 This is a timing diagram of the edge computing-based real-time exercise ECG analysis and sudden death risk warning system described in this invention. Figure 2 This is a flowchart of bandpass filtering and baseline drift correction for continuous electrocardiogram signals; Figure 3 This is a graph showing the rate of change of QRS wave width. Figure 4 A diagram showing closed-loop feedback and correction factor analysis; Figure 5 This is a diagram illustrating the preprocessing and feature extraction analysis of electrocardiogram (ECG) signals. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0020] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0021] See Figure 1The signal preprocessing module uses a wearable ECG acquisition device to collect continuous ECG signals during exercise and performs bandpass filtering and baseline drift correction, outputting a preprocessed ECG waveform. The feature extraction module extracts temporal features, including R-wave peak value, QRS width, and T-wave morphology, as well as heart rate variability features, based on this ECG waveform to form an exercise ECG feature set. The edge inference module inputs this exercise ECG feature set into a lightweight inference computing model deployed on edge computing nodes. This model outputs a real-time cardiac function status score based on the feature distribution under the current exercise state. The risk warning module, based on this cardiac function status score and a pre-set risk threshold, determines whether there are any precursors to sudden malignant arrhythmias at the current moment. When the determination result indicates the presence of precursors, the state inversion module triggers a state inversion process. This process uses historical segments of continuous ECG signals and temporal changes in the exercise ECG feature set to reconstruct the sequence of key physiological events leading to the current risk state. Based on the sequence of key physiological events, the early warning generation module locates the starting time and dominant trigger of the risk and generates an early warning log containing a timestamp and event type. When it determines that there are signs of malignant arrhythmia, it promptly triggers alarms in the form of sound, light and electricity, and at the same time controls the defibrillation unit integrated into the wearable data acquisition device to perform defibrillation intervention.

[0022] In one embodiment of the present invention, see [reference] Figure 2 The continuous ECG signal acquired by the signal preprocessing module comes from a wearable acquisition device specifically designed for motion monitoring, while the synchronously acquired motion intensity data comes from an accelerometer or gyroscope. In some embodiments, the digital filter is constructed by cascading a high-pass filter with a cutoff frequency of 0.5 Hz and a low-pass filter with a cutoff frequency of 150 Hz to filter out power frequency noise and high-frequency electromyographic interference. Baseline drift correction is achieved using the sliding window method. In specific implementation, the system traverses the continuous ECG signal with a window length of 1 second, finds the local minimum point of the signal amplitude within each window, connects all the local minimum points of the windows using cubic spline interpolation, fits the baseline curve, and finally subtracts this baseline curve from the original continuous ECG signal. For the corrected signal, the system segments it according to the real-time detected R-wave position, taking the current R-wave peak point as the starting point and the next R-wave peak point as the ending point, and extracts a signal segment of one cardiac cycle.

[0023] This data acquisition device typically takes the form of a flexible, fitted chest strap, vest, or similar design, stably attaching to the user's chest skin. Its core integrates a single-lead dry electrode for bioelectrical signal acquisition, motion sensors such as accelerometers and gyroscopes for simultaneously recording user movement and intensity data, and a microcontroller unit. It also integrates a treatment unit with automated external defibrillator (AED) functionality, containing a high-voltage capacitor circuit and treatment electrodes connected to the control module. This integrated wearable design ensures continuous, stable, and comfortable synchronous acquisition of raw ECG signals and exercise intensity data during movement, providing the hardware foundation for subsequent real-time analysis and potential emergency intervention at edge computing nodes.

[0024] The feature extraction module processes the preprocessed ECG waveform. It calculates the first-order difference sequence of the ECG waveform and determines the R-wave peak position by locating the point where the difference sequence transitions from positive to negative zero crossings. The corresponding ECG waveform amplitude is recorded as the R-wave peak value. The QRS width is obtained by locating the time difference between the first zero crossing point before and after the R-wave peak. This means that detecting notches or pauses within the QRS complex is achieved by analyzing the number of sign changes in the first-order difference value within 20-millisecond intervals before and after the R-wave peak. T-wave morphology analysis is performed within the interval of 150 to 400 milliseconds after the R-wave peak. The maximum and minimum signal values ​​are found within this interval, and the difference is calculated as the T-wave height. The average slope of the signal within this interval is also calculated. Abnormal T-wave morphology is indicated when the T-wave height is below a preset threshold or when the sign of the average slope is opposite to the norm. The calculation of heart rate variability (HRV) characteristics relies on a continuous RR interval sequence. In practice, the system records the timestamps corresponding to 20 consecutive R-wave peaks, calculates the difference between adjacent timestamps to obtain the RR interval sequence, and performs a first-order differencing operation on this sequence to obtain the difference sequence. The HRV characteristic value is the standard deviation of this difference sequence. The calculation process is expressed by the following formula: in: This represents the characteristic value of heart rate variability. This represents the total number of data points in the difference sequence. Indicates the first The difference between adjacent RR intervals, Indicates all The average value. Optionally, the exercise ECG feature set is organized chronologically, with each time step being a vector containing R-wave peak value, QRS width, T-wave morphology markers, and heart rate variability features.

[0025] In one embodiment of the present invention, the edge inference module loads a pre-trained decision tree ensemble model from memory into the memory of the edge computing node during system initialization. The decision tree ensemble model uses a set of exercise electrocardiogram (ECG) features as input vectors. During each computation, the edge inference module receives a real-time set of exercise ECG features from the feature extraction module and exercise intensity data from a motion sensor. The exercise intensity data is represented by metabolic equivalent (MET) values. A subset of features matching the current exercise intensity data is selected from the exercise ECG feature set. For example, when the exercise intensity data is 5 METs, the feature subset includes heart rate variability features and R-wave peak value; when the exercise intensity data is 2 METs, the feature subset includes QRS width and T-wave morphology features. It can be understood that the rules for constructing the feature subset are predefined by offline analysis of the correlation between ECG features and cardiac load under different exercise intensities. In some embodiments, the process of inputting the feature subset into the decision tree ensemble model is accomplished by calling the model inference interface to fill each value in the feature subset into the corresponding input node of the decision tree ensemble model. The decision tree ensemble model consists of one hundred decision trees with a depth of five. Multiple decision trees perform splitting judgments on the input feature subset in parallel. Each decision tree outputs a binary classification result representing "high risk" or "low risk" based on the path from the root node to the leaf node.

[0026] The outputs of multiple decision trees are weighted and voted on, and the voting results are mapped to a cardiac function status score. In practice, each decision tree is assigned a fixed weight, which is determined during model training based on the tree's performance on the validation set. A "high-risk" result is denoted as 1, and a "low-risk" result is denoted as 0. The final weighted vote sum is converted into a value between 0 and 100 through a linear mapping function. The calculation process is expressed by the following formula: in: This represents the final output cardiac function status score. This represents the total number of decision trees. Indicates the first The weights of each decision tree Indicates the first The binary classification output value (0 or 1) of each decision tree. The risk warning module compares the cardiac function status score with a preset risk threshold of 60 points. When the cardiac function status score is below 60, it is determined that there is a precursor and the state inversion process is triggered. In some embodiments, after the state inversion process is started, the most recent two minutes of data from the continuous ECG signal are immediately extracted from the signal buffer as a historical segment. This historical segment is resampled and divided into sixty two-second time windows. Within each two-second time window, the exercise ECG feature set, including R wave peak value, QRS width, T wave morphology, and heart rate variability, is recalculated according to the same logic as the feature extraction module.

[0027] It can be understood that the electrocardiogram (ECG) feature sets within each time window are arranged chronologically and plotted as a feature trajectory diagram. This feature trajectory diagram is a two-dimensional coordinate system, with the horizontal axis representing the time window number and the vertical axis representing the normalized feature values. On the feature trajectory diagram, inflection points where abrupt changes occur are identified by calculating the Euclidean distance between the feature vectors of adjacent time windows. In practice, when the Euclidean distance between the feature vectors of a time window and its predecessor exceeds a preset threshold of three standard deviations, that time window is marked as an inflection point. Optionally, the time window corresponding to the inflection point is the moment of occurrence of a critical physiological event. For example, an inflection point on the heart rate variability feature trajectory may correspond to a sharp change in autonomic nerve tension. The occurrence times of each critical physiological event are concatenated chronologically to form a critical physiological event sequence. The state inversion module outputs this sequence to the early warning generation module for subsequent analysis.

[0028] In one embodiment of the present invention, the early warning generation module receives a key physiological event sequence from the state inversion module. The key physiological event sequence is a list arranged by timestamps, and each entry in the list contains a time window identifier and a type of characteristic abnormality detected within that window. The early warning generation module traverses the key physiological event sequence and searches for the first entry marked as "abnormal T-wave morphology". For example, when traversing to the third record in the sequence, if the characteristic abnormality type field of that record is "abnormal T-wave morphology", then the center time of the time window corresponding to that record is marked as a candidate start time. The system examines the heart rate variability characteristics within a time window prior to the candidate start time. In a specific implementation, the system extracts all values ​​of the heart rate variability characteristics in the 60 seconds before the candidate start time, calculates the linear regression slope of these values ​​over time, and if the linear regression slope is negative and its absolute value is greater than a preset threshold, then it is determined that the heart rate variability characteristics show a significant downward trend, thereby confirming the candidate start time as the start time of the risk occurrence. The system analyzes the changes in exercise intensity before and after the start time. It reads the average exercise intensity data for the 30 seconds before and after the start time. If the average exercise intensity data for the 30 seconds after the start time increases by more than 50% compared to the average exercise intensity data for the 30 seconds before the start time, it is determined that the exercise intensity has increased sharply in a short period, thus identifying excessive exercise load as the dominant cause. If the increase in average exercise intensity data does not exceed 50%, the system further examines the changes in QRS wave width before and after the start time. The system compares the average QRS wave width of the 10 cardiac cycles before and after the start time. In some embodiments, the width change rate is calculated using the following formula: in: Indicates the rate of change of QRS width. This represents the average QRS width over the first 10 cardiac cycles prior to the start time. This represents the average QRS width over the first 10 cardiac cycles after the onset of the heartbeat. If the rate of change in QRS width... If the percentage is greater than 10%, it is determined that the QRS wave width is widened, thus identifying electrolyte imbalance or myocardial ischemia as the dominant cause.

[0029] In one embodiment of the present invention, the early warning generation module receives a key physiological event sequence from the state inversion module. The key physiological event sequence is a list arranged by timestamps, and each entry in the list contains a time window identifier and a type of characteristic abnormality detected within that window. The early warning generation module traverses the key physiological event sequence and searches for the first entry marked as "abnormal T-wave morphology". For example, when traversing to the third record in the sequence, if the characteristic abnormality type field of that record is "abnormal T-wave morphology", then the center time of the time window corresponding to that record is marked as a candidate start time. The system examines the heart rate variability characteristics within a time window prior to the candidate start time. In a specific implementation, the system extracts all values ​​of the heart rate variability characteristics in the 60 seconds before the candidate start time, calculates the linear regression slope of these values ​​over time, and if the linear regression slope is negative and its absolute value is greater than a preset threshold, then it is determined that the heart rate variability characteristics show a significant downward trend, thereby confirming the candidate start time as the start time of the risk occurrence. Analyzing the changes in exercise intensity before and after the start time, the system reads the average exercise intensity data for the 30 seconds before and after the start time. It can be understood that if the average exercise intensity data for the 30 seconds after the start time increases by more than 50% compared to the average exercise intensity data for the 30 seconds before the start time, it is determined that the exercise intensity has increased sharply in a short period of time, thus identifying excessive exercise load as the dominant cause. Subsequently, the warning generation module generates a warning log containing a timestamp and event type based on the identified start time and dominant cause, and immediately triggers a linkage response. The response includes emitting an alarm sound through the wearable device's speaker and controlling the LED indicator to flash red for immediate alarm. Simultaneously, the system sends a command to the defibrillator integrated into the same device (e.g., a defibrillator similar to an AED integrated into a wearable ECG acquisition device) to initiate the defibrillation intervention preparation process. This unit then performs a self-check and puts the high-voltage capacitor circuit into a pre-charge standby state. The system will continuously monitor the ECG signal, and if it confirms that the heart rhythm has deteriorated to the point requiring electric shock therapy, it will control the defibrillator to perform electric shock intervention when safety conditions are met.

[0030] In practical implementation, the risk recording module creates a data structure to store complete information for a single warning. This data structure contains three fields: a timestamp field, a warning log field, and a score snapshot field. The risk start time, dominant trigger type, and event type from the warning log are filled into the timestamp and warning log fields. For example, the timestamp field records "2026-03-16 10:30:25," and the warning log field records "Started at 10:30:25, dominant trigger: excessive exercise load, event type: T-wave abnormality with decreased heart rate variability." The cardiac function status score at the moment the warning was triggered is read and stored along with the exercise intensity data at that time in the score snapshot field. In some embodiments, the score snapshot field is stored as key-value pairs. The data structure is serialized and written to a local cache queue. The serialization uses JSON format, and the local cache queue is a buffer with first-in, first-out characteristics. Optionally, the mode switching module continuously monitors the cardiac function status score in the latest risk event record in the local cache queue, while the cyclic warning module executes different sampling and judgment logics according to the system operating mode.

[0031] See Figure 3 This is a QRS width change rate analysis chart used to determine the dominant trigger for exercise-induced ECG risk events. The QRS width fluctuated between 70 and 90 ms from 0 to 60 seconds, with a stable mean of 80.3 ms, which is within the normal range. After 60 seconds, the waveform amplitude increased significantly, with multiple peaks exceeding 100 ms, and the mean rose to 88.2 ms, indicating abnormal ECG conduction. The change rate was approximately 9.8%, which did not reach the preset 10% widening threshold. If the exercise intensity increases sharply after the risk moment, excessive exercise load is more likely to be the dominant trigger; if the exercise intensity remains stable, other factors need to be further investigated. QRS widening is usually associated with ventricular conduction delay, myocardial ischemia, or electrolyte imbalance and is an important warning sign of malignant arrhythmias. The near 10% change rate in this case suggests a mild conduction abnormality, and the risk level needs to be comprehensively assessed in conjunction with HRV, T wave morphology, and other characteristics.

[0032] In one embodiment of the present invention, the mode switching module sets a fixed monitoring time window length, for example, setting each monitoring time window length to thirty seconds. At the end of each monitoring time window, the mode switching module reads the latest cardiac function status score output by the edge inference module within that time window. The mode switching module maintains a counter to track continuous risk states. Whenever a cardiac function status score is detected to be lower than a preset safety line within a monitoring time window, the counter value is incremented by one. The safety line value is independent of the risk threshold, for example, it can be set to seventy. When the counter value reaches a preset frequency threshold, it is determined that the current state is a continuous high-risk state. The frequency threshold is usually set to two. Once a continuous high-risk state is determined, the mode switching module immediately sends a control command to the system's data acquisition module to modify the sampling rate configuration of the data acquisition module, for example, increasing the sampling frequency of the ECG signal from the conventional 250 times per second to 500 times per second or higher, thereby completing the switch from the conventional sampling mode to the high-frequency sampling mode. It can be understood that the specific values ​​of the monitoring time window, safety line, and frequency threshold can be preset in the system configuration according to different application scenarios. In some embodiments, refer to Table 1 for specific logical examples of the mode switching module monitoring changes in cardiac function status scores.

[0033] Table 1: Mode Switching Judgment Table The cyclical early warning module begins operation in high-frequency sampling mode. It shortens the call interval of the lightweight inference calculation model, outputting a new cardiac function status score at fixed short intervals, for example, reducing the call interval from the usual one second to 0.5 seconds. Each newly output cardiac function status score is reassessed, using the same risk threshold as in the normal mode. If the cardiac function status score remains below the 60-point risk threshold, the cyclical early warning module re-triggers the state inversion process and updates the warning log based on the new analysis results. In the new round of state inversion, the system utilizes the ECG signal data obtained from high-frequency sampling, focusing on and analyzing subtle waveform changes. For example, it uses higher-precision algorithms to capture minute variations in QRS complex morphology or sudden shortening of the RR interval, which may indicate premature ventricular contractions or short runs of ventricular tachycardia. This capture of subtle waveform changes is achieved by analyzing the differential characteristics between adjacent signal points under high-frequency sampling. In some embodiments, the following formula is used to calculate the trend of score changes between adjacent sampling points to aid in the judgment: in: This indicates the change in cardiac function status score over a unit of time. This represents the latest calculated cardiac function status score. This represents the cardiac function status score obtained from the last calculation. This indicates the time interval between the two calculations. The cyclical early warning module continuously tracks the changing trend of the cardiac function status score. When it detects that the cardiac function status score has risen back to the safe range and remained stable for three consecutive monitoring cycles, the cyclical early warning module sends a command to the mode switching module to reset the counter and switch the system operating mode back to the normal sampling mode. Optionally, the mode switching module, while switching back to the normal sampling mode, packages all risk event records generated during the current early warning cycle and marks the early warning process as ended.

[0034] See Figure 4 This is a closed-loop feedback and correction factor analysis chart, demonstrating the positive correlation between the correction factor of the edge computing node model and the improvement in the accuracy of the early warning system. It represents the core effect verification of the closed-loop feedback module. A strong positive linear relationship is shown; for every 0.01 increase in the correction factor, the accuracy improves by an average of approximately 0.14%. The curve slope is stable with no obvious inflection point, indicating that the model's response to the correction factor is linear and controllable. The introduction of the correction factor effectively compensates for the model differences between edge nodes and cloud servers, reducing performance losses caused by limited edge computing resources. The recommended optimal correction factor range is 0.05–0.08. Within this range, the accuracy improvement exceeds 5.5%, with moderate computational overhead. The correction factor strategy in the closed-loop feedback mechanism is effective and can significantly improve the early warning accuracy of edge nodes.

[0035] In one embodiment of the present invention, the closed-loop feedback module starts working after each warning is marked as completed. The closed-loop feedback module retrieves the complete risk event record and the corresponding raw continuous electrocardiogram (ECG) signal data corresponding to the warning from local storage. The complete risk event record includes a warning log and a snapshot of cardiac function status scores, and the raw continuous ECG signal data corresponds to the raw waveforms collected during the warning period. The closed-loop feedback module packages this data according to a preset encapsulation format, such as serializing the data into data packets of a specific protocol, and uploads it to a cloud server via a network connection. After receiving the data packets, the cloud server uses an offline analysis tool to evaluate the accuracy of the warning. In some embodiments, the offline analysis tool compares and analyzes the raw continuous ECG signal data with the warning log in the risk event record, verifies whether there are any signs of malignant arrhythmia at the time of the warning using a more complex offline ECG analysis algorithm, and generates a Boolean judgment result on the accuracy of the warning based on expert annotations. Based on the Boolean decision result, the cloud server generates a correction factor. This correction factor is a floating-point number used to adjust the sensitivity of the edge reasoning model. For example, if the warning is determined to be accurate, a correction factor slightly greater than 1.0 is generated to appropriately increase sensitivity; if the warning is determined to be a false alarm, a correction factor slightly less than 1.0 is generated to appropriately decrease sensitivity. (Generating the correction factor) The formula can be expressed as: in: Indicates the correction factor. This represents a preset learning rate coefficient, whose value is a positive decimal much less than 1. This indicates the accuracy assessment result provided by the cloud-based offline analysis; when the warning is accurate... The value is 1, indicating that the warning is a false alarm. The value is 0. This means the cloud server will send the generated correction factor to the edge computing node that triggered the alert.

[0036] During the next system run, the lightweight inference computing model deployed on the edge computing node will incorporate a correction factor for fine-tuning when calculating the cardiac function status score. In practice, before outputting the final score, the model will compare the preliminary score calculation result with the correction factor. Multiplying these results yields the fine-tuned final cardiac function status score. The system then uses this fine-tuned score to perform a retrospective verification against locally stored historical data. The retrospective verification selects data segments that did not trigger warnings within a certain period but whose cardiac function status scores are close to the risk threshold. The fine-tuned model is used to recalculate the cardiac function status scores for these data segments, and the number of newly triggered warnings after the score change is counted. If the verification results show that, without introducing new false alarms, the detection rate of true risk in historical data has improved, or the number of false alarms has decreased, then the false alarm rate is considered reduced. Optionally, when the false alarm rate is considered reduced, the system adjusts the currently used correction factor. The value is permanently stored in the non-volatile memory of the edge computing node, serving as the baseline parameter for the next online update of the lightweight inference computing model on that node.

[0037] See Figure 5 This is a graph illustrating the preprocessing and feature extraction analysis of an electrocardiogram (ECG) signal. It visually compares the original and preprocessed ECG signals, representing a core validation result of the signal preprocessing module. High-frequency spikes and baseline drift in the original signal are significantly eliminated, resulting in a smoother waveform and clearer contours after preprocessing. The original signal exhibited significant baseline shifts, while the preprocessed signal's baseline stabilizes near 0, facilitating subsequent feature extraction such as R-waves and QRS complexities. The amplitude and morphology of key ECG waveforms are fully preserved without information loss due to filtering. The preprocessed signal is more suitable for lightweight model inference in edge computing nodes, reducing the complexity and false positive rate of feature extraction. A clear waveform is fundamental for accurately identifying key ECG features such as R-wave peak value, QRS width, and T-wave morphology, directly impacting the accuracy of subsequent cardiac function scoring and risk warnings.

[0038] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A real-time exercise ECG analysis and sudden cardiac death risk warning system based on edge computing, characterized in that, include: The signal preprocessing module uses a wearable ECG acquisition device to acquire continuous ECG signals during exercise, performs bandpass filtering and baseline drift correction on the continuous ECG signals, and obtains the preprocessed ECG waveform. The feature extraction module extracts time-domain features, including R-wave peak value, QRS width and T-wave morphology, based on the preprocessed ECG waveform, and also extracts heart rate variability features to form an exercise ECG feature set. The edge inference module inputs the exercise ECG feature set into a lightweight inference computing model deployed on an edge computing node. The lightweight inference computing model outputs a real-time cardiac function status score based on the feature distribution under the current exercise state. The risk warning module, based on the cardiac function status score and combined with a pre-set risk threshold, determines whether there are any precursors to sudden malignant arrhythmias at the current moment; If the state inversion module determines that there is a precursor, it triggers a state inversion process. The state inversion process uses the historical segments of the continuous electrocardiogram signal and the temporal changes of the exercise electrocardiogram feature set to reconstruct the sequence of key physiological events that led to the current risk state. The early warning generation module locates the starting time and dominant trigger of the risk based on the key physiological event sequence, and generates an early warning log containing a timestamp and event type. When it determines that there are signs of malignant arrhythmia, it promptly triggers alarms in the form of sound, light and electricity, and at the same time controls the defibrillation unit integrated into the wearable data acquisition device to perform defibrillation intervention.

2. The edge computing-based real-time exercise ECG analysis and sudden cardiac death risk warning system as described in claim 1, characterized in that, The continuous electrocardiogram (ECG) signal is bandpass filtered and baseline drift corrected to obtain a preprocessed ECG waveform, including: The continuous electrocardiogram signal is acquired by a single-lead electrode attached to the chest of the target subject, and exercise intensity data is recorded simultaneously. The continuous electrocardiogram signal is processed using a digital filter to remove high-frequency electromyographic interference with frequencies above 150 Hz and power frequency noise below 0.5 Hz. By detecting the local minimum point of the signal amplitude in the electrocardiogram (ECG) signal, a slowly changing baseline curve is fitted, and the baseline curve is subtracted from the continuous ECG signal to eliminate baseline drift caused by respiration. The ECG signal after denoising and drift removal is segmented, with each segment having a fixed length of one cardiac cycle. A Hanning window is used to smooth the transition between segments, resulting in a continuous preprocessed ECG waveform.

3. The edge computing-based real-time exercise ECG analysis and sudden death risk warning system as described in claim 2, characterized in that, Based on the preprocessed ECG waveform, time-domain features including R-wave peak value, QRS width, and T-wave morphology are extracted, and heart rate variability features are also extracted to form an exercise ECG feature set, including: In each segment of the preprocessed ECG waveform, the R-wave peak is located by the first derivative zero-crossing method, and its amplitude is recorded as the R-wave peak value. The time interval between the start and end points of the R wave is measured to obtain the QRS wave width, and the presence of notches or stutters within the QRS wave is detected. After the R-wave peak, find the start and end points of the T-wave, and calculate the height and slope of the T-wave. When the T-wave is inverted or peaked, it is marked as an abnormal T-wave pattern. The time intervals between several consecutive R wave peaks are taken as the RR interval sequence. The RR interval sequence is differentially processed to obtain the difference sequence of adjacent heartbeat intervals. The standard deviation of the difference sequence is calculated as a feature of heart rate variability. The R-wave peak value, QRS width, T-wave morphology, and heart rate variability characteristics are arranged in chronological order and combined to form the exercise electrocardiogram feature set.

4. The edge computing-based real-time exercise ECG analysis and sudden death risk warning system as described in claim 3, characterized in that, The lightweight inference computation model outputs a real-time cardiac function status score based on the feature distribution under the current motion state, including: A pre-trained decision tree ensemble model is loaded on an edge computing node, the decision tree ensemble model taking the exercise ECG feature set as input; During each calculation, a subset of features matching the current exercise intensity data is selected from the exercise ECG feature set. The feature subset contains only ECG indicators related to the current metabolic level. The feature subset is input into the decision tree ensemble model, and multiple decision trees perform splitting judgments in parallel, with each tree outputting a binary classification result; The outputs of multiple decision trees are weighted and voted on, and the voting results are mapped to a value between 0 and 100, which is the real-time cardiac function status score.

5. The edge computing-based real-time exercise ECG analysis and sudden cardiac death risk warning system as described in claim 4, characterized in that, If the judgment result indicates the presence of a precursor, a state inversion process is triggered. This state inversion process utilizes historical segments of the continuous electrocardiogram signal and temporal changes in the exercise electrocardiogram feature set to reconstruct the sequence of key physiological events leading to the current risk state, including: When the cardiac function status score is lower than the risk threshold, the data from the most recent two minutes of the continuous electrocardiogram signal is extracted as a historical segment. The historical segments are resampled, divided into several small time windows, and the exercise ECG feature set is recalculated once in each time window; Arrange the electrocardiogram feature sets within each time window in chronological order and plot them as feature trajectory diagrams. On the feature trajectory map, the inflection point where the feature trajectory changes abruptly is identified, and the time window corresponding to the inflection point is the moment when the key physiological event occurs. The occurrence times of each key physiological event are linked together in chronological order to form the sequence of key physiological events.

6. The edge computing-based real-time exercise ECG analysis and sudden cardiac death risk warning system as described in claim 5, characterized in that, Based on the sequence of key physiological events, the starting point and dominant trigger of the risk are located, including: Traverse the sequence of key physiological events, find the first entry with an abnormal T-wave morphology, and mark the time corresponding to the entry as a candidate start time; Examine the heart rate variability characteristics within a time window prior to the candidate start time. If the heart rate variability characteristics show a significant downward trend, then the candidate start time is confirmed as the start time of the risk. Analyze the changes in exercise intensity before and after the starting moment. If the exercise intensity increases sharply in a short period of time, then excessive exercise load is identified as the dominant cause. If the exercise intensity is stable, further examine the changes in QRS width before and after the start time. If the QRS width increases, electrolyte imbalance or myocardial ischemia is identified as the dominant cause.

7. The edge computing-based real-time exercise ECG analysis and sudden death risk warning system as described in claim 6, characterized in that, Also includes: The risk recording module associates the warning log with the current cardiac function status score to form a complete risk event record; The mode switching module continuously monitors the changes in cardiac function status scores in the risk event records. When the score is below the safety line for two consecutive time windows, the system operation mode is switched to high-frequency sampling mode. The cyclical early warning module, in high-frequency sampling mode, repeatedly executes the entire process from the output score of the lightweight inference calculation model to the generation of risk event records until the cardiac function status score recovers to the safe range, and the early warning ends. The warning log is correlated with the current cardiac function status score to form a complete risk event record, including: Create a data structure to store complete information for a single warning, the data structure including a timestamp field, a warning log field, and a scoring snapshot field; Fill the timestamp field and the warning log field with the risk start time, dominant trigger type and event type contained in the warning log; Read the cardiac function status score at the moment the warning was triggered, and store it together with the exercise intensity data at that time into the score snapshot field; The data structure is serialized and then written to a local cache queue.

8. The edge computing-based real-time exercise ECG analysis and sudden death risk warning system as described in claim 7, characterized in that, The continuous monitoring of changes in cardiac function status scores in the risk event records, and the switching of the system operating mode to high-frequency sampling mode when the score is below the safety threshold for two consecutive time windows, includes: Set a fixed monitoring time window length, and at the end of each time window, read the latest cardiac function status score within the time window; Maintain a counter, and increment the value of the counter by one whenever a cardiac function status score is detected to be below the safety threshold; When the value of the counter reaches a preset threshold number of times, it is determined that the current state is in a state of continuous high risk. Once a sustained high-risk state is determined, immediately modify the sampling rate configuration of the data acquisition module, increasing the sampling frequency to more than twice the original frequency, and complete the switch to high-frequency sampling mode.

9. The edge computing-based real-time exercise ECG analysis and sudden death risk warning system as described in claim 8, characterized in that, In the high-frequency sampling mode, the entire process from the output score of the lightweight inference calculation model to the generation of a risk event record is repeatedly executed until the cardiac function status score recovers to the safe range, at which point the warning ends. This includes: In high-frequency sampling mode, the call interval of the lightweight inference computing model is shortened so that it outputs a new cardiac function status score every fixed short interval. The score of the new output is reassessed. If the score is still below the risk threshold, the state inversion process is retried and the warning log is updated. In the new round of state inversion process, we focus on the subtle waveform changes brought about by high-frequency sampling to capture the signs of premature ventricular contractions or short runs of ventricular tachycardia. The system continuously tracks the trend of changes in cardiac function status scores. When the score is detected to rise continuously to a safe range and remain stable, the counter is reset and the system operation mode is switched back to the normal sampling mode. At the same time, the complete record of this warning is marked as ended.

10. The edge computing-based real-time exercise ECG analysis and sudden cardiac death risk warning system as described in claim 9, characterized in that, Also includes: The closed-loop feedback module packages and uploads the complete risk event record and the corresponding raw continuous electrocardiogram signal to the cloud server after each warning. The cloud server uses offline analysis tools to assess the accuracy of this warning and generate a correction factor; The correction factor is distributed to the edge computing node. In the next run, the lightweight inference computing model will incorporate the correction factor for fine-tuning when calculating the cardiac function status score. The adjusted scores are used to backtest the historical data. If the results show that the false alarm rate has decreased, the current correction factor is fixed as the benchmark for the next update.