# An IoT System for Remote Monitoring of Patients at Home
## 3 Structure of the Patient at Home Monitoring IoT System  
Figure 1 shows the structure of the IoT system for monitoring patients at home that is proposed in this paper. To prepare for the massive number of Personal Healthcare Devices (PHDs) needed, the system was designed as multilayered. The system consists of Application Dedicated  
Nodes--Application Entities (ADN-AEs), Middle Nodes--Common Service Entities (MN-CSEs), the Infrastructure Node--Common Service Entity (IN-CSE), and Infrastructure Nodes--Application Entities (IN-AEs). An ADN-AE is a program installed in a sensor. It senses neighboring signals, processes them to generate data, and finally sends the data to the IN-CSE installed on the patient monitoring IoT server. A (program on a) PHD acts as an ADN-AE in the proposed system. Through an IoT network, MN-CSEs function as gateways for traffic control and/or protocol conversion. In this paper, they transmit patients' biomedical data obtained by a PHD to the IN-CSE (the patient monitoring IoT server). Medical staff or system managers use IN-AEs to access the patients' data stored in the IoT server. An MN-CSE controls or monitors ADN-AEs that belong to the MN-CSE; moreover, it performs processing that is necessary to achieve efficient multiclass communication between ADN-AEs and the IN-CSE. An IN-AE can access patients' data by accessing the patient monitoring IoT server via an IoT network. In the IoT system, a large amount of diverse biomedical data are transmitted from PHDs to a gateway, and it takes a non-negligible amount of transmission time for the data to be delivered to the patient monitoring IoT server or medical staffs. Therefore, alarm signals that represent abnormal conditions of the patients should be delivered (or \"pushed\") more quickly than any other data. One of the gateway's responsibilities is to classify and prioritize data received from PHDs, and schedule their data transmissions based on their priorities. In this study, the oneM2M-based IoT system is constructed in accordance with the oneM2M specifications [16; 17]. Then, two modules (Protocol Converter module and MQL Scheduler module) are added, as shown in Figure 2. An ADN-AE consists of a Sensing module and a Network Manager module. The Sensing module senses the biomedical signals of PHD users and processes them to generate biomedical data. The biomedical data are delivered to the Network Manager module, where oneM2M messages are made based on the received biomedical data. A CSE consists of a Network Manager module, a Message Handler module, and a Resource Manager module. The Network Manager module deals with communication with ADN-AEs and controls the entire CSE process. The Resource Manager module manages resource trees in which the information of every object the IoT system manages is stored. Figure 1: Structure of the IoT (Internet of Things) system for monitoring patients at home. The Network Manager module consists of NSE (Network Service Exposure), CMDH (Communication Management and Delivery Handling), NSSE (Network Service Exposure Execution and Triggering) and CSFs (Common Service Functions) Controller. In addition, MQL Scheduler is added for the multiclass Q-learning scheduling proposed in this study. The NSE module transmits oneM2M messages and the CMDH module manages communication (policies) and buffers. The NSSE module performs session management for connection between CSFs and NSE. The MQL Scheduler module makes scheduling decisions for biomedical data transmission on the base of the execution of the MQL scheduling algorithm, which will be discussed in the next section. The Message Handler module consists of MessageHandler/Protocol Converter and ReferencePoint. The Message Handler module analyzes the incoming messages and performs message conversion between oneM2M primitive messages and HTTP messages. The ReferencePoint module processes XML documents and HTTP headers. The mapping between oneM2M Request/Response primitive messages and HTTP messages is shown in Tables 1 and 2.