CN117633384A - Page generation method, device, equipment and storage medium - Google Patents

Page generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN117633384A
CN117633384A CN202311667758.6A CN202311667758A CN117633384A CN 117633384 A CN117633384 A CN 117633384A CN 202311667758 A CN202311667758 A CN 202311667758A CN 117633384 A CN117633384 A CN 117633384A
Authority
CN
China
Prior art keywords
layer
area
region
version
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311667758.6A
Other languages
Chinese (zh)
Inventor
周群辉
刘楚文
胡蕾
李怡欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202311667758.6A priority Critical patent/CN117633384A/en
Publication of CN117633384A publication Critical patent/CN117633384A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention discloses a page generation method, a device, equipment and a storage medium, and the method relates to the technical field of computers and comprises the following steps: responding to an operation request of a user on a current page in a view area, and updating current layer data corresponding to the current page to obtain updated layer data; determining the layer version of each layer in the view region according to the current layer data and the updated layer data, and determining the region version of each display region in the view region according to the layer version of each layer, wherein the display regions are obtained by dividing the view region based on display sizes; after determining the region rendering results of the display regions according to the region versions of the display regions, generating an update page corresponding to the update layer data according to the region rendering results. According to the technical scheme, the updating page corresponding to the updated layer data is determined without full rendering, the rendering efficiency is improved, the rendering time is shortened, and the user experience is further improved.

Description

Page generation method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a page generation method, a page generation device, page generation equipment and a storage medium.
Background
Today, accessing various web pages through clients has become one of the important channels for people to obtain information. In order for a provider of information services to provide better services to users, it is often necessary to render information presentation pages according to the information provided.
In the existing page rendering mode, after receiving the page data, a display area of the user terminal is generally required to be rendered based on the page data, so as to obtain an initial page. When the image layer in the initial page changes, the page data changes to obtain updated page data, and the display area needs to be fully rendered again based on the updated page data to obtain an updated page.
In the process of implementing the present invention, the inventor finds that at least the following technical problems exist in the prior art:
the page data in the display area changes, and full-scale rendering needs to be carried out on the display area again, so that the rendering time is long, and the user experience is affected.
Disclosure of Invention
The invention provides a page generation method, a page generation device, page generation equipment and a storage medium, so that rendering performance is improved, and user experience is further improved.
In a first aspect, an embodiment of the present invention provides a page generating method, including:
Responding to an operation request of a user on a current page in a view area, and updating current layer data corresponding to the current page to obtain updated layer data;
determining a layer version of each layer in the view area according to the current layer data and the updated layer data, and determining an area version of each display area in the view area according to the layer version of each layer, wherein the display areas are obtained by dividing the view area based on display sizes;
after determining the region rendering result of each display region according to the region version of each display region, generating an update page corresponding to the update layer data according to each region rendering result.
In a second aspect, an embodiment of the present invention further provides a page generating apparatus, including:
the updating module is used for responding to an operation request of a user on a current page in the view area, updating the current layer data corresponding to the current page and obtaining updated layer data;
the determining module is used for determining the layer version of each layer in the view area according to the current layer data and the updated layer data, and determining the area version of each display area in the view area according to the layer version of each layer, wherein the display area is obtained by dividing the view area based on display size;
The execution module is used for generating an update page corresponding to the update layer data according to the region rendering result after determining the region rendering result of each display region according to the region version of each display region.
In a third aspect, an embodiment of the present invention further provides a computer apparatus, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the page generation method of any of the first aspects.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer executable instructions which, when executed by a computer processor, are used to perform the page generation method of any of the first aspects.
The embodiments of the above invention have the following advantages or benefits:
the embodiment of the invention provides a page generation method, which comprises the following steps: responding to an operation request of a user on a current page in a view area, and updating current layer data corresponding to the current page to obtain updated layer data; determining a layer version of each layer in the view area according to the current layer data and the updated layer data, and determining an area version of each display area in the view area according to the layer version of each layer, wherein the display areas are obtained by dividing the view area based on display sizes; after determining the region rendering result of each display region according to the region version of each display region, generating an update page corresponding to the update layer data according to each region rendering result. According to the technical scheme, the area version of each display area is determined by the updated layer version of the layers in each display area, so that whether each layer in the display area changes or not can be determined according to the area version of the display area, namely, when the area version of each display area is determined to be updated, the change of the layers in the display area can be determined, at the moment, the area rendering result of the display area can be determined according to the updated layer data of each display area corresponding to the updated layer data, when the area version of the display area is determined to be not updated, the fact that the layers in the display area do not change can be determined, at the moment, the area rendering result of the display area can be determined according to the last rendering result of the display area, after the area rendering result of each display area is determined, the updated page corresponding to the updated layer data can be generated according to the area rendering result of each display area, the updated page corresponding to the updated layer data can be determined under the condition that full rendering is not needed, the efficiency of the updated page corresponding to the updated layer data is improved, the rendering time is further shortened, and the user experience is improved.
Drawings
FIG. 1 is a flowchart of a page generation method according to an embodiment of the present invention;
FIG. 2 is a flowchart of another page generation method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a page generating system according to an embodiment of the present invention;
FIG. 4 is a flowchart of a page generation method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a page generating apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like. Furthermore, embodiments of the invention and features of the embodiments may be combined with each other without conflict.
When a large number of layers exist in the current page obtained based on the page data rendering display area, the change of the layers caused by dragging or editing the layers can cause the change of the page data, and updated page data is obtained. Since the changed layer cannot be determined at this time, the display area can be rendered again only in full amount based on the updated page data. Therefore, the rendering time is long, the user is provided with a clamping feeling, and particularly, under the scene of low network transmission speed, the display area can be in a white screen state for a long time, so that the user experience is affected.
Taking 0.01 ms per layer as an example, re-rendering takes 100 ms when there are 1w layers in the current page. And, as the number of layers in a page increases, rendering time continues to increase.
Therefore, the page generation method is provided, after the layers are changed, the corresponding pages are quickly generated, the page rendering performance is improved, and the user experience is further improved.
Fig. 1 is a flowchart of a page generating method according to an embodiment of the present invention, where the embodiment of the present invention is applicable to a situation where rendering performance needs to be improved. The method may be performed by a page generating means, which may be implemented in software and/or hardware. As shown in fig. 1, the method specifically includes the following steps:
Step 110, in response to a user operation request for a current page in a view area, updating current layer data corresponding to the current page to obtain updated layer data.
Specifically, the user edits or drags any layer in the rendered page in the view region, and can trigger an operation request, and in response to the operation request, the corresponding layer in the page can be modified, deleted or newly added, so that the layer data corresponding to the view region can be changed, and the current layer data is changed into updated layer data.
The layer data may include layer sub-data for each layer in the page, the current layer data may include current layer sub-data for each layer in the current page in the view area, and the update layer data may include update layer sub-data for each layer in the update page in the view area.
And responding to the operation request, the layer sub-data corresponding to the layer of which the operation request is triggered by the user in the current layer data corresponding to the current page can be updated, and other layer sub-data are unchanged, so that updated layer data are obtained.
In the embodiment of the invention, the update of the current layer data corresponding to the view area into the updated layer data is realized in response to the operation request of the user for at least one layer in the current page in the view area.
And 120, determining the layer version of each layer in the view area according to the current layer data and the updated layer data, and determining the area version of each display area in the view area according to the layer version of each layer.
The display area is obtained by dividing the view area based on display size.
Specifically, the current layer sub-data and the updated layer sub-data of each layer in the view region are determined according to the current layer data and the updated layer data, when the current layer sub-data and the updated layer sub-data of the layer are inconsistent, the updated layer sub-data of the layer can be determined to change relative to the current layer sub-data, and then the layer can be determined to change, and at the moment, the layer version of the layer can be increased by 1. When the current layer sub-data and the updated layer sub-data of the layer are consistent, the updated layer sub-data of the layer can be determined to be unchanged relative to the updated layer sub-data, and then the layer is determined to be unchanged, and at the moment, the layer version of the layer can be kept unchanged.
In order to quickly generate a page corresponding to updated layer data in a view area, the view area needs to be partitioned, and only the display area with the changed layer is rendered again. The view area may be specifically divided into at least one presentation area according to a view size of the view area and a presentation size of the presentation area.
The layer version corresponding to the layer may indicate whether the layer changes, and thus, the version of the display area determined by the layer version of each layer in the display area may indicate whether the layer changes in the display area.
The version of the presentation area may be determined by the layer version of each layer within the presentation area. Therefore, after determining the layer version of each layer in the view area, the area version of each display area is determined according to the layer version of each layer in each display area. For each display area in the view area, the layer versions of each layer in the display area can be summed, and the summation result is determined as the area version of the display area.
The regional version of the display area is determined by the layer version of each layer in the display area, the layer version of any layer in the display area changes, and the regional version of the display area also changes, so that the regional version of the display area provides a data basis for determining whether each layer in the display area changes.
In the embodiment of the invention, after the layer version of each layer in the view region is determined according to the current layer data and the updated layer data corresponding to the view region, the region version of each display region in the view region is determined according to the layer version of each layer.
And 130, after determining the region rendering result of each display region according to the region version of each display region, generating an update page corresponding to the update layer data according to each region rendering result.
The updated region version of the display region indicates that the layer in the display region changes, further indicates that the display region needs to be rendered again, and the updated region version of the display region indicates that the layer in the display region does not change, further indicates that the display region does not need to be rendered again.
Specifically, after determining the region version of each display region in the view region, it may be determined whether the region version of each display region is updated. If the region version of the display region is updated, indicating that a changed layer exists in the display region, at this time, rendering the display region again based on region update layer data corresponding to the display region in the update layer data to obtain a region rendering result of the display region; if the region version of the display region is not updated, which indicates that the layers in the display region are not changed, at this time, the last rendering result of the cached display region can be determined as the region rendering result of the display region.
Therefore, after the area version of the display area is updated, the area update layer data corresponding to the display area can be determined in the update layer data according to the identification coordinates corresponding to the display area and the display size of the display area, so that the data required for determining the re-rendering display area is realized.
Furthermore, an update page corresponding to the update layer data can be generated according to the region rendering result of each display region, specifically, the region rendering result of each display region can be spliced based on the identification coordinates corresponding to each display region, so as to obtain the update page corresponding to the update layer data.
In the embodiment of the invention, after the area rendering result of each display area is determined according to the update area layer data corresponding to the display area in the update layer data or the last rendering result corresponding to the display area, the update page corresponding to the update layer data is generated according to the area rendering result of each display area, the update page corresponding to the update layer data is determined without full-scale rendering, the rendering efficiency of the update page corresponding to the update layer data is improved, the rendering time is further reduced, and the user experience is improved.
The page generation method provided by the embodiment of the invention comprises the following steps: responding to an operation request of a user on a current page in a view area, and updating current layer data corresponding to the current page to obtain updated layer data; determining a layer version of each layer in the view area according to the current layer data and the updated layer data, and determining an area version of each display area in the view area according to the layer version of each layer, wherein the display areas are obtained by dividing the view area based on display sizes; after determining the region rendering result of each display region according to the region version of each display region, generating an update page corresponding to the update layer data according to each region rendering result. According to the technical scheme, the area version of each display area is determined by the updated layer version of the layers in each display area, so that whether each layer in the display area changes or not can be determined according to the area version of the display area, namely, when the area version of each display area is determined to be updated, the change of the layers in the display area can be determined, at the moment, the area rendering result of the display area can be determined according to the updated layer data of each display area corresponding to the updated layer data, when the area version of the display area is determined to be not updated, the fact that the layers in the display area do not change can be determined, at the moment, the area rendering result of the display area can be determined according to the last rendering result of the display area, after the area rendering result of each display area is determined, the updated page corresponding to the updated layer data can be generated according to the area rendering result of each display area, the updated page corresponding to the updated layer data can be determined under the condition that full rendering is not needed, the efficiency of the updated page corresponding to the updated layer data is improved, the rendering time is further shortened, and the user experience is improved.
Fig. 2 is a flowchart of another page generation method according to an embodiment of the present invention, where the embodiment of the present invention is applicable to a situation where rendering performance needs to be improved. Based on the above embodiment, the embodiment of the present invention adds "determining, according to the display size of the display area and the identification coordinates in the view area, the area update layer data corresponding to the display area in the update layer data" before determining the area rendering result of each display area according to the area version of each display area. Before updating the current layer data corresponding to the current page in response to an operation request of a user for the current page in the view region to obtain updated layer data, determining region initial layer data corresponding to each display region in the initial layer data of the view region according to the display size; rendering each display area based on the area initial layer data corresponding to each display area to obtain an initial rendering result corresponding to each display area; and generating an initial page corresponding to the initial layer data according to the initial rendering result of each display area. The explanation of the same or corresponding terms as those of the above embodiments will not be repeated here. Referring to fig. 2, the page generating method provided by the embodiment of the present invention includes:
Step 210, determining initial region layer data corresponding to each display region in the initial layer data of the view region according to the display size.
Display dimensions are understood to be the dimensions of the display area and may include the width and height of the display area. The view area may be divided into a plurality of presentation areas, and thus, initial area layer data corresponding to the presentation areas may be determined from initial layer data corresponding to the view area according to a presentation size corresponding to the presentation areas.
Specifically, in order to determine more accurate initial region layer data of the display region, the view region may be first divided into a plurality of display regions according to the display size, and then the identification coordinates of each display region in the view region may be determined according to the display size, where the identification coordinates of the display region may be coordinate information of any point of the display region in the view region, for example, coordinate information of any corner or center point in the display region in the view region. And then the initial layer data corresponding to the display area can be determined from the initial layer data corresponding to the view area according to the identification coordinates and the display size of the display area.
In the embodiment of the invention, the initial area layer data corresponding to each display area is determined in the initial layer data of the view area according to the display size of the display area.
And 220, rendering each display area based on the initial area layer data corresponding to each display area to obtain an initial rendering result corresponding to each display area.
After the initial region layer data corresponding to each display region in the view region is determined, the initial rendering of each display region can be performed based on the initial region layer data corresponding to each display region, and an initial rendering result corresponding to each display region is obtained.
In practical application, after the initial rendering results corresponding to each display area are obtained, the initial rendering results corresponding to each display area may be cached.
In the embodiment of the invention, the primary rendering of each display area in the view area is realized based on the initial area layer data corresponding to each display area in the view area, and the initial rendering result of each display area is obtained.
Step 230, determining an initial rendering result of each display area in the view area as an initial page corresponding to the initial layer data.
Specifically, after determining the initial rendering results of each display area in the view area, the initial rendering results of all display areas in the view area may be determined as an initial page corresponding to the current layer data.
In the embodiment of the invention, the initial page corresponding to the initial layer data is determined according to the initial rendering result of each display area in the view area.
Step 240, in response to a user operation request for a current page in the view area, updating current layer data corresponding to the current page to obtain updated layer data.
In one embodiment, step 240 may specifically include:
and responding to an operation request triggered by the user to any layer in the current page in the view area, updating the current layer sub-data of the layer to update the current layer data, and obtaining the updated layer data.
Specifically, the present invention relates to a method for manufacturing a semiconductor device. After the user carries out operations such as modification, deletion, new addition and the like on any layer in the current page in the view area, an operation request can be triggered, and the layer sub-data corresponding to the layer can be modified, deleted or added in response to the operation request. The method specifically can update the current layer sub-data of the corresponding layer in the current layer data corresponding to the current page into updated layer sub-data, and the layer sub-data of other layers are kept unchanged to obtain the current layer data.
In the embodiment of the invention, the update of the current layer data corresponding to the view area into the updated layer data is realized in response to the operation request of the user for any layer in the current page in the view area.
Step 250, determining a layer version of each layer in the view area according to the current layer data and the updated layer data.
In one embodiment, step 250 may specifically include:
determining current layer sub-data and updated layer sub-data of each layer in the view area in the current layer data and the updated layer data respectively; determining a layer version of the layer according to the current layer version of the layer under the condition that the current layer sub-data and the updated layer sub-data of the layer are not consistent; and determining the current layer version of the layer as the layer version of the layer under the condition that the current layer sub-data of the layer is consistent with the updated layer sub-data.
Specifically, the current layer sub-data and the updated layer sub-data of each layer in the view area are respectively determined according to the current layer data and the updated layer data of the view area, when the current layer sub-data and the updated layer sub-data of the layers are inconsistent, the updated layer sub-data of the layers can be determined to change relative to the current layer sub-data, and then the layers are determined to change, and at the moment, the layer version of the layers can be increased by 1. When the current layer sub-data and the updated layer sub-data of the layer are consistent, the updated layer sub-data of the layer can be determined to be unchanged relative to the current layer sub-data, and then the layer is determined to be unchanged, and at the moment, the layer version of the layer can be kept unchanged.
In the embodiment of the invention, the layer version of each layer in the view area is determined according to the current layer data and the updated layer data corresponding to the view area.
Step 260, determining the region version of each display region in the view region according to the layer version of each layer.
The display area is obtained by dividing the view area based on display size.
In one embodiment, step 260 may specifically include:
for each display area in the view area, determining a layer contained in the display area and a layer version of each layer contained in the display area; and determining the region version of the display region according to the layer version of each layer contained in the display region.
The layer version corresponding to the layer may indicate whether the layer changes, and thus, the version of the display area determined by the layer version of each layer in the display area may indicate whether the layer changes in the display area.
Specifically, after determining the layer version of each layer in the view area, determining the area version of each display area according to the layer version of each layer in each display area. For each presentation area within the view area, the layer versions of each layer within the presentation area may be summed and the sum determined as the area version of the presentation area.
The version of the display area is determined by the layer versions of all the layers in the display area, the layer version of any layer in the display area changes, and the area version of the display area also changes, so that the area version of the display area provides a data basis for determining whether all the layers in the display area change.
In the embodiment of the invention, the region version of each display region in the view region is determined.
Step 270, determining the region rendering result of each display region according to the region version of each display region.
In one embodiment, step 270 may specifically include:
for each display area, under the condition that the area version of the display area is updated, rendering the display area based on the area update layer data corresponding to the display area to obtain the area rendering result; and under the condition that the area version of the display area is not updated, determining the current rendering result of the display area as the area rendering result.
And under the condition that the area version of the display area is updated, the change of the image layer in the display area is indicated, and the need of re-rendering the display area is further indicated. Therefore, in the case that the region version of the display region is updated, the region update layer data for re-rendering the display region may be determined in the update layer data according to the display size of the display region and the identification coordinates in the view region. And under the condition that the area version of the display area is not updated, the image layer in the display area is not changed, and the fact that the display area does not need to be rendered again is further indicated.
Specifically, for each display area with a layer in the view area varying, the area update layer data corresponding to the display area can be determined in the update layer data according to the identification coordinates corresponding to the display area and the display size of the display area. As described above, the identification coordinates of the display area may be coordinate information of any corner or center point in the view area in the display area, so that the area update layer data corresponding to the display area may be determined from the update layer data corresponding to the view area according to the identification coordinates and the display size of the display area. Furthermore, the display areas can be rendered based on the area update layer data corresponding to the display areas, and the area rendering results corresponding to the display areas are obtained. For each display area with unchanged image layer in the view area, the last rendering result of each cached display area can be determined as the area rendering result of the display area.
In practical application, after the region rendering results corresponding to the display regions are obtained, the region rendering results corresponding to the display regions can be cached, so that the next rendering of the display regions is facilitated.
In the embodiment of the invention, under the condition that the layer in the display area is determined to be changed, the area rendering result of the display area is determined according to the layer data of the update area corresponding to each display area in the updated layer data, under the condition that the layer in the display area is determined to be unchanged, the area rendering result of the display area is determined according to the last rendering result corresponding to the display area, and the area rendering result of the display area in the view area is determined without full rendering, thereby improving the rendering efficiency.
And 280, generating an update page corresponding to the update layer data according to each region rendering result.
Specifically, after determining the region rendering results of each display region in the view region, an update page corresponding to the updated layer data may be determined according to the region rendering results of all display regions in the view region. Specifically, the region rendering results of the display regions can be spliced based on the identification coordinates corresponding to the display regions, so that an update page corresponding to the updated layer data is obtained.
According to the embodiment of the invention, the current page corresponding to the current layer data is determined according to the area rendering result of each display area in the view area, the rendering efficiency of the current page corresponding to the current layer data is improved, the rendering time is further reduced, and the user experience is improved.
The page generation method provided by the embodiment of the invention comprises the following steps: determining initial region layer data corresponding to each display region in the initial layer data of the view region according to the display size; rendering each display area based on the initial area layer data corresponding to each display area to obtain an initial rendering result corresponding to each display area; determining an initial rendering result of each display area in the view area as an initial page corresponding to the initial layer data; responding to an operation request of a user on a current page in a view area, and updating current layer data corresponding to the current page to obtain updated layer data; determining the layer version of each layer in the view area according to the current layer data and the updated layer data; determining the region version of each display region in the view region according to the layer version of each layer; determining an area rendering result of each display area according to the area version of each display area; and generating an update page corresponding to the update layer data according to each region rendering result. According to the technical scheme, the area version of each display area is determined by the updated layer version of the layers in each display area, so that whether each layer in the display area changes or not can be determined according to the area version of the display area, namely, when the area version of each display area is determined to be updated, the change of the layers in the display area can be determined, at the moment, the area rendering result of the display area can be determined according to the updated layer data of each display area corresponding to the updated layer data, when the area version of the display area is determined to be not updated, the fact that the layers in the display area do not change can be determined, at the moment, the area rendering result of the display area can be determined according to the last rendering result of the display area, after the area rendering result of each display area is determined, the updated page corresponding to the updated layer data can be generated according to the area rendering result of each display area, the updated page corresponding to the updated layer data can be determined under the condition that full rendering is not needed, the efficiency of the updated page corresponding to the updated layer data is improved, the rendering time is further shortened, and the user experience is improved.
Fig. 3 is a schematic structural diagram of a page generating system according to an embodiment of the present invention, where, as shown in fig. 3, the page generating system may include a layer management module, a version management module, a cache module, a region rendering generation module, a region rendering module, a rendering module, and a region dirty checking module. The layer management module is used for storing layer data, particularly layer sub-data of each layer, updating the layer data in response to an operation request, determining region layer data corresponding to a display region in response to a data query request, storing layer versions of each layer in the version management module, caching region rendering results of each display region in the caching module, wherein the region rendering generation module is used for generating a region rendering module, the rendering module is used for executing a region dirty check module and the region rendering module to obtain rendering results, generating a page, the region dirty check module is used for determining a region version of the display region, determining whether the region version of the display region is consistent with the previous version, and the region rendering module is used for rendering the display region based on the region update layer data corresponding to the display region.
Fig. 4 is a flowchart of an implementation of a page generating method according to an embodiment of the present invention, and an implementation manner of the method is given in an exemplary manner. This implementation is based on the page generation system implementation shown in fig. 3, and as shown in fig. 4, the implementation includes:
step 410, the layer management module receives the initial layer data and initializes the version management module.
Specifically, the layer management module may receive initial layer data sent by the server, and perform preprocessing on the initial layer data. The layer management module may also initialize the version management module to set the layer versions of the layers in the version management module to 1.
Step 411, processing the view size of the view area and the display size of the display area based on the area rendering generation module to obtain the number of display areas in the view area, and generating an area rendering module with a corresponding number.
Step 412, executing the zone rendering module based on the rendering module to determine initial layer data corresponding to each display zone in the layer management module, rendering each display zone based on the initial layer data corresponding to each display zone, obtaining an initial rendering result corresponding to each display zone, and determining the initial rendering result of each display zone as an initial page corresponding to the initial layer data.
Step 413, caching the initial rendering result of each display area based on the caching module.
And step 414, based on the operation request triggered by the user on any layer in the current page in the view area, the layer management module updates the current layer data corresponding to the current page to obtain updated layer data.
Step 415, determining the layer version of each layer in the view area based on the version management module, and determining the area version of each display area according to the layer version of each album in each display area.
Step 416, executing a region dirty checking module based on the rendering module to determine whether the region version of each display region is consistent with the previous version.
In the event that it is determined that the region version of the presentation region is inconsistent with the previous version, step 417 is performed; otherwise, step 419 is performed.
Step 417, executing each region rendering module based on the rendering module to determine region update layer data corresponding to each display region in the layer management module, and rendering each display region based on the region update layer data corresponding to each display region, so as to obtain a region rendering result corresponding to each display region.
While step 417 is being performed, the layer versions of the layers within the view area are updated based on the version management module.
And 418, caching the region rendering result of each display region based on the caching module.
Step 419, obtaining a previous rendering result corresponding to each display area based on the buffer module, and determining the previous rendering result corresponding to each display area as an area rendering result corresponding to each display area.
And step 420, determining the area rendering result of each display area as an update page corresponding to the update layer data.
The implementation mode of the page generation method provided by the embodiment of the invention can be based on the page generation system to execute the page generation method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the page generation method.
Fig. 5 is a schematic structural diagram of a page generating apparatus according to an embodiment of the present invention. The device and the page generating method of each embodiment belong to the same invention conception, and the details of the embodiment of the page generating device, which are not described in detail, can be referred to the embodiment of the page generating method.
The specific structure of the page generating apparatus is shown in fig. 5, and includes:
the updating module 510 is configured to respond to an operation request of a user on a current page in a view area, and update current layer data corresponding to the current page to obtain updated layer data;
A determining module 520, configured to determine a layer version of each layer in the view area according to the current layer data and the updated layer data, and determine an area version of each display area in the view area according to the layer version of each layer, where the display area is obtained by dividing the view area based on a display size;
the execution module 530 is configured to determine an area rendering result of each display area according to an area version of each display area, and generate an update page corresponding to the update layer data according to each area rendering result.
Based on the above embodiment, the update module 510 is specifically configured to:
and responding to an operation request triggered by the user to any layer in the current page in the view area, updating the current layer sub-data of the layer to update the current layer data, and obtaining the updated layer data.
Based on the above embodiment, the determining module 520 is specifically configured to:
determining current layer sub-data and updated layer sub-data of each layer in the view area in the current layer data and the updated layer data respectively; determining a layer version of the layer according to the current layer version of the layer under the condition that the current layer sub-data and the updated layer sub-data of the layer are not consistent; determining a current layer version of the layer as a layer version of the layer if the current layer sub-data and the updated layer sub-data of the layer are determined to be identical; for each display area in the view area, determining a layer contained in the display area and a layer version of each layer contained in the display area; and determining the region version of the display region according to the layer version of each layer contained in the display region.
Based on the above embodiment, the execution module 530 is specifically configured to:
for each display area, under the condition that the area version of the display area is updated, determining area update layer data corresponding to the display area in the update layer data according to the display size of the display area and the identification coordinates in the view area, and rendering the display area based on the area update layer data corresponding to the display area to obtain the area rendering result; and under the condition that the area version of the display area is not updated, determining the current rendering result of the display area as the area rendering result.
On the basis of the above embodiment, the device further includes:
the initial rendering module is used for determining initial area layer data corresponding to each display area in the initial layer data of the view area according to the display size; rendering each display area based on the initial area layer data corresponding to each display area to obtain an initial rendering result corresponding to each display area; and determining an initial rendering result of each display area in the view area as an initial page corresponding to the initial layer data.
The page generating device provided by the embodiment of the invention can execute the page generating method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the page generating method.
It should be noted that, in the above embodiment of the page generating apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present invention. Fig. 6 shows a block diagram of an exemplary computer device 6 suitable for use in implementing embodiments of the invention. The computer device 6 shown in fig. 6 is only an example and should not be construed as limiting the functionality and scope of use of embodiments of the invention.
As shown in fig. 6, the computer device 6 is in the form of a general purpose computing electronic device. The components of computer device 6 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 6 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 6 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The computer device 6 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard disk drive"). Although not shown in fig. 6, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The computer device 6 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 6, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 6 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Moreover, the computer device 6 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through a network adapter 20. As shown in fig. 6, the network adapter 20 communicates with other modules of the computer device 6 via the bus 18. It should be appreciated that although not shown in fig. 6, other hardware and/or software modules may be used in connection with computer device 6, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and page display by running programs stored in the system memory 28, for example, implementing the page generation method provided by the present embodiment, the method includes:
responding to an operation request of a user on a current page in a view area, and updating current layer data corresponding to the current page to obtain updated layer data;
determining a layer version of each layer in the view area according to the current layer data and the updated layer data, and determining an area version of each display area in the view area according to the layer version of each layer, wherein the display areas are obtained by dividing the view area based on display sizes;
after determining the region rendering result of each display region according to the region version of each display region, generating an update page corresponding to the update layer data according to each region rendering result.
Of course, those skilled in the art will understand that the processor may also implement the technical solution of the page generating method provided in any embodiment of the present invention.
An embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a page generation method such as provided by the embodiment of the present invention, the method including:
Responding to an operation request of a user on a current page in a view area, and updating current layer data corresponding to the current page to obtain updated layer data;
determining a layer version of each layer in the view area according to the current layer data and the updated layer data, and determining an area version of each display area in the view area according to the layer version of each layer, wherein the display areas are obtained by dividing the view area based on display sizes;
after determining the region rendering result of each display region according to the region version of each display region, generating an update page corresponding to the update layer data according to each region rendering result.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
It will be appreciated by those of ordinary skill in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device, or distributed over a network of computing devices, or they may alternatively be implemented in program code executable by a computer device, such that they are stored in a memory device and executed by the computing device, or they may be separately fabricated as individual integrated circuit modules, or multiple modules or steps within them may be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (10)

1. A page generation method, comprising:
responding to an operation request of a user on a current page in a view area, and updating current layer data corresponding to the current page to obtain updated layer data;
determining a layer version of each layer in the view area according to the current layer data and the updated layer data, and determining an area version of each display area in the view area according to the layer version of each layer, wherein the display areas are obtained by dividing the view area based on display sizes;
after determining the region rendering result of each display region according to the region version of each display region, generating an update page corresponding to the update layer data according to each region rendering result.
2. The page generation method according to claim 1, wherein updating current layer data corresponding to a current page in a view area in response to an operation request of a user on the current page, to obtain updated layer data, includes:
and responding to an operation request triggered by the user to any layer in the current page in the view area, updating the current layer sub-data of the layer to update the current layer data, and obtaining the updated layer data.
3. The page generation method of claim 1, wherein determining a layer version of each layer in the view area from the current layer data and the updated layer data comprises:
determining current layer sub-data and updated layer sub-data of each layer in the view area in the current layer data and the updated layer data respectively;
determining a layer version of the layer according to the current layer version of the layer under the condition that the current layer sub-data and the updated layer sub-data of the layer are not consistent;
and determining the current layer version of the layer as the layer version of the layer under the condition that the current layer sub-data of the layer is consistent with the updated layer sub-data.
4. The page generation method of claim 1, wherein determining the region version of each presentation region in the view region from the layer version of each layer comprises:
for each display area in the view area, determining a layer contained in the display area and a layer version of each layer contained in the display area;
And determining the region version of the display region according to the layer version of each layer contained in the display region.
5. The page generation method according to claim 1, wherein determining the region rendering result of each of the presentation regions according to the region version of each of the presentation regions comprises:
for each display area, under the condition that the area version of the display area is updated, rendering the display area based on the area update layer data corresponding to the display area to obtain the area rendering result;
and under the condition that the area version of the display area is not updated, determining the current rendering result of the display area as the area rendering result.
6. The page generation method of claim 5, further comprising, prior to rendering the presentation area based on the area update layer data corresponding to the presentation area:
and determining the region update layer data corresponding to the display region in the update layer data according to the display size of the display region and the identification coordinates in the view region.
7. The page generation method according to claim 1, wherein before updating current layer data corresponding to a current page in a view area in response to a user operation request for the current page, the method further comprises:
Determining the initial layer data of the region corresponding to each display region in the initial layer data of the view region according to the display size;
rendering each display area based on the area initial layer data corresponding to each display area to obtain an initial rendering result corresponding to each display area;
and generating an initial page corresponding to the initial layer data according to the initial rendering result of each display area.
8. A page generating apparatus, comprising:
the updating module is used for responding to an operation request of a user on a current page in the view area, updating the current layer data corresponding to the current page and obtaining updated layer data;
the determining module is used for determining the layer version of each layer in the view area according to the current layer data and the updated layer data, and determining the area version of each display area in the view area according to the layer version of each layer, wherein the display area is obtained by dividing the view area based on display size;
the execution module is used for generating an update page corresponding to the update layer data according to the region rendering result after determining the region rendering result of each display region according to the region version of each display region.
9. A computer device, the computer device comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the page generation method of any of claims 1-7.
10. A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the page generation method of any of claims 1-7.
CN202311667758.6A 2023-12-06 2023-12-06 Page generation method, device, equipment and storage medium Pending CN117633384A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311667758.6A CN117633384A (en) 2023-12-06 2023-12-06 Page generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311667758.6A CN117633384A (en) 2023-12-06 2023-12-06 Page generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117633384A true CN117633384A (en) 2024-03-01

Family

ID=90037397

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311667758.6A Pending CN117633384A (en) 2023-12-06 2023-12-06 Page generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117633384A (en)

Similar Documents

Publication Publication Date Title
CN111090628B (en) Data processing method and device, storage medium and electronic equipment
CN110008045B (en) Method, device and equipment for aggregating microservices and storage medium
CN109213611B (en) Cross-process communication method, device, terminal and storage medium
CN109597677B (en) Method and apparatus for processing information
CN109902255B (en) Page mixed browsing record generation method, device, equipment and storage medium
CN110083399B (en) Applet running method, computer device and storage medium
US9389997B2 (en) Heap management using dynamic memory allocation
CN111813465B (en) Information acquisition method, device, medium and equipment
CN113204345A (en) Page generation method and device, electronic equipment and storage medium
CN107301220B (en) Method, device and equipment for data driving view and storage medium
CN112199923A (en) Identification generation method, system, device and medium based on distributed system
CN112287010A (en) Map service providing method, device, terminal and storage medium based on android system
US11151778B2 (en) Optimized browser object rendering
CN107885807B (en) File saving method and device, intelligent tablet and storage medium
CN114356475A (en) Display processing method, device, equipment and storage medium
CN113312036B (en) Large screen display method, device and equipment of Web page and storage medium
CN112367295B (en) Plug-in display method and device, storage medium and electronic equipment
CN117633384A (en) Page generation method, device, equipment and storage medium
CN115795211A (en) Page display method, device, system, equipment and storage medium
CN111596997B (en) UI information request method, device, terminal and storage medium
CN111008934B (en) Scene construction method, device, equipment and storage medium
CN113656041A (en) Data processing method, device, equipment and storage medium
US20210117129A1 (en) Method and Apparatus for Writing Data
CN114461214A (en) Page display method and device, electronic equipment and storage medium
CN112764802A (en) Business logic customization method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination