SlideServe
Menu
Préférences
© SlideServe · v2026

TREECHOP: A Tree-based XML Compressor for Enhanced Querying

rupert avatar
22 diapositives · 336 Views · Jul 13, 2014

Explore TREECHOP, a tree-based compressor for XML that enables efficient compression, decompression, and querying strategies. This innovative tool offers high compression rates while facilitating rapid query execution on XML data. Learn about its design, codeword generation, writing methods, and more.

TREECHOP: A Tree-based XML Compressor for Enhanced Querying - slide 1
01 / 22TREECHOP: A Tree-based XML Compressor for Enhanced Querying
1 / 17

Télécharger la présentation

TREECHOP: A Tree-based XML Compressor for Enhanced Querying
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. TREECHOP: A Tree-based Query-able Compressor for XML Gregory Leighton, Tomasz Müldner, James Diamond Acadia University June 6, 2005

  2. Outline • XML • TREECHOP • Compression Strategy • Decompression Strategy • Querying Strategy • Experimental Results • Conclusions

  3. Extensible Markup Language (XML) • What is it? • A standard for semi-structured data representation introduced in 1998 • Data is surrounded by markup tokens (elements and attributes) used to indicate semantic meaning • Characteristics? • Verbose (often 5 – 10 times larger than alternative formats like CSV) • Lots of repetition… plenty of opportunities for data compression

  4. Example XML Document comment attribute root element data value

  5. TREECHOP: Compression Strategy Parsing splits document into three segments: • Prologue: stores text occurring before document’s root element • Document Tree: contains all document contents between and including root element start and end tags • Epilogue: stores text occurring after document’s root element

  6. Example XML Document Prologue Document Tree Epilogue

  7. Document Tree • Root node corresponds todocument’s root element • Character data segments are represented using leaf nodes • XML markup represented using non-leaf nodes; 5 types of non-leaf nodes: • Element, attribute, CDATA, comment, processing instruction

  8. Document Tree Generation 1 2 Get next token from XML parser Construct tree node from token Write tree node to compression stream 3

  9. Document Tree Nodes Each node in the tree has an associated label value, L • Element node name of the element • Attribute node  ‘@’ + name of the attribute • Comment, CDATA, processing instruction nodes all text between delimiting section markers The path for a node vn consists of /L1/L2…/Ln where a route connecting the root node v1 with vn consists of nodes v1, v2, …, vn and Li is the label for node vi

  10. Codeword Generation • A binary codeword is assigned to each non-leaf node, based on node path • Multiple nodes with identical path are assigned same codeword • Codeword is used during decompression and querying operations to identify the value and type of each node

  11. Codeword Generation • The codeword C(v) assigned to a non-leaf node v with parent node p is formed by the concatenation of three codes • C(p): the codeword assigned to p • G(v): Golomb code assigned to v based on its ordering relative to p. • T(v): a sequence of 3 bits used to indicate node type

  12. Example XML Document

  13. Example Document Tree

  14. Codeword Assignment C(p) – portion inherited from parent node G(v) – portion assigned based on Golomb code T(v) – portion used to indicate node type

  15. TREECHOP: Writing the Tree • Encoded tree is written to compression stream in depth-first order; gzip is applied to further compress the encoded tree • Non-leaf nodes: written as 3-tuple (L, C, D) • L is a byte indicating bit length of code word • C is a sequence of L / 8 bytes containing code word • D is the node’s label (e.g. element/attribute name) - reserved byte values are used to signal beginning/end of sequence of raw character data

  16. TREECHOP: Writing the Tree • On second and subsequent occurrences of a particular codeword, only the 2-tuple (L, C) is written (decoder is able to infer associated D) • Leaf nodes are transmitted in same manner as D value for non-leaf nodes • Each node encoding is transmitted immediately after node construction – avoids necessity of building entire tree in memory

  17. TREECHOP: Decompression Strategy • Decoder operates by reading node data from compression stream. For each non-leaf node: • Determine D value • Determine node type • Surround D with XML syntax appropriate to the node type and immediately emit to the decompression stream

  18. TREECHOP: Querying Strategy • An individual query handler is registered with the decoder for each query • Single scan of compression stream is carried out, using a stack to keep track of current path • When query predicate path is matched, the current codeword is recorded and remainder of compression stream is scanned for future occurrences • Each time a query match is encountered, the associated D value is extracted from the compression stream and passed to the query handler for processing

  19. Experimental Results: Compression Rates

  20. Experimental Results: Compression/Decompression Speed Distance between sender/receiver: 20 km / 12 miles

  21. 30000 25000 20000 GZIP/XSLT Query Execution Time (msec) 15000 TREECHOP Raw XML/XSLT 10000 5000 0 2 200 400 600 800 1000 XML Document Size (KB) Experimental Results: Querying Distance between sender/receiver: 20 km / 12 miles

  22. Conclusions • TREECHOP compresses at rates comparable to gzip, while also providing query-friendly annotations to the compression stream • Using TREECHOP querying in place of alternative methods like XSLT yields a significant performance advantage on medium- to large-sized XML documents; advantage increases with document size