Summary of the invention
In view of the above problems, it is proposed that the present invention in case provide one overcome the problems referred to above or at least in part solve or
Person slows down the page switching method for browser of the problems referred to above and corresponding device.
In order to solve above-mentioned technical problem, this application provides a kind of page switching method for browser, including: obtain
Take the bitmap of adjacent label page, and generate synthesis bitmap according to the bitmap of adjacent label page;Listening to generation page layout switch thing
During part, in browser window, show described synthesis bitmap, and the page layout switch parameter combining described page layout switch event is carried out
Switching between adjacent label page;Wherein, when listening to occur page layout switch event, in browser window, described conjunction is shown
Become bitmap, and the page layout switch parameter combining described page layout switch event carries out the switching between adjacent label page, wraps further
Include: described browser window is arranged demarcation line;Intercept the mouse slip event in described page layout switch event, at browser window
The synthesis bitmap of the bitmap of current label page and the bitmap of mouse glide direction rightabout adjacent label page is shown in mouthful;Work as Mus
When mouse coordinates position in mark sliding process is slided into opposite side by described marginal side, make described adjacent label page complete
Entirely it is switched in described browser window show.
Preferably, in browser window, show described synthesis bitmap, farther include: according to mouse slide distance with
And in the synthesis bitmap that shows in described browser window of the width control system of browser window, the bitmap of described adjacent label page
The most shared part.
Preferably, described method farther includes: according to when switching between the speed controlling adjacent label page that mouse slides
Page layout switch speed.
Preferably, generate synthesis bitmap according to the bitmap of adjacent label page, farther include: the position of splicing adjacent label page
Figure, the height of described synthesis bitmap is identical with the Bitmap Height of adjacent label page, and the width of described synthesis bitmap is adjacent label
The width sum of the bitmap of page;
In browser window, show described synthesis bitmap, farther include: according to mouse slide distance and browse
The region of the described synthesis bitmap that the width control system of device window shows in browser window.
Preferably, generate synthesis bitmap according to the bitmap of adjacent label page, farther include: obtain adjacent label page respectively
Part to be shown in browser window;Intercept described Partial Bitmap to be shown respectively;By the portion to be shown of described intercepting
Bitmap is divided to generate synthesis bitmap.
In order to solve above-mentioned technical problem, this application provides a kind of page layout switch device for browser, including, position
Figure synthesis module, for obtaining the bitmap of adjacent label page, and generates synthesis bitmap according to the bitmap of adjacent label page;The page is cut
Die change block, for when listening to occur page layout switch event, showing described synthesis bitmap, and combine institute in browser window
The page layout switch parameter stating page layout switch event carries out the switching between adjacent label page;Described page layout switch module is used further
In: described browser window is arranged demarcation line;Intercept the mouse slip event in described page layout switch event, at browser window
The synthesis bitmap of the bitmap of current label page and the bitmap of mouse glide direction rightabout adjacent label page is shown in mouthful;Work as Mus
When mouse coordinates position in mark sliding process is slided into opposite side by described marginal side, make described adjacent label page complete
Entirely it is switched in described browser window show.
Preferably, described bitmap synthesis module is further used for splicing the bitmap of adjacent label page, described synthesis bitmap
Height the most identical with the Bitmap Height of adjacent label page, the width of the bitmap that width is adjacent label page of described synthesis bitmap it
With;Described page layout switch module, when being additionally operable to show described synthesis bitmap in browser window, the distance slided according to mouse
And the region of described synthesis bitmap that the width control system of browser window shows in described browser window.
Preferably, to be additionally operable to obtain adjacent label page respectively to be shown in browser window for described bitmap synthesis module
Partly, intercept described Partial Bitmap to be shown respectively, generated synthesis bitmap by the Partial Bitmap to be shown of described intercepting.
Implementation according to the present invention enhances the association between the page before and after switching, the switching between front and back's page
Between achieve certain buffering so that page layout switch further can be controlled in handoff procedure by user.It addition,
Implementation according to the present invention will obtain the adjacent label page of current label page before user's switching command, and closes
Become the process of bitmap, thus during switching, response speed quickly, improves switch speed.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of description, and in order to allow above and other objects of the present invention, the feature and advantage can
Become apparent, below especially exemplified by the detailed description of the invention of the present invention.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing shows the disclosure
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should be by embodiments set forth here
Limited.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure
Complete conveys to those skilled in the art.The variation of existing web page element and by computer disposal speed, network speed
The restriction of degree, when showing new web page, render time is the longest, therefore considers not immediately turn on page object when page layout switch
Face, gives the buffer time of target pages one section, renders consumption for webpage;Within this period of buffer time, it is considered to for switching
Action simulation exhibition formula own can allow user understand whether browser currently in the response switched over and currently switches
Progress, this simulation shows considers directly to simulate the page, before and after directly the simulation page is equivalent to allow user be immediately seen switching
Page preview, user can be allowed intuitively to recognize, and the to be switched page is the most correct;And this visualization displaying can also embody
The association between page during page-out switching.
In the following embodiment of the present invention, generate synthesis bitmap by the bitmap according to adjacent label page;When listening to send out
During raw page layout switch event, in browser window, show described synthesis bitmap, and combine the page of described page layout switch event
Handoff parameter achieves the switching between adjacent label page, supports that the adjacent page of switching is grasped in handoff procedure by user
Make.
First embodiment
As it is shown in figure 1, be the embodiment of the present invention one page switching method schematic flow sheet for browser, the present embodiment
In, the page switching method for browser includes:
Step S101, the bitmap of acquisition adjacent label page, and generate synthesis bitmap according to the bitmap of adjacent label page;
When obtaining the bitmap of adjacent label page, in short, corresponding positions is drawn according to the content of pages of adjacent label page
Figure.
Specifically, can according to the browser of different kernels in different ways.Such as, at chrome kernel
Browser, create a memory bitmap in (render) process use in canvas(chrome code as drawing rendering
The object that family is drawn), allow render process repaint one time, thus obtain the page of arbitrary Shipping Options Page in adjacent label page
Bitmap.For under IE kernel, it is possible to use the Draw function of IviewObject interface is plotted to memory bitmap content of pages
In, thus obtain the web page bitmap of arbitrary Shipping Options Page in adjacent label page.
In the present embodiment, the height by keeping adjacent label page correspondence bitmap can be taked constant, and directly by adjacent mark
Label page correspondence bitmap carries out continuing of width and synthesizes bitmap to generate;Or, it is also possible to for be shown in adjacent label page
Part, and generate synthesis bitmap according to Partial Bitmap to be shown.Embodiment two as described below and embodiment three are recorded.
Step S103, listen to occur page layout switch event time, in browser window, show described synthesis bitmap, and
Page layout switch parameter in conjunction with described page layout switch event carries out the switching between adjacent label page.
In the present embodiment, as in figure 2 it is shown, be the stream of step S103 of the page switching method being used for browser shown in Fig. 1
Journey schematic diagram, step S103 may further include:
Step S1031, described browser window is arranged demarcation line;This demarcation line can be between adjacent two Shipping Options Pages
Neutrality line, it is also possible to be the neutrality line of whole screen, or other any suitable lines.
Step S1033, the mouse slip event intercepted in described page layout switch event, display of sliding in browser window
The synthesis bitmap of the bitmap of the bitmap of current label page and mouse glide direction rightabout adjacent label page.
Such as, mouse glide direction level to the left, now identifies user's it is intended that the page slides to the left, thus switches
The page adjacent on the right side of current label page;It is thus desirable in browser window slide display current label page bitmap with
The synthesis bitmap of the bitmap of right side adjacent label page.
Step S1035, when the mouse coordinates position in mouse sliding process is slided into another by described marginal side
During side, make described adjacent label page be switched to completely in described browser window and show.
Such as, when mouse glide direction the most from left to right, between demarcation line such as adjacent two Shipping Options Pages
When the left slide of neutrality line is to right side, described browser window shows bitmap and the left side adjacent label of current label page
The synthesis bitmap of the bitmap of page, so that adjacent label page is switched in described browser window show completely.
In the present embodiment, in step S103, the distance slided according to mouse and the width control system of browser window are clear
Look in device window in the synthesis bitmap of display, the part that the bitmap of described adjacent label page is each shared.Specifically, can basis
The distance that mouse slides controls in described browser window in the synthesis bitmap of display with the ratio of the width of browser window,
The ratio that the bitmap of described adjacent label page is each shared.
As it is shown on figure 3, be browser window change in step S103 of the page switching method of browser shown in Fig. 1
Schematic diagram, using the neutrality line 3 between adjacent two Shipping Options Pages 1 and Shipping Options Page 2 as demarcation line, determines according to mouse slip event
User performs to be switched to the operation of Shipping Options Page 2 from Shipping Options Page 1, then display label page 1 and Shipping Options Page 2 in browser window 4
The synthesis bitmap 5 of bitmap.Such as, when mouse glide direction the most from right to left, the most adjacent two labels from demarcation line
When the right side of the neutrality line between Ye slides into left side, detecting user is the behaviour performing to be switched to Shipping Options Page 2 from Shipping Options Page 1
Make, then in described browser window, show the synthesis bitmap of adjacent label page so that Shipping Options Page 2 be switched to completely described in browse
Device window shows.
In the present embodiment, when switching over, it is also possible to cut according between the speed controlling adjacent label page that mouse slides
Page layout switch speed when changing.Such as, if user operation mouse, making mouse sliding speed fast, page layout switch speed is the fastest, sliding
Dynamic speed can be linear, power, exponential relationship etc. with the speed of page layout switch.Consequently, it is possible to just can support that user is to the page
Conversion process be controlled.Furthermore, user with opposite direction sliding mouse, thus can return page layout switch just now
Operation, thus, the scheme that this case proposes supports that further controlling during page map is operated, to promote use by user
The operating flexibility at family and the controlling to handoff procedure.
When the switching of adjacent label page, if user's needs are switched to another label being adjacent from current label page
Page, can be by operation mouse so that cursor moves demarcation line from marginal side to opposite side, now would know that from currently
Shipping Options Page is switched to another Shipping Options Page, shows the synthesis bitmap of adjacent label page in described browser window;Detect Mus simultaneously
The speed that mark slides, and obtain the speed of page layout switch accordingly, according to the speed controlling synthesis bitmap of the page layout switch obtained to
Another Shipping Options Page rolls, when according to mouse action, when cursor moves to opposite side from marginal side, making another Shipping Options Page complete
Entirely it is switched in described browser window show.
Second embodiment
For the ease of realizing step S101 in above-mentioned Fig. 1 and S103, it may further include:
Step S101 shown in Fig. 1 may further include: the bitmap of splicing adjacent label page, described synthesis bitmap
Height the most identical with the Bitmap Height of adjacent label page, the width of the bitmap that width is adjacent label page of described synthesis bitmap it
With;
Described synthesis bitmap can be referred to as circle of equal altitudes, if the lateral dimension of browser display window is 1024 pixels,
The lateral dimension of the synthesis bitmap of two Shipping Options Page bitmaps is just 2048 pixels.
Step S103 shown in Fig. 1 may further include: the distance slided according to mouse and browser window
The starting point of the described synthesis bitmap shown by width control system and side-play amount.
The distance slided on browser window by mouse in detecting mouse sliding process, controls the display of synthesis bitmap
Region, controls starting point and the side-play amount of synthesis bitmap specifically.The api interface that such as can utilize Window is directly real
Existing, as follows:
As shown in Figure 4, for the embodiment of the present invention two synthesizing bitmap display schematic diagram, at adjacent two Shipping Options Pages 1 and mark
Neutrality line 3 between label page 2, as demarcation line, determines user to perform from Shipping Options Page 1 according to mouse slip event and is switched to label
The operation of page 2, then the synthesis bitmap 5 of the bitmap of display label page 1 and Shipping Options Page 2 in browser window 4, due to synthesis bitmap
It it is circle of equal altitudes.Therefore, according to distance and the size of browser window of mouse-over, determine Shipping Options Page 1 and Shipping Options Page 2
The displaying ratio that bitmap 1 ' and 2 ' is shared in browser window, can show synthesis bitmap in browser window.Such as, when
Mouse glide direction the most from right to left, slide by the right side of the neutrality line between demarcation line such as adjacent two Shipping Options Pages
During to left side, detecting user is in the operation performing to be switched to Shipping Options Page 2 from Shipping Options Page 1, then in described browser window
The synthesis bitmap of the bitmap 1 ' and 2 ' of display adjacent label page.
The method generating synthesis bitmap in the present embodiment realizes simple, it is only necessary to the bitmap drawing adjacent label page remerges
, but be because synthesizing bitmap and be equivalent to the size of two identical with browser display window size bitmap, and bitmap chi
Very little the biggest, the shared memory space of bitmap itself is the biggest, and the biggest bitmap carries out showing to be needed to take more internal memory,
Consumption for performance is bigger.
3rd embodiment
As it is shown in figure 5, be that the embodiment of the present invention three generates the schematic flow sheet synthesizing bitmap, in order to make full use of resource,
The scheme of synthesis bitmap contour from above-mentioned generation is different, and the step 101 in above-described embodiment one can also farther include:
Step S1011, the part that acquisition adjacent label page is to be shown in browser window respectively;
Have only to use a part of region of adjacent each Shipping Options Page content when generating synthesis bitmap, be not required to make
Complete bitmap with adjacent each Shipping Options Page.Situation about now can move according to mouse during slide handover, calculates in real time
Go out adjacent label page respectively by the part of display in browser window.Such as, in conjunction with Fig. 3, if with adjacent two Shipping Options Pages 1
With the neutrality line 3 between Shipping Options Page 2 is as demarcation line, determines user to perform from Shipping Options Page 1 according to mouse slip event and is switched to
The operation of Shipping Options Page 2, when mouse glide direction the most from right to left, between demarcation line such as adjacent two Shipping Options Pages
When the right side of neutrality line slides into left side, detecting user is in the operation performing to be switched to Shipping Options Page 2 from Shipping Options Page 1, then exist
Described browser window shows synthesis bitmap rather than Shipping Options Page 1, the Shipping Options Page of Partial Bitmap to be shown in adjacent label page
The synthesis bitmap of 2 whole Shipping Options Page correspondence bitmaps.
Step S1013, intercept Partial Bitmap to be shown respectively;
Draw respectively and obtain the respective bitmap of adjacent label page, go out accordingly according to portion intercepts to be shown on each bitmap
Partial Bitmap;
Step S1015, generated synthesis bitmap by the Partial Bitmap to be shown that intercepts.
The two pieces of Partial Bitmap intercepted out are pieced together the bitmap of a final display.The size of this synthesis bitmap is permissible
In the same size with former Shipping Options Page bitmap.
The method generating synthesis bitmap in the present embodiment is to take full advantage of system resource, and real-time interception generates synthesis
Bitmap so that the size of bitmap has obtained good control, the consumption for system resource is less, but since it is desired that according to cunning
The situation that during dynamic switching, mouse moves generates bitmap in real time, it is achieved upper complex.
4th embodiment
As shown in Figure 6, the structural representation of the page layout switch device of browser it is used for for the embodiment of the present invention four.
The described page layout switch device for browser, including: bitmap synthesis module 601 and page layout switch module 602, its
In,
Bitmap synthesis module 601, for obtaining the bitmap of adjacent label page, and generates conjunction according to the bitmap of adjacent label page
Become bitmap;Described bitmap synthesis module 601 can be image processor, for special disposal figure drafting, intercept, synthesize,
The present invention is not limited to this;
Page layout switch module 602, for when listening to occur page layout switch event, in browser window, display is described
Synthesize bitmap, and the page layout switch parameter combining described page layout switch event carries out the switching between adjacent label page, Qi Zhong
When showing described synthesis bitmap in browser window, the distance slided according to mouse and the width control system of browser window are in institute
State in browser window in the synthesis bitmap of display, the part that the bitmap of described adjacent label page is each shared;Page layout switch mould
Block 602 is additionally operable to page layout switch speed when switching between the speed controlling adjacent label page according to mouse slip;The described page
Handover module 602 can be central processing unit, is used for managing image processor, and the intercepting of responsible mouse event, synthesizes bitmap
Display and the enforcement of page layout switch, the present invention is not limited to this;
Certainly, selectively, the present invention can also include that memorizer, described memorizer can be internal memory or caching, uses
Described synthesis bitmap is stored so that central processing unit calls in interim.
In the embodiment of the present invention four, bitmap synthesis module 601 is additionally operable to splice the bitmap of adjacent label page, described synthesis position
The height of figure is identical with the Bitmap Height of adjacent label page, the width of the bitmap that width is adjacent label page of described synthesis bitmap
Sum;
In the embodiment of the present invention four, page layout switch module 602 is additionally operable to show described synthesis bitmap in browser window
Time, the described synthesis that the distance slided according to mouse and the width control system of browser window show in described browser window
Bitmap region.
In the embodiment of the present invention four, bitmap synthesis module 601 can be also used for showing, obtain adjacent label page respectively is browsing
Part to be shown in device window, intercept described Partial Bitmap to be shown respectively;And to be shown for by described intercepting
Partial Bitmap generates synthesis bitmap.
In the embodiment of the present invention four, described page layout switch module 602 is further used for arranging described browser window dividing
Boundary line, the mouse slip event intercepted in described page layout switch event, show the bitmap of current label page in browser window
Synthesis bitmap with the bitmap of mouse glide direction rightabout adjacent label page;And for when the Mus in mouse sliding process
Mark coordinate position is when being slided into opposite side by described marginal side, make described adjacent label page be switched to completely described in browse
Device window shows.
5th embodiment
As it is shown in fig. 7, be the embodiment of the present invention five structural representation for the page layout switch device of browser.
The described page layout switch device for browser, including: image processor 701, memorizer 702 and central processing unit
703, wherein,
Image processor 701, for obtaining the bitmap of adjacent label page, and generates synthesis according to the bitmap of adjacent label page
Bitmap;
Memorizer 702, stores described synthesis bitmap for interim;
Central processing unit 703, for when listening to occur page layout switch event, showing described conjunction in browser window
Become bitmap, and the page layout switch parameter combining described page layout switch event carries out the switching between adjacent label page.
The feature of apparatus above embodiment is the most corresponding with the feature of embodiment of the method, and weak point refers to method and implements
Example.
The all parts embodiment of the present invention can realize with hardware, or to run on one or more processor
Software module realize, or with combinations thereof realize.It will be understood by those of skill in the art that and can use in practice
Microprocessor or digital signal processor (DSP) realize the some or all portions in equipment according to embodiments of the present invention
The some or all functions of part.The present invention is also implemented as the part for performing method as described herein or complete
The equipment in portion or device program (such as, computer program and computer program).Such program realizing the present invention
Can store on a computer-readable medium, or can be to have the form of one or more signal.Such signal is permissible
Download from internet website and obtain, or provide on carrier signal, or provide with any other form.
Such as, Fig. 7 shows and can realize the page layout switch device for browser according to the present invention, including memorizer
The computer program of 802 forms or computer-readable medium.Memorizer 702 can be such as flash memory, EEPROM(electricity can
Erasable programmable read-only memory (EPROM)), EPROM, the electronic memory of hard disk or ROM etc.Memorizer 702 has for performing
The memory space of the program code of any method step in said method.Such as, the memory space for program code is permissible
Including being respectively used to realize each program code of the various steps in above method.These program codes can from one or
The multiple computer program of person reads or is written in this one or more computer program.These computers
Program product includes such as hard disk, the program code carrier of compact-disc (CD), storage card or floppy disk etc.Such computer
Program product is usually portable or static memory cell.Program code can be compressed the most in a suitable form.Generally,
Memory element includes computer-readable code, and the code that i.e. can be read by the most such as processor, these codes are when by servicing
When device runs, this server is caused to perform each step in method described above.
" embodiment ", " embodiment " or " one or more embodiment " referred to herein is it is meant that combine
Special characteristic, structure or characteristic that embodiment describes are included at least one embodiment of the present invention.Further, it is noted that
Here word example " in one embodiment " is not necessarily all referring to same embodiment.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that the enforcement of the present invention
Example can be put into practice in the case of not having these details.In some instances, it is not shown specifically known method, knot
Structure and technology, in order to do not obscure the understanding of this description.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference marks that should not will be located between bracket is configured to limitations on claims.Word " comprises " and does not excludes the presence of not
Arrange element in the claims or step.Word "a" or "an" before being positioned at element does not excludes the presence of multiple such
Element.The present invention and can come real by means of including the hardware of some different elements by means of properly programmed computer
Existing.If in the unit claim listing equipment for drying, several in these devices can be by same hardware branch
Specifically embody.Word first, second and third use do not indicate that any order.These word explanations can be run after fame
Claim.
Furthermore, it should also be noted that the language used in this specification primarily to the readable and purpose of teaching and select
That select rather than select to explain or limit subject of the present invention.Therefore, without departing from appended claims
In the case of scope and spirit, many modifications and changes are all apparent for those skilled in the art
's.For the scope of the present invention, the disclosure being the present invention is illustrative and not restrictive, the scope of the present invention by
Appended claims limits.