• 沒有找到結果。

A chapter preloading mechanism for e-reader in mobile environment

N/A
N/A
Protected

Academic year: 2021

Share "A chapter preloading mechanism for e-reader in mobile environment"

Copied!
8
0
0

加載中.... (立即查看全文)

全文

(1)

Chen-Yuan Chuang

a,b,⇑

, Yi-Bing Lin

b

, Zhihao Julie Ren

c aTelecommunication Laboratories, Chunghwa Telecom Co., Ltd., Taipei, Taiwan

b

Department of Computer Science, National Chiao-Tung University, Hsinchu, Taiwan

c

Telecom & Management SudParis, Evry, France

a r t i c l e

i n f o

Article history:

Received 31 August 2011

Received in revised form 7 August 2012 Accepted 12 August 2012

Available online 20 August 2012 Keywords: Buffer management E-book E-reader Preload Waiting time Zipf’s law

a b s t r a c t

E-book is a fast growing service for mobile Internet. A user reads e-books through an e-reader that could be a dedicated reading device or a mobile application on the smart-phones or the tablets. With content protection of Digital Right Management (DRM), e-books take longer chapter loading time due to necessary data decryption. This paper propose a mechanism that preloads a small number of chapters into the buffer for DRM-protected e-books. When the user reads a chapter in the buffer, our solution reduces the user waiting time without affecting existing content protection. We also analyze the buffer replacement cost and effects of the limited buffer resource.

Ó 2012 Elsevier Inc. All rights reserved.

1. Introduction

Nowadays, e-book service has been deployed in many countries. A user reads e-books through an e-reader that could be a dedicated reading device or a mobile application on the smartphones or the tablets[2,3]. Most studies and surveys focused on e-reader features and functionalities[16,23]. In particular, ePub[11]has become a dominant standard of e-book format. We observe that while the e-reader performs data loading, pagination, rendering, and page turning, the waiting time di-rectly influences the user experience. As[20]demonstrated, the e-book chapter loading is a major procedure that consumes CPU time and memory resource, especially if the Digital Right Management (DRM) mechanism is involved. We have con-ducted general e-book user experience survey in the library of National Chiao-Tung University; the details are given in

[19]. However, user experience of preloading to speed up encryption/decryption has not been investigated in the literature. For open content, the e-reader can simply load the whole e-book from storage or file system[7]. On the contrary, DRM-protected e-books must be encrypted in order to avoid illegal copying[13,10,6]. To access DRM-protected e-book content, the e-reader requests a key and then spends additional CPU time and memory resource on data decryption when loading the required chapter into the buffer. Consequently, everytime the user turns to the next or jumps to another chapter, he/ she must wait for a long response time until the new chapter is loaded.

Fig. 1depicts the extracted files from a sample ePub. Rather than text-level compression[14], an ePub file basically is a zip-archived file, and the mimetype file (Line 1) indicates that the zip file follows the ePub-specific file structure. The ePub works with XML and Web technologies. XML files describe the metadata of the e-book, including book title, author, Table of Contents, and manifest file (Lines 3 and 7).

0020-0255/$ - see front matter Ó 2012 Elsevier Inc. All rights reserved. http://dx.doi.org/10.1016/j.ins.2012.08.009

⇑ Corresponding author at: Telecommunication Laboratories, Chunghwa Telecom Co., Ltd., Taipei, Taiwan. E-mail addresses:[email protected](C.-Y. Chuang),[email protected](Y.-B. Lin),[email protected](Z.J. Ren).

(2)

In most of e-books, each chapter is encapsulated in an XHTML file (Lines 8 and 10). Like a Web page, the XHTML file might also reference some pictures and CSS files (Lines 9 and 12). File signatures and encryption (Lines 4–5) are optional and pro-prietary, but note that the DRM mechanism, e.g., ADEPT (Adobe Digital Experience Protection Technology)[1], only encrypts the chapter files rather than the whole ePub file.

Practically, the e-readers are built upon the web-browser components with the common APIs: loadURL () and load-Data ()[12,22,17]. The former loads the chapter contents from web sites or files, and the latter loads a single string as the chapter contents. Therefore, to feed the plaintext in secure paths (e.g., memory/buffer rather than files), the e-reader may host a local ServerSocket which decrypts the chapter files and mimics as a web site. Alternatively, the e-reader de-crypts the chapter files and composes all materials into a string[15]. As a result, the DRM-protection induces extra user wait-ing time on chapter loadwait-ing as compared with DRM-free scenario. In Chunghwa Telecom [8], we have conducted experiments which indicate that with a cache (buffer) mechanism, an e-reader with DRM-protection performs as fast as DRM-free one does.

This paper proposes a buffer management scheme that preloads a small number of chapters into the limited buffer. If the user intents to read a chapter in the buffer, this proposed mechanism reduces chapter loading time and thus improves the user experience.

2. Chapter preloading mechanism

The proposed chapter preloading mechanism uses a multi-element ring buffer[21], where each element holds one chap-ter of the e-book. Moreover, the e-reader loads and presents the current chapchap-ter in main thread and then preloads remaining chapters as background process. As long as the memory usage of the process is allowed on the mobile device, the e-reader can decrypt the ciphertext from files and preload the plaintext into buffer chapter by chapter. The concept of our preloading mechanism is similar to cache management described in[5,9], but the execution is very different.

Our mechanism and system model can apply to most e-readers that provide Next and Previous buttons, and support chapter jumping from the Table Of Contents (TOCs) of the e-book. Although some of them can further jump back to a recently read chapter, we will not cover the Return/Back and Bookmark in this paper. It is expected that a dedicated element to cache the last-read chapter may improve performance and chapters with bookmarks have higher probability to be jumped to as well, and our model can easily be extended to accommodate such a feature.

2.1. Notation and definitions

Let N be the number of chapters in a given e-book. We first rank all chapters according to its Most Likely Reading Order (MLRO) as shown inFig. 2. MLRO is established based on common reading habits, i.e., the reading order is sequential and chapters close to the current reading one have higher probabilities to be read in the near future.

Let n be the current chapter (1 6 n 6 N), and kn(i) be the MLRO rank of any Chapter i with respect to n. InFig. 2, the gray-colored box indicates Chapter n, which has the rank kn(n) = 1. Rank 2 is assigned to the next chapter in the sequential order:

Fig. 1. Files in a sample ePub.

Chapter number i 1 n - j n - 1 n n + 1 n + j N

MLRO rank kn(i) 2j +1 3 1 2 2j

(3)

For example, h2, 5i means Chapters 2–5, and h5, 2i means Chapters 5–N and Chapters 1–2.

Basically, the e-reader can jump from Chapter n to another Chapter n⁄within N/2 chapters, and we call it.  a forward jump if n2 n; n  N 2     , or  a backward jump if n2 n  N 2    1 ;n  1   .

InFig. 2, assume that N = 11 and n = 6. If n⁄= 9, then it is a forward jump with j = 3, and k

6(9) = 6. If n⁄= 1, then it is a backward jump with j = 5, and k6(1) = 11. It is clear that the MLRO ranking of Chapter n⁄with respect to Chapter n can be expressed as

knðnÞ ¼

knðn  jÞ ¼ 2j for a forward jump

knðn  jÞ ¼ 2j þ 1 for a backward jump



and the jump distance j will be

j ¼ knðn

Þ

2

ð2Þ

Let B be the buffer size, then Chapter i is in the buffer (i.e., 1 6 kn(i) 6 B) when

i 2 n  B1 2 ; n  B1 2   if B is odd n  B 2 1 ; n  B 2   if B is even ( ð3Þ

Eq.(3)determines whether a chapter is in the buffer depending on B. For example, inFig. 3a, n = 1 and B = 5, then Chapters 13, 14, 1, 2 and 3 are in the buffer; inFig. 4a, n = 1 and B = 9, then Chapters 11–5 are in the buffer.

2.2. Chapter replacement cost

We assume that the limited buffer size cannot preload the whole e-book (N > B), so that the e-reader must replace some victim chapters in the buffer. InFig. 3, when the user jumps to Chapter 3 (seeFig. 3b), a.k.a. cache hit, there are 2 chapters in the buffer will be replaced; when the user jumps to Chapter 7 from Chapter 1 (seeFig. 3c), a.k.a. cache miss, all chapters in the buffer will be replaced in this case.

(4)

After a chapter jump, the MLRO ranking is reset with respect to the new current chapter. If the MLRO ranking of a buffered chapter is larger than B, it implies that the chapter should be replaced; otherwise, the chapter stays in the buffer.

The number of chapters to be replaced is derived in the following Theorem, and scenarios of forward jumps are illustrated inFigs. 3 and 4.

Theorem 1. Let NL(j) be the number of replaced chapters. Then

NLðjÞ ¼ j if j < B and j < N  B ðaÞ N  B if N  B 6 j < B ðbÞ B if B 6 j 6 N  B ðcÞ 8 > < > : ð4Þ

Proof 1. Suppose that B is odd (we omit the similar proof for the case when B is even). From(3), the chapter sequence S in the buffer (seeFigs. 3a and4a) is

S ¼ n  B  1 2  ; n  B  1 2    ð5Þ

Without loss of generality, we assume that the user jumps j chapters forward (we omit the similar proof for a backward jump). After the jump, the chapter sequence S⁄in the buffer is

S ¼ n B  1 2  ; n B  1 2    ¼ ðn þ jÞ  B  1 2  ; ðn þ jÞ  B  1 2    ð6Þ

Let r and l be the numbers of overlapping chapters on the right-hand side and the left-hand side in S and S⁄, respectively. For example, inFig. 4c, we have r = 3 (Chapters 3, 4 and 5) and l = 1 (Chapter 11). The number of overlapping chapters is r + l. Therefore, the number of replaced chapters in the buffer is

NLðjÞ ¼ B  ðr þ lÞ ð7Þ

Now, we prove the hypothesis in two scenarios: j < B and j P B.

Scenario 1: j < B (seeFigs. 3b and4b and c) We first consider the overlapping chapters on the right-hand side. Since j < B, from(5) and (6), we know that the overlapping chapters on the right-hand side must be in

ðn þ jÞ  B  1 2  ; n  B  1 2    ð8Þ From(8), r ¼ n þ B  1 2     ðn þ jÞ  B  1 2    þ 1 ¼ B  j ð9Þ

Now, we consider the left-hand side: If l – 0, (seeFig. 4c), it implies that the chapters not in S must be loaded in S⁄, and

NLðjÞ ¼ N  B ð10Þ

Similarly to(8), we have the overlapping chapters on the left-hand side from(5) and (6)if l – 0. Then we find that

ðn þ jÞ þ B  1 2  Pn  B  1 2  þ N () j P N  B ð11Þ

(5)

NLðjÞ ¼ B ð14Þ

From(14), Eq.(4)c is proved. h

3. Analysis and discussion

This section shows how to select appropriate B values according to the reload probability p and the replacement cost CL. Let p be the probability that the next Chapter n⁄is not in the buffer (cache miss). Let C

Lbe the expected number of replaced chapters in the buffer due to a chapter jump. Note that for DRM-protected e-books, the buffer of e-reader is a limited re-source, and for the practical exercise, it suffices to consider B < N/2.

We derive p and CLassuming that the probability distribution of e-book chapter reading follows Zipf’s law[4,18]. This law predicts the frequency of the chapter of MLRO rank k to appear. The Zipf’s probability of the chapter of rank k is

PZðkÞ ¼ ks XN i¼1 1 is ! " #1 ð15Þ

where s describes the reading behavior, and more specifically, the locality of the read chapters. A large s means that the user is inclined to read neighboring chapters; on the contrary, a small s means that there is a higher probability to jump further away from the current chapter. Zipf’s law gives the probability of any chapter to be read depending on its MLRO rank.

From(15), the reload probability p is expressed as

p ¼ X knðnÞ>B PZ½knðnÞ ¼ 1  X 16k6B ks X N i¼1 1 is ! " #1 ð16Þ

Now we derive CL. For the practical exercise, we assume B < N/2, so Theorem 1 can be simplified as

NLðjÞ ¼

j if j < B B if B 6 j 

Let C1be the replacement cost corresponding to forward jumps. Since kn(n⁄) = 2j and j 6 bN/ 2c, we have

C1¼ X 16j6 N 2 b c NLðjÞPZð2jÞ ¼ X 16j<B jPZð2jÞ þ B X B6j6N 2 b c PZð2jÞ 0 B @ 1 C A ð17Þ

Let C2be the replacement cost corresponding to backward jumps. Since kn(n⁄) = 2j + 1 and j 6 dN/2e  1, we have

C2¼ X 16j6 N 2 d e1 NLðjÞPZð2j þ 1Þ ¼ X 16j<B jPZð2j þ 1Þ þ B X B6j6N 2 d e1 PZð2j þ 1Þ 0 B @ 1 C A ð18Þ

From17, 18, 15 and 2, the replacement cost CLis

CL¼ C1þ C2¼ X 16l<2B l 2 PZðlÞ þ B X 2B6l6N PZðlÞ ! ¼ X 16l<2B l 2 ls X N i¼1 1 is ! " #1 þ B X 2B6l6N ls X n i¼1 1 is ! " #1 0 @ 1 A ð19Þ

From(16), we observe that a larger B implies a lower p. On the contrary, from(19), a larger B implies a higher CL. To select an appropriate B to balance against p and CL, we define a net cost C as follows:

C ¼ p þ

aC

L

(6)

Fig. 5shows the reload probability p as a function of B/N and s, where N = 20. The figure indicates the intuition that p decreases as B/N increases. We observe a non-trivial result that there is a knee point (the bullets inFig. 5) such that before this point, p significantly decreases as B/N increases. This phenomenon implies that after this knee point, selecting a larger buffer size does not improve p performance. Such knee effect is more significant for a larger s.Fig. 5also indicates that to achieve the same p performance, B/N deceases as s increases.

Fig. 5. Effect of s and B/N on p (N = 20).

Fig. 6. Effect of N and B/N on p (s = 2).

(7)

Fig. 6illustrates that to achieve the same p performance; a larger B/N is required for a smaller N. That is, a larger portion of e-book needs to be stored in the buffer for an e-book of small volume. Similar toFig. 5, a knee point can be determined on every p curve.

Fig. 7shows the loading cost for N = 20 under various s values. We observe that CLincreases as the locality parameter s or the e-book size B/N increases; this effect becomes less significant with large s values.

The net cost for s = 2 is illustrated inFig. 8. For

a

= 0.6, we observe a minimum value on each C curve for N = 50 and N = 100, respectively. In both cases, this minimum occurs when B = 3 (B/N = 0.06 for N = 50 and B/N = 0.03 for N = 100). By increasing the factor

a

, the protection of the e-book is higher and the minimum occurs for a smaller B value (for

a

= 0.8, B = 2). We note that the B/N value of the minimum is always smaller than that of the knee point for p.

The above performance study indicates that by slightly increasing the buffer size, the user experience is significantly im-proved. For example inFig. 8, by buffering two more chapters (i.e., B/N increases from 0.02 to 0.06 for N = 50 and

a

= 0.6), we can reduce the reload probability p from 0.38 to 0.17 (Fig. 6), which is a 56% improvement. Our chapter preloading mech-anism provides a method for e-reader designers to select the appropriate buffer size according to the requirements in term of user experience and e-book protection.

4. Conclusions

This paper proposed a chapter preloading mechanism for e-reader that significantly enhances the user experience by slightly increasing the buffer resource with the lower reload probability. Furthermore, we also guided the e-reader develop-ers to allocate the appropriate buffer resource to balance the cache-hit ratio and replacement cost.

Our scheme preloads more chapters in the buffer than the existing scenario (i.e., no preload). Since in both approaches, the decrypted chapters are loaded into the secure paths that are not accessible by other processes, our scheme is compatible with the existing DRM-protection and assures the required protection level for the e-book.

The forthcoming ePub 3.0 will enrich the e-book contents, and different reading sequences are expected for various con-tents. A potential future work is to extend the MLRO ranking to be more precise for various classifications of e-book and the features of e-readers. Same technique proposed in this paper can be used to model the access performance of the new read-ing features.

References

[1] Adobe-Reader Developer Center—Adobe Developer Connection. <http://www.adobe.com/devnet/reader.html> (accessed 25.03.12). [2] Amazon.com: Kindle eBooks, Newspapers, Magazines, Blogs. <http://www.amazon.com/> (accessed 25.03.12).

[3] App Store-Stanza. <http://itunes.apple.com/us/app/stanza/id284956128?mt=8> (accessed 25.03.12).

[4] L. Breslau, C. Pei, F. Li, G. Phillips, S. Shenker, Web caching and Zipf-like distributions: evidence and implications, in: Proceedings of IEEE INFOCOM’99, March 1999, pp. 126–134.

[5] F.-C. Chang, H.-C. Huang, A refactoring method for cache-efficient swarm intelligence algorithms, Information Sciences 192 (2012) 39–49. [6] C.-Y. Chuang, Y.-C. Wang, Y.-B. Lin, Digital right management and software protection on Android phones, in: Proceedings of the 71st Vehicular

Technology Conference (VTC 2010-Spring), 2010.

[7] Freda: the free ebook reader. <http://www.turnip.demon.co.uk/jim/freda/> (accessed 25.03.12).

[8] HamiBook (in Chinese) — Chunghwa Telecom Co., Ltd. <http://bookstore.emome.net/> (accessed 25.03.12). Fig. 8. Effect of N,aand B/N on C (s = 2).

(8)

[9] W.-S. Han, W.-K. Loh, K.-Y. Whang, Type-level access pattern view: enhancing prefetching performance using the iterative and recursive patterns, Information Sciences 180 (2010) 4118–4135.

[10] G. He, Analysis of e-book security, Publications in Telecommunications Software and Multimedia, 2001. <http://www.tml.tkk.fi/Studies/Tik-110.501/ 2001/papers/he.pdf> (accessed 25.03.12).

[11] International Digital Publishing Forum – Trade and Standards Organization for the Digital Publishing Industry. <http://idpf.org/> (accessed 25.03.12). [12] iOS Developer Library: UIWebView Class Reference. <http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/

Reference/Reference.html> (accessed 25.03.12).

[13] Q. Liu, R. Safavi-Naini, N. Sheppaed, Digital rights management for content distribution, in: Proceedings of Ihe Australasian Information Security Workshop, 2003.

[14] M.A. Martinez-Prieto, J. Adiego, P. Fuente, Natural language compression on edge-guided text preprocessing, Information Sciences 181 (2011) 5387– 5411.

[15] L. Masinter, The ‘‘data’’ URL Scheme, RFC 2397, IETF, August 1998.

[16] L.M. Moore, At Your Leisure: Assessing Ebook Reader Functionality and Interactivity, Master Thesis, University College, London, UK, 2009. [17] MSDN Library: WebBrowser Class (Microsoft.Phone.Controls). <http://msdn.microsoft.com/en-us/library/ff402601(v=vs.92).aspx> 25.03.12). [18] M.E.J. Newman, Power laws, Pareto distributions and Zipf’s law, Contemporary Physics 46 (2005) 323–351.

[19] Z.J. Ren, Performance Evaluation and User Experience of E-book Reader, Master Thesis, National Chiao-Tung University, Taiwan, 2011.

[20] Z.J. Ren, Y.-B. Lin, N. Crespi, Evaluation of e-book reader on mobile devices, in: Proceedings of the 15th Mobile Computing Workshop, Taichung, Taiwan, 2010.

[21] P.K.C. Tse, Multimedia Information Storage and Retrieval: Techniques and Technologies, IGI Global, 2008.

[22] WebView — Android Developers. <http://developer.android.com/reference/android/webkit/WebView.html> (accessed 25.03.12). [23] R. Wilson, E-book readers in higher education, Journal of Educational Technology Society 6 (2003) 8–17.

數據

Fig. 1. Files in a sample ePub.
Fig. 3. Buffer replacement mechanism (small B).
Fig. 4. Buffer replacement mechanism (large B).
Fig. 5. Effect of s and B/N on p (N = 20).
+2

參考文獻

相關文件

bility of the mobile system is the same as the call blocking For example, for a hexagonal planar layout with reuse dis- probability in a cell, Because traffic in

Starting from a discussion on this chapter, Jay a nanda proceeds to explain 22 kinds of mental initiation for the pursuit of enlightenment... The first chapter of Madhyamak a vat a

We do it by reducing the first order system to a vectorial Schr¨ odinger type equation containing conductivity coefficient in matrix potential coefficient as in [3], [13] and use

In this paper, we have studied a neural network approach for solving general nonlinear convex programs with second-order cone constraints.. The proposed neural network is based on

In this paper, we extended the entropy-like proximal algo- rithm proposed by Eggermont [12] for convex programming subject to nonnegative constraints and proposed a class of

In this chapter we develop the Lanczos method, a technique that is applicable to large sparse, symmetric eigenproblems.. The method involves tridiagonalizing the given

In this paper, we have shown that how to construct complementarity functions for the circular cone complementarity problem, and have proposed four classes of merit func- tions for

Abstract In this paper, we consider the smoothing Newton method for solving a type of absolute value equations associated with second order cone (SOCAVE for short), which.. 1