WO2017036309A1 - Page rendering method, device and apparatus - Google Patents

Page rendering method, device and apparatus Download PDF

Info

Publication number
WO2017036309A1
WO2017036309A1 PCT/CN2016/095857 CN2016095857W WO2017036309A1 WO 2017036309 A1 WO2017036309 A1 WO 2017036309A1 CN 2016095857 W CN2016095857 W CN 2016095857W WO 2017036309 A1 WO2017036309 A1 WO 2017036309A1
Authority
WO
WIPO (PCT)
Prior art keywords
html
target
module
page
resources
Prior art date
Application number
PCT/CN2016/095857
Other languages
French (fr)
Chinese (zh)
Inventor
朱盛家
Original Assignee
阿里巴巴集团控股有限公司
朱盛家
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 阿里巴巴集团控股有限公司, 朱盛家 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2017036309A1 publication Critical patent/WO2017036309A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Definitions

  • the present application relates to the field of network communication technologies, and in particular, to a page rendering method, apparatus, and device.
  • Page rendering is the process by which the client browser displays HTML (Hyper Text Markup Language) code in a browser window according to predefined rules.
  • HTML Hyper Text Markup Language
  • the client browser When the client browser renders the HTML page, it needs to obtain various resources for rendering the page from the server, and implement the HTML page rendering by loading the acquired resources.
  • the HTML document framework can be divided into multiple HTML modules according to different functions.
  • the client browser When rendering the HTML page portion corresponding to any HTML module, the client browser sequentially requests each server different HTML module in a serial manner. Type resources, and after requesting each type of resource, load these resources by manually calling JavaScript to complete the rendering of the HTML page part.
  • the application provides a page rendering method, device and device to solve the problem that the overall speed of the existing page rendering is slow.
  • a page rendering method is provided, where the method is applied to a client device, including:
  • a page rendering apparatus the apparatus being applied to a client device, the apparatus comprising:
  • a traversing unit for traversing a file object model DOM node of each HTML module of the HTML page when accessing the HTML page through the browser;
  • a requesting unit configured to, when traversing to a target DOM node of the current target HTML module, request a plurality of target resources of the target HTML module in parallel according to the attribute information defined in the target DOM node;
  • a rendering unit configured to render the target HTML module according to a relationship between the plurality of target resources.
  • a client device including:
  • processor a memory for storing the processor executable instructions
  • processor is configured to:
  • the target of the target HTML module may be requested in parallel according to the attribute information defined in the target DOM node to the server.
  • FIG. 1 is a flow chart of an embodiment of a page rendering method of the present application
  • FIG. 2 is a schematic diagram of a scenario for performing page rendering by applying an embodiment of the present application
  • FIG. 3 is a flow chart of another embodiment of a page rendering method of the present application.
  • FIG. 4 is a hardware structural diagram of a client device where a page rendering device of the present application is located;
  • FIG. 5 is a block diagram of an embodiment of a page rendering apparatus of the present application.
  • FIG. 6 is a block diagram of another embodiment of a page rendering apparatus of the present application.
  • first, second, third, etc. may be used to describe various information in this application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information without departing from the scope of the present application.
  • second information may also be referred to as the first information.
  • word "if” as used herein may be interpreted as "when” or “when” or “in response to a determination.”
  • FIG. 1 is a flowchart of an embodiment of a page rendering method of the present application, which may be Applied to the client device, including the following steps:
  • Step 101 When accessing the HTML page through the browser, traverse the DOM node of each HTML module of the HTML page.
  • the HTML page when the user launches the browser on the client device and accesses the HTML page through the browser, the HTML page may be first divided into multiple HTML modules.
  • the HTML page may be divided into different functions according to different functions. Multiple parent HTML modules. Further, for any parent HTML module, the parent HTML module can also be divided into multiple child HTML modules.
  • the HTML module of the HTML page may be divided according to different functions of the HTML page. For example, the image display area, the video display area, and the text display area on the HTML page may be divided into different HTML modules, and further, It is also possible to divide the text content fixed area and the text content change area in the text display area into different HTML modules.
  • the DOM node of the HTML module can be defined by the WEB native layout, the DOM node is used to mark the area of the corresponding HTML module in the HTML page, and the attribute information can be added on the DOM node, the attribute
  • the information includes the resource path of multiple resources of the HTML module, such as the address or port of the storage resource on the server.
  • each HTML page contains a plurality of HTML modules, at which point the client device begins to traverse the DOM nodes of each HTML module, performing the same operations for each DOM node client device traversed. Therefore, for convenience of description, the currently traversed HTML module is referred to as a target HTML module, and the DOM node of the target HTML module is referred to as a target DOM node.
  • Step 102 When traversing to the target DOM node of the current target HTML module, request multiple target resources of the target HTML module to the server in parallel according to the attribute information defined in the target DOM node.
  • the attribute information of the target DOM node may be read, the resource path of the plurality of target resources of the target HTML module is obtained, and then the resources of each target resource are obtained.
  • the path sends a resource request for obtaining these target resources in parallel to the server by calling JavaScript.
  • Resources can include: HTML Files, CSS (Cascading Style Sheets) files, JS (JavaScript) files, JSON (JavaScript Object Notation, JS Object Markup) data, etc.
  • Step 103 Render the target HTML module according to the relationship between the multiple target resources.
  • a request status may be set for each resource request, and the request status is used to mark whether the corresponding target resource has been acquired.
  • the target resources may be sequentially loaded according to the dependencies between the target resources, the target HTML module is synthesized, and finally the synthesized HTML module is added to the target DOM. In the node, thus completing the rendering of the target HTML module. It can be seen that when the DOM nodes of all the HTML modules are traversed and the rendering of all the HTML modules is completed, the rendering of the entire HTML page can be completed.
  • the loading process when the target resources are sequentially loaded according to the dependency relationship between the target resources is consistent with the prior art.
  • the target resource includes an HTML file, a CSS file, a JS file, and JSON data
  • the HTML file is firstly used according to the HTML file.
  • the HTML document framework is loaded, and then the HEML document framework is modified by the JS file.
  • the HTML document framework is further modified by the CSS file and the JSON data, thereby rendering the HTML page portion corresponding to the target HTML module.
  • FIG. 2 is a schematic diagram of a scenario for implementing page rendering in the application of the embodiment of the present application.
  • FIG. 2 is an example of rendering an HTML page of an OPOA (One Page One Application).
  • FIG. 2 includes a client device side for loading an HTML page, generally referred to as a mobile phone, a tablet, a PC, and the like configured with a browser; and a server side providing various resources for loading an HTML page, the server side You can deploy a distributed server, for example, CDN (Content Delivery Network, Content Distribution Network) server.
  • CDN Content Delivery Network, Content Distribution Network
  • OPOA refers to a WEB page is an application.
  • all HTML documents are transmitted to the WEB browser.
  • the HTML page will be in the current WEB page. load.
  • FIG. 2 assuming that an OPOA includes n HTML pages, the rendering process of each HTML page can be implemented by using the solution provided by the embodiment of the present application. Taking the HTML page 2 shown in FIG.
  • the HTML page 2 is divided into m HTML modules, and the resources of each HTML module are stored on the server side, and the rendering process of each HTML module is consistent to the HTML module 2
  • the client device sends the resource request to the server in parallel, and after obtaining all the resources including the HTML file, the JS file, the CSS file, and the JSON data, the dependence between the resources is utilized.
  • the relationship is rendered out of the corresponding portion of the HTML page 2 corresponding to the HTML module 2.
  • the page rendering process of the present application will be described in detail below through the embodiment shown in FIG. 3 in conjunction with the scenario diagram shown in FIG. 2.
  • FIG. 3 it is a flowchart of another embodiment of a page rendering method of the present application.
  • the embodiment may be applied to a client device, including the following steps:
  • Step 301 When the HTML page is accessed through the browser, the HTML page is divided into a plurality of HTML modules.
  • the HTML page when the user starts the browser on the client device and accesses the HTML page through the browser, the HTML page may be first divided into multiple HTML modules.
  • the HTML page may be divided into different functions according to different functions.
  • the parent HTML module can also be divided into multiple child HTML modules.
  • the HTML page 2 is divided into m HTML modules, which may include a parent HTML module, and/or a sub-HTML module.
  • the HTML page when the HTML module of the HTML page is divided, the HTML page may be divided according to different functions of the HTML page.
  • the image display area, the video display area, and the text display area on the HTML page may be divided into different HTML modules.
  • the text content fixed area and the text content change area in the text display area may be divided into different HTML module; additionally, for the OPOA shown in FIG. 2, different HTML pages may contain partially identical page content, for example, when rendering HTML page 1, divide HTML page 1 into several HTML modules, if HTML page 2 is The divided HTML module is the same as the page content of an HTML module divided in the HTML page 1.
  • the rendering time and rendering resources of 2 are not limited in this embodiment of the present application.
  • Step 302 Define attribute information of the DOM node of each HTML module through the WEB native layout.
  • Native development generally refers to the development of a native development language.
  • the native development language is the programming language used to develop the entire system.
  • DOM is a document model described in an object-oriented manner, and is also a tree representation of the data and structure on the page. In this way, the DOM defines the objects needed to represent and modify the document, the behavior and properties of the object, and the relationships between the objects.
  • the DOM node of the HTML module may be defined by the WEB native layout, and the DOM node is used to mark the corresponding HTML module in the HTML page.
  • An area and may add attribute information on the DOM node, where the attribute information includes resource paths of multiple resources of the HTML module, such as an address or a port of the storage resource on the server; further, the HTML module may be defined on the DOM node. Other information such as name.
  • attribute information can be added to the DOM node defined for the HTML module 2
  • the attribute information includes the HTML file, the JS file, the CSS file, and the JSON of the HTML module 2.
  • the resource path where the data is stored on the server side.
  • Step 303 Traverse the DOM node of each HTML module of the HTML module.
  • each HTML page contains a plurality of HTML modules, at which point the client device begins to traverse the DOM nodes of each HTML module, performing the same operations for each DOM node client device traversed. Therefore, for the convenience of description, the HTML module currently traversed is referred to as the target HTML module, and the DOM section of the target HTML module is referred to. The point is called the target DOM node.
  • Step 304 When traversing to the target DOM node of the current target HTML module, the attribute information of the target DOM node is read, and the resource paths of the plurality of target resources of the target HTML module are obtained.
  • the attribute information of the DOM node defined in step 302 can be read, and the HTML file of the HTML module 2 and the JS are obtained. Resource paths for files, CSS files, and JSON data.
  • Step 305 Send a resource request for acquiring the target resource to the server in parallel by calling JavaScript according to the resource path of each target resource.
  • a high-level scripting language that can be directly interpreted by a browser can be utilized.
  • the advanced scripting language can be JavaScript
  • the JavaScript is an object- and event-driven and relatively secure.
  • Client scripting language can be JavaScript
  • the client device may concurrently send the resource request of the HTML file and the resource of the JS file according to the resource path. Requests, resource requests for CSS files, and resource requests for JSON data.
  • Step 306 Set a request status for each resource request, and the request status is used to mark whether the corresponding target resource has been acquired.
  • a request status may be set for each resource request, and the request status is used to mark whether the corresponding target resource has been obtained, for example, when If a target resource is not obtained, the request status of the target resource is “waiting”. When a target resource has been acquired, the request status of the target resource is “completed”.
  • Step 307 When it is determined that all the target resources are acquired according to the set request status, the target HTML modules are synthesized after sequentially loading the target resources according to the dependency relationship between the target resources.
  • the resource request of the set HTML file when the resource request of the set HTML file, the resource request of the JS file, the resource request of the CSS file, and the resource request of the JSON data The status is "completed", and it can be determined that all resources of the HTML module 2 are obtained.
  • the process of loading the HTML module 2 according to the dependency relationship between the resources is consistent with the prior art, and may include: first loading the HTML document frame of the HTML module 2 according to the HTML file, and then modifying the HEML document frame through the JS file. Finally, the HTML document framework is further modified by the CSS file and the JSON data, thereby rendering the HTML page portion corresponding to the target HTML module.
  • Step 308 Add the target HTML module to the target DOM node to complete rendering of the target HTML module.
  • Step 309 Determine whether the DOM node of all the HTML modules is traversed. If yes, execute step 310; otherwise, return to step 303.
  • Step 310 Determine to complete the rendering of the HTML page and end the current process.
  • the complete HTML page can be loaded on the browser.
  • the present application also provides an embodiment of a page rendering device and a client device.
  • Embodiments of the present page rendering apparatus can be applied to various client devices on which a browser is installed, for example, the client device can include a mobile phone, a tablet, a PC, and the like.
  • the device embodiment may be implemented by software, or may be implemented by hardware or a combination of hardware and software. Taking the software implementation as an example, as a logical device, the processor of the client device in which it is located reads the corresponding computer program instructions in the non-volatile memory into the memory.
  • FIG. 4 a hardware structure diagram of the client device where the page rendering device is located, except for the processor, memory, network interface, and non-volatile storage shown in FIG.
  • the client device where the device is located in the embodiment may also include other hardware according to the actual function of the device, which is not shown in FIG. 4 .
  • FIG. 5 it is a block diagram of an embodiment of a page rendering apparatus of the present application:
  • the apparatus includes a traversal unit 510, a request unit 520, and a rendering unit 530.
  • the traversing unit 510 is configured to traverse the file object model DOM node of each HTML module of the HTML page when accessing the HTML page through the browser;
  • the requesting unit 520 is configured to, when traversing to the target DOM node of the current target HTML module, request the plurality of target resources of the target HTML module in parallel according to the attribute information defined in the target DOM node;
  • the rendering unit 530 is configured to render the target HTML module according to the relationship between the multiple target resources.
  • FIG. 6 a block diagram of another embodiment of the page rendering apparatus of the present application is as follows:
  • the apparatus includes a dividing unit 610, a defining unit 620, a traversing unit 630, a requesting unit 640, a rendering unit 650, and a judging unit 660 and a determining unit 670.
  • the dividing unit 610 is configured to divide the HTML page into multiple HTML modules.
  • the defining unit 620 is configured to define attribute information of a DOM node of each HTML module by using a WEB native layout, where the DOM node is used to mark an area of the HTML module in the HTML page, where the attribute information includes multiple HTML modules.
  • the traversing unit 630 is configured to traverse the file object model DOM node of each HTML module of the HTML page when accessing the HTML page through the browser;
  • the requesting unit 640 is configured to, when traversing to the target DOM node of the current target HTML module, request the plurality of target resources of the target HTML module in parallel according to the attribute information defined in the target DOM node;
  • a rendering unit 650 configured to render the target HTML module according to a relationship between the plurality of target resources
  • the determining unit 660 is configured to determine whether the DOM node of all the HTML modules is traversed
  • the determining unit 670 is configured to: if the DOM node of all the HTML modules is traversed, the determination is completed. Rendering of the HTML page.
  • the request unit 640 can include (not shown in FIG. 6):
  • An information reading subunit configured to read attribute information of the target DOM node, and obtain a resource path of multiple target resources of the target HTML module;
  • the request sending subunit is configured to send, according to the resource path of each target resource, a resource request for acquiring the target resource to the server in parallel by calling JavaScript.
  • the rendering unit 650 can include (not shown in FIG. 6):
  • a status setting subunit configured to set a request status for each resource request, where the request status is used to mark whether a corresponding target resource has been acquired
  • a module synthesizing subunit configured to: when the target resources are acquired according to the set request status, sequentially load the target resource according to the dependency relationship between the target resources, and synthesize the target HTML module;
  • a module adding unit configured to add the HTML module to the target DOM node to complete rendering of the target HTML module.
  • each HTML module of the HTML page includes:
  • the device embodiment since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the present application. Those of ordinary skill in the art are not creative In the case of labor, it can be understood and implemented.

Abstract

A page rendering method, device and apparatus. The method is applied to a client device, and comprises: upon visiting an HTML page via a browser, traversing DOM nodes in each HTML module in the HTML page (101); when the traversal is at a target DOM node in a current target HTML module, requesting, in parallel and according to defined attribute information in the target DOM node, a server for multiple target resources of the target HTML module (102); and rendering the target HTML module according to a relationship between the target resources (103). In an embodiment, the speed of resource acquisition is increased by requesting, in parallel, all resources of an HTML module via predetermined attribute information of DOM nodes during rendering of each HTML module of an HTML page. In addition, after all resources are acquired, these resources can be automatically loaded, thereby reducing resource loading time, and improving the rendering speed of an HTML page as a whole.

Description

页面渲染方法、装置及设备Page rendering method, device and device 技术领域Technical field
本申请涉及网络通信技术领域,尤其涉及页面渲染方法、装置及设备。The present application relates to the field of network communication technologies, and in particular, to a page rendering method, apparatus, and device.
背景技术Background technique
页面渲染就是客户端浏览器将HTML(Hyper Text Markup Language,超文本标记语言)代码根据预定义规则显示在浏览器窗口中的过程。客户端浏览器在渲染HTML页面时,需要从服务器获取用于进行页面渲染的各种资源,通过加载获取到的资源从而实现HTML页面渲染。相关技术中,可以将HTML文档框架按照不同功能分为多个HTML模块,在渲染任一HTML模块对应的HTML页面部分时,客户端浏览器以串行方式依次向服务器请求每个HTML模块的不同类型的资源,并在请求完每类资源后,通过手动调用JavaScript对这些资源进行加载,从而完成HTML页面部分的渲染。Page rendering is the process by which the client browser displays HTML (Hyper Text Markup Language) code in a browser window according to predefined rules. When the client browser renders the HTML page, it needs to obtain various resources for rendering the page from the server, and implement the HTML page rendering by loading the acquired resources. In the related art, the HTML document framework can be divided into multiple HTML modules according to different functions. When rendering the HTML page portion corresponding to any HTML module, the client browser sequentially requests each server different HTML module in a serial manner. Type resources, and after requesting each type of resource, load these resources by manually calling JavaScript to complete the rendering of the HTML page part.
但是,上述页面渲染过程需要对每个HTML模块的资源进行串行请求,因此资源获取速度较慢,并且由于采用手动调用JavaScript方式完成资源的加载,因此增加了资源加载时间,以上均导致HTML页面渲染的整体速度较慢。However, the above page rendering process requires a serial request for each HTML module's resources, so the resource acquisition speed is slow, and since the resource is loaded by manually calling the JavaScript method, the resource loading time is increased, and the above results in the HTML page. The overall rendering speed is slower.
发明内容Summary of the invention
本申请提供页面渲染方法、装置及设备,以解决现有页面渲染的整体速度较慢的问题。The application provides a page rendering method, device and device to solve the problem that the overall speed of the existing page rendering is slow.
根据本申请实施例的第一方面,提供一种页面渲染方法,所述方法应用在客户端设备上,包括:According to a first aspect of the embodiments of the present application, a page rendering method is provided, where the method is applied to a client device, including:
当通过浏览器访问HTML页面时,遍历所述HTML页面的每个HTML模块的文件对象模型DOM节点;When accessing an HTML page through a browser, traversing a file object model DOM node of each HTML module of the HTML page;
在遍历到当前的目标HTML模块的目标DOM节点时,根据所述目标 DOM节点中定义的属性信息,向服务器并行请求所述目标HTML模块的多个目标资源;When traversing to the target DOM node of the current target HTML module, according to the target Attribute information defined in the DOM node, requesting, in parallel, a plurality of target resources of the target HTML module to the server;
根据所述多个目标资源之间的关系渲染所述目标HTML模块。Rendering the target HTML module according to a relationship between the plurality of target resources.
根据本申请实施例的第二方面,提供一种页面渲染装置,所述装置应用在客户端设备上,所述装置包括:According to a second aspect of the embodiments of the present application, there is provided a page rendering apparatus, the apparatus being applied to a client device, the apparatus comprising:
遍历单元,用于当通过浏览器访问HTML页面时,遍历所述HTML页面的每个HTML模块的文件对象模型DOM节点;a traversing unit for traversing a file object model DOM node of each HTML module of the HTML page when accessing the HTML page through the browser;
请求单元,用于在遍历到当前的目标HTML模块的目标DOM节点时,根据所述目标DOM节点中定义的属性信息,向服务器并行请求所述目标HTML模块的多个目标资源;a requesting unit, configured to, when traversing to a target DOM node of the current target HTML module, request a plurality of target resources of the target HTML module in parallel according to the attribute information defined in the target DOM node;
渲染单元,用于根据所述多个目标资源之间的关系渲染所述目标HTML模块。a rendering unit, configured to render the target HTML module according to a relationship between the plurality of target resources.
根据本申请实施例的第三方面,提供一种客户端设备,包括:According to a third aspect of the embodiments of the present application, a client device is provided, including:
处理器;用于存储所述处理器可执行指令的存储器;a processor; a memory for storing the processor executable instructions;
其中,所述处理器被配置为:Wherein the processor is configured to:
当通过浏览器访问HTML页面时,遍历所述HTML页面的每个HTML模块的文件对象模型DOM节点;When accessing an HTML page through a browser, traversing a file object model DOM node of each HTML module of the HTML page;
在遍历到当前的目标HTML模块的目标DOM节点时,根据所述目标DOM节点中定义的属性信息,向服务器并行请求所述目标HTML模块的多个目标资源;When traversing to the target DOM node of the current target HTML module, requesting, according to the attribute information defined in the target DOM node, multiple target resources of the target HTML module to the server in parallel;
根据所述多个目标资源之间的关系渲染所述目标HTML模块。Rendering the target HTML module according to a relationship between the plurality of target resources.
应用本申请实施例访问HTML页面时,当遍历到HTML页面的任一目标HTML模块的目标DOM节点时,可以根据目标DOM节点中定义的属性信息,向服务器并行请求该目标HTML模块的多个目标资源,并根据多个目标资源之间的关系渲染该目标HTML模块。由于本申请实施例在渲染每个HTML模块时,通过预先定义的DOM节点的属性信息并行请求该HTML模块的所有资源,因此资源获取速度较快,并且在获取到所有资源后可以自动 加载这些资源,因此节省了资源加载时间,从而从整体上提升了HTML页面的渲染速度。When the HTML page is accessed by using the embodiment of the present application, when traversing to the target DOM node of any target HTML module of the HTML page, the target of the target HTML module may be requested in parallel according to the attribute information defined in the target DOM node to the server. Resources and render the target HTML module based on the relationship between multiple target resources. Since the embodiment of the present application requests all the resources of the HTML module in parallel through the attribute information of the predefined DOM node when the HTML module is rendered, the resource acquisition speed is faster, and the automatic acquisition can automatically be performed after all the resources are acquired. Loading these resources saves resource load time, which improves the rendering speed of HTML pages as a whole.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。The above general description and the following detailed description are intended to be illustrative and not restrictive.
附图说明DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The drawings herein are incorporated in and constitute a part of the specification,
图1为本申请页面渲染方法的一个实施例流程图;1 is a flow chart of an embodiment of a page rendering method of the present application;
图2为应用本申请实施例进行页面渲染的一个场景示意图;2 is a schematic diagram of a scenario for performing page rendering by applying an embodiment of the present application;
图3为本申请页面渲染方法的另一个实施例流程图;3 is a flow chart of another embodiment of a page rendering method of the present application;
图4为本申请页面渲染装置所在客户端设备的一种硬件结构图;4 is a hardware structural diagram of a client device where a page rendering device of the present application is located;
图5为本申请页面渲染装置的一个实施例框图;FIG. 5 is a block diagram of an embodiment of a page rendering apparatus of the present application; FIG.
图6为本申请页面渲染装置的另一个实施例框图。6 is a block diagram of another embodiment of a page rendering apparatus of the present application.
具体实施方式detailed description
在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in the present application is for the purpose of describing particular embodiments, and is not intended to be limiting. The singular forms "a", "the" and "the" It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
应当理解,尽管在本申请可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used to describe various information in this application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, the first information may also be referred to as the second information without departing from the scope of the present application. Similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "when" or "in response to a determination."
参见图1,为本申请页面渲染方法的一个实施例流程图,该实施例可以 应用在客户端设备,包括如下步骤:Referring to FIG. 1 , which is a flowchart of an embodiment of a page rendering method of the present application, which may be Applied to the client device, including the following steps:
步骤101:当通过浏览器访问HTML页面时,遍历HTML页面的每个HTML模块的DOM节点。Step 101: When accessing the HTML page through the browser, traverse the DOM node of each HTML module of the HTML page.
本实施例中,当用户在客户端设备上启动浏览器,并要通过浏览器访问HTML页面时,可以先将该HTML页面划分为多个HTML模块,例如,可以将HTML页面按照不同功能划分为多个父HTML模块,进一步,对于任一父HTML模块,也可以将该父HTML模块划分为多个子HTML模块。其中,在划分HTML页面的HTML模块时,可以基于HTML页面的不同功能进行划分,例如,可以将HTML页面上的图片显示区域、视频显示区域和文本显示区域分别划分为不同的HTML模块,进一步,也可以将文本显示区域中的文本内容固定区域和文本内容变化区域划分为不同的HTML模块。In this embodiment, when the user launches the browser on the client device and accesses the HTML page through the browser, the HTML page may be first divided into multiple HTML modules. For example, the HTML page may be divided into different functions according to different functions. Multiple parent HTML modules. Further, for any parent HTML module, the parent HTML module can also be divided into multiple child HTML modules. The HTML module of the HTML page may be divided according to different functions of the HTML page. For example, the image display area, the video display area, and the text display area on the HTML page may be divided into different HTML modules, and further, It is also possible to divide the text content fixed area and the text content change area in the text display area into different HTML modules.
对于所划分的每个HTML模块,可以通过WEB原生布局定义该HTML模块的DOM节点,DOM节点用于标记对应的HTML模块在HTML页面中的区域,并且可以在DOM节点上添加属性信息,该属性信息中包含HTML模块的多个资源的资源路径,比如服务器上存储资源的地址或者端口等。For each HTML module that is divided, the DOM node of the HTML module can be defined by the WEB native layout, the DOM node is used to mark the area of the corresponding HTML module in the HTML page, and the attribute information can be added on the DOM node, the attribute The information includes the resource path of multiple resources of the HTML module, such as the address or port of the storage resource on the server.
基于对HTML页面的划分,每个HTML页面包含了多个HTML模块,此时客户端设备开始遍历每个HTML模块的DOM节点,对于遍历到的每个DOM节点客户端设备执行相同的操作。因此为了描述方便,将当前遍历到的HTML模块称为目标HTML模块,将该目标HTML模块的DOM节点称为目标DOM节点。Based on the division of the HTML pages, each HTML page contains a plurality of HTML modules, at which point the client device begins to traverse the DOM nodes of each HTML module, performing the same operations for each DOM node client device traversed. Therefore, for convenience of description, the currently traversed HTML module is referred to as a target HTML module, and the DOM node of the target HTML module is referred to as a target DOM node.
步骤102:在遍历到当前的目标HTML模块的目标DOM节点时,根据目标DOM节点中定义的属性信息,向服务器并行请求目标HTML模块的多个目标资源。Step 102: When traversing to the target DOM node of the current target HTML module, request multiple target resources of the target HTML module to the server in parallel according to the attribute information defined in the target DOM node.
本步骤中,在遍历到当前的目标HTML模块的目标DOM节点时,可以读取目标DOM节点的属性信息,获得该目标HTML模块的多个目标资源的资源路径,然后按照每个目标资源的资源路径,通过调用JavaScript向服务器并行发送用于获取这些目标资源的资源请求。其中资源可以包括:HTML 文件,CSS(Cascading Style Sheets,级联样式表)文件,JS(JavaScript)文件,JSON(JavaScript Object Notation,JS对象标记)数据等。In this step, when traversing to the target DOM node of the current target HTML module, the attribute information of the target DOM node may be read, the resource path of the plurality of target resources of the target HTML module is obtained, and then the resources of each target resource are obtained. The path sends a resource request for obtaining these target resources in parallel to the server by calling JavaScript. Resources can include: HTML Files, CSS (Cascading Style Sheets) files, JS (JavaScript) files, JSON (JavaScript Object Notation, JS Object Markup) data, etc.
步骤103:根据多个目标资源之间的关系渲染目标HTML模块。Step 103: Render the target HTML module according to the relationship between the multiple target resources.
在向服务器并行发送多个资源请求,以请求多个目标资源后,本步骤中可以为每个资源请求设置请求状态,该请求状态用于标记是否已获取到对应的目标资源。当根据设置的请求状态确定已经获取到所有的目标资源时,可以按照这些目标资源之间的依赖关系依次加载这些目标资源后,合成目标HTML模块,最后将合成后的HTML模块添加到其目标DOM节点中,从而完成该目标HTML模块的渲染。由此可知,当遍历完所有HTML模块的DOM节点,并完成对所有HTML模块的渲染后,即可完成对整个HTML页面的渲染。After the multiple resource requests are sent to the server in parallel to request multiple target resources, in this step, a request status may be set for each resource request, and the request status is used to mark whether the corresponding target resource has been acquired. When it is determined according to the set request status that all the target resources have been acquired, the target resources may be sequentially loaded according to the dependencies between the target resources, the target HTML module is synthesized, and finally the synthesized HTML module is added to the target DOM. In the node, thus completing the rendering of the target HTML module. It can be seen that when the DOM nodes of all the HTML modules are traversed and the rendering of all the HTML modules is completed, the rendering of the entire HTML page can be completed.
其中,在按照目标资源之间的依赖关系依次加载目标资源时的加载过程与现有技术中一致,例如,当目标资源包括HTML文件,CSS文件,JS文件,JSON数据时,则先根据HTML文件加载出HTML文档框架,然后通过JS文件修改该HEML文档框架,最后通过CSS文件和JSON数据对HTML文档框架进行进一步修改,从而渲染出目标HTML模块对应的HTML页面部分。The loading process when the target resources are sequentially loaded according to the dependency relationship between the target resources is consistent with the prior art. For example, when the target resource includes an HTML file, a CSS file, a JS file, and JSON data, the HTML file is firstly used according to the HTML file. The HTML document framework is loaded, and then the HEML document framework is modified by the JS file. Finally, the HTML document framework is further modified by the CSS file and the JSON data, thereby rendering the HTML page portion corresponding to the target HTML module.
由上述实施例可见,该实施例中在渲染每个HTML模块时,通过预先定义的DOM节点的属性信息并行请求该HTML模块的所有资源,因此资源获取速度较快,并且在获取到所有资源后可以自动加载这些资源,因此节省了资源加载时间,从而从整体上提升了HTML页面的渲染速度。It can be seen from the above embodiment that in the embodiment, when each HTML module is rendered, all the resources of the HTML module are requested in parallel through the attribute information of the predefined DOM node, so the resource acquisition speed is faster, and after all resources are acquired. These resources can be loaded automatically, thus saving resource load time and thus improving the rendering speed of the HTML page as a whole.
参见图2,为应用本申请实施例实现页面渲染的一个场景示意图,图2以渲染OPOA(One Page One Application,单页面应用)的HTML页面为例进行描述:2 is a schematic diagram of a scenario for implementing page rendering in the application of the embodiment of the present application. FIG. 2 is an example of rendering an HTML page of an OPOA (One Page One Application).
图2中包括了用于加载HTML页面的客户端设备侧,通常可以指配置了浏览器的手机、平板电脑、PC等;以及提供用于加载HTML页面的各种资源的服务器侧,该服务器侧可以部署分布式服务器,例如,CDN(Content  Delivery Network,内容分发网络)服务器。FIG. 2 includes a client device side for loading an HTML page, generally referred to as a mobile phone, a tablet, a PC, and the like configured with a browser; and a server side providing various resources for loading an HTML page, the server side You can deploy a distributed server, for example, CDN (Content Delivery Network, Content Distribution Network) server.
本实施例中,OPOA指一个WEB页面就是一个应用,OPOA首次加载时,所有HTML文档会传输到WEB浏览器,当用户访问OPOA中的一个独立HTML页面时,该HTML页面会在当前WEB页中加载。如图2中,假设一个OPOA包括n个HTML页面,则每个HTML页面的渲染过程均可以应用本申请实施例提供的方案实现。以图2中示出的HTML页面2为例,该HTML页面2划分为m个HTML模块,每个HTML模块的资源均存储在服务器侧,每个HTML模块的渲染过程均一致,以HTML模块2为例,在获取HTML模块2的资源时,客户端设备向服务器并行发送资源请求,并在获取到包括HTML文件、JS文件、CSS文件和JSON数据的所有资源后,利用这些资源之间的依赖关系渲染出去HTML模块2对应的HTML页面2的相应部分。下面将结合图2示出的场景示意图,通过图3示出的实施例对本申请页面渲染过程进行详细描述。In this embodiment, OPOA refers to a WEB page is an application. When the OPOA is first loaded, all HTML documents are transmitted to the WEB browser. When the user accesses a separate HTML page in the OPOA, the HTML page will be in the current WEB page. load. As shown in FIG. 2, assuming that an OPOA includes n HTML pages, the rendering process of each HTML page can be implemented by using the solution provided by the embodiment of the present application. Taking the HTML page 2 shown in FIG. 2 as an example, the HTML page 2 is divided into m HTML modules, and the resources of each HTML module are stored on the server side, and the rendering process of each HTML module is consistent to the HTML module 2 For example, when acquiring the resources of the HTML module 2, the client device sends the resource request to the server in parallel, and after obtaining all the resources including the HTML file, the JS file, the CSS file, and the JSON data, the dependence between the resources is utilized. The relationship is rendered out of the corresponding portion of the HTML page 2 corresponding to the HTML module 2. The page rendering process of the present application will be described in detail below through the embodiment shown in FIG. 3 in conjunction with the scenario diagram shown in FIG. 2.
参见图3,为本申请页面渲染方法的另一个实施例流程图,该实施例可以应用在客户端设备,包括以下步骤:Referring to FIG. 3, it is a flowchart of another embodiment of a page rendering method of the present application. The embodiment may be applied to a client device, including the following steps:
步骤301:当通过浏览器访问HTML页面时,将该HTML页面划分为多个HTML模块。Step 301: When the HTML page is accessed through the browser, the HTML page is divided into a plurality of HTML modules.
本申请实施例中,当用户在客户端设备上启动浏览器,并要通过浏览器访问HTML页面时,可以先将该HTML页面划分为多个HTML模块,例如,可以将HTML页面按照不同功能划分为多个父HTML模块,进一步,对于任一父HTML模块,也可以将该父HTML模块划分为多个子HTML模块。结合图2所示,HTML页面2被划分为m个HTML模块,这m个HTML模块可以包括父HTML模块,和/或子HTML模块。In the embodiment of the present application, when the user starts the browser on the client device and accesses the HTML page through the browser, the HTML page may be first divided into multiple HTML modules. For example, the HTML page may be divided into different functions according to different functions. For multiple parent HTML modules, further, for any parent HTML module, the parent HTML module can also be divided into multiple child HTML modules. As shown in FIG. 2, the HTML page 2 is divided into m HTML modules, which may include a parent HTML module, and/or a sub-HTML module.
本实施例中,在划分HTML页面的HTML模块时,可以基于HTML页面的不同功能进行划分,例如,可以将HTML页面上的图片显示区域、视频显示区域和文本显示区域分别划分为不同的HTML模块,进一步,也可以将文本显示区域中的文本内容固定区域和文本内容变化区域划分为不同的 HTML模块;另外,对于图2中示出的OPOA,不同HTML页面可能包含部分相同的页面内容,例如,在渲染HTML页面1时,将HTML页面1划分为了若干HTML模块,如果将HTML页面2所划分的某个HTML模块与HTML页面1中所划分的某个HTML模块的页面内容相同,则在渲染HTML页面2时,可以仅渲染除该HTML模块外的其他HTML模块,从而可以进一步节约HTML页面2的渲染时间和渲染资源,对此本申请实施例不进行限制。In this embodiment, when the HTML module of the HTML page is divided, the HTML page may be divided according to different functions of the HTML page. For example, the image display area, the video display area, and the text display area on the HTML page may be divided into different HTML modules. Further, the text content fixed area and the text content change area in the text display area may be divided into different HTML module; additionally, for the OPOA shown in FIG. 2, different HTML pages may contain partially identical page content, for example, when rendering HTML page 1, divide HTML page 1 into several HTML modules, if HTML page 2 is The divided HTML module is the same as the page content of an HTML module divided in the HTML page 1. When the HTML page 2 is rendered, only the HTML module except the HTML module can be rendered, thereby further saving the HTML page. The rendering time and rendering resources of 2 are not limited in this embodiment of the present application.
步骤302:通过WEB原生布局定义每个HTML模块的DOM节点的属性信息。Step 302: Define attribute information of the DOM node of each HTML module through the WEB native layout.
原生(Native)开发一般是指用原生开发语言开发,原生开发语言就是开发整个系统时使用的编程语言;DOM是一种以面向对象方式描述的文档模型,也是页面上数据和结构的树形表示方式,DOM定义了表示和修改文档所需要的对象、对象的行为和属性、以及对象之间的关系。Native development generally refers to the development of a native development language. The native development language is the programming language used to develop the entire system. DOM is a document model described in an object-oriented manner, and is also a tree representation of the data and structure on the page. In this way, the DOM defines the objects needed to represent and modify the document, the behavior and properties of the object, and the relationships between the objects.
本实施例中,在将HTML页面划分为多个HTML模块后,对于每个HTML模块,可以通过WEB原生布局定义该HTML模块的DOM节点,DOM节点用于标记对应的HTML模块在HTML页面中的区域,并且可以在DOM节点上添加属性信息,该属性信息中包含HTML模块的多个资源的资源路径,比如服务器上存储资源的地址或者端口等;进一步,还可以在DOM节点上定义HTML模块的名称等其他信息。结合图2可知,对于HTML页面2的HTML模块2,可以在为该HTML模块2定义的DOM节点中添加属性信息,该属性信息中包括了HTML模块2的HTML文件、JS文件、CSS文件和JSON数据在服务器侧存储的资源路径。In this embodiment, after the HTML page is divided into multiple HTML modules, for each HTML module, the DOM node of the HTML module may be defined by the WEB native layout, and the DOM node is used to mark the corresponding HTML module in the HTML page. An area, and may add attribute information on the DOM node, where the attribute information includes resource paths of multiple resources of the HTML module, such as an address or a port of the storage resource on the server; further, the HTML module may be defined on the DOM node. Other information such as name. As can be seen from FIG. 2, for the HTML module 2 of the HTML page 2, attribute information can be added to the DOM node defined for the HTML module 2, and the attribute information includes the HTML file, the JS file, the CSS file, and the JSON of the HTML module 2. The resource path where the data is stored on the server side.
步骤303:遍历HTML模块的每个HTML模块的DOM节点。Step 303: Traverse the DOM node of each HTML module of the HTML module.
基于对HTML页面的划分,每个HTML页面包含了多个HTML模块,此时客户端设备开始遍历每个HTML模块的DOM节点,对于遍历到的每个DOM节点客户端设备执行相同的操作。因此为了描述方便,后续将当前遍历到的HTML模块称为目标HTML模块,将该目标HTML模块的DOM节 点称为目标DOM节点。Based on the division of the HTML pages, each HTML page contains a plurality of HTML modules, at which point the client device begins to traverse the DOM nodes of each HTML module, performing the same operations for each DOM node client device traversed. Therefore, for the convenience of description, the HTML module currently traversed is referred to as the target HTML module, and the DOM section of the target HTML module is referred to. The point is called the target DOM node.
步骤304:在遍历到当前的目标HTML模块的目标DOM节点时,读取目标DOM节点的属性信息,获得目标HTML模块的多个目标资源的资源路径。Step 304: When traversing to the target DOM node of the current target HTML module, the attribute information of the target DOM node is read, and the resource paths of the plurality of target resources of the target HTML module are obtained.
以图2中的HTML模块2为目标HTML模块为例,假设当前遍历到HTML模块2的DOM节点,则可以读取步骤302中定义的DOM节点的属性信息,获取HTML模块2的HTML文件、JS文件、CSS文件和JSON数据的资源路径。Taking the HTML module 2 in FIG. 2 as an example of the HTML module, assuming that the DOM node of the HTML module 2 is currently traversed, the attribute information of the DOM node defined in step 302 can be read, and the HTML file of the HTML module 2 and the JS are obtained. Resource paths for files, CSS files, and JSON data.
步骤305:按照每个目标资源的资源路径,通过调用JavaScript向服务器并行发送用于获取目标资源的资源请求。Step 305: Send a resource request for acquiring the target resource to the server in parallel by calling JavaScript according to the resource path of each target resource.
本实施例中可以利用能够由浏览器直接解释运行的高级脚本语言,在浏览器中渲染HTML页面时,例如,高级脚本语言可以是JavaScript,JavaScript是一种基于对象和事件驱动并具有相对安全性的客户端脚本语言。In this embodiment, a high-level scripting language that can be directly interpreted by a browser can be utilized. When an HTML page is rendered in a browser, for example, the advanced scripting language can be JavaScript, and the JavaScript is an object- and event-driven and relatively secure. Client scripting language.
结合步骤304中的描述,在获取到HTML模块2的HTML文件、JS文件、CSS文件和JSON数据的资源路径后,客户端设备可以按照上述资源路径并行发送HTML文件的资源请求、JS文件的资源请求、CSS文件的资源请求、以及JSON数据的资源请求。After the resource path of the HTML file, the JS file, the CSS file, and the JSON data of the HTML module 2 is obtained, the client device may concurrently send the resource request of the HTML file and the resource of the JS file according to the resource path. Requests, resource requests for CSS files, and resource requests for JSON data.
步骤306:为每个资源请求设置请求状态,该请求状态用于标记是否已获取到对应的目标资源。Step 306: Set a request status for each resource request, and the request status is used to mark whether the corresponding target resource has been acquired.
在向服务器并行发送多个资源请求,以请求多个目标资源后,本步骤中可以为每个资源请求设置请求状态,该请求状态用于标记是否已获取到对应的目标资源,例如,当还未获取到某个目标资源,则该目标资源的请求状态为“等待”,当已获取到某个目标资源,则该目标资源的请求状态为“完成”。After sending multiple resource requests to the server in parallel to request multiple target resources, in this step, a request status may be set for each resource request, and the request status is used to mark whether the corresponding target resource has been obtained, for example, when If a target resource is not obtained, the request status of the target resource is “waiting”. When a target resource has been acquired, the request status of the target resource is “completed”.
步骤307:当根据设置的请求状态确定获取到所有目标资源时,按照目标资源之间的依赖关系依次加载目标资源后,合成目标HTML模块。Step 307: When it is determined that all the target resources are acquired according to the set request status, the target HTML modules are synthesized after sequentially loading the target resources according to the dependency relationship between the target resources.
仍然以图2中的HTML模块2为例,当所设置的HTML文件的资源请求、JS文件的资源请求、CSS文件的资源请求、以及JSON数据的资源请求 的状态均为“完成时”,可以确定获取到HTML模块2的所有资源。Still taking the HTML module 2 in FIG. 2 as an example, when the resource request of the set HTML file, the resource request of the JS file, the resource request of the CSS file, and the resource request of the JSON data The status is "completed", and it can be determined that all resources of the HTML module 2 are obtained.
本步骤中,按照资源之间的依赖关系加载HTML模块2的过程与现有技术中一致,可以包括:先根据HTML文件加载出HTML模块2的HTML文档框架,然后通过JS文件修改该HEML文档框架,最后通过CSS文件和JSON数据对HTML文档框架进行进一步修改,从而渲染出目标HTML模块对应的HTML页面部分。In this step, the process of loading the HTML module 2 according to the dependency relationship between the resources is consistent with the prior art, and may include: first loading the HTML document frame of the HTML module 2 according to the HTML file, and then modifying the HEML document frame through the JS file. Finally, the HTML document framework is further modified by the CSS file and the JSON data, thereby rendering the HTML page portion corresponding to the target HTML module.
步骤308:将目标HTML模块添加到目标DOM节点中,完成目标HTML模块的渲染。Step 308: Add the target HTML module to the target DOM node to complete rendering of the target HTML module.
步骤309:判断是否遍历完所有HTML模块的DOM节点,若是,则执行步骤310;否则,返回步骤303。Step 309: Determine whether the DOM node of all the HTML modules is traversed. If yes, execute step 310; otherwise, return to step 303.
步骤310:确定完成HTML页面的渲染,结束当前流程。Step 310: Determine to complete the rendering of the HTML page and end the current process.
在通过循环执行前述步骤303至步骤309,遍历完所有HTML模块的DOM节点,并完成了所有HTML模块的渲染后,即可在浏览器上加载出完整的HTML页面。After performing the foregoing steps 303 to 309 through the loop, after traversing the DOM nodes of all the HTML modules and completing the rendering of all the HTML modules, the complete HTML page can be loaded on the browser.
由上述实施例可见,该实施例中在渲染每个HTML模块时,通过预先定义的DOM节点的属性信息并行请求该HTML模块的所有资源,因此资源获取速度较快,并且在获取到所有资源后可以自动加载这些资源,因此节省了资源加载时间,从而从整体上提升了HTML页面的渲染速度。It can be seen from the above embodiment that in the embodiment, when each HTML module is rendered, all the resources of the HTML module are requested in parallel through the attribute information of the predefined DOM node, so the resource acquisition speed is faster, and after all resources are acquired. These resources can be loaded automatically, thus saving resource load time and thus improving the rendering speed of the HTML page as a whole.
与本申请页面渲染方法的实施例相对应,本申请还提供了页面渲染装置及客户端设备的实施例。Corresponding to the embodiment of the present page rendering method, the present application also provides an embodiment of a page rendering device and a client device.
本申请页面渲染装置的实施例可以应用在安装有浏览器的各种客户端设备上,例如,该客户端设备可以包括手机、平板电脑、PC等。其中,装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在客户端设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图4所示,为本申请页面渲染装置所在客户端设备的一种硬件结构图,除了图4所示的处理器、内存、网络接口、以及非易失性存储 器之外,实施例中装置所在的客户端设备通常根据该设备的实际功能,还可以包括其他硬件,图4中不再一一示出。Embodiments of the present page rendering apparatus can be applied to various client devices on which a browser is installed, for example, the client device can include a mobile phone, a tablet, a PC, and the like. The device embodiment may be implemented by software, or may be implemented by hardware or a combination of hardware and software. Taking the software implementation as an example, as a logical device, the processor of the client device in which it is located reads the corresponding computer program instructions in the non-volatile memory into the memory. At the hardware level, as shown in FIG. 4, a hardware structure diagram of the client device where the page rendering device is located, except for the processor, memory, network interface, and non-volatile storage shown in FIG. In addition to the device, the client device where the device is located in the embodiment may also include other hardware according to the actual function of the device, which is not shown in FIG. 4 .
参见图5,为本申请页面渲染装置的一个实施例框图:Referring to FIG. 5, it is a block diagram of an embodiment of a page rendering apparatus of the present application:
该装置包括:遍历单元510、请求单元520和渲染单元530。The apparatus includes a traversal unit 510, a request unit 520, and a rendering unit 530.
其中,遍历单元510,用于当通过浏览器访问HTML页面时,遍历所述HTML页面的每个HTML模块的文件对象模型DOM节点;The traversing unit 510 is configured to traverse the file object model DOM node of each HTML module of the HTML page when accessing the HTML page through the browser;
请求单元520,用于在遍历到当前的目标HTML模块的目标DOM节点时,根据所述目标DOM节点中定义的属性信息,向服务器并行请求所述目标HTML模块的多个目标资源;The requesting unit 520 is configured to, when traversing to the target DOM node of the current target HTML module, request the plurality of target resources of the target HTML module in parallel according to the attribute information defined in the target DOM node;
渲染单元530,用于根据所述多个目标资源之间的关系渲染所述目标HTML模块。The rendering unit 530 is configured to render the target HTML module according to the relationship between the multiple target resources.
参见图6,为本申请页面渲染装置的另一个实施例框图:Referring to FIG. 6, a block diagram of another embodiment of the page rendering apparatus of the present application is as follows:
该装置包括:划分单元610、定义单元620、遍历单元630、请求单元640、渲染单元650和判断单元660和确定单元670。The apparatus includes a dividing unit 610, a defining unit 620, a traversing unit 630, a requesting unit 640, a rendering unit 650, and a judging unit 660 and a determining unit 670.
其中,划分单元610,用于将所述HTML页面划分为多个HTML模块;The dividing unit 610 is configured to divide the HTML page into multiple HTML modules.
定义单元620,用于通过WEB原生布局定义每个HTML模块的DOM节点的属性信息,所述DOM节点用于标记HTML模块在所述HTML页面中的区域,所述属性信息中包含HTML模块的多个资源的资源路径;The defining unit 620 is configured to define attribute information of a DOM node of each HTML module by using a WEB native layout, where the DOM node is used to mark an area of the HTML module in the HTML page, where the attribute information includes multiple HTML modules. Resource path of resources;
遍历单元630,用于当通过浏览器访问HTML页面时,遍历所述HTML页面的每个HTML模块的文件对象模型DOM节点;The traversing unit 630 is configured to traverse the file object model DOM node of each HTML module of the HTML page when accessing the HTML page through the browser;
请求单元640,用于在遍历到当前的目标HTML模块的目标DOM节点时,根据所述目标DOM节点中定义的属性信息,向服务器并行请求所述目标HTML模块的多个目标资源;The requesting unit 640 is configured to, when traversing to the target DOM node of the current target HTML module, request the plurality of target resources of the target HTML module in parallel according to the attribute information defined in the target DOM node;
渲染单元650,用于根据所述多个目标资源之间的关系渲染所述目标HTML模块;a rendering unit 650, configured to render the target HTML module according to a relationship between the plurality of target resources;
判断单元660,用于判断是否遍历完所有HTML模块的DOM节点;The determining unit 660 is configured to determine whether the DOM node of all the HTML modules is traversed;
确定单元670,用于若遍历完所有HTML模块的DOM节点,则确定完 成所述HTML页面的渲染。The determining unit 670 is configured to: if the DOM node of all the HTML modules is traversed, the determination is completed. Rendering of the HTML page.
在一个可选的实现方式中,所述请求单元640可以包括(图6中未示出):In an optional implementation, the request unit 640 can include (not shown in FIG. 6):
信息读取子单元,用于读取所述目标DOM节点的属性信息,获得所述目标HTML模块的多个目标资源的资源路径;An information reading subunit, configured to read attribute information of the target DOM node, and obtain a resource path of multiple target resources of the target HTML module;
请求发送子单元,用于按照每个目标资源的资源路径,通过调用JavaScript向服务器并行发送用于获取所述目标资源的资源请求。The request sending subunit is configured to send, according to the resource path of each target resource, a resource request for acquiring the target resource to the server in parallel by calling JavaScript.
在另一个可选的实现方式中,所述渲染单元650可以包括(图6中未示出):In another optional implementation, the rendering unit 650 can include (not shown in FIG. 6):
状态设置子单元,用于为每个资源请求设置请求状态,所述请求状态用于标记是否已获取到对应的目标资源;a status setting subunit, configured to set a request status for each resource request, where the request status is used to mark whether a corresponding target resource has been acquired;
模块合成子单元,用于当根据设置的请求状态确定获取到所有目标资源时,按照所述目标资源之间的依赖关系依次加载所述目标资源后,合成所述目标HTML模块;a module synthesizing subunit, configured to: when the target resources are acquired according to the set request status, sequentially load the target resource according to the dependency relationship between the target resources, and synthesize the target HTML module;
模块添加单元,用于将所述HTML模块添加到所述目标DOM节点中,完成所述目标HTML模块的渲染。And a module adding unit, configured to add the HTML module to the target DOM node to complete rendering of the target HTML module.
在另一个可选的实现方式中,所述HTML页面的每个HTML模块,包括:In another optional implementation, each HTML module of the HTML page includes:
对所述HTML页面划分得到的多个父HTML模块;和/或,a plurality of parent HTML modules divided by the HTML page; and/or,
对任一父HTML模块划分得到的多个子HTML模块。Multiple sub-HTML modules that are partitioned into any parent HTML module.
上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。The implementation process of the function and the function of each unit in the foregoing device is specifically described in the implementation process of the corresponding steps in the foregoing method, and details are not described herein again.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请方案的目的。本领域普通技术人员在不付出创造性 劳动的情况下,即可以理解并实施。For the device embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the present application. Those of ordinary skill in the art are not creative In the case of labor, it can be understood and implemented.
由上述实施例可见,在应用本申请实施例渲染每个HTML模块时,通过预先定义的DOM节点的属性信息并行请求该HTML模块的所有资源,因此资源获取速度较快,并且在获取到所有资源后可以自动加载这些资源,因此节省了资源加载时间,从而从整体上提升了HTML页面的渲染速度。It can be seen from the above embodiment that when each HTML module is rendered by applying the embodiment of the present application, all the resources of the HTML module are requested in parallel through the attribute information of the predefined DOM node, so the resource acquisition speed is faster, and all resources are acquired. These resources can be loaded automatically later, thus saving resource load time and thus improving the rendering speed of the HTML page as a whole.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。Other embodiments of the present application will be readily apparent to those skilled in the <RTIgt; The application is intended to cover any variations, uses, or adaptations of the application, which are in accordance with the general principles of the application and include common general knowledge or common technical means in the art that are not disclosed herein. . The specification and examples are to be regarded as illustrative only,
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。 It is to be understood that the invention is not limited to the details of the details and The scope of the present application is limited only by the accompanying claims.

Claims (14)

  1. 一种页面渲染方法,其特征在于,所述方法应用在客户端设备上,包括:A page rendering method, wherein the method is applied to a client device, including:
    当通过浏览器访问超文本标记语言HTML页面时,遍历所述HTML页面的每个HTML模块的文件对象模型DOM节点;When accessing the hypertext markup language HTML page through the browser, traversing the file object model DOM node of each HTML module of the HTML page;
    在遍历到当前的目标HTML模块的目标DOM节点时,根据所述目标DOM节点中定义的属性信息,向服务器并行请求所述目标HTML模块的多个目标资源;When traversing to the target DOM node of the current target HTML module, requesting, according to the attribute information defined in the target DOM node, multiple target resources of the target HTML module to the server in parallel;
    根据所述多个目标资源之间的关系渲染所述目标HTML模块。Rendering the target HTML module according to a relationship between the plurality of target resources.
  2. 根据权利要求1所述的方法,其特征在于,所述遍历所述HTML页面的每个HTML模块的DOM节点之前,所述方法还包括:The method according to claim 1, wherein before the traversing the DOM node of each HTML module of the HTML page, the method further comprises:
    将所述HTML页面划分为多个HTML模块;Dividing the HTML page into a plurality of HTML modules;
    通过WEB原生布局定义每个HTML模块的DOM节点的属性信息,所述DOM节点用于标记HTML模块在所述HTML页面中的区域,所述属性信息中包含HTML模块的多个资源的资源路径。The attribute information of the DOM node of each HTML module is defined by a WEB native layout, and the DOM node is used to mark an area of the HTML module in the HTML page, where the attribute information includes a resource path of a plurality of resources of the HTML module.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述目标DOM节点中定义的属性信息,向服务器并行请求所述目标HTML模块的多个目标资源,包括:The method according to claim 2, wherein the requesting, in the target DOM node, the plurality of target resources of the target HTML module in parallel according to the attribute information defined in the target DOM node comprises:
    读取所述目标DOM节点的属性信息,获得所述目标HTML模块的多个目标资源的资源路径;Reading attribute information of the target DOM node to obtain resource paths of multiple target resources of the target HTML module;
    按照每个目标资源的资源路径,通过调用JavaScript向服务器并行发送用于获取所述目标资源的资源请求。According to the resource path of each target resource, a resource request for acquiring the target resource is sent in parallel to the server by calling JavaScript.
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述多个目标资源之间的关系渲染所述目标HTML模块,包括:The method according to claim 3, wherein the rendering the target HTML module according to the relationship between the plurality of target resources comprises:
    为每个资源请求设置请求状态,所述请求状态用于标记是否已获取到对应的目标资源; Setting a request status for each resource request, the request status is used to mark whether a corresponding target resource has been acquired;
    当根据设置的请求状态确定获取到所有目标资源时,按照所述目标资源之间的依赖关系依次加载所述目标资源后,合成所述目标HTML模块;When it is determined that all the target resources are acquired according to the set request status, the target HTML modules are synthesized after sequentially loading the target resources according to the dependency relationship between the target resources;
    将所述目标HTML模块添加到所述目标DOM节点中,完成所述目标HTML模块的渲染。Adding the target HTML module to the target DOM node to complete rendering of the target HTML module.
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    判断是否遍历完所有HTML模块的DOM节点;Determine whether to traverse the DOM nodes of all HTML modules;
    若遍历完所有HTML模块的DOM节点,则确定完成所述HTML页面的渲染。If the DOM nodes of all HTML modules are traversed, it is determined that the rendering of the HTML page is completed.
  6. 根据权利要求1至5任一所述的方法,其特征在于,所述HTML页面的每个HTML模块,包括:The method according to any one of claims 1 to 5, wherein each HTML module of the HTML page comprises:
    对所述HTML页面划分得到的多个父HTML模块;和/或,a plurality of parent HTML modules divided by the HTML page; and/or,
    对任一父HTML模块划分得到的多个子HTML模块。Multiple sub-HTML modules that are partitioned into any parent HTML module.
  7. 根据权利要求1至5任一所述的方法,其特征在于,HTML模块的资源包括:HTML文件,级联样式表CSS文件,JS文件,对象标记JSON数据。The method according to any one of claims 1 to 5, wherein the resources of the HTML module comprise: an HTML file, a cascading style sheet CSS file, a JS file, and an object tag JSON data.
  8. 一种页面渲染装置,其特征在于,所述装置应用在客户端设备上,所述装置包括:A page rendering apparatus, wherein the apparatus is applied to a client device, the apparatus comprising:
    遍历单元,用于当通过浏览器访问HTML页面时,遍历所述HTML页面的每个HTML模块的文件对象模型DOM节点;a traversing unit for traversing a file object model DOM node of each HTML module of the HTML page when accessing the HTML page through the browser;
    请求单元,用于在遍历到当前的目标HTML模块的目标DOM节点时,根据所述目标DOM节点中定义的属性信息,向服务器并行请求所述目标HTML模块的多个目标资源;a requesting unit, configured to, when traversing to a target DOM node of the current target HTML module, request a plurality of target resources of the target HTML module in parallel according to the attribute information defined in the target DOM node;
    渲染单元,用于根据所述多个目标资源之间的关系渲染所述目标HTML模块。a rendering unit, configured to render the target HTML module according to a relationship between the plurality of target resources.
  9. 根据权利要求8所述的装置,其特征在于,所述装置还包括:The device according to claim 8, wherein the device further comprises:
    划分单元,用于将所述HTML页面划分为多个HTML模块;a dividing unit, configured to divide the HTML page into multiple HTML modules;
    定义单元,用于通过WEB原生布局定义每个HTML模块的DOM节点 的属性信息,所述DOM节点用于标记HTML模块在所述HTML页面中的区域,所述属性信息中包含HTML模块的多个资源的资源路径。Define a unit for defining the DOM node of each HTML module through the WEB native layout Attribute information, the DOM node is used to mark an area of the HTML module in the HTML page, and the attribute information includes resource paths of multiple resources of the HTML module.
  10. 根据权利要求9所述的装置,其特征在于,所述请求单元,包括:The device according to claim 9, wherein the requesting unit comprises:
    信息读取子单元,用于读取所述目标DOM节点的属性信息,获得所述目标HTML模块的多个目标资源的资源路径;An information reading subunit, configured to read attribute information of the target DOM node, and obtain a resource path of multiple target resources of the target HTML module;
    请求发送子单元,用于按照每个目标资源的资源路径,通过调用JavaScript向服务器并行发送用于获取所述目标资源的资源请求。The request sending subunit is configured to send, according to the resource path of each target resource, a resource request for acquiring the target resource to the server in parallel by calling JavaScript.
  11. 根据权利要求10所述的装置,其特征在于,所述渲染单元,包括:The apparatus according to claim 10, wherein the rendering unit comprises:
    状态设置子单元,用于为每个资源请求设置请求状态,所述请求状态用于标记是否已获取到对应的目标资源;a status setting subunit, configured to set a request status for each resource request, where the request status is used to mark whether a corresponding target resource has been acquired;
    模块合成子单元,用于当根据设置的请求状态确定获取到所有目标资源时,按照所述目标资源之间的依赖关系依次加载所述目标资源后,合成所述目标HTML模块;a module synthesizing subunit, configured to: when the target resources are acquired according to the set request status, sequentially load the target resource according to the dependency relationship between the target resources, and synthesize the target HTML module;
    模块添加单元,用于将所述目标HTML模块添加到所述目标DOM节点中,完成所述目标HTML模块的渲染。a module adding unit, configured to add the target HTML module to the target DOM node to complete rendering of the target HTML module.
  12. 根据权利要求8所述的装置,其特征在于,所述装置还包括:The device according to claim 8, wherein the device further comprises:
    判断单元,用于判断是否遍历完所有HTML模块的DOM节点;a determining unit, configured to determine whether to traverse the DOM node of all HTML modules;
    确定单元,用于若遍历完所有HTML模块的DOM节点,则确定完成所述HTML页面的渲染。A determining unit is configured to complete rendering of the HTML page if the DOM node of all HTML modules is traversed.
  13. 根据权利要求8至12任一所述的装置,其特征在于,所述HTML页面的每个HTML模块,包括:The device according to any one of claims 8 to 12, wherein each HTML module of the HTML page comprises:
    对所述HTML页面划分得到的多个父HTML模块;和/或,a plurality of parent HTML modules divided by the HTML page; and/or,
    对任一父HTML模块划分得到的多个子HTML模块。Multiple sub-HTML modules that are partitioned into any parent HTML module.
  14. 一种客户端设备,其特征在于,包括:A client device, comprising:
    处理器;用于存储所述处理器可执行指令的存储器;a processor; a memory for storing the processor executable instructions;
    其中,所述处理器被配置为:Wherein the processor is configured to:
    当通过浏览器访问HTML页面时,遍历所述HTML页面的每个HTML 模块的文件对象模型DOM节点;Traversing each HTML of the HTML page when accessing the HTML page through a browser The file object model DOM node of the module;
    在遍历到当前的目标HTML模块的目标DOM节点时,根据所述目标DOM节点中定义的属性信息,向服务器并行请求所述目标HTML模块的多个目标资源;When traversing to the target DOM node of the current target HTML module, requesting, according to the attribute information defined in the target DOM node, multiple target resources of the target HTML module to the server in parallel;
    根据所述多个目标资源之间的关系渲染所述目标HTML模块。 Rendering the target HTML module according to a relationship between the plurality of target resources.
PCT/CN2016/095857 2015-08-31 2016-08-18 Page rendering method, device and apparatus WO2017036309A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510549439.4 2015-08-31
CN201510549439.4A CN106484383B (en) 2015-08-31 2015-08-31 Page rendering method, device and equipment

Publications (1)

Publication Number Publication Date
WO2017036309A1 true WO2017036309A1 (en) 2017-03-09

Family

ID=58186685

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/095857 WO2017036309A1 (en) 2015-08-31 2016-08-18 Page rendering method, device and apparatus

Country Status (2)

Country Link
CN (1) CN106484383B (en)
WO (1) WO2017036309A1 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110322284A (en) * 2019-06-14 2019-10-11 广州汇量信息科技有限公司 The methods of exhibiting and system of advertisement page view
CN111045655A (en) * 2019-12-18 2020-04-21 广州市百果园信息技术有限公司 Page rendering method and device, rendering server and storage medium
CN111221530A (en) * 2020-01-08 2020-06-02 北京市科学技术情报研究所 Mobile terminal Web application interface construction method, Web application interface and operation method thereof
CN111258877A (en) * 2018-11-30 2020-06-09 阿里巴巴集团控股有限公司 Method and device for detecting visible time of first screen page and electronic equipment
CN111880788A (en) * 2020-06-12 2020-11-03 北京三快在线科技有限公司 Page rendering method, device, client and computer readable storage medium
CN111880860A (en) * 2020-07-28 2020-11-03 北京浪潮数据技术有限公司 Service processing method, device and related equipment
CN111880790A (en) * 2020-06-12 2020-11-03 北京三快在线科技有限公司 Page rendering method, page rendering system, and computer-readable storage medium
CN112948011A (en) * 2019-11-26 2021-06-11 上海哔哩哔哩科技有限公司 Method and device for loading secondary page
CN113262469A (en) * 2021-06-08 2021-08-17 网易(杭州)网络有限公司 Resource template generation method and device and scene element rendering method and device in game
CN113392350A (en) * 2021-06-11 2021-09-14 中国联合网络通信集团有限公司 Page routing processing method, device, equipment, storage medium and program product
CN114237600A (en) * 2021-12-20 2022-03-25 北京字节跳动网络技术有限公司 Code generation method, device and equipment of front-end page and storage medium
CN114911555A (en) * 2022-04-19 2022-08-16 北京三快在线科技有限公司 Page display method and device, electronic equipment and storage medium
CN116795405A (en) * 2023-08-25 2023-09-22 苏州盈天地资讯科技有限公司 Quick rendering method for front-end pages of thousand-person thousand-face scene, server and front-end equipment
CN116880901A (en) * 2023-09-05 2023-10-13 国网思极网安科技(北京)有限公司 Application page analysis method, device, electronic equipment and computer readable medium

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107169007B (en) * 2017-03-31 2021-04-16 北京奇艺世纪科技有限公司 Display interface setting method and device of mobile terminal
CN107105336B (en) * 2017-04-19 2021-01-08 腾讯科技(深圳)有限公司 Data processing method and data processing device
CN107066430B (en) * 2017-04-21 2021-02-26 阿里巴巴(中国)有限公司 Picture processing method and device, server and client
CN107622106A (en) * 2017-09-13 2018-01-23 五八有限公司 Reminding method and device when a kind of page can not render
CN109558186B (en) * 2017-09-27 2022-06-28 阿里巴巴集团控股有限公司 Page display method and device
CN108885544B (en) * 2017-10-10 2021-07-02 深圳力维智联技术有限公司 Front-end page internationalized processing method, application server and computer-readable storage medium
CN109697266A (en) * 2017-10-24 2019-04-30 中国电信股份有限公司 Page rendering system, page rendering method and page rendering device
CN108595457A (en) * 2017-12-29 2018-09-28 北京奇虎科技有限公司 A kind of rendering intent and device of the waterfall stream page
CN108322359A (en) * 2018-01-08 2018-07-24 阿里巴巴集团控股有限公司 A kind of acquisition methods and device of page initial screen time
CN108595652A (en) * 2018-04-27 2018-09-28 平安科技(深圳)有限公司 Load method, apparatus, computer equipment and the storage medium of DOM node data
CN109002282B (en) * 2018-07-26 2020-11-03 京东数字科技控股有限公司 Method and device for realizing animation effect in web page development
CN111339548B (en) * 2018-12-18 2023-11-03 北京京东尚科信息技术有限公司 Data processing method and device for anticreep, computer equipment and storage medium
CN109865292B (en) * 2019-01-10 2023-03-14 珠海金山数字网络科技有限公司 Game resource construction method and device based on game engine
CN109902247B (en) * 2019-02-14 2021-04-16 北京奇艺世纪科技有限公司 Page rendering method and device and electronic equipment
CN110795195B (en) * 2019-10-31 2023-09-26 百度在线网络技术(北京)有限公司 Webpage rendering method and device, electronic equipment and storage medium
CN111143732A (en) * 2019-12-20 2020-05-12 贝壳技术有限公司 Webpage rendering method and device
CN113051874B (en) * 2019-12-26 2023-12-26 阿里巴巴集团控股有限公司 User behavior data rendering method and device
CN111310088B (en) * 2020-02-12 2023-07-04 北京字节跳动网络技术有限公司 Page rendering method and device
CN111562918A (en) * 2020-05-06 2020-08-21 中国银行股份有限公司 Page dynamic generation method and device
CN111562919A (en) * 2020-07-14 2020-08-21 成都市映潮科技股份有限公司 Method, system and storage medium for generating front-end webpage code based on PSD file
CN113315982B (en) * 2021-05-07 2023-06-27 广州虎牙科技有限公司 Live broadcast method, computer storage medium and equipment
CN113220366A (en) * 2021-05-11 2021-08-06 北京达佳互联信息技术有限公司 Sub-application starting method and device, terminal and server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120278698A1 (en) * 2011-04-29 2012-11-01 International Business Machines Corporation Method and system for processing a webpage
CN102915375A (en) * 2012-11-08 2013-02-06 山东大学 Webpage loading method based on layout zoning
CN103593414A (en) * 2013-10-29 2014-02-19 北京奇虎科技有限公司 Showing method and device of webpages in browser
CN104050190A (en) * 2013-03-14 2014-09-17 腾讯科技(上海)有限公司 Method and system for processing link data, and client

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8875032B2 (en) * 2008-05-08 2014-10-28 Dialogic Corporation System and method for dynamic configuration of components of web interfaces
CN103049439A (en) * 2011-10-11 2013-04-17 腾讯科技(深圳)有限公司 Processing method for markup language documents, browser and network operating system
US9898445B2 (en) * 2012-08-16 2018-02-20 Qualcomm Incorporated Resource prefetching via sandboxed execution
CN103679487B (en) * 2012-09-05 2017-07-07 阿里巴巴集团控股有限公司 The monitoring method and equipment of advertising display
CN104239441A (en) * 2014-09-01 2014-12-24 可牛网络技术(北京)有限公司 Web page loading control method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120278698A1 (en) * 2011-04-29 2012-11-01 International Business Machines Corporation Method and system for processing a webpage
CN102915375A (en) * 2012-11-08 2013-02-06 山东大学 Webpage loading method based on layout zoning
CN104050190A (en) * 2013-03-14 2014-09-17 腾讯科技(上海)有限公司 Method and system for processing link data, and client
CN103593414A (en) * 2013-10-29 2014-02-19 北京奇虎科技有限公司 Showing method and device of webpages in browser

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111258877A (en) * 2018-11-30 2020-06-09 阿里巴巴集团控股有限公司 Method and device for detecting visible time of first screen page and electronic equipment
CN111258877B (en) * 2018-11-30 2023-05-02 阿里巴巴集团控股有限公司 Method and device for detecting visible time of first screen page and electronic equipment
CN110322284A (en) * 2019-06-14 2019-10-11 广州汇量信息科技有限公司 The methods of exhibiting and system of advertisement page view
CN112948011A (en) * 2019-11-26 2021-06-11 上海哔哩哔哩科技有限公司 Method and device for loading secondary page
CN112948011B (en) * 2019-11-26 2023-08-08 上海哔哩哔哩科技有限公司 Method and device for loading secondary page
CN111045655B (en) * 2019-12-18 2023-04-14 广州市百果园信息技术有限公司 Page rendering method and device, rendering server and storage medium
CN111045655A (en) * 2019-12-18 2020-04-21 广州市百果园信息技术有限公司 Page rendering method and device, rendering server and storage medium
CN111221530A (en) * 2020-01-08 2020-06-02 北京市科学技术情报研究所 Mobile terminal Web application interface construction method, Web application interface and operation method thereof
CN111221530B (en) * 2020-01-08 2023-11-14 北京市科学技术情报研究所 Mobile terminal Web application interface construction method, web application interface and operation method thereof
CN111880788A (en) * 2020-06-12 2020-11-03 北京三快在线科技有限公司 Page rendering method, device, client and computer readable storage medium
CN111880790A (en) * 2020-06-12 2020-11-03 北京三快在线科技有限公司 Page rendering method, page rendering system, and computer-readable storage medium
CN111880860A (en) * 2020-07-28 2020-11-03 北京浪潮数据技术有限公司 Service processing method, device and related equipment
CN113262469A (en) * 2021-06-08 2021-08-17 网易(杭州)网络有限公司 Resource template generation method and device and scene element rendering method and device in game
CN113392350B (en) * 2021-06-11 2023-07-04 中国联合网络通信集团有限公司 Page routing processing method, device, equipment and storage medium
CN113392350A (en) * 2021-06-11 2021-09-14 中国联合网络通信集团有限公司 Page routing processing method, device, equipment, storage medium and program product
CN114237600A (en) * 2021-12-20 2022-03-25 北京字节跳动网络技术有限公司 Code generation method, device and equipment of front-end page and storage medium
CN114237600B (en) * 2021-12-20 2023-08-11 抖音视界有限公司 Method, device, equipment and storage medium for generating code of front page
CN114911555A (en) * 2022-04-19 2022-08-16 北京三快在线科技有限公司 Page display method and device, electronic equipment and storage medium
CN116795405A (en) * 2023-08-25 2023-09-22 苏州盈天地资讯科技有限公司 Quick rendering method for front-end pages of thousand-person thousand-face scene, server and front-end equipment
CN116795405B (en) * 2023-08-25 2023-11-21 苏州盈天地资讯科技有限公司 Quick rendering method for front-end pages of thousand-person thousand-face scene, server and front-end equipment
CN116880901A (en) * 2023-09-05 2023-10-13 国网思极网安科技(北京)有限公司 Application page analysis method, device, electronic equipment and computer readable medium
CN116880901B (en) * 2023-09-05 2023-11-24 国网思极网安科技(北京)有限公司 Application page analysis method, device, electronic equipment and computer readable medium

Also Published As

Publication number Publication date
CN106484383B (en) 2019-08-23
CN106484383A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
WO2017036309A1 (en) Page rendering method, device and apparatus
US10776564B2 (en) Method and system for displaying webpage self-defined content
US20200019414A1 (en) Runtime extension system for bundled web application
US10242023B2 (en) Programming model for synchronizing browser caches across devices and web services
JP6051337B2 (en) Client-side page processing
CN109388766B (en) Page loading method and device
US9875314B2 (en) Content request with HTTP request-header rendering template that is independent of content storage location
US9509764B1 (en) Updating cached web content
US9122657B2 (en) Webpage display system leveraging OSGI
WO2016026384A1 (en) Client page display method, device and system
CN109213948B (en) Webpage loading method, intermediate server and webpage loading system
US8516041B1 (en) Pre-fetching asynchronously requested content
US8745639B2 (en) Controller and method to build a combined web page using data retrieved from multiple APIS
US20190080017A1 (en) Method, system, and device that invokes a web engine
US20170017380A1 (en) Mobile enabling a web application developed without mobile rendering capabilities
GB2539758A (en) Techniques for evaluating applications through use of an auxiliary application
WO2021087858A1 (en) Web application component migration to a cloud computing system
CN109948085A (en) Browser kernel initial method, calculates equipment and storage medium at device
US11151216B2 (en) Caching of a site model in a hierarchical modeling system for network sites
WO2019024520A1 (en) Page presentation method, electronic device and non-volatile computer readable storage medium
US20120151313A1 (en) User-specific customization of web pages
US9471552B1 (en) Optimization of scripting for web applications
US10530709B2 (en) Container contract for data dependencies
US20140313215A1 (en) Scene-isolated internet application
US9734160B1 (en) Virtual file system for hosted network sites

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16840738

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16840738

Country of ref document: EP

Kind code of ref document: A1