Page processing method, device, electronic device and storage medium

By identifying and caching browser pages, and using preset databases to obtain cache engines for rendering, the problem of poor page display results caused by the limit on the number of browser rendering engines is solved, and better page performance is achieved.

CN114186154BActive Publication Date: 2024-11-12BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202111481973.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2024-11-12
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

There is a limit on the number of rendering engines in the same page by existing browsers. If the limit exceeds the limit, the rendering engine will be discarded, resulting in poor page display.

Method used

By identifying the number of rendering engines required for the visual area and non-visible area of ​​the current page, the rendering engine that caches the non-visible area using the preset database. When the number of visual area engines is insufficient, the engine is obtained from the cache for rendering. Avoid discarding all engines.

Benefits of technology

Improve the display effect of the page, avoid the white screen problem caused by the number of engines exceeding the limit, and improve the page performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114186154B_ABST
    Figure CN114186154B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a page processing method, device, electronic device and storage medium, the method comprising: identifying the number of first engines and the number of second engines of the current page; the number of first engines is the number of target engines to be called in the visible area of ​​the current page, and the number of second engines is the number of target engines to be called in the current page; when the number of first engines is less than the preset number, and the number of second engines is greater than the preset number, obtaining the cached target engines from the preset database; the preset number is the threshold value of the number of target engines supported by the current page, and the preset database caches the target engines called by the non-visible area of ​​the current page; according to the cached target engines, rendering the corresponding positions in the visible area, and displaying the rendered page. The use of this method is conducive to improving the display effect of the page.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a page processing method, device, electronic device and storage medium. Background Art

[0002] Currently, using the browser's 3D capabilities mainly depends on the rendering engine; however, within the same page, the number of rendering engines that the browser supports running at a single time is limited, and the limitations vary from browser to browser.

[0003] In traditional technology, when the number of rendering engines running in a page exceeds the browser limit, the rendering engines will be discarded, resulting in a white screen, which makes the display effect of the page poor. Summary of the invention

[0004] The present disclosure provides a page processing method, device, electronic device and storage medium to at least solve the problem of poor page display effect in the related art. The technical solution of the present disclosure is as follows:

[0005] According to a first aspect of an embodiment of the present disclosure, a page processing method is provided, including:

[0006] Identify the first engine number and the second engine number of the current page; the first engine number is the number of target engines to be called in the visible area of ​​the current page, and the second engine number is the number of target engines to be called in the current page;

[0007] When the number of the first engines is less than a preset number and the number of the second engines is greater than the preset number, obtaining a cached target engine from a preset database; the preset number is a threshold value of the number of target engines supported by the current page, and the preset database caches the target engine called by the non-visible area of ​​the current page;

[0008] According to the cached target engine, the corresponding position in the visible area is rendered, and the rendered page is displayed.

[0009] In an exemplary embodiment, the identifying the first engine number of the current page includes:

[0010] Determine the number of target engine rendering areas within the visible area of ​​the current page;

[0011] According to the number of the target engine rendering areas, the number of target engines to be called in the visible area is determined as the first engine number.

[0012] In an exemplary embodiment, when the number of the first engines is less than a preset number and the number of the second engines is greater than the preset number, obtaining a cached target engine from a preset database includes:

[0013] When the first engine quantity is less than a preset quantity, the second engine quantity is greater than the preset quantity, and the target engines of the first engine quantity are cached in the preset database, the target engines of the first engine quantity are obtained from the preset database.

[0014] In an exemplary embodiment, before identifying the first engine number and the second engine number of the current page, the method further includes:

[0015] Obtaining the target engine called by the non-visual area of ​​the current page;

[0016] The target engine called by the non-visible area of ​​the current page is stored in the preset database.

[0017] In an exemplary embodiment, after rendering the corresponding position in the visible area according to the cached target engine and displaying the rendered page, the method further includes:

[0018] When the movement of the current page is detected, the third engine number and the fourth engine number of the current page are identified; the third engine number is the number of target engines called by the page area currently moving out of the visible area, and the fourth engine number is the number of target engines to be called by the page area currently moving into the visible area;

[0019] When the third engine quantity is greater than the fourth engine quantity and the fourth engine quantity meets a first preset threshold, the target engine called by the page area currently moved out of the visible area is stored in the preset database.

[0020] In an exemplary embodiment, after the third engine number and the fourth engine number of the current page are identified when the current page is detected to be moved, the method further includes:

[0021] When the third number of engines is greater than the fourth number of engines and the fourth number of engines meets a second preset threshold, acquiring target engines of the fourth number of engines from the target engines called by the page area currently moved out of the visible area to obtain remaining target engines;

[0022] According to the target engines of the fourth number of engines, corresponding positions of the page area currently moved into the visible area are rendered, and the remaining target engines are stored in the preset database.

[0023] In an exemplary embodiment, after the third engine number and the fourth engine number of the current page are identified when the current page is detected to be moved, the method further includes:

[0024] When the third number of engines is less than or equal to the fourth number of engines, and the fourth number of engines meets the second preset threshold, obtaining a target number of target engines from the preset database; the target number is the difference between the fourth number of engines and the third number of engines;

[0025] According to the target engines of the target number and the target engine called by the page area currently moved out of the visible area, the corresponding position of the page area currently moved into the visible area is rendered.

[0026] According to a second aspect of an embodiment of the present disclosure, there is provided a page processing device, including:

[0027] A quantity identification unit is configured to identify the first engine quantity and the second engine quantity of the current page; the first engine quantity is the quantity of target engines to be called in the visible area of ​​the current page, and the second engine quantity is the quantity of target engines to be called in the current page;

[0028] an engine acquisition unit, configured to acquire a cached target engine from a preset database when the number of the first engines is less than a preset number and the number of the second engines is greater than the preset number; the preset number is a threshold number of target engines supported by the current page, and the preset database caches the target engine called by the non-visible area of ​​the current page;

[0029] The page rendering unit is configured to execute rendering of a corresponding position in the visible area according to the cached target engine and display the rendered page.

[0030] In an exemplary embodiment, the quantity identification unit is further configured to determine the number of target engine rendering areas in the visible area of ​​the current page; and determine the number of target engines to be called in the visible area as the first engine number based on the number of target engine rendering areas.

[0031] In an exemplary embodiment, the engine acquisition unit is further configured to execute, when the first engine number is less than a preset number, the second engine number is greater than the preset number, and the target engines of the first engine number are cached in the preset database, acquiring the target engines of the first engine number from the preset database.

[0032] In an exemplary embodiment, the device further includes an engine storage unit configured to execute acquisition of a target engine called by the non-visible area of ​​the current page; and store the target engine called by the non-visible area of ​​the current page in the preset database.

[0033] In an exemplary embodiment, the device also includes a first processing unit, which is configured to identify the third engine number and the fourth engine number of the current page when the movement of the current page is detected; the third engine number is the number of target engines called by the page area currently moving out of the visible area, and the fourth engine number is the number of target engines to be called by the page area currently moving into the visible area; when the third engine number is greater than the fourth engine number and the fourth engine number meets a first preset threshold, the target engine called by the page area currently moving out of the visible area is stored in the preset database.

[0034] In an exemplary embodiment, the device also includes a second processing unit, which is configured to execute, when the number of the third engines is greater than the number of the fourth engines and the number of the fourth engines meets a second preset threshold, obtaining the target engines of the fourth number of engines from the target engines called by the page area currently moved out of the visible area to obtain the remaining target engines; rendering the corresponding positions of the page area currently moved into the visible area according to the target engines of the fourth number of engines, and storing the remaining target engines in the preset database.

[0035] In an exemplary embodiment, the device also includes a third processing unit, which is configured to execute, when the number of the third engines is less than or equal to the number of the fourth engines and the number of the fourth engines meets the second preset threshold, obtaining a target number of target engines from the preset database; the target number is the difference between the number of the fourth engines and the number of the third engines; and rendering the corresponding position of the page area currently moving into the visible area according to the target number of target engines and the target engine called by the page area currently moving out of the visible area.

[0036] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement a page processing method as described in any one of the embodiments of the first aspect.

[0037] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the page processing method described in any one of the embodiments of the first aspect.

[0038] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, wherein the computer program product comprises instructions, and when the instructions are executed by a processor of an electronic device, the electronic device is enabled to execute the page processing method described in any one of the embodiments of the first aspect.

[0039] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0040] By identifying the number of first engines and the number of second engines of the current page; the number of first engines is the number of target engines to be called in the visible area of ​​the current page, and the number of second engines is the number of target engines to be called in the current page; then when the number of first engines is less than the preset number, and the number of second engines is greater than the preset number, the cached target engines are obtained from the preset database; the preset number is the threshold number of target engines supported by the current page, and the preset database caches the target engines called by the non-visible area of ​​the current page; finally, according to the cached target engines, the corresponding positions in the visible area are rendered, and the rendered page is displayed. In this way, the target engines called by the non-visible area of ​​the current page are first cached, and when the number of target engines to be called in the visible area of ​​the current page is less than the threshold number of target engines supported by the current page, and the number of target engines to be called in the current page is greater than the threshold number of target engines supported by the current page, the cached target engines called by the non-visible area of ​​the current page are used to render the corresponding positions in the visible area, without discarding all target engines, thereby avoiding the defect that when the number of target engines to be called in the current page exceeds the limit, all target engines need to be discarded, resulting in poor display effect of the page, thereby improving the display effect of the page.

[0041] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0043] Figure 1 The figure is a flow chart of a page processing method according to an exemplary embodiment.

[0044] Figure 2 The flowchart of the step of identifying the first engine number of the current page is shown according to an exemplary embodiment.

[0045] Figure 3The figure is a flowchart of another page processing method according to an exemplary embodiment.

[0046] Figure 4 is a flowchart of another page processing method according to an exemplary embodiment.

[0047] Figure 5 The figure is a block diagram of a page processing device according to an exemplary embodiment.

[0048] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0049] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0050] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0051] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0052] Figure 1 is a flow chart of a page processing method according to an exemplary embodiment. Figure 1 As shown, the page processing method is used in a terminal and includes the following steps:

[0053] In step S110, the first engine number and the second engine number of the current page are identified; the first engine number is the number of target engines to be called in the visible area of ​​the current page, and the second engine number is the number of target engines to be called in the current page.

[0054] The current page refers to the page that needs to be displayed on the terminal (such as a mobile phone, tablet, etc.), such as a video browsing page, a news information page, a picture browsing page, etc. The visible area of ​​the current page refers to the page area of ​​the current page displayed on the terminal screen; the non-visible area of ​​the current page refers to the page area of ​​the current page that is not displayed on the terminal screen.

[0055] The target engine refers to a rendering engine, such as a webgl (Web Graphics Library) rendering engine.

[0056] The first engine quantity of the current page refers to the number of target engines that need to be called in the visible area of ​​the current page, and the second engine quantity of the current page refers to the number of target engines that need to be called in the current page.

[0057] Specifically, the terminal identifies the target engine rendering area of ​​the visible area of ​​the current page, and obtains the number of target engines to be called in the visible area of ​​the current page as the first engine number of the current page; identifies the target engine rendering area of ​​the current page, and obtains the number of target engines to be called in the current page as the second engine number of the current page.

[0058] For example, assuming that the number of rendering areas in the visible area of ​​the current page is A and the number of rendering areas in the current page is B, then the number of first engines in the current page is A and the number of second engines in the current page is B.

[0059] In step S120, when the number of first engines is less than the preset number and the number of second engines is greater than the preset number, the cached target engine is obtained from the preset database; the preset number is the threshold number of target engines supported by the current page, and the preset database caches the target engine called by the non-visible area of ​​the current page.

[0060] The number threshold may refer to the maximum number; the preset number refers to the maximum number of target engines supported by the current page, specifically the maximum number of rendering engines supported by the current page. It should be noted that if the number of target engines running on the current page is too large, the browser will crash due to memory usage and other reasons, resulting in poor display of the page.

[0061] Among them, the target engine called by the non-visible area of ​​the current page will be cached in the preset database to prevent the non-visible area from occupying the target engine called by the current page when the page is not needed, causing the number of target engines called by the current page to exceed the limit, thereby causing poor display effect of the page.

[0062] Specifically, when the number of the first engine is less than the threshold number of target engines supported by the current page, and the number of the second engine is greater than the threshold number of target engines supported by the current page, the terminal obtains the cached target engine from the preset database. Further, when the number of the first engine is less than the maximum number of target engines supported by the current page, and the number of the second engine is greater than the maximum number of target engines supported by the current page, it means that the number of target engines to be called on the current page exceeds the limit, but the number of target engines to be called in the visible area of ​​the current page does not exceed the limit, and the cached target engine is obtained from the preset database through the terminal.

[0063] For example, when the number of rendering engines required to be called in the visible area of ​​the current page is less than the preset number, and the number of rendering engines required to be called by the current page is greater than the preset number, the terminal obtains the cached rendering engine from the preset database.

[0064] In step S130, the corresponding position in the visible area is rendered according to the cached target engine, and the rendered page is displayed.

[0065] For example, the terminal renders the corresponding rendering area in the visible area according to the cached rendering engine to obtain a rendered page.

[0066] In the above page processing method, the first engine number and the second engine number of the current page are identified; the first engine number is the number of target engines to be called in the visible area of ​​the current page, and the second engine number is the number of target engines to be called in the current page; then when the first engine number is less than the preset number and the second engine number is greater than the preset number, the cached target engine is obtained from the preset database; the preset number is the threshold value of the number of target engines supported by the current page, and the preset database caches the target engines called by the non-visible area of ​​the current page; finally, according to the cached target engine, the corresponding position in the visible area is rendered, and the rendered page is displayed. In this way, the target engine called by the non-visible area of ​​the current page is cached first, and when the number of target engines to be called in the visible area of ​​the current page is less than the threshold number of target engines supported by the current page, and the number of target engines to be called in the current page is greater than the threshold number of target engines supported by the current page, the cached target engine called by the non-visible area of ​​the current page is used to render the corresponding position in the visible area without discarding all the target engines, thereby avoiding the defect that when the number of target engines to be called of the current page exceeds the limit, all the target engines need to be discarded, resulting in poor display effect of the page, thereby improving the display effect of the page.

[0067] In an exemplary embodiment, if Figure 2 As shown, in step S110, the number of the first engine of the current page is identified, which can be specifically achieved by the following steps:

[0068] In step S210, the number of target engine rendering areas in the visible area of ​​the current page is determined.

[0069] In step S220, the number of target engines to be called in the visible area is determined according to the number of target engine rendering areas, as the first engine number.

[0070] The target engine rendering area refers to the area that the target engine needs to render, specifically the area that the rendering engine needs to render, such as the webgl rendering area. There is a one-to-one correspondence between the target engine and the target engine rendering area.

[0071] Specifically, the terminal identifies the target engine rendering area in the visible area of ​​the current page, obtains the number of target engine rendering areas in the visible area of ​​the current page; determines the number of target engine rendering areas in the visible area of ​​the current page as the number of target engines to be called in the visible area; and uses the number of target engines to be called in the visible area as the first engine number of the current page.

[0072] For example, when the number of target engine rendering areas in the visible area of ​​the current page is A, it means that the number of target engines to be called in the visible area is A, and further, the number of first engines is also A.

[0073] Further, in step S110, the number of second engines of the current page is identified, which can be specifically implemented by the following steps: the terminal identifies the target engine rendering area of ​​the current page to obtain the number of target engine rendering areas of the current page; the number of target engine rendering areas of the current page is determined as the number of target engines to be called on the current page; the number of target engines to be called on the current page is used as the number of second engines of the current page. For example, when the number of target engine rendering areas of the current page is B, it means that the number of target engines to be called on the current page is B, and further, it means that the number of second engines is also B.

[0074] The technical solution provided by the disclosed embodiment, by identifying the number of first engines of the current page, is conducive to obtaining the cached target engines from the preset database and rendering the corresponding positions in the visible area when the number of first engines is less than the preset number and the number of second engines is greater than the preset number; it avoids the defect that when the number of target engines to be called on the current page exceeds the limit, all target engines need to be discarded, resulting in poor display effect of the page, and achieves the purpose of reusing target engines and improving page performance.

[0075] In an exemplary embodiment, in step S120, when the number of first engines is less than a preset number and the number of second engines is greater than the preset number, the cached target engines are obtained from the preset database, specifically including: when the number of first engines is less than the preset number, the number of second engines is greater than the preset number, and the preset database has the first number of target engines cached, obtaining the first number of target engines from the preset database.

[0076] For example, when the number of target engines that need to be called in the visible area of ​​the current page is less than the preset number, the number of target engines that need to be called in the current page is greater than the preset number, and the preset database has cached the corresponding number of target engines that need to be called in the visible area of ​​the current page, the terminal directly obtains the corresponding number of target engines from the preset database without re-establishing the target engine.

[0077] The technical solution provided by the embodiment of the present disclosure directly obtains the target engines of the first engine quantity from the preset database when the number of the first engines is less than the preset number, the number of the second engines is greater than the preset number, and the target engines of the first engine quantity are cached in the preset database, without the need to re-establish the target engines, thereby achieving the purpose of reusing the target engines; at the same time, it is also unnecessary to discard all the target engines when the number of target engines to be called on the current page exceeds the limit, thereby improving the display effect of the page.

[0078] In an exemplary embodiment, in step S110, before identifying the first engine number and the second engine number of the current page, it also includes: obtaining the target engine called by the non-visible area of ​​the current page; and storing the target engine called by the non-visible area of ​​the current page in a preset database.

[0079] For example, the terminal obtains instructions through the target engine, obtains the target engine called by the non-visible area of ​​the current page, and stores the target engine called by the non-visible area of ​​the current page in a preset database to cache the target engine that is not currently needed through the preset database.

[0080] The technical solution provided by the disclosed embodiment caches the target engine called by the non-visible area of ​​the current page through a preset database, thereby avoiding the defect that the non-visible area occupies the target engine called by the current page when the page does not need to be displayed, causing the number of target engines called by the current page to exceed the limit, thereby causing the display effect of the page to be poor; at the same time, when the target engine needs to be called in the visible area of ​​the current page, the corresponding number of target engines are directly obtained from the preset database without the need to re-establish the target engine, thereby achieving the purpose of reusing the target engine.

[0081] In an exemplary embodiment, in step S130, after rendering the corresponding position in the visible area according to the cached target engine and displaying the rendered page, it also includes: when the movement of the current page is detected, identifying the third engine number and the fourth engine number of the current page; the third engine number is the number of target engines called by the page area currently moving out of the visible area, and the fourth engine number is the number of target engines to be called by the page area currently moving into the visible area; when the third engine number is greater than the fourth engine number, and the fourth engine number meets the first preset threshold, the target engine called by the page area currently moving out of the visible area is stored in the preset database.

[0082] When the user scrolls the current page, the current page will present another page area, and the other page area is the new visible area.

[0083] Among them, the third engine number refers to the number of target engines that have been called by the page area currently moved out of the visible area; the page area currently moved out of the visible area refers to the page area that appeared in the visible area last time but does not appear in the visible area this time.

[0084] Among them, the fourth engine number refers to the number of target engines that need to be called for the page area currently moving into the visible area; the page area currently moving into the visible area refers to the page area that did not appear in the visible area last time but appears in the visible area this time.

[0085] The first preset threshold may be 0. The fourth engine quantity meets the first preset threshold, which means that the fourth engine quantity is equal to the first preset threshold, specifically, the fourth engine quantity is equal to 0.

[0086] For example, when the movement of the current page is detected, the terminal identifies the target engine rendering area in the page area currently moving out of the visible area, and obtains the number of target engine rendering areas in the page area currently moving out of the visible area; according to the number of target engine rendering areas in the page area currently moving out of the visible area, the number of target engines that have been called by the page area currently moving out of the visible area is determined as the third engine number; at the same time, the target engine rendering area in the page area currently moving into the visible area is identified to obtain the number of target engine rendering areas in the page area currently moving into the visible area; according to the number of target engine rendering areas in the page area currently moving into the visible area, the number of target engines that need to be called by the page area currently moving into the visible area is determined as the fourth engine number; when the third engine number is greater than the fourth engine number, and the fourth engine number is 0, it means that the number of target engines that have been called by the page area currently moving out of the visible area is greater than or equal to 1, and the number of target engines that need to be called by the page area currently moving into the visible area is 0, then the target engines that have been called by the page area currently moving out of the visible area are directly stored in the preset database.

[0087] The technical solution provided by the embodiment of the present disclosure stores the target engines called by the page area currently moving out of the visible area in a preset database when the number of target engines called by the page area currently moving out of the visible area is greater than the number of target engines to be called by the page area currently moving into the visible area, and the number of target engines to be called by the page area currently moving into the visible area meets a first preset threshold value. This achieves caching the target engines in the preset database when they are not needed, thereby avoiding the defect that the number of target engines called by the current page exceeds the limit, resulting in poor display effect of the page.

[0088] In an exemplary embodiment, after identifying the third engine number and the fourth engine number of the current page when the movement of the current page is detected, it also includes: when the third engine number is greater than the fourth engine number, and the fourth engine number meets the second preset threshold, obtaining the target engines of the fourth engine number from the target engines called by the page area currently moving out of the visible area to obtain the remaining target engines; rendering the corresponding position of the page area currently moving into the visible area according to the target engines of the fourth engine number, and storing the remaining target engines in a preset database.

[0089] Among them, the second preset threshold value may be 1. The fourth engine number meets the second preset threshold value, which may mean that the fourth engine number is greater than or equal to the second preset threshold value, specifically, the fourth engine number is greater than or equal to 1. For example, when the third engine number is greater than the fourth engine number, and the fourth engine number is greater than or equal to the second preset threshold value, it means that the number of target engines that have been called by the page area currently moving out of the visible area is greater than the number of target engines that need to be called by the page area currently moving into the visible area, and the number of target engines that need to be called by the page area currently moving into the visible area is greater than or equal to the second preset threshold value, then the terminal obtains the target engines corresponding to the number of target engines that need to be called by the page area currently moving into the visible area from the target engines called by the page area currently moving out of the visible area, and obtains the remaining target engines; according to the target engines corresponding to the number of target engines that need to be called by the page area currently moving into the visible area, the corresponding target engine rendering area of ​​the page area currently moving into the visible area is rendered to obtain the rendered page, and the remaining target engines are stored in the preset database.

[0090] The technical solution provided by the embodiment of the present disclosure is that, when the number of target engines called by the page area currently moving out of the visible area is greater than the number of target engines to be called by the page area currently moving into the visible area, and the number of target engines to be called by the page area currently moving into the visible area meets a second preset threshold, a part of the target engines called by the page area currently moving out of the visible area are applied to the page area currently moving into the visible area to render the corresponding positions in the page area currently moving into the visible area; the other part of the target engines are stored in a preset database, which not only improves the page performance, but also achieves the purpose of reusing the target engines.

[0091] In an exemplary embodiment, after identifying the third engine number and the fourth engine number of the current page when the movement of the current page is detected, it also includes: when the third engine number is less than or equal to the fourth engine number, and the fourth engine number meets the second preset threshold, obtaining a target number of target engines from a preset database; the target number is the difference between the fourth engine number and the third engine number; and rendering the corresponding position of the page area currently moving into the visible area according to the target number of target engines and the target engine called by the page area currently moving out of the visible area.

[0092] For example, when the number of third engines is less than or equal to the number of fourth engines, and the number of fourth engines is greater than or equal to the second preset threshold, it means that the number of target engines that have been called by the page area currently moving out of the visible area is less than or equal to the number of target engines that need to be called by the page area currently moving into the visible area, and the number of target engines that need to be called by the page area currently moving into the visible area is greater than or equal to the second preset threshold, then the terminal counts the difference between the number of target engines that need to be called by the page area currently moving into the visible area and the number of target engines that have been called by the page area currently moving out of the visible area to obtain the target number; the target number of target engines is obtained from the preset database, and according to the target number of target engines and the target engines that have been called by the page area currently moving out of the visible area, the corresponding target engine rendering area of ​​the page area currently moving into the visible area is rendered to obtain the rendered page.

[0093] The technical solution provided by the embodiment of the present disclosure, when the number of target engines called by the page area currently moving out of the visible area is less than or equal to the number of target engines to be called by the page area currently moving into the visible area, and the number of target engines to be called by the page area currently moving into the visible area meets a second preset threshold, the corresponding position of the page area currently moving into the visible area is rendered according to the target engine called by the page area currently moving out of the visible area and the target engine cached in a preset database, thereby achieving the effect of reusing target engines and improving page performance.

[0094] Figure 3 is a flow chart of a page processing method according to an exemplary embodiment. Figure 3 As shown, the page processing method is used in a terminal and includes the following steps:

[0095] In step S310, the target engine called by the non-visible area of ​​the current page is obtained; and the target engine called by the non-visible area of ​​the current page is stored in a preset database.

[0096] In step S320, the number of target engine rendering areas in the visible area of ​​the current page is determined; according to the number of target engine rendering areas in the visible area of ​​the current page, the number of target engines to be called in the visible area is determined as the first engine number.

[0097] In step S330, the number of target engine rendering areas in the current page is determined; and according to the number of target engine rendering areas in the current page, the number of target engines to be called in the current page is determined as the second engine number.

[0098] In step S340, when the number of first engines is less than the preset number, the number of second engines is greater than the preset number, and the target engines of the first engine number are cached in the preset database, the target engines of the first engine number are obtained from the preset database; the preset number is the threshold number of target engines supported by the current page.

[0099] In step S350, the corresponding position in the visible area is rendered according to the target engine of the first engine quantity obtained, and the rendered page is displayed.

[0100] In the above page processing method, the target engine called by the non-visible area of ​​the current page is first cached, and when the number of target engines to be called in the visible area of ​​the current page is less than the threshold number of target engines supported by the current page, and the number of target engines to be called in the current page is greater than the threshold number of target engines supported by the current page, the cached target engine called by the non-visible area of ​​the current page is used to render the corresponding position in the visible area without discarding all the target engines, thereby avoiding the defect that when the number of target engines to be called of the current page exceeds the limit, all the target engines need to be discarded, resulting in poor display effect of the page, thereby improving the display effect of the page.

[0101] In order to more clearly illustrate the page processing method provided by the embodiment of the present disclosure, the page processing method is specifically described below with a specific embodiment. Figure 4 As shown, the present disclosure also provides a page processing method, which renders the visible area of ​​the page by reusing the cached target engine; specifically includes the following contents:

[0102] refer to Figure 4 The terminal caches the target engines removed from the visible area of ​​the page through the target engine cache module; when the target engine needs to be called in the visible area, the terminal takes out the corresponding number of target engines from the target engine cache module; and monitors the visible area of ​​the page at the same time, calling the cached target engine as needed.

[0103] The above page processing method can achieve the following technical effects: (1) breaking the limit on the number of target engines running at a single time in the visible area; (2) reusing the target engines, reducing the creation of new target engines, and improving page performance.

[0104] It should be understood that although Figure 1-Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-Figure 3At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0105] It can be understood that the same / similar parts between the various embodiments of the above method in this specification can refer to each other, and each embodiment focuses on the differences from other embodiments. For related points, please refer to the description of other method embodiments.

[0106] Figure 5 is a block diagram of a page processing device according to an exemplary embodiment. Figure 5 The device includes a quantity recognition unit 510, an engine acquisition unit 520 and a page rendering unit 530.

[0107] The quantity identification unit 510 is configured to identify the first engine quantity and the second engine quantity of the current page; the first engine quantity is the number of target engines to be called in the visible area of ​​the current page, and the second engine quantity is the number of target engines to be called in the current page.

[0108] The engine acquisition unit 520 is configured to execute, when the number of first engines is less than a preset number and the number of second engines is greater than a preset number, obtaining a cached target engine from a preset database; the preset number is a threshold number of target engines supported by the current page, and the preset database caches the target engine called by the non-visible area of ​​the current page.

[0109] The page rendering unit 530 is configured to execute rendering of a corresponding position in the visible area according to the cached target engine, and display the rendered page.

[0110] In an exemplary embodiment, the quantity identification unit 510 is further configured to determine the number of target engine rendering areas in the visible area of ​​the current page; and determine the number of target engines to be called in the visible area as the first engine number based on the number of target engine rendering areas.

[0111] In an exemplary embodiment, the engine acquisition unit 520 is further configured to execute, when the number of first engines is less than a preset number, the number of second engines is greater than the preset number, and the target engines of the first engine number are cached in the preset database, acquiring the target engines of the first engine number from the preset database.

[0112] In an exemplary embodiment, the page processing device further includes an engine storage unit configured to execute acquisition of a target engine called by the non-visible area of ​​the current page; and store the target engine called by the non-visible area of ​​the current page in a preset database.

[0113] In an exemplary embodiment, the page processing device also includes a first processing unit, which is configured to execute, when the movement of the current page is detected, identifying the third engine number and the fourth engine number of the current page; the third engine number is the number of target engines called by the page area currently moving out of the visible area, and the fourth engine number is the number of target engines to be called by the page area currently moving into the visible area; when the third engine number is greater than the fourth engine number, and the fourth engine number meets the first preset threshold, the target engine called by the page area currently moving out of the visible area is stored in a preset database.

[0114] In an exemplary embodiment, the page processing device also includes a second processing unit, which is configured to execute, when the number of third engines is greater than the number of fourth engines and the number of fourth engines meets a second preset threshold, obtaining target engines of the fourth number of engines from the target engines called by the page area currently moved out of the visible area to obtain remaining target engines; rendering corresponding positions of the page area currently moved into the visible area according to the target engines of the fourth number of engines, and storing the remaining target engines in a preset database.

[0115] In an exemplary embodiment, the page processing device also includes a third processing unit, which is configured to execute, when the number of third engines is less than or equal to the number of fourth engines and the number of fourth engines meets a second preset threshold, obtaining a target number of target engines from a preset database; the target number is the difference between the number of fourth engines and the number of third engines; and rendering the corresponding position of the page area currently moving into the visible area according to the target number of target engines and the target engine called by the page area currently moving out of the visible area.

[0116] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0117] Figure 6 1 is a block diagram of an electronic device 600 for executing a page processing method according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0118] Reference Figure 6, the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .

[0119] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.

[0120] The memory 604 is configured to store various types of data to support operations on the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, optical disk, or graphene memory.

[0121] The power supply component 606 provides power to the various components of the electronic device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 600.

[0122] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0123] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the electronic device Z00 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting an audio signal.

[0124] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0125] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the electronic device 600, the relative positioning of the components, such as the display and keypad of the electronic device 600, and the sensor assembly 614 can also detect the position change of the electronic device 600 or the electronic device 600 component, the presence or absence of contact between the user and the electronic device 600, the device 600 orientation or acceleration / deceleration and the temperature change of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0126] The communication component 616 is configured to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0127] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0128] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the above instructions can be executed by the processor 620 of the electronic device 600 to perform the above method. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0129] In an exemplary embodiment, a computer program product is further provided. The computer program product includes instructions. The instructions can be executed by the processor 620 of the electronic device 600 to complete the above method.

[0130] It should be noted that the above-mentioned devices, electronic devices, computer-readable storage media, computer program products, etc. may also include other implementation methods according to the description of the method embodiments. The specific implementation methods can refer to the description of the relevant method embodiments, which will not be described one by one here.

[0131] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0132] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A page processing method, characterized in that: include: Identify the number of first engines and the number of second engines for the current page; The first engine number is the number of target engines to be called in the visible area of ​​the current page, and the second engine number is the number of target engines to be called in the current page; When the number of the first engines is less than a preset number, and the number of the second engines is greater than the preset number, obtaining a cached target engine from a preset database; The preset number is a threshold value of the number of target engines supported by the current page, and the preset database caches the target engines called by the non-visible area of ​​the current page; Rendering a corresponding position in the visible area according to the cached target engine, and displaying the rendered page; When movement of the current page is detected, a corresponding position of the page area currently moving into the visible area is rendered based on the target engine called by the page area currently moving out of the visible area.

2. The page processing method according to claim 1, characterized in that: The identifying the first engine number of the current page includes: Determine the number of target engine rendering areas within the visible area of ​​the current page; According to the number of the target engine rendering areas, the number of target engines to be called in the visible area is determined as the first engine number.

3. The page processing method according to claim 1, characterized in that: When the number of the first engines is less than a preset number and the number of the second engines is greater than the preset number, obtaining a cached target engine from a preset database includes: When the first engine quantity is less than a preset quantity, the second engine quantity is greater than the preset quantity, and the target engines of the first engine quantity are cached in the preset database, the target engines of the first engine quantity are obtained from the preset database.

4. The page processing method according to claim 1, characterized in that: Before identifying the first engine number and the second engine number of the current page, the method further includes: Obtaining the target engine called by the non-visual area of ​​the current page; The target engine called by the non-visible area of ​​the current page is stored in the preset database.

5. The page processing method according to claim 1, characterized in that: After rendering the corresponding position in the visible area according to the cached target engine and displaying the rendered page, the method further includes: When the movement of the current page is detected, the third engine number and the fourth engine number of the current page are identified; the third engine number is the number of target engines called by the page area currently moving out of the visible area, and the fourth engine number is the number of target engines to be called by the page area currently moving into the visible area; When the third engine quantity is greater than the fourth engine quantity and the fourth engine quantity meets a first preset threshold, the target engine called by the page area currently moved out of the visible area is stored in the preset database.

6. The page processing method according to claim 5, characterized in that: When the movement of the current page is detected, after identifying the third engine number and the fourth engine number of the current page, the method further includes: When the third number of engines is greater than the fourth number of engines and the fourth number of engines meets a second preset threshold, acquiring target engines of the fourth number of engines from the target engines called by the page area currently moved out of the visible area to obtain remaining target engines; According to the target engines of the fourth number of engines, corresponding positions of the page area currently moved into the visible area are rendered, and the remaining target engines are stored in the preset database.

7. The page processing method according to claim 5, characterized in that: When the movement of the current page is detected, after identifying the third engine number and the fourth engine number of the current page, the method further includes: When the third number of engines is less than or equal to the fourth number of engines, and the fourth number of engines meets a second preset threshold, obtaining a target number of target engines from the preset database; the target number is the difference between the fourth number of engines and the third number of engines; According to the target engines of the target number and the target engine called by the page area currently moved out of the visible area, the corresponding position of the page area currently moved into the visible area is rendered.

8. A page processing device, characterized in that: include: A quantity identification unit, configured to identify the quantity of the first engine and the quantity of the second engine of the current page; The first engine number is the number of target engines to be called in the visible area of ​​the current page, and the second engine number is the number of target engines to be called in the current page; an engine acquisition unit, configured to acquire a cached target engine from a preset database when the number of the first engines is less than a preset number and the number of the second engines is greater than the preset number; The preset number is a threshold value of the number of target engines supported by the current page, and the preset database caches the target engines called by the non-visible area of ​​the current page; A page rendering unit, configured to execute rendering of a corresponding position in the visible area according to the cached target engine, and display the rendered page; The page processing device is configured to execute, when detecting the movement of the current page, rendering a corresponding position of the page area currently moving into the visible area based on the target engine called by the page area currently moving out of the visible area.

9. The page processing device according to claim 8, characterized in that: The quantity identification unit is further configured to determine the number of target engine rendering areas in the visible area of ​​the current page; and determine the number of target engines to be called in the visible area according to the number of target engine rendering areas as the first engine number.

10. The page processing device according to claim 8, characterized in that: The engine acquisition unit is further configured to acquire the target engines for the first engine quantity from the preset database when the first engine quantity is less than a preset quantity, the second engine quantity is greater than the preset quantity, and the target engines for the first engine quantity are cached in the preset database.

11. The page processing device according to claim 8, characterized in that: The device further comprises an engine storage unit configured to execute the target engine called for acquiring the non-visible area of ​​the current page; The target engine called by the non-visible area of ​​the current page is stored in the preset database.

12. The page processing device according to claim 8, characterized in that: The device further includes a first processing unit configured to identify a third engine number and a fourth engine number of the current page when movement of the current page is detected; the third engine number is the number of target engines called by the page area currently moved out of the visible area, and the fourth engine number is the number of target engines to be called by the page area currently moved into the visible area; When the third engine quantity is greater than the fourth engine quantity and the fourth engine quantity meets a first preset threshold, the target engine called by the page area currently moved out of the visible area is stored in the preset database.

13. The page processing device according to claim 12, characterized in that: The device further includes a second processing unit configured to execute, when the number of the third engines is greater than the number of the fourth engines and the number of the fourth engines meets a second preset threshold, obtaining target engines of the fourth number of engines from the target engines called by the page area currently moved out of the visible area to obtain remaining target engines; According to the target engines of the fourth number of engines, corresponding positions of the page area currently moved into the visible area are rendered, and the remaining target engines are stored in the preset database.

14. The page processing device according to claim 12, characterized in that: The device further includes a third processing unit configured to execute, when the third number of engines is less than or equal to the fourth number of engines and the fourth number of engines meets a second preset threshold, obtaining a target number of target engines from the preset database; The target number is the difference between the fourth engine number and the third engine number; According to the target engines of the target number and the target engine called by the page area currently moved out of the visible area, the corresponding position of the page area currently moved into the visible area is rendered.

15. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the page processing method according to any one of claims 1 to 7.

16. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the page processing method as claimed in any one of claims 1 to 7.

17. A computer program product, comprising instructions, characterized in that: When the instruction is executed by a processor of an electronic device, the electronic device is enabled to execute the page processing method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data visualization engine system

    CN101430710A

  • Mobile terminal as well as web page rendering method and device thereof

    CN105824874A

  • Dynamically render large dataset in client application

    CN109643209A

  • Method for optimizing WebApp memory and nodes

    CN111258682A

  • Local secure rendering of web content

    CN111328394A