Pervasive and Mobile Computing 24 (2015) 91–100
Contents lists available at ScienceDirect
Pervasive and Mobile Computing journal homepage: www.elsevier.com/locate/pmc
Efficient TVA metadata encoding for mobile and ubiquitous content services Young-guk Ha ∗ , Bum-suk Jang Department of Computer Science & Engineering at Konkuk University, Seoul, Republic of Korea
article
info
Article history: Available online 22 May 2015 Keywords: Mobile content services Ubiquitous content services TV-anytime Metadata encoding Efficient XML interchange
abstract TVA (TV-Anytime) metadata allows users to find, navigate, and manage content through a variety of terminal devices. In general, a TVA metadata description is delivered from a content provider to a terminal device over a transport network. Because such metadata description can become very large, it is essential to encode each fragment of the metadata description in a compressed format before delivery and then decode the encoded fragments at the terminal device. This paper proposes a new fast TVA metadata encoding scheme efficient for mobile and ubiquitous devices such as smartphones, tablets, and wearable devices based on EXI (Efficient XML Interchange). The paper also presents the results of a performance comparison between the proposed scheme and the existing encoding scheme. As described in the experiments section, the proposed scheme performs over three times faster on average than the existing TVA encoding procedure based on BiM. © 2015 Elsevier B.V. All rights reserved.
1. Introduction Metadata is generally defined as ‘‘data about data’’ in the Oxford dictionary. Within the TVA environment [1], the most visible parts of metadata are the attractors or descriptors used in an EPG (Electronic Program Guide). This is the information that consumers or agents use to decide whether or not to acquire a particular piece of content. That is, TVA metadata [2] allows users to find, navigate, and manage content through a variety of consumer devices such as digital TVs, PDRs (Personal Digital Recorders), set-top boxes, and especially nowadays, mobile ubiquitous devices such as smartphones, tablets, and wearable devices. They also allow one to describe his/her search preferences to facilitate the automatic filtering and acquisition of content by agents on behalf of the consumers. For the purpose of interoperability and extensibility, TVA has adopted XML (Extensible Markup Language) [3] as the common representation format for metadata. Such metadata includes a number of descriptive elements to aid the search process as well as elements essential to acquisition and presentation [4], for example, Title, Synopsis, Keyword, Genre, and CreditsList. In many systems, TVA metadata descriptions can become very large. For example, a valid TVA metadata description could contain all the descriptive data supplied by a single content provider to feed an EPG for the next 30 days. The dataset could consist of a set of descriptions for the entire list of programs, series, and groups of content; complete schedule of all related events; description of the broadcast channels; cast list tables; and so on. Delivering this dataset from the content provider to a terminal as a single XML document is inefficient for the following reasons. First, XML is a verbose textual format, which makes an XML document carrying this amount of data very large. Actually, the size of TVA metadata for weekly radio programs of the BBC is more than 10M bytes. This will result in slow metadata download and response times
∗
Corresponding author. E-mail addresses:
[email protected] (Y.-g. Ha),
[email protected] (B.-s. Jang).
http://dx.doi.org/10.1016/j.pmcj.2015.05.008 1574-1192/© 2015 Elsevier B.V. All rights reserved.
92
Y.-g. Ha, B.-s. Jang / Pervasive and Mobile Computing 24 (2015) 91–100
Fig. 1. TVA metadata structure.
at the terminal. In addition, not all of the information carried by a metadata description will be relevant to a terminal at any one instance. Some parts of the description may need to be accessed more often and more efficiently than the other parts. To overcome such problems, TVA defines a standard metadata delivery process, including fragmentation and binary encoding (compression) procedures [4], which can be applied to the metadata description before the metadata description is transmitted to the terminal. In this paper, we have proposed a new encoding procedure for the TVA metadata. The proposed procedure is based on EXI (Efficient XML Interchange) [5], an open standard for encoding general XML documents. During the experiments, the proposed procedure performs encoding and decoding more than three times faster on average than the existing TVA encoding procedure based on BiM (Binary Format of MPEG-7) [6]. As for the metadata compression ratio, the proposed encoding procedure shows the same performance as the BiM-based encoding. Consequently, the proposed encoding procedure will contribute to making the TVA metadata applications more efficient and faster than the existing one for mobile and ubiquitous content services. 2. Related works 2.1. TVA metadata This section explains the details regarding the structure of TVA metadata and the existing delivery process of TVA metadata descriptions using the BiM encoding method. 2.1.1. TVA metadata structure As shown in Fig. 1, TVA defines four types of metadata [2]: content description metadata, instance description metadata, consumer metadata, and segmentation metadata. A TVA metadata description is the actual XML document rooted by the ‘‘TVAMain’’ element, which is to be sent to terminal devices such as IPTV or PDR. The content description metadata describes program content independently of any particular instantiation of that content. Content description metadata contains XML elements required for describing program information, program group information, credits information, and program review information. Fig. 2 illustrates an example of content description metadata, including information about a program titled ‘‘Rock Show’’. The instance description metadata is used in cases where there are meaningful differences between instances of the same content, that is, instances of content that share the same content description. Therefore, instance description metadata describes the program location and service information to link to a particular event-related instance of the content. The consumer metadata describes consumer-related information such as usage history and user preferences about content used in the bidirectional environment. The usage history information is gathered over extended periods of time and provides a list of actions carried out by the user, which can subsequently be used by automatic analysis methods for generating user preferences. User preference descriptions can be correlated with content descriptions to facilitate an accurate and efficient personalization of content access and consumption. The segmentation metadata is used for defining, accessing, and manipulating temporal intervals (i.e., segments) within a content stream. By associating metadata with
Y.-g. Ha, B.-s. Jang / Pervasive and Mobile Computing 24 (2015) 91–100
93
(a) TVA Main fragment > Rock Show (b) ProgramInformation fragment for Rock Show
ART PERFORMANCE ENTERTAINMENT Support mailto:
[email protected]
For more info. http://www.bbc.co.uk/rockshow/
2
another program information fragment
Fig. 2. Example of content description metadata.
Fig. 3. TVA metadata delivery process.
segments and segment groups, it is possible to restructure an input content stream to generate alternative consumption and navigation modes, for example, a summary of the content with highlights, or a set of bookmarks that point to topic headings. 2.1.2. TVA metadata delivery using BiM encoding As illustrated in Fig. 3, the delivery of TVA metadata can be viewed as four distinct procedures — fragmentation, encoding (based on BiM), encapsulation, and transmission [4]. Fragmentation is the generic decomposition mechanism of a TVA metadata description into self-consistent units of data, called TVA fragments. To facilitate the efficient delivery, updating, and navigation of a TVA metadata description, a number of normative TVA fragment types have been defined. As illustrated in Fig. 1, there are 12 types of fragments, including TVAMain, ProgramInformation, CreditsInformation, ServiceInformation, and SegmentInformation. For example, XML code fragment (a) in Fig. 2 is a TVAMain fragment, and code fragment (b) is a ProgramInformation fragment of the entire metadata description. Encoding enables the efficient delivery (in terms of bandwidth, navigability, and updating) of metadata by representing each TVA metadata fragment in a compressed binary format. TVA has chosen the BiM method as defined in ISO/IEC 15938-1 (MPEG-7 systems part) [7] as the preferred encoding method that would facilitate wide interoperability. However, in some controlled environments, TVA allows the use of alternate encoding methods to facilitate the delivery of metadata. Once TVA fragments have been encoded, they need to be encapsulated into a data container for transmission (see Fig. 4(a)). The encapsulation procedure provides further information to enable a receiving terminal device to manage a set
94
Y.-g. Ha, B.-s. Jang / Pervasive and Mobile Computing 24 (2015) 91–100
(a) Encapsulation of encoded fragments.
(b) Fragmentation and reconstruction. Fig. 4. TVA metadata delivery and reconstruction.
of transmitted TVA fragments [4,8]. After receiving the TVA metadata container, the terminal device extracts the encoded fragments from the received container, decodes the encoded fragments with the BiM decoder, and reconstructs the original TVA metadata description with the decoded fragments as illustrated in Fig. 4(b). 2.2. EXI encoding for XML documents The EXI format is a very compact and high-performance XML representation that was designed to work well for a broad range of applications by the W3C (World Wide Web Consortium) [5]. This format simultaneously improves performance and significantly reduces bandwidth requirements without compromising the efficient use of other resources such as battery life, code size, processing power, and memory. EXI uses a grammar-driven approach that achieves very efficient encodings using a straightforward encoding algorithm and a small set of data type representations. Consequently, EXI processors are relatively simple, fast, and can be implemented even on devices with limited capacity. EXI is schema ‘‘informed’’, meaning that it can utilize the available schema information to improve the compactness and performance of grammars for encoding, but does not depend on accurate, complete, or current schemas to work [5]. It supports arbitrary schema extensions and deviations and works very effectively with partial schemas or in the absence of any schema. The format itself also does not depend on any particular schema language or format for schema information. Fig. 5 illustrates the EXI encoding procedure for XML documents using schema-informed grammar. 3. Proposed procedure The basic approach proposed in this paper is to encode and decode a TVA metadata description with the EXI schemainformed grammar generated from the TVA metadata schema [2], which is optimized to the actual metadata description to be delivered. This section explains the architecture of the metadata processing system and the details on metadata processing based on the proposed encoding procedure.
Y.-g. Ha, B.-s. Jang / Pervasive and Mobile Computing 24 (2015) 91–100
95
Fig. 5. EXI encoding with schema-informed grammar.
Fig. 6. Architecture of the metadata processing system.
3.1. Functional architecture Fig. 6 illustrates the functional architecture of the metadata processing system. As shown in the figure, the architecture consists of a delivery layer, EXI decoder, schema manager, metadata manager, metadata API (Application Programming Interface), and TVA applications. The delivery layer provides the mechanism on which the TVA metadata fragment stream is transmitted. The system locates the TVA-init message [4] within the delivery layer to initialize metadata processing modules. In particular, the TVA-init message carries information about MDF (Metadata Description Fingerprint) for the schema manager to initialize the EXI decoder (refer to the following sections for more details on the MDF). The schema manager takes the MDF information from the TVA-init message to optimize the TVA metadata schema. Further, it provides the EXI decoder and metadata manager with details about the optimized schema used for decoding the fragments and reconstructing the metadata description. The EXI decoder takes a data container, extracts and decodes the encoded metadata fragments, and delivers the decoded fragments (along with the versions and unique identifiers) to the metadata manager. The optimized schema information with which the EXI decoder shall be initialized is provided by the schema manager. The metadata manager is responsible for reconstructing the original TVA metadata description with the decoded metadata fragments based on the schema information provided by the schema manager. Further, the metadata manager manages requests for metadata fragments from the TVA applications and notifies the applications of changes to previously acquired fragments through the metadata API. Finally, the metadata API provides the TVA applications with useful programming interfaces to find, navigate, and manage the TVA metadata description.
96
Y.-g. Ha, B.-s. Jang / Pervasive and Mobile Computing 24 (2015) 91–100
Fig. 7. Optimized schema for ProgramInformation fragments only with BasicDescription element.
// 10 types of TVA fragments except for consumer metadata
// Definition of MDF structure (all fields are initialized to 0)
Fig. 8. Definition of MDF written in a C-like pseudo code.
3.2. Schema optimization and MDF To encode and decode very large metadata descriptions more efficiently with EXI, the TVA metadata schema is optimized to the metadata description to be processed. Suppose that a TVA metadata description contains a large number of ProgramInformation fragments described only with the BasicDescription element, which is an essential and most commonly used element for describing program content. In this case, the TVA metadata schema only needs to have structural information about the ProgramInformation element, the BasicDescription element, and all its subelements to generate the EXI grammar for encoding and decoding the metadata fragments. Information about other elements (e.g., the GroupInformationTable, ServiceInformationTable, ProgramLocationTable, and AVAttributes) makes the grammar complicated and causes longer processing time, more memory consumption, and larger encoded fragments. Fig. 7 shows the optimized schema for processing a TVA metadata description consisting of a TVAMain fragment and ProgramInformation fragments described only with the BasicDescription element. To optimize the TVA metadata schema, the content provider system needs to analyze the metadata description to find out what types of fragments (including subelements) the metadata description actually contains. MDF is the output of the metadata analysis, which consists of bitwise summary information for the metadata description. As described in Fig. 8, MDF can be defined as a structure of hierarchical bit flags (8-bit and 16-bit unsigned integers). Seven bits of the ‘‘tables’’ field in the MDF structure are used for indicating the existence of seven ‘‘*Table’’ elements in the TVA metadata description (i.e., ‘‘ProgramInformationTable’’ and the rest). Ten bits of the ‘‘fragments’’ field are used for indicating the existence of the fragment root elements (i.e., ten types of fragment root elements such as ProgramInformation), and ten elements of the ‘‘subelements’’ array are used as indication flags for the descriptive subelements of the ten fragments (e.g., BasicDescription for the ProgramInformation fragment). Fig. 9 illustrates how to generate an MDF for a TVA metadata description, including ProgramInformation fragments. As shown in the figure, the metadata description is scanned from the start tag of the root element ‘‘⟨TVAMain⟩’’ to the end tag of the root element ‘‘⟨/TVAMain⟩’’. During the scanning process, if one of the ‘‘*Table’’ elements is encountered, then the corresponding bit of the ‘‘tables’’ field is set to 1. If any fragment root element is encountered subsequently, then the
Y.-g. Ha, B.-s. Jang / Pervasive and Mobile Computing 24 (2015) 91–100
97
Fig. 9. Generation of MDF for TVA metadata description.
corresponding bit of the ‘‘fragments’’ field is set to 1. If any descriptive subelement of a fragment is encountered, then the appropriate bit in the corresponding element of the ‘‘subelements’’ array is set to 1. After generating MDF, the content provider system can optimize the TVA metadata schema by pruning off the elements whose existence indication bit is 0 from the schema structure. In the above example, the rest of the schema elements are pruned off except for ProgramInformationTable, ProgramInformation, BasicDescription with its subelements, and AVAttributes with its subelements. 3.3. Proposed encoding procedure Fig. 10 illustrates the details of the proposed encoding procedure within the TVA metadata delivery process. As shown in the figure, at the beginning of the delivery process, an MDF is generated by analyzing the TVA metadata description to be delivered. The MDF information is used for optimizing not only the TVA metadata schema in the content provider system to initialize the EXI encoder but also the TVA metadata schema in the terminal device to initialize the EXI decoder. Hence, the MDF information is transmitted to the terminal device along with the TVA-init message [4]. To embed the MDF structure into the TVA-init message, the MDF_type structure (described in Fig. 7) is serialized as a fixed-size bit stream. Before transmitting the metadata fragments, the content provider system encapsulated a set of EXI encoded fragments into a container together with the contextual information with which the original metadata description is reconstructed. Upon receiving a container, the terminal application extracts the encoded metadata fragments from the container, decodes the extracted fragments, and reconstructs the original metadata description with the decoded fragments. 4. Implementation and experiments This section presents the results of comparison between the performance of the proposed encoding procedure and that of the existing TVA encoding procedure based on BiM. The proposed metadata encoding procedure is implemented using Java [9] to perform the experiments and evaluate the performance. For the performance comparison, the existing TVA metadata encoding procedure is also implemented with the BiM core module. The BiM core module used in the experiments is from the ISO/IEC 15938-6 reference software implementation [10]. As input data, ten selected program information description files provided by BBC are used [11]. Table 1 summarizes properties of the input data files and performance comparison results between the two encoding procedure implementations measured on a PC with a 2 GHz CPU and a local HDD metadata storage. The table lists the size, the degree (i.e., the number of subelements) of ProgramInformation element, and the height of metadata structure of each data file. The table also lists the encoding time, the decoding time, and the compression ratio for each data file as well as the average times and the compression ratio over all the input data files.
98
Y.-g. Ha, B.-s. Jang / Pervasive and Mobile Computing 24 (2015) 91–100
Fig. 10. Metadata delivery process based on the proposed procedure. Table 1 Performance comparison result.
Size (bytes) Degree of PI element Height of structure Encoding time (ms)
Decoding time (ms)
Compressed size (ratio)
Decoding time (ms)
Compressed size (ratio)
Data file 2
Data file 3
Data file 4
Data file 5
17,424 5 8
21,312 5 8
38,592 5 8
32,173 5 8
Proposed
218
126
187
303
245
BiM
2,218
386
568
873
721
Proposed
211
122
181
290
234
BiM
1,088
396
546
871
681
Proposed
4,038 (17.1)
3,269 (18.76)
3,764 (17.66)
9,151 (23.71)
6,089 (18.92)
BiM
3,914 (16.6)
3,180 (18.25)
3,656 (17.15)
9,181 (23.78)
5,948 (18.48)
Size (bytes) Degree of PI element Height of structure Encoding time (ms)
Data file 1 23,581 1 6
Data file 6
Data file 7
Data file 8
Data file 9
Data file 10
Average
36,171 5 8
32,401 3 7
36,290 5 8
38,592 5 8
36,290 5 8
31,283 4.4 7.7
Proposed
269
240
242
303
242
238
BiM
801
1017
734
873
734
893
Proposed
259
221
237
290
237
228
BiM
707
634
673
871
673
714
Proposed
8,229 (22.75)
7,577 (23.38)
8,481 (23.37)
9,151 (23.71)
8,481 (23.4)
6,823 (21.3)
BiM
8,218 (22.71)
7,615 (23.50)
8,536 (23.52)
9,181 (23.78)
8,536 (23.5)
6,797 (21.1)
Fig. 11 illustrates the relative performance of the proposed procedure against the existing BiM-based TVA encoding procedure. The x-axis represents each input data file, and the y-axis represents the relative performance of the proposed procedure assuming that the performance of the existing encoding procedure is 1. As shown in the results, the proposed
Y.-g. Ha, B.-s. Jang / Pervasive and Mobile Computing 24 (2015) 91–100
99
Fig. 11. Relative performance of the proposed encoding procedure.
procedure performs more than three times faster than the existing BiM-based procedure on average (at maximum, more than five times faster for encoding and more than ten times faster for decoding dataset 1) while exhibiting the same compression performance. Both the proposed procedure and the BiM-based procedure use the TVA schema information to encode and decode the input data files. In case of BiM, the entire schema including all the TVA fragment information is always used, which is quite large and has a complicated structure, even though only a specific portion of the schema information is actually required. Consequently, processing with the unnecessary portion of the TVA schema makes the BiM-based procedure inefficient. That is, if an input TVA description file mainly consists of ProgramInformation fragments, the schema information not related to the ProgramInformation fragment will not contribute to generate BiM-encoded fragments. Eventually, this causes the BiM-based procedure to take relatively longer time. On the other hand, the proposed procedure analyzes the input TVA metadata files and then optimizes the schema information according to the analysis result before encoding or decoding (refer to section III-B and III-C for the detailed description of the schema optimization process). The optimized schema makes a simple and small EXI grammar that results in faster encoding and decoding for the given input files. Especially, it was observed that input data file 1 contains no other elements than the BasicDescription as a subelement of ProgramInformation fragment (i.e., the degree of ProgramInformation element is 1). We could conclude that this maximized the effect of the schema optimization and made the encoding and decoding speed of the proposed procedure more than five and ten times faster respectively than the BiM-based procedure for input data file 1 as you can see in Fig. 11. 5. Conclusion This paper has proposed an efficient encoding procedure of TVA metadata for mobile and ubiquitous content services. The proposed procedure is based on EXI and metadata schema optimization using the MDF information. As described in the implementation and experiments sections, the proposed procedure performs metadata encoding and decoding over three times faster on average than the existing TVA encoding procedure based on BiM. One of the future research directions is to efficiently store and access TVA metadata descriptions on mobile ubiquitous devices. Once delivered, TVA metadata descriptions are stored on the local storage of the devices and frequently accessed by TVA applications. Normally, this may require a large storage space and take a relatively long accessing time because the TVA metadata descriptions are stored as very large XML documents. Another future research is to extend the proposed encoding procedure to support other types of standard XML descriptions such as RDF (Resource Description Framework) metadata. Together with the proposed encoding procedure, efficient metadata storage and access methods will enable limited-capacity mobile devices such as smartphones and smartwatches to more effectively handle very large metadata. Acknowledgment This work was supported by Institute for Information & communications Technology Promotion (IITP) grant funded by the Korea government (MSIP) (No. R0101-15-0144, Development of Autonomous Intelligent Collaboration Framework for Knowledge Bases and Smart Devices). References [1] J.P. Evain, H. Murret-Labarthe, TV-anytime phase 1 — a decisive milestone in open standards for personal video recorders, Eur. Broadcast. Union Tech. Rev. (2003). [2] TV-Anytime Forum, TVA Specification S-3 on Metadata, Part A: Metadata Schemas, Ver. 1.3, Dec. 2002.
100 [3] [4] [5] [6] [7] [8] [9] [10] [11]
Y.-g. Ha, B.-s. Jang / Pervasive and Mobile Computing 24 (2015) 91–100 W3C, Extensible Markup Language (XML) 1.0 5th Edition, W3C Recommendation, Nov. 2008. TV-Anytime Forum, TVA Specification S-3 on Metadata, Part B: System Aspects in a Unidirectional Environment, Ver. 1.3, Dec. 2002. W3C, Efficient XML Interchange (EXI) Format 1.0, W3C Candidate Recommendation, Dec. 2009. J. Yeom, H. Kim, M. Kim, H. Lee, Implementation of encoder and decoder for MPEG-7 BiM, J. Broadcast Eng. 12 (2) (2007) 159–176. ISO/IEC 15938-1, Information technology — multimedia content description interface — part 1: Systems, 2002. A. Lugmayr, S. Niiranen, S. Kalli, Digital Interactive TV and Metadata: Future Broadcast Multimedia, Springer-Verlag, New York, 2004, pp. 114–130. J. Gosling, B. Joy, G. Steele, G. Bracha, The Java Language Specification, third ed., Sun Microsystems, Santa Clara, 2005. ISO/IEC 15938-6, Information technology — multimedia content description interface — part 6: Reference software, 2006. BBC Backstage, TV-anytime data, Revised Sep. 2010.