# Content-Based Efficient Messages Transmission in WSNs

Authors: Rong Xiao; Bo Sun; Yongkang Xiao; Yungang Wei; Wenlong Chen
Journal: Wireless Communications and Mobile Computing
 (2018)

---

## Abstract

The WSNs are mainly to monitor various types of sensing content. In the automated control system, administration centers (ACs) often send notifications to a set of nodes meeting given content ranges to implement specific actions. For instance, we notify the sensing devices with sensing temperatures greater than 35 to turn on the cooling system. At present, the transmission of notification messages is mostly based on node identification, which is isolated from sensing contents and unable to accurately locate nodes meeting the sensing content requirements. In this paper, we generalize two types of sensing contents: the continuous values and the discrete values, and a content-based efficient message transmission mechanism (CEMT) is proposed for the typical tree-like topologies in WSNs. Thus, a highly effective notifying method for content-based multicast and anycast messages is designed, which accurately sends notification messages to nodes whose sensing values belong to the given range. Sometimes, multiple sensing types of nodes are mixed together to construct a net topology, offering underlying transport services to each other. At this point, CEMT builds a specialized logical tree for the same type of nodes, and notification messages are transmitted along the logical tree. CEMT reduces the transmission time, bandwidth, and number of processing nodes when a content-based message is sent, and it takes less storage of content routing entries in nodes.


---

## Body

## 1. Introduction

Current routing mechanisms in WSNs are implemented mainly based on node identities. For instance, the ROLL [1] workgroup designed the Routing Protocol for low-power and lossy network (RPL) [2], which fulfills routing in light of IP addresses in tree-like topologies. However, this kind of routing mechanism only provides the transmission reachability between wireless nodes with multiple hops. At the same time, most current studies on WSNs focus on data transmission from sensor nodes to the sink node, which mainly completes the collection of sensing content. Actually, for the automatic remote control in WSNs, efficient transmission from the sink nodes to sensor nodes is also an important part. In our previous research [3], we briefly introduced a notification transmission mechanism based on sensing content. In this paper, we will do further research work, especially on the common networking of multitype sensor nodes, performance analysis on storage consumption and transmission delay, and so on.As we know, WSNs are often deployed to monitor specific environment parameters, and the communications in WSNs always resolve around sensor contents. Therefore, in this paper, we mainly study how to improve the data transmission performance from the sink to sensor nodes based on the sensing content.In this paper, we assume that messages are sent to some nodes whose sensing contents meet certain conditions. For example, administration centers (ACs) need to inform the nodes that the temperatures are greater than 35 to take some actions. Nevertheless, in general, ACs are unware of the number and IP addresses of the nodes that satisfies the sensing content requirement. Therefore, ACs could only send notifications to all nodes, and the receiving nodes judge whether to deal with the received messages or not. The above message is a kind of multicast message, which is sent a set of nodes meeting the requirement. In addition, there is an anycast message in this paper, which only needs to be sent to one node that meets the requirements. Even if there are multiple nodes in the topology that meet the requirements, we just need to make sure that one node that meets the criteria receives the message.Current routing mechanisms based on node identities fail to provide a high-performance transmission for notification messages with sensor contents. Our works focus on 2 aspects: (1) How to improve the completion speed of message transmission; (2) How to reduce the resource cost of messages transmission like bandwidth and processing. Targeting at the above objectives, we propose a content-based efficient messages transmission mechanism (CEMT) in WSNs. Firstly, two kinds of sensor contents are summarized, namely, the continuous sensor contents and the discrete sensor contents. We design a storage method for content values which serves for the above two kinds of sensor contents at the same time. In tree topologies, sensing contents are aggregated at the root node of each subtree. Then, the message transmission modes are summarized including the multicast message notification and the anycast message notification, and an efficient transmission mechanism for these two modes, which can efficiently send the notification messages carrying content rules to the nodes that meet the rules requirements. Furthermore, in real deployments, sometimes there are several different types of sensor nodes in one subnet. Due to this circumstance, we construct a logical tree for each kind of sensing content, and a notification message is sent to the destination nodes along its logical tree.The remainder of the paper is organized as follows. Section2 introduces the related work. In Section 3, the problems faced by content-based messages transmission are introduced through a specific example. At the same time, some related definitions and the notification transmission mechanism based on sensing content are presented. Then, in Section 4, we give the detailed description of the transmission mechanism and the algorithms involved, including sensing contents aggregation and messages procession. Section 5 introduces how the transmission mechanism is implemented in the subnet with multidimensioned sensing contents. Section 6 presents the experiments and correlative performance analysis. Finally, the conclusion is drawn in Section 7.


## 2. Related Work

Contents based addressing and routing have been paid much attention in the academic circle [4, 5]. For instance, [5] proposed an adaptive publish-subscribe distance vector protocol, which can provide efficient routing transmission based on distance vector for the named data objects. In order to improve the routing efficiency, an embedded multilevel ring (MVR) structure was proposed [6], which identifies senor nodes based on their name rather than the traditional node IDs, such as IP addresses. MVR stores hash information at backbone nodes to promote the routing transmission performance. In addition, the content routing mechanism also attracts attentions in traditional Internet [7], routers buffer information for some contents, and the service requests are embedded into the Internet name system. Therefore, routers can provide services for the content requests, which greatly enhance network transmission efficiency. The content-based routing techniques need relatively large changes in network equipment, and these changes are too difficult to be implemented in Internet. However, WSNs usually construct their specialized network systems in local regions, which can provide convenience for the content-based transmission techniques.Data transmission in WSNs can be divided into two types: upward transmission and downward transmission [2]. Current researches mainly focus on the upward flow, which is usually used to collect sensing data. Moreover, current works of content-based transmission optimization is mainly about upward data flow. In the actual deployment, downward transmission is also an important part of WSNs [8], which is often associated with sensing content. However, downward transmission is implemented mainly based on node IDs. The work of this paper is to study the performance optimization of downward transmission combined with sensing content.In WSNs, the aggregation of sensing contents can lessen the communication traffic and shorten the total length of transmission paths, which have been widely used in our work and life [9, 10]. Gulluccio L et al. [11] proposed a data aggregation mechanism with adaptability during transmission, which deploys aggregation nodes based on congestion prediction and supports their dynamic moves. Ngai E et al. [12] presented a reliable collection mechanism for sensing data in wireless sensor-actuator networks, which considers transmission reliability from multiple factors including accuracy, importance, and data freshness. Wang C et al. [13] studied the capacity of data aggregation in WSNs and proposed an aggregation scheme in the tree-based routing system. In addition, data aggregation and content-based notification have been paid more attention in Pocket switched networks [14, 15].Huang SC et al. [16] focused on the latency of data aggregation in WSNs and designed an algorithm according to the maximal independent sets, which achieves much less latency. In [17], Bagga M et al. proposed some approaches for semistructured and unstructured topologies to minimize the time latency of sensing data aggregation. In order to maximize the revenue of data gathering with a deadline in WSNs, Hariharan S et al. [18] proposed a corresponding algorithm with polynomial complexity. Kuo T W et al. [19] studied the construction of the data aggregation tree with the minimum energy cost and investigated two scenarios with and without relay nodes. Sometimes we use random routing for source privacy protection [20], although this will increase the transmission delay.


## 3. Transmission Mechanism

In Figure1, the sensing content value of each node is given below the circle. If the sink node wants to send messages to some nodes whose sensing contents belong to <11, 15>, how to do it? Apparently, the nodes who should process the message are N3, N6, N7. When only based on node identity (ID), the sink nodes have to send the message with the content range <11, 15> to all nodes. And then, every node decides whether or not to process it according to its own sensing value. If each root node stores all sensing contents of its subtree, the message transmission could be fulfilled easily. However, this storage mechanism would cost too much memory and have poor scalability. For instance, in Figure 1, N2 store 5 sensing values of their subtree: 8, 6, 4, 3, and 34. Thus, a decimal value range (DEVR) rather than lots of specific values could be designed to describe the sensing contents of a subtree, which is similar to the idea of content aggregation researches [9, 17, 18]. For example, N2 store the range: <3, 34>, and N3 store the range: <12, 15>. DEVR optimizes the storage performance, but the sensing range description for a subtree is not accurate enough. In this paper, we design a novel storage method for the sensing value to optimize the message transmission.Figure 1
An example topology containing node sensing values.For the content-based multicast messages, DEVR might result in invalid transmission. In Figure1, the value range of the subtree rooted as N2 is <3, 34>, and N2 is the same. If the sink node wants to notify nodes whose sensing contents belong to <11, 15>, the message will be sent to N2 and then be sent to N4. These invalid transmissions consume processing and bandwidth resourcesFor anycast messages, it needs to be sent to any node meeting requirement. DEVR would also lead to redundant bandwidth consumption. Because there is no way to know which path to reach nodes satisfying the content condition, messages are always sent to all possible subtrees. In Figure1, the anycast message whose sensing content belongs to <11, 15> must be sent to N2 and N3. However, there is no node meeting the requirements in the subtree rooted as N2. This is the problem that this paper needs to solve.


### 3.1. Symbols Definition

Definition 1.
Continuous sensing value (C_Value) is used to describe a quantitative sensing data. For instance, the PM2.5 in the air and ambient noises both belong to C_Value. Ordinarily, the former is about in <0, 1000>, and the latter is in <0, 200>.Definition 2.
Discrete sensing value (D_Value) is used to describe a sensing status about environment, equipment, human body, etc., which is one of several explicit status values. For example, human activity state (static, walking, and running) and working state of electronic equipment (power on, power off, and standby) both belong to D_Value.In this paper, we design a sensing content storage method with “0/1” bits called BIM, which applies for C_Value and D_Value at the same time.For D_Value,n bits represent the values ofn discrete sensing contents. The bit values of D_Value may be mutually exclusive or not. In the former case, there is only one “1”. While in the latter case, there may be multiple “1”.For C_Value, each bit represents one value range. It is assumed that the value range of sensing contents is <vlow,vhigh>, vlow≤vhigh. According to the precision requirement of the WSN environment, we define the value range represented by one bit:len. Then, the number of bits required in the environment is defined asnbit and satisfies formula (1).(1)nbit=vhigh-vlow+1lenAssuming the value of a sensing content is Vk, Vlow≤Vk<Vhigh, then its bit position is defined asPOSbit. We set “1” at the corresponding bit of C_Value:POSbit. Apparently,POSbit can be calculated according to Vk, namely,(2)POSbit=vk-vlow+1lenFor instance, some sensors are used to monitor the environment temperature, and its value range for sensing value is <1, 40>. As shown in Figure 2, we use each bit to represent five temperature values. According to formula (1), nbit=(40-1+1)/5=8, so 8 bits are needed to store the sensing content for the above value range. Then, in light of formula (2), the correspondingPOSbit of the sensing content “3°C” is 1, (POSbit=(3-1+1)/5=1), and thePOSbit of “34°C” is 7, (POSbit=(34-1+1)/5=7). Therefore, “3°C” and “34°C” are represented as “10000000” and “00000010”, respectively.Figure 2
A storage example of BIM.In this paper, BIM uses each bit to represent a value range. Compared with traditional DEVR, BIM improves the description accuracy of sensing contents under certain conditions. According to the example shown in Figure2, it is assumed that there are two sensor nodes in a subtree whose temperatures are 3°C and 34°C. In DEVR, the merging value is expressed as <3, 34>, and it is “1000010”in BIM.Definition 3.
Content range (CR) depicts a specific sensing content, which includes a number of “0/1” bits.CR is used in the following 2 cases:(1)
When stored in a node,CR describes the sensing content range of one sensor node or a subtree with many nodes. For any tree nodeNk, it storesCR of each direct son node. Then,Nk calculates and stores theCR of the subtree rooted at itself.(2)
When embedded in notification messages,CR describes the rule of the processing nodes. A content-based notification message always carries aCR that is used to restrict the sensor nodes dealing with it.Definition 4.
Multicast Message Based on Sensor Content (MSGmulti) is a kind of notification message sent to a set of sensor nodes whose sensing value matches theCR carried by the message.MSGmulti is a broadcasting message when itsCR covers the whole content value range, which is received and processed by each node.Definition 5.
Anycast Message Based on Sensor Content (MSGany) is a kind of notification message sent to any one of the sensor nodes whose sensing value matches theCR carried by the message.MSGany only need to be processed by one node.Note that all notification messages are regarded to be sent from sink node.


### 3.2. Transmission Mechanism Design

#### 3.2.1. Contents Aggregation

In CEMT, it must be first implemented that sensing contents are collected and aggregated at roots of all subtrees in WSNs, which forms the base of content-based message transmission. In tree-like topologies, nodes implement sensing contents aggregation periodically in any subtree. Each node, on behalf of all nodes, belongs to its subtree and reports theCR of the whole subtree to the direct father node at regular intervals. Therefore, any node in the tree topology stores theCR of the subtree rooted as it. Set the reporting period for the sensing contents asTreport, and the node roles are defined as follows.(1)
Leaf node reports the latest sensing value to the direct father node at each period ofTreport.(2)
Sink node monitors the sensing contents reported by direct son nodes and then renews and storesCRof each subtree.(3)
Other nodes (neither leaf node nor sink node). On the one hand, the node monitors the sensing contents reported by direct son nodes and then renews and storesCRsof each subtree. On the other hand, it aggregatesCRs of all son nodes and itself before reporting the aggregatedCR of the subtree rooted as it to its direct father node at each period ofTreport.


#### 3.2.2. Messages Transmission Based on Sensing Contents

Generally, the message transmission in WSNs is grouped into two types in terms of transmission direction: (1) being sent to sensor nodes from sink node; (2) being sent to sink node from sensor nodes. In the tree topology of this paper, the above two types of transmissions are upstream messages from tree nodes to root node and downstream messages from root node to leaf nodes (destination may be a nonleaf node). Upstream messages are always sent along parent nodes, which is unassociated with sensing content and relatively simple. Therefore, we omit the discussion of upstream messages and only focus on downstream multicast messages and anycast ones.We take Figure3 as an example to introduce the transmission procedure of content-based messages. Each node has sensing content value of itself, which is labeled under the node (ellipse). In addition, each node stores the aggregatedCR of its subtree, which is labeled above the node (rectangle).Figure 3
The transmission of theMSGmulti andMSGany in CEMT.(1) Transmission of MSG multi. The message transmission starts from sink node, which sends the message to all subtrees satisfying content conditions in view ofCRs of each subtree stored in them. After that, the above work is implemented to tree leaf nodes layer by layer. For example, in Figure 3, sink node (N1) sends aMSGmulti (CR= 10000000) to all nodes satisfying the requirement. Blue blocks describe the sending procedure in Figure 3. Note that since N3 does not meet theCR condition, it only forwards the message without dealing with it.(2) Transmission of MSG any. AMSGany starts from the sink node too. It is sent to a certain subtree satisfying content requirement. The transmission is implemented to tree leaf layer by layer. When a node receives aMSGany, it will stop the transmission if the sensing content (CR) of itself meets the rule of theMSGany. For instance, in Figure 3, the sink node (N1) sends theMSGan y (CR= 01000000) in the tree topology. Red blocks describe the sending procedure in Figure 3. Note that the transmission procedure is stopped in N9 because N9 satisfies theCRcarried by theMSGany. Moreover, because theMSGany only needs to be sent to one receiving node, N4 send it to N9 and do not send it to N10.


## 3.1. Symbols Definition

Definition 1.
Continuous sensing value (C_Value) is used to describe a quantitative sensing data. For instance, the PM2.5 in the air and ambient noises both belong to C_Value. Ordinarily, the former is about in <0, 1000>, and the latter is in <0, 200>.Definition 2.
Discrete sensing value (D_Value) is used to describe a sensing status about environment, equipment, human body, etc., which is one of several explicit status values. For example, human activity state (static, walking, and running) and working state of electronic equipment (power on, power off, and standby) both belong to D_Value.In this paper, we design a sensing content storage method with “0/1” bits called BIM, which applies for C_Value and D_Value at the same time.For D_Value,n bits represent the values ofn discrete sensing contents. The bit values of D_Value may be mutually exclusive or not. In the former case, there is only one “1”. While in the latter case, there may be multiple “1”.For C_Value, each bit represents one value range. It is assumed that the value range of sensing contents is <vlow,vhigh>, vlow≤vhigh. According to the precision requirement of the WSN environment, we define the value range represented by one bit:len. Then, the number of bits required in the environment is defined asnbit and satisfies formula (1).(1)nbit=vhigh-vlow+1lenAssuming the value of a sensing content is Vk, Vlow≤Vk<Vhigh, then its bit position is defined asPOSbit. We set “1” at the corresponding bit of C_Value:POSbit. Apparently,POSbit can be calculated according to Vk, namely,(2)POSbit=vk-vlow+1lenFor instance, some sensors are used to monitor the environment temperature, and its value range for sensing value is <1, 40>. As shown in Figure 2, we use each bit to represent five temperature values. According to formula (1), nbit=(40-1+1)/5=8, so 8 bits are needed to store the sensing content for the above value range. Then, in light of formula (2), the correspondingPOSbit of the sensing content “3°C” is 1, (POSbit=(3-1+1)/5=1), and thePOSbit of “34°C” is 7, (POSbit=(34-1+1)/5=7). Therefore, “3°C” and “34°C” are represented as “10000000” and “00000010”, respectively.Figure 2
A storage example of BIM.In this paper, BIM uses each bit to represent a value range. Compared with traditional DEVR, BIM improves the description accuracy of sensing contents under certain conditions. According to the example shown in Figure2, it is assumed that there are two sensor nodes in a subtree whose temperatures are 3°C and 34°C. In DEVR, the merging value is expressed as <3, 34>, and it is “1000010”in BIM.Definition 3.
Content range (CR) depicts a specific sensing content, which includes a number of “0/1” bits.CR is used in the following 2 cases:(1)
When stored in a node,CR describes the sensing content range of one sensor node or a subtree with many nodes. For any tree nodeNk, it storesCR of each direct son node. Then,Nk calculates and stores theCR of the subtree rooted at itself.(2)
When embedded in notification messages,CR describes the rule of the processing nodes. A content-based notification message always carries aCR that is used to restrict the sensor nodes dealing with it.Definition 4.
Multicast Message Based on Sensor Content (MSGmulti) is a kind of notification message sent to a set of sensor nodes whose sensing value matches theCR carried by the message.MSGmulti is a broadcasting message when itsCR covers the whole content value range, which is received and processed by each node.Definition 5.
Anycast Message Based on Sensor Content (MSGany) is a kind of notification message sent to any one of the sensor nodes whose sensing value matches theCR carried by the message.MSGany only need to be processed by one node.Note that all notification messages are regarded to be sent from sink node.


## 3.2. Transmission Mechanism Design

### 3.2.1. Contents Aggregation

In CEMT, it must be first implemented that sensing contents are collected and aggregated at roots of all subtrees in WSNs, which forms the base of content-based message transmission. In tree-like topologies, nodes implement sensing contents aggregation periodically in any subtree. Each node, on behalf of all nodes, belongs to its subtree and reports theCR of the whole subtree to the direct father node at regular intervals. Therefore, any node in the tree topology stores theCR of the subtree rooted as it. Set the reporting period for the sensing contents asTreport, and the node roles are defined as follows.(1)
Leaf node reports the latest sensing value to the direct father node at each period ofTreport.(2)
Sink node monitors the sensing contents reported by direct son nodes and then renews and storesCRof each subtree.(3)
Other nodes (neither leaf node nor sink node). On the one hand, the node monitors the sensing contents reported by direct son nodes and then renews and storesCRsof each subtree. On the other hand, it aggregatesCRs of all son nodes and itself before reporting the aggregatedCR of the subtree rooted as it to its direct father node at each period ofTreport.


### 3.2.2. Messages Transmission Based on Sensing Contents

Generally, the message transmission in WSNs is grouped into two types in terms of transmission direction: (1) being sent to sensor nodes from sink node; (2) being sent to sink node from sensor nodes. In the tree topology of this paper, the above two types of transmissions are upstream messages from tree nodes to root node and downstream messages from root node to leaf nodes (destination may be a nonleaf node). Upstream messages are always sent along parent nodes, which is unassociated with sensing content and relatively simple. Therefore, we omit the discussion of upstream messages and only focus on downstream multicast messages and anycast ones.We take Figure3 as an example to introduce the transmission procedure of content-based messages. Each node has sensing content value of itself, which is labeled under the node (ellipse). In addition, each node stores the aggregatedCR of its subtree, which is labeled above the node (rectangle).Figure 3
The transmission of theMSGmulti andMSGany in CEMT.(1) Transmission of MSG multi. The message transmission starts from sink node, which sends the message to all subtrees satisfying content conditions in view ofCRs of each subtree stored in them. After that, the above work is implemented to tree leaf nodes layer by layer. For example, in Figure 3, sink node (N1) sends aMSGmulti (CR= 10000000) to all nodes satisfying the requirement. Blue blocks describe the sending procedure in Figure 3. Note that since N3 does not meet theCR condition, it only forwards the message without dealing with it.(2) Transmission of MSG any. AMSGany starts from the sink node too. It is sent to a certain subtree satisfying content requirement. The transmission is implemented to tree leaf layer by layer. When a node receives aMSGany, it will stop the transmission if the sensing content (CR) of itself meets the rule of theMSGany. For instance, in Figure 3, the sink node (N1) sends theMSGan y (CR= 01000000) in the tree topology. Red blocks describe the sending procedure in Figure 3. Note that the transmission procedure is stopped in N9 because N9 satisfies theCRcarried by theMSGany. Moreover, because theMSGany only needs to be sent to one receiving node, N4 send it to N9 and do not send it to N10.


## 3.2.1. Contents Aggregation

In CEMT, it must be first implemented that sensing contents are collected and aggregated at roots of all subtrees in WSNs, which forms the base of content-based message transmission. In tree-like topologies, nodes implement sensing contents aggregation periodically in any subtree. Each node, on behalf of all nodes, belongs to its subtree and reports theCR of the whole subtree to the direct father node at regular intervals. Therefore, any node in the tree topology stores theCR of the subtree rooted as it. Set the reporting period for the sensing contents asTreport, and the node roles are defined as follows.(1)
Leaf node reports the latest sensing value to the direct father node at each period ofTreport.(2)
Sink node monitors the sensing contents reported by direct son nodes and then renews and storesCRof each subtree.(3)
Other nodes (neither leaf node nor sink node). On the one hand, the node monitors the sensing contents reported by direct son nodes and then renews and storesCRsof each subtree. On the other hand, it aggregatesCRs of all son nodes and itself before reporting the aggregatedCR of the subtree rooted as it to its direct father node at each period ofTreport.


## 3.2.2. Messages Transmission Based on Sensing Contents

Generally, the message transmission in WSNs is grouped into two types in terms of transmission direction: (1) being sent to sensor nodes from sink node; (2) being sent to sink node from sensor nodes. In the tree topology of this paper, the above two types of transmissions are upstream messages from tree nodes to root node and downstream messages from root node to leaf nodes (destination may be a nonleaf node). Upstream messages are always sent along parent nodes, which is unassociated with sensing content and relatively simple. Therefore, we omit the discussion of upstream messages and only focus on downstream multicast messages and anycast ones.We take Figure3 as an example to introduce the transmission procedure of content-based messages. Each node has sensing content value of itself, which is labeled under the node (ellipse). In addition, each node stores the aggregatedCR of its subtree, which is labeled above the node (rectangle).Figure 3
The transmission of theMSGmulti andMSGany in CEMT.(1) Transmission of MSG multi. The message transmission starts from sink node, which sends the message to all subtrees satisfying content conditions in view ofCRs of each subtree stored in them. After that, the above work is implemented to tree leaf nodes layer by layer. For example, in Figure 3, sink node (N1) sends aMSGmulti (CR= 10000000) to all nodes satisfying the requirement. Blue blocks describe the sending procedure in Figure 3. Note that since N3 does not meet theCR condition, it only forwards the message without dealing with it.(2) Transmission of MSG any. AMSGany starts from the sink node too. It is sent to a certain subtree satisfying content requirement. The transmission is implemented to tree leaf layer by layer. When a node receives aMSGany, it will stop the transmission if the sensing content (CR) of itself meets the rule of theMSGany. For instance, in Figure 3, the sink node (N1) sends theMSGan y (CR= 01000000) in the tree topology. Red blocks describe the sending procedure in Figure 3. Note that the transmission procedure is stopped in N9 because N9 satisfies theCRcarried by theMSGany. Moreover, because theMSGany only needs to be sent to one receiving node, N4 send it to N9 and do not send it to N10.


## 4. Detailed Design

In CEMT, IP unicast rather than IP multicast is used to transmit IP packets between adjacent nodes. The main considerations are as follows. At first, messages transmission may correspond to different IP multicast groups so that the protocol maintenance cost for multicast groups is high. Moreover, IP multicast transmission brings additional work on unrelated nodes which spend lots of resources on invalid packets processing.


### 4.1. Sensing Contents Aggregation

For a nonleaf node,Nk, it receives sensing contents messages reported by its son nodes. Firstly, it recordsCR of each son node, and this information constitutes content routing entries (RTS) for subtrees, which is expressed as(3)RTSi=CRi,IPi,1≤i≤n.Among them,n is the number of son nodes ofNk, andRTSi is theith routing entry for itsith subtree.At the same time,Nk hasCR of itself, which is stored asRTSfor processing convenience, i.e., RTS0=CR0,IP0. Note thatIP0 has no practical significance, and the value of which is set to 0.After that,Nk aggregatesCRs of all its subtrees and itself, which is described as formula (4). “⊕” is an “OR” operation symbol for “0/1”. Certainly,Nk also reports the aggregatedCR to its parent node.(4)CRsubtreek=CR0⊕CR1⊕CR2⊕⋯⊕CRnIn Figure 3, theCR of N3 is “00100000”, and it has two subtrees whoseCRs are “10010000” and “10000000”. Therefore, the CRsubtree3 equals “10110000”, which is calculated as formula (5).(5)CRsubtree3=00100000⊕00100000⊕10000000


### 4.2. Processing ofMSGmulti

WhenNk receives aMSGmulti, it will get the content range from the packet, that is,CRnotify. Firstly,Nk judges whether it needs to process the message itself. If the result ofCR0  andCRnotify is greater than 0, it can be concluded thatNk meets the content condition of the notifying message, and the message should be processed byNk. Moreover,Nk analyzes whether each subtree satisfiesCRnotify and forwards theMSGmulti to all subtrees matching the content rule. The basic algorithm of processing theMSGmulti is described in Algorithm 1.Algorithm 1:Multicast_notification_deal (MSGmulti).
1 get theCRnotify from MSGmulti; 2 for (i=0;i≤n;i++) 3  if((CRnotify&CRi)!=0) 4   if(i==0) 5    processMSGmulti in this node; 6   else 7    send theMSGmulti to the ith sub-node; 8 return;


### 4.3. Processing ofMSGany

The processing procedure is similar to that of theMSGmulti. WhenNk receives aMSGany, it will get the content range from the packet, that is,CRnotify. At first,Nk judges whether there is a need to process the message by itself. The judging method is the same as the above description. IfNk matches the content rule of theMSGany, it will process the notifying message without forwarding it to any other nodes. Otherwise,Nk selects an arbitrary subtree satisfying the content rule and forwards the message to the corresponding son node. Note thatNk forwards theMSGany to only one subtree because it is an anycast message. The basic algorithm of processing theMSGany is described in Algorithm 2.Algorithm 2:Anycast_notification_deal (MSGany).
1 get theCRnotify from MSGany; 2 for (i=0;i≤n;i++) 3  if((CRnotify&CRi)!=0) 4   if(i==0) 5    processMSGmulti in this node; 6   else 7    send theMSGmulti to the ith sub-node; 8   break; 9 return;In summary, the message processing flow in CEMT is given as Figure4.Figure 4
Message processing flow in the sensor node.


## 4.1. Sensing Contents Aggregation

For a nonleaf node,Nk, it receives sensing contents messages reported by its son nodes. Firstly, it recordsCR of each son node, and this information constitutes content routing entries (RTS) for subtrees, which is expressed as(3)RTSi=CRi,IPi,1≤i≤n.Among them,n is the number of son nodes ofNk, andRTSi is theith routing entry for itsith subtree.At the same time,Nk hasCR of itself, which is stored asRTSfor processing convenience, i.e., RTS0=CR0,IP0. Note thatIP0 has no practical significance, and the value of which is set to 0.After that,Nk aggregatesCRs of all its subtrees and itself, which is described as formula (4). “⊕” is an “OR” operation symbol for “0/1”. Certainly,Nk also reports the aggregatedCR to its parent node.(4)CRsubtreek=CR0⊕CR1⊕CR2⊕⋯⊕CRnIn Figure 3, theCR of N3 is “00100000”, and it has two subtrees whoseCRs are “10010000” and “10000000”. Therefore, the CRsubtree3 equals “10110000”, which is calculated as formula (5).(5)CRsubtree3=00100000⊕00100000⊕10000000


## 4.2. Processing ofMSGmulti

WhenNk receives aMSGmulti, it will get the content range from the packet, that is,CRnotify. Firstly,Nk judges whether it needs to process the message itself. If the result ofCR0  andCRnotify is greater than 0, it can be concluded thatNk meets the content condition of the notifying message, and the message should be processed byNk. Moreover,Nk analyzes whether each subtree satisfiesCRnotify and forwards theMSGmulti to all subtrees matching the content rule. The basic algorithm of processing theMSGmulti is described in Algorithm 1.Algorithm 1:Multicast_notification_deal (MSGmulti).
1 get theCRnotify from MSGmulti; 2 for (i=0;i≤n;i++) 3  if((CRnotify&CRi)!=0) 4   if(i==0) 5    processMSGmulti in this node; 6   else 7    send theMSGmulti to the ith sub-node; 8 return;


## 4.3. Processing ofMSGany

The processing procedure is similar to that of theMSGmulti. WhenNk receives aMSGany, it will get the content range from the packet, that is,CRnotify. At first,Nk judges whether there is a need to process the message by itself. The judging method is the same as the above description. IfNk matches the content rule of theMSGany, it will process the notifying message without forwarding it to any other nodes. Otherwise,Nk selects an arbitrary subtree satisfying the content rule and forwards the message to the corresponding son node. Note thatNk forwards theMSGany to only one subtree because it is an anycast message. The basic algorithm of processing theMSGany is described in Algorithm 2.Algorithm 2:Anycast_notification_deal (MSGany).
1 get theCRnotify from MSGany; 2 for (i=0;i≤n;i++) 3  if((CRnotify&CRi)!=0) 4   if(i==0) 5    processMSGmulti in this node; 6   else 7    send theMSGmulti to the ith sub-node; 8   break; 9 return;In summary, the message processing flow in CEMT is given as Figure4.Figure 4
Message processing flow in the sensor node.


## 5. WSNs with Multidimensional Sensing Contents

In WSNs, we often deploy various kinds of sensor nodes to monitor different sensing contents, which constitute a subnet together. These nodes provide packets forwarding services for each other, which greatly enhances utilization of network transmission resources in LLN (low-power and lossy networks). As shown in Figure5, temperature and light are monitored at the same time in a WSN subnet. Circular nodes and square nodes monitor temperature and light of the corresponding circumstances, respectively. Two types of nodes are mixed together to construct networks in order to reduce the number of sensor nodes and extend the sensing scope. Undoubtedly, the sink node (tree root) supports both sensing contents.Figure 5
A WSN subnet with multiple types of sensor nodes.While transmitting content-based messages, CEMT constructs a special logical tree for the same sensing contents, and notification messages are transmitted along the tree. Intrinsically, constructing the logical tree is to form the logical parent-child relationships among sensor nodes with the same sensing contents.Definition 6.
Belonging relationship of nodes: ifNi is in the subtree rooted asNj,Ni belongs toNj, orNj administerNi, which is expressed as Ni≺Nj. In Figure 5, some belonging relationships are denoted as N3≺N1, N9≺N1.Definition 7.
Logical father-son relationship:Ni andNj are the same kind of nodes in tree topologies.Ni is the son node ofNj which is expressed as Ni⊲Nj. Certainly,Nj is the father node ofNi.Given two nodes of the same type:Ni,Nj, and Ni≺Nj, then(6)¬∃Nk∣Ni≺Nk∧Nk≺Nj=>Ni⊲NjThe methods judging the logical father-son relationship are as follows.(1)
Logical father node ofNk is the nearest node with the same type toNk on the path (only one path) fromNk to the root node. “The nearest” means the minimum hops. Obviously, the root node of a tree has no father node, and a nonroot node has one and only one logical father node. In Figure 5, the father node of N11 is N2.(2)
Logical son node ofNk is the nearest node with the same type on the path fromNk to each leaf node. Obviously, in a logical tree, any nonleaf node has one or more logical son nodes. There may be a logical son node on each path to leaf nodes. In Figure 5, N1 has two son nodes: N3 and N10.In light of the above analysis, the WSN subnet with multiple types of sensor nodes can be split into multiple logical trees with different content types. For instance, the WSN subnets in Figure5 are split into two logical trees shown as Figure 6. The lines in Figure 6 represent the logical father-son relationships rather than the physical connection.Figure 6
The logical trees with the same sensing content types.
(a)
Light (b)
TemperatureIn WSN environments with various types of sensor nodes, the transmission of content-based notification messages is implemented in view of the above-mentioned logical trees. Algorithm3 depicts how a node gets its logical son nodes. In this circumstance, one node may have so many logical son nodes that its load is too heavy. Certainly, we can adjust the tree topology to avoid this problem. This paper omits the details here.Algorithm 3:Get_logic_son_nodes (Nk, content_type).
1Nk.current_physical_node =1; // 1th physical son-node is being handled currently 2 pushNk into the stack: s; 3 while (s is not empty) 4  get the uppermost element ofs: Ncurrent; 5i = Ncurrent.current_physical_son; 6  get theith physical son node of Ncurrent: Ntmp; 7  if (Ntmp.type != content_type) 8   if (Ntmp has at least one son node) 9Ntmp.current_physical_son =1; 10    pushNtmp into s; 11   else 12    construct father-son relation:Ntmp is logical-son-node of Nk; 13    if (Ncurrent has another physical node) 14Ncurrent.current_physical_node=i++; 15    else 16     popNcurrent from s; 17 return;Because IP unicast is used to transmit IP packets between a father node and its son nodes, content aggregation and message transmission are compatible with the mechanism described in Section3. In Figure 5, it is assumed that N0 sends aMSGmulti to N4 and then N4 forwards it to N9. Therefore, two unicast IP packets exist. The source IP and destination IP of the first two packet are (IP0, IP4) and (IP4, IP9), respectively.


## 6. Experiments and Analyses

Table1 shows a list of notations used in the following analysis. Set the layer number of sink nodes to be 0 and take the layer number of the lowest node equal toLmax. Consequently, there are total (Lb+1) layers in the tree-like topology. CEMT introduces extra storage cost forRTSs(content routing entries for subtrees). IP addresses of direct son nodes are inherently stored in nonleaf nodes, which can be utilized forRTS. Therefore, the extra storage cost of each node in CEMT is mainlyCRs (content range) of its direct subtrees. In general, oneCR only needs 1 byte. We analyze average storage cost of nodes on the same layer, which is shown in formula (7).(7)AVSi=S∗Ni+1Ni+1,i<LbS,i=LbIf the topology is a fulln-ary tree, the storage cost of each node is described in formula (8). Each leaf node only stores oneCR for itself. Obviously, storage cost of one node in CEMT is only related to the number of its direct subtrees and does not change with the number of its descendants nodes. (8)Si=S∗n,i<LbS,i=LbWe analyze the number of nodes dealing with one content message for a givenCR. When Lmax(CR)=0 or Lmin(CR)=0, no node satisfies the content condition. For aMSGany, the number of nodes handling it is Lmin(CR)+1. When Lmin(CR)=0, only sink nodes deal with theMSGany. For aMSGmulti, the number of nodes handling the message is(9)1+∑i=1lmaxCRST¯iCRThe key contributions of CEMT are to lessen the number of processing nodes and reduce the transmission time of content-based messages. We carry out related experiments and analyze through MATLAB. Topologies of completen-ary trees are used to analyze the performance of CEMT. Sensing content values of nodes are generated randomly. We compare three transmission methods: CEMT, DEVR, and the traditional routing mechanism based on node identity (TRID). For the same topology and sensing contents, we analyze and compare the results of three methods, including processing node number and the transmission delay of notification messages.Table 1
Notations for analysis.
Symbols Description L b layer number of nodes at the bottom of topology tree S number of bytes of one “content range” N i nodes number inith layer AVS i /S i (average) storage for content range of one node inith layer S T ¯ j ( C R ) The number of subtrees injth layer satisfyingCR (average value) L min (CR)/ L max (CR) The layer number (average value) of the node which is the nearest /the farthest away from sink in every branchWhen a node sends a message to its multiple descendant nodes, we assume that it carries out transmissions from left to right, and all nodes receiving the message deal with it in parallel. At the same time, the time that the node sends to the child node is always equal: 1 unit time. In Figure7, N1 wants to advertise a message to all nodes. Then, how many units of time each node gets the message are marked above the node. For instance, N5 gets the message in the 3rd unit time. For instance, N5 gets the message in the 3rd cycles from the beginning of transmission at N1.Figure 7
An example for transmission cycles.Aiming at the above performance indicators, three mechanisms including CEMT, DEVR, and TRID are compared. In Figure8, we analyze the number of nodes processing messages and transmission delay through a network with 50 sensor nodes. In these experiments, the nodes are constructed into a 3-ary tree, and all sensing values are generated randomly.Figure 8
Processing nodes number and transmission delay in 3-ary tree.
(a) (b) (c) (d)In Figure8(a) for transmission of theMSGmulti, TRID must send theMSGmulti to all nodes to process it. In contrast, CEMT and DEVR only need a few nodes to process the message based on content range rules, and the former is fewer because of its more accurate description of the sensing contents. According to our measurements, the average transmission delay of a single hop is about 0.05s. Thus, the whole transmission delay of one message could be calculated. In Figure 8(b), CEMT still has the best performance on transmission delay for theMSGmulti, and it usually takes less time than half of TRID.The experiments results forMSGany are shown in Figures 8(c) and 8(d). In most cases, CEMT makes the message processing nodes fewer while ensuring the completion of notification transmission. In general, its transmission delay is also less than other two mechanisms.As we can see, there are some overlapping points between CEMT and DEVR in Figures8(a) and 8(b). For the two mechanisms, the number of nodes processing a message is related to 3 factors: the network topology, sensing contents of nodes, and theCRof the message. In most cases, there are fewer processing nodes for a message in CEMT than in DEVR. However, sometimes there are the same processing nodes in two mechanisms.In the example shown in Figure9, the range of the temperature sensing value is <1, 40>. In CEMT, each bit represents 5 temperature units. In addition, theCRs stored in the key nodes (N2, N3) have been given in the figures. The sink node wants to send nodes aMSGmulti. TheCRof the message is <16, 19> in DEVR, which is equivalent to “00010000” in CEMT. In Figure 9(a), no matter in CEMT or DEVR, there are 3 nodes processing theMSGmulti: N2, N4, and N5. However, in Figure 9(b), theMSGmulti will be sent to 3 nodes, N2, N4, and N5, in CEMT, and sent to 4 nodes, N2, N3, N4, and N5, in DEVR.Figure 9
Analysis of processing nodes for two mechanisms.
(a) (b)Then, we analyze processing nodes number and transmission delay for one notification message in trees with different bifurcation number (3-ary tree ~ 8-ary tree). As shown in Figure10, CEMT always achieves the best performance among three mechanisms.Figure 10
Processing nodes number and transmission delay in trees with different bifurcation number.
(a) (b) (c) (d)


## 7. Conclusions

Transmission of notification messages is implemented mainly around sensing contents. In this paper, we present a notification transmission mechanism based on sensing content (CEMT) in WSNs to improve the notifying efficiency, such as reducing processing nodes, transmission time, and energy consumption. At first, sensing contents are divided into two types: continuous sensing value and discrete sensing value. After that, a sensing content storage method called BIM is proposed, which can support the above two values simultaneously. In addition, we define two kinds of notification messages: multicast messages and anycast messages. CEMT collects and aggregates sensing contents at root nodes of all subtrees. Thus, CEMT accurately sends messages to nodes meeting corresponding rules through content routing of tree nodes. Furthermore, in CEMT, various kinds of sensor nodes monitoring different sensing contents may be mixed to make up a subnetwork. In this environment, we construct multiple logical trees with the same sensing contents, and notification messages are transmitted along their logical trees.



---

*Source: 2725961-2018-08-13.xml*