A page jump method and device, electronic equipment and storage medium

By rendering a screenshot of the first page on the terminal side when the page jumps and replacing it with the resources of the second page after the resources are loaded, the white screen problem in single-page application projects is solved, achieving a smooth transition and low maintenance cost.

CN114139085BActive Publication Date: 2025-10-24上海瑞家信息技术有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111307497.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-05
Publication Date
2025-10-24
Estimated Expiration
2041-11-05

AI Technical Summary

Technical Problem

In single-page application projects with front-end and back-end separation, a blank screen phenomenon occurs when the page jumps. Existing solutions are costly and inconvenient to maintain.

Method used

After detecting a page jump, a screenshot of the first page is captured and rendered into the page frame template of the second page. The second page's resources are then replaced after the resources are fully loaded, achieving a smooth transition by utilizing the terminal's fast rendering.

Benefits of technology

It achieves visual continuity in page transitions, avoids white screen flickering, reduces the burden on the terminal and the pressure on the server, improves the user experience, and reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114139085B_ABST
    Figure CN114139085B_ABST
Patent Text Reader

Abstract

The application provides a page jump method and device, electronic equipment and storage medium. The method comprises the following steps: after detecting that a first page jumps to a second page, in response to template loading of a page framework of the second page being completed, a screenshot of the first page is acquired and rendered into the template of the page framework of the second page, and the page framework of the first page is different from the page framework of the second page; in response to resource loading of the second page being completed, the screenshot of the first page in the template of the page framework of the second page is replaced by the resource of the second page. In this way, the problem of white screen during jumping is avoided, and the effect of smooth transition from the first page to the second page is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer technology, and in particular, to a page jump method and device, electronic equipment and storage medium. BACKGROUND

[0002] With the development of Internet technology, there are more and more implementation methods of web pages, for example, traditional front-end and back-end non-separation projects, and for example, front-end and back-end separation single-page application projects, etc. Among them, front-end and back-end non-separation means that the effects seen by the front-end page are rendered by the back-end server. And single-page application means interacting with users by dynamically rewriting the current page, rather than the traditional reloading of the entire new page from the server, which avoids interrupting user experience when switching between pages.

[0003] When jumping from a traditional front-end and back-end non-separation project to a front-end and back-end separation single-page application project, the resource files in the single-page application project will be loaded for the first time. Only after these resource files are loaded, the page related content will be rendered, so there will be a short white screen phenomenon in vision, and the white screen time is affected by factors such as user network conditions. Among them, the front-end and back-end non-separation project may be, for example, JQuery and Hypertext Preprocessor (PHP) projects. JQuery is a JavaScript library. Among them, the single-page application project may be, for example, Vue and React projects. Among them, React is a JavaScript library for building user interfaces. Vue is a progressive framework for building user interfaces.

[0004] In order to solve this cross-project page jump white screen problem, in related technologies, from the perspective of solving the single-page application project home page white screen problem, the following solutions are generally adopted:

[0005] I. Pre-rendering scheme. In the project building process, the static content of the page is rendered by some rendering mechanism, and then inserted into the page, so that the first thing seen before the page starts is the pre-rendered page. However, in this scheme, dynamic data cannot be displayed, and different users see the same static content corresponding to the page set in advance, in addition, when the number of routes is large, for example, the page content is large or the number of accessed pages is large, the code construction time is long, the response speed is slow, and therefore, the maintenance cost needs to be increased, which is not convenient for maintenance.

[0006] II. Skeleton screen solution. The implementation principle of skeleton screen is similar to pre-rendering. Before page parsing and data loading, the user is first shown the general style of the page. Pictures, words, and icons will be displayed through gray rectangular blocks or circular blocks. Before the real page is displayed, the user can perceive the basic Cascading Style Sheets (CSS) style and page layout of the page to be loaded. However, this solution is no different from the page loading icon and cannot fundamentally solve the page loading performance problem. In addition, it increases the program running burden and is not convenient to maintain.

[0007] III. Server-side rendering solution. In the mode of server-side rendering, when the user first requests a page, the server renders the required components or page into a Hyper Text Markup Language (HTML) string and then returns it to the client. The client gets the HTML content that can be directly rendered and then presented to the user without executing the JS (abbreviation of Javascript) code to generate page content. However, this solution deviates from the original intention of separating the front end and the back end of the single-page application project. In essence, the front end and the back end are combined, which increases the server pressure and needs to handle concurrency, running speed, and other problems. The maintenance cost is high and is not convenient to maintain.

[0008] Therefore, the above several solutions can solve the white screen problem to a certain extent during page jumping, but the maintenance cost of these solutions is high and is not convenient to maintain. SUMMARY

[0009] Embodiments of the present application provide a page jumping method and device, electronic equipment and storage medium to solve the problem of white screen during page jumping in related technologies.

[0010] The purpose of the present application is achieved by the following technical solutions:

[0011] In a first aspect, embodiments of the present application provide a page jumping method applied to a terminal, comprising:

[0012] After detecting that the first page jumps to the second page, in response to the template loading of the page framework of the second page being completed, the screenshot of the first page is obtained and rendered into the template of the page framework of the second page.

[0013] In response to the resource loading of the second page being completed, the screenshot of the first page in the template of the page framework of the second page is replaced by the resource of the second page.

[0014] In a possible implementation manner, before the screenshot of the first page is obtained, the method further comprises:

[0015] When it is detected that the first page is left, the first page is screenshot.

[0016] In a possible implementation, the method further includes:

[0017] After the first page is screenshot, timing is started;

[0018] When the second page is entered, it is detected whether the timing duration exceeds a preset duration;

[0019] In response to the timing duration not exceeding the preset duration, it is determined that the first page is jumped to the second page.

[0020] In a possible implementation, after the first page is screenshot, the method further includes:

[0021] At least part of image parameters of the screenshot of the first page is adjusted to a set parameter value.

[0022] In a possible implementation, the first page is screenshot, including:

[0023] Size information of the first page and position information of a current scroll bar are acquired;

[0024] Based on the size information of the first page and the position information of the current scroll bar, display content of the first page corresponding to the position information of the current scroll bar is determined;

[0025] The determined display content is screenshot.

[0026] In a possible implementation, the first page is screenshot, including:

[0027] In response to a preset condition of a browser of a page being met, the first page is screenshot, the preset condition including that a category of the browser is not a preset low version of a preset category, or the category of the browser is not a preset category.

[0028] In a possible implementation, the screenshot of the first page is rendered into a template of a page framework of the second page, including:

[0029] The format of the screenshot of the first page is converted into a format matched with the template of the page framework of the second page, and is rendered into the template of the page framework of the second page.

[0030] In a second aspect, an embodiment of the present application provides a page jump device applied to a terminal, including:

[0031] a screenshot rendering module, configured to, after detecting that the jump from the first page to the second page is detected, in response to completion of template loading of a page framework of the second page, acquire a screenshot of the first page and render the screenshot of the first page into the template of the page framework of the second page, the page framework of the first page being different from the page framework of the second page;

[0032] a resource replacing module, configured to, in response to completion of resource loading of the second page, replace the screenshot of the first page in the template of the page framework of the second page with resources of the second page.

[0033] In a possible implementation, the method further includes:

[0034] a page screenshot module, configured to, when it is detected that the first page is left, take a screenshot of the first page.

[0035] In a possible implementation, the method further includes:

[0036] a screenshot timing module, configured to, after taking the screenshot of the first page, start timing;

[0037] a jump determining module, configured to, when the second page is entered, detect whether a duration of the timing exceeds a preset duration; and in response to the duration of the timing not exceeding the preset duration, determine that the jump from the first page to the second page is detected.

[0038] In a possible implementation, the method further includes:

[0039] a parameter adjusting module, configured to, after the screenshot of the first page is taken, adjust a parameter value of at least one image parameter of the screenshot of the first page to a set parameter value.

[0040] In a possible implementation, the page screenshot module is specifically configured to acquire size information and current scroll bar position information of the first page.

[0041] determine, based on the size information and the current scroll bar position information of the first page, display content of the first page corresponding to the current scroll bar position information.

[0042] take a screenshot of the determined display content.

[0043] In a possible implementation, the page screenshot module is specifically configured to, in response to a browser of a page satisfying a preset condition, take a screenshot of the first page, the preset condition including that a type of the browser is not a preset low version of a preset type, or the type of the browser is not a preset type.

[0044] In a possible implementation, the screenshot rendering module is specifically configured to:

[0045] convert the format of the screenshot of the first page into a format matching the template of the page framework of the second page, and render into the template of the page framework of the second page.

[0046] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, and when the computer program is executed by the processor, the steps of the page jump method in any one of the first aspect are implemented.

[0047] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the page jump method in any one of the first aspect are implemented.

[0048] The advantages or beneficial effects of the above technical solutions at least include: after detecting that the first page jumps to the second page with different page frameworks, the screenshot of the first page is obtained and rendered into the template of the page framework of the second page before the resource loading of the second page is completed and after the template loading of the page framework of the second page is completed. Since the template of the page framework is relatively small in data amount compared with the resource data that needs to be rendered into the template, the loading can be quickly completed, so that the rendering of the screenshot of the first page is quickly performed, the visual continuity with the real first page is maintained, the white screen flashing is avoided, and until the resource loading of the second page is completed, the resource of the second page is replaced, so that the smooth transition effect from the first page to the second page is realized. The jump process of the present solution is on the terminal side, which is simple and fast, does not cause running burden to the terminal, and since it does not need to depend on the server, it is convenient to realize the jump to the front-end and back-end separated page, does not cause pressure to the server, and is convenient to maintain. Since the first page before the jump is not a fixed page, the screenshot of the first page is also not fixed content each time of jump, so that different users see different contents, and the user experience is better.

[0049] The above summary is only for the purpose of the description and is not intended to limit in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present application will be apparent from the drawings and the following detailed description. BRIEF DESCRIPTION OF DRAWINGS

[0050] Figure 1 is a flowchart of an exemplary page jump method provided by an embodiment of the present application.

[0051] Figure 2is a schematic diagram of an exemplary page jump device provided by an embodiment of the present application.

[0052] Figure 3 is a schematic diagram of an exemplary page jump device provided by an embodiment of the present application.

[0053] Figure 4 is a schematic diagram of an exemplary electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0055] Figure 1 is a flowchart of an exemplary page jump method provided by an embodiment of the present application.

[0056] As shown in Figure 1 , the page jump method provided by the present embodiment is applied to a terminal and is executed by the terminal or a combination of software and / or hardware therein. The method at least includes the following steps:

[0057] Step 101: After detecting that the first page jumps to the second page, in response to the template of the page framework of the second page being loaded, the screenshot of the first page is obtained and rendered into the template of the page framework of the second page.

[0058] Step 102: In response to the resource of the second page being loaded, the screenshot of the first page in the template of the page framework of the second page is replaced by the resource of the second page.

[0059] The page framework of the first page can be a framework without separation of front and back ends, such as JQUERY framework and PHP framework, etc. The page framework of the second page can be a framework of a single-page application with separation of front and back ends, such as Vue framework and React framework, etc. Exemplarily, the template of the page framework of the second page can be an HTML template. The template of the page framework is used to render the loaded resource of the second page to form the second page.

[0060] In the related art, when the first page jumps to a second page with a different page framework, the resources of the second page, such as static resources such as Bundle, Vendor (i.e., third-party library), (Vendor), and dynamic data, are loaded for the first time. The rendering of the second page is performed only after the loading of the resources of the second page is completed, so a short white screen flicker occurs. Among them, Bundle and Vendor are resource files generated when the page project is developed and packaged. Among them, the Bundle contains the project source code, and the Vendor contains the third-party library file.

[0061] In the present solution, after detecting that the first page jumps to the second page with a different page framework, the screenshot of the first page is obtained and rendered into the template of the page framework of the second page after the template of the page framework of the second page is loaded before the resources of the second page are loaded. Since the template of the page framework is relatively small in data volume compared to the resources that need to be rendered onto the template, the loading can be quickly completed, so the rendering of the screenshot of the first page is quickly performed, the visual continuity with the real first page is maintained, the white screen flicker is avoided, and the resources of the second page are replaced after the resources of the second page are loaded, thereby realizing the smooth transition effect from the first page to the second page. The jump process of the present solution is on the terminal side, which is simple and fast, does not cause running burden to the terminal, and does not need to rely on the server, so it is convenient to realize the jump to the front-end and back-end separated page, does not cause pressure to the server, and is easy to maintain. In addition, the first page before the jump is not a fixed page, and the screenshot of the first page is also not fixed content each time the jump is performed. In this way, different users see different content, and the user experience is better.

[0062] In addition, the present solution has strong universality and does not depend on a specific technology stack, i.e., it is applicable to pages of various frameworks and can be widely used in various businesses. Compared with the pre-rendering, skeleton screen, and server-side rendering solutions in the related art, the present solution requires less development investment, and a developer can directly call the page jump method of the present solution to access the solution of the present solution, thereby reducing the maintenance cost.

[0063] In an example embodiment, before the screenshot of the first page is obtained, the above-mentioned page jump method can further include: when it is detected that the first page is left, the first page is screenshot.

[0064] In actual application, the first page can be screenshot by a screen capture tool. For example, the first page can be screenshot by Html2Canvas.

[0065] Wherein, the Html2Canvas is a tool based on a document object model, which can directly capture a screenshot of a webpage or a partial webpage on a user's browser, and the scheme is easier to implement.

[0066] In the implementation, the first page can be captured by a Beforeunload life cycle hook in JS when leaving the first page. The Beforeunload life cycle hook is triggered before the page is unloaded, so the first page can be captured in time by the Beforeunload life cycle hook. Specifically, the first page can be captured by Html2Canvas in the Beforeunload life cycle hook.

[0067] Before capturing, it can be determined whether the browser meets a preset condition. In response to the browser of the page not meeting the preset condition, the capturing of the first page is cancelled. In response to the browser of the page meeting the preset condition, the first page is captured. The preset condition can include that the browser is not of a preset low version of a preset category, or the browser is not of a preset category. The preset low version can be a browser version with a version number lower than a preset version number. Generally, the performance of some categories of browsers is poor, or the performance of some low versions of browsers is poor. In actual application, if the performance of the browser is defective, that is, the performance is poor, capturing the page will cause problems such as page lag, resulting in negative optimization. At this time, the first page should not be captured. In this way, the user's browser is selected according to the situation, avoiding negative effects. For example, the low version of the IE browser has defects in performance, and capturing the page will cause problems such as page lag, resulting in negative optimization, so the low version of the IE browser is excluded.

[0068] In an example embodiment, the capturing of the first page can include: obtaining size information of the first page and position information of a current scroll bar; determining display content of the first page corresponding to the position information of the current scroll bar based on the size information of the first page and the position information of the current scroll bar; and capturing the determined display content.

[0069] The size information of the first page can include the height and width of the first page. The position information of the scroll bar can be coordinate information, which can reflect the position of the scroll bar in the height direction and the width direction of the first page. In actual application, as the position of the scroll bar changes, the display content of the page also changes accordingly. Therefore, based on the size information of the first page and the position information of the current scroll bar, the display content of the first page corresponding to the position information of the current scroll bar can be determined. The specific implementation of determining the display content of the first page corresponding to the position information of the current scroll bar based on the size information of the first page and the position information of the current scroll bar can be referred to related technologies, and details are not described herein.

[0070] In this embodiment, based on the size information of the first page and the position information of the scroll bar, the first page is captured to accurately capture the current display content of the first page. After rendering into the template of the page framework of the second page, the visual effect of the screenshot of the first page is consistent with the actual visual effect of the first page, and the seamless switching is achieved.

[0071] In an example embodiment, after the capturing of the first page, the page jump method can further include adjusting the parameter value of at least part of the image parameters of the screenshot of the first page to a set parameter value. The image parameters of the screenshot of the first page can include dots per inch (dpi), zoom index, and the like. The set parameter value is used to clarify the screenshot of the first page. The specific value of the set parameter value can be set according to actual conditions. Since the screenshot of the first page is usually blurred by default, adjusting the image parameters can clarify the screenshot of the first page, so that the visual effect of the screenshot of the first page is consistent with the actual visual effect of the first page, and the seamless switching is further achieved.

[0072] In an example embodiment, after the capturing of the first page, the screenshot of the first page is saved. In implementation, the screenshot of the first page can be saved in a specified storage space.

[0073] The first page and the second page can be pages of the same website or pages of different websites. For the case that the first page and the second page are pages of the same website, when saving the screenshot of the first page, the screenshot can be stored in the LocalStorage with the same domain name as the domain name of the website where the first page and the second page are located. The localStorage can directly store the first requested data in the local storage, and is used for long-term storage of the data of the entire website. The saved data has no expiration time and is more secure until manually deleted.

[0074] The format of the saved screenshot of the first page can be a Canvas format. Canvas is a common drawing method in web development, which can be used in animation, game screen, data visualization, picture editing, real-time video processing and other aspects. Saving the screenshot of the first page in the Canvas format is more simple.

[0075] In the example embodiment, the page jump method described above can further include: starting timing after taking a screenshot of the first page; detecting whether the timing duration exceeds a preset duration when entering the second page; in response to the timing duration not exceeding the preset duration, determining that the jump from the first page to the second page is detected.

[0076] The preset duration represents the validity period of the screenshot of the first page.

[0077] If the timing duration after taking a screenshot is short, it is considered that the first page directly jumps into the second page, and the screenshot of the first page can be displayed. If the timing duration after taking a screenshot is long, it is possible that the second page is not entered after taking a screenshot of the first page, but is entered by inputting a website address after a long time. In this case of entering by inputting a website address, the home page to be displayed should be the second page, rather than the screenshot of the page taken a long time ago, so as to realize accurate and smooth jump control.

[0078] In the example embodiment, the rendering of the screenshot of the first page into the template of the page framework of the second page can include: converting the format of the screenshot of the first page into a format matching the template of the page framework of the second page, and rendering into the template of the page framework of the second page.

[0079] Since the format of the screenshot of the first page can be different from the format required by the template of the page framework of the second page, in order to be successfully rendered into the template of the page framework of the second page, the format of the screenshot of the first page can be converted in advance.

[0080] For example, the saved screenshot of the first page in the Canvas format can be converted into a screenshot of the first page in the base64 format.

[0081] Figure 2 is a schematic diagram of an example page jump device provided by an embodiment of the application. As shown in Figure 2 The page jump device 200 provided by an embodiment of the application is applied to a terminal and includes:

[0082] The screenshot rendering module 201 is configured to, after detecting that the jump from the first page to the second page is detected, acquire a screenshot of the first page and render the screenshot of the first page into a template of a page frame of the second page in response to completion of loading of the template of the page frame of the second page, the page frame of the first page being different from the page frame of the second page.

[0083] The resource replacing module 202 is configured to replace the screenshot of the first page in the template of the page frame of the second page with resources of the second page in response to completion of loading of the resources of the second page.

[0084] In an example embodiment, as shown in Figure 3 , the method further includes:

[0085] The page screenshot module 203 is configured to take a screenshot of the first page when it is detected that the first page is left.

[0086] In an example embodiment, as shown in Figure 3 , the method further includes:

[0087] The screenshot timing module 204 is configured to start timing after taking the screenshot of the first page.

[0088] The jump determining module 205 is configured to, when entering the second page, detect whether a duration of the timing does not exceed a preset duration, and determine that the jump from the first page to the second page is detected in response to the duration of the timing not exceeding the preset duration.

[0089] In an example embodiment, as shown in Figure 3 , the method further includes:

[0090] The parameter adjusting module 206 is configured to adjust a parameter value of at least one image parameter of the screenshot of the first page to a set parameter value after taking the screenshot of the first page.

[0091] In an example embodiment, the page screenshot module 203 is specifically configured to acquire size information and current scroll bar position information of the first page.

[0092] The current scroll bar position information of the first page is determined based on the size information and the current scroll bar position information of the first page.

[0093] The determined display content is taken a screenshot.

[0094] In an example embodiment, the page screenshot module 203 is specifically configured to take a screenshot of the first page in response to the browser of the page meeting preset conditions, the preset conditions including that the browser is not of a preset low version of a preset category or the browser is not of a preset category.

[0095] In an example embodiment, the screenshot rendering module 201 is specifically configured to:

[0096] convert the format of the screenshot of the first page into a format matching a template of the page framework of the second page, and render into the template of the page framework of the second page.

[0097] The functions of each module in each device of the embodiments of the present application can refer to the corresponding description in the above-mentioned page jump method embodiments, which will not be repeated here.

[0098] Preferably, the embodiments of the present application further provide an electronic device, which comprises a processor, a memory, a computer program stored in the memory and executable on the processor, the computer program, when executed by the processor, implements each process of the above-mentioned page jump method embodiments and can achieve the same technical effects. To avoid repetition, this will not be repeated here.

[0099] Figure 4 is an example of an electronic device provided by the embodiments of the present application. As shown in Figure 4 the electronic device can include a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 complete mutual communication through the communication bus 404. The processor 401 can invoke the computer program in the memory 403 to execute the page jump method in any of the above embodiments.

[0100] The embodiments of the present application further provide a computer readable storage medium, and the computer readable storage medium stores a computer program, the computer program, when executed by the processor, implements each process of the above-mentioned page jump method embodiments and can achieve the same technical effects. To avoid repetition, this will not be repeated here. The computer readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0101] It should be noted that the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0102] Those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the method described in each embodiment of the present application.

[0103] The embodiments of the present application are described above in conjunction with the drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative, not restrictive, and those skilled in the art can make many forms under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims, which all belong to the protection of the present application.

[0104] Those skilled in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solutions. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0105] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0106] In the embodiments of the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the embodiments of the apparatus described above are merely schematic, and the division of the units is merely logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0107] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0108] In addition, each functional unit in the various embodiments of the present application can be integrated into a processing unit, or each unit can be a physically independent unit, or two or more units can be integrated into a unit.

[0109] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various media that can store program codes.

[0110] The above description is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A page jump method, characterized by, Applied to a terminal, comprising: After detecting that jumping from a first page to a second page, in response to the template loading completion of the page framework of the second page, obtaining the screenshot of the first page and rendering the screenshot of the first page into the template of the page framework of the second page, the page framework of the first page is different from the page framework of the second page; In response to the resource loading completion of the second page, the screenshot of the first page in the template of the page framework of the second page is replaced by the resource of the second page; Before the obtaining the screenshot of the first page, further comprising: When detecting leaving the first page, taking a screenshot of the first page; The screenshot of the first page, comprising: In response to the browser of the page meeting the preset condition, taking a screenshot of the first page, the preset condition includes that the category of the browser does not belong to the preset low version of the preset category, or the category of the browser does not belong to the preset category; The rendering of the screenshot of the first page into the template of the page framework of the second page, comprising: The format of the screenshot of the first page is converted into a format matching the template of the page framework of the second page, and is rendered into the template of the page framework of the second page.

2. The method of claim 1, wherein, Further comprising: After taking a screenshot of the first page, start timing; When entering the second page, detecting whether the duration of the timing does not exceed the preset duration; In response to the duration of the timing not exceeding the preset duration, it is determined that jumping from the first page to the second page is detected.

3. The method of claim 1, wherein, After the screenshot of the first page, further comprising: Adjusting the parameter value of at least part of the image parameters of the screenshot of the first page to the set parameter value.

4. The method of claim 1, wherein, The screenshot of the first page, comprising: Obtaining the size information and the current scroll bar position information of the first page; Based on the size information and the current scroll bar position information of the first page, determining the display content of the first page corresponding to the current scroll bar position information; Taking a screenshot of the determined display content.

5. A page jump apparatus characterized by comprising: Applied to a terminal, comprising: A screenshot rendering module, configured to, after detecting that jumping from a first page to a second page, in response to the template loading completion of the page framework of the second page, obtain the screenshot of the first page and render the screenshot of the first page into the template of the page framework of the second page, the page framework of the first page being different from the page framework of the second page; A resource replacement module, configured to, in response to the resource loading completion of the second page, replace the screenshot of the first page in the template of the page framework of the second page by the resource of the second page; A page screenshot module, configured to, when detecting leaving the first page, take a screenshot of the first page; The page screenshot module is specifically configured to, in response to the browser of the page meeting the preset condition, take a screenshot of the first page, and the preset condition includes that the category of the browser does not belong to the preset low version of the preset category, or the category of the browser does not belong to the preset category; The screenshot rendering module is specifically configured to convert the format of the screenshot of the first page into a format matching a template of a page framework of the second page, and render into the template of the page framework of the second page.

6. The apparatus of claim 5, wherein, Further comprising: A screenshot timing module configured to start timing after the first page is screenshotted; A jump determination module configured to detect whether the timing duration does not exceed a preset duration when entering the second page; In response to the timing duration not exceeding the preset duration, it is determined that the jump from the first page to the second page is detected.

7. The apparatus of claim 5, wherein, Further comprising: A parameter adjustment module configured to adjust at least part of image parameters of the screenshot of the first page to a set parameter value after the first page is screenshotted.

8. The apparatus of claim 5, wherein, The page screenshot module is specifically configured to acquire size information and current scroll bar position information of the first page; Based on the size information of the first page and the current scroll bar position information, the display content of the first page corresponding to the current scroll bar position information is determined; The determined display content is screenshotted.

9. An electronic device, comprising: It comprises: A processor, a memory, and a computer program stored on the memory and executable on the processor, which implements the steps of the page jump method according to any one of claims 1 to 4 when executed by the processor.

10. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium, and the computer program is executed by the processor to implement the steps of the page jump method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Webpage view display method and apparatus, computer device and storage medium

    CN107122192A

  • Program page data processing method and device, equipment and medium

    CN109857486A

  • IPTV browser page switching processing method and system

    CN110704764A