CN117193917A - Page loading method and device, electronic equipment and storage medium - Google Patents

Page loading method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117193917A
CN117193917A CN202311166821.8A CN202311166821A CN117193917A CN 117193917 A CN117193917 A CN 117193917A CN 202311166821 A CN202311166821 A CN 202311166821A CN 117193917 A CN117193917 A CN 117193917A
Authority
CN
China
Prior art keywords
page
data
module
modules
module data
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
CN202311166821.8A
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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202311166821.8A priority Critical patent/CN117193917A/en
Publication of CN117193917A publication Critical patent/CN117193917A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application relates to a page loading method, a page loading device, electronic equipment and a storage medium, wherein the page loading method comprises the following steps: receiving a page loading request from a client, and acquiring page data of a target page to be loaded by the client; determining a plurality of page modules contained in the target page according to the page data; and the page module data of each page module are obtained in parallel, and each time one page module data is obtained, the obtained page module data are sent to the client, so that the client renders the received page module data each time one page module data is received. Therefore, the transmission and rendering efficiency of page content data can be improved on the whole, the page loading process is smoother, the waiting time of a user is reduced, and the experience of the user when browsing the page is improved.

Description

Page loading method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of page loading, and in particular, to a page loading method, device, electronic device, and storage medium.
Background
In the current internet application, when a user triggers page loading, a client requests content data of an entire page from a server, where a page is composed of basic attributes (such as a title and a background color) of the page, the number of included page modules, and page positions to which each page module belongs (these are called metadata of the page), and metadata of each page module itself.
In the prior art, after obtaining complete content data of a page, a server side sends the complete content data to a client side for rendering and displaying. That is, the server returns the content data of the page to the client in a parallel blocking transmission manner.
The server side waits for the complete content data to finish and then returns the data to the client side, so that the network is idle in the waiting period, and the complete content data of one page needs to be transmitted once, which results in long time consumption for transmission, especially in the environment of large data volume of the page or weak network, the transmission of the content data of the page is slow, and the experience feeling when the user browses the page is affected.
Disclosure of Invention
The application provides a page loading method, a page loading device, electronic equipment and a storage medium, which are used for solving the technical problems that in the prior art, a server transmits content data of a whole page to a client at one time to cause a network idle period, the transmission volume is large, the transmission time consumption is long, and the experience sense when a user browses the page is affected.
In a first aspect, the present application provides a page loading method, where the method includes:
receiving a page loading request from a client, and acquiring page data of a target page to be loaded by the client, wherein the page data comprises metadata of a page and metadata of a plurality of page modules, and the metadata of the page modules are mutually independent;
determining a plurality of page modules contained in the target page according to the page data, wherein different page modules are mutually independent;
and the page module data of each page module are acquired in parallel, and each time one page module data is acquired, the acquired page module data are sent to the client, so that the client renders the received page module data each time one page module data is received.
Optionally, the determining, according to the page data, a plurality of page modules included in the target page includes:
extracting metadata of a plurality of page modules from the page data;
and determining a plurality of page modules contained in the target page according to the metadata of the plurality of page modules.
Optionally, the method further comprises:
extracting metadata of the target page from the page data;
and forming the metadata of the target page into a page module.
Optionally, the obtaining, in parallel, page module data of each page module includes:
the following processing is performed in parallel for each of the page modules:
and sending a page module data acquisition request to a page module service system according to the metadata of the page module, so that the page module service system returns corresponding page module data in response to the page module data acquisition request, wherein the page module service system is a provider of the page module data.
In a second aspect, the present application provides another page loading method, the method comprising:
sending a page loading request to a server side, so that the server side obtains page data of a target page to be loaded by a client side according to the page loading request, wherein the page data comprises metadata of a page and metadata of a plurality of page modules, and the metadata of the page modules are mutually independent; determining a plurality of page modules contained in the target page according to the page data; the method comprises the steps of obtaining page module data of each page module in parallel, and sending the obtained page module data to a client whenever one page module data is obtained, wherein different page modules are mutually independent;
rendering the received page module data each time one of the page module data is received.
Optionally, each time one piece of the page module data is received, rendering the received page module data includes:
each time one of the page module data is received, the following steps are performed:
rendering the received page module data into a virtual DOM node;
determining the position information of the page module corresponding to the received page module data in the target page;
determining the position of the virtual DOM node in the virtual DOM tree according to the position information;
and adding the virtual DOM node into the virtual DOM tree according to the position of the virtual DOM node in the virtual DOM tree.
In a third aspect, the present application provides a page loading apparatus, the apparatus comprising:
the request receiving module is used for receiving a page loading request from a client;
the first data acquisition module is used for acquiring page data of a target page to be loaded by the client, wherein the page data comprises metadata of pages and metadata of a plurality of page modules, and the metadata of the pages and the metadata of the page modules are mutually independent;
the determining module is used for determining a plurality of page modules contained in the target page according to the page data, and the different page modules are mutually independent;
the second data acquisition module is used for acquiring page module data of each page module in parallel;
and the data sending module is used for sending the acquired page module data to the client side every time one page module data is acquired, so that the client side renders the received page module data every time one page module data is received.
In a fourth aspect, the present application provides another page loading apparatus, the apparatus comprising:
the system comprises a request sending module, a request loading module and a client, wherein the request sending module is used for sending a page loading request to a server so that the server can acquire page data of a target page to be loaded by the client according to the page loading request, the page data comprises metadata of a page and metadata of a plurality of page modules, and the metadata of the page modules are mutually independent; determining a plurality of page modules contained in the target page according to the page data; the method comprises the steps of obtaining page module data of each page module in parallel, and sending the obtained page module data to a client whenever one page module data is obtained, wherein different page modules are mutually independent;
and the rendering module is used for rendering the received page module data every time one page module data is received.
In a fifth aspect, the present application provides an electronic device, comprising: a processor and a memory, the processor being configured to execute a page loader stored in the memory to implement the page loading method according to any one of the first or second aspects.
In a sixth aspect, the present application provides a storage medium storing one or more programs executable by one or more processors to implement the page loading method of any one of the first or second aspects.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the method provided by the embodiment of the application, the page module data of each page module are obtained in parallel through the server side, and each time one page module data is obtained, the obtained page module data is sent to the client side, so that the plurality of page module data can be transmitted for multiple times, the parallel obtaining and transmission of the page module data are realized, the large amount of data is prevented from being transmitted once, the transmission process of each page module data is independent, once the data are obtained and transmitted, the idle time period of a network is fully utilized, the transmission of the plurality of page module data is shared to a plurality of time periods, the transmission time consumption is reduced on the whole, and the transmission efficiency is greatly enhanced; meanwhile, when the client receives one page module data, the received page module data is rendered, and parallelized transmission and rendering are carried out by taking the page module as a unit, so that the transmission and rendering efficiency of page content data is improved on the whole, the page loading process is smoother, the waiting time of a user is reduced, and the experience of the user when browsing the page is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures of the drawings are not to be taken in a limiting sense, unless otherwise indicated.
FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present application;
FIG. 2 is a flowchart of an embodiment of a page loading method according to an embodiment of the present application;
FIG. 3 is a flowchart of another embodiment of a page loading method according to an embodiment of the present application;
FIG. 4 is a flowchart of an embodiment of a method for loading a page according to another embodiment of the present application;
FIG. 5 is a block diagram of an embodiment of a page loader according to an embodiment of the present application;
FIG. 6 is a block diagram of another embodiment of a page loader according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The following disclosure provides many different embodiments, or examples, for implementing different structures of the application. In order to simplify the present disclosure, components and arrangements of specific examples are described below. They are, of course, merely examples and are not intended to limit the application. Furthermore, the present application may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed.
In order to solve the technical problems that in the prior art, after the server side obtains the complete content data of the page, the content data of the whole page is once again transmitted to the client side, so that a network idle period exists, the transmission volume is large, the transmission time is long, and the experience feeling when a user browses the page is affected.
Fig. 1 is a schematic diagram of a system architecture according to an embodiment of the present application.
The system architecture shown in fig. 1 includes a client 101, a server 102, and a module service system 103. The client 101 is connected to the server 102 through a network, and the server 103 interacts with the module service system 103 through the network. In practice, client 101 may be installed on any electronic device that supports network connectivity, including but not limited to smartphones, tablets, laptop portable computers, desktop computers, and the like.
In the embodiment of the present application, the client 101 may request to obtain the page data from the server 102 for loading and displaying, and the server 102 may provide the page data to the client 101 through interaction with the module service system 103.
Fig. 2 is a flowchart of an embodiment of a page loading method according to an embodiment of the present application.
As shown in fig. 2, the process includes the steps of:
step 201, the server receives a page loading request from the client, and obtains page data of a target page to be loaded by the client.
In one embodiment, a client sends a page load request to a server in response to a page load instruction. For example, the client is a browser, and after a user inputs a website in a website column in the browser and clicks a corresponding button, the browser detects a page loading instruction, and the page loading instruction instructs loading of a page corresponding to the website input in the website column, so that the browser sends a page loading request to the server. Correspondingly, the page loading request carries a website input by a user in a website column of the browser, and a page corresponding to the website is a target page to be loaded by the client.
After receiving a page loading request from a client, the server analyzes a website of a target page from the page loading request, acquires a page file of the target page based on the website, and further acquires page data of the target page from the page file.
In the embodiment of the application, the metadata of the page and the metadata of the page module are included in the page data, and the metadata of the page module are mutually independent, which is different from the prior art that the metadata of the page module is included in the metadata of the page and cannot be separated. Wherein, the metadata of the pages includes but is not limited to page background color, page title, title background color, title margin, etc., and the metadata of the page modules includes but is not limited to sequence among the page modules, margin among the page modules, etc.
Step 202, the server determines a plurality of page modules included in the target page according to the page data.
As can be seen from the above description, the page data includes metadata of the independently existing page modules, so in step 202, the server may extract metadata of a plurality of page modules from the page data, and further determine a plurality of page modules included in the target page according to the metadata of the plurality of page modules. Here, the page modules are decoupled from each other, and there is no dependency, that is, each page module may be rendered independently.
In addition, in addition to the page module data, the information of the page itself is also necessary for rendering the page, so in the embodiment of the present application, the information of the page itself (i.e., the metadata of the page) is regarded as a separate page module. Specifically, the server side extracts metadata of the target page from the page data, and forms the metadata of the target page into independent page module data.
For example, assuming that the target page has 5 page modules, in the embodiment of the present application, the number of the page modules finally determined by the server is 6, where 1 page module is formed by metadata of the target page.
By such processing, transmission and rendering of page content data in units of page modules can be realized as a whole.
And 203, the server side acquires the page module data of each page module in parallel, and sends the acquired page module data to the client side every time one page module data is acquired, so that the client side renders the received page module data every time one page module data is received.
In an embodiment, the server side obtains the page module data of each page module in parallel by the following manner: the server side performs the following processing in parallel for each page module: and the server side sends a page module data acquisition request to the page module service system according to the metadata of the page module, wherein the page module data acquisition request carries the metadata of the page module. And the page module service system responds to the page module data acquisition request, acquires content data corresponding to the page module and other related contents, completes filling of the page module contents by utilizing the acquired contents, and then returns complete page module data to the server.
It will be appreciated that for different page modules, the page module service system may obtain page module data from different addresses. For example, if the specific content of the page module is an advertisement presentation, then the page module service system needs to request the advertisement platform to obtain page module data from the advertisement platform. Where the advertising content may be dynamic, the advertising platform in turn needs to communicate with the advertising provider to obtain the latest page module data. For another example, the specific content of the page module is a popular play list, and the popular play list is relatively static, so that the page module service system can store the page module data of the popular play list in the cache after the page module data is obtained for the first time, and the page module data can be directly obtained from the cache in each subsequent request. It follows that the page module service system is a provider of page module data.
The processing can realize that the server side asynchronously and non-blocking and parallelly acquires the page module data of each page module.
Further, as can be seen from the description of step 203, in the embodiment of the present application, each time a server obtains one page module data, the server sends the obtained page module data to the client without waiting for the arrival of other page module data. Therefore, the parallel acquisition and transmission of the page module data are realized, the transmission of the page module data can be shared to a plurality of time periods, the single transmission of a large amount of data is avoided, and the time consumption of transmission is reduced as a whole.
Furthermore, the client renders the received page module data every time when receiving one page module data, and does not need to wait for rendering after all page module data are complete. Therefore, parallel transmission and rendering of page module data are realized, and the transmission and rendering efficiency of page content data is improved as a whole.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the method provided by the embodiment of the application, the page module data of each page module are obtained in parallel through the server side, and each time one page module data is obtained, the obtained page module data is sent to the client side, so that the plurality of page module data can be transmitted for multiple times, the parallel obtaining and transmission of the page module data are realized, the large amount of data is prevented from being transmitted once, the transmission process of each page module data is independent, once the data are obtained and transmitted, the idle time period of a network is fully utilized, the transmission of the plurality of page module data is shared to a plurality of time periods, the transmission time consumption is reduced on the whole, and the transmission efficiency is greatly enhanced; meanwhile, when the client receives one page module data, the received page module data is rendered, and parallelized transmission and rendering are carried out by taking the page module as a unit, so that the transmission and rendering efficiency of page content data is improved on the whole, the page loading process is smoother, the waiting time of a user is reduced, and the experience of the user when browsing the page is improved.
FIG. 3 is a flowchart of another embodiment of a page loading method according to an embodiment of the present application. As shown in fig. 3, the process includes the steps of:
step 301, the client sends a page loading request to the server, so that the server obtains page data of a target page to be loaded by the client according to the page loading request, determines a plurality of page modules included in the target page according to the page data, obtains page module data of each page module in parallel, and sends the obtained page module data to the client whenever obtaining one page module data.
The description of step 301 is referred to the related description in the flow shown in fig. 2, and will not be repeated here.
Step 302, the client renders the received page module data whenever receiving a page module data.
In the embodiment of the application, when the client receives one page module data, the client renders the received page module data, and does not need to wait for all page module data to be complete and then render. Therefore, parallel transmission and rendering of page module data are realized, and the transmission and rendering efficiency of page content data is improved as a whole.
It should be noted that, the above-mentioned mode of receiving or transmitting cannot guarantee that page module data is transmitted in order, that is, in the embodiment of the present application, the server performs out-of-order transmission on page module data, and then, correspondingly, the client receives out-of-order data. In order to ensure that the client can still render page module data in sequence, the following implementation method is provided: each time a page module data is received, the following steps are performed: rendering the received page module data into a virtual DOM node, determining the position information of the page module corresponding to the received page module data in the target page, determining the position of the virtual DOM node in the virtual DOM tree according to the position information, and adding the virtual DOM node into the virtual DOM tree according to the position of the virtual DOM node in the virtual DOM tree. And after all the page module data are rendered, obtaining a complete virtual DOM tree, wherein the virtual DOM tree is a prerendering result of the target page.
The page module data may include a sequence number of a page position where the page module is located. Thus, the position information of the page module in the page can be determined according to the serial number.
For example, assume that the target page includes 5 page modules, and the sequence numbers of the page positions where the 5 page modules are located are 1,2,3,4, and 5, respectively. The order of the page modules received by the client is 3,4,5,2,1, when the client receives the first page module No. 3, two virtual DOM nodes can be reserved in the virtual DOM tree, the page module data of the page module No. 3 is rendered in the third virtual DOM node, when the page module No. 4 is received, the page module data of the page module No. 4 is rendered in the virtual DOM node directly after the page module No. 3, and vice versa for the page module No. 5. When the page module No. 2 is received, page module data of the page module No. 2 is rendered in a second virtual DOM node reserved before, and the page module No. 1 is also rendered.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the method provided by the embodiment of the application, the page module data of each page module are obtained in parallel through the server side, and each time one page module data is obtained, the obtained page module data is sent to the client side, so that the plurality of page module data can be transmitted for multiple times, the parallel obtaining and transmission of the page module data are realized, the large amount of data is prevented from being transmitted once, the transmission process of each page module data is independent, once the data are obtained and transmitted, the idle time period of a network is fully utilized, the transmission of the plurality of page module data is shared to a plurality of time periods, the transmission time consumption is reduced on the whole, and the transmission efficiency is greatly enhanced; meanwhile, when the client receives one page module data, the received page module data is rendered, and parallelized transmission and rendering are carried out by taking the page module as a unit, so that the transmission and rendering efficiency of page content data is improved on the whole, the page loading process is smoother, the waiting time of a user is reduced, and the experience of the user when browsing the page is improved.
Fig. 4 is a flowchart of an embodiment of another page loading method according to an embodiment of the present application. As shown in fig. 4, the flow includes the steps of:
step 401, the client sends a page loading request to the server, and establishes network connection with the server.
Step 402, the server receives the page loading request, and obtains page data according to the URL address carried in the page loading request through the page service system.
Step 403, after the server side obtains the page data, determining a plurality of page modules, and requesting the module service system to obtain the page module data of the page modules in parallel.
And 404, the module service system acquires the content data and other related contents of each page module, completes the content data filling of each page module, and returns the complete page module data to the server in an asynchronous non-blocking parallel mode.
Step 405, each time the server side obtains one page module data, the obtained page module data is sent to the client side.
Step 406, when the client receives one page module data, the received page module data is processed out of order, and the rendering module is used for rendering the page.
Step 407, after the server transmits all page module data to the client, disconnecting the network connection between the server and the client.
As can be seen from the above description, the embodiment of the present application changes the conventional HTTP (HyperText Transfer Protocol ) Request mode of one Request and one Response, and adopts the streaming mode of one Request and multiple responses, that is, one page load Request, to stream back multiple page module data. Therefore, in the process of returning the whole page content data, the HTTP connection between the client and the server needs to be maintained, and the HTTP connection is kept active, so that the transmission can be realized through the current HTTP connection each time when the single page module data is transmitted, until the last page module data is transmitted, and the HTTP connection is closed again.
Furthermore, when the network is abnormally disconnected or overtime occurs, the client saves the received partial data, and requests retransmission again after the network is recovered, so that a similar way of breakpoint retransmission is realized, and the retransmission time when the network is abnormally shortened.
Fig. 5 is a block diagram of an embodiment of a page loading device according to an embodiment of the present application. As shown in fig. 5, the apparatus includes:
a request receiving module 51, configured to receive a page loading request from a client;
a first data obtaining module 52, configured to obtain page data of a target page to be loaded by the client, where the page data includes metadata of a page and metadata of a plurality of page modules, and the metadata of the page modules are independent from each other;
a determining module 53, configured to determine, according to the page data, a plurality of page modules included in the target page, where different page modules are independent from each other;
a second data acquisition module 54, configured to acquire page module data of each of the page modules in parallel;
and the data sending module 55 is configured to send the acquired page module data to the client each time one of the page module data is acquired, so that the client renders the received page module data each time the client receives one of the page module data.
Optionally, the determining module 53 includes (not shown in the figure):
the first extraction sub-module is used for extracting metadata of a plurality of page modules from the page data;
and the first determining submodule is used for determining a plurality of page modules contained in the target page according to the metadata of the page modules.
Optionally, the apparatus further comprises (not shown):
the second extraction sub-module is used for extracting the metadata of the target page from the page data;
and the second determining submodule is used for forming a page module from the metadata of the target page.
Optionally, the second data acquisition module 54 is specifically configured to:
the following processing is performed in parallel for each of the page modules:
and sending a page module data acquisition request to a page module service system according to the metadata of the page module, so that the page module service system returns corresponding page module data in response to the page module data acquisition request, wherein the page module service system is a provider of the page module data.
FIG. 6 is a block diagram of another embodiment of a page loader according to an embodiment of the present application.
As shown in fig. 6, the apparatus includes:
a request sending module 61, configured to send a page loading request to a server, so that the server obtains, according to the page loading request, page data of a target page to be loaded by a client, where the page data includes metadata of a page and metadata of a plurality of page modules, and the metadata of the page modules are independent from each other; determining a plurality of page modules contained in the target page according to the page data; the method comprises the steps of obtaining page module data of each page module in parallel, and sending the obtained page module data to the client after obtaining one page module data, wherein different page modules are mutually independent;
and the rendering module 62 is used for rendering the received page module data every time one page module data is received.
Optionally, the rendering module 62 is specifically configured to:
each time one of the page module data is received, the following steps are performed:
rendering the received page module data into a virtual DOM node;
determining the position information of the page module corresponding to the received page module data in the target page;
determining the position of the virtual DOM node in the virtual DOM tree according to the position information;
and adding the virtual DOM node into the virtual DOM tree according to the position of the virtual DOM node in the virtual DOM tree.
As shown in fig. 7, an embodiment of the present application provides an electronic device including a processor 711, a communication interface 712, a memory 713, and a communication bus 714, wherein the processor 711, the communication interface 712, the memory 713 perform communication with each other through the communication bus 714,
a memory 713 for storing a computer program;
in one embodiment of the present application, the processor 711 is configured to implement the page loading method provided in any one of the foregoing method embodiments when executing the program stored in the memory 713, where the method includes:
receiving a page loading request from a client, and acquiring page data of a target page to be loaded by the client, wherein the page data comprises metadata of a page and metadata of a plurality of page modules, and the metadata of the page modules are mutually independent;
determining a plurality of page modules contained in the target page according to the page data, wherein different page modules are mutually independent;
and the page module data of each page module are acquired in parallel, and each time one page module data is acquired, the acquired page module data are sent to the client, so that the client renders the received page module data each time one page module data is received.
Or,
sending a page loading request to a server side, so that the server side obtains page data of a target page to be loaded by a client side according to the page loading request, wherein the page data comprises metadata of a page and metadata of a plurality of page modules, and the metadata of the page modules are mutually independent; determining a plurality of page modules contained in the target page according to the page data; the method comprises the steps of obtaining page module data of each page module in parallel, and sending the obtained page module data to a client whenever one page module data is obtained, wherein different page modules are mutually independent;
rendering the received page module data each time one of the page module data is received.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the page loading method provided by any of the method embodiments described above.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, or may be implemented by hardware. Based on such understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the related art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the method described in the respective embodiments or some parts of the embodiments.
It is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only, and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises," "comprising," "includes," "including," and "having" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and/or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order described or illustrated, unless an order of performance is explicitly stated. It should also be appreciated that additional or alternative steps may be used.
The foregoing is only a specific embodiment of the application to enable those skilled in the art to understand or practice the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of page loading, the method comprising:
receiving a page loading request from a client, and acquiring page data of a target page to be loaded by the client, wherein the page data comprises metadata of a page and metadata of a plurality of page modules, and the metadata of the page modules are mutually independent;
determining a plurality of page modules contained in the target page according to the page data, wherein different page modules are mutually independent;
and the page module data of each page module are obtained in parallel, and each time one page module data is obtained, the obtained page module data are sent to the client, so that the client renders the received page module data each time one page module data is received.
2. The method of claim 1, wherein the determining, from the page data, a plurality of page modules included in the target page comprises:
extracting metadata of a plurality of page modules from the page data;
and determining a plurality of page modules contained in the target page according to the metadata of the plurality of page modules.
3. The method according to claim 2, wherein the method further comprises:
extracting metadata of the target page from the page data;
and forming the metadata of the target page into a page module.
4. The method of claim 2, wherein the concurrently acquiring page module data for each of the page modules comprises:
the following processing is performed in parallel for each of the page modules:
and sending a page module data acquisition request to a page module service system according to the metadata of the page module, so that the page module service system returns corresponding page module data in response to the page module data acquisition request, wherein the page module service system is a provider of the page module data.
5. A method of page loading, the method comprising:
sending a page loading request to a server side, so that the server side obtains page data of a target page to be loaded by a client side according to the page loading request, wherein the page data comprises metadata of a page and metadata of a plurality of page modules, and the metadata of the page modules are mutually independent; determining a plurality of page modules contained in the target page according to the page data; the method comprises the steps of obtaining page module data of each page module in parallel, and sending the obtained page module data to a client whenever one page module data is obtained, wherein different page modules are mutually independent;
rendering the received page module data each time one of the page module data is received.
6. The method of claim 5, wherein rendering the received page module data each time one of the page module data is received, comprises:
each time one of the page module data is received, the following steps are performed:
rendering the received page module data into a virtual DOM node;
determining the position information of the page module corresponding to the received page module data in the target page;
determining the position of the virtual DOM node in the virtual DOM tree according to the position information;
and adding the virtual DOM node into the virtual DOM tree according to the position of the virtual DOM node in the virtual DOM tree.
7. A page loading apparatus, the apparatus comprising:
the request receiving module is used for receiving a page loading request from a client;
the first data acquisition module is used for acquiring page data of a target page to be loaded by the client, wherein the page data comprises metadata of pages and metadata of a plurality of page modules, and the metadata of the pages and the metadata of the page modules are mutually independent;
the determining module is used for determining a plurality of page modules contained in the target page according to the page data, and the different page modules are mutually independent;
the second data acquisition module is used for acquiring page module data of each page module in parallel;
and the data sending module is used for sending the acquired page module data to the client side every time one page module data is acquired, so that the client side renders the received page module data every time one page module data is received.
8. A page loading apparatus, the apparatus comprising:
the system comprises a request sending module, a request loading module and a client, wherein the request sending module is used for sending a page loading request to a server so that the server can acquire page data of a target page to be loaded by the client according to the page loading request, the page data comprises metadata of a page and metadata of a plurality of page modules, and the metadata of the page modules are mutually independent; determining a plurality of page modules contained in the target page according to the page data; the method comprises the steps of obtaining page module data of each page module in parallel, and sending the obtained page module data to a client whenever one page module data is obtained, wherein different page modules are mutually independent;
and the rendering module is used for rendering the received page module data every time one page module data is received.
9. An electronic device, comprising: a processor and a memory, the processor being configured to execute a page loader stored in the memory to implement the page loading method of any of claims 1-4 or 5-6.
10. A storage medium storing one or more programs executable by one or more processors to implement the page loading method of any of claims 1-4 or 5-6.
CN202311166821.8A 2023-09-11 2023-09-11 Page loading method and device, electronic equipment and storage medium Pending CN117193917A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311166821.8A CN117193917A (en) 2023-09-11 2023-09-11 Page loading method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311166821.8A CN117193917A (en) 2023-09-11 2023-09-11 Page loading method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117193917A true CN117193917A (en) 2023-12-08

Family

ID=88999423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311166821.8A Pending CN117193917A (en) 2023-09-11 2023-09-11 Page loading method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117193917A (en)

Similar Documents

Publication Publication Date Title
US9361281B2 (en) Phased generation and delivery of structured documents
US8868637B2 (en) Page rendering for dynamic web pages
US9152615B2 (en) Method and system for inserting data in a web page that is transmitted to a handheld device
US10015226B2 (en) Methods for making AJAX web applications bookmarkable and crawlable and devices thereof
US20170272499A1 (en) Method and device for loading webpage
CN104063460A (en) Method and device for loading webpage in browser
US20140258458A1 (en) Browser kernel adaptation method and browser therefor
CN107105336B (en) Data processing method and data processing device
CN112115396B (en) Webpage rendering method, device, equipment and storage medium
WO2015106692A1 (en) Webpage pushing method, client, server, and system
JP2016526230A (en) Computer program product, system and method for optimizing web page loading
CN108629032A (en) A kind of page fast response method and device based on delay load
CN105095220B (en) A kind of browser implementation method, terminal and virtualization agent device
CN106790276A (en) A kind of browser-cross data interactive method and device based on browser protocol
CN113238754A (en) Server rendering method and device, server and storage medium
US9292321B2 (en) System, method and computer-readable recording medium for synchronous script lazy loading
US11477158B2 (en) Method and apparatus for advertisement anti-blocking
CN105760407B (en) A kind of advertisement loading method, device and equipment
CN106354792A (en) Webpage display method and device
CN113934559A (en) Application program query method, device, equipment and storage medium
US20180192121A1 (en) System and methods thereof for displaying video content
US20120151313A1 (en) User-specific customization of web pages
CN117193917A (en) Page loading method and device, electronic equipment and storage medium
US10296580B1 (en) Delivering parsed content items
US20140089778A1 (en) Progressive Image Rendering Utilizing Data URI Enhancements

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