CN112115396B - Webpage rendering method, device, equipment and storage medium - Google Patents

Webpage rendering method, device, equipment and storage medium Download PDF

Info

Publication number
CN112115396B
CN112115396B CN202010997744.0A CN202010997744A CN112115396B CN 112115396 B CN112115396 B CN 112115396B CN 202010997744 A CN202010997744 A CN 202010997744A CN 112115396 B CN112115396 B CN 112115396B
Authority
CN
China
Prior art keywords
webpage
preloading
web page
page
display request
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.)
Active
Application number
CN202010997744.0A
Other languages
Chinese (zh)
Other versions
CN112115396A (en
Inventor
杨凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010997744.0A priority Critical patent/CN112115396B/en
Publication of CN112115396A publication Critical patent/CN112115396A/en
Application granted granted Critical
Publication of CN112115396B publication Critical patent/CN112115396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a webpage rendering method, device, equipment and storage medium. The method is applied to the client and comprises the following steps: acquiring a webpage display request in the display process of a client interface; when a webpage display request is acquired, data processing operation which is executed in series in webpage rendering is started in parallel; rendering the web page according to the content of the data processing operation and displaying the web page. According to the method and the device for processing the webpage, through parallel starting of the data processing operation originally executed in series in webpage rendering, optimization of an H5 technology webpage opening scheme can be achieved, H5 webpage opening time is reduced, the defects of an intelligent terminal are overcome, and user experience is improved.

Description

Webpage rendering method, device, equipment and storage medium
Technical Field
The embodiment of the disclosure relates to communication technology, in particular to a webpage rendering method, device, equipment and storage medium.
Background
With the development of computer technology and communication technology, more and more services are implemented through web pages of intelligent terminals. For example, web pages of an Application (APP) change in real time, quickly responding to product demand.
In the related art, the quick display of the webpage is realized through the hypertext 5.0 (HTML 5, H5) technology. However, because the communication network environment where the intelligent terminal is located is complex, the machine performance of the intelligent terminal is diversified, and some intelligent terminals have poor machine performance, for example, the webview kernel version of the mobile phone is lower, so that the loading of the webpage of the intelligent terminal is slow, and the user experience is seriously affected.
Therefore, optimization of a scheme of opening the page by the H5 technology is needed, so that the opening time of the H5 page is reduced, the shortages of a communication network or an intelligent terminal are overcome, and the user experience is improved.
Disclosure of Invention
The embodiment of the disclosure provides a webpage rendering method, device, equipment and storage medium, which are used for at least solving the problems of long opening time and poor user experience when a webpage is opened by an H5 technology in the related technology. The technical scheme of the embodiment of the disclosure is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided a method for web page rendering, applied to a client, including:
acquiring a webpage display request in the display process of a client interface;
when the webpage display request is acquired, data processing operation which is executed in series in webpage rendering is started in parallel;
And rendering the webpage according to the content of the data processing operation and displaying the webpage.
Optionally, the step of parallel starting the data processing operation performed in the webpage rendering includes:
initiating in parallel data processing operations of at least two of: the method comprises the steps of starting a webpage view, preloading a content document of the webpage, preloading an external script file of the webpage, preloading an application programming interface of the webpage and preloading a webpage picture.
Optionally, after the step of obtaining the web page display request, the method further includes:
when the webpage data corresponding to the webpage display request exists in the local cache, when the webpage display request is acquired, the data processing operation of at least two of the following contents is started in parallel: the method comprises the steps of starting a webpage view, preloading a content document of a webpage from a local cache, preloading an external script file of the webpage from the local cache, preloading an application programming interface of the webpage from the local cache and preloading a webpage picture from the local cache.
Optionally, after the step of obtaining the web page display request, the method further includes:
when the webpage data corresponding to the webpage display request does not exist in the local cache, starting the data processing operation of at least two of the following contents in parallel when the webpage display request is acquired: the method comprises the steps of starting a webpage view, preloading a content document of a webpage from a server through a network, preloading an external script file of the webpage from the server through the network, preloading an application programming interface of the webpage from the server through the network and preloading a webpage picture from the server through the network.
Optionally, the web page display request includes: the web page presents the requested uniform resource locator URL.
Optionally, the URL includes: the client comprises a fixed identifier of the webpage resource and a wild card, wherein the wild card is used for identifying the client.
Optionally, the data processing operations of at least two of the following are initiated in parallel: the steps of starting the webpage view, preloading the content document of the webpage, preloading the external script file of the webpage, preloading the application programming interface of the webpage and preloading the webpage picture comprise:
acquiring client identification information;
updating the wild card as the client identification information to generate a target URL of a webpage display request;
initiating in parallel data processing operations of at least two of: starting a webpage view, preloading a content document of a webpage corresponding to the target URL, preloading an external script file of the webpage corresponding to the target URL, preloading an application programming interface of the webpage corresponding to the target URL and preloading a webpage picture corresponding to the target URL.
Optionally, the step of starting the web page view includes:
and when the webpage display request is acquired, starting an initialized webpage view from a webpage view cache pool.
Optionally, after the step of obtaining the web page display request, the method further includes:
acquiring configuration information corresponding to the webpage display request, wherein the configuration information comprises a main page pre-cached, a sub-page corresponding to the main page, a caching opportunity corresponding to the main page or the sub-page, and a caching address corresponding to the main page or the sub-page;
and according to the configuration information, at least one main page corresponding to the webpage display request and a sub page corresponding to the main page are cached at corresponding caching time and corresponding caching addresses in advance.
Optionally, the caching includes:
initiating in parallel data processing operations of at least two of: the method comprises the steps of starting a webpage view, preloading a content document of the webpage, preloading an external script file of the webpage, preloading an application programming interface of the webpage and preloading a webpage picture.
Optionally, the steps of preloading the external script file of the webpage, preloading the application programming interface of the webpage and preloading the picture of the webpage include:
acquiring a preset preloading protocol; the preloading protocol comprises an external script file, an application programming interface and a picture corresponding to the webpage display request;
According to the preloading protocol, preloading an external script file of a webpage, an application programming interface of the webpage and preloading a webpage picture.
Optionally, in the displaying process of the client interface, the step of obtaining the webpage displaying request includes:
acquiring a webpage display request of a to-be-displayed page in a current client interface in the display process of the client interface; or,
and acquiring a webpage display request of a page to be displayed, which is jumped in based on the current client interface, in the display process of the client interface.
According to a second aspect of embodiments of the present disclosure, there is provided a web page rendering apparatus, applied to a client, including:
the first acquisition unit is configured to acquire a webpage display request in the display process of the client interface;
the starting unit is configured to execute data processing operations which are executed in series in webpage rendering and started in parallel when the webpage display request is acquired;
and the display unit is configured to execute content rendering web pages according to the data processing operation and display the web pages.
Optionally, the starting unit includes:
a first promoter unit for initiating data processing operations of at least two of the following in parallel: the method comprises the steps of starting a webpage view, preloading a content document of the webpage, preloading an external script file of the webpage, preloading an application programming interface of the webpage and preloading a webpage picture.
Optionally, the webpage rendering device further includes:
the second promoter unit is configured to execute, after the step of acquiring the webpage display request, when the webpage data corresponding to the webpage display request exists in the local cache, and when the webpage display request is acquired, start the data processing operations of at least two of the following contents in parallel: the method comprises the steps of starting a webpage view, preloading a content document of a webpage from a local cache, preloading an external script file of the webpage from the local cache, preloading an application programming interface of the webpage from the local cache and preloading a webpage picture from the local cache.
Optionally, the webpage rendering device further includes:
a third promoter unit configured to execute, after the step of acquiring the web page display request, when no web page data corresponding to the web page display request exists in the local cache, and when the web page display request is acquired, start data processing operations of at least two of the following contents in parallel: the method comprises the steps of starting a webpage view, preloading a content document of a webpage from a server through a network, preloading an external script file of the webpage from the server through the network, preloading an application programming interface of the webpage from the server through the network and preloading a webpage picture from the server through the network.
Optionally, the web page display request includes: the web page presents the requested uniform resource locator URL.
Optionally, the URL includes: the client comprises a fixed identifier of the webpage resource and a wild card, wherein the wild card is used for identifying the client.
Optionally, the first starting unit is specifically configured to perform:
an acquisition subunit configured to perform acquisition of client identification information when the web page display request is acquired;
acquiring client identification information;
updating the wild card as the client identification information to generate a target URL of a webpage display request;
initiating in parallel data processing operations of at least two of: starting a webpage view, preloading a content document of a webpage corresponding to the target URL, preloading an external script file of the webpage corresponding to the target URL, preloading an application programming interface of the webpage corresponding to the target URL and preloading a webpage picture corresponding to the target URL.
Optionally, the first starting unit is specifically configured to perform:
and when the webpage display request is acquired, starting an initialized webpage view from a webpage view cache pool.
Optionally, the webpage rendering device further includes:
A second obtaining unit configured to perform obtaining configuration information corresponding to the web page display request after the web page display request obtaining step, where the configuration information includes a pre-cached main page, a sub-page corresponding to the main page, a caching opportunity corresponding to the main page or the sub-page, and a caching address corresponding to the main page or the sub-page;
and the caching unit is configured to perform caching of at least one main page corresponding to the webpage display request and a sub page corresponding to the main page at a corresponding caching time and a corresponding caching address according to the configuration information.
Optionally, the buffer unit includes:
a cache subunit configured to perform data processing operations that initiate in parallel at least two of: the method comprises the steps of starting a webpage view, preloading a content document of the webpage, preloading an external script file of the webpage, preloading an application programming interface of the webpage and preloading a webpage picture.
Optionally, the first promoter unit is specifically configured to perform:
acquiring a preset preloading protocol; the preloading protocol comprises an external script file, an application programming interface and a picture corresponding to the webpage display request;
According to the preloading protocol, preloading an external script file of a webpage, an application programming interface of the webpage and preloading a webpage picture.
Optionally, the first obtaining unit includes:
the first acquisition subunit is configured to acquire a webpage display request of a to-be-displayed page in the current client interface in the display process of the client interface; or,
the second acquisition subunit is configured to acquire a webpage display request based on the page to be displayed, which is jumped in by the current client interface, in the display process of the client interface.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to execute the instructions to implement the webpage rendering method according to any embodiment of the present disclosure.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the webpage rendering method according to any embodiment of the present disclosure.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, which when executed by a processor of an electronic device, implements the webpage rendering method according to any embodiment of the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
by parallelly starting the data processing operation in the webpage rendering, the scheme of opening the webpage by the H5 technology can be optimized, the opening time of the H5 webpage is reduced, and the effect of user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
FIG. 1 is a flowchart illustrating a method of webpage rendering according to an exemplary embodiment.
FIG. 2 is a flowchart illustrating yet another method of webpage rendering according to an exemplary embodiment.
FIG. 3 is a flowchart illustrating yet another method of webpage rendering according to an exemplary embodiment.
FIG. 4 is a flowchart illustrating a method of webpage rendering according to an exemplary embodiment.
Fig. 5 is a block diagram illustrating a web page rendering apparatus according to an exemplary embodiment.
Fig. 6 is a block diagram illustrating a configuration of an electronic device according to an exemplary embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Fig. 1 is a flowchart illustrating a webpage rendering method according to an exemplary embodiment, and as shown in fig. 1, the webpage rendering method is applied to a client, and includes the following steps:
in step 110, a web page display request is obtained during the display of the client interface.
The client may be an application program in a smart terminal used by a user, for example, an APP in a smart phone. The smart terminal may be a mobile terminal such as a smart phone, a notebook computer, a PDA (personal digital assistant), a PAD (tablet computer), or the like, and a fixed terminal such as a desktop computer, or the like. The user can request the page resource from the server (such as a server) through the intelligent terminal, so as to realize the user requirement, for example, the client can realize the communication connection with the server through HTTP (HyperText Transfer Protocol ) or Websocket protocol, etc.
The display process of the client interface can be a display process of an APP (application) front page, for example, when a user enters an APP through an intelligent terminal, a display area can be fixed in the APP front page, for example, a front page display area can be arranged in a shopping APP, and a special price display area, an explosion display area, a good recommendation display area, other activity display areas and the like can be arranged in the front page display area; for another example, the video APP may have a home page display area, a dynamic display area, a member display area, and a my related content display area, where each display area may be subdivided into different display areas.
When a user enters the APP through an intelligent terminal such as a smart phone, the display process of the client interface can be the display process of each display area. The client interface may have a web page presentation area therein, for example, the presentation area in the video APP may be a web page presentation area for recommending news in real time; the client interface may not have a web page display area, but may jump to the web page display area, for example, the display area in the shopping APP may also be some fixed activity display area, and by clicking the fixed activity display area, may jump to the web page display area. The webpage display area is an area for realizing real-time change through a front-end page and meeting product demand display.
The web page display request may be a request for displaying a web page display area. May be a presentation request for one or more web pages. The obtaining of the webpage display request may be obtaining a webpage display request for a webpage display area when the current client interface has the webpage display area in a display process of the client interface. For example, in response to a sliding operation instruction of a user, a web page display area needing to be changed in real time is embedded in a current client interface. The webpage display request can be obtained when a sliding operation instruction of a user is issued; however, in order to reduce the opening duration of the web page, the web page display request may be obtained before the sliding operation instruction of the user, for example, the web page display request may be obtained when the client APP is started, or when the client interface is about to be displayed, or when the next display area of the current client interface is the web page display area, or the like.
Or, the web page display request may be obtained when a skipped web page display area exists in the display process of the client interface. For example, in response to a clicking operation performed on a certain area by a user, the current client interface needs to jump to an interface displayed through a web page. The webpage display request can be obtained when the user clicks; however, in order to reduce the opening duration of the web page, the web page display request may be obtained before the user clicks, for example, the web page display request may be obtained when the client APP is started, or when the client interface is about to display, or when the current client interface is about to jump to the interface for web page display, or the like.
In an embodiment of the present disclosure, in a display process of a client interface, the step of obtaining a web page display request includes: acquiring a webpage display request of a to-be-displayed page in a current client interface in the display process of the client interface; or, in the display process of the client interface, acquiring a webpage display request based on the page to be displayed, which is jumped in by the current client interface.
The page to be displayed in the current client interface refers to an embedded web page display area in the current client interface, for example, a video display interface is divided into three display areas: a video playing area, a video introduction area, and a video comment area. In the video display interface, the video comment area is a webpage display area and is embedded in a client interface, and in the display process of the client interface, a webpage display request of the video comment area needs to be acquired. The webpage display request can be synchronously acquired when the user triggers the client interface display, so that the webpage opening time can be reduced, and the user experience is improved.
The page to be displayed, which is jumped into based on the current client interface, refers to a function key which can be used for jumping to other interfaces with webpage display areas in the current client interface, for example, a display area in which a plurality of news can exist in a news display interface, and when a user clicks one of the news display areas, the user can jump to a news detail page corresponding to the news display area. The news detail page is a webpage display area and can be a webpage to be displayed which is jumped in based on the current client interface. The webpage request can be synchronously acquired when the user triggers the current client interface display, or can be acquired when the user triggers a news display area in the current client interface display, so that the webpage opening time can be reduced, and the user experience can be improved.
In step 120, upon acquisition of a web page presentation request, data processing operations performed serially in web page rendering are initiated in parallel.
Among these, the starting of the web page view, the content document, the external script file, the API (Application Programming Interface, application programming) interface, and the request of the web page picture are indispensable steps in opening the web page by the H5 technology. In the prior art, the execution sequence of these five steps is serial. Specifically, when a webpage display request is acquired, a webpage is evoked, and after the webpage is started and opened, a webpage view is initialized; after the webpage view is loaded, requesting a content document from a server; after the content document request is finished, analyzing the content in the content document, and identifying an external script file and an API interface required by webpage display; the method comprises the steps of obtaining information locally through an external script file, determining information associated with a client, organizing the information into dynamic language, obtaining data in webpage display through a request API interface, rendering a webpage when the client receives the data, and requesting a webpage picture to realize webpage display. The method has the advantages that the method is not optimized enough when the webpage is opened through the H5 technology, the required opening time is long, the user experience is affected, and particularly when the communication network is poor or the client machine performance is poor, the situation that the execution link of a certain step needs to wait for a long time, the subsequent steps cannot be executed, and the waiting is only possible is likely to occur.
In an optional implementation manner of this embodiment, the parallel start of the data processing operation steps that are executed in series in the webpage rendering includes: initiating in parallel data processing operations of at least two of: the method comprises the steps of starting a webpage view, preloading a content document of the webpage, preloading an external script file of the webpage, preloading an application programming interface of the webpage and preloading a webpage picture.
In order to reduce the duration of opening a webpage by an H5 technology and improve user experience, the technical scheme in the present disclosure may be to execute at least two steps of starting a webpage view, a content document, an external script file, an API interface, and a request for a webpage picture in parallel.
The webpage view can be webview, is a rendering kernel, and can be embedded in a client to realize hybrid development of front-end webpages. The starting web page view may specifically be: when a webpage display request is acquired, a webpage view is directly started without waiting for webpage call. For example, directly acquiring an initialized web page view; if the initialized webpage view does not exist, the initialized webpage view can be directly established when the webpage display request is acquired, the webpage view is not initialized after the webpage is not required to be opened, the webpage opening time can be reduced, and particularly when a communication network is poor or the performance of a client machine is poor, the webpage opening speed can be remarkably improved.
In an alternative implementation of the disclosed embodiment, the step of launching the web page view includes: and when the webpage display request is acquired, starting an initialized webpage view from the webpage view cache pool.
If the current webpage is accessed or other webpages exist when the current webpage is accessed, the initialized webpage view exists in the webpage view cache pool, and the initialized webpage view can be directly started in the webpage view cache pool, so that webpage display is realized, and the initialized webpage view is not required to be recreated. While it takes 500 milliseconds to first create a web page view, it may take only 20 milliseconds to directly initiate an initialized web page view, which may greatly reduce web page opening time.
The content document may be an HTML (Hyper Text Markup Language ) document, may be a document containing presentation web page data corresponding to a web page that a user needs to access, and may be a document containing how a web page presents and specifically presents content, for example. There may be external script files, API interfaces, and pictures that need to be used. The pre-loading of the content document can be directly requested to load the content document according to the webpage display request when the webpage display request is acquired, without waiting for webpage opening or webpage view starting, so that webpage opening time can be reduced, and user experience is improved. For example, the content document may be preloaded according to the identification information of the web page in the web page display request, such as URL (Uniform Resource Locator ), which is requested from the server in advance.
The external script file, the API interface and the webpage picture are information needed for displaying the webpage, and are generally included in the content document, the content document needs to be analyzed, the needed external script file, API interface and webpage picture are determined, and then the webpage is loaded, so that webpage display is realized. The external script file may be a JS (JavaScript, a programming language) file, for example, a pre-packaged JS file that may implement a specified function.
In order to improve the optimization of the scheme of opening the webpage by the H5 technology, in the embodiment of the disclosure, when the webpage display request is acquired, the content document is preloaded, and simultaneously, the external script file, the API interface and the webpage picture are preloaded in parallel. For example, the external script file, the API interface and the web page picture can be matched with the web page, and when the web page display request is obtained, the external script file, the API interface and the web page picture can be directly obtained according to the web page display request. Furthermore, the external script file, the API interface and the webpage picture can be preloaded without waiting for the external script file, the API interface and the webpage picture which are required by the analysis and determination of the content document after the content document is completely loaded, and then the external script file, the API interface and the webpage picture are loaded, so that the webpage opening time can be reduced.
Specifically, in an optional implementation manner of the embodiment of the present disclosure, the steps of preloading an external script file of a web page, preloading an application programming interface of the web page, and preloading a web page picture include: acquiring a preset preloading protocol; the preloading protocol comprises an external script file, an application programming interface and a picture, which correspond to the webpage display request; according to the preloading protocol, preloading an external script file of a webpage, preloading an application programming interface of the webpage and preloading a webpage picture.
The preloading protocol may be a protocol for instructing the client to preload the webpage to display the required content. The preloading protocol may include external script files, API interfaces, and pictures corresponding to the web page exposure request. According to the preloading protocol, the external script file, the API interface and the picture required by the webpage display request can be known before the content document of the webpage is analyzed, and the external script file, the API interface and the picture can be preloaded without loading the external script file, the API interface and the picture after the content document is analyzed. The preloading protocol may also include external script files, API interfaces, and preloading occasions of pictures, for example, when the client APP is started, or when the web page is evoked, etc. The specified external script file, API interface and picture may be preloaded at specified times according to a preloading protocol. The time required for opening the web page can be greatly shortened.
For example, when the client interface includes a web page display area, the preloading opportunity may be when the client APP is started. Or, the client interface does not contain a webpage display area, but can jump to a webpage through the client interface, and the preloading time can be when the client APP is started. The web pages that can be jumped to through the client interface can be unique or the web pages that can be jumped to can be non-unique, but the number of the web pages is small, and too much network resources are not occupied due to preloading. Alternatively, in order to avoid that the preloading of a plurality of web pages causes network and storage resource occupation to influence the display of the current web page, the preloading time may be when the web page is evoked. The webpage call-up may be in response to an operation instruction of a user, that a webpage display area exists in the client interface, or that the user jumps to the webpage display interface.
In step 130, the web page is rendered and presented according to the contents of the data processing operation.
According to the data processing operation, the client can receive data required by webpage rendering and render the webpage, and the webpage rendering can be performed simultaneously with the displaying. It should be noted that, if the web page picture is not loaded, the frame and the text portion may be rendered first, a display area of the web page picture is reserved, and when the web page picture exists, the picture is rendered. In other words, the rendering of the web page and the preloading of the web page picture may also be processes performed in parallel. The problem of long time consumption for webpage opening when waiting for webpage picture loading can be avoided.
According to the technical scheme, a webpage display request is obtained in the display process of a client interface; when a webpage display request is acquired, data processing operation which is executed in series in webpage rendering is started in parallel; the method and the device have the advantages that the webpage is rendered and displayed according to the content of the data processing operation, the scheme optimization problem of opening the webpage through the H5 technology is solved, the webpage opening time is reduced, the webpage opening speed is improved, and the user experience effect is improved.
Fig. 2 is a flowchart illustrating yet another web page rendering method according to an exemplary embodiment, as shown in fig. 2, for use in a client, comprising the steps of:
in step 210, a web page display request is obtained during the display of the client interface.
In step 220, it is determined whether there is web page data corresponding to the web page display request in the local cache; if yes, go to step 230; if not, go to step 240.
The local cache may be a pre-cache in a memory of the intelligent terminal where the client is located. For example, the local cache may be a cache of web pages accessed within a preset time period, or the local cache may be a pre-load of web pages that need to be accessed. Judging whether the local cache has the webpage data corresponding to the webpage display request or not can be judging whether the local cache has the identification information corresponding to the webpage display request or not, and if the local cache has the identification information corresponding to the webpage display request, determining that the local cache has the webpage data corresponding to the webpage display request; if the identification information corresponding to the webpage display request does not exist in the local cache, it can be determined that the webpage data corresponding to the webpage display request does not exist in the local cache. The identification information corresponding to the webpage display request may be information for representing the webpage to be displayed, for example, may be information such as URL of the webpage.
In order to increase the accuracy of judging whether the webpage data corresponding to the webpage display request exists in the local cache, the storage capacity of the file corresponding to the identification information in the local cache and/or the type of the file corresponding to the identification information in the local cache can be further judged on the basis of judging the identification information corresponding to the webpage display request. For example, when it can be determined that the local cache contains files related to URLs corresponding to the web page display requests, it can be further determined whether each related file is larger than a preset capacity value, and if so, the type of the related file can be further determined, and whether the related file contains various files required for web page display can be determined. If so, it may be determined that there is web page data in the local cache corresponding to the web page presentation request. If not, it may be determined that no web page data corresponding to the web page presentation request exists in the local cache.
To further illustrate that the local cache may be a pre-load of the web page that needs to be accessed, in an alternative implementation of the disclosed embodiment, after the step of obtaining the web page presentation request, the method further includes: acquiring configuration information corresponding to a webpage display request, wherein the configuration information comprises a main page pre-cached, a sub page corresponding to the main page, a caching opportunity corresponding to the main page or the sub page, and a caching address corresponding to the main page or the sub page; and according to the configuration information, caching at least one main page corresponding to the webpage display request and the sub page corresponding to the main page at corresponding caching time and corresponding caching address in advance.
Wherein the caching includes initiating data processing operations in parallel for at least two of: the method comprises the steps of starting a webpage view, preloading a content document of the webpage, preloading an external script file of the webpage, preloading an application programming interface of the webpage and preloading a webpage picture.
The configuration information may be obtained when the client is started, for example, when the user clicks an APP open key. When the user clicks the APP, the content displayed by the webpage can be preloaded according to the configuration information, and pre-caching is achieved. The configuration information may include a main page of the pre-cache and a sub page corresponding to the main page. The main page and the sub page are relatively, for example, when the first page of the client is considered to be the main page, the sub page may be a second-level page jumped to by the first page; or, the first page of the client and the page displayed with the parallel function of the first page are considered to be main pages, and the second page for further displaying or introducing each main page is considered to be a sub page corresponding to the main page.
Taking shopping APP as an example, the home page may be the home page, the message page, the shopping cart page, and the account page of the shopping APP. The sub page corresponding to the home page of the shopping APP may be a detail presentation page of each item or a detail presentation page of each activity. The detail presentation page for the commodity can also be provided with a sub-page of a next level, such as a commodity purchasing activity page or a commodity purchasing detail page. The detail presentation page for an activity may also have a sub-page of a further level, such as an item detail presentation page in an activity, etc.
The configuration information can also comprise caching opportunities of the main page and the corresponding sub pages, taking shopping APP as an example, and when a user clicks the APP, the main pages such as the home page, the message page, the shopping cart page, the account page and the like of the shopping APP can be pre-cached. The sub-pages corresponding to the home page can be pre-cached when the user clicks the home page display process of the shopping APP or finishes display, such as detail display pages of various commodities. When a user enters the detail display page of each commodity, the sub page of the next level corresponding to the detail display page of the commodity is pre-cached. In short, the relevant data of the web page may be pre-cached before the user clicks or enters the web page according to the configuration information. The local cache may be caused to have web page data associated with the web page presentation request.
The configuration information can comprise a cache address corresponding to the main page or the sub page, so that each main page corresponds to the sub page, and webpage data related to a webpage display request can be conveniently and accurately searched from a local cache in time. In the configuration information, the pre-caching time and the caching address of the main page and the sub page can be embodied in the form of a resource list, so that the method is convenient to review and manage.
The caching for the main page or sub-page may be similar, and may be a data processing operation that pre-initiates at least two of the following: the method comprises the steps of starting a webpage view, preloading a content document of the webpage, preloading an external script file of the webpage, preloading an API interface of the webpage and preloading a webpage picture. The executing process of starting the webpage view, preloading the content document of the webpage, preloading the external script file of the webpage, preloading the API interface of the webpage and preloading the webpage picture can be similar to the process of the content.
Taking the webpage display of the sub-page as an example, when the main page display request is acquired, the data processing operation of the sub-page corresponding to the main page can be cached in the local cache according to the configuration information, so that when the webpage display request of the sub-page is acquired, the data processing operation of the sub-page can be requested from the local cache. The pre-caching may be a process of data that is pre-requested by the client to the server. The method and the device can realize preloading of the related data displayed by the webpage from the server and pre-caching in the local cache, so that when the corresponding webpage is requested to be displayed, the related data displayed by the webpage is directly requested in the local cache, the webpage opening time is reduced, the operation of a user is responded quickly, and the user experience is improved.
In step 230, upon obtaining the web page presentation request, data processing operations of at least two of the following are initiated in parallel: the method comprises the steps of starting a webpage view, preloading a content document of a webpage from a local cache, preloading an external script file of the webpage from the local cache, preloading an application programming interface of the webpage from the local cache and preloading a webpage picture from the local cache.
If the local cache contains pre-cached webpage data related to the webpage display request, the data can be directly requested in the local cache, and the local cache can be the cache realized by accessing the webpage in advance or the pre-cache of the webpage before the webpage display request is acquired. The data processing operation when the web page display request is obtained may be similar to the above-described execution process (starting the data processing operation of at least two contents in parallel, namely, starting the web page view, preloading the content document of the web page, preloading the external script file of the web page, preloading the application programming API interface of the web page and preloading the web page picture), which will not be described again.
In step 240, when a web page display request is acquired, the following data processing operations of at least two items of content are started in parallel: the method comprises the steps of starting a webpage view, preloading a content document of a webpage from a server through a network, preloading an external script file of the webpage from the server through the network, preloading an application programming interface of the webpage from the server through the network and preloading a webpage picture from the server through the network.
If the local cache does not have the webpage data corresponding to the webpage display request, the client may request the webpage data corresponding to the webpage display request from the server, and the specific process may be to start the data processing operation of at least two of the following contents in parallel: the method comprises the steps of starting a webpage view, preloading a content document of a webpage from a server through a network, preloading an external script file of the webpage from the server through the network, preloading an API interface of the webpage from the server through the network and preloading a webpage picture from the server through the network. The execution timing of each step may be similar to that of the corresponding content, and will not be repeated here.
In step 250, the web page is rendered and presented according to the contents of the data processing operation.
According to the technical scheme, a webpage display request is obtained in the display process of a client interface; judging whether the local cache contains the webpage data corresponding to the webpage display request; if so, when a webpage display request is acquired, starting the data processing operation of at least two of the following contents in parallel: starting a webpage view, preloading a content document of a webpage from a local cache, preloading an external script file of the webpage from the local cache, preloading an API interface of the webpage from the local cache and preloading a webpage picture from the local cache; if not, when a webpage display request is acquired, the data processing operation of at least two of the following contents is started in parallel: starting a webpage view, preloading a content document of a webpage from a server through a network, preloading an external script file of the webpage from the server through the network, preloading an API interface of the webpage from the server through the network, and preloading a webpage picture from the server through the network; the method and the device have the advantages that the problem of optimizing the scheme of opening the webpage through the H5 technology is solved, the webpage data corresponding to the webpage display request can be requested in the local cache by judging whether the webpage data exist in the local cache or not, the webpage data request time is shortened, the webpage opening speed is improved, and the user experience is improved.
Fig. 3 is a flowchart illustrating yet another web page rendering method according to an exemplary embodiment, as shown in fig. 3, for use in a client, comprising the steps of:
in step 310, a web page display request is obtained during the display of the client interface.
The web page display request in this embodiment may include: the web page presents the URL of the request. The URLs of the different web pages are different and the URL of the web page presentation request may represent a unique web page. Matching between the web page display request and the corresponding web page data can be achieved through the URL. In this embodiment, the URL may include a fixed identification of the web resource and a wild card, which may be used to identify the client.
The fixed identifier of the web page resource may be the identifier information of the web page displaying the fixed content, for example, for a detailed description of a certain news, the web page data is fixed between different intelligent terminals or different clients, and no difference exists. I.e., the URL represented by the fixed identification of the web page resource is a static web page presentation. In the embodiment of the disclosure, the URL may be represented by a fixed identifier of the web page resource and a wild card, which is used to identify the client, and is a dynamic web page presentation. For example, in shopping APP, the content presented by different client home pages is different, possibly due to targeted recommendations for the user or personal settings of the user. Dynamic webpage display is carried out through the URL, data processing operation required by personalized webpage display can be provided for different users in advance, and static webpage display is not required to be restricted.
In step 320, upon obtaining the web page presentation request, client identification information is obtained.
The client identification information is information indicating the client, and may be, for example, a device code of an intelligent terminal used by the user, an ID (Identity) of the user, or the like. The client identification information may be stored in a local memory in advance, and may be read directly from the local memory when the web page display request is acquired.
In step 330, the wild card is updated with the client identification information to generate the target URL of the web page presentation request.
In the technical solution of the embodiment of the present disclosure, the URL may include two parts of content including a fixed identifier and a wild card of a web resource, for example: URL is api.abcde.com/dide= { did, when obtaining the webpage display request and the client identification information, { did } can be updated into the client identification information to generate a target URL of the webpage display request, and the data processing operation related to webpage display is started in parallel through the target URL, so that the dynamic webpage can be preloaded, and the requirements of quickly displaying personalized webpages for different clients can be met.
In step 340, data processing operations are initiated in parallel for at least two of the following: starting a webpage view, preloading a content document of a webpage corresponding to a target URL, preloading an external script file of the webpage corresponding to the target URL, preloading an application programming interface of the webpage corresponding to the target URL and preloading a webpage picture corresponding to the target URL.
The procedure of the data processing operation may be similar to that described above, and will not be repeated here.
In the pre-caching process, the web page corresponding to the URL including the fixed identifier of the web page resource and the client identifier information may be pre-cached for the dynamic web page. The above-mentioned process of judging whether the local cache has the web page data corresponding to the web page display request may also be a process of judging whether the local cache has the web page data corresponding to the URL including the fixed identifier of the web page resource and the client identifier information.
In step 350, the web page is rendered and presented according to the contents of the data processing operation.
According to the technical scheme, the webpage display request is obtained in the display process of the client interface, wherein the webpage display request comprises the following steps: a URL of a web page presentation request; when a webpage display request is acquired, acquiring client identification information; updating the wild card as client identification information to generate a target URL of the webpage display request; initiating in parallel data processing operations of at least two of: starting a webpage view, preloading a content document of a webpage corresponding to a target URL, preloading an external script file of the webpage corresponding to the target URL, preloading an API interface of the webpage corresponding to the target URL and preloading a webpage picture corresponding to the target URL; the method comprises the steps of rendering the webpage according to the content of data processing operation and displaying the webpage, solving the problem of optimizing the scheme of opening the webpage through the H5 technology, preloading webpage data corresponding to the webpage display request of the dynamic webpage through the URL containing the fixed identification of the webpage resource and the wild card, displaying the webpage with a certain relevance with the client rapidly, reducing the webpage opening time and improving the user experience.
FIG. 4 is a flowchart illustrating a method of webpage rendering according to an exemplary embodiment, as shown in FIG. 4, in an embodiment of the present disclosure, the webpage rendering process may be: the client initiates webview, requests a content document (HTML document), requests an external script file (JS file), requests an API interface, and requests a web page picture in parallel. After requesting the data, the data may be received and the webpage rendered.
The request of the data may be a request in the local cache or a request from the server when the data does not exist in the local cache. For example, when the URL of the web page display request matches the URL of the local cache, data may be requested from the local cache and returned to the client for web page display.
The webview starting may be to start the initialized webview from the webview cache pool for direct use; if the cache pool does not have webview, the webview can be established when the webpage display request is acquired, namely, the webview is established simultaneously with the initialization of the webpage, and the webview does not need to be established after the webpage is opened.
The request for the content document can be constructed in advance according to the webpage display request, and the request is not needed until the webpage is started and completed, and the content document is requested after the webview is loaded and completed. The request JS file and the API interface can be informed to the client side in advance through a preloading protocol at the start of the APP or other occasions, and the JS file and the API interface required by the webpage are required. The client can send out the request in advance and cache the request without waiting for the end of the request of the content document, and after the JS file and the API interface required by the analysis and determination of the content document, the request of the JS file and the API interface is sent out. The process of requesting the picture can be similar to the process of requesting the JS file and the API interface, or can be requested and cached in advance by the client through a preloading protocol.
In the above process, when the client is started, configuration information may be obtained in advance, and a web page to be pre-cached and a resource list, for example, at what time and at what cache address to cache which web page are obtained. Related resources can be cached in advance at different occasions according to configuration information, for example, a short video APP can be cached when a client is started, and a concerned page of a user, a discovery recommended page of the user, a city page of the user, a personal setting page of the user and a search page of the user can be cached. When a user enters one of the main pages, the sub page corresponding to the main page can be cached, for example, the user enters the attention page of the user, and the short video page or the live page corresponding to the attention page of the user can be cached.
Wherein, for different web pages, wild cards can be adopted in the caching, and are defined as fields filled by clients. For example, the user ID generated locally by the client may be used to satisfy the quick show request of the dynamic web page.
Research shows that the perceived waiting time of a search engine is reduced by 40%, and the flow and the registered people can be increased by 15%; every 1 second of loading time of the webpage is increased, 10% of users can be lost; page loading times exceeding 3 seconds, 53% of mobile network access activity will be discarded. It can be seen that the opening speed of the web page has a very important influence on the user experience and the product data.
According to the technical scheme, the step of opening the webpage by the H5 technology is parallelized, webpage data are cached in advance in a multi-trigger scene mode, and the dynamic URL is adopted, so that the webpage opening scheme can be optimized to the greatest extent, the opening time of the H5 webpage is greatly reduced, and the user experience is improved.
Fig. 5 is a block diagram illustrating a web page rendering apparatus according to an exemplary embodiment. Referring to fig. 5, the apparatus may be used in a client, including. A first obtaining unit 510, a starting unit 520 and a displaying unit 530.
The first obtaining unit 510 is configured to obtain a web page display request in a display process of the client interface;
a start unit 520 configured to perform a data processing operation that is serially performed in parallel starting web page rendering when a web page presentation request is acquired;
and a presentation unit 530 configured to perform content rendering of the web page according to the data processing operation and to present the web page.
Optionally, the starting unit 520 includes:
a first promoter unit for initiating data processing operations of at least two of the following in parallel: the method comprises the steps of starting a webpage view, preloading a content document of the webpage, preloading an external script file of the webpage, preloading an application programming interface of the webpage and preloading a webpage picture.
Optionally, the webpage rendering device further includes:
the second promoter unit is configured to execute, after the step of acquiring the webpage display request, when the webpage data corresponding to the webpage display request exists in the local cache, and when the webpage display request is acquired, start the data processing operations of at least two of the following contents in parallel: the method comprises the steps of starting a webpage view, preloading a content document of a webpage from a local cache, preloading an external script file of the webpage from the local cache, preloading an application programming interface of the webpage from the local cache and preloading a webpage picture from the local cache.
Optionally, the webpage rendering device further includes:
the third promoter unit is configured to execute, after the step of acquiring the web page display request, when the web page data corresponding to the web page display request does not exist in the local cache, and when the web page display request is acquired, start the data processing operations of at least two of the following contents in parallel: the method comprises the steps of starting a webpage view, preloading a content document of a webpage from a server through a network, preloading an external script file of the webpage from the server through the network, preloading an application programming interface of the webpage from the server through the network and preloading a webpage picture from the server through the network.
Optionally, the web page presentation request includes: the web page presents the URL of the request.
Optionally, the URL includes: the client comprises a fixed identifier of the webpage resource and a wild card, wherein the wild card is used for identifying the client.
Optionally, the first promoter unit is specifically configured to perform:
acquiring client identification information;
updating the wild card as client identification information to generate a target URL of the webpage display request;
initiating in parallel data processing operations of at least two of: starting a webpage view, preloading a content document of a webpage corresponding to a target URL, preloading an external script file of the webpage corresponding to the target URL, preloading an application programming interface of the webpage corresponding to the target URL and preloading a webpage picture corresponding to the target URL.
Optionally, the first promoter unit is specifically configured to perform:
and when the webpage display request is acquired, starting an initialized webpage view from the webpage view cache pool.
Optionally, the webpage rendering device further includes:
the second obtaining unit is configured to obtain configuration information corresponding to the webpage display request after the webpage display request step, wherein the configuration information comprises a main page pre-cached, a sub-page corresponding to the main page, a caching opportunity corresponding to the main page or the sub-page, and a caching address corresponding to the main page or the sub-page;
The caching unit is configured to perform caching of at least one main page corresponding to the webpage display request and the sub page corresponding to the main page at corresponding caching time and corresponding caching address according to the configuration information.
Optionally, the cache unit includes:
a cache subunit configured to perform data processing operations that initiate in parallel at least two of: the method comprises the steps of starting a webpage view, preloading a content document of the webpage, preloading an external script file of the webpage, preloading an application programming interface of the webpage and preloading a webpage picture.
Optionally, the first promoter unit is specifically configured to perform:
acquiring a preset preloading protocol; the preloading protocol comprises an external script file, an application programming interface and a picture, which correspond to the webpage display request;
according to the preloading protocol, preloading an external script file of a webpage, preloading an application programming interface of the webpage and preloading a webpage picture.
Optionally, the first obtaining unit 510 includes:
the first acquisition subunit is configured to acquire a webpage display request of a to-be-displayed page in the current client interface in the display process of the client interface; or,
The second acquisition subunit is configured to acquire a webpage display request based on the page to be displayed, which is jumped in by the current client interface, in the display process of the client interface.
The specific manner in which the individual units perform the operations in relation to the apparatus of the above embodiments has been described in detail in relation to the embodiments of the method and will not be described in detail here.
Fig. 6 is a block diagram illustrating a configuration of an electronic device according to an exemplary embodiment. As shown in fig. 6, the server includes a processor 610; a Memory 620 for storing executable instructions of the processor 610, the Memory 620 may include a random access Memory (Random Access Memory, RAM) and a Read-Only Memory (ROM); wherein the processor 610 is configured to execute instructions to implement the above-described methods.
In an exemplary embodiment, a storage medium is also provided, such as a memory storing executable instructions, that are executable by a processor of an electronic device (smart terminal) to perform the above method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, a ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which when instructions in the computer program product are executed by a processor of an electronic device (smart terminal) implements the above method.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (22)

1. The webpage rendering method is characterized by being applied to a client and comprising the following steps of:
acquiring a webpage display request in the display process of a client interface;
When the webpage display request is acquired, data processing operation which is executed in series in webpage rendering is started in parallel;
rendering a webpage according to the content of the data processing operation and displaying the webpage;
the parallel starting webpage rendering comprises the following data processing operation steps of serial execution:
initiating in parallel data processing operations of at least two of: starting a webpage view, preloading a content document of a webpage, preloading an external script file of the webpage, preloading an application programming interface of the webpage and preloading a webpage picture;
in the displaying process of the client interface, the step of obtaining the webpage displaying request comprises the following steps:
acquiring a webpage display request of a to-be-displayed page in a current client interface in the display process of the client interface; or,
acquiring a webpage display request of a page to be displayed, which is jumped in based on a current client interface, in the display process of the client interface;
the page to be displayed in the current client interface refers to an embedded webpage display area in the current client interface; the page to be displayed, which is jumped into based on the current client interface, refers to a function key which is provided with a jump to other interfaces with webpage display areas in the current client interface;
The starting web page view includes: and when the webpage display request is acquired, starting an initialized webpage view from the webpage view cache pool.
2. The web page rendering method of claim 1, further comprising, after the step of obtaining a web page presentation request:
when the webpage data corresponding to the webpage display request exists in the local cache, when the webpage display request is acquired, the data processing operation of at least two of the following contents is started in parallel: the method comprises the steps of starting a webpage view, preloading a content document of a webpage from a local cache, preloading an external script file of the webpage from the local cache, preloading an application programming interface of the webpage from the local cache and preloading a webpage picture from the local cache.
3. The web page rendering method of claim 1, further comprising, after the step of obtaining a web page presentation request:
when the webpage data corresponding to the webpage display request does not exist in the local cache, starting the data processing operation of at least two of the following contents in parallel when the webpage display request is acquired: the method comprises the steps of starting a webpage view, preloading a content document of a webpage from a server through a network, preloading an external script file of the webpage from the server through the network, preloading an application programming interface of the webpage from the server through the network and preloading a webpage picture from the server through the network.
4. The web page rendering method of claim 1, wherein the web page presentation request comprises: the web page presents the requested uniform resource locator URL.
5. The web page rendering method of claim 4, wherein the URL comprises: the client comprises a fixed identifier of the webpage resource and a wild card, wherein the wild card is used for identifying the client.
6. The web page rendering method of claim 5, wherein the data processing operations of at least two of the following are initiated in parallel: the steps of starting the webpage view, preloading the content document of the webpage, preloading the external script file of the webpage, preloading the application programming interface of the webpage and preloading the webpage picture comprise:
acquiring client identification information;
updating the wild card as the client identification information to generate a target URL of a webpage display request;
initiating in parallel data processing operations of at least two of: starting a webpage view, preloading a content document of a webpage corresponding to the target URL, preloading an external script file of the webpage corresponding to the target URL, preloading an application programming interface of the webpage corresponding to the target URL and preloading a webpage picture corresponding to the target URL.
7. The web page rendering method of claim 1, wherein the step of initiating a web page view comprises:
and when the webpage display request is acquired, starting an initialized webpage view from a webpage view cache pool.
8. The web page rendering method of claim 1, further comprising, after the step of obtaining a web page presentation request:
acquiring configuration information corresponding to the webpage display request, wherein the configuration information comprises a main page pre-cached, a sub-page corresponding to the main page, a caching opportunity corresponding to the main page or the sub-page, and a caching address corresponding to the main page or the sub-page;
and according to the configuration information, at least one main page corresponding to the webpage display request and a sub page corresponding to the main page are cached at corresponding caching time and corresponding caching addresses in advance.
9. The web page rendering method of claim 8, wherein the caching comprises:
initiating in parallel data processing operations of at least two of: the method comprises the steps of starting a webpage view, preloading a content document of the webpage, preloading an external script file of the webpage, preloading an application programming interface of the webpage and preloading a webpage picture.
10. The web page rendering method of claim 1, wherein the preloading of the external script file of the web page, the preloading of the application programming interface of the web page, and the preloading of the web page picture steps comprise:
acquiring a preset preloading protocol; the preloading protocol comprises an external script file, an application programming interface and a webpage picture, wherein the external script file, the application programming interface and the webpage picture correspond to the webpage display request;
according to the preloading protocol, preloading an external script file of a webpage, an application programming interface of the webpage and preloading a webpage picture.
11. A web page rendering device, applied to a client, comprising:
the first acquisition unit is configured to acquire a webpage display request in the display process of the client interface;
the starting unit is configured to execute data processing operations which are executed in series in webpage rendering and started in parallel when the webpage display request is acquired;
a presentation unit configured to perform rendering of a web page according to contents of the data processing operation and to present the web page;
the starting unit includes:
a first promoter unit for initiating data processing operations of at least two of the following in parallel: starting a webpage view, preloading a content document of a webpage, preloading an external script file of the webpage, preloading an application programming interface of the webpage and preloading a webpage picture;
The first acquisition unit includes:
the first acquisition subunit is configured to acquire a webpage display request of a to-be-displayed page in the current client interface in the display process of the client interface; or,
the second acquisition subunit is configured to acquire a webpage display request of a to-be-displayed page which is jumped in based on the current client interface in the display process of the client interface;
the page to be displayed in the current client interface refers to an embedded webpage display area in the current client interface; the page to be displayed, which is jumped into based on the current client interface, refers to a function key which is provided with a jump to other interfaces with webpage display areas in the current client interface;
the first promoter unit is specifically configured to perform:
and when the webpage display request is acquired, starting an initialized webpage view from the webpage view cache pool.
12. The web page rendering device of claim 11, further comprising:
the second promoter unit is configured to execute, after the step of acquiring the webpage display request, when the webpage data corresponding to the webpage display request exists in the local cache, and when the webpage display request is acquired, start the data processing operations of at least two of the following contents in parallel: the method comprises the steps of starting a webpage view, preloading a content document of a webpage from a local cache, preloading an external script file of the webpage from the local cache, preloading an application programming interface of the webpage from the local cache and preloading a webpage picture from the local cache.
13. The web page rendering device of claim 11, further comprising:
a third promoter unit configured to execute, after the step of acquiring the web page display request, when no web page data corresponding to the web page display request exists in the local cache, and when the web page display request is acquired, start data processing operations of at least two of the following contents in parallel: the method comprises the steps of starting a webpage view, preloading a content document of a webpage from a server through a network, preloading an external script file of the webpage from the server through the network, preloading an application programming interface of the webpage from the server through the network and preloading a webpage picture from the server through the network.
14. The web page rendering device of claim 11, wherein the web page presentation request comprises: the web page presents the requested uniform resource locator URL.
15. The web page rendering device of claim 14, wherein the URL comprises: the client comprises a fixed identifier of the webpage resource and a wild card, wherein the wild card is used for identifying the client.
16. The web page rendering device of claim 15, wherein the first promoter unit is specifically configured to perform:
Acquiring client identification information;
updating the wild card as the client identification information to generate a target URL of a webpage display request;
initiating in parallel data processing operations of at least two of: starting a webpage view, preloading a content document of a webpage corresponding to the target URL, preloading an external script file of the webpage corresponding to the target URL, preloading an application programming interface of the webpage corresponding to the target URL and preloading a webpage picture corresponding to the target URL.
17. The web page rendering device of claim 11, wherein the first promoter unit is specifically configured to perform:
and when the webpage display request is acquired, starting an initialized webpage view from a webpage view cache pool.
18. The web page rendering device of claim 11, further comprising:
a second obtaining unit configured to perform obtaining configuration information corresponding to the web page display request after the web page display request obtaining step, where the configuration information includes a pre-cached main page, a sub-page corresponding to the main page, a caching opportunity corresponding to the main page or the sub-page, and a caching address corresponding to the main page or the sub-page;
And the caching unit is configured to perform caching of at least one main page corresponding to the webpage display request and a sub page corresponding to the main page at a corresponding caching time and a corresponding caching address according to the configuration information.
19. The web page rendering device of claim 18, wherein the caching unit comprises:
a cache subunit configured to perform data processing operations that initiate in parallel at least two of: the method comprises the steps of starting a webpage view, preloading a content document of the webpage, preloading an external script file of the webpage, preloading an application programming interface of the webpage and preloading a webpage picture.
20. The web page rendering device of claim 11, wherein the first promoter unit is specifically configured to perform:
acquiring a preset preloading protocol; the preloading protocol comprises an external script file, an application programming interface and a picture corresponding to the webpage display request;
according to the preloading protocol, preloading an external script file of a webpage, an application programming interface of the webpage and preloading a webpage picture.
21. An electronic device, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to execute the instructions to implement the webpage rendering method of any of claims 1 to 10.
22. A storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the webpage rendering method of any one of claims 1 to 10.
CN202010997744.0A 2020-09-21 2020-09-21 Webpage rendering method, device, equipment and storage medium Active CN112115396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010997744.0A CN112115396B (en) 2020-09-21 2020-09-21 Webpage rendering method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010997744.0A CN112115396B (en) 2020-09-21 2020-09-21 Webpage rendering method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112115396A CN112115396A (en) 2020-12-22
CN112115396B true CN112115396B (en) 2024-04-02

Family

ID=73801091

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010997744.0A Active CN112115396B (en) 2020-09-21 2020-09-21 Webpage rendering method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112115396B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112784201B (en) * 2021-01-29 2024-05-14 游艺星际(北京)科技有限公司 Webpage display method, device, terminal and storage medium
CN112861048A (en) * 2021-03-10 2021-05-28 北京车和家信息技术有限公司 Page loading method, device, equipment and computer readable storage medium
CN115225916B (en) * 2021-04-15 2024-04-23 北京字节跳动网络技术有限公司 Video processing method, device and equipment
CN113885967B (en) * 2021-10-22 2024-02-13 北京字跳网络技术有限公司 Method, device, equipment and medium for starting applet
CN114065080B (en) * 2021-11-26 2023-06-13 腾讯科技(深圳)有限公司 Page rendering method, device, equipment and computer readable storage medium
CN114185621A (en) * 2021-12-17 2022-03-15 广东德生科技股份有限公司 Application program interface picture loading method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760405A (en) * 2014-12-19 2016-07-13 阿里巴巴集团控股有限公司 Methods and devices for obtaining network resource for loading web page and method and device for caching network resource
CN106326223A (en) * 2015-06-16 2017-01-11 广州市动景计算机科技有限公司 Method and device for acquiring web page resource
CN107918619A (en) * 2016-10-10 2018-04-17 北京奇虎科技有限公司 Advertisement demonstration method and device
CN107943825A (en) * 2017-10-19 2018-04-20 阿里巴巴集团控股有限公司 Data processing method, device and the electronic equipment of page access
CN110110194A (en) * 2019-04-29 2019-08-09 百度在线网络技术(北京)有限公司 A kind of resource acquiring method, server, client and electronic equipment
CN110795650A (en) * 2019-09-18 2020-02-14 平安银行股份有限公司 Webpage opening method and device and computer readable storage medium
CN111488185A (en) * 2020-04-15 2020-08-04 北京字节跳动网络技术有限公司 Page data processing method and device, electronic equipment and readable medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760405A (en) * 2014-12-19 2016-07-13 阿里巴巴集团控股有限公司 Methods and devices for obtaining network resource for loading web page and method and device for caching network resource
CN106326223A (en) * 2015-06-16 2017-01-11 广州市动景计算机科技有限公司 Method and device for acquiring web page resource
CN107918619A (en) * 2016-10-10 2018-04-17 北京奇虎科技有限公司 Advertisement demonstration method and device
CN107943825A (en) * 2017-10-19 2018-04-20 阿里巴巴集团控股有限公司 Data processing method, device and the electronic equipment of page access
CN110110194A (en) * 2019-04-29 2019-08-09 百度在线网络技术(北京)有限公司 A kind of resource acquiring method, server, client and electronic equipment
CN110795650A (en) * 2019-09-18 2020-02-14 平安银行股份有限公司 Webpage opening method and device and computer readable storage medium
CN111488185A (en) * 2020-04-15 2020-08-04 北京字节跳动网络技术有限公司 Page data processing method and device, electronic equipment and readable medium

Also Published As

Publication number Publication date
CN112115396A (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN112115396B (en) Webpage rendering method, device, equipment and storage medium
CN109636488B (en) Advertisement putting method and device
US10911554B2 (en) Method and system for tracking web link usage
EP3518124A1 (en) Webpage rendering method and related device
RU2614572C2 (en) Method, system and device for filtering advertisement web pages on mobile terminal
CN107463641B (en) System and method for improving access to search results
US9183316B2 (en) Providing action links to share web content
CN111462281A (en) Poster generation method, device, equipment and storage medium
CN110245069B (en) Page version testing method and device and page display method and device
CN110442815B (en) Page generation method, system, device and computer readable storage medium
US9934206B2 (en) Method and apparatus for extracting web page content
CN110866204A (en) Page processing method and device
US20170199850A1 (en) Method and system to decrease page load time by leveraging network latency
US20120144291A1 (en) Apparatus and method for controlling web browser display
CN111339456B (en) Preloading method and device
US20170300459A1 (en) Card-type desktop implementation method and apparatus
US20220222306A1 (en) System, method and apparatus for presenting information
CN110825988A (en) Information display method and device and electronic equipment
CN112905928B (en) Webpage refreshing method and device, electronic equipment and storage medium
CA2996710C (en) Systems and methods for prefetching dynamic urls
CN108319474B (en) Page information generation method, device and equipment
CN108021594B (en) Webpage display method, device and system
CN111259283B (en) Page resource preloading processing method and device, and electronic and storage equipment
CN108667915B (en) Information pushing system, method and device
CN111273964A (en) Data loading method and device

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
GR01 Patent grant
GR01 Patent grant