This study proposes an edge computing-based real-time patient management monitoring system using an IoT pulse oximeter. The proposed architecture is shown in Fig. 1. This study designed and developed a system that monitors the health conditions and emergency situations of patients in each ward by having them wear an IoT pulse oximeter. The proposed system continuously monitors patients’ health conditions and provides information about their conditions by analyzing the collected health condition data. Furthermore, the proposed system provides nurses and doctors with the health information of patients using wireless communication and a cloud server. Doctors can analyze patients’ health conditions from a long-term perspective based on the provided data.
The system consists of three layers. Each layer has a defined task and provides services to the other layers. The sensing layer measures the biosignals of a patient in real time using an IoT pulse oximeter and sends the data to an edge node through a wireless network. Biosignal transmission stably and continuously transmits the measured data. This study thus proposes a TCP/IP socket-based transmission system because a TCP/IP socket does not cause data extinction, and the data are received in the order of their transmission. Therefore, it can stably transmit a large amount of data measured by multiple IoT pulse oximeters.
Edge nodes collect, store, analyze, and monitor the data transmitted by IoT pulse oximeters. They also manage network connections to enable the reception of the data measured by the IoT pulse oximeters. The collected data are stored in a time-series database (TSDB) [21] in real time and emergency situations are analyzed. Biosignals are time-series data that are continuously measured over time. Hence, such data are stored in a TSDB, which can store a large amount of time-series data in real time.
The cloud converts biosignals saved in edge nodes into big data to be stored, analyzed, and monitored. Further, the cloud analyzes the state of edge nodes to manage IoT pulse oximeters. A NoSQL-based database is used to systematically store a vast amount of biosignals stored in edge nodes [22]. Various types of biosignals and patient information are needed to manage the health conditions of patients. To manage diverse types of information, expandability and high flexibility are required in addition to the capability of processing a large amount of data. In addition, the cloud consists of a real-time monitoring system to monitor all the wards and an alarm function that provides alerts when the patients at the edge nodes are in an emergency.
3.1 IoT Pulse Oximeter Design
A pulse oximeter is a noninvasive device that measures the oxygen saturation of arterial blood in the artery blood vessels in places such as the fingers or earlobes, where the concentration ratio of the difference in absorption spectrum between hemoglobin containing oxygen and the entire hemoglobin is measured. This medical equipment is commonly used for emergency and general patients at medical institutions. Thus, this study proposes an IoT-based pulse oximeter.
Figure 2 shows the system configuration of an IoT pulse oximeter [23]. The driver adjusts the amount of light and generation period of red and infrared (IR) LED. The microcontroller unit (MCU), which controls these values, is a digital-analog converter (DAC). Filter 1 removes the noise of analog signals obtained from red and IR light in a phototransistor, which is a light sensor. A multiplexer (MUX), which is signal selector 1, separates red, IR, and ambient (AMB) signals. Sample and hold is an analog circuit that fixes the rate of change of the separated signals. Filter 2 is for separating analog signals by frequency. The amplifier amplifies the AC signal. Signal selector 2 separates the DC and AC components from the red and IR signals. The analog to digital converter (ADC) converts analog signals to digital signals. The signals are selected and adjusted using the MCU. Ultimately, infrared alternating current (IR AC), infrared direct current (IR DC), red AC, red DC, and AMB signals are stored in the MCU.
The signals obtained from hardware are used to analyze the SpO2 and PR in the main system using an algorithm. Lastly, a Wi-Fi system for managing data communication is built for communicating with edge nodes. The following seven steps are taken to analyze the SpO2 and PR.
-
Signal noise is removed in the digital filter step.
-
Only peak values of signals are extracted in the peak detect step.
-
In the standard deviation acquisition step, peak component values are acquired and filtered by the standard deviation of a probability distribution.
-
The obtained values for red and IR light are normalized in the red, IR normalization step.
-
In the pulse period and SpO2 parameter acquisition step, the amplitude is measured using the component within the range by discerning whether it is a peak of the pulse within the measurement range from the acquired peak components, while red DC, red AC, IR DC, and IR AC, which are the parameters for measuring SpO2, are measured.
-
In the pulse rate and SpO2 Calculation step, the measured amplitude is averaged, PR is calculated using the correlation formula of the sampling rate, and SpO2 is calculated using the SpO2 parameters.
-
In the state distinction step, the state of the final obtained signal is distinguished into stable, moving, or unstable.
3.2 Edge Node System Design
The edge nodes of the proposed system are network devices placed in each ward and perform server, gateway, router, and storage roles. Edge nodes collect and store the data transmitted by IoT pulse oximeters, and further analyze and monitor emergency situations in real time using the stored data. In addition, they send messages and the collected biosignals to the cloud when emergency situations occur.
The data collection technology collects biosignals measured by the IoT pulse oximeters. The IoT pulse oximeters transmit the data including IR AC, IR DC, red AC, red DC, AMB, SpO2, and PR through a wireless network. The transmitted data are collected and stored in edge nodes in real time. TCP/IP socket communication technology is used to stably and quickly collect five types of raw data and two types of analytical data measured from multiple IoT pulse oximeters. TCP/IP socket communication is appropriate for transmitting and collecting a large amount of data [24] owing to various advantages such as being able to revise errors and guaranteed flow control and data transmission order. However, collecting multiple biosignals from one collection system can lead to network traffic in the long term, which might lead to various problems including decreased service speed and service access errors. Therefore, the loads on a server can be reduced by using edge nodes for stably collecting biosignals measured by multiple IoT pulse oximeters. The data transmitted through a wireless network consist of two packets, including a packet transmitting five types of raw data and another packet transmitting SpO2 and PR data. Table 1 presents the basic packet format. ID in Table 1 is the key for distinguishing IoT pulse oximeters, while the message command code (CDM) is an identifier for distinguishing two packets. Cyclic redundancy check (CRC) determines if there is an error in a packet. DATA represents the basic format for transmitting raw data and the data for transmitting analyzed SpO2 and PR.
Table 1
Category | Length | Format | Description |
---|
STX | 1 byte | Binary | 0X02 packet begins |
ID | 10 bytes | ASCII | Terminal ID |
CMD | 1 byte | Binary | Packet distinction |
LEN | 2 bytes | Binary | DATA length |
DATA | N bytes | Binary | DATA (raw data, SpO2, PR, etc.) |
ETX | 1 byte | Binary | 0x03 packet ends |
CRC | 2 bytes | Binary | CRC16 from ID to end of DATA |
Data storage technology is for systematically storing the data measured by IoT pulse oximeters. The biosignals measured by IoT pulse oximeters are measured over time. These data must be processed by a technology capable of quickly and accurately processing a large amount of data acquired in real time. Thus, this study used InfluxDB to store biosignal data in real time using a time-series database [25–26]. Among currently available time-series databases, InfluxDB is the most suitable for data storage because it is stable and can process data at a high speed. In this study, two tables are created for storing the raw and analyzed data in InfluxDB. Table 2 stores raw data including measured time, device ID, IR AC, IR DC, red AC, and red DC. Table 3 stores the analyzed data including measured time, device ID, PR, and SpO2.
Table 2
Structure of edge node raw data time-series DB table.
Category | Format | Description |
---|
Time | String | Measured time |
ID | String | Terminal ID |
IR AC | List | Infrared alternating current |
IR DC | List | Infrared direct current |
Red AC | List | Red alternating current |
Red DC | List | Red direct current |
AMB | List | Light signal from the surrounding environment |
Table 3
Structure of edge node analyzed data time-series DB table
Category | Format | Description |
---|
Time | String | Measured time |
ID | String | Terminal ID |
Spo2 | Integer | Oxygen saturation |
PR | Integer | Pulse |
The emergency analysis and monitoring system analyzes emergencies using SpO2 and PR and sends the relevant data to the cloud while showing the transmitted data in real time. An SpO2 between 81 and 90 is considered critical, while an SpO2 below 80 is considered an emergency. Furthermore, PR above 200 and below 50 is considered an emergency. When emergency situations occur, an emergency message is sent to the cloud in a JavaScript object notation (JSON) format. In addition, real-time monitoring in edge nodes is an important factor for medical institutions. The biosignal monitoring of patients in each ward is needed to examine patients’ conditions in real time. The data measured by IoT pulse oximeters are visualized. In particular, IR AC is the most basic data among raw data, which must be visualized as a chart in real time, while SpO2 and PR are expressed in numbers.
3.3 Cloud System Design
The cloud consists of storage for managing the data collected from edge nodes and a monitoring system for managing patients’ conditions in real time. For data collection and storage, the cloud develops a collection system to which REST API is applied. REST API can build a web service-based web server using HTTP requests and JSON data models [27]. This study built a framework for data collection and storage based on REST API. The cloud collects the data collected by edge nodes using a JSON format. The collected data are stored using a NoSQL database. A NoSQL database, which is designed based on big data, facilitates collecting and analyzing a large amount of biosignal and health-related data. Therefore, this study configured a relational model as shown in Fig. 4. Figure 4(a) shows the data related to patient information. Figure 4(b) shows the data measured by IoT pulse oximeters, edge node ID, device ID, start time, elapsed time, and frequency (Hz) information. The frequency refers to the number of biosignals measured in one second. The edge node and device IDs identify the location of a patient. As shown in Fig. 2, two documents were configured because the expandability for adding various medical information from patient information documents was considered.
The cloud monitors all the patients on the edge nodes. Monitoring involves managing real-time emergency messages and visualization. Emergency message management shows notifications for the messages sent from edge nodes. Biosignal visualization presents the biosignal data of all patients. However, there are limitations in showing all data measured by IoT pulse oximeters because raw data are the signals generating a large amount of data, which can cause several problems such as increased network usage and network delays during real-time monitoring. Accordingly, the analyzed and SpO2 and PR data are shown in real time.