• 沒有找到結果。

The OASIS Algorithm

3.1 The Proposed Algorithm

OASIS, an extension of COPE, is a localized network coding protocol for wireless networks.

We say a plain packet is intended by a certain node if this node is the next-hop in the route of this packet. Each node has one output queue that contains all plain packets to be transmitted. For simplicity, we denote the output queue as queue in the following sections.

Each node also maintains per-neighbor virtual queues, each of which is corresponding to a 1-hop neighbor. A virtual queue contains a subsequence of packets of the queue and all of these packets are intended by the corresponding neighbor. Let virtualQueuew denotes the virtual queue maintained by a certain node for its 1-hop neighbor w. Besides, each node also maintains an information pool that records a copy of packets that has been received or sent before. The information pool is for the use of decoding coded packets. The more

packets in the neighbors’ information pools, the higher probability one can encode packets to these neighbors. The reason is that while we encode packets to the intended neighbors, we must ensure that all of the intended neighbors can decode the coded packet, and this relies on what packets the neighbors have in their information pools. In the following sections, we use inf oP ool as a shorthand for the information pool and inf oP oolv to indicate the inf oP ool of the specified node v. A node knows a packet means that this packet is in its inf oP ool. In other words, the node has ever received, overheard or sent this packet before.

A node can decode a plain packet from a coded packet by decoding procedure. Besides the above data structures, a node maintains a knowledge database which records the packet list from its 1-hop neighbors’ information pool. We denote knowledgew as the knowledge database maintained by a certain node for its neighbor w. This packet list can be obtained by information exchange, e.g. periodical control message or piggyback information. As one node does encoding decision, it needs to make sure that receivers can decode the coded packets. Therefore, the knowledge about neighbor’s inf oP ool is a key to ensure the coded packets can be correctly decoded. We will describe the decoding procedure formally later.

We can improve the performance of network coding by enriching the inf oP ool. OASIS aggressively encodes as many plain packets as possible into a coded packet even if some plain packets are not intended by the receivers. The reason for doing so is to increase the number of packets in the inf oP ool of neighbors such that we have higher probability to encode more packets in the following transmission.

Here we give an example to illustrate the possible benefit of OASIS in Fig. 3.1. There

are 3 nodes, n1, n2 and n3, and a relay node R. R has packets p1, p2, and p3 in its queue for n1, n2, and n3, respectively. R will classify the packets to corresponding virtual queues, e.g.

put p1 into virtualQueuev1, p2 into virtualQueuev2, and p3 into virtualQueuev3. Besides, n1, n2, and n3 have already received or overheard p2, p3, and p1, respectively and store them in their inf oP ools accordingly. R can record the corresponding information in its knowledge databases knowledgen1, knowledgen2, and knowledgen3, respectively, and use these information to encode packets. The content of virtual queues and knowledge databases are shown in Fig 3.1. According to COPE protocol, relay node R will unicast p1 to n1 since

n1

Figure 3.1: A counterexample that OASIS system can have more benefits than COPE ar-chitecture

p1is at the head of the queue and no other plain packets can be encoded together. After p1is transmitted, n1 and n2 can update their inf oP ools. Therefore, the content of inf oP ool for

n1 becomes {p1, p2} and that for n2 becomes {p1, p3}, respectively. Later, p2 is unicasted to n2 for the same reason of p1. The content of inf oP ool for n2 is updated to {p1, p2, p3} and that for n3 is updated to {p1, p2}. Finally, p3 is unicasted to n3. Therefore, COPE executes three unicasts sequentially and needs three time slots to complete the task. There does not exist any encoding events if we follow the COPE protocol. Therefore, in this case, COPE performs like the ordinary unicast. However, there is a coding schedule that only needs two time slots to complete the same task. Let R transmit p1⊕ p2 and p2⊕ p3 sequentially. After p1⊕ p2 is transmitted, then, n1 can decode p1 from p1⊕ p2 by calculating p2⊕ (p1⊕ p2) since n1 has already known p2. Although p2 is not intended by n3, n3 can decode p2 from p1⊕ p2 by the similar calculation like n1 dose and increase the content of its inf oP ool. Therefore, the content of inf oP ool for n3 is updated to {p1, p2}. In the following transmission, p2 and p3 can be encoded together since both n2 and n3 have enough information p3 and p2 to decode their intended packets, p2 and p3, respectively. Finally, all n1, n2 and n3 can successfully decode their intended packets. In this case, the throughput of R is improved from 1 (packet/time slot) to 1.5 (packet/time slot). As we saw from the above example, if we consider not only the intended packets in the coding procedure but also the packets that may increase the opportunity of encoding more packets in the future (e.g. we transmit p2to n3 in the first transmission), we can gracefully make use of the network coding technique and efficiently increase the system throughput.

OASIS is a two-phase greedy coding algorithm. In the first phase, the algorithm encodes as many intended plain packets as possible into the coded packet such that all receivers of

the coded packet can successfully decode their intended plain packet. This phase is similar to COPE. In the second phase, we implement the opportunistic information dissemination concept. Without affecting the decoding process of the plain packets encoded in the previ-ous phase, the algorithm further encodes as many unintended plain packets as possible into the coded packet. This can increase common knowledge among neighbors (i.e. inf oP oolni and knowledgeni ) and therefore is helpful for following encoding processes and potentially increases network throughput. The details of the coding procedure is presented in PROCE-DURE 1.

As one node is going to transmit a packet, it first dequeues a (plain) packet p from its queue and assigns it to coded packet codedP acket. The node records the next-hop of p in nextHop that keeps a list for all receiving nodes in this coding procedure. Then, for all its 1-hop neighbors w from its 1-hop neighbor list excluding all next-hops neighbor/nextHop, it dequeues a packet q from the virtual queue virtualQueuew and checks whether for each node v in nextHop ∪{w} can decode codedP acket ⊕q. If codedP acket ⊕q can be decoded by all intended nodes (nextHop ∪ {w}), then update nextHop and codedP acket , and remove q from queue. This is the first phase of the coding procedure. The heuristic is greedily encoding as many intended packets as possible in a transmission. In the second phase of the coding procedure, for each packet r in the queue, if there exists a node w belonging to neighbor/nextHop such that for each node v in the nextHop can decode its intended packet and the node w can decode the packet r from codedP acket ⊕ q, then update codedP acket and nextHop. Note that, in order to reserve the transmission order, r can not be intended

packet for w since we have already coded all packets that are intended for certain receivers in the transmission order in first phase. Therefore, r is not removed from the queue since r is just used to increase w’s inf oP ool. In the second phase, opportunistic information dissemination is a greedy heuristic for increasing the common knowledge for the sake of future transmissions.

A node decodes intended packet from the codedP acket by the following decoding proce-dure as shown in PROCEDURE 2. The decoding proceproce-dure is simple and similar to that in COPE architecture. A node can decode the plain packet for itself from the codedP acket with n plain packets by using XOR operation if it has exactly these n − 1 plain packets excluding its intended one in its inf oP ool. For example, assume that codedP acket is encoded with n packets, p1,p2,...,pn, and v is intend p1. Suppose that v has already known p2,...,pn. Then v can decode p1 by simply XOR all p2,...,pn with codedP acket. If a node receives, overhears or decodes a plain packet, then it checks whether this packet is intended by itself. If this plain packet is intended by this node, then the node stores this packet to the queue for later relay if it is the relay node or sends to upper layer for further processing if it is the destination. If this plain packet is not intended by this node, the node stores this packet into the inf oP ool for future decoding purposes. The intuitive idea is that the more plentiful the neighbors’

inf oP ools are the higher probability that a node can encode more plain packets. That is why we incorporate the opportunistic information dissemination into the second phase of the coding procedure.

PROCEDURE 1 OASISCoding (queue, neighbor)

Require: queue: the output queue; neighbor: the 1-hop neighbor list.

dequeue p from queue.

codedP acket = p

nextHop = {the next hop of p}

Phase 1:

for ∀w ∈ neighbor/nextHop do

let q denote the first packet in virtualQueuew

if ∀v ∈ nextHop ∪ {w}, v can decode codedP acket ⊕ q then codedP acket = codedP acket ⊕ q

nextHop = nextHop ∪ {w}

remove q from queue and also virtualQueuew end if

end for Phase 2:

for ∀ packet r ∈ queue do

if ∃w ∈ neighbor/nextHop such that w and ∀v ∈ nextHop can decode codedP acket ⊕ r then

codedP acket = codedP acket ⊕ r nextHop = nextHop ∪ {w}

end if end for

PROCEDURE 2 OASISdecoding (v, codedP acket)

Require: codedP acket = {p1, p2, ..., pn}; v: the receiving node v tries to decode the packet px, where x ∈ {1, 2, ..., n}.

decodedP acket = codedP acket

if v knows ∀pi ∈ codedP acket/ {px} in inf oP oolv then for ∀pi do

decodedP acket = pi ⊕ decodeP acket end for

px = decodedP acket

if v is the next hop of px then put px into the queuev

else

put px into the inf oP oolv for future decoding purpose end if

else

drop the codedP acket end if

相關文件