1. Field of the Invention
The present invention relates to a technology for enhancing usability expected when, for example, a screen transition is made between a plurality of documents by following a link on a Web browser.
2. Description of the Related Art
In a case where a Web site having one article formed of a plurality of pages is viewed on a Web browser, a reader follows a link (hyperlink) to a related page provided within a page, to thereby cause a transition of the displayed page, and views the subsequent part of the article. In that case, when a display has a small size as in a mobile terminal, visibility of content of the page may be improved by appropriately enlarging a portion of the article in the page by a multi-touch operation or the like.
Japanese Patent Application Laid-open No. 2002-183207 discloses a technology in which, when an instruction to advance the page to the next page is issued while book data is displayed with a specified range enlarged on the mobile terminal, article data placed in the same position of the next page is enlarged and displayed. This reduces time and labor for an enlargement operation performed by a user.
However, the technology disclosed in Japanese Patent Application Laid-open No. 2002-183207 is targeted at one piece of book data. Therefore, when a large number of links to pages other than the subsequent part of the article exist as in a Web site, for example, the following problem occurs.
That is, there is a problem in that, when a transition is made to the page irrelevant to the article after the article is viewed by enlarging the page, an area containing the article in the previous page is enlarged and displayed even though it is not necessary to enlarge and display the page in the first place.
An embodiment of the present invention provides an information processing device for solving the above-mentioned problem. The information processing device includes: a reception unit configured to receive an instruction to cause a display subject being displayed on a display screen to transition from a first document to a second document different from the first document; a relation determination unit configured to determine whether or not the second document is a document related to the first document based on information included in the first document; and a display control unit configured to display the second document on the display screen with a display attribute applied to the first document on the display screen in a case where the reception unit receives the instruction for the transition to the second document determined to be related to the first document by the relation determination unit.
Further features of the present invention will become apparent from the following description of exemplary embodiments (with reference to the attached drawings).
Now, embodiments of the present invention are described with reference to the accompanying drawings.
In a first embodiment of the present invention, a description is made of an example of a portable information processing device (computer) for displaying a Web site having one article formed of a plurality of documents. In such a device, a limitation is often imposed on a display amount on a display screen. The following device according to the first embodiment is configured to be able to change a display size and a display position of the document displayed on the display screen. Note that, the “document” includes words, phrases, numerals, symbols, sentences, images, and other such objects. A so-called page is also included in the “document”.
The program memory may be realized by loading the above-mentioned computer program or the like onto the RAM 103 from an external storage device 109 or the like. An HDD 104 is a hard disk drive for storing various kinds of data and the computer program. In this embodiment, the HDD 104 is configured to store image data and text data. As a device providing the same function, the external storage device 109 connected through an input/output interface (hereinafter “interface” is abbreviated as “I/F”) 107 may be used.
Here, the external storage device 109 can be realized by, for example, a medium (recording medium) and an external storage drive for realizing access to the medium. As such a medium, there is known, for example, a flexible disk (FD), a CD-ROM, a DVD, a USB memory, an MO, or a flash memory. Further, the external storage device 109 may be a server device or the like connected through a network. The information necessary in this embodiment is retained in the RAM 103, the HDD 104, and the external storage device 109.
An input I/F 105 acquires a signal input through a touch panel 111. With this configuration, the input I/F 105 recognizes a touch on the information processing device 100 and notifies a system of the signal. An output I/F 106 outputs an execution result of various kinds of processing described later to an output device including a display 108.
In this embodiment, the touch panel 111 employs a capacitive system, and a set of coordinates of one point within a touch plane between a user and a panel surface is identified as a touch point. However, a system employed by the touch panel 111 is not limited to the capacitive system. Further, this embodiment is described on the assumption that a touch panel display obtained by integrating the touch panel 111 and the display 108 is used. A Web browser is displayed on the touch panel display.
A relation determination section 115 is formed of the CPU and the like, and determines whether or not the document of the link whose designation has been received by the reception section 112 relates to the document being displayed on the display 108 based on information on the link. In this embodiment, the link is the URL within the document (Web page described in HTML), and hence the relation determination section 115 performs the determination based on a character string included in the URL or the object name with which the link is associated. Note that, the “HTML” is an abbreviation of “hyper text markup language”.
An inheritance section 116 is formed of the CPU and the like, and causes the document after the transition to inherit a display attribute applied to the document before the transition when the relation determination section 115 determines that the document of the link designated by the reception section 112 relates to the document displayed on the display 108. In this embodiment, the inheritance section 116 records the display attribute applied to a first document, and notifies a document transition section 113 that the document after the transition is to inherit the display attribute before the transition. Here, “display attribute” represents, for example, a magnification applied when the document is displayed on the display 108, or a movement amount in a predetermined direction. In this embodiment, the related documents are assumed to have layouts similar to each other. Therefore, the inheriting of the display attribute in the transition to the related document eliminates the need to repeatedly set the display attribute for the document having the same layout.
The document transition section 113 is formed of the CPU and the like, and reads the document of the link designated by the reception section 112, to cause the display subject to transition to the document of the link. The “transition” represents, for example, interpreting an HTML code of the Web page existing in the location indicated by the URL of the designated link, a cascading style sheets (CSS) code therefor, a “JavaScript (trademark)” code therefor, or other such code, and extracting the interpreted information onto the Web browser. Then, the document transition section 113 notifies a display control section 114 of information necessary to draw the display screen after the transition and, when there is information on the display attribute notified of by the inheritance section 116, of the information.
The display control section 114 is formed of the CPU and the like, and generates a display image to be displayed on the display 108 based on the information acquired from the document transition section 113, to output the display image. Accordingly, the display subject within the browser application displayed in an entirety or a part of the display screen of the display 108 is caused to transition to the document of the designated link.
An operation of the information processing device 100 having the above-mentioned configuration is described with reference to
In this embodiment, when the Web page is displayed as the document in the browser application, the processing of the flowchart illustrated in
When the user performs a tap operation for the link on the touch panel 111, the information processing device 100 is notified by the input I/F 105 of the event indicating that the link to the second document has been designated by the user. The reception section 112 determines, based on presence/absence of the notification, whether or not the link to the second document has been designated by the user (S302). When the above-mentioned notification is absent, that is, when the link is not designated, the reception section 112 waits until the link is designated (S302: NO). When the link is designated, the relation determination section 115 determines whether or not the link is recorded as the related document in S301 (S303).
When the designated link is recorded as the related document (S303: YES), processing for recording the display attribute is performed (S304). In other words, the inheritance section 116 records the display attribute to be inherited among the display attributes applied to the first document. The processing executed here is described later in detail.
In S303, when it is determined that the designated link is not recorded as the related document (S303: NO), the document transition section 113 analyzes the document of the link designated in S302, in other words, the second document, extracts information thereon onto the Web browser, and causes the display subject to transition to the second document (S305). The display control section 114, which has acquired information relating to the drawing from the extracted information, generates the display image to be displayed on the display 108, and outputs the display image.
After that, in the same manner as in S303, the relation determination section 115 determines whether or not the link designated in S302 is recorded as the related document in S301 (S306). When the link is recorded, the inheritance section 116 notifies the document transition section 113 that the display attribute recorded in S304 is inherited by the second document. The document transition section 113 transmits the information on the display attribute notified of to the display control section 114, and causes the display control section 114 to output the display image to be displayed by setting the display attribute that has been notified of as the display attribute of the second document within the Web browser (S306: YES). The processing executed here is described later in detail. When the designated link is not recorded as the related document, the processing is brought to an end (S306: NO).
Details of the processing of S301 are described with reference to
The relation determination section 115 determines whether or not acquisition of the link has failed in S308 (S309). The “acquisition of the link has failed” represents that there is no link left to be acquired in the HTML code of the current document. In this case, the processing is brought to an end (S309: YES). When the link is acquired, the relation determination section 115 determines whether or not a character (hereinafter referred to as “related character”) indicating that the document relates to the first document is attached to the link acquired in S308 (S310).
The related characters represent, for example, the character “NEXT” indicating the subsequent part of the first document and the character “PREV” indicating the document before the first document. Alternatively, the related characters may be, for example, “CONTINUE” and “BACK”. Further, the related character does not need to be limited to English, and another language may be used.
Specifically, “what is attached to the link” represents the value of the attribute within the anchor element for the link, the value of the attribute within a child element of the anchor element for the link, the value of the attribute within a parent element of the anchor element for the link, and the content of the anchor element for the link.
When the link acquired in S308 includes such a related character (S310: YES), the relation determination section 115 records the link as the related document for the first document (S311). When there is no related character in S310 (S310: NO), the procedure returns to S308.
Further, in the same manner, the movement amount in the X-axis direction of the first document recorded in S313 is applied to the second document to which the transition is made in S305 (S315). For example, when the value “X2” is recorded with the top-left coordinates of the first document set to (X0, Y0), the second document is displayed in the coordinates (X2+X0, Y0). Note that, the example is taken here in which, when the link to the second document related to the first document is included, the display image is generated and output by the display control section 114 in the respective processing steps of S305, S314, and S315. By thus performing redrawing each time the information is obtained, it is possible to present a quick response to the user's operation.
However, this embodiment is not limited thereto, and a final display image may be output only after the information on all the inherited display attributes has been obtained. In this case, it is possible to reduce frustration felt by the user when the redrawing is often repeated on a display.
Next, a description is made of an example of the Web browser displayed by the information processing device 100.
The “PREV” button 505 is the link to the document immediately before a number assigned to the current article. The document 501 exemplified in
Links 510 to 514 represent links to the documents irrelevant to the current article. Top-left coordinates 515 of the document 501 are (0, 0).
In the processing for finding the link to the related document, the HTML code of the document 501 is parsed to acquire one link.
When S308 is executed for the first time in
Subsequently in S309, it is determined whether or not the acquisition of the link has failed in S308. In the example of
In relation to
In S304, the processing for recording the display attribute of the first document is executed. In other words, as illustrated in
Returning to
Accordingly, the user is allowed to read the subsequent part of the article only by scrolling down without having to explicitly perform a touch operation to cause the enlargement of the document or the movement in the X-axis direction thereof.
As described above, in the first embodiment, it is determined whether or not the first document relates to the second document of a transition destination. Then, the display attribute of the first document is inherited only when the transition is made to the second document determined to be related, and otherwise, the display attribute of the first document is not inherited. Accordingly, it is possible to prevent usability in viewing the document from deteriorating in a case where the display attribute of the first document should not be inherited.
Note that, in this embodiment, the processing for finding the link to the related document is performed in S301 when the transition is made to a new document, but may be performed after the link to the second document is designated.
Further, in this embodiment, the recorded display attribute of the first document is applied in S307 after the drawing is performed when the transition is made to the second document of the designated link in S305, but the recorded display attribute of the first document may be applied before the drawing of the second document of the transition destination is performed.
Further, in this embodiment, the description is made by assuming both the magnification of the document and the movement amount in the X-axis direction thereof as the display attributes to be inherited, but at least one thereof may suffice as the display attribute.
Further, in this embodiment, only the movement amount in the X-axis direction is recorded as the movement amount of the first document, but the movement amount in the Y-axis direction, which is obtained when the user explicitly performs the multi-touch operation or the double-tap operation to cause the enlargement, may be recorded and applied to the document of the transition destination. With this configuration, the top-left coordinates 517 of the Web browser illustrated in
Further, in the specific example of this embodiment, the operation performed when the transition is made to the document related to the article is described, but it should be understood that the operation performed when the transition is made to the document irrelevant to the article is to inhibit the magnification or the movement amount in the X-axis direction from being recorded or applied.
Further, in this embodiment, the description is made by taking the case where the input I/F 105 is the touch panel 111, but a mouse or other such pointing device may be applied. For example, in the case of the mouse, the enlargement illustrated in
Further, in this embodiment, the character recorded in advance is used as the related character, but the related character can be additionally registered later.
In the first embodiment, a method of determining whether or not the related character exists in, before, or after the link is employed as the processing for finding the link to the related document. However, with such a method, in the case of the link to the second document related to the article without the related character, such as the case of the buttons 506 to 508 illustrated in
Therefore, in a second embodiment of the present invention, a description is made of an example of a case where a difference between the URL of the first document and the URL of the second document linked thereto is used in processing for finding a link to a related document.
A functional configuration of an information processing device according to the second embodiment is the same as the information processing device 100 according to the first embodiment illustrated in
In S401, the relation determination section 115 acquires the difference between the URL of the current document and the URL of the document of the link acquired in S308. In that case, numerals are handled in groups. This means that, for example, in a case of acquiring the difference between the URLs “abc10.html” and “abc1.html”, only the numeral parts “10” and “1” are acquired as the difference.
When a comparison is performed character by character from the head instead of handling the numeral in groups, “0.html” is acquired as the difference, but this method is not employed here.
In S402, the relation determination section 115 determines whether or not the difference between the URLs acquired in S401 is only the numeral or only a request character string including a query indicating a document. The “query indicating the document” is, specifically, “?page=”. When the difference between the URLs is only the numeral or only the request character string including the query indicating the document, the procedure advances to S311. When the difference between the URLs includes a character other than those, the procedure returns to S308.
The details of characteristic processing according to the second embodiment are described in comparison with the first embodiment. The display example is described with reference to
In
The URL of the document 501 of
In this manner, also in the second embodiment, it is determined whether or not the first document relates to the second document of the transition destination, and when the transition is made to the second document determined to be related, the display attribute of the first document is inherited. Accordingly, it is possible to produce the same effects as in the case of the first embodiment.
Note that, in the second embodiment, the description is made of the example in which the case where the URL of the document 501 includes the URL after the transition is used as a reference for determining the relation between the two documents, but the present invention is not limited thereto. For example, even when the URL of the first document is “http:// . . . /articles/1001?page=2” and the URL of the second document linked thereto is “http:// . . . /articles/1001?page=3”, those documents should be determined to be related to each other. Therefore, it suffices that a case where the URLs of the document corresponding to the first document and the document corresponding to the second document have such a relation that one URL includes an essential part of the other URL or other such case can be appropriately determined. The “essential part” is, for example, “http:// . . . /articles/1001?” in the above-mentioned example.
In a third embodiment of the present invention, a description is made of an example in which the determination is performed by comparing a style of the first document with a style of the second document of the link in processing for finding a link to a related document. A functional configuration of an information processing device according to the third embodiment is the same as the information processing device 100 according to the first embodiment illustrated in
In S403, the relation determination section 115 acquires at least one CSS (style sheet) file that defines the style of the second document of the link acquired in S308.
In S404, the relation determination section 115 compares the at least one CSS file acquired in S403 with at least one CSS file for the first document. The CSS files are compared with each other by determining whether or not every pair of files has the same file name between the at least one CSS file for the second document of the link and the at least one CSS file for the first document.
When, in S405, all the CSS files match each other as a result of the comparison between the CSS files for the second document of the link and the first document performed by the relation determination section 115 in S404, the procedure advances to S311. When there is a CSS file that does not match any other CSS files, the procedure returns to S308.
The details of characteristic processing according to the third embodiment are described in comparison with the first embodiment. The display example is described with reference to
In the state of
Subsequently in S405, it is determined whether or not the CSS file for the document of the link (default.css) and the CSS file for the first document (default.css) match each other as a result of the comparison therebetween. Here, the CSS files for the two documents match each other, and hence the procedure advances to S311. After those steps are repeated, when the processing is brought to an end after failing to acquire the link in S309, five links from the line 612 (button 505) to the line 616 (button 509) have been recorded as the related documents. That is, also in this embodiment, even when the user designates a “2” button in the state of
In this manner, also in the third embodiment, it is determined whether or not the first document relates to the second document of the transition destination, and when the transition is made to the second document determined to be related, the display attribute of the first document is inherited. Accordingly, it is possible to produce the same effects as in the case of the first embodiment.
Note that, there is also a method of using the appearance of the document, instead of the CSS file, for the processing for finding the link to the related document performed in S301. Specifically, there are a large number of Web sites having such a layout that buttons exhibiting meanings of “PREV”, “1”, “2”, “3”, and “NEXT” are arrayed in the last part of the article as illustrated as the respective buttons 505 to 509 in
In a fourth embodiment of the present invention, a description is made of an example in which the determination is performed by using a database, in which the URL of the first document and the link to the related document are registered, in processing for finding a link to a related document.
The information processing device 200 is different from the information processing device 100 according to the first embodiment in that the information processing device 200 includes a related document database 201 and a related document registration section 202.
The related document registration section 202 is formed of the CPU and the like, and registers the URL of the first document and the link to the second document related to the first document. The URL and the link are registered in the related document database 201. The other components are the same as those illustrated in
The related document registration section 202 is formed of the CPU and the like, and registers the URL of the current document (the first document) and the link to another document related to the current document. The URL and the link are registered in the related document database 201.
In S406, the relation determination section 115 searches the related document database 201 for the URL of the first document. It is assumed that, in the related document database 201, connections between the URLs of a large number of Web sites and the links to the related documents are described in advance in a fixed format such as XPath. Note that, any format can be used as long as the connections (correspondence relationships) are registered by using information that can identify a specific document or a document satisfying a specific condition.
In S407, the relation determination section 115 determines whether or not the URL of the first document is absent in the URLs registered in the related document database 201 searched in S406. When the URL is absent, it is assumed that the first document includes no link to the related document, and the processing is brought to an end (S407: YES). When the URL is registered, the procedure advances to S308 (S407: NO).
In S408, the relation determination section 115 determines whether or not the link acquired in S308 matches the format registered in the related document database 201. When the link matches the format registered in the related document database 201, the procedure advances to S311 (S408: YES). When the link does not match the format, the procedure returns to S308 (S408: NO).
A specific example thereof is described by focusing on the difference from the first embodiment.
In the state of
In S308, in the same manner as in the above-mentioned embodiments, the link is acquired. Here, assuming that the line 614 (button 507) in
After those steps are repeated, when the processing is brought to an end after failing to acquire the link in S309, the five links from the line 612 (button 505) to the line 616 (button 509) have been recorded as the related documents. Therefore, even when the user designates the button 507 in the state of
In this manner, also in the fourth embodiment, it is determined whether or not the first document relates to the second document of the transition destination, and when the transition is made to the second document determined to be related, the display attribute of the first document is inherited. Accordingly, it is possible to produce the same effects as in the case of the first embodiment.
Note that, as the processing for finding the link to the related document performed in S301, it is possible to employ an arbitrary combination of the ones according to the first embodiment to the fourth embodiment.
The present invention can also be realized by executing the following processing. That is, in the processing, software (program) for realizing the functions of each of the above-mentioned embodiments is supplied to a system or a device through the network or any one of various storage mediums, and the computer (or CPU, MPU, or the like) of the system or the device reads and executes the program.
According to the above-mentioned embodiments of the present invention, it is possible to enhance the usability in viewing the document by causing the second document to inherit the display attribute of the first document before the transition as necessary.
Embodiments of the present invention can also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions recorded on a storage medium (e.g., non-transitory computer-readable storage medium) to perform the functions of one or more of the above-described embodiment(s) of the present invention, and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s). The computer may comprise one or more of a central processing unit (CPU), micro processing unit (MPU), or other circuitry, and may include a network of separate computers or separate computer processors. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, a memory card, and the like.
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2013-018751, filed Feb. 1, 2013, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2013-018751 | Feb 2013 | JP | national |