## 7 SMEP Algorithms
### AuxDataQueue Compression Algorithm
In the 3-2-2-1 and 3-2-2-2 _Zones_ patterns, Figure 12d,e show that graph shapes of the SMEP method are much more similar to the graph shape of the original sensor data than for the other methods. In fact, the graph shape becomes more similar to the original sensor data than the other methods if the _Zones[0]_ value is greater than the values of the next non-zero value zones. One of the reasons for this, as shown in Section 9.2.1, is that the SMEP method generally has a better AER performance than the other methods. Moreover, the more important reason is that in the SMEP method, the number of compressions of sensor data in one zone is different from that in the other zones if the _Zones[0]_ value is greater than the values of the next non-zero value zones. In the other methods, however, every sensor data has the same number of compressions as _Zones[0]_. Thereby, the SMEP method tends to exhibit better AER performance effects in the zones with the lower number of compressions than that in _Zones[0]_. ## 10 Conclusions

In this paper, we have proposed a communication framework and feasible method for reducing sensor data that can be lost during communication failure. Our formal approach has also come up with a theoretical basis for problems on the reduction of sensor data loss during communication failure. Consequently, in the comparison with current compression methods, the SMEP method has shown better performance in average error rate per sensor data than others. Meanwhile, the current technologies have developed and commercialized such cheap micro controller units with flash memories into which program code or data can be permanently saved. Moreover, they are currently used in various wireless sensor network applications. For example, the ATmega128 and Cortex M3 have 128 KB and 512 KB flash memory, respectively. We can use not all of these memory spaces but some parts of them. Under such a possibility, the point is that most current sensor nodes can permanently save compressed and ground sensor data to its own flash memory. Accordingly, our proposed SMEP method is feasible in most of current sensor node technologies. Nonetheless, most sensor data will be lost during communication failures without taking any action. In the implementation of the SMEP method, the SMEP functionalities cannot be loaded into the routing layer in the protocol stack, because sensor data compression is not the intrinsic function of the routing layer and, in the SMEP method, each compressed or ground sensor data is necessary to be handled not as a packet with extra information, such as a header or footer, but as bare data without any extra information. For these reasons, we recommend that the SMEP functionalities should be embedded into an upper layer of the routing layer. Several research works have introduced and implemented a kind of database layer, such as a query layer [23; 34; 35; 36; 45]. In these, the database layer commonly plays a role of data management between the routing layer and upper layers, such as application layer. For the detail on the data layer, refer to the above-referenced literature. Such a database layer or query layer could be one of our recommended upper layers. Another possibility for implementation could be a cross layer to merge the functionalities of the database and routing layers, of course. On the other hand, the SMEP method alternately applies the _selection by pattern_ rule and the _selection by minimum error_ rule for each compression interval. Therefore, given two consecutive compression intervals, one is applied by the _selection by pattern_ rule and the other is applied by the _selection by minimum error_ rule. Now, we expect that we can improve the average error rate if the _selection by minimum error_ rule is applied to not one compression interval but several consecutive compression intervals.