Volume 2024, Issue 1 2776723
Research Article
Open Access

Semantic IoT Service Communication—Impedance Matching Between Service Goal and Event Routing

Yang Zhang

Corresponding Author

Yang Zhang

State Key Laboratory of Networking and Switching Technology , Beijing University of Posts and Telecommunications , Beijing , China , bupt.edu.cn

Search for more papers by this author
Bo Cheng

Bo Cheng

State Key Laboratory of Networking and Switching Technology , Beijing University of Posts and Telecommunications , Beijing , China , bupt.edu.cn

Search for more papers by this author
Junliang Chen

Junliang Chen

State Key Laboratory of Networking and Switching Technology , Beijing University of Posts and Telecommunications , Beijing , China , bupt.edu.cn

Search for more papers by this author
First published: 14 November 2024
Academic Editor: Kavita Pandey

Abstract

In IoT (Internet of Things) applications, there are many kinds of event flows. Without converging these flows based on their semantics, it is difficult to establish ultrascale-connected IoT service systems. Event flow convergence may encompass event content aggregation, aggregated routing, and aggregated subscription matching. In our work, a semantic IoT service communication fabric is proposed to achieve this convergence, specifically for impedance matching between service computation and event communication, leveraging semantic knowledge technologies. Compared with classic semantic communication by abstracting the underlying network as a channel, our solution delves into the channel for impedance matching, that is, focusing on semantic event routing in the channel and semantic event content aggregation along routing paths. Multiple tenants are supported in the IoT service communication fabric, where each tenant can use virtual semantic interfaces to organize together its devices, IoT gateways, control centers, and data centers, and semantic event communication schemes and algorithms are proposed to map IoT services’ goals into event routing. We finally conduct evaluations to show the effectiveness and applicability of our solution.

1. Introduction

Goal-oriented semantic communication is aimed at transmitting semantic information based on the source’s goals rather than focusing on individual bits regardless of their meaning [1, 2]. In IoT applications, physical entities and devices are often semantically modeled using knowledge graphs (e.g., SSN [3]). These knowledge graphs can facilitate semantic IoT service communication by linking service goals to event routing [4, 5]. Previous work of [4, 5] focused on semantic symbol coding and decoding by the knowledge graph, modeling the underlying network as an abstract channel. However, due to the dynamic nature of semantic communication, the underlying channel changes continuously. The work of [6] proposed a holistic semantic communication framework to accommodate such dynamic environments but did not address the semantic construction of the dynamic channel or the semantic routing/matching within it.

In IoT scenarios, data are often aggregated (e.g., averaging the IoT data within one zone). The underlying IoT networks should convey either the aggregated data or original data while understanding their semantics. The work of [7, 8] designed a semantic publish/subscribe system to assume this task, where one subscription from a subscriber was matched by summarizing multiple IoT data sources. Knowledge triples (e.g., property–relation–entity) in publication events were turned into embedded vectors by machine learning methods. These vectors are compared based on their distances, with distance-closer vectors being grouped together as a summary. The aggregated vectors were finally translated into knowledge triples as an aggregated event for the subscriber.

In this context, the routing paths may not be aggregated in the same way as the event content. Subscribers in the publish/subscribe system may subscribe to various topics, each topic corresponding to a multicast tree. These multicast trees could be aggregated into a single tree for multiple topics. This paper explores the aggregation of multicast trees and event flows along their routes, in addition to aggregating events during publishing. An aggregated multicast tree provides a chance to encode multiple subscriptions and their complex semantic relations into hierarchical flow tables in software-defined network (SDN) switches. It can reduce the number of flow entries and the matching times between event flows and flow tables. Additionally, aggregating multicast trees and event contents reduces the burden of maintaining numerous multicast trees in IoT networks. Although knowledge-based event summarizing was a common semantic communication operation in publish/subscribe systems, these works did not address the aggregation of multiple subscriptions, their complex semantic relations, or underlying semantic event routing.

IoT resource models (i.e., semantically representing physical entities and sensors) are often defined by knowledge graphs [3]. For example, a boiler station may include boilers and water pipelines, and a water pipeline may have forward and backward segments. Changes in IoT resources occur as events that include parts of the resource’s knowledge graph. Over these IoT resource models, IoT services could be described by their semantic IOPE (input, output, precondition, and effect), and their communication goals are represented by the semantics of input/output, which is further carried out by subscribing or publishing some elements of the resources (e.g., subscribing to the boiler element and events of the boiler properties acting as the services’ input). These subscribed events are named, and multiple names are organized into semantic topic/name trees.

Given IoT service goals, a semantic publish/subscribe paradigm can be used to communicate events relevant to service inputs/outputs, potentially improving IoT information exchange standards [9]. The key issue of impedance matching between service goals and event routing involves aggregating event flows, including both event content and routing paths.

This paper addresses three main issues:
  • 1.

    Handling complex semantic relations among multiple subscriptions and publications to achieve optimal event flow aggregation. The semantic publish/subscribe system must forward symbol-coded semantic events from multiple subscriptions and aggregate event flow content along aggregated paths.

  • 2.

    Resolving aggregation conflicts where multiple event flows are combined into one, which may lead to redundant flows. To address these conflicts, we propose coding subscriptions into hierarchical flow tables to reduce event-matching costs based on subscription semantics.

  • 3.

    Realizing semantic event communication in SDNs [10, 11], assuming the existence of semantic symbol coding/decoding mechanisms (refer to [8] for details).

To the best of our knowledge, no existing work comprehensively addresses these issues. Our contributions are as follows:
  • 1.

    Defining the problem of semantic route aggregation for IoT events based on semantic name/topic trees and proposing algorithms and schemes to solve this problem. Our solution supports service goal-oriented topic generation, unifies multidimensional semantic name trees, aggregates event flows (including routes and content), and encodes multiple subscriptions into flow tables.

  • 2.

    Proposing a hierarchical scheme to encode subscriptions based on their semantic structure, which addresses aggregation conflicts by using inclusion and sibling relations within semantic name trees to optimize flow table codes, saving space and reducing event matching times.

  • 3.

    Realizing impedance matching between service communication goals and event routing by establishing a semantic IoT service communication fabric. This fabric extracts service goals from multidimensional descriptions and leverages semantic relations among multiple subscriptions to explore additional semantic potentials beyond simple symbol encoding.

The remainder of this paper is structured as follows. Section 2 describes the background and motivating examples. Section 3 discusses IoT resources, IoT services, and the architecture of the semantic IoT service communication fabric. Section 4 presents the solution for encoding subscriptions and name trees into flow tables. Section 5 proposes a scheme for semantically aggregating event flow multicasts. Experimental results are presented in Section 6. Section 7 covers related work, and Section 8 concludes the paper.

2. Background and Motivating Examples

In our work, an IoT resource is an informational description of a sensor or physical entity in the physical world, including a lifecycle model and an object model. The object model defines what attributes the resource contains as well as the relations among them. The former defines the possible ways the resource might progress, as well as event-driven state transitions between two lifetime states. Figure 1 illustrates such an example, where the object model of a boiler is defined by the boiler properties and the lifecycle model is defined by three states and their transitions.

Definition 1. IoT resource. An IoT resource is defined by a lifecycle model and an object model.

  • 1.

    A resource object model is specified by a 4-tuple

where EntityN is a set of IoT entities, sensors, or properties; Relation is a set of relation name that is often considered a predicate in the knowledge triples; OrderR indicates a partial order on the set Relation; and Map indicates a mapping over the previous EntityN and Relation: EntityN × Relation⟶EntityN.
  • 2.

    A resource lifecycle model is defined by a 5-tuple

where State0 indicates an initial state, State indicates a state set of the resource, PR is a set of propositions that are used to represent resource states, Label is a set of labels that are used to represent state transitions, and Map indicates a mapping on the previous State and Label to specify state transitions: State × Label⟶State.

Details are in the caption following the image
A boiler resource.

For example, in Figure 1, there exist Boiler and Temperature in the EntityN, there is Has in the Relation, and Map includes Boiler × Has⟶Temperature, that is, the real-world entity Boiler having a property Temperature. It is possible that there are some partial order relationships among the elements in Relation such as ParentOf and AncestorOf. The lifecycle model example is clearly shown in Figure 1.

Events indicate the state transition or property change of IoT resources. These events trigger IoT services. The IoT services monitor, control, and coordinate different IoT resources. These IoT services are designed based on resources and are driven by events from the resources, that is, property events and lifecycle events. Figure 2 illustrates such an example.

Details are in the caption following the image
The relationship between service and resource.

Given the resource models, the IoT event can be defined, that is, observing the property changes or state transitions. An IoT event can be defined in Definition 2.

Definition 2. An event is defined as

where type is  "subject verb" to indicate what happens, and it represents a kind of event. content is a subset of IoT resource properties and state transitions and is defined as
where Property is a set of properties (or states) of IoT resources, Relation is a set of relations (e.g., has), and EntityOrVal is a set of property values or entities.

For example, in Figure 3, the voltage alarm event has a type Voltage Alarm, and its content has the relation hasSimpleResult from Relation and the property value 119.45 kV from EntityOrVal.

Details are in the caption following the image
Two name trees describe the same events.

These events are organized into name trees by the partial order of resource properties, that is, naming events by the property names and ordering them by their semantics. The left column of Figure 3 illustrates two semantic name trees. One semantic voltage alarm event (in the middle column of Figure 4) can be considered as the one named after the upper-level name tree (the event thus being called Binhai microgrid voltage alarm event) or as the one named after the bottom-level name tree (the same event thus being called analogous voltage alarm event).

Details are in the caption following the image
Semantic IoT service publish/subscribe on IoT resource model.

IoT service input/output can be expressed by publishing/subscribing events on the name trees. In Figure 3, IoT services express their event requirements by event category such as signal or control, or they express the requirements by physical position such as Binhai. The remote control service in the right column of Figure 3 should carry out controlling by the location of electric devices and is driven by the voltage alarm event via location. The event analysis service should have different processing processes for analogous or signaling events, respectively, and be driven by the alarm event via the category (e.g., analogous). The example shows that different IoT services may specify their event requirements (even the same event) by different semantic event name trees in their own development context.

We treat the above input/output as the service intent or goal. In the example of Figure 3, the remote control service and the event analysis service specify their input goal by semantic named events. The former may specify its input goal as <location, voltage alarm>, and the latter may specify its input goal as <category, voltage alarm>.

Given a service goal such as <location, voltage alarm>, the event type of voltage alarm is used to find a kind of event, that is, retrieving the event content definition, and the location is a focal point used to find a concerned property in the event content, also as a concerned event name. Event communication will be carried out by the service goals with concerned properties naming events on multiple trees.

3. Impedance Matching Between IoT Service and Event Communication

3.1. Impedance Matching Procedure

IoT services are driven by measured events. We could extract event communication goals from IoT service descriptions and IoT business process models (this issue is not our focus in this paper, and the examples in Section 2 illustrate some details), and these event goals are semantically transformed into publish/subscribe operations. Figure 4 illustrates the semantic interactions from IoT services to publish/subscribe actions. IoT services make operations on IoT resources, and the input and output of the services appear as events from/to the IoT resources. These events are organized as a name tree by their semantics, and the services carry out event publication and subscription by the name trees. We should allow for on-demand service expression for event requirements, that is, multiple semantic name trees (see Figure 3).

From the other perspective, the above interactions appear as an impedance matching procedure, illustrated in Figure 5, whose functionalities are assumed by a semantic publish/subscribe system, involving event content aggregation, semantic routing, semantic subscription coding, and semantic matching. The impedance matching procedure is as follows:
  • 1.

    Extracting service goals and then semantically subscribing. After extracting communication goals from service descriptions, semantic subscriptions involve two kinds of operations. The first one is to retrieve one semantic name tree that may be defined by the service provider, and then the subscription is carried out according to the semantic name tree (e.g., subscribing to Binhai microgrid). The second one is to construct a semantic name tree if no trees are provided, where the service goal is used to link to events and IoT resource models, and then a name tree is formed by partially ordering the concerned IoT resource properties.

  • 2.

    Unifying semantic trees and semantic subscription aggregation. If multiple services are executed and multiple semantic name trees are obtained, we will unify the name trees, that is, treating them as one semantic name tree. On the unified semantic name tree, we find the semantic relationship (e.g., semantic inclusion) among the semantic subscriptions. If there are inclusion relationships, the semantic subscription aggregation (e.g., using the parent one to merge the children ones in Figure 3) may be carried out. The subscription aggregation means that multiple service goals can be satisfied by one efficient publish/subscribe operation for their semantic relation.

  • 3.

    Semantic routing and aggregating event flow. When there are multiple subscriptions and multiple event flows, we should organize routes according to their semantics, that is, merging/splitting routes. On the other hand, the content of event flows may be aggregated when they run along the merged routes.

  • 4.

    Semantically encoding name trees into flow tables and event matching by semantic structures. According to the subscriptions’ semantics, we encode the name trees and subscriptions into flow tables in SDN switches. Using the semantic structure among subscriptions, we try to adopt less flow tables to carry out event matching.

Details are in the caption following the image
Semantic publish/subscribe with aggregation.

During enacting the semantic publish/subscribe, the event content of flows could be aggregated if this event flows lie in the cache of network nodes waiting for matching and forwarding. The content aggregation procedure of event flows is defined as follows.

Definition 3 (Hierarchical content aggregation). Two event flows are aggregated by content for two subscriptions, as follows:

  • 1.

    If two subscriptions have the same egress port in a SDN switch and the events relevant to the subscriptions are from the same physical entities, the aggregation procedure is started.

  • 2.

    Deleting redundancy. For two events content1 and content2, let the aggregated event content = content1 ∪ content2. If two properties are semantically equivalent, only one is kept with the other being deleted.

  • 3.

    Super concept replacing. When one resource property is a super concept of the others in the aggregated event, the super property is used to replace the others if the subscriptions do not prohibit the super concept replacing.

  • 4.

    Property summarizing. If the property summarizing is an allowable option, the entity-centric event summary method in [8] could be used to carry out the property summarizing for the aggregated event.

We do not discuss the algorithms to realize Definition 3 for limited space and only give some examples to illustrate it. If a semantic current event in Figure 6 is aggregated into the semantic voltage current event in Figure 3, their multiple duplicated items are deleted with one copy being left, that is, deleting redundancy such as one copy of “<power plant>” being left. Given a property triple “boiler temperature is normal (in the range 29.5°C, 30.5°C)” and the other triple “boiler temperature is 30°C,” we can use the former to replace the latter, that is, super concept replacing. Please refer to [8] for property summarizing examples.

Details are in the caption following the image
Current alarm event.

3.2. Impedance Matching Solution

Based on the above discussions, we design a semantic IoT service communication fabric as a solution to realize the impedance matching between service goals and event routing, where some algorithms and methods are presented in the later sections. Our impedance matching solution is illustrated in Figure 7, and it is operated in multiple-tenancy SDN. It consists of three layers: a SDN-based semantic IoT event communication layer, an event-driven IoT service system layer, and virtual semantic interfaces for an IoT application to semantically use the communication infrastructure as its own infrastructure.

Details are in the caption following the image
Semantic IoT service communication fabric.

At the virtual semantic interface layer, a tenant can choose his/her own network resources and available public network resources to define a virtual network. Semantic symbol encoding/decoding for compressing transmission data is carried out transparently for IoT services, that is, not knowing the encoding operations by the upper IoT application layer. Tenants’ networks can be organized into clusters with semantic publish/subscribe operative primitives being provided. Runtime network states can also be obtained through semantic virtual interfaces.

At the layer of the SDN-based semantic IoT event communication network, the publish/subscribe paradigm is combined with SDN to support multiple-tenancy semantic event communication, where tenant contexts are installed in SDN controllers to run and manage the semantic publish/subscribe middleware. Each tenant has its own context in SDN controllers, through which the tenant can express the semantic event communication requirements, semantically aggregate the subscriptions and even flows (see Section 5), and establish hierarchical flow tables in SDN switches (see Section 4).

An SDN could be partitioned into multiple partitions (a partition is called a node or also a cluster). Each cluster is composed of a set of SDN switches and a set of clients, and a controller manages and configures it as an interconnected network zone.

At the layer of the event-driven IoT service system, semantic events are the basic mechanism in order that they can be shared among different IoT services no matter whether they lie in any fogs such as control centers, IoT gateways, and cloud centers; service invocation by posting events in the service environments; and service interfaces and process orchestration can also be defined based on the events.

IoT service environments include IoT resource pools storing IoT resource instances from IoT resource models, service containers, local semantic publish/subscribe operation interfaces, and IoT business process orchestrators. Actor models [12] are adopted to abstract the IoT service programming whereby an IoT service listens to incoming messages from the event communication foundation and then carries out the computation, posting their computation results to the event communication foundation as its reactions. The IoT business processes are made from IoT services by organizing event relations. Each IoT service in the business process can express its input/output requirements by its service context, and then the service communication goals are extracted. Different semantic name trees are used for these different IoT services and their goals such that a unified semantic name tree is obtained for semantic event routing (see Section 5).

4. Semantically Encoding Subscriptions and Aggregating Routing

IoT service clients may subscribe to event flows by topic names, and these names form a semantic name tree. We use the semantic structure of name tree nodes to reduce the number of flow entries for the subscribed events, called the encoding problem. Furthermore, we reorganize the routing paths to merge flow entries and reduce the management burden of event multicast trees, called the aggregating routing problem. In this section, we address the former issue, and the latter one is discussed in the next section.

4.1. Problem Statement

We give an example to illustrate the encoding problem, shown in Figure 8. In Figure 8, the event flows relevant to name nodes with the mark “√” are subscribed. When we encode the subscribed name nodes into flow entries, we try to use less flow entries to represent them by merging name nodes in terms of their semantic and egress ports. The name nodes Transformer and TransformerA are semantically aggregated into the name node Control (semantic parent), and the flow entries of Transformer and TransformerA are reduced to the one of Control, which saves the space of the flow table as well as matching times. The parent name Control (also representing its all children) is matched against event flows in Table 0, the matched event flows are sent to Table i, the event flow with the child name of TransformerB is sent to Egress Port 3 (ePort = 3) if it is matched in Table i, and other event flows without being matched in Table i will be output to the same port by the Table Miss flow entry in Table i. How to realize this procedure is the encoding problem. Furthermore, when we allocate routing paths to different event flows, we will let two event flows have the same egress port if their topic names have similar semantics. In summary, the two problems are as follows:
  • 1.

    Encoding problem. When there are multiple subscribed name nodes relevant to multiple event flows, we use less flow entries to represent them by semantically encoding these subscriptions.

  • 2.

    Aggregating routing problem. If two topic names relevant to two event flows have close semantics (e.g., parent node and children ones in the semantic name tree), we try to allocate the same multicast tree for the event flows, that is, having the same egress port in flow tables for the two event flows.

Details are in the caption following the image
Hierarchical flow table example.

Although the work of [8] focused on aggregating event content in the semantic publish/subscribe system, how to construct an underlying network channel for semantic publish/subscribe operations was not investigated. There are no straightforward answers to the two above problems. We then formally define the two problems.

Given a semantic name tree NTree, multiple subscribers may subscribe to one name tree node Nni in NTree, and a publisher (or multiple ones) may publish events named after Nni. There is an event flow δi among these subscribers and publishers. In the name tree NTree, the name node Nni may have multiple children nodes {NnChij} and one parent node NnParenti−parent. The children node NnChij may also be subscribed to, and thus there may be another event flow δij.

The physical SDN is assumed as an undirected graph G = (V, E), where we consider V = {vi|1 ≤ in} as the set of n network nodes, and we consider E = {eij|vi, vjV} as the set of m communication links connecting nodes with wij being the communication cost on eij and cij being the transmission capacity on eij. We then assume that there exist r event streams {δk(Sk, Dk)} over NTree, where Sk is the set of the publisher nodes for δk and Dk is the set of nodes that subscribe to the event stream δk. We, respectively, denote the cardinality of Sk and Dk by |Sk| and |Dk|.

Definition 4. Encoding problem. The problem of encoding subscriptions is defined as follows:

We have subscriptions SUB = {subi} over a semantic name tree NTree, and each subi has a route item <subi, eporti>. We encode them into flow entries FLE = {f_entryi} (i.e., “0/1” string stored in switch flow tables), and the matching times between events (relevant to SUB) and FLE is denoted by MTimes, such that

Definition 5. Aggregating routing problem. The problem of semantically aggregating routing is defined as follows:

We have a SDN G = (V, E) and a semantic name tree NTree for communicating events. For a name node Nni, there is an event stream δi = (Si, Di, treei, ci) with treei being the multicast tree for transmitting events in G and ci being the required bandwidth of δi. For a child node NnChij of Nni, there is also an event stream δi−j = (Sij, Dij, treeij, cij). The aggregated semantic event stream is , where the subscription to the parent name node represents the ones to the children nodes, one new aggregated multicast tree is formed, original publishers can publish their events on the aggregated multicast paths, and original subscribers can receive events, and the required bandwidth is less than the sum of the parent one and its children ones. All aggregated final multicast paths are written as Setmult = {treei|i = 1, 2, ⋯} with |Setmult| denoting the number of set elements, such that:

  • 1.

    for parent nodes Nni, i = 1, 2, ⋯, where cost(treei) = ∑wmn, wmn on emn ∈ treei.

  • 2.

    minimize(|Setmul|) and for the whole semantic name tree NTree.

The aggregating routing problem is NP-hard. For the condition , finding out the nodes outside of (SiDi) with the minimal cost to connect (SiDi) is equal to computing a Steiner tree [13, 14] of (SiDi) in G. As we know, the Steiner tree problem is NP-hard [13, 14]. The other conditions make the computation more complex.

4.2. Solving Encoding Problem

We transform route tables into flow entries and download them onto the SDN switches for forwarding events, where the subscriptions and route items are encoded, and the semantic structure of name trees will be represented by hierarchical flow tables. We adopt a semantic method to reduce the required flow table space and event matching times, which allows for more tenants to run on the same physical SDNs.

The core idea is to use multiple-level flow tables to semantically match name nodes, which is illustrated in Figure 9. We visit all subscribed name nodes by the breadth-first order, and the children nodes are aggregated into their parent ones as far as possible. According to the idea, we design an encoding algorithm where the parent of a name node means its ancestor in the name tree, and its children mean its descendants in the name tree. Finding the parent of a name node means finding the nearest ancestor in the name tree.

Details are in the caption following the image
Semantic subscription encoding.
In Figure 9, each name node is represented as a unique one: a string of bits represents the tree root (e.g., “10”), and the next string of bits represents its children, with each child having a unique one. The code of a node in the name tree is a catenating string of all nodes’ strings from the root to the node’s self. According to the code, the matching between events and subscriptions is based on the following criteria:
  • 1.

    The matching is carried out from the root to the leaves.

  • 2.

    After a parent node in the name tree can match against an event, we may continue to check the matching between the event and the children nodes if the code in the event header is longer than the code of the parent name node.

    Algorithm 1: Semantic encoding.
  • Input: A semantic name tree NTree , a route table on SDN nodes: Route = {(Nni, ePorti, leveli)|NniNTree, leveli = 0} with Nni being a name node (coded from root to itself), ePorti being an egress port computed in routing algorithms, and leveli being the level of Nni ’s flow table (initialized by 0).

  • Output: multiple-level flow tables with being the table at the first level and corresponding to the Nni ’s route.

  • 1. foreach name node NniNTree // from root to leaves by breadth-first

  • 2. code the path rootNniinNTree as

  • 3. if ePortijePortiparent for its most children {NnChij},

  • 4. then //use ePort to partly split event flows

  • 5.  leveli = leveliparent + 1

  • 6.  put into

  • 7.  put (default, ePorti) into

  • 8. else

  • 9.  if ePortiePortiparent, then

  • 10.   leveli = leveliparent

  • 11.   put into

  • 12. return

In Algorithm 1, the subscribed children nodes are not encoded with their parent representing them if they have the same egress port as the parent. In order to make the layers of flow tables appropriate for huge-depth name trees, the descendants of a name node can be treated as a child in the semantic encoding algorithm. Figure 10 illustrates such an example, where Switch A and Switch B are treated as the children of name node Control, and no new hierarchical flow table is created for storing them. In the same level tables, the matching between event headers and flow entries is carried out from long name codes to short ones, that is, sorting flow entries in a flow table.

Details are in the caption following the image
Hierarchically encode by reducing the tree depth.

The aggregation of flow entries is based on the inclusion semantics of name trees as well as reducing the trees’ depth. The reduction of flow entries saves the flow table space, and the parent node representing children nodes also saves the matching times.

During encoding subscriptions and the name tree, we address the aggregation conflict, where topology information of switches is used for gradually discarding redundant flows. When an event flow is routed along to subscribers, the aggregation degree of event flows becomes lower, and the actually needed flows are extracted to be forwarded.

For two name trees over the same resource model, we merge them based on their semantics, as illustrated in Algorithm 2. Because they are on the same resource model, one tree has certainly semantic paths to the second tree. Sometimes, the two trees themselves have crossing nodes.

    Algorithm 2: Semantically merge two name trees.
  • Input: Two semantic name trees NTreei, NTreej over the same IoT resource entity IoTRes

  • Output: One semantic name tree NTreeij

  • 1. foreach path pathjx in NTreej

  • 2. find a crossing node crnjxi between pathjx and NTreei

  • 3. if crnjxi is null, then

  • 4.  find a semantic node crnjxi in IoTRes to connect

  •                pathjx and NTreei

  • 5. forall crossing nodes {crnjxi|x = 1, 2, ⋯}

  • 6. find their common ancestor ancestori in NTreei

  • 7. connect the root of NTreej to ancestori as a subtree

  • of NTreei , and then NTreei becomes NTreeij

  • 8. find all nodes {nij} in that appear

  •       in NTreei

  • 9. delete {nij} from and reconnect

  •    disconnected parts as a subtree of NTreeij.

  • 10. return NTreeij

We denote the times as J jumping from one flow table to another and the average times for one event matching against one flow entry as M. Let K be J/M. It is assumed that the number of event streams is proportional to the bandwidth, denoting their ratio as L. For any two flow tables T1 and T2, events that fail to match at T1 will continue to be matched at T2. The bandwidth requested by the matched streams in the two tables is R1 and R2, respectively, the reduced number of matching times can be expressed as follows:

As to a redundant flow, it will be discarded when its subscription is out of the aggregated subscription at a crossing node of the multicast tree. In this sense, Algorithm 1 can precisely discard redundant flows along routing paths.

5. Solving Aggregating Routing Problem

As illustrated in Figure 11, there is a semantic name tree rooted at n1, and a depth-first method is used to aggregate routing paths. For each name tree node, we can compute a multicast tree, and two event flows relevant to two tree nodes may be semantically aggregated and rooted on one path to the given destination clients. Therefore, when a nonleaf name tree node is visited, the subscriptions for its children are aggregated into the representing parent one if the multicast tree for the aggregation has less transmission cost with its bandwidth requirements being satisfied.

Details are in the caption following the image
Semantic aggregating of event flows.
The subscription aggregation is based on the name tree semantic that the parent tree node is formed by its children conceptually. If a client subscribes to one parent tree node, it means that all the children tree nodes of the parent are subscribed to. The parent event flow relevant to the parent subscription may merge with the children’s event flows relevant to the children’s subscriptions. The corresponding event flow multicast aggregation complies with the following conditions:
  • 1.

    The required bandwidth for children node subscriptions is summed up as the bandwidth requirement of the parent node subscription.

  • 2.

    The cost of multicast for the aggregated subscription is less than the sum of all children’s ones.

The distance between two nodes in G = (V, E) is initialized as follows:
()
    Algorithm 3: Semantically aggregate event flow.
  • Input: G = (V, E) with communication costs {wi,j|vi, vjV} and transmission capacities {ci,j|vi, vjV} ; event flows δk, k = 1, ⋯, r with bandwidth demand ck

  • Output: Multicast trees Τr or false

  • 1. Initialize {D[vi, vj]|vi, vjV} as Equation (1)

  • 2. rearrange δk, k = 1, ⋯, r by the subscriptions on the name

  •   tree nodes, i.e., from the tree leaves to root.

  • 3. foreach δk(Sk, Dk)

  • 4.  invoke Treek[D[s, d]k|sSk, dDk] = FindTreeUnderCap(G, Sk, Dk, ck)

  • 5.  if no failure then for k ≠ 1

  • 6.   Forestk = SemanticallyAggTwoTrees(G, Forestk−1, Treek)

  • 7.  else return false

  • 8. use in {Forestk} to get multiple multicast trees Τr //according to the algorithms in [15]

  • 9. returnΤr

Line 4 in Main Algorithm 3 constructs a multicast tree for an event flow relevant to a name node in the semantic name tree by invoking Algorithm 4. The multicast will be semantically aggregated with others corresponding to the sibling name or parent name node, which is executed from Line 5 to Line 7.

    Algorithm 4:FindTreeUnderCap(G, S, D, c).
  • Input:G = (V, E) with {ci,j, wi,j|vi, vjV} and ci,j being residual capacity on the edge ei,j , Publisher set S , Subscriber set D , the flow δ between S and D with required bandwidth c

  • Output: A multicast tree Tree with shortest paths between the sources and destinations {D[s, d]|s, v, ⋯, d} or failure

  • Middle Data Structure: empty node set Src

  • 1. foreach sS

  • 2.  Src = Src ∪ {s}

  • 3.  D[s, vj] = min{D[s, vj], D[s, vx] + wx,j|vxSrc, first check∃ ex,j(vjVSrc, cx,j > c), then check∃ ex,j(vjVSrc, cx,j > c)}

  • 4.  Src = Src ∪ {vj} // Dijkstra algorithm by negative capacity [16]

  • 5. repeat until DSrc

  • 6. if no DSrc ,then returnfailure

  • 7. getTree from {D[s, d]|sS, dD}

  • 8. return Tree with {D[s, d]|sS, dD}

    Algorithm 5: SemanticallyAggTwoTrees(G, tree1, tree2).
  • Input: Event flow δ1 with Tree1 and D1[S, D] , event flow δ2 with Tree2 and D2[S, D]

  • Output: Aggregated sub-graph Forst with broken labels, or None-aggregation

  • 1. Tree1,2 = FindTreeUnderCap(G, S1S2, D1D2, c1 + c2)

  • 2. ifCost(Tree1,2) > Cost(Tree1) + Cost(Tree2) then

  • 3. return none-aggregation

  • 4. foreach node in Tree1,2

  • 5. Do Hierarchical Content Aggregation in Definition 3

  •     //to aggregate event content by their property semantics

  • 6. returnTree1,2 with broken labels

In Algorithm 5, the semantic aggregation of two multicasts is for the two event flows corresponding to name nodes in a semantic name tree. Furthermore, the aggregation should satisfy the condition that the aggregated multicast should have less cost than the sum of children’s event flows’ ones, as shown in Line 2 of the algorithm. Besides the aggregation of two multicast trees, the event contents of two flows are also aggregated (i.e., model aggregation), shown in Line 5 of the algorithm. This event content aggregation in Line 5 includes two stages. During the first stage of multicast tree computation, the content aggregation model is pretrained or preprocessed (e.g., deleting duplicated properties in two event definitions). During the second stage of actually forwarding events, the hierarchical aggregation procedure in Definition 3 is actually carried out.

We present Figure 12 to illustrate the performance of the MainAlgorithm. In Figure 12, there is a semantic name tree, and one event flow may be named after one name node in the tree. In classic publish/subscribe systems, the semantic of publish/subscribe operations over the name trees is not exploited comprehensively. For semantic publish/subscribe, three kinds of semantic cases will be considered. In Figure 12(a), publishers only publish an event flow relevant to Parent Name Node A with the Children Name Nodes B and C being subscribed to. It means that the published events may be aggregated with their content satisfying B and C subscriptions at the super concept level (e.g., animal being super to dog). If the aggregated event flow of A can be split into the children ones when it is routed near Subscribers B and C, the respective routing paths of B and C could be aggregated into the one of A. In Figure 12(b), only Parent Name Node A is subscribed, with publishers pushing events relevant to its child name nodes. In this case, all event flows should be aggregated as parent one, with events being forwarded along the routing paths of the parent one. In Figure 12(c), all name nodes are subscribed to, with publishers publishing events on these name nodes. In this case, some event flows should be aggregated as in the two previous cases. The difference between the last case and the previous ones is that one subscriber may lie in the event flow of B, but it receives the event flow of C if all event flows are aggregated. That is, the event flow aggregation results in redundant event flows on inappropriate routing paths, and an aggregation conflict happens. For the aggregation conflict, coding subscriptions into hierarchical flow tables is considered to reduce the event matching cost by the subscription semantic (see Section 4 for the solution).

Details are in the caption following the image
Semantic relation of event flows.
Details are in the caption following the image
Semantic relation of event flows.
Details are in the caption following the image
Semantic relation of event flows.

6. Evaluation

6.1. Algorithm Evaluation and Comparison

To test the scheme of aggregating event flows and subscriptions, we make experiments, and the test settings are listed in Table 1. For the experiments, the semantic name tree is fixed with its depth being 5, and the subscribers on each name node vary from 2 to approximately 100.

Table 1. Settings for resource allocation.
Parameter Description
Height The height of the semantic name tree varies from 3 to 7
Deg The connection degree of SDN nodes: [1, 3], [3, 7], and [5, 12]
Network topo The number of network nodes from 100 to 1500
Subscribing probability From 0.1 to 0.8
Operating system Windows Server 2022
CPU Intel (vCPU) 2.7 GHz

Figure 13 illustrates the computation time of performing the first kind of experiment, where the network topology varies from 100 network nodes to 1500 network nodes, and the subscribers on each name node vary from 3 to 100. In Figure 13, it is known that the computation time increases when the network node number increases. When the subscribers on each name node increase, the computation time increases. Although the computation time increases with the network nodes increasing, we can adopt parallel algorithms on cloud platforms to support larger network topologies.

Details are in the caption following the image
Computation time for event flow aggregation.
Details are in the caption following the image
Computation time for event flow aggregation.
Details are in the caption following the image
Computation time for event flow aggregation.

We conduct two kinds of experiments to test semantic subscription encoding methods under the settings in Table 1, where each cluster/node is assumed to have 2~100 subscribers, each subscriber subscribes one name node with the probability from 0.1 to 0.8, and the height of the semantic name tree ranges over [3, 7] with each parent name node having three children nodes. For the first kind of experiment, the connection degree of SDN cluster nodes varies from 1 to 3, from 1 to 5, and from 1 to 7, and the height of the topic tree is fixed at 4. For the second kind of experiment, the connection degree of SDN cluster nodes is fixed at [1, 3], and the height of the name tree varies in [3, 5, 7].

Figure 14 illustrates the results of performing the first kind of experiments for encoding subscriptions into flow tables. In Figure 14, it is known that the hierarchical method efficiently reduces the number of flow entries when the subscribing probability of subscribers increases. In contrast to our intuition, the increasing of nodes’ connection degree decreases the number of flow entries in both cases of “original” and “hierarchical” because the increasing node degree makes more routing paths such that the average flow entries in each SDN switch decreases. It is worthwhile to point out that the impact of node degree disappears gradually when the subscribing probability becomes greater because more routing paths and flow entries are needed in this case. Figure 15 illustrates the results of performing the second kind of experiments for encoding subscriptions into flow tables. In Figure 15, it is known that the subscribing probability is still a key factor when the height of the name tree varies. In contrast to our intuition, the number of needed flow entries decreases when the height of the name tree decreases. The dense subscriptions in a lower name tree make the subscription encoding method more efficient, and more sparse subscriptions give less subscription aggregation chances.

Details are in the caption following the image
The number of flow entries for different node degrees in the hierarchical subscription encoding scheme.
Details are in the caption following the image
The number of flow entries for different topic tree heights in the hierarchical subscription encoding scheme.

We compare our algorithm with other routing algorithms in topic-based pub/subsystems in work [17] (called not optimized), as illustrated in Figure 16. We allocated 20% of the total network nodes as random publish/subscribe nodes, with node degrees ranging from 1 to 5. In Figure 16, it can be observed that the total link cost of the routes obtained by our algorithm accounts for only about 50% of that obtained by the work of [17].

Details are in the caption following the image
Link cost comparison with the work of [17].

6.2. Experiments in Mininets

We used BMv2 and Mininet to construct a network with topology as in Figure 17, and the test settings are listed in Table 2. We implemented our semantic publish/subscribe system and deployed it onto the network. We adopted average time latency as a metric because our less matching times in SDN switches should result in less delay. We compared our semantic solution with the classic one in the same network topology. Publishers and subscribers were randomly selected from R1 to R9, and others without the “R” mark were BMv2 switches.

Details are in the caption following the image
Network topology.
Table 2. Settings for Mininet experiment.
Parameter Description
Network size 10
Bandwidth 100 mb/s
Network topo Complex
Senders/receiver 1S/2R, 2S/2R, 2S/3R, 2S/4R
Operating system Windows Server 2022
CPU Intel (vCPU) 2.7 GHz

In Figure 18, “2S/3R” meant that two publishers and three subscribers were randomly selected. Figure 18 shows that our semantic publish/subscribe system had an average time delay of less than 2 ms, and the time delay of the nonsemantic one was greater than 4 ms. That is, our semantic encoding and routing solution is efficient besides reducing flow space and communication cost, which achieves our design goal.

Details are in the caption following the image
Delay comparison.

7. Related Work

The semantic communication issue was explored when the Shannon communication model [18] was presented. A semantic-empowered communication framework is now classified into three categories. The first one is to reduce less important or uninformative data and preserve semantically meaningful information at the sender [1922]. The information importance of raw data will be measured by goal-oriented metrics over the effectiveness of information at receivers (e.g., attention-based similarities [22], the age of information [20, 21], and control-theoretic accuracy [19]). The second category is to map raw data into a lower-dimensional space by compressing the size of transmitted data. The examples are the image-to-text conversion [23, 24] and nonlinear to linear system dynamics transformation by the Koopman operator with autoencoder [25]. The third one is to exploit a knowledge base as a codebook for reducing the communication size. The examples are presented in [1, 8, 26]. They did not discuss semantic publish/subscribe systems.

This paper focuses on knowledge-based semantic publish/subscribe systems for IoT applications [2729]. The work of [8] adopted a triple-based graph to realize such semantic communication patterns in IoT scenarios. When a subscriber advertises a subscription for IoT data, the publisher aggregates multiple-source IoT data for one subscription. IoT data were assumed to be semantic with multiple triples as a knowledge graph. These triples were embedded into vectors by machine learning methods. If these vectors were close to the subscription, we can aggregate the vectors to get their abstract representation or put together the vector-corresponding triples as a summary of multiple IoT data/events for the subscription, which will not only compress the transmitted events by the summary but also the response to the subscription by the user-concerned aggregation knowledge. Although our solution could use the above method [8] to realize knowledge-based symbol encoding, the work of [8] did not discuss the relation of multiple subscriptions to explore more potential for semantic communication. In addition, the underlying network was abstracted as a channel in [8] without considering semantic dynamic routing and event matching in switches. Our solution delved into the communication channel.

The work of [7, 30] also adopted a knowledge graph as a base to realize semantic publish/subscribe patterns for IoT applications, did the one of [8]. An interpretable solution was developed to cluster semantic information by exploiting triples as semantic symbols [30]. These works considered the underlying network transmission as an abstract channel. How to adapt the underlying network to satisfy dynamic semantic communication requirements was not comprehensively exploited. We consider the publish/subscribe paradigm for semantic communication in IoT applications [9] and emphasize the impedance matching between service goals and event routing. Compared with the IoT RPL routing protocol, our solution focuses on information semantics, optimizing content aggregation, routing aggregation, and subscription encoding. The header of the IPv6 protocol is used to assume the code of the topic tree without compressing IPv6 addresses.

Our solution also depends on the SDN-based publish/subscribe technologies. The approaches shown in [3133] presented such examples. The work of [34] tried to construct a trustful topology for publishers to publish customized information. From the perspective of the physical topology of networks, however, semantic events from publishers may pass through the physical network nodes that are not allowed to semantically retrieve them [10, 34]. The work of [10] discussed event filtering and routing over SDNs. But the semantic requirements were not discussed in these works.

One difficulty of realizing the impedance matching between service computation and event communication is that one event communication foundation serves various IoT applications with a fixed network architecture, and vice versa. Besides semantic communication technologies, the network function virtualization technologies [10] also make it possible for one application to use its own virtual network. The work of [35] discussed introducing a hypervisor to virtualize the SDN, and the hypervisor mediated between multiple virtual SDN controllers and the physical SDN by mapping the created virtual SDN switches into physical switches. The work of [36] proposed a virtual network function placement scheme to minimize access delay in SDN-based IoT applications. But these works did not comprehensively explore how to establish a virtual semantic publish/subscribe channel for IoT applications with dynamical subscription and publication. The other difficulty in making the impedance matching is that the IoT service interaction paradigms are not consistent with the network communication ones. Although reactive systems and programming methodologies [37, 38] provided a way to create IoT applications on events in a publish/subscribe network, how to establish a semantic IoT service communication infrastructure was not comprehensively exploited.

In this paper, we endeavor to build a semantic IoT service communication infrastructure to converge IoT devices, IoT data, and IoT services while unifying their access when the proliferation of massive IoT devices is pushing the deployment of 5G/6G mobile networks. The multiple-tenancy concept is introduced as a key one in the International Mobile Telecommunication (IMT)-2020 network [39], which emphasizes semantic networks with slicing and efficient network sharing [40, 41].

Some works considered providing multiple-tenancy services, especially for IoT applications. Xiao. et al. [42] proposed a multiple-operator network-sharing framework to support massive-scale IoT devices and high-speed cellular services together. The work of [43] presented a scheme to allocate slices and partition radio resources for realizing latency-sensitive IoT accesses. The work of [44] presented the first open-source 5G-connected enterprise network over licensed and unlicensed spectrum, which is similar to ours. It designed two distinct components in a multicloud environment: 5G/LTE connectivity and edge cloud control and management, providing virtual APIs for IoT applications. These works only focused on the application of 5G mobile networks in IoT scenarios without insights into IoT services themselves. In our work, the changes that happened in the physical world appear as events; the event communication paradigm plays a key role in IoT services to react to these events; and the semantic events enable redesigning the two layers to be matched, such as semantic event communication and event-based IoT service operations.

8. Conclusions

The key issue in this paper is to fill the semantic gap from the publish/subscription operations of IoT services to event transmission by being aware of the semantics of services’ input/output goals. Given service goals, a semantic communication solution is constructed by unifying on-demand multiple semantic trees, semantically running publish/subscribe paradigms, semantic symbol encoding/decoding, dynamic creation of semantic routing paths, and semantic event matching in switches/routers. Compared with classic semantic end-to-end communication with abstracting underlying networks as a channel, our solution copes with multiple sources to multiple destinations publish/subscribe communication, and it carries out semantic communication at two levels: semantic event routing and event content aggregation along the routing. We then propose an IoT service communication infrastructure to converge IoT devices, IoT data, IoT services, and multiple tenants with scalability. Experiments have shown our solution’s effectiveness and efficiency.

Disclosure

This manuscript was submitted as a preprint in the link “https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4813619.”

Conflicts of Interest

The authors declare no conflicts of interest.

Funding

This research was supported by the National Natural Science Foundation of China (No. 61772479).

Acknowledgments

This research was supported by the National Natural Science Foundation of China (No. 61772479).

    Data Availability Statement

    We have implemented a semantic publish/subscribe system which is owned by our lab, and experiments are conducted on the system. Please contact us via [email protected] for the experiment system and private data.

      The full text of this article hosted at iucr.org is unavailable due to technical difficulties.