CN102368244B - Page content alignment method, device and mobile terminal browser - Google Patents

Page content alignment method, device and mobile terminal browser Download PDF

Info

Publication number
CN102368244B
CN102368244B CN 201110265587 CN201110265587A CN102368244B CN 102368244 B CN102368244 B CN 102368244B CN 201110265587 CN201110265587 CN 201110265587 CN 201110265587 A CN201110265587 A CN 201110265587A CN 102368244 B CN102368244 B CN 102368244B
Authority
CN
China
Prior art keywords
content blocks
content
area
rectangular area
mobile terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN 201110265587
Other languages
Chinese (zh)
Other versions
CN102368244A (en
Inventor
梁捷
谭柱成
黄冠能
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Guangzhou Dongjing Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Dongjing Computer Technology Co Ltd filed Critical Guangzhou Dongjing Computer Technology Co Ltd
Priority to CN 201110265587 priority Critical patent/CN102368244B/en
Publication of CN102368244A publication Critical patent/CN102368244A/en
Application granted granted Critical
Publication of CN102368244B publication Critical patent/CN102368244B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

本发明提供了一种用于在浏览网页页面时进行页面内容对齐的方法,包括:在接收到用户对移动终端的浏览器上所显示的页面的点击后,生成以该点击位置为中心的预定大小的矩形区域;在所生成的矩形区域内,搜索与该矩形区域存在交叠的可对齐内容块;基于所生成的矩形区域与所搜索出的可对齐内容块之间的交叠面积比和/或点击位置和所搜索出的可对齐内容块之间的位置关系,对所搜索出的可对齐内容块进行两两比较以从中选出最可能是用户要阅读的内容块;以及将移动终端的屏幕显示区域移动到所选出的内容块的位置进行对齐显示。利用该方法,可以减少用户的对齐操作,提高用户对齐操作的成功率,并且提高用户阅读体验。

Figure 201110265587

The present invention provides a method for aligning page content when browsing a web page, comprising: after receiving a user's click on a page displayed on a browser of a mobile terminal, generating a predetermined The size of the rectangular area; within the generated rectangular area, search for an alignable content block that overlaps with the rectangular area; based on the sum of the overlapping area ratio between the generated rectangular area and the searched alignable content block /or the positional relationship between the click position and the searched alignable content blocks, compare the searched alignable content blocks in pairs to select the content block that is most likely to be read by the user; and the mobile terminal The screen display area of the screen moves to the position of the selected content block for alignment display. By using this method, the user's alignment operations can be reduced, the success rate of the user's alignment operation can be improved, and the user's reading experience can be improved.

Figure 201110265587

Description

页面内容对齐方法、装置及移动终端浏览器Page content alignment method, device and mobile terminal browser

技术领域 technical field

本发明涉及移动通信领域,更为具体地,涉及一种用于在浏览网页页面时进行页面内容对齐的方法及装置,以及一种具有该页面内容对齐装置的移动终端浏览器。The present invention relates to the field of mobile communication, and more specifically, to a method and device for aligning page content when browsing webpages, and a mobile terminal browser with the page content aligning device.

背景技术 Background technique

目前,越来越多的人习惯于利用自己的移动终端,通过无线上网的方式随时随地地进行网页浏览。然而,当在移动终端的浏览器上显示从内容服务器下载的网页内容时,该网页内容在浏览器上的显示可能与移动终端的屏幕不对齐,也就是,原本要在移动终端的屏幕上显示的内容显示在屏幕之外。在这种情况下,为了查看该部分内容,用户需要左右移动该显示内容,由此导致用户体验不佳。At present, more and more people are accustomed to using their mobile terminals to browse webpages anytime and anywhere through wireless Internet access. However, when the webpage content downloaded from the content server is displayed on the browser of the mobile terminal, the display of the webpage content on the browser may not be aligned with the screen of the mobile terminal, that is, the webpage content originally intended to be displayed on the screen of the mobile terminal The content of is displayed off-screen. In this case, in order to view the part of the content, the user needs to move the displayed content left and right, which leads to poor user experience.

为了解决上述问题,现有Android自带浏览器上提供了一种单击自动对齐的方案。在Android自带浏览器上,如果发生所显示的网页内容偏移,则通过点击非链接文字,即,点击后不会导致发生新的链接的文字,就可以将屏幕可见区域移动到适合浏览这段文字的位置。在这种情况下,在点击非链接文字后,浏览器就可以检测到点击位置所在的DOM节点,然后基于所检测到的DOM节点找到相应的适合对齐的内容块,随后将所找到的内容块移动到合适的对齐位置。然而,在这种方案中,只能在点击部分文字时才产生对齐效果,也就是说,点击位置必须落在文字内容区域上。如果点击位置落在文字内容旁边的空白(即,非文字内容区域),则由于空白区域没有对应的DOM节点,所以不能找到对应内容块,从而不会进行自动对齐。由于在点击时点击位置落在文字内容旁边的空白经常发生,因此在Android自带浏览器上提供的这种单击自动对齐方案下,经常会发生由于用户没有点击到文字内容上而重复进行操作,从而导致用户操作麻烦,对齐操作的成功率低,以及用户体验不佳。In order to solve the above problem, the existing Android built-in browser provides a single-click automatic alignment solution. On the Android built-in browser, if the content of the displayed web page is shifted, by clicking on non-link text, that is, text that will not cause a new link after clicking, the visible area of the screen can be moved to a suitable place for browsing. The position of the paragraph text. In this case, after clicking the non-link text, the browser can detect the DOM node where the clicked position is located, and then find the corresponding content block suitable for alignment based on the detected DOM node, and then convert the found content block to Move to the proper alignment. However, in this solution, the alignment effect can only be generated when part of the text is clicked, that is, the click position must fall on the text content area. If the click position falls on the blank next to the text content (that is, the non-text content area), since the blank area does not have a corresponding DOM node, the corresponding content block cannot be found, so automatic alignment will not be performed. Since the click position falls next to the text content when clicking, it often happens that the click position automatically aligns with the solution provided by the Android built-in browser. It often happens that the user does not click on the text content and repeats the operation. , resulting in troublesome operations for the user, a low success rate of the alignment operation, and poor user experience.

发明内容 Contents of the invention

鉴于上述问题,本发明提出了一种在浏览网页页面时进行页面内容对齐的方法及装置,利用该方法及装置,通过在点击到移动终端的屏幕上所显示的页面时,在以点击位置为中心的预定大小的矩形区域内搜索与该矩形区域交叠的可对齐内容块,并且基于该矩形区域与所搜索出的可对齐内容块之间的交叠面积比或者点击位置与所搜索出的可对齐内容块之间的相对位置关系,从所搜索的可对齐内容块中筛选要进行对齐的内容块,并将所选择的对齐内容块移动到适合阅读的对齐位置。利用该方法,即使在进行对齐操作时点击到非内容区域,也可以将期望对齐的内容块移动到对齐位置,从而可以减少用户的对齐操作,提高用户对齐操作的成功率,并且提高用户阅读体验。In view of the above problems, the present invention proposes a method and device for aligning page content when browsing webpages. Using the method and device, when clicking on a page displayed on the screen of a mobile terminal, the click position is used as the Search for an alignable content block that overlaps with the rectangular area in the center of a predetermined size, and based on the overlap area ratio between the rectangular area and the searched alignable content block or the click position and the searched The relative positional relationship between content blocks can be aligned, the content blocks to be aligned are filtered from the searched content blocks that can be aligned, and the selected aligned content blocks are moved to an alignment position suitable for reading. With this method, even if a non-content area is clicked during the alignment operation, the content block to be aligned can be moved to the alignment position, thereby reducing the user's alignment operation, improving the success rate of the user's alignment operation, and improving the user's reading experience .

根据本发明的一个方面,提供了一种用于在浏览网页页面时进行页面内容对齐的方法,包括:在接收到用户对移动终端的浏览器上所显示的页面的点击后,生成以该点击位置为中心的预定大小的矩形区域;在所生成的矩形区域内,搜索与该矩形区域存在交叠的可对齐内容块;基于所生成的矩形区域与所搜索出的可对齐内容块之间的交叠面积,和/或点击位置与所搜索出的可对齐内容块之间的位置关系,对所搜索出的可对齐内容块进行两两比较以从中选出用户要阅读的内容块;以及将移动终端的屏幕显示区域移动到所选出的内容块的位置进行对齐显示,其中,所述可对齐内容块是同时满足下述条件的内容块:(1)该内容块的父节点的宽度不小于移动终端的屏宽,(2)该内容块的宽度不小于移动终端的1/4屏宽,以及(3)子节点是文本类节点,或者子节点的宽度不大于移动终端的屏宽。According to one aspect of the present invention, there is provided a method for aligning page content when browsing a webpage, including: after receiving a user's click on a page displayed on a browser of a mobile terminal, generating an A rectangular area of a predetermined size with the center as the center; within the generated rectangular area, search for an alignable content block that overlaps with the rectangular area; based on the distance between the generated rectangular area and the searched out alignable content block overlap area, and/or the positional relationship between the click position and the searched alignable content blocks, and compare the searched alignable content blocks to select the content block that the user wants to read; and The screen display area of the mobile terminal moves to the position of the selected content block for aligned display, wherein the alignable content block is a content block that satisfies the following conditions at the same time: (1) the width of the parent node of the content block is not smaller than the screen width of the mobile terminal, (2) the width of the content block is not less than 1/4 of the screen width of the mobile terminal, and (3) the child node is a text node, or the width of the child node is not greater than the screen width of the mobile terminal.

此外,在一个或多个示例中,基于所生成的矩形区域与所搜索出的可对齐内容块之间的交叠面积,和/或点击位置与所搜索出的可对齐内容块之间的位置关系,对所搜索出的可对齐内容块进行两两比较的步骤可以包括:判断第一可对齐内容块与所述矩形区域的交叠面积是否大于等于第二可对齐内容块与所述矩形区域的交叠面积的预定倍;如果大于等于所述预定倍,则选择第一可对齐内容块,作为用户要阅读的内容块,如果小于所述预定倍,则判断所述点击位置是否位于第一或第二可对齐内容块中,如果所述点击位置在第一或第二可对齐内容块中,则选择所述点击位置所位于的可对齐内容块,作为用户要阅读的内容块,如果所述点击位置不在第一和第二可对齐内容块中,则比较所述点击位置与第一和第二可对齐内容块的左边缘距离,以及选择左边缘与所述点击位置之间的距离小的可对齐内容块,作为用户要阅读的内容块。其中,所述预定倍优选为2倍。In addition, in one or more examples, based on the overlapping area between the generated rectangular area and the searched alignable content block, and/or the position between the click position and the searched alignable content block relationship, the step of pairwise comparing the searched alignable content blocks may include: judging whether the overlapping area of the first alignable content block and the rectangular area is greater than or equal to the second alignable content block and the rectangular area The predetermined times of the overlapping area; if it is greater than or equal to the predetermined times, select the first alignable content block as the content block to be read by the user, if it is less than the predetermined times, then judge whether the click position is in the first Or in the second alignable content block, if the click position is in the first or second alignable content block, select the alignable content block where the click position is located as the content block to be read by the user, if the If the click position is not in the first and second alignable content blocks, compare the distance between the click position and the left edge of the first and second alignable content blocks, and select the distance between the left edge and the click position to be smaller An alignable block of content for the user to read. Wherein, the predetermined times is preferably 2 times.

此外,在一个或多个示例中,将移动终端的屏幕显示区域移动到所选出的内容块的位置进行对齐显示的步骤可以包括:根据所选出的内容块的位置坐标以及屏幕坐标,计算移动终端的屏幕显示区域的移动轨迹;以及基于所计算出的移动轨迹,将移动终端屏幕显示区域移动到所选出的内容块的位置进行对齐显示。In addition, in one or more examples, the step of moving the screen display area of the mobile terminal to the position of the selected content block for alignment and display may include: according to the position coordinates and screen coordinates of the selected content block, calculating The moving track of the screen display area of the mobile terminal; and based on the calculated moving track, moving the screen display area of the mobile terminal to the position of the selected content block for aligned display.

此外,在一个或多个示例中,所述预定大小的范围可以是从一个像素到整个屏幕大小。优选地,所述预定大小是1/4屏幕大小。Additionally, in one or more examples, the predetermined size may range from one pixel to the entire screen size. Preferably, the predetermined size is 1/4 of the screen size.

此外,在一个或多个示例中,在接收到用户对所显示的页面的点击后,所述方法还可以包括:判断所点击的区域是否是可点击元素,在所点击的区域是可点击元素时,执行对该页面的点击操作,以及在所点击的区域不是可点击元素时,在预定大小的矩形区域内进行交叠可对齐内容块的搜索操作。In addition, in one or more examples, after receiving the user's click on the displayed page, the method may further include: determining whether the clicked area is a clickable element, and the clicked area is a clickable element , perform a click operation on the page, and when the clicked area is not a clickable element, perform a search operation for overlapping and alignable content blocks within a rectangular area of a predetermined size.

根据本发明的另一方面,提供了一种用于在浏览网页页面时进行页面内容对齐的对齐装置,包括:接收单元,用于接收用于对移动终端的浏览器上所显示的页面的点击;矩形区域生成单元,用于在接收到用户对移动终端的浏览器上所显示的页面的点击后,生成以该点击位置为中心的预定大小的矩形区域;搜索单元,用于在所生成的矩形区域内,搜索与该矩形区域存在交叠的可对齐内容块;筛选单元,用于基于所生成的矩形区域与所搜索出的可对齐内容块之间的交叠面积,和/或点击位置与所搜索出的可对齐内容块之间的位置关系,对所搜索出的可对齐内容块进行两两比较以从中选出用户要阅读的内容块;以及移动单元,用于移动终端的屏幕显示区域移动到所选出的内容块的位置进行对齐显示,其中,所述可对齐内容块是同时满足下述条件的内容块:(1)该内容块的父节点的宽度不小于移动终端的屏宽,(2)该内容块的宽度不小于移动终端的1/4屏宽,以及(3)子节点是文本类节点,或者子节点的宽度不大于移动终端的屏宽。According to another aspect of the present invention, there is provided an alignment device for aligning page content when browsing webpages, including: a receiving unit configured to receive a click on a page displayed on a browser of a mobile terminal ; The rectangular area generation unit is used to generate a predetermined size rectangular area centered on the clicked position after receiving the user's click on the displayed page on the browser of the mobile terminal; the search unit is used to generate in the generated Within the rectangular area, search for alignable content blocks that overlap with the rectangular area; filtering unit, used to base on the overlapping area between the generated rectangular area and the searched alignable content blocks, and/or the click position The positional relationship between the searched alignable content blocks and the pairwise comparison of the searched alignable content blocks to select the content block that the user wants to read; and the mobile unit is used for the screen display of the mobile terminal The area is moved to the position of the selected content block for aligned display, wherein the alignable content block is a content block that satisfies the following conditions at the same time: (1) the width of the parent node of the content block is not smaller than the screen size of the mobile terminal (2) the width of the content block is not less than 1/4 of the screen width of the mobile terminal, and (3) the child node is a text node, or the width of the child node is not greater than the screen width of the mobile terminal.

此外,在一个或多个示例中,所述筛选单元还可以包括:第一判断单元,用于判断第一可对齐内容块与所述矩形区域的交叠面积是否大于等于第二可对齐内容块与所述矩形区域的交叠面积的预定倍;第二判断单元,用于在第一判断单元判断为小于所述预定倍时,判断所述点击位置是否位于第一或第二可对齐内容块中;以及比较单元,用于在所述点击位置不在第一和第二可对齐内容块中时,比较所述点击位置与第一和第二可对齐内容块的左边缘距离,其中,如果第一判断单元判断为大于等于所述预定倍,则所述筛选单元选择第一可对齐内容块,作为用户要阅读的内容块,如果第二判断单元判断出所述点击位置在第一或第二可对齐内容块中,则所述筛选单元选择所述点击位置所位于的可对齐内容块,作为用户要阅读的内容块,如果所述点击位置不在第一和第二可对齐内容块中,则所述筛选单元选择左边缘与所述点击位置之间的距离小的可对齐内容块,作为用户要阅读的内容块。其中,所述预定倍优选为2倍。In addition, in one or more examples, the screening unit may further include: a first judging unit, configured to judge whether the overlapping area between the first alignable content block and the rectangular area is greater than or equal to the second alignable content block A predetermined multiple of the overlapping area with the rectangular area; the second judging unit is used to judge whether the click position is located in the first or second alignable content block when the first judging unit judges that it is smaller than the predetermined times and a comparison unit, configured to compare the click position with the left edge distances of the first and second alignable content blocks when the click position is not in the first and second alignable content blocks, wherein, if the first A judging unit judges that it is greater than or equal to the predetermined times, then the screening unit selects the first alignable content block as the content block to be read by the user, if the second judging unit judges that the click position is in the first or second among the alignable content blocks, the screening unit selects the alignable content block where the click position is located as the content block to be read by the user; if the click position is not in the first and second alignable content blocks, then The screening unit selects an alignable content block whose distance between the left edge and the click position is small, as the content block to be read by the user. Wherein, the predetermined times is preferably 2 times.

此外,在一个或多个示例中,所述移动单元还可以包括:计算单元,用于根据所选出的内容块的位置坐标以及屏幕坐标,计算移动终端的屏幕显示区域的移动轨迹,所述移动单元基于所计算出的移动轨迹,将移动终端的屏幕显示区域移动到所选出的内容块的位置进行对齐显示。In addition, in one or more examples, the moving unit may further include: a calculating unit, configured to calculate the movement trajectory of the screen display area of the mobile terminal according to the position coordinates and screen coordinates of the selected content block, the The moving unit moves the screen display area of the mobile terminal to the position of the selected content block for aligned display based on the calculated moving track.

此外,在一个或多个示例中,所述对齐装置还可以包括:第三判断单元,用于在接收到用户对所显示的页面的点击后,判断所点击的区域是否是可点击元素,以及执行单元,用于在所点击的区域是可点击元素时,执行对该页面的点击操作,在所点击的区域不是可点击元素时,所述搜索单元在预定大小的矩形区域内进行交叠可对齐内容块的搜索操作。In addition, in one or more examples, the aligning device may further include: a third judging unit, configured to judge whether the clicked area is a clickable element after receiving a user's click on the displayed page, and The execution unit is configured to perform a click operation on the page when the clicked area is a clickable element, and when the clicked area is not a clickable element, the search unit performs overlapping and clickable elements in a predetermined size rectangular area. A search operation for aligned content blocks.

根据本发明的另一方面,提供了一种移动终端的浏览器,包括如上所述的对齐装置。According to another aspect of the present invention, a browser of a mobile terminal is provided, including the above-mentioned aligning device.

为了实现上述以及相关目的,本发明的一个或多个方面包括后面将详细说明并在权利要求中特别指出的特征。下面的说明以及附图详细说明了本发明的某些示例性方面。然而,这些方面指示的仅仅是可使用本发明的原理的各种方式中的一些方式。此外,本发明旨在包括所有这些方面以及它们的等同物。To the accomplishment of the above and related ends, one or more aspects of the invention comprise the features hereinafter described in detail and particularly pointed out in the claims. The following description and accompanying drawings detail certain exemplary aspects of the invention. These aspects are indicative, however, of but a few of the various ways in which the principles of the invention may be employed. Furthermore, the invention is intended to include all such aspects and their equivalents.

附图说明 Description of drawings

根据下述参照附图进行的详细描述,本发明的上述和其他目的、特征和优点将变得更加显而易见。在附图中:The above and other objects, features and advantages of the present invention will become more apparent from the following detailed description made with reference to the accompanying drawings. In the attached picture:

图1示出了根据本发明的实施例的用于在浏览网页页面时进行页面内容对齐的方法的流程图;FIG. 1 shows a flow chart of a method for aligning page content when browsing a web page according to an embodiment of the present invention;

图2示出了当点击位置位于非内容区域时进行可对齐内容块筛选的一个示例的示意图;Fig. 2 shows a schematic diagram of an example of performing alignable content block screening when the click position is located in a non-content area;

图3A到图3F示出了三种点击位置情形下对齐操作前和对齐操作后的显示的示意图;FIG. 3A to FIG. 3F show schematic diagrams of displays before and after the alignment operation under three click position situations;

图4示出了根据本发明的实施例的用于在浏览网页页面时进行页面内容对齐的对齐装置的方框示意图;FIG. 4 shows a schematic block diagram of an alignment device for aligning page content when browsing a web page according to an embodiment of the present invention;

图5示出了具有图4中示出的对齐装置的移动终端的浏览器的方框示意图;和Fig. 5 shows a schematic block diagram of a browser of a mobile terminal having the alignment device shown in Fig. 4; and

图6示出了具有图5中示出的浏览器的移动终端的方框示意图。FIG. 6 shows a schematic block diagram of a mobile terminal with the browser shown in FIG. 5 .

在所有附图中相同的标号指示相似或相应的特征或功能。The same reference numerals indicate similar or corresponding features or functions throughout the drawings.

具体实施方式 Detailed ways

下面描述本公开的各个方面。应该明白的是,本文的教导可以以多种多样形式具体体现,并且在本文中公开的任何具体结构、功能或两者仅仅是代表性的。基于本文的教导,本领域技术人员应该明白的是,本文所公开的一个方面可以独立于任何其它方面实现,并且这些方面中的两个或多个方面可以按照各种方式组合。例如,可以使用本文所阐述的任何数目的方面,实现装置或实践方法。另外,可以使用其它结构、功能、或除了本文所阐述的一个或多个方面之外或不是本文所阐述的一个或多个方面的结构和功能,实现这种装置或实践这种方法。此外,本文所描述的任何方面可以包括权利要求的至少一个元素。Various aspects of the disclosure are described below. It should be appreciated that the teachings herein may be embodied in a wide variety of forms and that any specific structure, function, or both disclosed herein are merely representative. Based on the teachings herein one skilled in the art should appreciate that an aspect disclosed herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented or a method practiced using any number of the aspects set forth herein. In addition, such an apparatus may be implemented or such a method may be practiced with other structure, functionality, or structure and functionality in addition to or in addition to one or more of the aspects set forth herein. Additionally, any aspect described herein may comprise at least one element of a claim.

在描述根据本发明的方法的流程之前,首先对本文中使用的几个术语进行说明。Before describing the flow of the method according to the present invention, some terms used in this paper will be explained first.

术语“内容块”指的是HTML中的具有一定区域范围的DOM节点,其范围可以以矩形来表达,具有一定的坐标和尺寸。此外,在对要在移动终端的屏幕上显示的网页内容进行重排时,分割形成内容块。The term "content block" refers to a DOM node in HTML with a certain range, which can be expressed as a rectangle, with certain coordinates and dimensions. Furthermore, when rearranging the content of the web page to be displayed on the screen of the mobile terminal, it is divided to form content blocks.

术语“可对齐内容块”指的是同时满足下述条件的内容块:(1)该内容块的父节点的宽度不小于移动终端的屏宽,(2)该内容块的宽度不小于移动终端的1/4屏宽,以及(3)子节点是文本类节点,或者子节点的宽度不大于移动终端的屏宽。换言之,如果内容块满足下述条件中之一,则不能作为可对齐内容块:(1)父节点的宽度小于屏宽,(2)内容块宽度小于1/4屏宽,或者(3)子节点不是文本类节点,且块的宽度大于屏宽。通常,适合作为可对齐内容块的内容块是接近屏幕宽度的内容块。The term "alignable content block" refers to a content block that satisfies the following conditions at the same time: (1) the width of the parent node of the content block is not smaller than the screen width of the mobile terminal, (2) the width of the content block is not smaller than the mobile terminal 1/4 of the screen width, and (3) the child node is a text node, or the width of the child node is not greater than the screen width of the mobile terminal. In other words, if a content block satisfies one of the following conditions, it cannot be used as an alignable content block: (1) the width of the parent node is smaller than the screen width, (2) the width of the content block is smaller than 1/4 the screen width, or (3) the child The node is not a text node, and the block width is larger than the screen width. Generally, content blocks that are suitable as alignable content blocks are content blocks that are close to the width of the screen.

术语“可点击元素”指的是当被点击时可执行相应操作的元素,比如具有链接网址的元素等等。The term "clickable element" refers to an element that performs an action when clicked, such as an element with a link URL, etc.

下面将参照附图描述本发明的各个实施例。Various embodiments of the present invention will be described below with reference to the accompanying drawings.

图1示出了根据本发明的实施例的用于在浏览网页页面时进行页面内容对齐的方法的流程图。Fig. 1 shows a flowchart of a method for aligning page content when browsing a web page according to an embodiment of the present invention.

如图1所示,首先,在步骤S110中,当用户点击移动终端的屏幕时,移动终端的浏览器接收到用户对移动终端的浏览器上所显示的页面的点击。As shown in FIG. 1, first, in step S110, when the user clicks on the screen of the mobile terminal, the browser of the mobile terminal receives the user's click on the page displayed on the browser of the mobile terminal.

然后,在步骤S120,判断所点击的屏幕区域是否是可点击元素,比如具有链接网址的元素。如果是可点击元素,则进行到步骤S140,由浏览器执行对该页面的点击操作,比如链接到新的网址来进行显示。否则,进行到步骤S130。Then, in step S120, it is determined whether the clicked screen area is a clickable element, such as an element with a link URL. If it is a clickable element, proceed to step S140, and the browser performs a click operation on the page, such as linking to a new website for display. Otherwise, go to step S130.

在步骤S130,生成以该点击位置为中心的预定大小的矩形区域。所述预定大小的范围例如可以是一个像素到整个屏幕大小。优选地,所述预定大小是1/4屏幕大小,即,该矩形区域的宽为屏幕宽度的一半,高为屏幕高度的一半,总面积为整个屏幕的1/4。在替换示例中,该矩形区域尺寸可以根据不同情形进行修改。In step S130, a rectangular area of predetermined size centered on the clicked position is generated. The range of the predetermined size may be, for example, one pixel to the entire screen size. Preferably, the predetermined size is 1/4 of the screen size, that is, the width of the rectangular area is half of the screen width, the height is half of the screen height, and the total area is 1/4 of the entire screen. In an alternative example, the size of the rectangular area can be modified according to different situations.

在如上生成矩形区域后,在步骤S150,在所生成的矩形区域内,搜索是否存在与该矩形区域交叠的可对齐内容块。如果存在与该矩形区域交叠的可对齐内容块,则进行到步骤S160。否则,不进行任何操作返回。After the rectangular area is generated as above, in step S150, within the generated rectangular area, it is searched whether there is an alignable content block overlapping with the rectangular area. If there is an alignable content block overlapping with the rectangular area, proceed to step S160. Otherwise, return without any operation.

在步骤S160,基于所生成的矩形区域与所搜索出的可对齐内容块之间的交叠面积,和/或点击位置与所搜索出的可对齐内容块之间的位置关系,对所搜索出的可对齐内容块进行两两比较,以从中选出用户要阅读的内容块。In step S160, based on the overlapping area between the generated rectangular area and the searched alignable content block, and/or the positional relationship between the click position and the searched alignable content block, the searched The alignable blocks of content are compared 2-by-2 to select the block of content that the user wants to read.

具体地,在一个示例中,在如上生成的矩形区域中遍历搜索时,如果首次找到一个交叠的可对齐内容块,则将该搜索到的可对齐内容块作为第一候选可对齐内容块。如果在后续的搜索中没有搜索到其它可对齐内容块,则将该第一候选可对齐内容块作为筛选出的可对齐内容块。如果在后续的搜索中搜索到另一个交叠的可对齐内容块,则将该另一个可对齐内容块作为第二候选可对齐内容块。然后,基于所生成的矩形区域与所搜索出的各可对齐内容块之间的交叠面积,和/或点击位置与所搜索出的可对齐内容块之间的位置关系对该第一和第二候选可对齐内容块进行比较筛选。在比较筛选时,例如,首先判断第一候选可对齐内容块与所述矩形区域的交叠面积是否大于等于第二候选可对齐内容块与所述矩形区域的的交叠面积的预定倍。如果大于等于所述预定倍,则选择第一可对齐内容块,作为用户要阅读的内容块。如果小于所述预定倍,则判断所述点击位置是否位于第一或第二可对齐内容块中。如果所述点击位置在第一或第二可对齐内容块中,则选择所述点击位置所位于的可对齐内容块,作为用户要阅读的内容块。如果所述点击位置不在第一和第二可对齐内容块中,则比较所述点击位置与第一和第二可对齐内容块的左边缘距离,并且选择左边缘与所述点击位置之间的距离小的可对齐内容块,作为用户要阅读的内容块。在本发明的一个优选实施例中,所述预定倍是2倍。在本发明的其他实施例中,所述预定倍可以采用其它合适的数值。Specifically, in an example, when traversing the search in the rectangular area generated above, if an overlapping alignable content block is found for the first time, the searched alignable content block is used as the first candidate alignable content block. If no other alignable content block is found in subsequent searches, the first candidate alignable content block is used as the screened out alignable content block. If another overlapping alignable content block is found in the subsequent search, the other alignable content block is used as the second candidate alignable content block. Then, based on the overlapping area between the generated rectangular area and the searched alignable content blocks, and/or the positional relationship between the click position and the searched alignable content blocks, the first and second Two candidates can be compared and screened by aligning content blocks. When comparing and filtering, for example, it is first determined whether the overlapping area of the first candidate alignable content block and the rectangular area is greater than or equal to a predetermined time of the overlapping area of the second candidate alignable content block and the rectangular area. If it is greater than or equal to the predetermined times, select the first alignable content block as the content block to be read by the user. If it is smaller than the predetermined multiple, it is judged whether the click position is located in the first or second alignable content block. If the click position is in the first or second alignable content block, the alignable content block where the click position is located is selected as the content block to be read by the user. If the click position is not within the first and second alignable content blocks, compare the click position with the left edge distances of the first and second alignable content blocks, and select the distance between the left edge and the click position Alignable content blocks with a small distance are used as content blocks for users to read. In a preferred embodiment of the present invention, the predetermined times are 2 times. In other embodiments of the present invention, the predetermined multiple may adopt other suitable values.

然后,在步骤S170,将移动终端的屏幕显示区域移动到所选出的内容块的位置进行对齐显示。具体地,首先根据所选出的内容块的位置坐标以及屏幕坐标,计算移动终端的屏幕显示区域的移动轨迹。然后,基于所计算出的移动轨迹,将移动终端的屏幕显示区域移动到所选出的内容块的位置,从而进行内容块对齐显示。关于如何将移动终端的屏幕显示区域移动到所选出的内容块的位置,还可以采用本领域中的其它方式实现。Then, in step S170, the screen display area of the mobile terminal is moved to the position of the selected content block for aligned display. Specifically, firstly, according to the position coordinates and screen coordinates of the selected content block, the moving track of the screen display area of the mobile terminal is calculated. Then, based on the calculated movement trajectory, the screen display area of the mobile terminal is moved to the position of the selected content block, so as to perform aligned display of the content blocks. As for how to move the screen display area of the mobile terminal to the position of the selected content block, other methods in the art can also be used.

图2示出了当点击位置位于非内容区域时进行可对齐内容块筛选的一个示例的示意图。在图2中,圆圈为用户的手指点击处,也就是本文中所述的点击位置。虚线区域B是以点击位置为中心的面积为1/4屏幕大小的矩形区域,即本文中所述的搜索区域。区域C和D是所搜索到的与矩形区域B存在交叠的可对齐内容块。在该示例中,所述预定倍是2倍。从图2中可以看出,内容块C与矩形区域B的交叠范围的面积大于内容块D与矩形区域B的交叠区域的面积的2倍。在这种情况下,将内容块C选择为屏幕将要移动到的适合阅读的目标内容块。Fig. 2 shows a schematic diagram of an example of filtering alignable content blocks when the click position is located in a non-content area. In FIG. 2 , the circle is the user's finger click point, which is the click position described in this article. The dotted line area B is a rectangular area with an area of 1/4 the size of the screen centered on the clicked position, which is the search area described in this article. Areas C and D are the searched alignable content blocks that overlap with the rectangular area B. In this example, the predetermined times are 2 times. It can be seen from FIG. 2 that the area of the overlapping area between the content block C and the rectangular area B is greater than twice the area of the overlapping area between the content block D and the rectangular area B. In this case, content block C is selected as a target content block suitable for reading to which the screen is to be moved.

图3A到图3F示出了三种点击位置情形下对齐操作前和对齐操作后的显示的示意图。图3A示出了当点击位置位于文字内容右边的空白处时进行对齐操作之前的示意图,以及图3B示出了当点击位置位于文字内容右边的空白处时进行对齐操作之后的示意图。图3C示出了当点击位置位于文字内容上时进行对齐操作之前的示意图,以及图3D示出了当点击位置位于文字内容上时进行对齐操作之后的示意图。图3E示出了当点击位置位于文字内容左边的空白处时进行对齐操作之前的示意图,以及图3F示出了当点击位置位于文字内容左边的空白处时进行对齐操作之后的示意图。3A to 3F are schematic diagrams showing the display before and after the alignment operation in three click position situations. FIG. 3A shows a schematic diagram before the alignment operation is performed when the click position is located in a blank space on the right of the text content, and FIG. 3B shows a schematic diagram after the alignment operation is performed when the click position is located in a blank space on the right side of the text content. FIG. 3C shows a schematic diagram before the alignment operation is performed when the click position is located on the text content, and FIG. 3D shows a schematic diagram after the alignment operation is performed when the click position is located on the text content. FIG. 3E shows a schematic diagram before the alignment operation when the click position is located in the left blank space of the text content, and FIG. 3F shows a schematic diagram after the alignment operation is performed when the click position is located in the left blank space of the text content.

如上参照图1到图3F描述了根据本发明的用于在浏览网页页面时进行页面内容对齐的方法的流程图。本发明的上述用于在浏览网页页面时进行页面内容对齐的方法,可以采用软件实现,也可以采用硬件实现,或采用软件和硬件组合的方式实现。The flow chart of the method for page content alignment when browsing web pages according to the present invention is described above with reference to FIGS. 1 to 3F . The above-mentioned method for aligning page content when browsing webpages of the present invention can be implemented by software, hardware, or a combination of software and hardware.

这里要说明的是,图1中示出的仅仅是本发明的一个具体实施例。本领域技术人员明白的是,可以在不背离本发明的范围的情况下,对图1中示出的实施例进行各种修改。例如,在本发明的替换实施例中,可以省略图1中的步骤S120和步骤S140,而认为用户点击的区域就是非可点击元素。It should be noted here that what is shown in FIG. 1 is only a specific embodiment of the present invention. It will be apparent to those skilled in the art that various modifications may be made to the embodiment shown in FIG. 1 without departing from the scope of the present invention. For example, in an alternative embodiment of the present invention, step S120 and step S140 in FIG. 1 may be omitted, and the area clicked by the user is considered to be a non-clickable element.

图4示出了根据本发明的实施例的用于在浏览网页页面时进行页面内容对齐的对齐装置400的方框示意图。FIG. 4 shows a schematic block diagram of an alignment device 400 for aligning page content when browsing webpages according to an embodiment of the present invention.

如图4所示,根据本发明的对齐装置400包括接收单元410、矩形区域生成单元420、搜索单元430、筛选单元440以及移动单元450。As shown in FIG. 4 , the alignment device 400 according to the present invention includes a receiving unit 410 , a rectangular area generating unit 420 , a searching unit 430 , a screening unit 440 and a moving unit 450 .

接收单元410用于接收用于对移动终端的浏览器上所显示的页面的点击。The receiving unit 410 is used for receiving a click on a page displayed on the browser of the mobile terminal.

在接收到用户对移动终端的浏览器上所显示的页面的点击后,矩形区域生成单元420生成以该点击位置为中心的预定大小的矩形区域。所述预定大小的范围例如可以是一个像素到整个屏幕大小。优选地,所述预定大小是1/4屏幕大小。After receiving the user's click on the page displayed on the browser of the mobile terminal, the rectangular area generation unit 420 generates a rectangular area of a predetermined size centered on the clicked position. The range of the predetermined size may be, for example, one pixel to the entire screen size. Preferably, the predetermined size is 1/4 of the screen size.

然后,搜索单元430在所生成的矩形区域内,搜索与该矩形区域存在交叠的可对齐内容块。其中,所述可对齐内容块是同时满足下述条件的内容块:(1)该内容块的父节点的宽度不小于移动终端的屏宽,(2)该内容块的宽度不小于移动终端的1/4屏宽,以及(3)子节点是文本类节点,或者子节点的宽度不大于移动终端的屏宽。Then, the searching unit 430 searches the generated rectangular area for alignable content blocks that overlap with the rectangular area. Wherein, the alignable content block is a content block that satisfies the following conditions at the same time: (1) the width of the parent node of the content block is not less than the screen width of the mobile terminal, (2) the width of the content block is not less than the screen width of the mobile terminal 1/4 of the screen width, and (3) the child node is a text node, or the width of the child node is not greater than the screen width of the mobile terminal.

在搜索到存在交叠的可对齐内容块后,筛选单元440基于所生成的矩形区域与所搜索出的可对齐内容块之间的交叠面积,和/或点击位置与所搜索出的可对齐内容块之间的位置关系,对所搜索出的可对齐内容块进行两两比较以从中选出用户要阅读的内容块。After searching for overlapping alignable content blocks, the screening unit 440 is based on the overlapping area between the generated rectangular area and the searched alignable content blocks, and/or the click position and the searched alignable content blocks. The positional relationship between the content blocks is to compare the searched alignable content blocks in pairs to select the content block that the user wants to read.

在本发明的一个示例中,所述筛选单元440还可以包括第一判断单元(未示出),用于判断第一可对齐内容块与所述矩形区域的交叠面积是否大于等于第二可对齐内容块与所述矩形区域的交叠面积的预定倍;第二判断单元(未示出),用于在第一判断单元判断为小于所述预定倍时,判断所述点击位置是否位于第一或第二可对齐内容块中;以及比较单元(未示出),用于在所述点击位置不在第一和第二可对齐内容块中时,比较所述点击位置与第一和第二可对齐内容块的左边缘距离。在本发明的一个优选实施例中,所述预定倍是2倍。在本发明的其他实施例中,所述预定倍可以采用其它合适的数值。In an example of the present invention, the screening unit 440 may further include a first judging unit (not shown), configured to judge whether the overlapping area of the first alignable content block and the rectangular area is greater than or equal to the second alignable content block. A predetermined multiple of the overlapping area of the alignment content block and the rectangular area; a second judging unit (not shown), used to judge whether the click position is located at the first judging unit when the first judging unit judges that it is smaller than the predetermined times one or the second alignable content block; and a comparison unit (not shown), used to compare the click position with the first and second alignable content blocks when the click position is not in the first and second alignable content blocks Alignable content block's left edge distance. In a preferred embodiment of the present invention, the predetermined times are 2 times. In other embodiments of the present invention, the predetermined multiple may adopt other suitable values.

其中,如果第一判断单元判断为大于等于所述预定倍,则所述筛选单元选择第一可对齐内容块,作为用户要阅读的内容块。如果第二判断单元判断出所述点击位置在第一或第二可对齐内容块中,则所述筛选单元选择所述点击位置所位于的可对齐内容块,作为用户要阅读的内容块。如果所述点击位置不在第一和第二可对齐内容块中,则所述筛选单元选择左边缘与所述点击位置之间的距离小的可对齐内容块,作为用户要阅读的内容块。Wherein, if the first judging unit judges that it is greater than or equal to the predetermined times, the screening unit selects the first alignable content block as the content block to be read by the user. If the second judging unit judges that the click position is in the first or second alignable content block, the screening unit selects the alignable content block where the click position is located as the content block to be read by the user. If the click position is not in the first and second alignable content blocks, the screening unit selects an alignable content block with a small distance between the left edge and the click position as the content block to be read by the user.

在如上筛选出用户要阅读的内容块后,移动单元450将移动终端的屏幕显示区域移动到所选出的内容块的位置进行对齐显示。在本发明的一个示例中,所述移动单元还可以包括计算单元(未示出),用于根据所选出的内容块的位置坐标以及屏幕坐标,计算移动终端的屏幕显示区域的移动轨迹。然后,所述移动单元基于所计算出的移动轨迹,将移动终端的屏幕显示区域移动到所选出的内容块的位置进行对齐显示。本领域技术人员要明白,上述移动方式仅仅是一个示例。在本发明的其它实施例中,也可以采用本领域公知的其它方式来实现上述屏幕显示区域的移动。After filtering out the content block that the user wants to read as above, the moving unit 450 moves the screen display area of the mobile terminal to the position of the selected content block for aligned display. In an example of the present invention, the moving unit may further include a calculating unit (not shown), configured to calculate the moving track of the screen display area of the mobile terminal according to the position coordinates and screen coordinates of the selected content block. Then, the moving unit moves the screen display area of the mobile terminal to the position of the selected content block for aligned display based on the calculated moving trajectory. Those skilled in the art should understand that the above moving manner is just an example. In other embodiments of the present invention, other methods known in the art may also be used to realize the above-mentioned movement of the screen display area.

此外,在本发明的一个优选实施例中,在接收到用户的点击后,对齐装置400还可以包括第三判断单元(未示出),用于判断所点击的区域是否是可点击元素,以及执行单元,用于在判断出所点击的区域是可点击元素时,执行对该页面的点击操作。在判断出所点击的区域不是可点击元素时,所述矩形区域生成单元生成以点击位置为中心的矩形区域,并且搜索单元430在该矩形区域中搜索存在交叠的可对齐内容块。In addition, in a preferred embodiment of the present invention, after receiving the user's click, the alignment device 400 may further include a third judging unit (not shown), for judging whether the clicked area is a clickable element, and The execution unit is configured to perform a click operation on the page when it is determined that the clicked area is a clickable element. When it is determined that the clicked area is not a clickable element, the rectangular area generating unit generates a rectangular area centered on the clicked position, and the searching unit 430 searches for overlapping alignable content blocks in the rectangular area.

图5示出了包含根据本发明的图4中示出的对齐装置400的移动终端的浏览器50的示意图。图6示出了包含本发明的图5中示出的浏览器50的移动终端10的示意图。FIG. 5 shows a schematic diagram of a browser 50 of a mobile terminal including the alignment device 400 shown in FIG. 4 according to the present invention. FIG. 6 shows a schematic diagram of a mobile terminal 10 including the browser 50 shown in FIG. 5 of the present invention.

此外,典型地,本发明所述的移动终端可为各种手持终端设备,例如手机、个人数字助理(PDA)等,因此本发明的保护范围不应限定为某种特定类型的移动终端。In addition, typically, the mobile terminals described in the present invention can be various handheld terminal devices, such as mobile phones, personal digital assistants (PDAs), etc., so the protection scope of the present invention should not be limited to a specific type of mobile terminals.

此外,根据本发明的方法还可以被实现为由CPU执行的计算机程序。在该计算机程序被CPU执行时,执行本发明的方法中限定的上述功能。Furthermore, the method according to the present invention can also be implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, the above-mentioned functions defined in the method of the present invention are performed.

此外,上述方法步骤以及系统单元也可以利用控制器以及用于存储使得控制器实现上述步骤或单元功能的计算机程序的计算机可读存储设备实现。In addition, the above-mentioned method steps and system units can also be implemented by using a controller and a computer-readable storage device for storing a computer program that enables the controller to realize the functions of the above-mentioned steps or units.

此外,应该明白的是,本文所述的计算机可读存储设备(例如,存储器)可以是易失性存储器或非易失性存储器,或者可以包括易失性存储器和非易失性存储器两者。作为例子而非限制性的,非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦写可编程ROM(EEPROM)或快闪存储器。易失性存储器可以包括随机存取存储器(RAM),该RAM可以充当外部高速缓存存储器。作为例子而非限制性的,RAM可以以多种形式获得,比如同步RAM(DRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据速率SDRAM(DDR SDRAM)、增强SDRAM(ESDRAM)、同步链路DRAM(SLDRAM)以及直接RambusRAM(DRRAM)。所公开的方面的存储设备意在包括但不限于这些和其它合适类型的存储器。In addition, it should be appreciated that the computer readable storage devices (eg, memories) described herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example and not limitation, nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory memory. Volatile memory can include random access memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in various forms such as Synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM) and Direct RambusRAM (DRRAM). Storage devices of the disclosed aspects are intended to include, but are not limited to, these and other suitable types of memory.

本领域技术人员还将明白的是,结合这里的公开所描述的各种示例性逻辑块、模块、电路和算法步骤可以被实现为电子硬件、计算机软件或两者的组合。为了清楚地说明硬件和软件的这种可互换性,已经就各种示意性组件、方块、模块、电路和步骤的功能对其进行了一般性的描述。这种功能是被实现为软件还是被实现为硬件取决于具体应用以及施加给整个系统的设计约束。本领域技术人员可以针对每种具体应用以各种方式来实现所述的功能,但是这种实现决定不应被解释为导致脱离本发明的范围。Those of skill would also appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described generally in terms of their functionality. Whether such functionality is implemented as software or as hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

结合这里的公开所描述的各种示例性逻辑块、模块和电路可以利用被设计成用于执行这里所述功能的下列部件来实现或执行:通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或其它可编程逻辑器件、分立门或晶体管逻辑、分立的硬件组件或者这些部件的任何组合。通用处理器可以是微处理器,但是可替换地,处理器可以是任何传统处理器、控制器、微控制器或状态机。处理器也可以被实现为计算设备的组合,例如,DSP和微处理器的组合、多个微处理器、一个或多个微处理器结合DSP核、或任何其它这种配置。The various exemplary logical blocks, modules, and circuits described in connection with the disclosure herein can be implemented or performed using the following components designed to perform the functions described herein: general-purpose processors, digital signal processors (DSPs), special-purpose Integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.

结合这里的公开所描述的方法或算法的步骤可以直接包含在硬件中、由处理器执行的软件模块中或这两者的组合中。软件模块可以驻留在RAM存储器、快闪存储器、ROM存储器、EPROM存储器、EEPROM存储器、寄存器、硬盘、可移动盘、CD-ROM、或本领域已知的任何其它形式的存储介质中。示例性的存储介质被耦合到处理器,使得处理器能够从该存储介质中读取信息或向该存储介质写入信息。在一个替换方案中,所述存储介质可以与处理器集成在一起。处理器和存储介质可以驻留在ASIC中。ASIC可以驻留在用户终端中。在一个替换方案中,处理器和存储介质可以作为分立组件驻留在用户终端中。The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of both. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In an alternative, the storage medium may be integrated with the processor. The processor and storage medium can reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and storage medium may reside as discrete components in the user terminal.

在一个或多个示例性设计中,所述功能可以在硬件、软件、固件或其任意组合中实现。如果在软件中实现,则可以将所述功能作为一个或多个指令或代码存储在计算机可读介质上或通过计算机可读介质来传送。计算机可读介质包括计算机存储介质和通信介质,该通信介质包括有助于将计算机程序从一个位置传送到另一个位置的任何介质。存储介质可以是能够被通用或专用计算机访问的任何可用介质。作为例子而非限制性的,该计算机可读介质可以包括RAM、ROM、EEPROM、CD-ROM或其它光盘存储设备、磁盘存储设备或其它磁性存储设备,或者是可以用于携带或存储形式为指令或数据结构的所需程序代码并且能够被通用或专用计算机或者通用或专用处理器访问的任何其它介质。此外,任何连接都可以适当地称为计算机可读介质。例如,如果使用同轴线缆、光纤线缆、双绞线、数字用户线路(DSL)或诸如红外线、无线电和微波的无线技术来从网站、服务器或其它远程源发送软件,则上述同轴线缆、光纤线缆、双绞线、DSL或诸如红外先、无线电和微波的无线技术均包括在介质的定义。如这里所使用的,磁盘和光盘包括压缩盘(CD)、激光盘、光盘、数字多功能盘(DVD)、软盘、蓝光盘,其中磁盘通常磁性地再现数据,而光盘利用激光光学地再现数据。上述内容的组合也应当包括在计算机可读介质的范围内。In one or more exemplary designs, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. Storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example and not limitation, the computer readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage device, magnetic disk storage device or other magnetic storage device, or may be used to carry or store instructions in Any other medium that can be accessed by a general purpose or special purpose computer or a general purpose or special purpose processor, and the required program code or data structure. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable Cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of media. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers . Combinations of the above should also be included within the scope of computer-readable media.

尽管前面公开的内容示出了本发明的示例性实施例,但是应当注意,在不背离权利要求限定的本发明的范围的前提下,可以进行多种改变和修改。根据这里描述的发明实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本发明的元素可以以个体形式描述或要求,但是也可以设想多个,除非明确限制为单数。While the foregoing disclosure shows exemplary embodiments of the invention, it should be noted that various changes and modifications can be made without departing from the scope of the invention as defined in the claims. The functions, steps and/or actions of the method claims in accordance with the embodiments of the invention described herein need not be performed in any particular order. Furthermore, although elements of the invention may be described or claimed in individual form, a plurality is also contemplated unless expressly limited to the singular.

虽然如上参照图描述了根据本发明的各个实施例进行了描述,但是本领域技术人员应当理解,对上述本发明所提出的各个实施例,还可以在不脱离本发明内容的基础上做出各种改进。因此,本发明的保护范围应当由所附的权利要求书的内容确定。Although the various embodiments of the present invention have been described above with reference to the drawings, those skilled in the art should understand that various embodiments can be made without departing from the content of the present invention for the various embodiments of the present invention. kind of improvement. Therefore, the protection scope of the present invention should be determined by the contents of the appended claims.

Claims (9)

1. one kind is used for carrying out the method that content of pages aligns when the browsing page page, comprising:
After the click that receives the page shown on the browser of user to mobile terminal, generate the rectangular area of the pre-sizing centered by this click location, wherein, the scope of described pre-sizing is from a pixel to whole screen size;
In the rectangular area that generates, there is overlapping alignd content blocks in search with this rectangular area;
Based on the overlapping area between the rectangular area that generates and the alignd content blocks that searches out, and/or the position relationship between click location and the alignd content blocks that searches out, the alignd content blocks that searches out is compared the content blocks that screening will be read therefrom to select the user; And
The position that the on-screen display (osd) area of mobile terminal the is moved to selected content blocks demonstration of aliging,
Wherein, the described content blocks that aligns is the content blocks that satisfies simultaneously following condition: it is wide that the width of the father node of (1) this content blocks is not less than the screen of mobile terminal, (2) width of this content blocks be not less than mobile terminal 1/4 the screen wide, and (3) child node is the text category node, and it is wide that perhaps the width of child node is not more than the screen of mobile terminal.
2. the method for claim 1, wherein, based on the overlapping area between the rectangular area that generates and the alignd content blocks that searches out, and/or the position relationship between click location and the alignd content blocks that searches out, the step that the alignd content blocks that searches out is compared screening comprises:
Judge first can align content blocks and described rectangular area overlapping area whether more than or equal to second can align content blocks and described rectangular area overlapping area predetermined doubly with;
If predetermined doubly select first content blocks that can align more than or equal to described, the content blocks that will read as the user,
If predetermined doubly judge whether described click location is arranged in first or second content blocks that can align less than described,
If described click location can be alignd in content blocks first or second, the alignd content blocks of selecting described click location to be positioned at, the content blocks that will read as the user,
If described click location can not alignd in content blocks first and second, more described click location and the first and second left hand edge distance of content blocks of can aliging, and
Select little the alignd content blocks of left hand edge and distance between described click location, the content blocks that will read as the user.
3. the position that the method for claim 1, wherein on-screen display (osd) area of mobile terminal the is moved to selected content blocks step that shows of aliging comprises:
According to position coordinates and the screen coordinate of selected content blocks, calculate the motion track of the on-screen display (osd) area of mobile terminal; And
Based on the motion track that calculates, the position that the on-screen display (osd) area of mobile terminal the is moved to selected content blocks demonstration of aliging.
4. the method for claim 1, wherein described pre-sizing is 1/4 screen size.
5. the method for claim 1 after receiving the click of user to the shown page, also comprises:
Whether the zone that judgement is clicked is to click element,
Be in the time of can clicking element in the zone of clicking, carry out the clicking operation to this page, and
Not in the time of can clicking element in the zone of clicking, carry out the search operation of the overlapping content blocks that aligns in the rectangular area of pre-sizing.
6. one kind is used for carrying out the alignment means that content of pages aligns when the browsing page page, comprising:
Receiving element is used for receiving the click that is used for the page shown on the browser to mobile terminal;
The rectangular area generation unit, be used for after the click that receives the page shown on the browser of user to mobile terminal, the rectangular area of the pre-sizing of generation centered by this click location, wherein, the scope of described pre-sizing is from a pixel to whole screen size;
Search unit is used in the rectangular area that generates, and there is overlapping alignd content blocks in search with this rectangular area;
The screening unit, be used for based on the overlapping area between the rectangular area that generates and the alignd content blocks that searches out, and/or the position relationship between click location and the alignd content blocks that searches out, the alignd content blocks that searches out is compared the content blocks that screening will be read therefrom to select the user; And
The position that mobile unit, the on-screen display (osd) area that is used for mobile terminal the move to selected content blocks demonstration of aliging,
Wherein, the described content blocks that aligns is the content blocks that satisfies simultaneously following condition: it is wide that the width of the father node of (1) this content blocks is not less than the screen of mobile terminal, (2) width of this content blocks be not less than mobile terminal 1/4 the screen wide, and (3) child node is the text category node, and it is wide that perhaps the width of child node is not more than the screen of mobile terminal.
7. alignment means as claimed in claim 6, wherein, described screening unit also comprises:
The first judging unit is used for judge that first can align the overlapping area of content blocks and described rectangular area whether more than or equal to the second being scheduled to times of overlapping area that can align content blocks and described rectangular area;
The second judging unit, be used for when judging the first overlapping area that can align content blocks and described rectangular area and can align being scheduled to times of overlapping area of content blocks and described rectangular area less than second, judge whether described click location is arranged in first or second content blocks that can align; And
Comparing unit is used in described click location not when first and second can align content blocks, can the align left hand edge distance of content blocks of more described click location and first and second,
Wherein, if the first judgment unit judges is first can align the overlapping area of content blocks and described rectangular area more than or equal to second overlapping area doubly predetermined that can align content blocks and described rectangular area, first content blocks that can align is selected in described screening unit, the content blocks that will read as the user
If going out described click location, the second judgment unit judges can align in content blocks first or second, described screening unit the alignd content blocks of selecting described click location to be positioned at, and the content blocks that will read as the user,
If described click location can not alignd in content blocks first and second, little the alignd content blocks of left hand edge and distance between described click location is selected in described screening unit, the content blocks that will read as the user.
8. alignment means as claimed in claim 6, described mobile unit also comprises:
Computing unit is used for position coordinates and screen coordinate according to selected content blocks, calculates the motion track of on-screen display (osd) area,
Described mobile unit is based on the motion track that calculates, the position that on-screen display (osd) area the is moved to selected content blocks demonstration of aliging.
9. alignment means as claimed in claim 6 also comprises:
The 3rd judging unit is used for after receiving the click of user to the shown page, and whether the zone that judgement is clicked is to click element,
Performance element, being used for is in the time of can clicking element in the zone of clicking, and carries out the clicking operation to this page,
Be not in the time of can clicking element in the zone of clicking, described search unit carries out the search operation of the overlapping content blocks that aligns in the rectangular area of pre-sizing.
CN 201110265587 2011-09-08 2011-09-08 Page content alignment method, device and mobile terminal browser Expired - Fee Related CN102368244B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110265587 CN102368244B (en) 2011-09-08 2011-09-08 Page content alignment method, device and mobile terminal browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110265587 CN102368244B (en) 2011-09-08 2011-09-08 Page content alignment method, device and mobile terminal browser

Publications (2)

Publication Number Publication Date
CN102368244A CN102368244A (en) 2012-03-07
CN102368244B true CN102368244B (en) 2013-05-15

Family

ID=45760809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110265587 Expired - Fee Related CN102368244B (en) 2011-09-08 2011-09-08 Page content alignment method, device and mobile terminal browser

Country Status (1)

Country Link
CN (1) CN102368244B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103324454B (en) * 2013-05-23 2016-12-28 百度在线网络技术(北京)有限公司 For the method and apparatus detecting the display element of arrangement dislocation in target area
CN104854559A (en) * 2014-10-16 2015-08-19 深圳市融资城网络服务中心有限公司 Internet page unit aligning method and apparatus
CN107885437A (en) * 2017-11-29 2018-04-06 广州视源电子科技股份有限公司 multi-element interaction method, device, equipment and storage medium
CN110148199B (en) * 2018-02-11 2021-06-04 北京新唐思创教育科技有限公司 Courseware-based graffiti area generation method and computer storage medium
CN110780865B (en) * 2019-09-20 2022-06-07 苏州浪潮智能科技有限公司 Method, equipment and medium for right-side alignment display of command line
CN115344260A (en) * 2022-08-31 2022-11-15 北京字跳网络技术有限公司 Page layout method, device, terminal and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716252A (en) * 2004-06-30 2006-01-04 微软公司 Aligned behavior in templated lists
CN101146128A (en) * 2007-10-30 2008-03-19 杨金钰 Method for Allowing Small-Screen Mobile Terminals to Access and Browse WWW Websites
CN101477564A (en) * 2009-01-21 2009-07-08 北京千家悦网络科技有限公司 Intelligent layout method for displaying wide web page on narrow-screen equipment
CN101834941A (en) * 2010-04-01 2010-09-15 宇龙计算机通信科技(深圳)有限公司 Method, system and mobile terminal for generating browser page link
CN102024055A (en) * 2010-12-20 2011-04-20 广州市动景计算机科技有限公司 Automatic alignment method and device during mobile terminal web browsing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110157322A1 (en) * 2009-12-31 2011-06-30 Broadcom Corporation Controlling a pixel array to support an adaptable light manipulator

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716252A (en) * 2004-06-30 2006-01-04 微软公司 Aligned behavior in templated lists
CN101146128A (en) * 2007-10-30 2008-03-19 杨金钰 Method for Allowing Small-Screen Mobile Terminals to Access and Browse WWW Websites
CN101477564A (en) * 2009-01-21 2009-07-08 北京千家悦网络科技有限公司 Intelligent layout method for displaying wide web page on narrow-screen equipment
CN101834941A (en) * 2010-04-01 2010-09-15 宇龙计算机通信科技(深圳)有限公司 Method, system and mobile terminal for generating browser page link
CN102024055A (en) * 2010-12-20 2011-04-20 广州市动景计算机科技有限公司 Automatic alignment method and device during mobile terminal web browsing

Also Published As

Publication number Publication date
CN102368244A (en) 2012-03-07

Similar Documents

Publication Publication Date Title
US8572076B2 (en) Location context mining
CN102368244B (en) Page content alignment method, device and mobile terminal browser
JP5571091B2 (en) Providing search results
US9760541B2 (en) Systems and methods for delivery techniques of contextualized services on mobile devices
KR101953303B1 (en) Identifying matching applications based on browsing activity
US9756140B2 (en) Tracking user behavior relative to a network page
US9659067B2 (en) Providing a search results document that includes a user interface for performing an action in connection with a web page identified in the search results document
TWI611338B (en) Method, electronic device and computer program product for scaling a screen
JP7119124B2 (en) Action indicator for search behavior output element
CN102147702A (en) Method and apparatus for selecting hyperlinks
CN105335071A (en) Method and device for displaying page elements
US9690855B2 (en) Method and system for searching for a web document
JP6364064B2 (en) Web page display device, method thereof and computer program thereof
CN106484726B (en) A page display method and device
US20140358631A1 (en) Method and apparatus for generating frequently asked questions
US20170220671A1 (en) System, method, and apparatus for collecting and processing user feedback on webpages
US20150046462A1 (en) Identifying actions in documents using options in menus
CN103729439B (en) A kind of webpage preloads method and apparatus
US9201951B2 (en) System and method for providing search results
US20150058710A1 (en) Navigating fixed format document in e-reader application
CN111602129B (en) Smart search for annotations and ink
KR101507779B1 (en) Method for processing favorite using recognizing motion of terminal
CN105988703A (en) Business object display method and apparatus
CN104899287A (en) Webpage display method and device
CN108280101A (en) user terminal and web page picture resource loading device and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200630

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Alibaba (China) Co.,Ltd.

Address before: 2, 16, 301 rooms, 510665 Yun Yun Road, Tianhe District, Guangdong, Guangzhou

Patentee before: Guangzhou Dongjing Computer Technology Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130515

Termination date: 20210908

CF01 Termination of patent right due to non-payment of annual fee