Page positioning method and device
Technical field
The application is related to network technique field, more particularly to a kind of page positioning method and device.
Background technology
With the fast development of Internet technology, increasing user obtains information by internet, than
Such as:Browse webpage, searching document etc..In correlation technique, when the page that user browses is longer, user
The content for being positioned to browse generally is taken a lot of time, it is less efficient that the page is positioned, influence user's
Viewing experience.
The content of the invention
In view of this, the application provides a kind of page positioning method and device, to solve page in correlation technique
The problem of face location efficiency is relatively low.
Specifically, the application is achieved by the following technical solution:
A kind of page positioning method, methods described includes:
After the selection instruction for default anchor point icon input is detected, current page positioning is obtained;
The corresponding anchor point link of the anchor point icon is determined according to current page positioning;
Current page is repositioned based on anchor point link.
Optionally, the acquisition current page positioning, including:
When the selection instruction is single key command, current page positioning is obtained.
It is optionally, described to determine that the corresponding anchor point of the anchor point icon is linked according to current page positioning,
Including:
When the default anchor point icon is the first anchor point icon, the current page is positioned into corresponding anchor
The previous anchor point link of point link is defined as the corresponding anchor point link of the first anchor point icon;
When the default anchor point icon is the second anchor point icon, the current page is positioned into corresponding anchor
The latter anchor point link of point link is defined as the corresponding anchor point link of the first anchor point icon;
Wherein, the first anchor point icon is different from the second anchor point icon, the institute of the current page
There is anchor point link to be sorted from top to bottom based on page layout.
Optionally, when the selection instruction is non-single key command, methods described also includes:
When the default anchor point icon is the first anchor point icon, current page is repositioned onto page
At the top of face;
When the default anchor point icon is the second anchor point icon, current page is repositioned onto page
Face bottom.
Optionally, the first anchor point icon is upward icon, and the second anchor point icon is downward
Icon.
A kind of page positioner, described device includes:
Current positioning unit, after the selection instruction for default anchor point icon input is detected, obtains and works as
Preceding page positioning;
Determining unit is linked, the corresponding anchor point chain of the anchor point icon is determined according to current page positioning
Connect;
Unit is repositioned, current page is repositioned based on anchor point link.
Optionally, the current positioning unit, when the selection instruction is single key command, obtains current
The page is positioned.
Optionally, the link determining unit, when the default anchor point icon is the first anchor point icon,
The previous anchor point link that the current page is positioned into corresponding anchor point link is defined as first anchor point
The corresponding anchor point link of icon;, will be described current when the default anchor point icon is the second anchor point icon
It is corresponding that the latter anchor point link of the corresponding anchor point link of page positioning is defined as the first anchor point icon
Anchor point is linked;
Wherein, the first anchor point icon is different from the second anchor point icon, the institute of the current page
There is anchor point link to be sorted from top to bottom based on page layout.
Optionally, the repositioning unit, is non-single key command in the selection instruction, and described pre-
If anchor point icon is the first anchor point icon, current page is repositioned onto page top;Institute
Selection instruction is stated for non-single key command, and the default anchor point icon is when being the second anchor point icon, will
Current page is repositioned onto page bottom.
Optionally, the first anchor point icon is upward icon, and the second anchor point icon is downward
Icon.
The application terminal is detecting the choosing for default anchor point icon input it can be seen from above description
Select after instruction, current page positioning can be obtained, the anchor point figure is determined according to current page positioning
Corresponding anchor point link is marked, and current page is repositioned based on anchor point link, so as to basis
Current page positioning is dynamically determined the corresponding anchor point link of anchor point icon, realizes for different page locations
Location requirement, improves the efficiency of page positioning, lifts the viewing experience of user.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of page positioning method shown in the exemplary embodiment of the application one.
Fig. 2 is that a kind of structure for page positioner shown in the exemplary embodiment of the application one is shown
It is intended to.
Fig. 3 is a kind of structural representation of page positioner shown in the exemplary embodiment of the application one.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following
When description is related to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous
Key element.Embodiment described in following exemplary embodiment does not represent the institute consistent with the application
There is embodiment.On the contrary, they are only one be described in detail in such as appended claims, the application
The example of the consistent apparatus and method of a little aspects.
It is the purpose only merely for description specific embodiment in term used in this application, and is not intended to be limiting
The application." one kind ", " institute of singulative used in the application and appended claims
State " and "the" be also intended to including most forms, unless context clearly shows that other implications.Should also
Work as understanding, term "and/or" used herein refers to and associated lists item comprising one or more
Purpose any or all may combine.
It will be appreciated that though may describe various using term first, second, third, etc. in the application
Information, but these information should not necessarily be limited by these terms.These terms only be used for by same type of information that
This is distinguished.For example, in the case where not departing from the application scope, the first information can also be referred to as
Two information, similarly, the second information can also be referred to as the first information.Depending on linguistic context, as in this institute
Use word " if " can be construed to " and ... when " or " when ... when " or " response
In it is determined that ".
In correlation technique, when the page of webpage is longer, developer would generally be provided for back page
The anchor point icon at top, such as:One upward arrow, or one " Top " mark etc..User
In browsing pages, the page can be navigated to by top by the anchor point icon at the top of back page again.
However, in such implementation, can only back within the top of the page, limitation is larger,
The demand of a variety of positioning can not be met.
In view of the above-mentioned problems, the application provides a kind of page targeting scheme, detecting for default anchor point
After the selection instruction of icon input, current page positioning can be obtained, is positioned according to the current page true
Determine the corresponding anchor point link of the anchor point icon, and current page repositioned based on anchor point link,
Link, realized for not so as to be dynamically determined the corresponding anchor point of anchor point icon according to current page positioning
With the location requirement of page location, the efficiency of page positioning is improved.
Fig. 1 is a kind of schematic flow sheet of page positioning method shown in the exemplary embodiment of the application one.
Fig. 1 is refer to, the page positioning method can be using in the terminal, and the terminal can include
Smart mobile phone, tablet personal computer, PDA (Personal Digital Assistant, palm PC), PC
Deng smart machine.The page positioning method may comprise steps of:
Step 101, after the selection instruction for default anchor point icon input is detected, current page is obtained
Face is positioned.
In the present embodiment, the quantity and pattern of the anchor point icon can be configured by developer,
Such as:Developer can set two anchor point icons, and one of anchor point icon is upward arrow,
Another anchor point icon is downward arrow, it is of course also possible to which one of anchor point icon is set into text
Word " upward ", is set to word " downward " etc., the application does not make spy to this by another anchor point icon
Different limitation.
In the present embodiment, multiple anchor point links can also be pre-set, each anchor point links corresponding page
In a position, such as:URL (the Uniform of some position in each anchor point link corresponding page
Resource Locator, URL).Developer can be based on the page curriculum offering institute
Multiple anchor point links are stated, such as:In addition to the anchor point link of traditional page top, bottom, can also be
Per the one anchor point link of one-level curriculum offering in the page, or the curriculum offering of sane level relation in the page
Anchor point link etc., the application is not particularly limited to this.
As an example it is assumed that certain page is divided into the content of four sane levels, respectively chapters and sections one, chapters and sections two,
Chapters and sections three and chapters and sections four, then for the content of pages of sane level, can set four anchor point links, respectively
The above-mentioned chapters and sections one of correspondence, further, it is also possible to set two anchor point links again, correspond to page respectively to chapters and sections four
At the top of face and page bottom, therefore, six anchor point links can be set by being had altogether for the page.It is optional
, according to custom is browsed, developer can be set gradually respectively based on the order of page layout from top to bottom
Individual anchor point link, refer to the example of table 1, and anchor point is linked at the top of 1 corresponding page, and anchor point links 2 pairs
Chapters and sections one are answered, the correspondence chapters and sections two of anchor point link 3, the correspondence chapters and sections three of anchor point link 4, anchor point links 5 pairs
Chapters and sections four are answered, anchor point links 6 corresponding page bottoms.
Anchor point is linked |
Corresponding page position |
Anchor point link 1 |
Page top |
Anchor point link 2 |
Chapters and sections one |
Anchor point link 3 |
Chapters and sections two |
Anchor point link 4 |
Chapters and sections three |
Anchor point link 5 |
Chapters and sections four |
Anchor point link 6 |
Page bottom |
Table 1
Certainly, in actual applications, can also base if current page is the page that left and right directions is browsed
The link of each anchor point is set gradually in the order of page layout from top to bottom, the application does not make special limit to this
System.
In the present embodiment, the quantity of the anchor point link of setting is typically larger than or equal to anchor point icon
Quantity, and need not set anchor point icon and anchor point link between corresponding relation.
In the present embodiment, the current page positioning typically refers to current page and positions corresponding anchor point chain
Connect.Still it is divided into the content of four sane levels with certain foregoing page, setting includes page top and page bottom
The link of six anchor points exemplified by, it is assumed that after the selection instruction for default anchor point icon input is detected,
The current page of display is chapters and sections two, then the current page positions corresponding anchor point and is linked as chapters and sections two
Anchor point is linked, i.e. anchor point link 3.
In the present embodiment, the selection instruction can include:Single key command, double-click instruction, right button list
Instruction, right double click instruction etc. are hit, the application is not particularly limited to this.
Step 102, determine that the corresponding anchor point of the anchor point icon is linked according to current page positioning.
, can be according to the current page after current page positioning is got based on abovementioned steps 101
Positioning is dynamically determined the corresponding anchor point link of the anchor point icon.
In the present embodiment, by taking the anchor point link shown in table 1 as an example, it is assumed that be previously provided with two differences
Anchor point icon, respectively the first anchor point icon and the second anchor point icon.In this step, for difference
Anchor point icon, the link of the anchor point icon corresponding anchor point can be determined in different ways.
Optionally, in one example of the application, when being detected in abovementioned steps 101 for described first
After the selection instruction of anchor point icon input, the current page can be positioned before corresponding anchor point link
One anchor point link is defined as the corresponding anchor point link of the first anchor point icon.Please further refer to table 1,
Assuming that current page, which positions corresponding anchor point, is linked as anchor point link 3, the previous anchor point of anchor point link 3
Anchor point link 2 is linked as, then can determine that the corresponding anchor point of the first anchor point icon is linked as anchor point chain
Connect 2.
Optionally, in the application another example, when being detected in abovementioned steps 101 for described
After the selection instruction of two anchor point icons input, the current page can be positioned to corresponding anchor point link
Latter anchor point link is defined as the corresponding anchor point link of the second anchor point icon.Please further refer to table
1, it is assumed that current page positions corresponding anchor point and is linked as anchor point link 3, latter anchor of anchor point link 3
Point is linked as anchor point link 4, then can determine that the corresponding anchor point of the second anchor point icon is linked as anchor point
Link 4.
Optionally,, more visually, can be by institute with reference to the example above in one example of the application
State the first anchor point icon and be set to upward icon, the second anchor point icon can be set to downward
Icon.It is of course also possible to by the first anchor point icon be set to word " on ", by second anchor
Point icon be set to word " under " etc., the application is not particularly limited to this.
Step 103, current page is repositioned based on anchor point link.
Based on abovementioned steps 102, it is determined that after the corresponding anchor point link of the anchor point icon, can be based on
Current page is repositioned in the anchor point link.
Still by taking table 1 as an example, it is determined that the corresponding anchor point of the first anchor point icon is linked as anchor point link 2
When, the page can be repositioned onto to chapters and sections one.It is determined that the corresponding anchor point chain of the second anchor point icon
When being connected in anchor point link 4, the page can be repositioned onto to chapters and sections three.
The application can be dynamically determined anchor point icon according to current page positioning it can be seen from above description
Corresponding anchor point link, realizes the location requirement for different page locations, improves the effect of page positioning
Rate, lifts the viewing experience of user.
Optionally, in the application another example, the choosing for default anchor point icon input is being detected
Select after instruction, different operations can be performed according to different selection instructions.Specifically, detecting
After selection instruction for presetting the input of anchor point icon, the type of the selection instruction can be first determined, when
When the selection instruction is single key command, current page positioning can be obtained, and perform subsequent step 102
With 103.When the selection instruction is non-single key command, such as:Double-click instruction, three hit instruction etc.,
Current page can be repositioned onto to page top or bottom.Included with the default anchor point icon foregoing
It is defeated for the first anchor point icon detecting exemplified by first anchor point icon and foregoing second anchor point icon
During the non-single key command entered, the page can be repositioned onto page top, detected for described the
During the non-single key command of two anchor point icons input, the page can be repositioned onto to page bottom, so as to
Each chapters and sections, page top and the quick positioning of page bottom are directed to be realized by two anchor point icons,
The anchor point icon of at the top of back page and page bottom need not be separately provided.
It is understood that in the application another example, current page is the page that left and right directions is browsed
During face, two anchor point icons can also be set, one of anchor point icon is icon to the left, another
Anchor point icon is icon to the right, when user click icon to the left, can be repositioned onto the page
Current page positions the previous anchor point link of corresponding anchor point link.When user click icon to the right,
Current page can be positioned to the latter anchor point link of corresponding anchor point link.When user double-clicks to the left
During icon, the page can be repositioned onto to the left side of the page., can when user double-clicks icon to the right
So that the page to be repositioned onto to the right side of the page, this is no longer going to repeat them by the application.
Embodiment with foregoing page positioning method is corresponding, and present invention also provides page positioner
Embodiment.
The embodiment of the application page positioner can be applied in terminal.Device embodiment can pass through
Software is realized, can also be realized by way of hardware or software and hardware combining.Exemplified by implemented in software,
It is by nonvolatile memory by the processor of terminal where it as the device on a logical meaning
In corresponding computer program instructions read in internal memory what operation was formed.For hardware view, such as scheme
It is a kind of hardware structure diagram of terminal where the application page positioner, except shown in Fig. 2 shown in 2
Processor, internal memory, network interface and nonvolatile memory outside, in embodiment where device
Terminal generally according to the terminal actual functional capability, can also include other hardware, this is repeated no more.
Fig. 3 is a kind of structural representation of page positioner shown in the exemplary embodiment of the application one.
Fig. 3 is refer to, the page positioner 200 can be applied in the terminal shown in earlier figures 2,
Include:Current positioning unit 201, link determining unit 202 and repositioning unit 203.
Wherein, the current positioning unit 201, is detecting the selection for default anchor point icon input
After instruction, current page positioning is obtained;
The link determining unit 202, the anchor point icon correspondence is determined according to current page positioning
Anchor point link;
The repositioning unit 203, current page is repositioned based on anchor point link.
Optionally, the current positioning unit 201, when the selection instruction is single key command, is obtained
Current page is positioned.
Optionally, the link determining unit 202, is the first anchor point icon in the default anchor point icon
When, the previous anchor point link that the current page is positioned into corresponding anchor point link is defined as described first
The corresponding anchor point link of anchor point icon;, will be described when the default anchor point icon is the second anchor point icon
The latter anchor point link that current page positions corresponding anchor point link is defined as the first anchor point icon pair
The anchor point link answered;
Wherein, the first anchor point icon is different from the second anchor point icon, the institute of the current page
There is anchor point link to be sorted from top to bottom based on page layout.
Optionally, the repositioning unit 203, is non-single key command, and institute in the selection instruction
When stating default anchor point icon for the first anchor point icon, current page is repositioned onto page top;
The selection instruction be non-single key command, and the default anchor point icon be the second anchor point icon when,
Current page is repositioned onto page bottom.
Optionally, the first anchor point icon is upward icon, and the second anchor point icon is downward
Icon.
The function of unit and the implementation process of effect specifically refer to correspondence in the above method in said apparatus
The implementation process of step, will not be repeated here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is joined
See the part explanation of embodiment of the method.Device embodiment described above be only it is schematical,
The wherein described unit illustrated as separating component can be or may not be it is physically separate, make
It can be for the part that unit is shown or may not be physical location, you can with positioned at a place,
Or can also be distributed on multiple NEs.Can select according to the actual needs part therein or
Person's whole modules realize the purpose of application scheme.Those of ordinary skill in the art are not paying creativeness
In the case of work, you can to understand and implement.
The preferred embodiment of the application is the foregoing is only, it is all at this not to limit the application
Within the spirit and principle of application, any modification, equivalent substitution and improvements done etc. should be included in
Within the scope of the application protection.