| Literature DB >> 28763013 |
Jorge Berzosa Macho1, Luis Gardeazabal Montón2, Roberto Cortiñas Rodriguez3.
Abstract
The Cyber Physical Systems (CPS) paradigm is based on the deployment of interconnected heterogeneous devices and systems, so interoperability is at the heart of any CPS architecture design. In this sense, the adoption of standard and generic data formats for data representation and communication, e.g., XML or JSON, effectively addresses the interoperability problem among heterogeneous systems. Nevertheless, the verbosity of those standard data formats usually demands system resources that might suppose an overload for the resource-constrained devices that are typically deployed in CPS. In this work we present Context- and Template-based Compression (CTC), a data compression approach targeted to resource-constrained devices, which allows reducing the resources needed to transmit, store and process data models. Additionally, we provide a benchmark evaluation and comparison with current implementations of the Efficient XML Interchange (EXI) processor, which is promoted by the World Wide Web Consortium (W3C), and it is the most prominent XML compression mechanism nowadays. Interestingly, the results from the evaluation show that CTC outperforms EXI implementations in terms of memory usage and speed, keeping similar compression rates. As a conclusion, CTC is shown to be a good candidate for managing standard data model representation formats in CPS composed of resource-constrained devices.Entities:
Keywords: Wireless Sensor Networks (WSN); ad hoc networks; compression; cyber physical systems; data models; resource-constrained devices
Year: 2017 PMID: 28763013 PMCID: PMC5579536 DOI: 10.3390/s17081755
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Figure 1Basic architecture.
Figure 2Schema Context graph example. Rounded nodes denote Elements, square nodes eContexts (short form of “Element Context”) and trapezium nodes templates. The numbers in the arrows indicate the cardinality: “1” one child, “1..*” one to many children, “0..1” none or one child (optional).
Figure 3Example of the representation of Context- and Template-based Compression (CTC) components.
Schema Context table example. Each column represents an eContext. The content of the Children row represents the tuple (Template, Type, IsOptional, IsArray, Context). x denotes complex, s string, f False and t True.
| Attribute | Id | ||
|---|---|---|---|
| ROOT (0) | C1 (1) | C2 (2) | |
| MultipleParents | f | f | t |
| Order | fixed | dynamic | fixed |
| Children | e1(t1,x,f,t,C1) | e3(t3,s,f,f,-) | e6(t4,s,t,f,-) |
Figure 4Template Table structure detail.
Figure 5Notebook XML Schema document.
Figure 6Template Table Notebook example. Symbol ‘@’ is used to represent the place-holders’ positions.
Schema Context Notebook example, after Context Collapsing. The content of the Children row represents the tuple (Template, Type, IsOptional, IsArray, Context). Cn represents the eContext Id and tn the template identifier; x denotes the complex value, s string, c the constant, d the date-time, t True and f False.
| Attribute | Id | ||||
|---|---|---|---|---|---|
| C1 (ROOT) | C2 (CONTENT) | C3 (NOTEBOOK) | C4 (NOTE) | C5 (NOTE-ATT) | |
| MultipleParents | f | f | f | f | f |
| Order | fixed | choice | fixed | fixed | dynamic |
| Children | (t1,c,t,f,-) | (t2,x,t,f,C3) | (t3,d,t,f,-) | (-,x,f,f,C5) | (t3,d,f,f,-) |
Figure 7Schema example instance.
Figure 8Template location. (a) at the node, (b) at an external server.
Figure 9Architecture of the CTC Library. Dotted components are generated by the CTC Compiler.
XML document compression comparative in bytes. EXIP: schema strict mode, all preserve options to False and schemaId to constant string “1”. EXIP-EP: same options as EXIP column plus EXI Profile. CTC: CTC normal compression mode. CTC-S: CTC strict mode. Numbers inside brackets indicate the extra overhead due to EXI options embedded in the EXI header. The list of XML documents stand for: Notebook, EXI Notebook example; netconf, Network Configuration Protocol; SenML, Sensor Markup Language; SEP2, ZigBee Smart Energy Profile 2.0; OPC-UA, OPC Unified Architecture.
| XML | Original | EXIP | EXIP-EP | CTC | CTC-S |
|---|---|---|---|---|---|
| 297 | (3+) 59 | (13+) 59 | 62 | 61 | |
| 395 | (3+) 21 | (13+) 21 | 21 | 21 | |
| 660 | (3+) 51 | (13+) 51 | 50 | 50 | |
| 423 | (3+) 3 | (13+) 3 | 3 | 3 | |
| 448 | (3+) 97 | (13+) 98 | 138 | 130 | |
| 219 | (3+) 61 | (13+) 61 | 64 | 60 | |
| 173 | (3+) 45 | (13+) 45 | 46 | 45 | |
| 406 | (3+) 64 | (13+) 64 | 65 | 64 | |
| 92 | (3+) 19 | (12+) 19 | 19 | 19 | |
| 522 | (3+) 27 | (13+) 27 | 24 | 24 | |
| 936 | (3+) 61 | (12+) 62 | 73 | 73 | |
| 278 | (3+) 4 | (12+) 4 | 4 | 4 | |
| 300 | (3+) 4 | (13+) 4 | 4 | 4 |
Figure 10XML document compression comparative in bytes. EXIP: schema strict mode, all preserve options to False and schemaId to constant string “1”. EXIP-EP: same options as EXIP case plus EXI Profile. CTC: CTC normal compression mode. CTC-S: CTC strict mode. Stacked columns indicate the extra overhead due to EXI options embedded in the EXI header.
XML document decoding time comparative. Numbers are in microseconds. EXIP: schema strict mode, all preserve options to False and schemaId to constant string “1”. EXIP-H: same options as EXIP column and EXI options embedded in the EXI header. EXIP-EP: same options as EXIP column plus EXI Profile. EXIP-EP-H: same options as EXIP-EP column and EXI options embedded in the EXI header, but no EXI Profile parameters. CTC: CTC normal and strict modes. The list of XML documents stand for: Notebook, EXI Notebook example; netconf, Network Configuration Protocol; SenML, Sensor Markup Language; SEP2, ZigBee Smart Energy Profile 2.0; OPC-UA, OPC Unified Architecture.
| XML | EXIP | EXIP-H | EXIP-EP | EXIP-EP-H | CTC |
|---|---|---|---|---|---|
| 684 | 929 | 574 | 808 | 625 | |
| 290 | 531 | 314 | 629 | 152 | |
| 814 | 1049 | 946 | 1251 | 518 | |
| 286 | 518 | 320 | 621 | 183 | |
| 1576 | 1817 | 1409 | 1635 | 1493 | |
| 726 | 966 | 615 | 840 | 618 | |
| 465 | 705 | 591 | 511 | 377 | |
| 1186 | 1429 | 770 | 1004 | 910 | |
| 553 | 787 | 213 | 437 | 230 | |
| 1210 | 1446 | 860 | 1079 | 763 | |
| 1804 | 1935 | 1251 | 1385 | 788 | |
| 500 | 642 | 98 | 244 | 81 | |
| 540 | 684 | 142 | 285 | 101 |
Figure 11XML document decoding time comparative. EXIP: schema strict mode, all preserve options to False and schemaId to constant string “1”. EXIP-H: same options as EXIP case and EXI options embedded in the EXI header. EXIP-EP: same options as EXIP case plus EXI Profile. EXIP-EP-H: same options as EXIP-EP column and EXI options embedded in the EXI header, but no EXI Profile parameters. CTC: CTC normal and strict modes.
Memory consumption comparative in bytes. The table shows the use of code memory (Flash) and data memory (RAM). Additionally, the maximum heap and stack used for the EXIP case is 1734 and 904 bytes respectively. For the EXIP-EP case, maximum heap and stack usage amounts to 1294 and 792 bytes respectively. Finally, CTC uses no Heap and the maximum stack size used for the tests is 692 bytes.
| XML Schema | Flash | Data RAM | ||||
|---|---|---|---|---|---|---|
| EXIP | EXIP-EP | CTC | EXIP | EXIP-EP | CTC | |
| Library | 21,493 | 21,794 | 1722 | 292 | 292 | 12 |
| notebook.xsd | 4745 | 5242 | 208 + 196 | 1196 | 252 | 0 |
| netconf.xsd | 8226 | 8979 | 1224 + 1812 | 1748 | 292 | 0 |
| SenML.xsd | 5550 | 6064 | 320 + 300 | 1348 | 292 | 0 |
| SEP2.xsd | 85,776 | 94,500 | 25,560 + 27,188 | 11,860 | 292 | 0 |
| OPC-UA.xsd | 133,528 | 130,823 | 21,172 + 42,396 | 13,765 | 292 | 0 |
Figure 12Flash memory consumption comparative in bytes.