Download presentation
Presentation is loading. Please wait.
Published byBasil Mitchell Modified over 9 years ago
1
21-05-0407-03-0000 IEEE 802.21 MEDIA INDEPENDENT HANDOVER DCN:21-05-0407-03-0000 Title: Integration of XML and TLV Date Submitted: January, 9, 2006 Presented at IEEE 802.21 session in Vancouver Authors or Source(s): Yoshihiro Ohba, Kenichi Taniuchi and Subir Das Abstract: This document describes two methods for converting XML 1.0 data to TLV format. The two methods and XML 1.0 are compared in terms of number of encoded octets and processing time for three typical query types.
2
21-05-0407-03-0000 IEEE 802.21 presentation release statements This document has been prepared to assist the IEEE 802.21 Working Group. It is offered as a basis for discussion and is not binding on the contributing individual(s) or organization(s). The material in this document is subject to change in form and content after further study. The contributor(s) reserve(s) the right to add, amend or withdraw material contained herein. The contributor grants a free, irrevocable license to the IEEE to incorporate material contained in this contribution, and any modifications thereof, in the creation of an IEEE Standards publication; to copyright in the IEEE’s name any IEEE Standards publication even though it may include portions of this contribution; and at the IEEE’s sole discretion to permit others to reproduce in whole or in part the resulting IEEE Standards publication. The contributor also acknowledges and accepts that this contribution may be made public by IEEE 802.21. The contributor is familiar with IEEE patent policy, as outlined in Section 6.3 of the IEEE-SA Standards Board Operations Manual and in Understanding Patent Issues During IEEE Standards Development http://standards.ieee.org/board/pat/guide.html> Section 6.3 of the IEEE-SA Standards Board Operations Manualhttp://standards.ieee.org/guides/opman/sect6.html#6.3 http://standards.ieee.org/board/pat/guide.html
3
21-05-0407-03-0000 Information Service Properties Information Service representation and Information query/exchange shall be Extensible: The specification shall be able to support future PHY/MAC technology, without changing the 802.21 specification itself every time a new PHY/MAC technology is invented Flexible: The specification shall be able to support various types of queries to be useful for different handover mechanisms, protocols, algorithms and policies. Efficient: The specification shall avoid unnecessary information query/exchange and should have less information encoding overhead
4
21-05-0407-03-0000 A Possible Approach Schema-based semantic query with binary encoding Schema provides extensibility Semantic query provides flexibility and query efficiency Binary encoding provides encoding efficiency How can we achieve all of above functionalities? It is evident that only by integrating XML and TLV, we can achieve best of each solution
5
21-05-0407-03-0000 Candidate Solutions XML provides schema-based semantic query But needs to send more bits over the air if we use native XML 1.0 format TLV provides binary encoding But does not provide a standard query language for semantic query It is evident that only by integrating XML and TLV, we can achieve best of each solution
6
21-05-0407-03-0000 How Can We integrate? Possible approach : XML binary representation Convert XML data contained in query result into TLV Two example conversion methods Method A: Applicable to any XML data Alias-based conversion Convert XML namespace names to integers Convert XML tag names to integers Convert XML attribute names to integers Convert ENTRY names to integers Dynamic integer mapping Mappings are carried with data Method B: Applicable to a particular query language Semantic bundling Two or more semantically -related XML tags are mapped to a single integer for further optimization Taking advantage of the knowledge of the query language syntax Apply Method A for other operations
7
21-05-0407-03-0000 Method A
8
21-05-0407-03-0000 TLV Format for XML binary encoding 0x1= STR 0x2= XMLVER 0x3 = DOCTYPE 0x4 = ENTDEF 0x5 = DOC 0x6 = NSDEF 0x7 = BASE 0x8 = TAGDEF 0x9 = ATRDEF 0xa = ENT 0xb = NS 0xc = TAG 0xd = ATR 0xe = STRALDEF TypeLengthValue Octets:12Variable 0xf = STRAL 0x10 = YES 0x11 = NO 0x12 = BLANKNODE 0x13 = RDFTRIPLES 0x14 = VARIABLE 0x15 = RESULT … Type field values
9
21-05-0407-03-0000 STR TLV Value field contains an octet string Octets: Octet String Variable Length0x1 21
10
21-05-0407-03-0000 STRALDEF TLV Value field: String Alias Number and Octet String String Alias Number Octets: 2 Octet String Variable Length0xe 21
11
21-05-0407-03-0000 STRAL TLV Value field: String Alias Number Octets:2 Length0xf 21
12
21-05-0407-03-0000 XMLVER TLV Corresponds to tag Value field contains the version string In case of, XMLVER TLV can be omitted Octet String Octets:2 Length0x2 21
13
21-05-0407-03-0000 DOCTYPE TLV Corresponds to commentary tag Value field contains the document_type string STR TLV Octets:2 Length0x3 21
14
21-05-0407-03-0000 ENTDEF TLV Corresponds to “ ” Entry Number STR TLV (Entry name) Octets: 2Variable STR TLV (Entry value) Variable Length0x4 21
15
21-05-0407-03-0000 DOC TLV Corresponds to the first non-commentary tag List of NSDEF TLVs (option) BASE Value (Octet String) Octets:Variable Length0x5 21
16
21-05-0407-03-0000 NSDEF TLV Corresponds to “ xmlns:namespace_name ” attribute NS Number STR TLV (NS name [Optional]) Octets: 2Variable STR TLV or ENT TLV (NS value) Variable Length0x6 21
17
21-05-0407-03-0000 BASE TLV Corresponds to “ xmln:base ” attribute Octets: STR TLV or ENT TLV Variable Length0x7 21
18
21-05-0407-03-0000 TAGDEF TLV Corresponds to the non-commentary tags except for the first one Tag Number Octets: 2 Tag Name (Octet String) Variable2 NS Number If there is no explicit namespece, then NS Number value is 0 (zero) Length0x8 21
19
21-05-0407-03-0000 Predefined Tag Numbers (1..999) sparql= 1 head = 2 variable = 3 results = 4 result = 5 binding = 6 literal = 7 boolean = 8 TAGDEF TLV is not needed for the above tags
20
21-05-0407-03-0000 TAG TLV Corresponds to a non-commentary tag Tag Number Octets:2 Zero or more ATR TLVs Variable Zero or more TAG TLVs or TAGDEFs or ATRDEFs or STR TLV or STRAL TLV [OPTIONAL] Variable Length0xc 21
21
21-05-0407-03-0000 ATRDEF TLV Corresponds to an attribute_name=attribute_value part in tag Attribute Number Octets: 2 Attribute Name (Octet String) Variable Length0x9 21
22
21-05-0407-03-0000 Predefined Attribute Numbers (1..999) name = 1 datatype = 2 ordered = 3 distince = 4 ATRDEF TLV is not needed for the above attribute numbers
23
21-05-0407-03-0000 ATR TLV Corresponds to an attribute_name=attribute_value part in tag Attribute Number Octets: 2 STR TLV or STRAL TLV Variable2 Entry Number If there is no explicit entry, then Entry Number value is 0 (zero) Length0xd 21
24
21-05-0407-03-0000 ENT TLV Entry Number Octets: 2 Length0xa 21
25
21-05-0407-03-0000 NS TLV NS Number Octets: 2 Length0xb 21
26
21-05-0407-03-0000 Type of query used in XML XML-based query language, e.g., SPARQL, has three types query: Construction query: used for sub-graph fetch RDF triples are returned Selection query: used for selected bindings pairs of variable names and values are returned Boolean query: Used for binary answer “ yes ” or “ no ” is returned
27
21-05-0407-03-0000 Example of a Construction query Query for obtaining IEs of a neighboring PoA PREFIX mihbase: CONSTRUCT ?s ?p ?o WHERE { GRAPH ?g1{ ?s ?p ?o ?x mihbase:poa ?poa. ?poa mihbase:poa-type 19. ?poa mihbase:poa-id “aabbccddeeff”. }
28
21-05-0407-03-0000 Construction query result Query result in XML 1.0 (1198 Bytes) <!DOCTYPE rdf:RDF [ ]> <rdf:RDF xmlns:rdf="&rdf;" xmlns:rdfs="&rdfs;" xmlns:mihbase="&mihbase;" xml:base="&base;"> 54000 Query result in XML binary in TLV (680 Bytes) [0x3][229][ [0x1][7]["rdf:RDF"] [0x4][54][1][ [0x1][3]["rdf"] [0x1][43]["http://www.w3.org/1999/02/22-rdf-syntax- ns#"] ] [0x4][49][2][ [0x1][4]["rdfs"] [0x1][37]["http://www.w3.org/2000/01/rdf-schema#"] ] [0x4][47][3][ [0x1][7]["mihbase"] [0x1][32]["http://www.mih.org/basic-schema#"] ] [0x4][57][4][ [0x1][4]["base"] [0x1][45]["http://mediaindependentinformationserver.or g/"] ] ] [0x5][61] [ [0x6][13][1][ [0x1][3]["rdf"] [0xa][2][1] ] [0x6][14][2][ [0x1][4]["rdfs"] [0xa][2][2]] [0x6][17][3][ [0x1][7]["mihbase"] [0xa][2][3]] [0x7][5][ [0xa][2][4]]]] [0x8][15][1000][1]["Description"] [0x9][9][1000][1]["about"]
29
21-05-0407-03-0000 19 aabbccddeeff 19 112233445566 19 0123456789ab [0xc][310][1000][ [0xd][15][1][ [0xa][2][4]["network2"] ] [0x8][8][1001][1]["type"] [0x9][12][1001][1]["resource"] [0xc][16][1001][ [0xd][11][1001][3]["Network"] ] [0x8][7][1002][3]["mdi"] [0xc][37][1002][ [0xc][32][1000][ [0x8][14][1003][0x1][9]["data-rate"] [0xc][10][1003][0x1][5][“54000”] ] ] [0x8][7][1004][3]["mii"] [0xc][182][1004][ [0xc][177][1000][ [0x8][7][1005][3]["poa"] [0xc][60][1000][ [0x8][12][1006][3]["poa-type"] [0xc][7][1006][0x1][2][“19”] [0x8][10][1007][3]["poa-id"] [0xc][17][1007][0x1][12]["aabbccddeeff"] ] [0x8][19][1008][3]["neighboring-poa"] [0xc][37][1008][ [0xc][32][1000][ [0xc][7][1006][0x1][2][“19”] [0xc][17][1007][0x1][12]["112233445566"] ] ] [0xc][37][1008][ [0xc][32][1000][ [0xc][7][1006][0x1][2][“19”] [0xc][17][1007][0x1][12]["0123456789ab"] ] ] ] ] ]
30
21-05-0407-03-0000 Example of a Selection query Query for obtaining neighboring PoA PREFIX mihbase: SELECT ?poa-id WHERE { ?mii mihbase:poa ?poa. ?poa mihbase:poa-id 123456789abc. ?mii mihbase:neighboring-poa ?neighboring-poa. ?neighboring-poa mihbase:poa-id ?poa-id.}
31
21-05-0407-03-0000 Selection query result aabbccddeeff 112233445566 …….(more 8 poa-ids are written here) [0xc][694][1][ [0x6][41][0][ [0x1][38]["http://www.w3.org/2005/sparqlresults#"]] [0xc][20][2][ [0xc][15][3][ [0x9][10][1][0]["poa-id"]]] [0xc][621][4][ [0x9][9][3][0]["false"][0x9][9][4][0]["false"] [0xc][97][5][ [0xc][15][6][ [0x9][10][1][0]["poa-id"]] [0xc][76][7][ [0xe][44][1][http://www.w3.org/2001/XMLSchema#hexBin ary] [0x9][9][2][0][0xf][2][1] [0x1][12]["aabbccddeeff"]]] [0xc][52][5][ [0xc][15][6][ [0x9][10][1][0]["poa-id"]] [0xc][29][7][ [0x9][9][2][0][0xf][2][1] [0x1][12]["112233445566"]]] …(more 8 poa-ids are written here) ]] Query result in XML 1.0 (1596 Bytes) Query result in XML binary in TLV (694 Bytes)
32
21-05-0407-03-0000 Example of a Boolean query Query for asking if a neighboring PoA is 802.11 PREFIX mihbase: ASK {?poa mihbase:poa-type 19 ; ?poa mihbase:poa-id “aabbccddeeff” }
33
21-05-0407-03-0000 Boolean query result Query result in XML 1.0 (153 Bytes) true Query result in XML binary in TLV (52 Bytes) [0xc][49][1][0x6][44][1][0x1][39]["http://www.w3.org/2005 /06/sparqlResults"] [0xc][2][2] [0xc][14][4] [0xc][9][8][0x1][4]["true"] ]
34
21-05-0407-03-0000 Comparison of the formats
35
21-05-0407-03-0000 Method B
36
21-05-0407-03-0000 TLV Format for XML binary encoding 0x1= STR 0x2= XMLVER 0x3 = DOCTYPE 0x4 = ENTDEF 0x5 = DOC 0x6 = NSDEF 0x7 = BASE 0x8 = TAGDEF 0x9 = ATRDEF 0xa = ENT 0xb = NS 0xc = TAG 0xd = ATR 0xe = STRALDEF TypeLengthValue Octets:12Variable 0xf = STRAL 0x10 = YES 0x11 = NO 0x12 = BLANKNODE 0x13 = RDFTRIPLES 0x14 = VARIABLE 0x15 = RESULT … Type field values
37
21-05-0407-03-0000 YES TLV Value field: NULL This TLV may be used for encoding result of “ yes ” for Boolean query of SPARQL. When this TLV is carried, other TLVs carried in the same query result can be omitted. Receiver which receives this TLV decodes it to an appropriate XML format for the corresponding SPARQL Query results. Length(=0)0x10 21 Octets:
38
21-05-0407-03-0000 NO TLV Value field: NULL This TLV may be used for encoding result of “ no ” for Boolean query of SPARQL. When this TLV is carried, other TLVs carried in the same query result can be omitted. Receiver which receives this TLV decodes it to an appropriate XML format for the corresponding SPARQL Query results. Length(=0)0x11 21 Octets:
39
21-05-0407-03-0000 BLANKNODE TLV Length(=2)0x12 21 Octets: Blank Node Number 2
40
21-05-0407-03-0000 RDFTRIPLES TLV Length0x13 2 1 Octets: Zero or more NS TLV (Optional) (Subject) Variable BLANKNODE TLV or STR TLV or STRAL TLV (Subject) Variable Zero or more NS TLV (Optional) (Predicate) Variable BLANKNODE TLV or STR TLV or STRAL TLV (Predicate) Variable Zero or more NS TLV (Optional) (Object) Variable BLANKNODE TLV or STR TLV or STRAL TLV (Object) Variable
41
21-05-0407-03-0000 VARIABLE TLV Length0x14 21 Octets: STR TLV Variable
42
21-05-0407-03-0000 RESULT TLV Length0x15 21 Octets: NS TLV (OPTIONAL) Variable BLANKNODE TLV or STR TLV or STRAL TLV Variable
43
21-05-0407-03-0000 Construction query result with SPARQL optimization (SPARQL Query Results XML Format) 1198 Bytes <!DOCTYPE rdf:RDF [ ]> <rdf:RDF xmlns:rdf="&rdf;" xmlns:rdfs="&rdfs;" xmlns:mihbase="&mihbase;" xml:base="&base;"> 54000 (TLV) 587Bytes [0x6][50][1][0x1][45]["http://mediaindependentinformatio nserver.org/"] [0x6][37][2][0x1][32]["http://www.mih.org/basic- schema#"] [0x6][48][3][0x1][43]["http://www.w3.org/1999/02/22-rdf- syntax-ns#"] [0x13][43] [0xb][2][1][0x1][8]["network2"] [0xb][2][3][0x1][4]["type"] [0xb][2][2][0x1][7]["Network"] ] [0x13][30] [0x12][2][1] [0xb][2][2][0x1][9]["data-rate"] [0x1][5]["54000"] ] [0x13][32] [0xb][2][1][0x1][8]["network2"] [0xb][2][2][0x1][3]["mdi"] [0x12][2][1] ] [0x13][26] [0x12][2][3] [0xb][2][2][0x1][8]["poa-type"] [0x1][2]["19"] ] [0x13][34] [0x12][2][3] [0xb][2][2][0x1][6]["poa-id"] [0x1][12]["aabbccddeeff"] ]
44
21-05-0407-03-0000 19 aabbccddeeff 19 112233445566 19 0123456789ab [0x13][21] [0x12][2][2] [0xb][2][2][0x1][3]["poa"] [0x12][2][3] ] [0x13][26] [0x12][2][4] [0xb][2][2][0x1][8]["poa-type"] [0x1][2]["19"] ] [0x13][34] [0x12][2][4] [0xb][2][2][0x1][6]["poa-id"] [0x1][12]["112233445566"] ] [0x13][33] [0x12][2][2] [0xb][2][2][0x1][15]["neighboring-poa"] [0x12][2][4] ] [0x13][26] [0x12][2][5] [0xb][2][2][0x1][8]["poa-type"] [0x1][2]["19"] ] [0x13][34] [0x12][2][5] [0xb][2][2][0x1][6]["poa-id"] [0x1][12]["0123456789ab"] ] [0x13][33] [0x12][2][2] [0xb][2][2][0x1][15]["neighboring-poa"] [0x12][2][5] ] [0x13][32] [0xb][2][1][0x1][8]["network2"] [0xb][2][2][0x1][3]["mii"] [0x12][2][2] ]
45
21-05-0407-03-0000 Selection query result with SPARQL optimization (SPARQL Query Results XML Format) 1596 Bytes aabbccddeeff 112233445566 …….(more 8 poa-ids are written here) (TLV) 192Bytes [0x14][9][0x1][6]["poa-id"] [0x15][15][0x1][12]["aabbccddeeff"] [0x15][15][0x1][12]["112233445566"].....(more 8 poa-ids are written here)
46
21-05-0407-03-0000 Boolean query result with SPARQL optimization (SPARQL Query Results XML Format) 153 Bytes true (TLV) 3Bytes [0x10][0]
47
21-05-0407-03-0000 Comparison of the formats
48
21-05-0407-03-0000 Comparison between Method A and Method B
49
21-05-0407-03-0000 Comparison of the formats
50
21-05-0407-03-0000 Two types of conversions XMLDOM Internal Data Binary Data Direct Conversion 3-Step Conversion
51
21-05-0407-03-0000 Data conversion time measured on PDA (CPU: ARM 206MHz, OS: Linux) Constuction Query Method AMethod Bgunzip Direct ConversionBinary(TLV) to Internal 7TBDN/A 3Step Conversion Binary to XMLTBD 15 XML to DOM41 DOM to Internal33 Total TBD 89
52
21-05-0407-03-0000 Backup
53
21-05-0407-03-0000 Data conversion time for Method A measured on PC Internal data: DOM (Document Object Model) CPU: Pentium-M 1.7GHz OS: Linux Construction query Internal to XML : 1-2ms XML to TLV: 2-3ms Selection query Internal to XML : 3ms XML to TLV: 3ms Boolean query Internal to XML : 1ms XML to TLV: 2ms
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.