CN105630478A - Method and device for realizing page switching - Google Patents

Method and device for realizing page switching Download PDF

Info

Publication number
CN105630478A
CN105630478A CN201410712785.5A CN201410712785A CN105630478A CN 105630478 A CN105630478 A CN 105630478A CN 201410712785 A CN201410712785 A CN 201410712785A CN 105630478 A CN105630478 A CN 105630478A
Authority
CN
China
Prior art keywords
canvas
animation information
mode
switching
page
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.)
Granted
Application number
CN201410712785.5A
Other languages
Chinese (zh)
Other versions
CN105630478B (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.)
Banma Zhixing Network Hongkong Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201410712785.5A priority Critical patent/CN105630478B/en
Publication of CN105630478A publication Critical patent/CN105630478A/en
Application granted granted Critical
Publication of CN105630478B publication Critical patent/CN105630478B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a method and a device for realizing page switching. A created window comprises N canvases which are completely or partially overlapped, wherein N is a positive integer greater than 1. The method comprises the following steps: when first page contents to be rendered is obtained from a server side, rendering the obtained first page contents to a first canvas which is not displayed at present in the window; and if a second canvas which displays second page contents is in the presence at present in the window, hiding the second canvas and displaying the first canvas after rendering is finished. The display resources of a terminal can be effectively utilized, and user experience is improved.

Description

Method and device for realizing page switching
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of computer application, in particular to a method and a device for realizing page switching.
[ background of the invention ]
For the currently mainstream web kernel, in the process of loading a web page, a web engine of the terminal creates a window, and then renders the page content of the web page into the window. And if the user clicks a link on the web page, a new web page is loaded, one page switching mode is to render the newly loaded web page to the original window, and the other page switching mode is to create a window again and render the newly loaded web page to the newly created window.
For the mode of directly rendering the newly loaded web page in the original window, the rendering effect of the previous web page needs to be eliminated first, and when the new web page is not completely rendered, the window is not displayed by the web page, so that a display blank appears in page switching, on one hand, display resources on a terminal are wasted, and on the other hand, a poor display effect is brought to a user.
For the way of rendering a newly loaded web page in a newly created window, multiple windows need to be opened, display resources on the terminal are occupied, contents displayed to a user are complicated, and the method is particularly unsuitable for the mobile terminal in which the display resources are relatively short (the screen is usually small).
[ summary of the invention ]
In view of this, the present invention provides a method and an apparatus for implementing page switching, so as to more effectively utilize display resources of a terminal and improve user experience.
The specific technical scheme is as follows:
the invention provides a method for realizing page switching.A created window comprises N canvases which are arranged in a full overlapping or partial overlapping way, wherein N is a positive integer which is more than 1; the method comprises the following steps:
when first page content to be rendered is obtained from a server, rendering the obtained first page content into a first canvas which is not displayed currently in the window;
and if the window currently has a second canvas displaying second page content, hiding the second canvas and displaying the first canvas after the rendering is finished.
According to a preferred embodiment of the invention, the window is created at the start of the web application or in response to a user request.
According to a preferred embodiment of the present invention, if the window does not currently have a second canvas displaying the content of the second page, the currently rendered first canvas is set to be visible, and the other canvases are set to be hidden.
According to a preferred embodiment of the invention, the method further comprises: acquiring a switching mode and/or animation information;
and hiding the canvas according to the hiding mode and/or the animation information in the switching mode, or displaying the canvas according to the displaying mode and/or the animation information in the switching mode.
According to a preferred embodiment of the present invention, the acquiring the switching method and/or the animation information includes:
acquiring a preset switching mode and/or animation information; or,
and acquiring the switching mode and/or the animation information from the server side.
According to a preferred embodiment of the present invention, the acquiring the switching mode and/or the animation information from the server includes:
and acquiring switching mode and/or animation information sent together with the page content to be rendered from the server side.
According to a preferred embodiment of the present invention, the switching mode and/or animation information transmitted with the page content to be rendered includes:
display mode and/or animation information and hiding mode and/or animation information of a canvas where the page content to be rendered is located; or,
display mode and/or animation information for the canvas on which the page content to be rendered is located and hiding mode and/or animation information for the currently displayed canvas.
According to a preferred embodiment of the present invention, the creating of the window including N canvases all arranged in an overlapping manner comprises:
the created window contains N canvases, the positions of the N canvases on x and y coordinates are the same, and the positions on a z-axis are offset, wherein a plane formed by the x and y axes is a plane parallel to the screen, and the z-axis is perpendicular to the screen.
According to a preferred embodiment of the present invention, the server is a cloud server, and the window is a window created by a web engine on a card-type desktop.
The invention also provides a device for realizing page switching, which comprises:
the device comprises a creating unit, a setting unit and a display unit, wherein the creating unit is used for creating a window containing N canvases which are arranged in a full overlapping or partial overlapping mode, and N is a positive integer larger than 1;
the first acquiring unit is used for acquiring first page content to be rendered from the server side;
the rendering unit is used for rendering the first page content acquired by the first acquisition unit into a first canvas which is not displayed currently in the window;
and the switching unit is used for hiding the second canvas and displaying the first canvas after the rendering of the rendering unit is finished if the second canvas displaying the second page content exists in the window currently.
According to a preferred embodiment of the invention, the creating unit creates the window when starting the web application or in response to a user request.
According to a preferred embodiment of the present invention, the switching unit is further configured to set the first canvas currently rendered by the rendering unit to be visible and the other canvases to be hidden if the second canvas displaying the second page content does not currently exist in the window.
According to a preferred embodiment of the invention, the apparatus further comprises: the second acquisition unit is used for acquiring the switching mode and/or the animation information;
the switching unit hides the canvas according to the hiding mode and/or the animation information in the switching mode, or displays the canvas according to the display mode and/or the animation information in the switching mode.
According to a preferred embodiment of the present invention, the second obtaining unit is specifically configured to obtain a preset switching manner and/or animation information, or obtain the switching manner and/or animation information from a server.
According to a preferred embodiment of the present invention, the second obtaining unit obtains, from the server side, switching manner and/or animation information transmitted along with the page content to be rendered.
According to a preferred embodiment of the present invention, the switching mode and/or animation information transmitted with the page content to be rendered includes:
display mode and/or animation information and hiding mode and/or animation information of a canvas where the page content to be rendered is located; or,
display mode and/or animation information for the canvas on which the page content to be rendered is located and hiding mode and/or animation information for the currently displayed canvas.
According to a preferred embodiment of the present invention, the creating unit is specifically configured to include N canvases in the created window, where the positions of the N canvases in the x and y coordinates are the same, and there is an offset in the position of the N canvases in the z axis, where the plane formed by the x and y axes is a plane parallel to the screen, and the z axis is perpendicular to the screen.
According to a preferred embodiment of the present invention, the device is disposed in a web engine on a card-type desktop, and the server is a cloud server.
According to the technical scheme, the plurality of canvases are overlapped in the page rendering window, the page is rendered into the canvas which is not displayed at present, and the currently displayed canvas is hidden and the newly rendered canvas is displayed after the rendering is finished. According to the method, the page content can be displayed by fully utilizing the display resources of the terminal screen and is not divided by a plurality of windows, when the page is switched, the page content which is not rendered can not be displayed, only the canvas which is rendered can replace the displayed canvas, the display resources of the terminal are effectively utilized, and the user experience is improved.
[ description of the drawings ]
Fig. 1 is a flowchart of a method for implementing page switching according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a page rendering window according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for implementing page switching according to a second embodiment of the present invention;
fig. 4 is a structural diagram of an apparatus according to a third embodiment of the present invention.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
The core idea of the invention is that the page contents before and after page switching are respectively rendered in a window in a multi-view mode, and the switching display between different views is realized in an animation mode. The method provided by the invention is described in detail in the following with reference to the first embodiment and the second embodiment.
The first embodiment,
Fig. 1 is a flowchart of a method for implementing page switching according to an embodiment of the present invention, and as shown in fig. 1, the flowchart may specifically include the following steps:
in step 101, when starting a web application, a web engine creates a window (or called a page rendering window) including N canvases, where N is a positive integer greater than 1, and the canvases are arranged in an overlapping manner in the window. The overlapping arrangement means that the positions of the coordinates of the canvas on the x-axis and the y-axis are consistent, the positions of the coordinates on the z-axis are offset, the plane formed by the x-axis and the y-axis is a plane parallel to the terminal screen, and the z-axis is perpendicular to the terminal screen, as shown in fig. 2, wherein N is taken as 3 in fig. 2. N canvases in the window can be in a complete overlapping setting or a partial overlapping setting, and if the canvas is in the partial overlapping setting, the positions of the coordinates of the canvases on the x axis and the y axis are partially the same.
In addition, the web engine may also lay out N canvases in a page rendering window when a user manually creates the page rendering window, that is, when the user establishes the page rendering window in response to the operation of establishing the window by the user. For example, when a user operates on a terminal to request the establishment of a page rendering window, the web engine creates a page rendering window containing N canvases.
In step 102, when the web engine obtains the content of the page to be rendered from the server, the content of the page is rendered into one of the canvases which is not currently displayed, and the canvas is set to be visible, and the other canvases are set to be hidden.
The step 102 is a step performed by the web engine when the current page rendering window renders the first page content, and if the current page rendering window renders the first page content of the page rendering window, the first page content is rendered into one of the currently undisplayed canvases, and the first canvas may be displayed by default and set to be visible. So that the page content can be displayed in the canvas.
In this step, the web engine may determine, after obtaining the content of the page to be rendered, whether the current window has a displayed canvas, that is, whether the current window is the first rendered page content, and if the current window does not have a displayed canvas, the current window indicates the first rendered canvas, and the current window may be directly set to be visible, or the current window may be set to be visible after rendering of the page content is completed.
In the embodiment of the present invention, the canvas may be implemented by View, and in this preferred embodiment, visibility and hiding may be set by setting a display attribute in View, for example, in an Andriod system, setview (View. View) may be used to set View normal display, and setview (View. invible) may be used to set View hiding.
Of course, the embodiments of the present invention are not limited to such visible and hidden implementation manners, and may also adopt a manner such as adjusting the hierarchy of the canvas, i.e., the hierarchy of the canvas to be displayed is increased and is placed at the top layer (i.e., the distance from the screen on the z-axis is the nearest), and the hierarchy of the canvas to be hidden is decreased, e.g., is placed below the displayed canvas (i.e., the distance from the screen on the z-axis is farther than the displayed canvas).
In addition, when the canvas is displayed, the page content of the canvas can be displayed by adopting a display mode and animation information in a preset switching mode. The preset switching manner and animation information will be described in detail in the subsequent step 104.
When the user clicks a link in a page to cause page switching, in step 103, when the web engine acquires the content of the page to be rendered from the server, the content is rendered into one of the currently-undisplayed canvases.
Similarly, after acquiring the content of the page to be rendered, the web engine determines whether the current window has a displayed canvas, and in this step, determines that the current window has a displayed canvas, so that page switching needs to be performed, that is, step 104 is performed.
In step 104, after rendering is finished, a preset switching mode and animation are executed to hide the currently displayed canvas and display the newly rendered canvas.
When the web engine obtains the second page content from the server, the second page content is rendered into one of the canvases which is not currently displayed, for example, the second canvas is displayed, the canvas is hidden, after the rendering of the second page content is finished, the newly rendered second canvas is displayed, and the previously displayed first canvas is hidden. When the canvas display is switched, a switching mode and an animation can be preset, wherein the switching mode and the animation are set in consideration of the transitional problem of the canvas switching and comprise a display mode and a hiding mode, the display mode is specific to the newly rendered canvas, and the hiding mode is specific to the displayed canvas.
The switching manner may include, but is not limited to: an instant-hidden-instant mode (i.e., immediately hiding a currently displayed canvas and immediately displaying a newly rendered canvas), a fade-out mode (i.e., gradually hiding a currently displayed canvas and gradually displaying a newly rendered canvas), an instant-hidden-fade mode (i.e., immediately hiding a currently displayed canvas and gradually displaying a newly rendered canvas), a fade-out-instant mode (i.e., gradually hiding a currently displayed canvas and immediately displaying a newly rendered canvas), and the like.
In addition, each switching mode can correspond to different animations, for example, for a fade-in or fade-out animation, the switching mode can be realized by setting properties such as transparency, moving mode, zooming, rotating and the like. The part of the animation can be realized by executing a corresponding algorithm, and the existing algorithm can be adopted, so that the detailed description is omitted.
In this embodiment, the switching manner and the animation are both set in advance, and the web engine may perform switching according to the setting obtained in advance. The setting can be fixed, or can be customized by the user, for example, a user-oriented interface is provided, the user performs the switching mode and animation setting through the interface, and the web engine performs the switching according to the setting of the user.
In addition to the preset mode, the web engine can obtain the switching mode and the animation from the server side, which will be described in embodiment two.
Certainly, the mode of page switching is not limited to the mode described in this embodiment in which the user clicks a link in a page, and may also be other modes such as a mode in which the user manually inputs a new webpage address to initiate a new page request, and as long as the current window already displays a canvas, the web engine initiates a new page request again, and according to the mode in this embodiment, the web engine may display new page content in one of the undisplayed canvases, and display the new page content in place of the currently displayed canvas after rendering is completed.
In the subsequent process, the canvas which is originally hidden after being displayed becomes the canvas which is not displayed at present, and can be continuously used in the subsequent page switching process. The processing procedure of the subsequent page request is similar to that in step 103 and step 104, and is not described again.
Therefore, in the embodiment of the present invention, a plurality of canvases are established in one page rendering window, and preferably, the size of each canvas is consistent with that of the page rendering window. Only one canvas is visible each time, other canvases are hidden, a new page is loaded each time and rendered in the undisplayed canvas, and after the rendering is completed, the currently visible canvas is hidden and is replaced by the newly rendered canvas for display.
Example II,
Fig. 3 is a flowchart of a method for implementing page switching according to a second embodiment of the present invention, and as shown in fig. 3, the flowchart may specifically include the following steps:
step 301 is the same as step 101, and will not be described again.
In step 302, the web engine obtains the content of the page to be rendered and the switching mode and animation information from the server side.
In this embodiment, after the web engine requests the page content from the server, the server carries the page content to be rendered in the http response returned to the web engine, and also carries the switching mode and the animation information. For example, a field may be added to the http message header to carry the switching method and the animation information, or a field may be added to the http message content to carry the switching method and the animation information.
The carried switching mode and animation information can be the display mode and animation information of the page, the hiding mode and animation information of the page, or the display mode and animation information of the page, and the hiding mode and animation information of the currently displayed page.
In step 303, the obtained page content is rendered into one of the currently undisplayed canvases, and the canvas is set to be visible and the other canvases are set to be hidden.
Similarly, in this step, the web engine determines whether the current window has a displayed canvas after acquiring the content of the page to be rendered, and in this step, the current window has no displayed canvas, which means that the canvas is the first rendering canvas, and the canvas may be directly set to be visible, or set to be visible after the rendering of the content of the page is finished.
In addition, when the canvas is displayed, the page content of the canvas can be displayed by adopting the acquired switching mode and the display mode and the animation information in the animation information.
When the user clicks a link in the page to generate page switching, in step 304, the web engine acquires the content of the page to be rendered, the switching mode and animation information from the server side.
In step 305, the retrieved page content is rendered into one of the currently undisplayed canvases.
The web engine also determines whether the current window has a displayed canvas after acquiring the content of the page to be rendered, and determines that the current window has a displayed canvas in this step, so that page switching needs to be performed, that is, step 306 is performed.
In step 306, after rendering of the canvas is finished, the currently displayed canvas is hidden and the newly rendered canvas is displayed according to the switching mode and the animation information obtained in step 304.
If the switching manner and the animation information obtained in this embodiment are the display manner and the animation information of the page and the hiding manner and the animation information of the page, after the rendering of the canvas in this step is finished, the newly rendered canvas is displayed according to the display manner in the switching manner obtained in step 304, and the currently displayed canvas is hidden according to the switching manner and the hiding manner in the animation information obtained in step 302 and the animation information.
If the switching manner and the animation information obtained in this embodiment are the display manner and the animation information of the page and the hiding manner and the animation information of the currently displayed page, after the rendering of the canvas in this step is finished, the currently displayed canvas is hidden according to the switching manner and the hiding manner and the animation information in the animation information obtained in step 304, and the newly rendered canvas is displayed according to the switching manner and the display manner and the animation information in the animation information obtained in step 304.
It should be noted that, in addition to the switching manner and the animation information described in this embodiment being obtained from the server together with the page content to be rendered, the web engine may also obtain the switching manner and the animation information from the server first, and then obtain the page content to be rendered from the server, and may also obtain the page content to be rendered first, and then obtain the switching manner and the animation information from the server.
In the above embodiment, the switching manner and the animation information are both present as an example for description, and in an actual use process, only one of the switching manner and the animation information may be preset or acquired, and the other adopts a default form.
The method provided by the invention is described above, and the device provided by the invention is described in detail by the third embodiment.
Example III,
Fig. 4 is a structural diagram of a device according to a third embodiment of the present invention, where the device may be disposed in a web engine, and as shown in fig. 4, the device may specifically include: the creating unit 01, the first acquiring unit 02, the rendering unit 03, and the switching unit 04 may further include a second acquiring unit 05.
The creating unit 01 is responsible for creating a page rendering window comprising N canvases which are arranged in a fully overlapping or partially overlapping mode, wherein N is a positive integer larger than 1. The creating unit 01 creates a page rendering window when starting a web application or when responding to a user request.
The first obtaining unit 02 is responsible for obtaining the page content to be rendered from the server side. The rendering unit 03 renders the page content acquired by the first acquiring unit 02 into a currently undisplayed canvas in the page rendering window.
The first obtaining unit 02 may be that when the user manually inputs url, the web engine sends a web request to the server, and then obtains the content of the page to be rendered from the server; or when the user clicks the link on the page, the web engine sends a web request to the server side and then obtains the content of the page to be rendered from the server side. Other scenario-triggered web engines may also send web requests to the server side.
If the displayed canvas does not exist in the page rendering window currently, the switching unit 04 sets the canvas rendered by the rendering unit 03 currently to be visible and other canvases to be hidden. This is the case when the web engine renders the first page content in the current page rendering window.
If the displayed canvas exists in the page rendering window, the switching unit 04 hides the currently displayed canvas and displays the canvas newly rendered by the rendering unit after the rendering of the unit 03 to be rendered is finished. This situation corresponds to the case when a page switch occurs.
When page switching occurs, in order to realize transition problems of switching, a switching mode and/or animation information can be set. That is, the second obtaining unit 05 obtains the switching manner and/or the animation information, where the switching manner includes a hiding manner and a displaying manner. The switching unit 04 hides the canvas according to the hiding manner and/or animation information therein, and displays the canvas according to the displaying manner and/or animation information therein.
The above mentioned switching modes may include but are not limited to: a stand-in fade-out mode, a fade-in fade-out mode, a stand-in fade-out mode, or a fade-in fade-out mode. In addition, each switching mode can correspond to different animations, for example, for a fade-in or fade-out animation, the switching mode can be realized by setting properties such as transparency, moving mode, zooming, rotating and the like. The part of the animation can be realized by executing a corresponding algorithm, and the existing algorithm can be adopted, so that the detailed description is omitted.
The switching manner and the animation information may be preset, or may be acquired from the server, that is, the second acquiring unit 05 may acquire the preset switching manner and/or animation information, or acquire the switching manner and/or animation information from the server. The preset may be a fixed setting, or may be a user-defined setting, for example, a user-oriented interface is provided, and the user performs the setting of the switching mode and the animation through the interface.
When acquiring the switching manner and/or the animation information from the server side is adopted, preferably, the second acquiring unit 05 may acquire the switching manner and/or the animation information transmitted together with the page content to be rendered from the server side. When the web engine requests the page content from the server, the server carries the page content to be rendered in the http response returned to the web engine, and also carries the switching mode and/or animation information. For example, a field may be added to the http message header to carry the switching mode and/or the animation information, or a field may be added to the http message content to carry the switching mode and/or the animation information.
Specifically, the switching manner and animation information transmitted along with the page content to be rendered include: displaying mode and animation information and hiding mode and animation information of a canvas where page content to be rendered is located; or display mode and animation information for the canvas on which the page content to be rendered is located and hiding mode and animation information for the currently displayed canvas.
The method and the device of the embodiment of the invention can be applied to, but are not limited to, the following application scenarios:
for example, for a card-type desktop which is just emerging at present, that is, a plurality of web engines displayed in a card form exist on a desktop of a mobile terminal, each web engine has an independent function, interacts with a cloud server, and is actively pushed by the cloud server or sends page content on request. The method of the embodiment of the invention can be applied to each web engine. For example, there is a web engine on a card desktop that is responsible for loading weather information, and the window created by the web engine includes two canvases that completely overlap. Under the default condition, the cloud server pushes the weather of Beijing to the window of the web engine, the web engine loads the weather page of the Beijing to the first canvas, the first canvas is set to be displayed, the second canvas is hidden, and after the first canvas is rendered, the user can see the weather information of the Beijing on the window. When the user switches the region on the web engine, for example, the user clicks a link of the region of Nanjing, the web engine requests and acquires a weather page of Nanjing from the cloud server, and loads the weather page of Nanjing onto the second canvas. Because the second canvas is hidden, the rendering process of the second canvas is not visible to the user. And after the second canvas is rendered, displaying the second canvas and hiding the first canvas, so that the weather page of Nanjing is visually displayed instead of the weather page of Beijing. In the switching display process from the second canvas to the first canvas, a switching mode and an animation mode in which the first canvas is gradually hidden and the second canvas is gradually displayed can be adopted.
For another example, when a user opens a cell phone browser, the cell phone browser automatically creates a window containing two canvases that completely overlap. When a user opens a news page through a mobile phone browser, the content of the news page is loaded to one of the canvas of the created window, the canvas is temporarily called as a first canvas, the first canvas is set to be displayed, and the second canvas is set to be hidden. After the content of the news page is rendered, the content of the news page is displayed on the first canvas. When a user clicks a link on the news page in the process of browsing the news page, the mobile phone browser sends a request to the server to acquire page content corresponding to the link, and if the link corresponds to a news page, the mobile phone browser renders the newly acquired news page on the second canvas, and the newly acquired news page cannot be seen by the user in the rendering process because the second canvas is hidden. And after the newly obtained news page is rendered, displaying a second canvas to hide the first canvas, so that the newly obtained news page is displayed by replacing the original news page visually by the user. In the switching display process from the second canvas to the first canvas, a switching mode and an animation mode in which the first canvas is gradually hidden and the second canvas is gradually displayed can be adopted.
For another example, when a user opens a mobile phone client, the mobile phone client automatically creates a window containing two canvases, which completely overlap. When a user opens a video page through a client, the content of the video page is loaded onto a first canvas of a created window, the first canvas is set to be displayed, and a second canvas is set to be hidden. And after the content of the video page is rendered, displaying the content of the video page on the first canvas. When the user manually inputs the address of another video page, the client may send a request to the server to obtain the content of the video page corresponding to the address, and load the newly obtained video page onto the second canvas, and since the second canvas is hidden, the rendering process of the second canvas is also not seen by the user. And after the second canvas is rendered, displaying the second canvas to hide the first canvas, so that the newly obtained video page is displayed by replacing the original video page visually. In the switching display process from the second canvas to the first canvas, a switching mode and an animation mode can be adopted, wherein the first canvas is gradually hidden and the second canvas is immediately displayed.
From the above description, it can be seen that the method and apparatus provided by the present invention have the following advantages:
1) the invention enables the page content to be displayed by fully utilizing the display resource of the terminal screen without being divided by a plurality of windows; when the page is switched, the content of the page which is not rendered can not be displayed, and only the canvas which is rendered can replace the displayed canvas, so that the display resources of the terminal are more effectively utilized, and the user experience is improved.
2) According to the invention, the switching mode and the animation can be defined, so that the switching process is smoother and more interesting, and the user experience is improved.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (18)

1. A method for realizing page switching is characterized in that a created window comprises N canvases which are arranged in a full-overlapping or partial-overlapping mode, wherein N is a positive integer larger than 1; the method comprises the following steps:
when first page content to be rendered is obtained from a server, rendering the obtained first page content into a first canvas which is not displayed currently in the window;
and if the window currently has a second canvas displaying second page content, hiding the second canvas and displaying the first canvas after the rendering is finished.
2. The method of claim 1, wherein the window is created at the start of a web application or in response to a user request.
3. The method of claim 1, wherein if the window does not currently have a second canvas on which second page content has been displayed, then setting the currently rendered first canvas visible and the other canvases hidden.
4. A method according to claim 1 or 3, characterized in that the method further comprises: acquiring a switching mode and/or animation information;
and hiding the canvas according to the hiding mode and/or the animation information in the switching mode, or displaying the canvas according to the displaying mode and/or the animation information in the switching mode.
5. The method of claim 4, wherein the obtaining of the switching manner and/or the animation information comprises:
acquiring a preset switching mode and/or animation information; or,
and acquiring the switching mode and/or the animation information from the server side.
6. The method according to claim 5, wherein the obtaining of the switching mode and/or the animation information from the server side comprises:
and acquiring switching mode and/or animation information sent together with the page content to be rendered from the server side.
7. The method of claim 6, wherein the switch mode and/or animation information sent with the page content to be rendered comprises:
display mode and/or animation information and hiding mode and/or animation information of a canvas where the page content to be rendered is located; or,
display mode and/or animation information for the canvas on which the page content to be rendered is located and hiding mode and/or animation information for the currently displayed canvas.
8. The method of claim 1, wherein creating a window containing N canvases in a fully or partially overlapping arrangement comprises:
the created window comprises N canvases, the positions of the N canvases in x and y coordinates are the same or partially the same, and the positions of the N canvases on a z-axis have offset, wherein a plane formed by the x and y axes is a plane parallel to the screen, and the z-axis is vertical to the screen.
9. The method of any one of claims 1 to 8, wherein the server is a cloud server and the window is a window created by a web engine on a card desktop.
10. An apparatus for implementing page switching, the apparatus comprising:
the device comprises a creating unit, a setting unit and a display unit, wherein the creating unit is used for creating a window containing N canvases which are arranged in a full overlapping or partial overlapping mode, and N is a positive integer larger than 1;
the first acquiring unit is used for acquiring first page content to be rendered from the server side;
the rendering unit is used for rendering the first page content acquired by the first acquisition unit into a first canvas which is not displayed currently in the window;
and the switching unit is used for hiding the second canvas and displaying the first canvas after the rendering of the rendering unit is finished if the second canvas displaying the second page content exists in the window currently.
11. The apparatus of claim 10, wherein the creating unit creates the window when starting a web application or when responding to a user request.
12. The apparatus according to claim 10, wherein the switching unit is further configured to set the first canvas currently rendered by the rendering unit to visible and the other canvases to hidden if there is no second canvas displaying the second page content currently on the window.
13. The apparatus of claim 10 or 12, further comprising: the second acquisition unit is used for acquiring the switching mode and/or the animation information;
the switching unit hides the canvas according to the hiding mode and/or the animation information in the switching mode, or displays the canvas according to the display mode and/or the animation information in the switching mode.
14. The apparatus according to claim 13, wherein the second obtaining unit is specifically configured to obtain a preset switching manner and/or animation information, or obtain the switching manner and/or animation information from a server side.
15. The apparatus according to claim 14, wherein the second obtaining unit obtains, from a server side, switching manner and/or animation information transmitted along with the page content to be rendered.
16. The apparatus of claim 15, wherein the switch mode and/or animation information sent with the page content to be rendered comprises:
display mode and/or animation information and hiding mode and/or animation information of a canvas where the page content to be rendered is located; or,
display mode and/or animation information for the canvas on which the page content to be rendered is located and hiding mode and/or animation information for the currently displayed canvas.
17. The apparatus according to claim 10, wherein the creating unit is specifically configured to include N canvases in the created window, the N canvases having the same or partially same position in x and y coordinates and having an offset position in a z-axis, wherein a plane formed by the x and y axes is a plane parallel to the screen, and the z-axis is perpendicular to the screen.
18. The device of any one of claims 10 to 17, wherein the device is disposed in a web engine on a card desktop, and the server is a cloud server.
CN201410712785.5A 2014-12-01 2014-12-01 A kind of method and apparatus for realizing page switching Active CN105630478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410712785.5A CN105630478B (en) 2014-12-01 2014-12-01 A kind of method and apparatus for realizing page switching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410712785.5A CN105630478B (en) 2014-12-01 2014-12-01 A kind of method and apparatus for realizing page switching

Publications (2)

Publication Number Publication Date
CN105630478A true CN105630478A (en) 2016-06-01
CN105630478B CN105630478B (en) 2019-11-26

Family

ID=56045468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410712785.5A Active CN105630478B (en) 2014-12-01 2014-12-01 A kind of method and apparatus for realizing page switching

Country Status (1)

Country Link
CN (1) CN105630478B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106814936A (en) * 2017-01-13 2017-06-09 奇酷互联网络科技(深圳)有限公司 The processing method and mobile terminal of a kind of windows exchange animation
CN106991016A (en) * 2017-03-24 2017-07-28 北京金山安全软件有限公司 Information display method and device and electronic equipment
CN107193970A (en) * 2017-05-25 2017-09-22 成都知道创宇信息技术有限公司 A kind of method that data Dynamic Announce effect is realized based on draw library
CN108156487A (en) * 2016-12-02 2018-06-12 北京邦天信息技术有限公司 A kind of video broadcasting method and device
CN108875079A (en) * 2018-07-12 2018-11-23 北京千家悦网络科技有限公司 A method of switching browser page
CN109086105A (en) * 2018-08-14 2018-12-25 北京奇艺世纪科技有限公司 A kind of page layout conversion method, device and electronic equipment
CN109522082A (en) * 2018-11-27 2019-03-26 北京微播视界科技有限公司 Interface jump method, device, electronic equipment and the medium of application software
CN109542564A (en) * 2018-11-12 2019-03-29 广州华多网络科技有限公司 View steering method, device, computer readable storage medium and computer equipment
CN109614180A (en) * 2018-11-13 2019-04-12 深圳市网心科技有限公司 Webpage deployment method, electronic equipment, system and storage medium
CN109669617A (en) * 2018-12-27 2019-04-23 北京字节跳动网络技术有限公司 Method and apparatus for switching the page
CN109918014A (en) * 2019-03-15 2019-06-21 努比亚技术有限公司 Page display method, wearable device and computer readable storage medium
CN110457038A (en) * 2019-08-14 2019-11-15 百度在线网络技术(北京)有限公司 Card display methods, device, equipment and the storage medium of attached application end
CN111263231A (en) * 2018-11-30 2020-06-09 西安诺瓦星云科技股份有限公司 Window setting method, device, system and computer readable medium
CN111459581A (en) * 2019-01-22 2020-07-28 阿里巴巴集团控股有限公司 Page switching method and device, electronic equipment and computer readable medium
CN115268720A (en) * 2022-08-16 2022-11-01 北京尽微致广信息技术有限公司 Page rendering method, device and equipment and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6101510A (en) * 1997-01-29 2000-08-08 Microsoft Corporation Web browser control for incorporating web browser functionality into application programs
CN101882432A (en) * 2010-02-01 2010-11-10 深圳市同洲电子股份有限公司 Focus element display method, device and digital television receiving terminal
CN102591656A (en) * 2011-12-28 2012-07-18 深圳市万兴软件有限公司 Achieving method and achieving device for window animation
CN103049200A (en) * 2012-12-17 2013-04-17 上海海知信息技术有限公司 Double canvas mapping implementation method
CN103309563A (en) * 2013-06-28 2013-09-18 贝壳网际(北京)安全技术有限公司 Displayed page switching method and device
CN103685963A (en) * 2013-12-30 2014-03-26 深圳Tcl新技术有限公司 Processing method and device of image display
CN103744868A (en) * 2013-12-18 2014-04-23 天脉聚源(北京)传媒科技有限公司 Display method, device and browser based on Web page

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6101510A (en) * 1997-01-29 2000-08-08 Microsoft Corporation Web browser control for incorporating web browser functionality into application programs
CN101882432A (en) * 2010-02-01 2010-11-10 深圳市同洲电子股份有限公司 Focus element display method, device and digital television receiving terminal
CN102591656A (en) * 2011-12-28 2012-07-18 深圳市万兴软件有限公司 Achieving method and achieving device for window animation
CN103049200A (en) * 2012-12-17 2013-04-17 上海海知信息技术有限公司 Double canvas mapping implementation method
CN103309563A (en) * 2013-06-28 2013-09-18 贝壳网际(北京)安全技术有限公司 Displayed page switching method and device
CN103744868A (en) * 2013-12-18 2014-04-23 天脉聚源(北京)传媒科技有限公司 Display method, device and browser based on Web page
CN103685963A (en) * 2013-12-30 2014-03-26 深圳Tcl新技术有限公司 Processing method and device of image display

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108156487A (en) * 2016-12-02 2018-06-12 北京邦天信息技术有限公司 A kind of video broadcasting method and device
CN106814936A (en) * 2017-01-13 2017-06-09 奇酷互联网络科技(深圳)有限公司 The processing method and mobile terminal of a kind of windows exchange animation
CN106991016B (en) * 2017-03-24 2020-08-28 北京金山安全软件有限公司 Information display method and device and electronic equipment
CN106991016A (en) * 2017-03-24 2017-07-28 北京金山安全软件有限公司 Information display method and device and electronic equipment
CN107193970A (en) * 2017-05-25 2017-09-22 成都知道创宇信息技术有限公司 A kind of method that data Dynamic Announce effect is realized based on draw library
CN108875079A (en) * 2018-07-12 2018-11-23 北京千家悦网络科技有限公司 A method of switching browser page
CN109086105B (en) * 2018-08-14 2022-12-06 北京奇艺世纪科技有限公司 Page layout conversion method and device and electronic equipment
CN109086105A (en) * 2018-08-14 2018-12-25 北京奇艺世纪科技有限公司 A kind of page layout conversion method, device and electronic equipment
CN109542564A (en) * 2018-11-12 2019-03-29 广州华多网络科技有限公司 View steering method, device, computer readable storage medium and computer equipment
CN109614180A (en) * 2018-11-13 2019-04-12 深圳市网心科技有限公司 Webpage deployment method, electronic equipment, system and storage medium
CN109522082A (en) * 2018-11-27 2019-03-26 北京微播视界科技有限公司 Interface jump method, device, electronic equipment and the medium of application software
CN111263231B (en) * 2018-11-30 2022-07-15 西安诺瓦星云科技股份有限公司 Window setting method, device, system and computer readable medium
CN111263231A (en) * 2018-11-30 2020-06-09 西安诺瓦星云科技股份有限公司 Window setting method, device, system and computer readable medium
CN109669617B (en) * 2018-12-27 2021-06-25 北京字节跳动网络技术有限公司 Method and device for switching pages
CN109669617A (en) * 2018-12-27 2019-04-23 北京字节跳动网络技术有限公司 Method and apparatus for switching the page
CN111459581A (en) * 2019-01-22 2020-07-28 阿里巴巴集团控股有限公司 Page switching method and device, electronic equipment and computer readable medium
CN111459581B (en) * 2019-01-22 2024-04-16 阿里巴巴集团控股有限公司 Page switching method, device, electronic equipment and computer readable medium
CN109918014A (en) * 2019-03-15 2019-06-21 努比亚技术有限公司 Page display method, wearable device and computer readable storage medium
CN109918014B (en) * 2019-03-15 2022-10-04 努比亚技术有限公司 Page display method, wearable device and computer-readable storage medium
CN110457038A (en) * 2019-08-14 2019-11-15 百度在线网络技术(北京)有限公司 Card display methods, device, equipment and the storage medium of attached application end
CN110457038B (en) * 2019-08-14 2022-11-29 百度在线网络技术(北京)有限公司 Card display method, device and equipment of auxiliary application terminal and storage medium
CN115268720A (en) * 2022-08-16 2022-11-01 北京尽微致广信息技术有限公司 Page rendering method, device and equipment and readable storage medium
CN115268720B (en) * 2022-08-16 2024-06-11 北京尽微致广信息技术有限公司 Page rendering method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN105630478B (en) 2019-11-26

Similar Documents

Publication Publication Date Title
CN105630478B (en) A kind of method and apparatus for realizing page switching
US11344806B2 (en) Method for rendering game, and method, apparatus and device for generating game resource file
US20150279058A1 (en) Page Rendering Method and Apparatus
US10002115B1 (en) Hybrid rendering of a web page
KR101966258B1 (en) Push notifications for updating multiple dynamic icon panels
CN105306997B (en) Mobile terminal playing mode switching method and device
CN106021421B (en) method and device for accelerating webpage rendering
US10089957B2 (en) Page display method and terminal
US20140362118A1 (en) Method and System for Displaying Imagery as a Wallpaper on a Computing Device
TW201635128A (en) Methods and Devices for Interface Display
US20190230311A1 (en) Video interface display method and apparatus
US20190080017A1 (en) Method, system, and device that invokes a web engine
CN102724430B (en) A kind of exchange method of nonlinear editing system and image-text packaging system
US20150170385A1 (en) Editing a feature within a map
CN105824874A (en) Mobile terminal as well as web page rendering method and device thereof
CN108228121B (en) Browser split screen method and device and mobile terminal
WO2015184736A1 (en) Method and terminal for transforming background picture of touchscreen device
JP2016529627A (en) Browser resource display method and apparatus, and computer-readable storage medium
CN105808307B (en) Page display method and device
US20230004673A1 (en) Information management system and method for communication application, and display terminal
TW201807667A (en) Network picture loading method, device and system
CN113946403A (en) Data display method and device, storage medium and electronic equipment
CN113626113A (en) Page rendering method and device
CN113791857A (en) Application window background fuzzy processing method and device in Linux system
CN113559498A (en) Three-dimensional model display method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1225135

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201118

Address after: Room 603, 6 / F, Roche Plaza, 788 Cheung Sha Wan Road, Kowloon, China

Patentee after: Zebra smart travel network (Hong Kong) Limited

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.

TR01 Transfer of patent right