Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2015, Article ID 372486, 10 pages http://dx.doi.org/10.1155/2015/372486
Research Article MR∗-Tree: Novel Indexing and Retrieving Mechanism for Spatial Objects in Mobile PowerPoint Pages Jianming Xiang,1 ZhangBing Zhou,1,2 Lei Shu,3 Cong Liu,1 and Qun Wang1 1
School of Information Engineering, China University of Geosciences, Beijing 100083, China Computer Science Department, Telecom SudParis, 91011 Evry Cedex, France 3 Guangdong University of Petrochemical Technology, Maoming 525000, China 2
Correspondence should be addressed to ZhangBing Zhou;
[email protected] Received 12 November 2014; Accepted 15 December 2014 Academic Editor: Joel Rodrigues Copyright © 2015 Jianming Xiang et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Different from the traditional office software, due to the limited storage and computational capability of mobile devices, how to support the page editing in a fast and energy-efficient manner is fundamental. To address this challenge, we propose an MR∗ -tree based indexing mechanism for supporting the fast and energy-efficient retrieval of spatial objects in mobile PowerPoint pages. Based on this, techniques are developed to support the operations when editing mobile PowerPoint pages. Prototype has been implemented for facilitating the operations of spatial objects when editing mobile PowerPoint pages. Experimental evaluations on computers, pads, and smart phones show the effectiveness and efficiency of this technique.
1. Introduction Nowadays, the mobile devices are widely used in the life of people, largely due to the development of mobile communication technology and the increasing coverage positioning technology [1]. Besides, the more endurability of battery can make the mobile devices operate for a longer time and support more computational-intensive applications, which are usually supported by computers traditionally [2]. These indicate that mobile devices are taking a role that is more and more important in many aspects of people’s life [3–6]. Along with the blossoming of the mobile Internet, mobile applications are used widely and the mobile office has been a popular software for users who travel often, which let the users work using any mobile device and at any time and place, whenever and wherever there is an Internet access. This has promoted the demand for mobile office to a large extent [7]. A good mobile office application should let users deal with anything with the software at any time in any place, getting rid of the limitation of the screen size and the computational capacity of devices [8–10]. It is worth mentioning that, compared with the traditional office software, the mobile office does not require to
support the complete functionalities. Instead, fast and accurate response to users’ requests is essential, including accurate cursor locating, guideline generation for facilitating images, and full-text transformation from one place to another when editing pages. This is fundamental especially when users edit mobile PowerPoint pages [9]. With the relatively large number of spatial objects in a mobile PowerPoint page and relatively small storage and computational capabilities in smart phones, PDA, or other mobile devices, an energyefficient technique of managing these spatial objects, which can facilitate the mobile PowerPoint page editing, is required for mitigating the problems described as follows. (i) Data of Big Volume for Spatial Objects with respect to the Limited Storage Capacity of Mobile Devices [11]. The rapidly increasing volume of data makes a great demand for the storage capacity of smart devices, where the location data contributes with a majority of the storage capacity and computational resources. Consequently, a more effective data structure is required for organising the location data more efficiently. Generally, the location data is represented in terms of (𝑎, 𝑏), where 𝑎, 𝑏 denote the 𝑋- and 𝑌-coordinates of a spatial object. In this setting, a spatial index is constructed,
2
International Journal of Distributed Sensor Networks Table 1: Structural elements of mobile PowerPoint.
Name
Description
ShapeFrame TextFrame
Top container of spatial objects in the PowerPoint which contains all the text contents Subcontainer of ShapeFrame and the object for setting the attributes for the paragraph in PowerPoint pages Subcontainer of TextFrame and the object of a text line in the paragraph, which prescribes how the text line displays Subcontainer of the LineFrame and the container of words in the same size in a text line Container of the text with the same attributes Container of the placeholder in a text line Superior container containing all ShapeFrames in PowerPoint pages and there is one sldFrm in one PowerPoint page
LineFrame LineLayout TextPotion TailPorion sldFrm
which can consume less memory and disk space while supporting the operations of spatial objects. (ii) The Complex Query Processing of Spatial Data with respect to Relatively Low Performance of Smart Devices [12–15]. Traditional relational database is not appropriate for storing and querying spatial objects, and an efficient spatial indexing mechanism is necessary for facilitating the query processing of spatial objects with limited storage and computation capability of mobile devices. To address the challenges discussed above, a spatial objects indexing mechanism, denoted by MR∗ -tree, is proposed leveraging the traditional R∗ -tree method [16], which can index spatial objects in PowerPoint pages efficiently and effectively. Thereafter, operations are developed for locating a cursor, selecting letters, and generating guidelines. Experimental evaluations on pads and smart phones show the effectiveness of this proposed technique. The rest of this paper will be organized as follows. In Section 2, we introduce the model of the mobile PowerPoint and build a spatial index on spatial objects in mobile PowerPoint pages. In Section 3, we present the model of some operations for mobile PowerPoint pages and develop algorithms for supporting these operations. In Section 4, experiments are conducted for evaluating the applicability and efficiency of proposed algorithms. In Section 5, relevant techniques are discussed and reviewed, and finally we conclude this work in Section 6.
2. Indexing Spatial Objects In this section, we will present how to organise spatial objects in mobile office PoewrPoint by means of the spatial index. Generally, the structure of PowerPoint is shown in Figure 1 [17], and the description of these structural elements is shown in Table 1. The spatial indexes are built on ShapeFrame and TextPortion, since they are either the largest or the smallest containers of the pages in PowerPoint. The reason why we cannot build spatial indexes on every kind of container is that a page could include multiple ShapeFrames and there can be multiple subcontainers in the superior containers, which leads to the unacceptable time complexity 𝑂(𝑁6 ), where 𝑁 is the amount of spatial object in the PowerPoint page. So, we address this
ShapeFrame TextFrame LineFrame LineLayout
TextPortion
TailPortion
Figure 1: Structure of a PowerPoint page.
problem by building spatial index on two kinds of containers, where the time complexity is 𝑂(𝑁2 ). And the reason why we choose ShapeFrame and TextPortion is that we usually present the images in the ShapeFrame while the texts are presented in the Texportion, which include most content of a PowerPoint page. A spatial index is constructed as detailed by Algorithm 1, where ShapeRTree is constructed as a variable of sldFrm and TextPortionRTree is saved as a variable in the current ShapeFrame. Generally, we retrieve objects in sldFrm (line 1). For each ShapeFrame in sldFrm, we add it as an element of the spatial index sldFrm. ShapeRTree (lines 2-3). Then, ShapeFrame is treated as a loop object, and every TextPortion in ShapeFrame will be added to the spatial index ShapeFrame. TextPortionRTree (lines 6–9). Consequently, the spatial indexes of ShapeFrame and TextPortion are constructed. The spatial indexes are represented as rectangles, which specify the the bound of the spatial object using the elements of maxX, maxY, minX, and minY.
3. Retrieving Operations for Spatial Objects This section will present the mechanisms of optimizing the operations of mobile applications leveraging the spatial indexes constructed in the previous section. We first show the expansion of the spatial relationship of spatial objects, which should simplify the procedure of retrieving objects. Generally, the method of retrieving a rectangle depends on three types of spatial relationships, namely, contains, intersect, and nearest, where contains means that the object is surrounded
International Journal of Distributed Sensor Networks
3
Require: 𝑠𝑙𝑑𝐹𝑟𝑚: superior container of a PowerPoint page Ensure: ShapeRTree and TextPotionRTree are constructed (1) while 𝑠𝑙𝑑𝐹𝑟𝑚.𝐶𝑢𝑟𝑟𝑒𝑛𝑡 ≠ 𝑛𝑢𝑙𝑙 do (2) if 𝑠𝑙𝑑𝐹𝑟𝑚.𝐶𝑢𝑟𝑟𝑒𝑛𝑡 = 𝑆ℎ𝑎𝑝𝑒𝐹𝑟𝑎𝑚𝑒 then (3) add 𝑠𝑙𝑑𝐹𝑟𝑚.𝐶𝑢𝑟𝑟𝑒𝑛𝑡 to 𝑠𝑙𝑑𝐹𝑟𝑚.𝑆ℎ𝑎𝑝𝑒𝑅𝑇𝑟𝑒𝑒 (4) while 𝑆ℎ𝑎𝑝𝑒𝐹𝑟𝑎𝑚𝑒.𝐶𝑢𝑟𝑟𝑒𝑛𝑡 ≠ 𝑛𝑢𝑙𝑙 do (5) if 𝑆ℎ𝑎𝑝𝑒𝐹𝑟𝑎𝑚𝑒.𝐶𝑢𝑟𝑟𝑒𝑛𝑡 = 𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛 then (6) add 𝑆ℎ𝑎𝑝𝑒𝐹𝑟𝑎𝑚𝑒.𝐶𝑢𝑟𝑟𝑒𝑛𝑡 to 𝑆ℎ𝑎𝑝𝑒𝐹𝑟𝑎𝑚𝑒.𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛𝑅𝑇𝑟𝑒𝑒 (7) end if (8) 𝑆ℎ𝑎𝑝𝑒𝐹𝑟𝑎𝑚𝑒.𝐶𝑢𝑟𝑟𝑒𝑛𝑡 ← next object in 𝑆ℎ𝑎𝑝𝑒𝐹𝑟𝑎𝑚𝑒 (9) end while (10) end if (11) 𝑠𝑙𝑑𝐹𝑟𝑚.𝐶𝑢𝑟𝑟𝑒𝑛𝑡 ← next object in 𝑠𝑙𝑑𝐹𝑟𝑚 (12) end while Algorithm 1: Building spatial index on spatial objects.
Point retrieve object
Intersects
Nearest
HrzNearest
Figure 2: The expansion on the relationship of nearest.
Zone a
Zone b
Zone c
Here is the Sample of the
Zone e
Selecting letters.
Zone f
Zone g
Zone h
Figure 3: The model of a point retrieve object.
HrzAreaRightNearest
HrzRightNearest
AreaHrzRightNearest
HrzAreaLeftNearest
AreaHrzLeftNearest
VertAreaDownNearest
AreaVertDownNearest
VertDownNearest HrzLeftNearest
VertAreaUpNearest
VertUpNearest
Zone d
3.1. Operation of Locating a Cursor. Cursor location is basically locating a point in the page of PowerPoint. The model of point retrieve object is shown in Figure 3, where there are two types of zones in a simple page of a PowerPoint, which are (i) letter zones and (ii) zones around the letters. Generally, when we touch the page by fingers, we are giving the instruction of producing a cursor by the location where we have touched.
Contains
VertNearest
AreaVertUpNearest
by the same rectangle and intersect means that the spatial object overlaps with the rectangle, while nearest specifies that the bounds of the object and rectangle are close enough. We have built the expansion retrieving method on the relation of nearest as shown in Figure 2, because the relationships between intersect and contains are clear and definite. The nearest can be classified into VertNearest and HrzNearest, which return the rectangle, the 𝑋- or 𝑌-coordinates of which are nearest to the object. Furthermore, the VertNearest can be classified into (i) VertUpNearest which returns the nearest rectangle having a bigger 𝑌 and (ii) VertDownNearest which returns the nearest rectangle having a smaller 𝑌. There is a similar classification of HrzNearest, which is HrzLeftNearest and HrzRightNearest. Every subclassification can be divided into two classes, which returns the rectangle nearest in a specific area (such as AreaVertUpNearest) and returns the rectangle neatest in the limit range of 𝑋 (such as VertAreaUpNearest). Actually, a relationship can be treated as a java function packaged in the Class MRTree. The MRTree is implemented based on the open source online project Java Spatial Index (JSI), which provides the implementation of rapid and efficient basic spatial relationships, such as nearest. Then, we expand these operations to provide the functions of more coarser in granularity, such as HrzAraRightNearst. The spatial index built on the PowerPoint pages is the input as a parameter of the Java functions. Based on these spatial relations, we present in the following section how the cursor, letters, and guidelines are retrieved for supporting mobile applications.
4
International Journal of Distributed Sensor Networks
Require: 𝑃: the point where the finger locates Ensure: 𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛: TextPortion where the cursor locates (1) 𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛 ← 𝑛𝑢𝑙𝑙 (2) while 𝑆ℎ𝑎𝑝𝑒𝐹𝑟𝑎𝑚𝑒.𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛𝑅𝑇𝑟𝑒𝑒.𝐶𝑢𝑟𝑟𝑒𝑛𝑡 ≠ 𝑛𝑢𝑙𝑙 do (3) if 𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛𝑅𝑇𝑟𝑒𝑒.𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑐𝑜𝑛𝑡𝑎𝑖𝑛𝑠 𝑃 then (4) 𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛 ← 𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛𝑅𝑇𝑟𝑒𝑒.𝐶𝑢𝑟𝑟𝑒𝑛𝑡 (5) return 𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛 (6) end if (7) end while (8) if 𝑃.ℎ𝑟𝑧𝐴𝑟𝑒𝑎𝑁𝑒𝑎𝑟𝑒𝑠𝑡 ≠ 𝑛𝑢𝑙𝑙 then (9) 𝑡𝑒𝑚𝑝 ← 𝑃.ℎ𝑟𝑧𝐴𝑟𝑒𝑎𝑁𝑒𝑎𝑟𝑒𝑠𝑡 (10) if 𝑡𝑒𝑚𝑝.𝑒𝑥𝑝𝑎𝑛𝑑𝑇𝑜𝑅𝑜𝑤.𝑎𝑟𝑒𝑎𝐻𝑟𝑧𝑁𝑒𝑎𝑟𝑒𝑠𝑡 ≠ 𝑛𝑢𝑙𝑙 then (11) 𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛 ← 𝑡𝑒𝑚𝑝.𝑒𝑥𝑝𝑎𝑛𝑑𝑇𝑜𝑅𝑜𝑤.𝑎𝑟𝑒𝑎𝐻𝑟𝑧𝑁𝑒𝑎𝑟𝑒𝑠𝑡 (12) else (13) 𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛 ← 𝑡𝑒𝑚𝑝 (14) end if (15) else if 𝑃.V𝑒𝑟𝑡𝑁𝑒𝑎𝑟𝑒𝑠𝑡 ≠ 𝑛𝑢𝑙𝑙 then (16) if 𝑃.𝑦 ≤ 𝑆ℎ𝑎𝑝𝑒𝐹𝑟𝑎𝑚𝑒.𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛𝑅𝑇𝑟𝑒𝑒.𝑅𝑜𝑜𝑡. min 𝑌 then (17) 𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛 ← 𝑃.ℎ𝑟𝑧𝑁𝑒𝑎𝑟𝑒𝑠𝑡 (18) else (19) 𝑡𝑒𝑚𝑝 ← the TextPortion which has the biggest max 𝑌 − min 𝑌 (20) if 𝑡𝑒𝑚𝑝.𝑒𝑥𝑝𝑎𝑛𝑑𝑇𝑜𝑅𝑜𝑤.𝑎𝑟𝑒𝑎𝐻𝑟𝑧𝑁𝑒𝑎𝑟𝑒𝑠𝑡 ≠ 𝑛𝑢𝑙𝑙 then (21) 𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛 ← 𝑡𝑒𝑚𝑝.𝑒𝑥𝑝𝑎𝑛𝑑𝑇𝑜𝑅𝑜𝑤.𝑎𝑟𝑒𝑎𝐻𝑟𝑧𝑁𝑒𝑎𝑟𝑒𝑠𝑡 (22) else (23) 𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛 ← 𝑡𝑒𝑚𝑝 (24) end if (25) end if (26) end if (27) return 𝑇𝑒𝑥𝑡𝑃𝑜𝑟𝑡𝑖𝑜𝑛 Algorithm 2: Locating the cursor.
(i) When the finger point is located upon the letters, this means that the point retrieve object is located in the letters zone. In this case, the spatial index will (i) retrieve the rectangle which is nearest to or contained by the point retrieve object and (ii) produce the cursor after the TextPortion mapping to the rectangle. (ii) Otherwise, the point retrieve object is located in the zone around the letters, and there will be eight conditions that determine the location of the cursor as follows. (a) Zone a. The cursor should be located before the first TextPortion of the first line. (b) Zone b. The cursor should be located after the corresponding TextPortion of the first line. (c) Zone c. The cursor should be located after the last TextPortion of the first line. (d) Zone d. The cursor should be located before the first TextPortion of the line which is nearest to the point retrieve object. (e) Zone e. The cursor should be located after the last TextPortion of the line which is nearest to the point retrieve object. (f) Zone f. The cursor should be located before the first TextPortion of the last line.
(g) Zone g. The cursor should be located after the corresponding TextPortion of the last line. (h) Zone h. The cursor should be located after the last TextPortion of the last line. The procedure of locating the cursor based on the location of finger point is described by Algorithm 2. Note that the spatial index of TextPortion constructed in Section 2 improves the performance of rectangle retrieving. Firstly, TextPortion is initialized as null (line 1). The spatial index TextPortionRTree is retrieved to examine whether there is a TextPortion containing the location where the finger point locates (lines 2–7). If the point is located in a certain TextPortion, the procedure terminates and the current TextPortion is returned (line 5). Otherwise, the spatial relationship of nearest is used for determining whether TextPortion and the finger point are in the relation of horizontal (line 8) or vertical (line 15) situations and retrieving TextPortion which is nearest the finger point. Thereafter, TextPortion is expanded as a rectangle of the row and uses areaHrzNearest to find a TextPortion where the cursor should be covered (lines 8–14 and lines 15– 26). Note that this is different from nearest for the horizontal and vertical situations. When VertNearest ≠ 𝑛𝑢𝑙𝑙, we will verify whether the finger point is under all of the TextPortion and return HrzNearest when the finger point is at the bottom
International Journal of Distributed Sensor Networks (lines 16-17). The time complexity is 𝑂(𝑛), where 𝑛 is the number of spatial objects. 3.2. Operation of Selecting Letters. When the cursor is examined as locating at a letter zone, this letter zone should be identified. There are two kinds of models for the letter zone selection, namely, starting or ending control tags. Intuitively, there are a pair of tags produced by the application located at the nearest TextPortion for the letter zone to be selected, which is surrounding the rectangle of the TextPortion by the starting and ending control tags. These two tags can be dragged for covering the whole letter zone. In the following, we introduce the rules of locating the starting or ending control tag. The scenario of starting control tag is shown in Figure 4. Generally, when the starting control tag is dragged into the letter zone, the spatial index will retrieve the rectangle which is nearest to or contained by the location where this tag locates. Otherwise, this tag is dragged to one of the other eight zones, and the rules are described as follows.
5
Zone a
Zone b
Zone c
Here is the Zone d
Sample of the
Zone e
selected letters.
Zone f
Zone g
Zone h
Figure 4: Scenario for starting control tag.
Zone a
Zone b
Zone c
Here is the Zone d
sample of the
Zone e
selected letters.
(i) Zone a. The starting control tag should be located before the first TextPortion of the first line. (ii) Zone b. The starting control tag should be located before the corresponding TextPortion of the first line. (iii) Zone c. The starting control tag should be located before the first TextPortion of the second line. (iv) Zone d. The starting control tag should be located before the first TextPortion of the line which is nearest to the location point. (v) Zone e. The starting control tag should be located before the first TextPortion of the line which is the next line of the line nearest to the location point. (vi) Zone f. The starting control tag should be located before the first TextPortion of the last line. (vii) Zone g. The starting control tag should be located before the corresponding TextPortion of the last line. (viii) Zone h. The starting control tag should be located before the last TextPortion of the last line. The scenario of ending control tag is shown in Figure 5. Similarly, the ending control tag is processed in a similar fashion as that of the starting control tag, and thus we avoid the details of the handling procedure. Thereafter, the letter zone is selected leveraging the determination of starting and ending control tags, which are actually the similar procedures as the determination of the cursor as presented by Algorithm 2. When the starting and ending control tags (denoted by starTag and endTag) are determined, the letter zone is determined, which is a rectangle such that starTag is the upper-left coordinate, while endTag is the bottom-right coordinate. 3.3. Operation of Generating Guidelines. Users may often require to adjust the position of some objects in the page of the PowerPoint when making the PorwerPoint pages. During the object adjustment, the corresponding ShapeFrame should
Zone f
Zone g
Zone h
Figure 5: Scenario for ending control tag.
be moved to the target position and guidelines should be identified for locating the ShapeFrame and facilitating the ShapeFrame transferring. When ShapeFrame is moved to a place where the bound of ShapeFrame has very little distance to the guideline, the bound should be absorbed by the guideline automatically. Generally, there are three types of guideline that should be considered for ShapeFrame transferring. (i) Alignment Guideline. As shown in Figure 6, when a ShapeFrame is to be moved to a location which is to be aligned with another ShapeFrame, there should be an alignment guide for supporting this transferring. As shown by the figure, the shape of shadow is the the place where the rectangle of ShapeFrame will be moved to. The blue line on the top is the alignment guideline produced leveraging the spatial index. (ii) Equidistance Guideline. As shown in Figure 7, when the rectangle of ShapeFrame is moved to the area of shadow, the guideline should be produced leveraging the spatial index for supporting this transferring. (iii) Center Guideline. As shown in Figure 8, when the rectangle of ShapeFrame is moved to place where the center of the two rectangles is aligned, the center guide should be produced leveraging the spatial index. Beside a vertical center guideline generated and illustrated by Figure 8, there should be a horizontal center guide to be generated as well. The procedure of guideline generation is presented by Algorithm 3. Generally, the bounds of the rectangles for
6
International Journal of Distributed Sensor Networks Sample of alignment guideline
Figure 6: Sample of the alignment guideline.
Sample of equidistance guideline
Figure 7: Sample of the equal distance guideline.
Sample of center guideline
Figure 8: Sample of the center guideline.
the ShapeFrame of original and target are compared leveraging the spatial index constructed in Section 2. If the bounds of original and target ShapeFrame are neighboring, the bounds of target ShapeFrame in the spatial index are used as the guideline and are being added into alignList. Specifically, given a mR, it is examined to check whether it is contained by iR (lines 1–5), and the relation between the original and target ShapeFrame is verified (lines 6–10). At last, mR is examined to check whether it is close to bottom or top of iR (lines 11– 15). The guideline saved in alignList is returned finally (line 16). The THRESHOLD is a parameter set by the user, which specifies the size of blank between the rectangles.
4. Implementation and Evaluation Figure 9 shows the class hierarchy for the implementation, which is programmed in Java. Generally, the Class RTree abstracts the TextPortion and the ShapeFrame into the Class rectangle, which has five parameters including minX, maxX, minY, maxY, and owner. Based on the Class Rectangle, a spatial object has been described as a rectangle with absolute
coordinate value. This strategy changes the way of displaying the object by describing the object with the coordinates rather than the parameters such as width and height in the Class Textportion. Thus, spatial objects retrieving is simplified somehow, where the calculation based on the coordinates of spatial objects is unnecessary. The experiments have been conducted on the helpdesk (Lenovo 3000), the pad (ONDA v972), and the smart phone (Sony LT29i), where the operation system of Sony LT2i and ONDA v972 is the Android system. The experiment is conducted as follows. Some English words are generated in a PowerPoint page, and these words are classified into 9 zones as shown in Figure 10. For each operation, we conduct it in each zone 10 times, with or without applying our technique. The accuracy of the experiments for these operations is computed as follows. The comparison of locating the cursor is shown in Table 2. The accuracy for the case of noused spatial index is 31/90 ≈ 0.344, while that for the case of using our technique is 83/90 ≈ 0.922, for the experiments in all zones. Table 2 shows that the cursor has not been successfully located in the following zones: Zones a, d, and f, for the case of noused spatial index. Our investigation shows that traditional indexing methods search the nearest position when locating the cursor. In these three zones, the rules specified at Section 3.1 cannot be satisfied any longer. When our spatial index has been applied, the application will retrieve the nearest TextPortion and locate the cursor behind the TextPortion. Similarly, traditional indexing methods can work well in Zones c, e, and h. As to Zones b, I, and g, an average accuracy rate is returned for the case of noused spatial index, since there could be some cases when we point at a blank space which can satisfy the principle coincidentally. When our spatial index is applied, the cursor could be located behind the TextPortion where we point at, and there may have some wrong rows in some situations. Tables 3 and 4 show the accuracy for locating the starting and ending control tags. The accuracy for the case of noused spatial index is 45/90 = 0.5 for locating the starting control tag and is 42/90 ≈ 0.467 for locating the ending control tag, while that for the case of using our technique is 82/90 ≈ 0.911 for locating the starting control tag and is 84/90 ≈ 0.933 for locating the ending control tag, according to the experiments in all zones. We can see that the accuracy for the case of noused spatial index is not very low. Actually, when traditional indexing method is applied for generating the starting control tag, the principle can be satisfied somehow. For instance, when pointing at Zones a, d, and f, the traditional index gets the nearest position that could be located. However, traditional indexing methods cannot work well in Zones a, d, and f, since the position to be located is before the first TextPortion in the next row of the corresponding position. The similar situation exists for the case of ending control tag.
5. Related Work With the rapid development and wide applicability of cloud computing and the mobile internet technologies, there is a trend that people can build vehicles, devices, goods, and
International Journal of Distributed Sensor Networks
7
Require: 𝑚𝑅: the rectangle of 𝑆ℎ𝑎𝑝𝑒𝐹𝑟𝑎𝑚𝑒 moved by user. 𝑖𝑅: the rectangles of 𝑆ℎ𝑎𝑝𝑒𝐹𝑟𝑎𝑚𝑒 which is saved in the spatial index. Ensure: 𝑎𝑙𝑖𝑔𝑛𝐿𝑖𝑠𝑡: the set of guide lines to be generated. (1) if 𝑚𝑅. min 𝑌 − 𝑖𝑅. min 𝑌 < 𝑇𝐻𝑅𝐸𝑆𝐻𝑂𝐿𝐷 then (2) add 𝑦 = 𝑖𝑅. min 𝑌 into 𝑎𝑙𝑖𝑔𝑛𝐿𝑖𝑠𝑡 (3) if 𝑚𝑅. max 𝑌 − 𝑖𝑅. max 𝑌 < 𝑇𝐻𝑅𝐸𝑆𝐻𝑂𝐿𝐷 then (4) add 𝑦 = 𝑖𝑅. max 𝑌 into 𝑎𝑙𝑖𝑔𝑛𝐿𝑖𝑠𝑡 (5) end if (6) else if 𝑚𝑅. min 𝑌 − 𝑖𝑅. max 𝑌 < 𝑇𝐻𝑅𝐸𝑆𝐻𝑂𝐿𝐷 then (7) add 𝑦 = 𝑖𝑅. max 𝑌 into 𝑎𝑙𝑖𝑔𝑛𝐿𝑖𝑠𝑡 (8) if 𝑚𝑅. max 𝑌 − 𝑖𝑅. min 𝑌 < 𝑇𝐻𝑅𝐸𝑆𝐻𝑂𝐿𝐷 then (9) add 𝑦 = 𝑖𝑅. min 𝑌 into 𝑎𝑙𝑖𝑔𝑛𝐿𝑖𝑠𝑡 (10) end if (11) else if 𝑚𝑅. max 𝑌 − 𝑖𝑅. min 𝑌 < 𝑇𝐻𝑅𝐸𝑆𝐻𝑂𝐿𝐷 then (12) add 𝑦 = 𝑖𝑅. min 𝑌 into 𝑎𝑙𝑖𝑔𝑛𝐿𝑖𝑠𝑡 (13) else if 𝑚𝑅. max 𝑌 − 𝑖𝑅. max 𝑌 < 𝑇𝐻𝑅𝐸𝑆𝐻𝑂𝐿𝐷 then (14) add 𝑦 = 𝑖𝑅. max 𝑌 into 𝑎𝑙𝑖𝑔𝑛𝐿𝑖𝑠𝑡 (15) end if (16) return 𝑎𝑙𝑖𝑔𝑛𝐿𝑖𝑠𝑡 Algorithm 3: Generating the guideline.
Node nodeld: int entriesMinX: float[] entriesMinY: float[] entriesMaxX: float[] entriesMaxY: float[] ids: int[] mbrMinX: float mbrMinY: float mbrMaxX: float mbrMaxY: float level: int entryCount: int
getld() getEntryCount() getLevel() addEntry() deleteEntry() isLeaf() recalculateMBR() opname()
ListDecorator m si: RTree = null AddToListProcedure: TIntProcedure
Rectangle type: int owner: Object minX: float minY: float maxX: float maxY: float
RTree maxNodeEntries: int minNodeEntries: int nodeMap:TIntObjectHashMap parents: TIntStack parentEntry: TIntStack treeHeight: int = 1 rootNodeld: int = 0 size: int = 0
Segment start: PointF end: pointF
TextPortion left: float top: float width: float height: float
ShapeFrm left: float top: float width: float height: float
Figure 9: Class hierarchy for the implementation of indexing spatial objects in mobile PowerPoint pages.
everyday objects to become a part of the Internet of things [18–20]. Mobile devices are to be used more widely and ubiquitously, which leads the mobile office application to become a hot research and engineering topic. In the following, we review and discuss the related techniques in this domain. With the cloud going into our life, there are many researchers trying to deploy applications on the cloud platform to settle the problem of low capabilities of mobile devices. Reference [21] built a mobile OA system based on 3G
network, WAP, and J2EE. It was used to fill up the deficiency of traditional OA system and to create an application environment for extending the business to user’s mobile phones. Thus, it refrains from the disadvantages that the traditional OA system can only be used in offices or other places connected to the Internet, which has limited the use of the OA system largely. This is actually a hint for us to expand our mobile office application to make use of the mobile network, such as using the cloud to save the documents of mobile
8
International Journal of Distributed Sensor Networks
Zone a
Zone b
Zone c
Zone
Line one Zone d
Zone i
Zone e
Line two
Zone f
Zone g
Zone h
Figure 10: Classification of zones.
Table 2: Comparison of the accuracy for locating the cursor. Zone Zone a Zone b Zone c Zone d Zone e Zone f Zone g Zone h Zone i Sum
Nonused spatial index Frequency Correct 10 0 10 3 10 6 10 0 10 4 10 0 10 3 10 10 10 5 90 31
Used spatial index Frequency Correct 10 10 10 8 10 10 10 9 10 8 10 10 10 9 10 10 10 9 90 83
Table 3: Comparison of the accuracy for locating starting control tag. Zone Zone a Zone b Zone c Zone d Zone e Zone f Zone g Zone h Zone i Sum
Nonused spatial index Frequency Correct 10 10 10 7 10 0 10 8 10 0 10 6 10 5 10 0 10 9 90 45
Table 4: Comparison of the accuracy for locating ending control tag.
Used spatial index Frequency Correct 10 10 10 8 10 9 10 9 10 8 10 10 10 9 10 10 10 9 90 82
applications. Reference [22] presents the motivation and preliminary design for a framework to create ad hoc cloud computing providers. By this, they create a cloud among the mobile in the vicinity devices to facilitate the application on these devices to execute jobs. They also show their perspective that the usage of mobility traces will be considered to create table communities and not only places. This work reminds us that we could deploy our office application on the platform
Zone a Zone b Zone c Zone d Zone e Zone f Zone g Zone h Zone i Sum
Nonused spatial index Frequency Correct 10 0 10 8 10 5 10 0 10 6 10 0 10 4 10 10 10 9 90 42
Used spatial index Frequency Correct 10 10 10 8 10 10 10 9 10 9 10 10 10 9 10 10 10 9 90 84
to reduce the computing pressure of single device. Reference [23] presents an algorithm of location-based services (LBS) on the mobile devices to save the battery of these devices. By using the promoted quadtrees, the devices could save the number of requests to the LBS server when detecting the surrounding area of interest. Thus, the battery of the devices can be extended largely. Generally, they have the similar idea with us that using the spacial index to promote the capabilities of mobile devices. It happens that there is a similar case, [24] making an exploration on whether the cloud can save the energy of mobile devices. This work explores the impact of cloud-based applications on the battery life of mobile devices. Specifically, it tries to answer the following question. For some user defined application performance criteria, when is the usage of cloud-based applications more preferable in terms of energy consumption than non-cloud based applications that are executed locally on users device? Reference [25] aims to use the mobile cloud computing to help bridging the gap between the capabilities of mobile devices and the need of rich applications. Cloud computing can provide mobile applications with the capabilities of cloud servers and storage together with the benefits of mobile devices and mobile connectivity, possibly enabling a new generation of truly ubiquitous multimedia applications on mobile devices: Cloud Mobile Media (CMM) applications. The office application can be classified into CMM. So we can take the cloud computing into consideration to make a promotion from the performance perspective. In general, the cloud is used by people to promote the customer experience on extending the memory or extending the compute capacity, and it also can be used to save the energy of the devices. These instances inspire us to an extent, and we should exploit the potentialities of cloud to optimize the smart devices. To response, the requirement of mobile office [26] has changed the traditional rich client to a browser-based thin client. So all the stuff operated on the client of the mobile devices can be deployed and executed at the server. Reference [27] argues that the mobile application has many advantages in different aspects. Thus, the browser-based thin client cannot replace the mobile application completely. Reference [13]
International Journal of Distributed Sensor Networks has proposed a similar target to optimize the application with us. This work aims to implement web services for mobile devices limited by the physically constrained of mobile devices, such as, low processor speed, limited memory, limited memory, and slow wireless connection. The authors have evaluated the RESTful web service for mobile devices with respect to conventional SOAP web services. Experiments show that RESTful web services outperform conventional SOAP web services. Reference [28] indicates that a cloud mobile office system can satisfy the business enterprise personnel requirement, which is to access enterprise information resources anytime and anywhere and using any devices. The design of cloud mobile office system framework does not affect the original office system; it is very good for the stability of the primary system. It is a total solution for the enterprise office automation in the mobile Internet environment. Our research can be a promotion on the application of the mobile devices. Reference [29] presents some directions for mobile application software engineering. It can be a guide when developing the mobile office application. In general, these works indicate that there will be great changes in the programming work of the application on smart devices. It can be a thin-client or can be a node of a web service. From the discussion above, we can see that the efficiency of the applications running on mobile devices is still a challenge to be addressed. Consequently, we have promoted the accuracy of some operations for the mobile PowerPoint software by using the spatial indexing mechanism. As [30] mentioned, an extensive research has been carried out on the multidimensional indexing, and we can treat spatial index as a kind of special multidimensional indexing mechanism for enabling efficient range queries. They have made the comparison between several kinds of spatial indexing methods to find the one that performs the best in high multidimensional indexing queries. It is the typical application of spatial index on the nonspatial field and happens when there is a similar case. Reference [31] proposes an approach through using the spatial index to handle the multidimensional range query. Different from [30], this work focuses on conducting the research on the GPU. Reference [32] has inspired us with applying the spatial index on the storage of the nonspatial data with coordinates, where R∗ -tree can be used in the image storage process. Reference [33] compares some kinds of spatial index and argues that R∗ -tree, which is a revision of the R-tree, could perform excellent being performance within a DBMS. As [34] presented, the authors have proposed an optimization algorithm for creating R-tree indexing structure based on spatial clustering, and this indexing mechanism can be used as a dynamic indexing structure for spatial databases. These works show us that the spatial index can be used in the no-spatial situations. As the spatial indexes are highly efficient, they can be used in multidimensional applications such as image indexing and PowerPoint page. These lead us to explore a wide range of applications of spatial index. To summarize, the mobile office applications need to be optimized to face the imperfection of current smart devices and satisfy the user friendliness of the application. We have used the spatial index to optimize the experience of some of the operations of mobile office.
9
6. Conclusion Unlike the traditional office software, due to the limited storage and computational capability of mobile devices, how to support the page editing in a fast and energy-efficient manner is fundamental. Generally, an efficient spatial indexing mechanism can help mobile office software quickly locate spatial objects. Therefore, it promotes the speed of operations on the spatial object and satisfies the need of quick response of the user. In this paper, we have proposed an approach to address this challenge. Specifically, an MR∗ -tree based indexing mechanism has been developed for facilitating the fast and energy-efficient retrieval of spatial objects in mobile PowerPoint pages. Based on that, techniques are developed to support the operations when editing mobile PowerPoint pages. We have implemented the prototype which has been deployed on the computer, the pad, and the smart phone. The experimental evaluation shows that the considerable improvement on the accuracy for the operations is to be performed on spatial objects in the mobile PowerPoint pages.
Conflict of Interests The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgments This work was supported partially by the National Natural Science Foundation of China (Grants nos. 61379126 and 61401107), by the Scientific Research Foundation for Returned Scholars, Ministry of Education of China, by the Guangdong University of Petrochemical Technology’s Internal Project (Grant no. 2012RC0106), by the 2013 Top Level Talents Project in Sailing Plan of Guangdong Province, and by the Fundamental Research Funds for the Central Universities (China University of Geosciences at Beijing).
References [1] Y. Sasaki, W.-C. Lee, T. Hara, and S. Nishio, “Sky R-tree: an index structure for distance-based top-k query,” in Database Systems for Advanced Applications, vol. 8421 of Lecture Notes in Computer Science, pp. 220–235, Springer, 2014. [2] P. Alto, “Smart phones overtake client pcs in 2011,” C-analys, 2012. [3] S. Abolfazli, Z. Sanaei, E. Ahmed, A. Gani, and R. Buyya, “Cloud-based augmentation for mobile devices: motivation, taxonomies, and open challenges,” IEEE Communications Surveys and Tutorials, vol. 16, no. 1, pp. 337–368, 2014. [4] S. Abolfazli, Z. Sanaei, A. Gani, F. Xia, and L. T. Yang, “Rich mobile applications: genesis, taxonomy, and open issues,” Journal of Network and Computer Applications, vol. 40, no. 1, pp. 345–362, 2014. [5] Z. Sanaei, S. Abolfazli, A. Gani, and R. Buyya, “Heterogeneity in mobile cloud computing: taxonomy and open challenges,” IEEE Communications Surveys and Tutorials, vol. 16, no. 1, pp. 369– 392, 2014.
10 [6] M. Whaiduzzaman, M. Sookhak, A. Gani, and R. Buyya, “A survey on vehicular cloud computing,” Journal of Network and Computer Applications, vol. 40, no. 1, pp. 325–344, 2014. [7] S. Allums, Designing Mobile Payment Experiences: Principles and Best Practices for Mobile Commerce, O’Reilly Media, 2014. [8] E. Miluzzo, N. D. Lane, K. Fodor et al., “Sensing meets mobile social networks: the design, implementation and evaluation of the CenceMe application,” in Proceedings of the 6th ACM Conference on Embedded Networked Sensor Systems (SenSys ’08), pp. 337–350, November 2008. [9] L. F. Motiwalla, “Mobile learning: a framework and evaluation,” Computers & Education, vol. 49, no. 3, pp. 581–596, 2007. [10] M. Shiraz, A. Gani, R. H. Khokhar, and R. Buyya, “A review on distributed application processing frameworks in smart mobile devices for mobile cloud computing,” IEEE Communications Surveys & Tutorials, vol. 15, no. 3, pp. 1294–1313, 2013. [11] R. Urgaonkar and M. J. Neely, “Network capacity region and minimum energy function for a delay-tolerant mobile ad hoc network,” IEEE/ACM Transactions on Networking, vol. 19, no. 4, pp. 1137–1150, 2011. [12] T. Ernvall, S. El Rouayheb, C. Hollanti, and H. V. Poor, “Capacity and security of heterogeneous distributed storage systems,” IEEE Journal on Selected Areas in Communications, vol. 31, no. 12, pp. 2701–2709, 2013. [13] H. Hamad, M. Saad, and R. Abed, “Performance evaluation of restful web services for mobile devices,” International Arab Journal of e-Technology, vol. 1, no. 3, pp. 72–78, 2010. [14] A. Thiagarajan, L. Ravindranath, H. Balakrishnan et al., “Accurate, low-energy trajectory mapping for mobile devices,” in Proceedings of the 8th USENIX Symposium on Networked Systems Design and Implementation (NSDI ’11), Boston, Mass, USA, 2011. [15] T. Yan, D. Chu, D. Ganesan, A. Kansal, and J. Liu, “Fast app launching for mobile devices using predictive user context,” in Proceedings of the 10th International Conference on Mobile Systems, Applications, and Services, pp. 113–126, 2012. [16] N. Beckmann, H.-P. Kriegel, R. Schneider, and B. Seeger, “The R∗ -tree: an efficient and robust access method for points and rectangles,” ACM SIGMOD Record, vol. 19, no. 2, pp. 322–331, 1990. [17] Y. Peng, C. Wu, S. Peng, J. Yue, and D. Yang, “Achieving interoperability between powerpoint and similar presentation tools,” in Proceedings of the IEEE International Symposium on Knowledge Acquisition and Modeling Workshop (KAM ’08), pp. 750–753, Wuhan, China, December 2008. [18] G. Kortuem, F. Kawsar, V. Sundramoorthy, and D. Fitton, “Smart objects as building blocks for the internet of things,” IEEE Internet Computing, vol. 14, no. 1, pp. 44–51, 2010. [19] M. Kranz, P. Holleis, and A. Schmidt, “Embedded interaction: interacting with the internet of things,” IEEE Internet Computing, vol. 14, no. 2, pp. 46–53, 2010. [20] V. Suresh, N. Bhaskar, and M. Renukadevi, “Tracking and controlling of things with the internet,” Programmable Device Circuits and Systems, vol. 3, no. 4, pp. 193–197, 2011. [21] W. Wanping, “Research and implementation of mobile OA system based on 3G,” in Proceedings of the International Forum on Computer Science-Technology and Applications (IFCSTA ’09), vol. 2, pp. 136–139, Chongqing, China, 2009. [22] G. Huerta-Canepa and D. Lee, “A virtual cloud computing provider for mobile devices,” in Proceedings of the 1st ACM Workshop on Mobile Cloud Computing & Services: Social Networks and Beyond, p. 6, 2010.
International Journal of Distributed Sensor Networks [23] L. Loyola, F. Wong, D. Pereira, and H. Sanson, “Extending battery lifetime of mobile devices with geofence capabilities on dynamic-speed urban environments,” in Proceedings of the 2nd ACM SIGSPATIAL International Workshop on Mobile Geographic Information Systems (MobiGIS ’13), pp. 51–58, Orlando, Fla, USA, November 2013. [24] V. Namboodiri and T. Ghose, “To cloud or not to cloud: a mobile device perspective on energy consumption of applications,” in Proceedings of the IEEE International Symposium World of Wireless, Mobile and Multimedia Networks (WoWMoM ’12), pp. 1–9, 2012. [25] S. Wang and S. Dey, “Adaptive mobile cloud computing to enable rich mobile multimedia applications,” IEEE Transactions on Multimedia, vol. 15, no. 4, pp. 870–883, 2013. [26] J. Tang, Y.-M. Shi, and N. Li, “Inspirations for office document formats from web office,” in Proceedings of the International Conference on Cyberspace Technology (CCT ’13), pp. 242–246, November 2013. [27] A. I. Wasserman, “Software engineering issues for mobile application development,” in Proceedings of the FSE/SD-P Workshop on Future of Software Engineering Research, pp. 397–400, 2010. [28] F. Wu, Z. M. Wang, G. Yao, and Z. M. Miao, “The research on cloud mobile office system development for enterprise application,” in Applied Mechanics and Materials, vol. 596, pp. 123–126, Trans Tech Publications, 2014. [29] J. Dehlinger and J. Dixon, “Mobile application software engineering: challenges and research directions,” in Proceedings of the Workshop on Mobile Software Engineering, 2011. [30] B. Nam and A. Sussman, “A comparative study of spatial indexing techniques for multidimensional scientific datasets,” in Proceedings of the 16th International Conference on Scientific and Statistical Database Management, pp. 171–180, 2014. [31] J. Kim, S.-G. Kim, and B. Nam, “Parallel multi-dimensional range query processing with R-trees on GPU,” Journal of Parallel and Distributed Computing, vol. 73, no. 8, pp. 1195–1207, 2013. [32] M. M. Shah and P. S. Patwal, “Multi-dimensional image indexing with R-tree,” International Journal of Innovations & Advancement in Computer Science, vol. 3, no. 1, pp. 38–42, 2014. [33] N. Beckmann and B. Seeger, “A revised r∗ -tree in comparison with related index structures,” in Proceedings of the ACM SIGMOD International Conference on Management of Data, pp. 799–812, 2009. [34] W. Jing-Bin and P. Zhi-Xing, “An optimization algorithm for spatial index structure based on spatial clustering,” in Proceedings of the International Conference on Business Computing and Global Informatization (BC-GIN ’11), pp. 589–592, 2011.
International Journal of
Rotating Machinery
Engineering Journal of
Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014
The Scientific World Journal Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014
International Journal of
Distributed Sensor Networks
Journal of
Sensors Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014
Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014
Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014
Journal of
Control Science and Engineering
Advances in
Civil Engineering Hindawi Publishing Corporation http://www.hindawi.com
Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014
Volume 2014
Submit your manuscripts at http://www.hindawi.com Journal of
Journal of
Electrical and Computer Engineering
Robotics Hindawi Publishing Corporation http://www.hindawi.com
Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014
Volume 2014
VLSI Design Advances in OptoElectronics
International Journal of
Navigation and Observation Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014
Hindawi Publishing Corporation http://www.hindawi.com
Hindawi Publishing Corporation http://www.hindawi.com
Chemical Engineering Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014
Volume 2014
Active and Passive Electronic Components
Antennas and Propagation Hindawi Publishing Corporation http://www.hindawi.com
Aerospace Engineering
Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014
Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014
Volume 2014
International Journal of
International Journal of
International Journal of
Modelling & Simulation in Engineering
Volume 2014
Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014
Shock and Vibration Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014
Advances in
Acoustics and Vibration Hindawi Publishing Corporation http://www.hindawi.com
Volume 2014