[Paper Review] Complex Event Processing of Health Data in Real-time to Predict Heart Failure Risk and Stress
This paper proposes a scalable, real-time complex event processing (CEP) architecture using Apache Kafka and Spark Streaming to detect heart failure risk and stress levels from continuous health data streams. The system ingests real-time physiological signals, processes them in sliding windows, and applies signal processing and machine learning to predict clinical risk scores with high scalability and fault tolerance.
In this paper, we develop a scalable system which can do real-time analytics for different health applications. The occurrence of different health conditions can be regarded as the complex events and thus this concept can be extended to other use cases easily. Large number of users should be able to send the data in real-time, and should be able to receive the feedback and result. Keeping the requirements in mind we used Kafka and Spark to develop our system. In this setting, multiple users are running Kafka producer clients, which are sending data in real-time. Spark streaming is used to process data from Kafka of different window sizes to analyze the health conditions. We have developed and tested the heart attack risk and stress prediction as our sample complex events detection use cases. We have simulated and tested our system with multiple health datasets.
Motivation & Objective
- Address the challenge of scalable, real-time health analytics for large-scale user populations with diverse physiological data sources.
- Design a general-purpose, extensible platform that supports multiple health inference use cases beyond specific applications.
- Enable low-latency, fault-tolerant processing of high-velocity health data streams using distributed streaming frameworks.
- Demonstrate the feasibility of real-time detection of clinically relevant events such as heart failure risk and stress using signal processing and streaming analytics.
Proposed method
- Utilizes Apache Kafka as a distributed message broker to ingest real-time health data streams from multiple users, with topic-based routing for different sensor types (e.g., ECG, BP).
- Employs Apache Spark Streaming to process data in sliding windows, enabling real-time analytics on time-series physiological signals.
- Applies signal processing techniques to extract key ECG waveform features (P, QRS, T waves) and RR interval variations for heart rate variability (HRV) analysis.
- Uses HRV trends and heart rate changes across consecutive windows to compute a dynamic stress index, with baseline adaptation per window.
- Implements each health use case (CHF risk, stress index) as a separate Spark Streaming job, enabling modularity and extensibility.
- Deploys the system on a cluster environment to ensure fault tolerance, horizontal scalability, and reliability under high-load conditions.
Experimental results
Research questions
- RQ1Can a general-purpose, distributed streaming architecture effectively support real-time health analytics at scale across multiple users?
- RQ2How accurately can real-time CEP detect clinically relevant events such as elevated heart failure risk and stress levels from continuous ECG and BP data?
- RQ3To what extent can Kafka and Spark Streaming enable fault-tolerant, scalable processing of high-velocity health data streams?
- RQ4Can the system be extended to support new health inference use cases with minimal architectural changes?
- RQ5How do signal processing features like HRV and ECG morphology contribute to reliable real-time risk prediction in streaming mode?
Key findings
- The system successfully predicted heart failure risk at 1.2% for a normal ECG waveform, 12.5% for an abnormal S-wave, and 20.6% for an ST-depression pattern, demonstrating sensitivity to clinically relevant ECG changes.
- The stress index increased from 0.1 to 0.5 over five consecutive windows due to declining HRV, even with stable heart rate, indicating effective detection of sympathetic nervous system activation.
- The prototype achieved real-time processing of simulated health data streams using Kafka producers and Spark Streaming jobs, confirming the feasibility of low-latency analytics.
- The architecture supports modular deployment of multiple health inference jobs (e.g., CHF risk, stress) as independent Spark Streaming applications, enabling extensibility.
- The system demonstrated fault tolerance and scalability through the use of Kafka’s persistent storage and Spark’s resilient distributed datasets (RDDs) and in-memory processing.
- The implementation using Java on a local cluster confirmed that the proposed CEP pipeline can be deployed and executed reliably for real-time health monitoring use cases.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.