1 Introduction

Healthcare is one sector that has stood to benefit greatly from the revolutionary effects of the Internet of Things (IoT). The IoT can transform healthcare by linking various systems, sensors, and medical equipment. This might lead to a dramatic improvement in patient monitoring and diagnosis. Combining convolutional neural network (CNN) and long short-term memory (LSTM) algorithms is an intriguing strategy for sifting through the mountains of healthcare data produced by IoT devices. When combined, the two algorithms' strengths and shortcomings can assist find significant patterns and links in healthcare data that is complicated and constantly changing. The capacity to remotely monitor patients is a big benefit of the IoT in healthcare, as it can lead to better care quality and results. By collecting data in real-time, medical sensors, wearable gadgets, and other monitoring devices can help doctors get a better picture of a patient's health. Analyzing healthcare data has been particularly fruitful for the CNN + LSTM approach. LSTM excels at processing sequential data, temporal correlations, and prediction, but CNN shines at image and signal processing.

Medical practitioners can improve the precision of their diagnoses and the individualization of their treatment programs by integrating these two robust deep learning algorithms. Ensuring the confidentiality and accuracy of patient information is an essential goal of any healthcare data system. Secure blockchain technology is being used by numerous healthcare systems that are connected to the IoT to solve this problem and keep patient data safe. The distributed ledger technology known as blockchain removes a potential vulnerability in patient records by eliminating a central point of failure. This safeguards patients' right to privacy while also granting authorized individuals access to their whole medical record. Global healthcare systems might be radically altered by the convergence of several developments in the IoT, deep learning algorithms, and trustworthy blockchain technology.

Healthcare providers can better meet the needs of their patients by utilizing these emerging technologies, which allow for more accurate diagnosis, quicker interventions, and better preventative monitoring. Thanks to these resources, healthcare providers and patients alike may rest easy knowing that they are receiving top-notch treatment. Here, the difficulty lies in improving patient monitoring and diagnosis through the application of deep learning techniques, which are contributing to the transformation that the IoT is bringing to the healthcare industry.

The aim of this research is to create a smart system for health monitoring and diagnosis using deep learning algorithms and internet-connected sensors. In this context, "X" represents various patient monitoring equipment linked to the IoT, while "Y" signifies the collection of data from IoT devices, such as a patient's temperature and blood pressure. "D" denotes a registry of potential patient health issues that must be documented. The predicted diagnosis from the deep learning model, based on information from internet-connected devices, is denoted as F(X). The accurate diagnosis is derived from expert opinions and various medical investigations. The problem can be described as follows: Using a dataset of patient health metrics obtained through the IoT, the goal is to train a deep learning (DL) model, F(X), to accurately predict diagnoses. This involves incorporating traits gleaned from IoT devices into the model to improve the accuracy and utility of conventional diagnostic methods. The first step is gathering and preparing data by collecting health data from IoT devices, ensuring the data's authenticity and reliability. This data must be preprocessed to remove irrelevant or missing values, outliers, and noise, extracting useful information. Once the data is ready, appropriate deep learning techniques, such as Convolutional Neural Networks (CNNs) or Recurrent Neural Networks (RNNs), are applied to train the F(X) model. This includes selecting the correct optimization techniques and loss functions to optimize the model parameters.

With the trained model, diagnoses can be generated based on the patient's medical history and the model's parameters. The model's predicted diagnosis, or forecast, is then analyzed. The predicted diagnosis is evaluated against the actual diagnosis using metrics such as accuracy, precision, recall, and F1-score. This process helps validate the efficacy and reliability of the DL system in monitoring and diagnosing patients using the IoT. By following these steps, the research aims to develop a reliable and effective DL system that improves patient monitoring and diagnostic accuracy through the use of IoT-connected devices. This system leverages advanced data collection and analysis techniques to provide timely and accurate health insights, ultimately enhancing patient care and outcomes.

2 Related work

Advancements in healthcare technology, particularly in patient monitoring and diagnosis, have primarily focused on the utilization of DL methods, specifically CNNs and LSTMs. This cooperative integration of algorithms aims to fully exploit the spatial feature extraction abilities of CNNs alongside the temporal dependence comprehension capabilities of LSTMs. T. T. Chhowa et al. [1] employed a DL algorithm to investigate ways to track and assess health issues utilising collaborative medical big data from the IoT. However, recent research in this area has found that machine learning algorithms used in struggling industries are not sufficiently accurate for IoT-based big medical data and still require human intervention for feature extraction.

A. Ahmadi et al. [2] utilized a non-invasive way for cardiac tracking over a period of 24 h, known as ambulatory electrocardiography, which monitors the heart's electrical activity. This test can identify factors for heart disease prevention. An intelligent heart rate monitoring model, based on a deep cardiac learning algorithm, predicts a patient's survival following cardiac arrest by relying on continuous heart rate monitoring. This approach has led to improved chances of recovery for heart disease patients due to increased prevention and early intervention.

V. Veeraiah et al. [3] described an IoT system that uses ensemble deep transfer learning for early diagnosis of COVID-19. This system allows for real time of potentially harmful COVID-19 cases with precautions measures. Many DL models are used in the proposed IoT architecture. The study found that the suggested this system helped radiologists to rapidly and reliably identify COVID-19 patients. A functional ID that meets COVID-19 standards and operates with the IoT are also used.

S. Sarmah et al. [4] described a system where device data is encrypted using PDH-AES before being transferred to the cloud. After decoding the encrypted data, the DLMNN classifier categories it into two types: normal and abnormal. This classification provides doctors with an overview of the patient's heart health and sends alerts if results indicate issues. The study suggests that the DLMNN outperforms previous techniques in diagnosing heart disease. PDH-AES ensures maximum security during data transfer, with a 95.87 percent success rate, and it encrypts and decrypts data more quickly than AES.

T. Deepa et al. [6] suggested using RTFMHS—real-time face mask with health screening—during pandemics. This system employs a multi-level high-speed augmented CNN for intelligent face mask recognition in real time on an IoT node. It also transmits health indicators, such as non-contact body temperature sensors and blood oxygen saturation, to the fog cloud for adjustment and display. The MLHS-CNN-based approach ensures proper mask usage, while a fog server's real-time RNN assesses each user's health status and the illness's spread. The use of deep learning tools in a cloud-based IoT fog environment allows for data analysis and diagnosis. The test findings demonstrated superior accuracy, precision, memory efficiency, and temporal complexity compared to the current state of the art.

B. M. Elbagoury et al. [12] aimed to predict stroke symptoms such paralysis, numbness, loss of vision, mental disorientation, and inability to move or speak, including the possibility of sudden death. Mobile health research has not yet advanced enough to use remote intelligence for strokes diagnosis, despite its potential to save lives in critical situations. This article also suggests integrating a Hybrid Intelligent remote diagnostic tool into mobile health apps to enhance stroke prediction and detection. The hybrid methods involve training neural networks using Group Method of Data Handling (GMDH) and Sparse Auto-Encoders deep learning techniques.

Table 1 provides an overview of the methodologies, benefits, limitations, and conclusions of various research efforts, highlighting their contributions to IoT-enabled healthcare transformation and other related domains. On the other hand, Table 2 provides a high-level review of the advantages and disadvantages of each algorithm for using deep learning for advanced patient monitoring and diagnosis [13].

Table 1 Comparative analysis
Table 2 Comparing Deep Learning Algorithms for IoT-Enabled Healthcare Transformation: Improving Advanced Patient Monitoring and Diagnosis

3 Proposed methodology

In this section, Figs. 1 and 2 visually represent how IoT devices collect and transmit data to a central hub, which then the data are processed using advanced deep learning models. This integration enhances the quality of healthcare by enabling accurate and timely medical interventions, aligning with the transformative goals depicted in the figures [14]. Figure 3 shows the detailed steps of the proposed algorithm —from data collection and preprocessing to defining and combining CNN and LSTM layers, and deploying the model—demonstrating a seamless integration of IoT-enabled devices and deep learning techniques.

Fig. 1
figure 1

IoT-enabled patient monitoring and diagnosis

Fig. 2
figure 2

Proposed model for advanced patient monitoring and diagnosis

Fig. 3
figure 3

Proposed algorithm

Figure 1 illustrates how the IoT has accelerated the development of a healthcare tracking system. On the left, a series of health-related buttons are displayed. Clicking any of these buttons directs the user to a central hub called the "Connection Gateway." The Medical Monitoring Tools are represented by icons on the left side of the screen, showcasing various health-related sensors and tools such as heart rate monitors, blood pressure cuffs, and oxygen saturation meters. These tools collect essential health data from patients continuously. The Connection Gateway serves as the primary interface for connecting all the medical monitoring tools to the internet. It is responsible for gathering data from multiple devices and transmitting it to other nodes. This central node ensures seamless data flow from the devices to the subsequent stages of the system.

After passing through the connection gateway, the data is sent to a Cloud Network. In the cloud, the information is stored and analyzed using DL algorithms. This setup allows authorized users, such as family members or healthcare providers, to access the information remotely, providing them with timely updates on the patient's health status. One of the icons represents a Remote Control for Electronic Tools, signifying the capability for patients to manage and adjust their therapy and fitness equipment remotely. For instance, a screen displaying a runner on a track symbolizes devices aimed at fitness and therapy management. This remote-control feature enhances patient autonomy and convenience.

The system's fully interconnected layers utilize learned features for classification or regression, enabling the prediction of a patient's health status. This predictive capability can significantly improve the quality of care provided to patients. By leveraging DL models, the system can forecast potential health issues and recommend preemptive measures, thereby enhancing patient outcomes [15]. Another crucial element of the proposed technique is the LSTM) model. LSTMs are particularly effective at capturing sequential data, such as time series data and patient vitals, due to their recurrent neural network architecture. They are highly useful for analyzing vital medical signals like heart rate, blood pressure, and oxygen saturation, obtained through continuous patient monitoring. Consequently, LSTMs can detect unusual trends or patterns that may indicate potential health issues in a patient, allowing for timely intervention and improved patient care [16, 17].

Figure 2 presents a workflow for processing medical data, which combines deep learning techniques (CNN + LSTM) with training, testing, and analytical phases, all integrated with data from the IoT. The LSTM algorithm's network data flow is governed by its memory cells and gating mechanisms. These memory cells enable the LSTM to store and retrieve significant information from earlier observations, holding data for extended periods. The gating mechanisms within the LSTM are crucial for determining which information to forget or update based on the specific prediction task. By integrating CNN and LSTM features, the proposed algorithm provides state-of-the-art tracking and diagnostic capabilities. The CNN component excels in detecting diseases within diagnostic images, while the LSTM component identifies real-time trends in patient monitoring data that could indicate potential health issues.

Leveraging data from various IoT devices, such as wearable sensors and medical imaging equipment, this program monitors patients' health in real time. The healthcare sector reaps significant benefits from utilizing deep learning models like CNN and LSTM, as these models facilitate more accessible patient monitoring and identification through IoT integration. The program's ability to analyze medical images and continuous patient monitoring data aids healthcare professionals in early problem detection, accurate diagnosis, and prompt response, ultimately leading to improved patient outcomes and transformative changes in healthcare. The support provided to doctors and nurses through this advanced system is invaluable, enhancing their ability to identify, diagnose, and treat patients more effectively. The combination of deep learning and IoT technology represents a significant step forward in the ongoing evolution of healthcare, offering improved diagnostic accuracy and timely intervention capabilities.

Figure 3 presents the proposed algorithm which leverages deep learning techniques, specifically CNNs and LSTM networks, to advance patient monitoring and diagnosis in an IoT-enabled healthcare system. The process begins with setting up test and training data, where patient vitals such as ECG readings, medical images, temperature, and pulse rate are gathered and preprocessed. This data is then divided into training and test sets to ensure the model's performance can be evaluated on unseen data. Next, the CNN component of the algorithm starts with defining the input shape based on the dimensions of the input data. Convolutional layers are then created, specifying parameters such as the number of filters, kernel size, activation function ('relu'), and stride. These layers are appended to a list, with pooling layers added if necessary to reduce the dimensionality and dropout layers to prevent overfitting. Once the required convolutional layers are defined, the output is flattened to convert the multi-dimensional data into a one-dimensional array suitable for the LSTM input.

Next, the LSTM component is configured by defining the input shape based on the flattened output from the CNN. LSTM layers are created with parameters such as the number of units and activation functions ('tanh' and 'sigmoid') and added to a list. Dropout layers are included to further regularize the model. The process of adding LSTM layers continues until the desired architecture is achieved. The outputs from the convolutional layers and LSTM layers are then combined to form a cohesive model. The final stage involves defining an output layer with several units corresponding to the possible diagnoses and using a 'softmax' activation function. The model is then compiled with a loss function ('categorical crossentropy'), an optimizer ('adam'), and an evaluation metric ('accuracy'). Before deployment, it is essential to ensure that the device (e.g., IoT gateway) is ready to utilize the model for making predictions.

4 Results analysis

The proposed methodology illustrates how IoT devices and deep learning techniques enhance patient monitoring and diagnostics. Figure 1 depicts various medical monitoring tools, such as ECG monitors, medical imaging devices, temperature sensors, and pulse rate monitors. These tools are the primary sources of patient data for the algorithm. The process begins with setting up and loading these vital signs into the system for processing. The Connection Gateway acts as a central hub that aggregates data from these monitoring tools and transmits it to the cloud. The collected data is then prepared for subsequent training and testing of deep learning models. Once the data is transmitted through the Connection Gateway, it is stored and analyzed in the cloud network, as depicted in Fig. 1. The data are splitted into training and test sets, and then the CNNs and LST) models are applied for in-depth analysis. The integration of CNNs and LSTMs is further elaborated in Fig. 2, which outlines a workflow that combines these models for processing medical data. In the algorithm, CNNs are utilized for image analysis, effectively detecting diseases within diagnostic images. Meanwhile, LSTMs analyze sequential data, identifying trends and patterns in patient vitals such as heart rate and blood pressure.

Figure 2 also details the training, testing, and analytical phases of the workflow, which are mirrored in the proposed algorithm. The algorithm includes defining input shapes, setting up convolutional layers, flattening outputs, and defining LSTM input shapes. These steps are followed by combining the layers and compiling the model. Additionally, Fig. 2 highlights the use of LSTM’s memory cells and gating mechanisms for storing and retrieving significant information. This capability is integral to the proposed algorithm, enabling effective temporal analysis of patient data and enhancing real-time monitoring and diagnostics. Finally, the integration of CNN and LSTM features for advanced tracking and diagnostics, as illustrated in Fig. 2, is a core aspect of the proposed algorithm. By leveraging data from IoT devices, the algorithm provides real-time health monitoring and diagnostic capabilities, facilitating timely medical interventions. This comprehensive approach ensures that the healthcare system can detect and address potential health issues promptly, ultimately leading to improved patient outcomes and transformative changes in healthcare delivery [5, 10, 11].

In the context of Figs. 1 and 2, CNNs are employed for analyzing medical imaging data, such as X-rays, CT scans, and MRIs. These networks can detect patterns and anomalies in images, facilitating early disease detection. The CNN layers, including convolutional and pooling layers, process the images to identify high-level features, contributing to the overall diagnostic capability of the proposed system [18]. On the other hand, LSTM networks, highlighted in Fig. 2, are crucial for analyzing temporal dependencies in patient data. They are used for monitoring vital signs such as heart rate and blood pressure, captured by IoT devices. The LSTM's ability to store and retrieve significant information over long periods enables the detection of trends and patterns that may indicate health issues, aligning with the system's goal of real-time monitoring and predictive analytics [19, 20].

By integrating CNNs and LSTMs, the algorithm efficiently processes both image data and sequential data, enabling comprehensive real-time patient monitoring and accurate health diagnostics [21, 22]. The use of IoT devices facilitates continuous data collection and analysis, providing timely and effective medical interventions. This combination of deep learning and IoT technology represents a significant advancement in healthcare, enhancing patient outcomes through improved monitoring and diagnostic capabilities.

Table 3 presents the simulation results and comparsion of the performance of the proposed CNN + LSTM algorithm against the other DL models, including CNNs, Support Vector Machines (SVMs), LSTM networks, K-Nearest Neighbors (KNN), and Random Forests. The datasets used for these models include Medical Information Mart for Intensive Care III (MIMIC-III) [23], PhysioNet [24], the Electronic Intensive Care Unit (eICU) Collaborative [25], MIMIC Chest X-ray [26], the Physikalisch-Technische Bundesanstalt (PTB) Diagnostic Electrocardiography (ECG) [27], and the eICU Clinical Database [25]. The aim of utilizing DL is to improve patient monitoring and diagnosis during this IoT-enabled healthcare transformation.

Table 3 Simulation and Results Analysis

The performance of the CNN + LSTM algorithm and other deep learning models in the context of IoT-enabled healthcare transformation is evaluated based on various metrics such as accuracy, precision, recall, and the F1-score. These metrics provide insights into the effectiveness of each model for patient monitoring and diagnosis. The proposed CNN + LSTM strategy demonstrated strong performance on the MIMIC-III dataset, achieving an F1-score of 0.85, an accuracy of 0.86, and a recall of 0.84. This indicates a high level of reliability in tracking and diagnosing patient conditions using this combined approach. Overall, these figures illustrate the effectiveness of the proposed CNN + LSTM algorithm and other DL models in enhancing patient monitoring and diagnostics in an IoT-enabled healthcare environment. The integration of these models allows for advanced analysis of patient data, facilitating timely and accurate medical interventions across various datasets.

The CNN model performed admirably on the PhysioNet dataset, with an F1-score of 0.81, an accuracy of 0.83, and a recall of 0.82. This shows the model’s capability in handling medical imaging data for disease detection and monitoring. For the eICU Collaborative dataset, the SVM model achieved an accuracy of 78%, with a precision of 0.79, a recall of 0.77, and an F1-score of 0.78. While slightly lower than the CNN and LSTM models, the SVM still provides valuable insights into patient data classification. The LSTM model exhibited excellent performance on the MIMIC-CXR dataset, achieving an accuracy of 87%, a precision of 0.88, a recall of 0.86, and an F1-score of 0.87. This underscores the model’s strength in processing sequential data and detecting temporal patterns in patient vitals. The KNN model, evaluated on the PTB Diagnostic ECG dataset, showed an accuracy of 75%, with precision, recall, and F1-scores of 0.76, 0.74, and 0.75, respectively. These results indicate that while KNN is effective, it may not be as robust as other models for this specific application. Finally, the Random Forest model performed well with the eICU Clinical Database, achieving an accuracy of 81%, a precision of 0.80, a recall of 0.82, and an F1-score of 0.81. This demonstrates the model’s effectiveness in handling complex patient data and making accurate predictions.

5 Conclusion

In this paper, we explored the potential of integrating IoT with deep learning techniques, specifically CNNs and LSTMs, to enhance patient monitoring and diagnosis. The proposed algorithm utilizes CNNs for image analysis and LSTMs for time-series data analysis, enabling real-time monitoring and accurate diagnostics. This integration significantly improves patient care and outcomes by leveraging IoT-connected medical tools for optimal data analysis.

The IoT enhances healthcare efficiency by simplifying patient tracking and diagnosis, facilitating remote monitoring, early disease detection, and personalized treatment plans. Wearable technology and sensors continuously provide critical health insights, aiding in the treatment of chronic diseases. Incorporating blockchain technology into the healthcare supply chain can further enhance transparency and security.

While challenges such as regulatory needs, data safety, and interoperability remain, the combined use of IoT, CNN + LSTM algorithms, and blockchain is revolutionizing healthcare. Collaborative efforts can further enhance patient outcomes, healthcare services, and potentially save lives.