Keywords

1 Introduction

Sleep is a complex process that plays an important and irreplaceable role in people’s life and particularly in their physiological activities. Multiple organs perform detoxification during sleep, such as the liver and the kidney, which helps people recover their physical strength and energy. Additionally, high-quality sleep can effectively enhance the people’s immune system. However, studies have shown that the quality of people’s sleep has been declining in recent years, with sleep disorders being an important cause for the increasing severity of sleep quality problems, among which sleep apnea is particularly prominent. Sleep apnea syndrome is a medical condition in which the airflow between the nose and mouth disappears or is weakened for more than ten seconds during sleep, and includes Obstructive Sleep apnea (OSA), Central Sleep Apnea (CSA), and Mixed Sleep Apnea (MSA) [1] Patients suffering from sleep apnea snore during sleep and are likely to experience a brief respiratory arrest during sleep, which leads to insufficient oxygen supply in the blood, reduced sleep quality, daytime drowsiness, memory loss, and in severe cases, psychological and intellectual abnormalities, and may even cause other diseases, such as arrhythmias, cerebrovascular accidents, and coronary heart disease. To address these problems, research in scientific and timely monitoring of sleep apnea and the possibility of providing timely intervention to patients is of extreme value [2].

Polysomnography (PSG) is considered the “gold standard” for diagnosing apnea events and some other sleep disorders. However, PSG devices are costly and require electrodes to be attached to the patient and tension sensors to be worn, which may lead to First Night Effect of the users and dislodgement of devices in the middle of the night. In addition, in the market, there are already mature heart rate respiratory monitoring bracelets or head-mounted respirators that can improve breathing problems during sleep, but because all these devices can interfere with human activity to varying degrees, thus having an impact on sleep quality on the other hand [3]. There is thus an urgent need for a contactless, effective, and more accessible assistive device for monitor and intervention. A very important medical indicator to detect the occurrence of apnea events is called the arterial oxygen saturation (SaO2). Given that the accurate measurement of SaO2 requires the facilitation from an oximeter, the interconnection of sleep monitoring devices with an oximeter is a subject worth investigating. Additionally, existing sleep health devices can detect the occurrence of disease but cannot timely conduct any relief or rescue treatment. Therefore, if the monitoring equipment and rescue equipment can be interconnected, the disease will be relived in a timely manner. For example, homecare devices can alleviate certain reaction caused by acute symptoms and provides help for the subsequent hospital treatment [4]. However, the health devices are currently developed separately by different companies, which means that different conceptual expression models and languages, and different degrees of formalization with the overlapping of knowledge in different domains will lead to multiple inconsistencies and disconnection [5]. As a result, a multi-parameter fusion among the devices to provide richer applications become impossible. Interoperability can solve the problems of multiple device network heterogeneity, data format conflicts, and incompatible interfaces, eventually realizing data sharing and collaborative work among information systems. It is thus extremely important to carry out study on the interoperability between heterogeneous devices [6].

2 Related Work

As of now, related departments and research institutions have presented various evaluation models to evaluate interoperability, among which Levels of Conceptual Interoperability Model (LCIM) is highly representative. It has six levels, namely no interoperability, technical interoperability, syntactic interoperability, semantic interoperability, pragmatic interoperability, and conceptual interoperability [7]. Semantic technology targets integration and collaboration of heterogeneous systems by providing unified descriptions, and it is now very popular in recent years to study how to attach semantics to IoT systems. In 2006, Brock proposed the concept of SWOT (Semantic Web of Things, SWOT), advocating that IoT should be called the Semantic Internet of Things. He believes that the internet, as a bridge between the physical world and the information world, should have an underlying sensing device of its own system that can provide information being aware of context and capable of reasoning, rather than focus on the changes of the objects themselves. They should also be able to “communicate” and “understand” as human beings do, and to communicate collaboratively between devices through registration, addressing, auto-discovery and search [8].

Saman Iftikhar [9] studied the feasibility of semantic interoperability among various semantic languages and realizes interoperability between semantic information exchange and resultant information systems across services. Shusaku Egami [10] investigates an ontology-based approach to semantic interoperability data integration for air traffic management. A domain ontology that is based on the flight, aviation and weather information exchange model is built, while an approach is proposed to integrate heterogeneous domain ontologies. As a result, interoperability of exchanging information about aircraft operations between different systems and operators in global air traffic management is solved, while the interoperability and coordination of all kinds of information in global operations is enhanced. Soulakshmee Devi Nagowah [11] put forward an approach based on new paradigms such as the Internet of Things and pedagogical concepts such as Learner Analysis, which is to build an ontology of IoT smart classrooms for university campuses to improve semantic interoperability in smart campus environments.

Wanmei Li [12] from China University of Mining and Technology put forward a semantic interoperability system for mining equipment based on distributed query, using semantic technology to propose a somaticized description model for IoT in mines, and a task matching scheme based on compound reasoning, which enables mutual understanding and interaction between equipment and production systems. It has combined semantic technology, distributed system and edge computing framework and applied the integration in which is applied in mine production activities with an aim to reduce humanized mine production and improve automatic production efficiency of coal mines.

In health, Bozhi Shi [13] studied the interoperability characteristics of heart monitors and researched their data information exchange capability. To summarize, the existing interoperability studies are in the process of development, and there is not a complete standard applicable to the health field in terms of the depth of related research. In addition, there are even fewer studies about the interoperability system of health equipment, so the research of interoperability needs more attention (Fig. 1).

3 Overview of Design Model

Fig. 1.
figure 1

Overall flow chart of model.

This paper focuses on the interoperability information model and technology of devices that monitor and intervene with sleep apnea. Through analysis of the requirements of interoperability of sleep apnea monitoring and intervention devices, an information model is constructed to design a specific method to achieve the semantic interoperability. The specific research content is as follows:

An ontology-based semantic description model of sleep monitoring devices is proposed from four aspects, namely the basic information, status, function, and operation control, so that device information can be represented by a semantic document in a unified syntax format.

In terms of the need of monitoring and intervention tasks, a semantic description model of monitoring and intervention tasks is proposed to semantically describe the task information. Meanwhile, a task matching scheme based on compound reasoning is proposed to strengthen the autonomy of the sleep device interoperability system. The study integrates the relevant theories and technologies of ontology, extracts the information of the device or task ontology, and then inputs it into the reasoning ontology, and guides the output device according to the designed reasoning rules.

By interoperating the non-contact mattress and the oximeter, the heart rate and respiration rate calculated from the mattress and the initial judgment of whether an apnea event has occurred are combined with the results of the real-time oxygen saturation from the oximeter, which are then input into the intervention task ontology and the inference rule. If the apnea symptoms are serious, the oxygen production can be increased to help the human body keep the normal functioning; when the oxygen production is detected to have reached a normal degree or no apnea event occurs for a long time, the oxygen production can be reduced or turned off. As a result, it provides a higher discriminant accuracy than single mattress-based signal processing or single oximeter measurement results, offering higher medical reference value.

4 Implementation

4.1 Creating an Ontology

In 1998, Tim Berners-Lee, the founder of the World Wide Web, first proposed the concept of Sematic Web, and then the World Wide Web Consortium (W3C) developed a series of technological specifications related to the Semantic Web, including Web Ontology Language (OWL), Resource Description Framework (RDF). With the development of the Semantic Web, “ontology” has been introduced into computer science and given a completely different meaning in recent years. An ontology is a systematic explanation of things in the objective world through a formal language, while the OWL provides a way for users to write formal descriptions of concepts [14]. OWL consists of three elements, Class: a collection of individuals with certain properties; Property: a binary relationship between a class and another class; Individual: an instance of a class, which inherits the properties of the class and facilitates the definition of data for reasoning. The OWL is used in this paper as the preferred language for ontology, while Protégé, an open-source ontology editor designed by Stanford University is chosen to facilitate the research and development of ontologies.

4.2 The Process of Creating an Ontology

To support autonomous and coordinated interactions among devices in an interoperable system, this section applies the powerful expressive power of semantic technologies to modeling in health. From the aspect of practical application of apnea intervention, the devices, the discrimination and intervention tasks, and the execution progress of the tasks in the sleep environment are semantically described, which results in a sleep health environment ontology system consisting of two domain ontologies, a sleep health device ontology, and a task ontology. This study combines the seven-step approach of ontology creation and METHONTOLOGY [15] as follows:

Identification of the domain and scope of the ontology. The sleep health system description ontology constructed in this study aims to provide the semantic support for intelligent collaboration between multiple devices in apnea discrimination and intervention tasks. The model mainly consists of two parts: device description model and task description model.

Reuse of existing ontologies. The ontology model related to sleep health system is extracted from the existing related ontologies, while the category attributes of related concepts and their inter-concept binary relations are integrated. In the process of creating ontology, the scalability of the ontology model can be enhanced by the mapping between related concepts.

Normalization of concepts. Firstly, class concepts are defined, and divided into classes of a hierarchy, i.e., important concepts are extracted from the corpus knowledge to form a glossary dedicated to the sleep environment, and a hierarchy is assigned to the concepts in the glossary. Secondly, the attributes of classes and their related constraints are defined according to the hierarchy. Finally, cases are built on the basis of the glossary to complete the creation of ontology.

Validation and evaluation of ontology. The ontology editor is used to build the relevant glossaries and their related ontologies, while the ontologies are validated according to the indexes of practicality, cohesion, and accuracy, continuously improving the ontology model.

Device Description Model.

SSN (Semantic Sensor Network Ontology, SSN) is an ontology model issued by W3C. It is to describe sensors and provides a unified high-level semantic description of sensors in terms of deployment environment, functional role, and observed properties. The modeling for sleep health discriminative interventions in this study refers to the SSN ontology model and adds to it some control functions and other concepts. Based on the SSN ontology model and the analysis of the role of the device in the sleep health IoT system, the device is described semantically in four aspects: basic information, device function, status, and control, forming a unified representation model, and providing semantic level support for the sleep health interoperability system.

The basic information refers to the description of some information that the device has since it was made by the manufacturer, such as the name, parameters, model and parts of the health device (oximeter, oxygen generator, mattress).

The device status describes the real-time situation of devices. The main consideration in modeling the concept of device status is the relationship between the device and the task, such as which operational state the oxygen generator is in and whether it is conditioned to perform the intervention task. In response to these questions, this paper provides description in terms of operational state and perceived state.

The device function refers to the specific tasks that the device can perform. This study describes the functions in control, measurement, input, and output of the three devices, namely oximeter, mattress, and oxygen generator, and the discrimination and intervention tasks.

The control describes the interaction between the devices and the control of the devices. The control operation in this study refers to the control of the ventilator based on the physiological parameters generated by the oximeter and the mattress. Therefore, the control operation is conducted through the on and off state of the oxygen generator (Fig. 2).

Fig. 2.
figure 2

The entity-relationship diagram of device model.

Equipment Model Evaluation.

The quality of current ontology model can be evaluated in terms of its structure, operability, and maintainability, while its structure can be further divided into cohesiveness, redundancy, and coupling [16] Cohesiveness is the most frequently measured feature and can be quantified by the degree of independence of each module in the model and the correlation between internal concepts. The higher the cohesiveness, the better the cohesiveness of the system and the higher the degree of closeness between concepts. The cohesiveness of an ontology model is mainly influenced by the inheritance relationship between concepts within the ontology.

In this study, M is used to simplify the conceptual model of the device ontology, so M1, M2, M3, and M4 represent the conceptual model of its basic information, the conceptual model of its state, the conceptual model of its function, and the conceptual model of its control, respectively. The cohesiveness of the conceptual model of the device ontology is represented by C(M), which is calculated as:

$$ {\text{C}}\left( {\text{M}} \right)x = \left\{ {\begin{array}{*{20}c} {\frac{{2\sum\nolimits_{i = 1}^{i = n} {\sum\nolimits_{j > i}^{j = n} {r\left( {c_{i} ,c_{j} } \right)} } }}{{n\left( {n - 1} \right)}}} & {n > 1} \\ 1 & {n = 1} \\ \end{array} } \right. $$
(1)

where n represents the number of nodes in the ontology model, r represents the relationship strength between two concepts in an ontology, c represents a class in the concept model ontology. If the two classes are directly inherited or indirectly inherited, then r equals to 1. If the number of concepts in the ontology model is 0, then the cohesiveness is 0. If there is only one concept in the model, the cohesiveness is 1 because the concept itself is the most compact structure in the model and does not depend on any other concept.

$$\mathrm{AVG}=\frac{\sum_{i=1}^{m}C({M}_{i})}{m}$$
(2)

In this study, the device ontology is divided into four conceptual models, and the average cohesion AVG formula of the device ontology is calculated, and the cohesion of each conceptual model can be calculated according to the above formula, C(M1) = 0.82, C(M2) = 0.71, C(M3) = 0.63, and C(M4) = 0.62, and the average cohesion of the four models is obtained as 0.7, from which it can be considered that the concepts are more closely related to the topic of sleep health devices.

Task Description Model.

This study creates a model of task first, and then describes the discriminative and intervention task concepts in terms of basic information, conditional constraints, and inter-task relatedness. The semantic description of discriminative intervention tasks and execution progress information enables the device to directly understand the process of the current working task, so that it can determine whether to participate in the execution of the task and the prerequisites needed for execution. Among them, the basic information is the most basic description of the task, including task name, ID, and attributes, with name and ID being used to identify the task, and task attributes being used to describe the execution environment of the task. Task constraints include state constraints and timing constraints, and only devices that satisfy these constraints are qualified to claim the task. Task correlation is a concept used to judge the relationship between tasks, including temporal sequence and dependency. The tasks that come later in the temporal sequence can only be executed after the previous task is completed. The mutual dependency is mainly reflected in the data dependency between two tasks. For example, the execution of the intervention task requires the results of the monitoring task. The ontology and entity settings for the discrimination and intervention tasks in the sleep health system ontology are shown in the following figure (Fig. 3):

Fig. 3.
figure 3

The entity-relationship diagram of task model.

4.3 Reasoning

Contradictory knowledge may appear in the process of model creating, which leads to inconsistency of the ontology and affects the subsequent knowledge inference. The consistency of ontology is represented in three aspects: structural consistency, logical consistency, and user-defined consistency, referring to the ontology’s syntactic structure, syntactic logic, and a series of constraints specified by the user to comply with the constraints of the language syntax model respectively. To uphold the ontology consistency, it is important to ensure that classes, attributes, and case individuals that have been created in the ontology are logically and structurally consistent. This step can further perform the rule reasoning. This study chooses HermiT and Pellet, two reasoners of Protégé to perform consistency testing of the ontology, imports the completed device ontology model and monitoring intervention task ontology into Protégé, and then performs the testing in HermiT and Pellet. No error message is suggested in the testing results, which proves that the term set and cases of the completed ontology system information are consistent.

The rules of reasoning need to be clarified before reasoning. Apnea is medically defined as the absence of or significant reduction of nasal or oral airflow for more than 10 s during sleep, accompanied by a sustained respiratory effort and a decrease in oxygen saturation. As the mattress can collect human physiological signals to obtain real-time heart rate and respiratory values, the signal processing can initially assess whether the user has apnea or not. Even if the user doesn’t have apnea, it proves that the user’s heart rate and respiratory shift is slightly abnormal. Thus, semantic interconnection with the oxygen machine can automatically turn on the oxygen generator and release a small amount of oxygen to avoid an acute anoxia. In addition, the oxygen saturation results measured by the oximeter are also considered to determine whether an apnea has occurred, and if so, to increase the oxygen concentration. When the values of the user’s heart rate, respiration and blood oxygen saturation recover to the normal range, it means that the physiological parameters are more normal during this time, and the increase in oxygen in the air will lead to the opposite effect. Therefore, the oxygen generator should automatically be adjusted to the non-operating state, finally forming a closed-loop system (Fig. 4).

Fig. 4.
figure 4

The overall reasoning process.

5 Experiments

5.1 Experiment Settings

This study chooses local inputs instead of sensors, and preset values instead of mattress and oximeter operating performance and status. Considering only the prediction and discrimination of obstructive apnea syndrome, SWRL inference rules are set up in Protégé based on the above-mentioned reasoning. According to the reasoning of Pellet, 20 rules of the rule base are applied. When the output of the mattress ontology shows the occurrence of apnea, or when the decrease of blood oxygenation on the oximeter ontology reaches or exceeds 3%, the oximeter ontology will increase the generation of oxygen. When the value of the mattress ontology and oximeter ontology normalizes, the oximeter sill stop performing the task.

5.2 Performance

Assume the patient is in a bedroom of 15 m2, where the oxygen generator is placed at about 3 m from the human body during sleep. The attendant will turn the oxygen generator on when there are signs of apnea and turn it off when the respiratory and heart rate recover to the normal level through the observation of the instruments. In the test, each instrument works separately, so the attendant must observe and judge the physiological parameters before deciding on the status of the oxygen generator. The whole process can be divided into three steps: observation, judgment and action, and the time spent in each step is different, with the most time spent in action, which greatly increases the length of time spent on the intervention. This study has conducted multiple sets of tests, assuming that the attendant can switch on the oxygen generator in the fastest speed, then the average time consumed, minimum time consumed, and maximum time consumed were 1.883 s, 1.49 s and 2.26 s respectively. In Protégé, the average response time, minimum response time and maximum response time were 15.385 ms, 15.063 ms and 15.612 ms respectively. The system performance would be better if the tasks were performed in binary (Fig. 5).

Fig. 5.
figure 5

Comparison of 6 sets of data on the decision response time of the two operations.

6 Conclusion

Semantic interoperability is a very challenging research issue. This paper aims to address the collaborative interaction between sleep health devices to achieve semantic-level interoperability between monitoring devices and other health devices, ultimately building an unmonitored closed-loop system for sleep apnea intervention. The discrimination and intervention has been simply implemented in the platform of Protégé, and the ontology design and rule base need to be enriched specifically in the future research to support more complex scenarios. The testing of the system is also realized by simulation in an experimental environment, which is inevitably too ideal, while real sleep environment can be highly unpredictable. Thus, further validation of the system in actual scenarios is needed in the future.