[go: up one dir, main page]

HK40092128B - Page display method, device, equipment and storage medium based on distributed system - Google Patents

Page display method, device, equipment and storage medium based on distributed system

Info

Publication number
HK40092128B
HK40092128B HK42023079568.4A HK42023079568A HK40092128B HK 40092128 B HK40092128 B HK 40092128B HK 42023079568 A HK42023079568 A HK 42023079568A HK 40092128 B HK40092128 B HK 40092128B
Authority
HK
Hong Kong
Prior art keywords
page
terminal
target
distributed system
resources
Prior art date
Application number
HK42023079568.4A
Other languages
Chinese (zh)
Other versions
HK40092128A (en
Inventor
任春剑
Original Assignee
腾讯科技(深圳)有限公司
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of HK40092128A publication Critical patent/HK40092128A/en
Publication of HK40092128B publication Critical patent/HK40092128B/en

Links

Description

基于分布式系统的页面展示方法、装置、设备及存储介质Page display method, apparatus, equipment and storage medium based on distributed system

技术领域Technical Field

本申请涉及互联网技术领域,尤其涉及一种基于分布式系统的页面展示方法、装置、设备、存储介质及计算机程序产品。This application relates to the field of Internet technology, and in particular to a page display method, apparatus, device, storage medium and computer program product based on a distributed system.

背景技术Background Technology

随着互联网技术的快速发展,越来越多的用户通过页面(比如网页)来浏览媒体信息(比如新闻、推广信息等)。相关技术中,通常预先执行页面代码并提前加载完成页面以达到页面预加载的目的,然后将加载完成的页面进行隐藏以在用户查看时展示。但是提前执行页面代码以加载完成页面并隐藏,不仅会导致内存和网络资源的浪费,还会引起页面展示过程的不稳定,增加页面展示所需的耗时。With the rapid development of internet technology, more and more users are browsing media information (such as news and promotional information) through web pages. Related technologies typically involve pre-loading the page code and loading the page beforehand, then hiding the loaded page to display it when the user views it. However, pre-loading the page code and hiding it not only wastes memory and network resources but also causes instability in the page display process and increases the time required for page loading.

发明内容Summary of the Invention

本申请实施例提供一种基于分布式系统的页面展示方法、装置、设备、存储介质及计算机程序产品,能够提高内存和网络资源的利用率,保证页面展示过程的稳定性,提高页面展示速度。This application provides a page display method, apparatus, device, storage medium, and computer program product based on a distributed system, which can improve the utilization of memory and network resources, ensure the stability of the page display process, and improve the page display speed.

本申请实施例的技术方案是这样实现的:The technical solution of this application embodiment is implemented as follows:

本申请实施例提供一种基于分布式系统的页面展示方法,其中,分布式系统包括:贡献者终端、使用者终端及管理服务端,方法包括:This application provides a page display method based on a distributed system, wherein the distributed system includes: contributor terminals, user terminals, and a management server, and the method includes:

针对终端待加载页面资源的目标页面,确定所述终端在所述分布式系统中的角色;For the target page of the page resources to be loaded on the terminal, determine the role of the terminal in the distributed system;

当针对所述目标页面,所述终端的角色为使用者终端时,依据所述管理服务端处所述目标页面的页面资源地址,对所述目标页面的页面资源进行预加载;When the terminal is a user terminal and the target page is being viewed, the page resources of the target page are preloaded based on the page resource address of the target page at the management server.

其中,所述页面资源地址,为所述贡献者终端在加载所述页面资源后上报至所述管理服务端;The page resource address is the address that the contributor terminal reports to the management server after loading the page resource.

当触发针对所述目标页面的页面展示指令时,基于预加载的所述页面资源展示所述目标页面。When a page display instruction for the target page is triggered, the target page is displayed based on the preloaded page resources.

本申请实施例还提供一种基于分布式系统的页面展示装置,其中,分布式系统包括:贡献者终端、使用者终端及管理服务端,装置包括:This application also provides a page display device based on a distributed system, wherein the distributed system includes: contributor terminals, user terminals, and a management server, and the device includes:

确定模块,用于针对终端待加载页面资源的目标页面,确定所述终端在所述分布式系统中的角色;The determination module is used to determine the role of the terminal in the distributed system for the target page of the page resources to be loaded on the terminal;

预加载模块,用于当针对所述目标页面,所述终端的角色为使用者终端时,依据所述管理服务端处所述目标页面的页面资源地址,对所述目标页面的页面资源进行预加载;The preloading module is used to preload the page resources of the target page based on the page resource address of the target page at the management server when the terminal is a user terminal for the target page.

其中,所述页面资源地址,为所述贡献者终端在加载所述页面资源后上报至所述管理服务端;The page resource address is the address that the contributor terminal reports to the management server after loading the page resource.

展示模块,用于当触发针对所述目标页面的页面展示指令时,基于预加载的所述页面资源展示所述目标页面。The display module is used to display the target page based on the preloaded page resources when a page display instruction for the target page is triggered.

上述方案中,所述确定模块,还用于发送针对所述页面资源地址的获取请求至所述管理服务端,并接收所述管理服务端基于所述获取请求返回的响应消息;当所述响应消息中不包括所述页面资源地址时,确定所述终端在所述分布式系统中的角色为所述贡献者终端;当所述响应消息中包括所述页面资源地址时,确定所述终端在所述分布式系统中的角色为所述使用者终端。In the above scheme, the determining module is further configured to send a request to obtain the page resource address to the management server, and receive a response message returned by the management server based on the request; when the response message does not include the page resource address, the role of the terminal in the distributed system is determined to be the contributor terminal; when the response message includes the page resource address, the role of the terminal in the distributed system is determined to be the user terminal.

上述方案中,所述确定模块,还用于获取所述目标页面的终端展示次数;当所述终端展示次数低于次数阈值时,确定所述终端在所述分布式系统中的角色为所述贡献者终端;当所述终端展示次数不低于次数阈值时,确定所述终端在所述分布式系统中的角色为所述使用者终端。In the above scheme, the determining module is further used to obtain the number of times the target page is displayed on a terminal; when the number of times the terminal is displayed is lower than the number of times threshold, the role of the terminal in the distributed system is determined to be the contributor terminal; when the number of times the terminal is displayed is not lower than the number of times threshold, the role of the terminal in the distributed system is determined to be the user terminal.

上述方案中,所述分布式系统还包括:至少两个上报者终端;所述确定模块,还用于从所述管理服务端处获取所述目标页面归属于预加载页面的结果;当所述结果指示所述目标页面为预加载页面时,确定所述终端在所述分布式系统中的角色;其中,所述目标页面归属于预加载页面的结果,为所述管理服务端基于上报页面加载超时消息的上报者终端的数量所确定;其中,所述页面加载超时消息,用于指示相应上报者终端加载所述目标页面的页面资源的时长超过时长阈值。In the above scheme, the distributed system further includes: at least two reporting terminals; the determining module is further configured to obtain from the management server the result that the target page belongs to a preloaded page; when the result indicates that the target page is a preloaded page, determine the role of the terminal in the distributed system; wherein, the result that the target page belongs to a preloaded page is determined by the management server based on the number of reporting terminals that report page loading timeout messages; wherein, the page loading timeout message is used to indicate that the time for the corresponding reporting terminal to load the page resources of the target page exceeds a time threshold.

上述方案中,所述确定模块,还用于当针对所述目标页面,所述终端的角色为上报者终端时,响应于针对所述目标页面的页面展示指令,加载所述目标页面的页面资源,并获取相应的加载时长;当所述加载时长超过时长阈值时,上报所述页面加载超时消息至所述管理服务端。In the above scheme, the determining module is further configured to, when the terminal is a reporting terminal for the target page, respond to the page display instruction for the target page, load the page resources of the target page, and obtain the corresponding loading time; when the loading time exceeds the time threshold, report the page loading timeout message to the management server.

上述方案中,所述确定模块,还用于当针对所述目标页面,所述终端的角色为贡献者终端时,响应于针对所述目标页面的页面展示指令,加载所述目标页面的页面资源,并记录所述页面资源的页面资源地址;将所述目标页面的页面资源地址上报至所述管理服务端。In the above scheme, the determining module is further configured to, when the terminal is a contributor terminal for the target page, respond to the page display instruction for the target page, load the page resources of the target page, and record the page resource address of the page resources; and report the page resource address of the target page to the management server.

上述方案中,所述确定模块,还用于当所述页面资源地址为至少两个时,对所述至少两个页面资源地址进行拼接处理,得到所述目标页面对应的资源地址列表;将所述目标页面对应的资源地址列表上报至所述管理服务端。In the above scheme, the determining module is further configured to, when there are at least two page resource addresses, concatenate the at least two page resource addresses to obtain a list of resource addresses corresponding to the target page; and report the list of resource addresses corresponding to the target page to the management server.

上述方案中,所述分布式系统还包括:上报者终端;所述确定模块,还用于从所述管理服务端处获取所述目标页面归属于预加载页面的结果;当所述结果指示所述目标页面为预加载页面时,确定所述终端在所述分布式系统中的角色;其中,所述目标页面归属于预加载页面的结果,为所述管理服务端基于所述上报者终端上报的所述页面资源的数据大小所确定。In the above scheme, the distributed system further includes: a reporter terminal; the determining module is further configured to obtain the result from the management server that the target page belongs to the preloaded page; when the result indicates that the target page is a preloaded page, determine the role of the terminal in the distributed system; wherein, the result that the target page belongs to the preloaded page is determined by the management server based on the data size of the page resource reported by the reporter terminal.

上述方案中,所述确定模块,还用于当针对所述目标页面,所述终端的角色为上报者终端时,响应于针对所述目标页面的页面展示指令,加载所述目标页面的页面资源,并获取所述页面资源的数据大小;将所述页面资源的数据大小上报至所述管理服务端。In the above scheme, the determining module is further configured to, when the terminal is a reporting terminal for the target page, respond to the page display instruction for the target page, load the page resources of the target page, and obtain the data size of the page resources; and report the data size of the page resources to the management server.

上述方案中,所述展示模块,还用于获取针对所述页面资源的资源获取请求,所述资源获取请求基于所述目标页面的页面展示指令所生成;对所述资源获取请求进行拦截处理。In the above scheme, the display module is further configured to obtain a resource acquisition request for the page resource, the resource acquisition request being generated based on the page display instruction of the target page; and to intercept the resource acquisition request.

上述方案中,所述展示模块,还用于加载所述目标页面的页面结构;基于所述页面结构,填充预加载的所述页面资源,以展示所述目标页面。In the above scheme, the display module is further used to load the page structure of the target page; based on the page structure, to fill in the preloaded page resources to display the target page.

上述方案中,所述展示模块,还用于确定在目标时长内所述页面展示指令是否被触发,得到相应的结果;当所述结果表征在目标时长内所述页面展示指令未被触发时,释放预加载的所述页面资源。In the above scheme, the display module is further configured to determine whether the page display instruction is triggered within the target duration and obtain the corresponding result; when the result indicates that the page display instruction is not triggered within the target duration, the preloaded page resources are released.

上述方案中,所述预加载模块,还用于确定预加载的所述页面资源的第一版本,并获取所述管理服务端处的所述页面资源的第二版本;当所述第二版本与所述第一版本不一致时,依据所述管理服务端处所述目标页面的页面资源地址,对所述第二版本的页面资源进行预加载,并清除预加载的所述第一版本的页面资源。In the above scheme, the preloading module is further configured to determine the first version of the preloaded page resource and obtain the second version of the page resource at the management server; when the second version is inconsistent with the first version, the second version of the page resource is preloaded according to the page resource address of the target page at the management server, and the preloaded first version of the page resource is cleared.

本申请实施例还提供一种电子设备,包括:This application also provides an electronic device, including:

存储器,用于存储可执行指令;Memory, used to store executable instructions;

处理器,用于执行所述存储器中存储的可执行指令时,实现本申请实施例提供的基于分布式系统的页面展示方法。When the processor executes the executable instructions stored in the memory, it implements the page display method based on a distributed system provided in the embodiments of this application.

本申请实施例还提供一种计算机可读存储介质,存储有可执行指令,所述可执行指令被处理器执行时,实现本申请实施例提供的基于分布式系统的页面展示方法。This application also provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement the page display method based on a distributed system provided in this application.

本申请实施例还提供一种计算机程序产品,包括计算机程序或指令,所述计算机程序或指令被处理器执行时,实现本申请实施例提供的基于分布式系统的页面展示方法。This application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the page display method based on a distributed system provided in this application.

本申请实施例具有以下有益效果:The embodiments of this application have the following beneficial effects:

应用本申请上述实施例,基于包括贡献者终端、使用者终端及管理服务端的分布式系统,通过分布式系统中的贡献者终端,在加载目标页面的页面资源后,将目标页面的页面资源地址上报至管理服务端;当针对终端待加载页面资源的目标页面,确定终端的角色为使用者终端时,终端依据管理服务端处的目标页面的页面资源地址,对目标页面的页面资源进行预加载,从而当触发针对目标页面的页面展示指令时,基于预加载的页面资源展示目标页面。如此,在进行页面预加载时,仅需加载页面的页面资源,在触发针对页面的页面展示指令时,才基于预加载的页面资源生成页面以进行展示,能够提高内存和网络资源的利用率,保证页面展示过程的稳定性,提高页面展示速度。By applying the above embodiments of this application, based on a distributed system including contributor terminals, user terminals, and a management server, the contributor terminals in the distributed system, after loading the page resources of the target page, report the page resource address of the target page to the management server. When the terminal's role is determined to be a user terminal for the target page whose page resources are to be loaded, the terminal preloads the page resources of the target page according to the page resource address of the target page at the management server. Thus, when a page display instruction for the target page is triggered, the target page is displayed based on the preloaded page resources. In this way, during page preloading, only the page resources of the page need to be loaded. When a page display instruction for the page is triggered, the page is generated and displayed based on the preloaded page resources. This can improve the utilization of memory and network resources, ensure the stability of the page display process, and improve the page display speed.

附图说明Attached Figure Description

图1是本申请实施例提供的基于分布式系统的页面展示系统100的架构示意图;Figure 1 is a schematic diagram of the architecture of a page display system 100 based on a distributed system provided in an embodiment of this application;

图2是本申请实施例提供的实施基于分布式系统的页面展示方法的电子设备500的结构示意图;Figure 2 is a schematic diagram of the structure of an electronic device 500 implementing a page display method based on a distributed system according to an embodiment of this application;

图3是本申请实施例提供的基于分布式系统的页面展示方法的流程示意图;Figure 3 is a flowchart illustrating the page display method based on a distributed system provided in an embodiment of this application;

图4是本申请实施例提供的基于分布式系统的页面展示方法的流程示意图;Figure 4 is a flowchart illustrating the page display method based on a distributed system provided in an embodiment of this application;

图5是本申请实施例提供的基于分布式系统的页面展示方法的流程示意图;Figure 5 is a flowchart illustrating the page display method based on a distributed system provided in an embodiment of this application;

图6是本申请实施例提供的基于分布式系统的页面展示方法的流程示意图;Figure 6 is a flowchart illustrating the page display method based on a distributed system provided in an embodiment of this application;

图7是本申请实施例提供的目标页面的页面结构的结构示意图;Figure 7 is a schematic diagram of the page structure of the target page provided in the embodiment of this application;

图8是本申请实施例提供的基于分布式系统的页面展示方法的流程示意图;Figure 8 is a flowchart illustrating the page display method based on a distributed system provided in an embodiment of this application;

图9是本申请实施例提供的基于分布式系统的页面展示方法的流程示意图;Figure 9 is a flowchart illustrating the page display method based on a distributed system provided in an embodiment of this application;

图10是本申请实施例提供的目标页面的展示示意图。Figure 10 is a schematic diagram showing the target page provided in an embodiment of this application.

具体实施方式Detailed Implementation

为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述,所描述的实施例不应视为对本申请的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

在以下的描述中,所涉及的术语“第一\第二\第三”仅仅是是区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

对本申请实施例进行进一步详细说明之前,对本申请实施例中涉及的名词和术语进行说明,本申请实施例中涉及的名词和术语适用于如下的解释。Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

1)客户端,终端中运行的用于提供各种服务的应用程序,例如浏览器客户端、媒体信息客户端。1) Client: An application that runs on a terminal and provides various services, such as a browser client or a media information client.

2)响应于,用于表示所执行的操作所依赖的条件或者状态,当满足所依赖的条件或状态时,所执行的一个或多个操作可以是实时的,也可以具有设定的延迟;在没有特别说明的情况下,所执行的多个操作不存在执行先后顺序的限制。2) In response, used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.

3)落地页:当潜在用户点击推广信息或者利用搜索引擎搜索后跳转显示给用户的网页,一般这个页面会显示和所点击推广信息或搜索结果链接相关的扩展内容,而且这个页面应该是针对某个关键字(或短语)做过搜索引擎优化的。3) Landing Page: The webpage that potential users are redirected to after clicking on promotional information or searching using a search engine. This page usually displays extended content related to the clicked promotional information or search result link, and it should be optimized for a specific keyword (or phrase).

4)网络页面,即Web页面,也称网页,是一个包含HTML标签的纯文本文件,可以存放在世界某个角落的某一台计算机中,是万维网中的一“页”,是超文本标记语言格式,通常用图像档来提供图画,可通过网页浏览器来阅读。4) A webpage, also known as a web page, is a plain text file containing HTML tags. It can be stored on a computer somewhere in the world. It is a "page" on the World Wide Web. It is in the Hypertext Markup Language format and usually uses image files to provide pictures. It can be read through a web browser.

5)层叠样式表(Cascading Style Sheets,CSS)文件,是一种用来表现HTML等文件样式的计算机语言,不仅可以静态地修饰网页,还可以配合各种脚本语言动态地对网页各元素进行格式化。5) Cascading Style Sheets (CSS) files are a computer language used to represent the style of HTML and other documents. They can not only statically style web pages, but also dynamically format various elements of web pages in conjunction with various scripting languages.

6)JavaScript脚本文件,即JS文件,用于Web应用开发,能够为网页添加各式各样的动态功能,JavaScript脚本是通过嵌入在HTML中来实现自身的功能的,网页、以及基于HTML5的客户端,交互逻辑都是由JavaScript驱动的。6) JavaScript script files, or JS files, are used for web application development. They can add a variety of dynamic functions to web pages. JavaScript scripts implement their functions by being embedded in HTML. The interaction logic of web pages and HTML5-based clients is driven by JavaScript.

7)超文本标记语言(Hyper Text Markup Language,HTML),是一种标记语言,包括一系列标签,通过这些标签可以将网络上的文档格式统一,使分散的Internet资源连接为一个逻辑整体;HTML文本是由HTML命令组成的描述性文本,HTML命令可以说明文字,图形、动画、声音、表格、链接等。7) Hypertext Markup Language (HTML) is a markup language that includes a series of tags. These tags can unify the format of documents on the Internet and connect scattered Internet resources into a logical whole. HTML text is descriptive text composed of HTML commands. HTML commands can describe text, graphics, animations, sounds, tables, links, etc.

本申请实施例提供一种基于分布式系统的页面展示方法、装置、设备、存储介质及计算机程序产品,能够提高内存和网络资源的利用率,保证页面展示过程的稳定性,提高页面展示速度。This application provides a page display method, apparatus, device, storage medium, and computer program product based on a distributed system, which can improve the utilization of memory and network resources, ensure the stability of the page display process, and improve the page display speed.

下面说明本申请实施例提供的基于分布式系统的页面展示方法的实施场景。参见图1,图1是本申请实施例提供的基于分布式系统的页面展示系统100的架构示意图,在本申请实施例中,分布式系统包括贡献者终端、使用者终端及管理服务端。为实现支撑一个示例性应用,终端(示例性示出了终端400-1和终端400-2)通过网络300连接管理服务端200,网络300可以是广域网或者局域网,又或者是二者的组合,使用无线或有线链路实现数据传输。在实际应用中,终端(示例性示出了终端400-1和终端400-2)上可以设置有客户端,比如浏览器客户端、媒体信息客户端(如新闻客户端),当终端接收到针对客户端的运行指令时,可通过运行客户端展示目标页面,而在展示目标页面的过程中,需要终端加载目标页面的页面资源,因此,目标页面也可记为终端待加载页面资源的目标页面。The following describes the implementation scenario of the page display method based on a distributed system provided in this application embodiment. Referring to Figure 1, which is a schematic diagram of the architecture of the page display system 100 based on a distributed system provided in this application embodiment, the distributed system includes contributor terminals, user terminals, and a management server. To support an exemplary application, the terminals (terminals 400-1 and 400-2 are shown exemplarily) connect to the management server 200 via network 300. Network 300 can be a wide area network (WAN), a local area network (LAN), or a combination of both, using wireless or wired links for data transmission. In practical applications, the terminals (terminals 400-1 and 400-2 are shown exemplarily) can be equipped with clients, such as browser clients or media information clients (e.g., news clients). When the terminal receives a running instruction for the client, it can display the target page by running the client. During the display of the target page, the terminal needs to load the page resources of the target page; therefore, the target page can also be referred to as the target page for which the terminal needs to load page resources.

在一些实施例中,针对终端待加载页面资源的目标页面,可以确定终端在分布式系统中的角色。这里,确定终端400-1在分布式系统中的角色为贡献者终端,确定终端400-2在分布式系统中的角色为使用者终端。当在终端400-1触发针对目标页面的页面展示指令时,终端400-1在线加载目标页面的页面资源,并基于在线加载的页面资源展示目标页面;同时,终端400-1在页面资源加载后,将页面资源的页面资源地址上报至管理服务端200;In some embodiments, for the target page for which the terminal needs to load page resources, the role of the terminal in the distributed system can be determined. Here, the role of terminal 400-1 in the distributed system is determined to be a contributor terminal, and the role of terminal 400-2 in the distributed system is determined to be a user terminal. When terminal 400-1 triggers a page display instruction for the target page, terminal 400-1 loads the page resources of the target page online and displays the target page based on the online-loaded page resources; simultaneously, after loading the page resources, terminal 400-1 reports the page resource address of the page resources to the management server 200.

基于此,终端400-2针对终端待加载页面资源的目标页面,发送目标页面的页面资源地址的获取请求至管理服务端200;管理服务端200接收并响应于目标页面的页面资源地址的获取请求,返回目标页面的页面资源地址至终端400-2;终端400-2接收到目标页面的页面资源地址,并依据目标页面的页面资源地址,对目标页面的页面资源进行预加载;当触发针对目标页面的页面展示指令时,基于预加载的页面资源展示目标页面。Based on this, terminal 400-2 sends a request to the management server 200 to obtain the page resource address of the target page for which the terminal needs to load page resources; the management server 200 receives and responds to the request to obtain the page resource address of the target page, and returns the page resource address of the target page to terminal 400-2; terminal 400-2 receives the page resource address of the target page, and preloads the page resources of the target page according to the page resource address of the target page; when a page display instruction for the target page is triggered, the target page is displayed based on the preloaded page resources.

在一些实施例中,本申请实施例提供的基于分布式系统的页面展示方法可以由各种电子设备实施,例如,可以由终端单独实施,也可以由服务器单独实施,也可以由终端和服务器协同实施。例如终端独自执行本申请实施例提供的基于分布式系统的页面展示方法,或者,终端和服务器协同执行本申请实施例提供的基于分布式系统的页面展示方法。In some embodiments, the page display method based on a distributed system provided in this application can be implemented by various electronic devices. For example, it can be implemented by a terminal alone, by a server alone, or by a terminal and a server working together. For instance, a terminal may execute the page display method based on a distributed system provided in this application independently, or a terminal and a server may work together to execute the page display method based on a distributed system provided in this application.

在一些实施例中,本申请实施例提供的实施基于分布式系统的页面展示的电子设备可以是各种类型的终端设备或服务器,其中,服务器(例如服务器200)可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器。终端(例如终端400)可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能语音交互设备(例如智能音箱)、智能家电(例如智能电视)、智能手表、车载终端等,但并不局限于此。终端以及服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请实施例对此不做限制。本申请实施例可应用于各种场景,包括但不限于云技术、人工智能、智慧交通、辅助驾驶等。In some embodiments, the electronic device for displaying pages based on a distributed system provided in this application can be various types of terminal devices or servers. The server (e.g., server 200) can be an independent physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal (e.g., terminal 400) can be a smartphone, tablet, laptop, desktop computer, intelligent voice interaction device (e.g., smart speaker), smart home appliance (e.g., smart TV), smartwatch, in-vehicle terminal, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this connection. This application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving.

在一些实施例中,终端或服务器可以通过运行计算机程序来实现本申请实施例提供的基于分布式系统的页面展示方法,举例来说,计算机程序可以是操作系统中的原生程序或软件模块;可以是本地(Native)应用程序(APP,App lication),即需要在操作系统中安装才能运行的程序;也可以是小程序,即只需要下载到浏览器环境中就可以运行的程序;还可以是能够嵌入至任意APP中的小程序。总而言之,上述计算机程序可以是任意形式的应用程序、模块或插件。In some embodiments, the terminal or server can implement the distributed system-based page display method provided in this application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP), that is, a program that needs to be installed in the operating system to run; it can also be a mini-program, that is, a program that only needs to be downloaded to the browser environment to run; or it can be a mini-program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module or plugin.

在一些实施例中,多个服务器可组成为一区块链,而服务器为区块链上的节点,区块链中的每个节点之间可以存在信息连接,节点之间可以通过上述信息连接进行信息传输。其中,本申请实施例提供的基于分布式系统的页面展示方法所相关的数据(例如目标页面的页面资源)可保存于区块链上。In some embodiments, multiple servers can form a blockchain, with each server acting as a node on the blockchain. Information connections can exist between these nodes, enabling information transmission between them. Furthermore, the data related to the distributed system-based page display method provided in this application (e.g., page resources of the target page) can be stored on the blockchain.

下面说明本申请实施例提供的实施基于分布式系统的页面展示方法的电子设备。参见图2,图2是本申请实施例提供的实施基于分布式系统的页面展示方法的电子设备500的结构示意图。以电子设备500为图1所示的终端为例,本申请实施例提供的实施基于分布式系统的页面展示方法的电子设备500包括:至少一个处理器510、存储器550、至少一个网络接口520和用户接口530。电子设备500中的各个组件通过总线系统540耦合在一起。可理解,总线系统540用于实现这些组件之间的连接通信。总线系统540除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图2中将各种总线都标为总线系统540。The following describes an electronic device implementing a page display method based on a distributed system, according to an embodiment of this application. Referring to Figure 2, which is a schematic diagram of the structure of an electronic device 500 implementing a page display method based on a distributed system according to an embodiment of this application. Taking the terminal shown in Figure 1 as an example, the electronic device 500 implementing a page display method based on a distributed system according to an embodiment of this application includes: at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. The various components in the electronic device 500 are coupled together through a bus system 540. It can be understood that the bus system 540 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus system 540 in Figure 2.

处理器510可以是一种集成电路芯片,具有信号的处理能力,例如通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,其中,通用处理器可以是微处理器或者任何常规的处理器等。The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

用户接口530包括使得能够呈现媒体内容的一个或多个输出装置531,包括一个或多个扬声器和/或一个或多个视觉显示屏。用户接口530还包括一个或多个输入装置532,包括有助于用户输入的用户接口部件,比如键盘、鼠标、麦克风、触屏显示屏、摄像头、其他输入按钮和控件。User interface 530 includes one or more output devices 531 that enable the presentation of media content, including one or more speakers and/or one or more visual displays. User interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

存储器550可以是可移除的,不可移除的或其组合。示例性的硬件设备包括固态存储器,硬盘驱动器,光盘驱动器等。存储器550可选地包括在物理位置上远离处理器510的一个或多个存储设备。The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 550 may optionally include one or more storage devices physically located away from the processor 510.

存储器550包括易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。非易失性存储器可以是只读存储器(ROM,Read Only Memory),易失性存储器可以是随机存取存储器(RAM,Random Access Memory)。本申请实施例描述的存储器550旨在包括任意适合类型的存储器。The memory 550 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 550 described in this application embodiment is intended to include any suitable type of memory.

在一些实施例中,存储器550能够存储数据以支持各种操作,这些数据的示例包括程序、模块和数据结构或者其子集或超集,下面示例性说明。In some embodiments, memory 550 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

操作系统551,包括用于处理各种基本系统服务和执行硬件相关任务的系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务;Operating system 551 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

网络通信模块552,用于经由一个或多个(有线或无线)网络接口520到达其他计算设备,示例性的网络接口520包括:蓝牙、无线相容性认证(WiFi)、和通用串行总线(USB,Universal Serial Bus)等;The network communication module 552 is used to reach other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.

呈现模块553,用于经由一个或多个与用户接口530相关联的输出装置531(例如,显示屏、扬声器等)使得能够呈现信息(例如,用于操作外围设备和显示内容和信息的用户接口);Presentation module 553 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 531 (e.g., a display screen, a speaker, etc.) associated with user interface 530;

输入处理模块554,用于对一个或多个来自一个或多个输入装置532之一的一个或多个用户输入或互动进行检测以及翻译所检测的输入或互动。The input processing module 554 is used to detect and translate one or more user inputs or interactions from one or more input devices 532.

在一些实施例中,本申请实施例提供的基于分布式系统的页面展示装置可以采用软件方式实现,图2示出了存储在存储器550中的基于分布式系统的页面展示装置555,其可以是程序和插件等形式的软件,包括以下软件模块:确定模块5551、预加载模块5552和展示模块5553,这些模块是逻辑上的,因此根据所实现的功能可以进行任意的组合或进一步拆分,将在下文中说明各个模块的功能。In some embodiments, the distributed system-based page display device provided in this application can be implemented in software. Figure 2 shows a distributed system-based page display device 555 stored in memory 550. It can be software in the form of programs and plug-ins, including the following software modules: determination module 5551, preloading module 5552 and display module 5553. These modules are logical, so they can be arbitrarily combined or further split according to the functions they implement. The functions of each module will be described below.

在另一些实施例中,本申请实施例提供的基于分布式系统的页面展示装置可以采用软硬件结合的方式实现,作为示例,本申请实施例提供的基于分布式系统的页面展示装置可以是采用硬件译码处理器形式的处理器,其被编程以执行本申请实施例提供的基于分布式系统的页面展示方法,例如,硬件译码处理器形式的处理器可以采用一个或多个应用专用集成电路(ASIC,Application Specific Integrated Circuit)、DSP、可编程逻辑器件(PLD,Programmable Logic Device)、复杂可编程逻辑器件(CPLD,Complex ProgrammableLogic Device)、现场可编程门阵列(FPGA,Field-Programmable Gate Array)或其他电子元件。In other embodiments, the page display device based on a distributed system provided in this application can be implemented using a combination of hardware and software. As an example, the page display device based on a distributed system provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the page display method based on a distributed system provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

下面说明本申请实施例提供的基于分布式系统的页面展示方法。其中,分布式系统是由一组通过网络进行通信、为完成共同的任务而协调工作的计算节点组成的系统,本申请实施例提供的分布式系统包括:贡献者终端、使用者终端及管理服务端。这里,贡献者终端、使用者终端及管理服务端分别为分布式系统中的计算节点,用于共同协调工作以实现本申请实施例提供的基于分布式系统的页面展示方法。The following describes the page display method based on a distributed system provided in the embodiments of this application. The distributed system is a system composed of a group of computing nodes that communicate via a network and coordinate their work to complete a common task. The distributed system provided in the embodiments of this application includes: a contributor terminal, a user terminal, and a management server. Here, the contributor terminal, user terminal, and management server are computing nodes in the distributed system, used to coordinate their work to implement the page display method based on a distributed system provided in the embodiments of this application.

在一些实施例中,本申请实施例提供的基于分布式系统的页面展示方法可以由各种电子设备实施,例如,可以由终端单独实施,也可以由服务器单独实施,也可以由终端和服务器协同实施。以终端实施为例,参见图3,图3是本申请实施例提供的基于分布式系统的页面展示方法的流程示意图,本申请实施例提供的基于分布式系统的页面展示方法包括:In some embodiments, the page display method based on a distributed system provided in this application can be implemented by various electronic devices. For example, it can be implemented by a terminal alone, by a server alone, or by a terminal and a server working together. Taking terminal implementation as an example, refer to Figure 3. Figure 3 is a flowchart illustrating the page display method based on a distributed system provided in this application. The page display method based on a distributed system provided in this application includes:

步骤101:终端针对终端待加载页面资源的目标页面,确定终端在分布式系统中的角色。Step 101: The terminal determines its role in the distributed system for the target page for which it needs to load page resources.

这里,终端设置有应用客户端,比如浏览器客户端或者内嵌有浏览器内核的客户端,比如媒体信息客户端(如新闻客户端)、即时通信客户端等等。该目标页面可以为Web页面,可以包括图像、文字、声音和视频等信息。在实际应用中,当终端接收到针对应用客户端的运行指令时,运行应用客户端,从而通过应用客户端展示目标页面。在实际实施时,终端展示目标页面需要加载目标页面的页面资源,该页面资源可以包括目标页面的文字资源、图像资源、声音资源、视频资源、CSS文件、JS文件等等。Here, the terminal is equipped with an application client, such as a browser client or a client with an embedded browser kernel, such as a media information client (e.g., a news client), an instant messaging client, etc. The target page can be a web page and may include information such as images, text, sound, and video. In practical applications, when the terminal receives a command to run the application client, it runs the application client, thereby displaying the target page through the application client. In actual implementation, the terminal needs to load the page resources of the target page to display the target page. These page resources may include the target page's text resources, image resources, sound resources, video resources, CSS files, JS files, etc.

在本申请实施例中,加载目标页面的页面资源时,页面资源的加载方式包括在线加载和预加载。其中,在线加载是当用户触发针对目标页面的展示指令时,终端在线加载目标页面的页面资源;预加载是在用户未触发针对目标页面的展示指令时,针对待展示的目标页面,预加载目标页面的页面资源,以在用户触发针对目标页面的展示指令时,终端基于预加载的页面资源展示目标页面。在实际应用中,预加载可以提高目标页面的展示速度,避免在线加载时由于网络问题导致的页面展示延迟。In this embodiment, when loading page resources for a target page, the loading methods include online loading and preloading. Online loading occurs when the user triggers a display command for the target page, at which point the terminal loads the page resources online. Preloading occurs when the user has not triggered a display command for the target page, at which point the terminal preloads the page resources for the target page to be displayed, so that when the user triggers a display command, the terminal displays the target page based on the preloaded page resources. In practical applications, preloading can improve the display speed of the target page and avoid page display delays caused by network issues during online loading.

在本申请实施例中,当终端展示目标页面时,针对终端待加载页面资源的目标页面,可以确定终端在分布式系统中的角色。这里,分布式系统中包括贡献者终端、使用者终端及管理服务端。终端在分布式系统中的角色也即包括贡献者终端和使用者终端。即终端在分布式系统中可以是贡献者终端,也可以是使用者终端,在实际实施时,当终端在分布式系统中是贡献者终端时,该使用者终端即为除该终端之外的其他终端;当终端在分布式系统中是使用者终端时,该贡献者终端可以为该终端,也可以为除该终端之外的其他终端;即在分布式系统中,终端针对目标页面,在同一时刻有且仅有一种角色,即终端在某一时刻是使用者终端,或者是贡献者终端。在实际应用中,针对不同的目标页面,终端可以为不同的角色,比如终端针对目标页面1为贡献者终端,终端针对目标页面2为使用者终端。In this embodiment, when a terminal displays a target page, the terminal's role in the distributed system can be determined for the target page resource to be loaded on the terminal. Here, the distributed system includes contributor terminals, user terminals, and a management server. The terminal's role in the distributed system includes both contributor and user terminals. That is, a terminal in the distributed system can be either a contributor terminal or a user terminal. In practice, when a terminal is a contributor terminal in the distributed system, the user terminal is any other terminal besides that terminal; when a terminal is a user terminal in the distributed system, the contributor terminal can be that terminal or any other terminal besides that terminal. In other words, in the distributed system, a terminal has only one role for a target page at any given time; that is, at any given time, the terminal is either a user terminal or a contributor terminal. In practical applications, a terminal can have different roles for different target pages. For example, a terminal can be a contributor terminal for target page 1 and a user terminal for target page 2.

在本申请实施例中,贡献者终端在展示目标页面时,通过在线加载的方式加载目标页面的页面资源,同时,记录在线加载过程中页面资源的页面资源地址,并将页面资源地址上报至管理服务端;然后基于在线加载的目标页面的页面资源展示目标页面。基于此,使用者终端针对待展示的目标页面,可以依据管理服务端处页面资源的页面资源地址,预加载目标页面的页面资源,当需要(比如用户触发针对目标页面的展示指令)展示目标页面时,基于预加载的目标页面的页面资源展示目标页面,从而加快使用者终端展示目标页面的速度,提高用户浏览目标页面的体验。In this embodiment, when displaying a target page, the contributor terminal loads the page resources of the target page online, records the page resource addresses during the online loading process, and reports these addresses to the management server. Then, the target page is displayed based on the online-loaded page resources. Therefore, for a target page to be displayed, the user terminal can preload the page resources of the target page according to the page resource addresses at the management server. When the target page needs to be displayed (e.g., when a user triggers a display command for the target page), the target page is displayed based on the preloaded page resources, thereby speeding up the display of the target page on the user terminal and improving the user's browsing experience.

这里,终端待加载页面资源的目标页面,比如终端运行客户端时待展示的目标页面,由于展示目标页面需要加载页面资源,因此该目标页面也可记为终端待加载页面资源的目标页面。由于终端在分布式系统中归属于不同的角色对应的页面资源的加载方式不同,因此终端针对终端待加载页面资源的目标页面,首先可以确定终端在分布式系统中的角色。Here, the target page for the page resources to be loaded by the terminal, such as the target page to be displayed when the terminal runs the client, can also be referred to as the target page for the page resources to be loaded by the terminal, since displaying the target page requires loading page resources. Because different roles within a terminal in a distributed system correspond to different page resource loading methods, the terminal can first determine its role in the distributed system for the target page for the page resources to be loaded.

在一些实施例中,终端可通过如下方式确定终端在分布式系统中的角色:发送针对页面资源地址的获取请求至管理服务端,并接收管理服务端基于获取请求返回的响应消息;当响应消息中不包括页面资源地址时,确定终端在分布式系统中的角色为贡献者终端;当响应消息中包括页面资源地址时,确定终端在分布式系统中的角色为使用者终端。In some embodiments, a terminal may determine its role in a distributed system by: sending a request for a page resource address to a management server and receiving a response message returned by the management server based on the request; when the response message does not include a page resource address, the terminal is determined to be a contributor terminal in the distributed system; when the response message includes a page resource address, the terminal is determined to be a user terminal in the distributed system.

参见图4,图4是本申请实施例提供的基于分布式系统的页面展示方法的流程示意图,包括:步骤201:终端发送针对页面资源地址的获取请求至管理服务端;步骤202:管理服务端接收到针对页面资源地址的获取请求,返回响应消息至终端;步骤203:终端接收到管理服务端基于获取请求返回的响应消息;步骤204:终端确定响应消息中是否包括页面资源地址,若是,执行步骤205,若否,执行步骤206;步骤205:确定终端在分布式系统中的角色为使用者终端;步骤206:确定终端在分布式系统中的角色为贡献者终端。Referring to Figure 4, which is a flowchart illustrating a page display method based on a distributed system provided in this application embodiment, the method includes: Step 201: The terminal sends a request to the management server to obtain a page resource address; Step 202: The management server receives the request to obtain a page resource address and returns a response message to the terminal; Step 203: The terminal receives the response message returned by the management server based on the request; Step 204: The terminal determines whether the response message includes a page resource address. If yes, proceed to step 205; otherwise, proceed to step 206; Step 205: Determine the terminal's role in the distributed system as a user terminal; Step 206: Determine the terminal's role in the distributed system as a contributor terminal.

这里,终端在确定终端在分布式系统中的角色时,首先可以发送针对页面资源地址的获取请求至管理服务端;管理服务端接收到针对页面资源地址的获取请求,返回响应消息至终端;终端接收到管理服务端基于获取请求返回的响应消息,对响应消息进行解析,确定响应消息中是否包括页面资源地址;Here, when determining its role in the distributed system, the terminal can first send a request to the management server to obtain the page resource address; upon receiving the request, the management server returns a response message to the terminal; the terminal receives the response message returned by the management server based on the request, parses the response message, and determines whether the response message includes the page resource address.

当响应消息中不包括页面资源地址时,确定终端在分布式系统中的角色为贡献者终端,即管理服务端并未记录目标页面的页面资源地址,需要终端在线加载目标页面的页面资源并上报相应的页面资源地址至管理服务端;当响应消息中包括页面资源地址时,确定终端在分布式系统中的角色为使用者终端,即终端可以依据管理服务端处页面资源的页面资源地址,预加载目标页面的页面资源。When the response message does not include a page resource address, the terminal's role in the distributed system is determined to be a contributor terminal. This means that the management server has not recorded the page resource address of the target page, and the terminal needs to load the page resource of the target page online and report the corresponding page resource address to the management server. When the response message includes a page resource address, the terminal's role in the distributed system is determined to be a user terminal. This means that the terminal can preload the page resource of the target page based on the page resource address of the page resource at the management server.

应用上述实施例,通过确定管理服务端是否存在页面资源地址,确定终端在分布式系统中的角色,既可以快速确定终端的角色,也可以在确定终端为使用者终端时直接获取到目标页面的页面资源地址,提高了页面资源地址的获取效率,从而提高预加载的效率。By applying the above embodiments, the role of the terminal in the distributed system can be determined by checking whether the management server has a page resource address. This not only allows for the rapid determination of the terminal's role but also enables the direct acquisition of the target page's page resource address when the terminal is identified as a user terminal. This improves the efficiency of obtaining page resource addresses and thus enhances the efficiency of preloading.

在一些实施例中,终端也可通过如下方式确定终端在分布式系统中的角色:获取目标页面的终端展示次数;当终端展示次数低于次数阈值时,确定终端在分布式系统中的角色为贡献者终端;当终端展示次数不低于次数阈值时,确定终端在分布式系统中的角色为使用者终端。In some embodiments, the terminal may also determine its role in the distributed system by: obtaining the number of times the target page is displayed by the terminal; when the number of times the terminal is displayed is lower than the number of times it is displayed, the terminal is determined to be a contributor terminal in the distributed system; when the number of times the terminal is displayed is not lower than the number of times it is displayed, the terminal is determined to be a user terminal in the distributed system.

这里,终端在确定终端在分布式系统中的角色时,首先可以获取目标页面的终端展示次数,需要说明的是,终端展示次数中的终端为广义上的终端,不特指某个终端。然后确定该终端展示次数是否低于次数阈值,该次数阈值可以是预先设置的,比如1次、3次;该次数阈值也可以是动态变化的,比如根据目标页面的页面资源的数据大小确定,页面资源的数据大小越大,次数阈值越高,当然,该次数阈值也可以是设置上限值,即当次数阈值达到这个上限值时,即使页面资源的数据大小增加,该次数阈值也会维持上限值不变;该次数阈值还可以是以目标页面的历史终端展示次数和页面资源地址的上报情况数据(比如页面资源地址是否完整)为样本训练机器学习模型,然后基于预训练的机器学习模型预测得到的。Here, when determining its role in the distributed system, the terminal first obtains the number of times the target page has been displayed on the terminal. It should be noted that the "terminal" in the display count is used in a broad sense, not referring to a specific terminal. Then, it determines whether the number of displays is below a threshold. This threshold can be pre-set, such as 1 or 3 times; it can also be dynamically changed, for example, determined by the size of the page resources—the larger the page resources, the higher the threshold; or it can have a set upper limit, meaning that even if the page resources increase in size, the threshold remains unchanged once it reaches this upper limit. Alternatively, the threshold can be obtained by training a machine learning model using historical terminal display counts and reported page resource address data (e.g., whether the page resource address is complete) as samples, and then predicting based on the pre-trained machine learning model.

当确定终端展示次数低于次数阈值时,确定终端在分布式系统中的角色为贡献者终端,即需要终端在线加载目标页面的页面资源并上报相应的页面资源地址至管理服务端;当终端展示次数不低于次数阈值时,确定终端在分布式系统中的角色为使用者终端,需要终端在线加载目标页面的页面资源并上报相应的页面资源地址至管理服务端。When the number of times a terminal is displayed is less than the threshold, the terminal is determined to be a contributor terminal in the distributed system, meaning the terminal needs to load the page resources of the target page online and report the corresponding page resource address to the management server; when the number of times a terminal is displayed is not less than the threshold, the terminal is determined to be a user terminal in the distributed system, meaning the terminal needs to load the page resources of the target page online and report the corresponding page resource address to the management server.

应用上述实施例,通过确定目标页面的终端展示次数是否低于次数阈值,确定终端在分布式系统中的角色,如此可以使得在展示终端展示次数低于次数阈值的目标页面时,终端均作为贡献者上报页面资源地址,以保证页面资源地址的完整性和可靠性,从而提高页面资源预加载的可靠性和完整性。By applying the above embodiments, the role of the terminal in the distributed system is determined by whether the number of times the target page is displayed on the terminal is lower than the threshold. This ensures that when the number of times the target page is displayed on the terminal is lower than the threshold, the terminal will report the page resource address as a contributor, thereby ensuring the integrity and reliability of the page resource address and improving the reliability and integrity of page resource preloading.

在一些实施例中,终端可通过如下方式上报目标页面的页面资源地址至管理服务端:当针对目标页面,终端的角色为贡献者终端时,响应于针对目标页面的页面展示指令,加载目标页面的页面资源,并记录页面资源的页面资源地址;将目标页面的页面资源地址上报至管理服务端。In some embodiments, a terminal may report the page resource address of a target page to the management server in the following manner: when the terminal is a contributing terminal for the target page, it loads the page resources of the target page in response to the page display instruction for the target page and records the page resource address of the page resources; and reports the page resource address of the target page to the management server.

这里,当针对目标页面,终端的角色为贡献者终端时,响应于针对目标页面的页面展示指令,加载目标页面的页面资源,同时记录页面资源的页面资源地址。在实际实施时,该页面资源可以存储目标页面对应的后台服务器中、或者数据库中,当终端加载目标页面的页面资源时,是发送页面资源的获取请求至后台服务器,后台服务器针对获取请求返回相应的页面资源的页面资源地址,终端则可以依据该页面资源地址加载页面资源,同时记录页面资源的页面资源地址。在实际应用中,该终端的角色为贡献者终端时,目标页面的页面资源的加载方式为在线加载。Here, when the terminal is a contributor terminal targeting a specific page, it responds to the page display instruction for that page by loading the page resources of that page and recording the page resource address. In practice, these page resources can be stored in the backend server or database corresponding to the target page. When the terminal loads the page resources, it sends a request to the backend server. The backend server returns the corresponding page resource address, which the terminal then uses to load the page resources, recording the address as well. In practical applications, when the terminal is a contributor terminal, the page resources of the target page are loaded online.

终端在加载完成目标页面的页面资源后,将目标页面的页面资源地址上报至管理服务端。在一些实施例中,终端可通过如下方式将目标页面的页面资源地址上报至管理服务端:当页面资源地址为至少两个时,对至少两个页面资源地址进行拼接处理,得到目标页面对应的资源地址列表;将目标页面对应的资源地址列表上报至管理服务端。After loading the page resources of the target page, the terminal reports the page resource address of the target page to the management server. In some embodiments, the terminal may report the page resource address of the target page to the management server in the following manner: when there are at least two page resource addresses, the at least two page resource addresses are concatenated to obtain a list of resource addresses corresponding to the target page; the list of resource addresses corresponding to the target page is then reported to the management server.

在实际应用中,目标页面的页面资源可以包括多个页面资源,比如图片资源、文本资源、视频资源等,不同的页面资源对应不同的页面资源地址,因此,页面资源地址可能为至少两个。当页面资源地址为至少两个时,则对至少两个页面资源地址进行拼接处理,得到目标页面对应的资源地址列表,然后将目标页面对应的资源地址列表上报至管理服务端。In practical applications, the page resources of a target page can include multiple page resources, such as image resources, text resources, and video resources. Different page resources correspond to different page resource addresses; therefore, there may be at least two page resource addresses. When there are at least two page resource addresses, these addresses are concatenated to obtain a list of resource addresses corresponding to the target page. This list is then reported to the management server.

在一些实施例中,该分布式系统还包括:至少两个上报者终端;基于此,终端可通过如下方式确定终端在分布式系统中的角色:从管理服务端处获取目标页面归属于预加载页面的结果;当结果指示目标页面为预加载页面时,确定终端在分布式系统中的角色;其中,该目标页面归属于预加载页面的结果,为管理服务端基于上报页面加载超时消息的上报者终端的数量所确定;其中,该页面加载超时消息,用于指示相应上报者终端加载目标页面的页面资源的加载时长超过时长阈值。In some embodiments, the distributed system further includes at least two reporting terminals. Based on this, the terminal can determine its role in the distributed system by obtaining a result from the management server indicating that the target page belongs to a preloaded page; when the result indicates that the target page is a preloaded page, the terminal determines its role in the distributed system; wherein the result indicating that the target page belongs to a preloaded page is determined by the number of reporting terminals based on the page loading timeout message; wherein the page loading timeout message is used to indicate that the loading time of the page resources of the target page by the corresponding reporting terminal exceeds a time threshold.

在一些实施例中,终端可通过如下方式上报页面加载超时消息至管理服务端:当针对目标页面,终端的角色为上报者终端时,响应于针对目标页面的页面展示指令,加载目标页面的页面资源,并获取相应的加载时长;当加载时长超过时长阈值时,上报页面加载超时消息至管理服务端。In some embodiments, a terminal may report a page loading timeout message to the management server in the following manner: when the terminal is the reporting terminal for the target page, it loads the page resources of the target page in response to the page display instruction for the target page and obtains the corresponding loading time; when the loading time exceeds the time threshold, it reports a page loading timeout message to the management server.

这里,该分布式系统中还包括至少两个上报者终端,该上报者终端,用于获取自身在线加载目标页面的页面资源的时长(也即页面加载时长),并在加载目标页面的页面资源的加载时长超过时长阈值时,上报页面加载超时消息至管理服务端。在实际应用中,当针对目标页面,终端在分布式系统中的角色为上报者终端时,终端响应于针对目标页面的页面展示指令,加载目标页面的页面资源,同时获取相应的加载时长,当加载时长超过时长阈值时,上报页面加载超时消息至管理服务端。Here, the distributed system also includes at least two reporting terminals. These reporting terminals are used to obtain the time taken for themselves to load the page resources of the target page (i.e., page loading time), and when the loading time exceeds a time threshold, they report a page loading timeout message to the management server. In practical applications, when the terminal acts as a reporting terminal in the distributed system for the target page, the terminal responds to the page display instruction for the target page, loads the page resources of the target page, and obtains the corresponding loading time. When the loading time exceeds the time threshold, it reports a page loading timeout message to the management server.

管理服务端接收到上报者终端上报的页面加载超时信息后,确定上报页面加载超时消息的上报者终端的数量,当该数量超过数量阈值(比如50个)时,则将目标页面确定为预加载页面,该数量阈值可以是预先设置并固定的,也可以是动态调整的。此时,终端从管理服务端处获取到指示目标页面为预加载页面的结果,继续确定终端在分布式系统中的角色,即确定终端在分布式系统中的角色为使用者终端还是贡献者终端。After receiving page load timeout information reported by a reporting terminal, the management server determines the number of reporting terminals that submitted the message. If this number exceeds a threshold (e.g., 50), the target page is designated as a preloaded page. This threshold can be pre-set and fixed, or it can be dynamically adjusted. At this point, the terminal receives the indication from the management server that the target page is a preloaded page and continues to determine its role in the distributed system, i.e., whether it is a user terminal or a contributor terminal.

基于此,管理服务端基于上报页面加载超时消息的上报者终端的数量确定目标页面是否为预加载页面,并当上报页面加载超时消息的上报者终端的数量超过数量阈值时,将目标页面确定为预加载页面。因此,终端针对任一目标页面,可通过如下方式确定终端是否为上报者终端:从管理服务端获取至少一个预加载页面;当至少一个预加载页面中包括目标页面时,针对目标页面,确定终端在分布式系统中的角色不为上报者终端;当至少一个预加载页面中不包括目标页面时,针对目标页面,确定终端在分布式系统中的角色为上报者终端。Based on this, the management server determines whether a target page is a preloaded page based on the number of reporting terminals that have submitted page load timeout messages. When the number of reporting terminals submitting page load timeout messages exceeds a threshold, the target page is designated as a preloaded page. Therefore, for any target page, a terminal can determine whether it is a reporting terminal in the following way: obtain at least one preloaded page from the management server; when at least one preloaded page includes the target page, the terminal's role in the distributed system is determined not to be a reporting terminal for the target page; when at least one preloaded page does not include the target page, the terminal's role in the distributed system is determined to be a reporting terminal for the target page.

参见图5,图5是本申请实施例提供的基于分布式系统的页面展示方法的流程示意图,包括:步骤301:终端向管理服务端发送针对预加载页面列表的获取请求,该预加载页面列表,用于存储预加载页面;步骤302:管理服务端接收到针对预加载页面列表的获取请求,返回预加载页面列表至终端;步骤303:当预加载页面列表中不包括目标页面时,针对目标页面,确定终端在分布式系统中的角色为上报者终端;步骤304:响应于针对目标页面的页面展示指令,加载目标页面的页面资源,并获取相应的加载时长;步骤305:当加载时长超过时长阈值时,上报页面加载超时消息至管理服务端;步骤306:管理服务端接收到页面加载超时消息,并当上报页面加载超时消息的上报者终端的数量超过数量阈值时,确定目标页面为预加载页面;步骤307:将目标页面加入预加载页面列表中。Referring to Figure 5, which is a flowchart illustrating a page display method based on a distributed system provided in this application embodiment, the method includes: Step 301: The terminal sends a request to the management server to obtain a preloaded page list, which is used to store preloaded pages; Step 302: The management server receives the request to obtain the preloaded page list and returns the preloaded page list to the terminal; Step 303: When the target page is not included in the preloaded page list, the terminal is determined to be a reporting terminal in the distributed system for the target page; Step 304: In response to the page display instruction for the target page, the page resources of the target page are loaded, and the corresponding loading time is obtained; Step 305: When the loading time exceeds the time threshold, a page loading timeout message is reported to the management server; Step 306: The management server receives the page loading timeout message, and when the number of reporting terminals reporting page loading timeout messages exceeds the number threshold, the target page is determined to be a preloaded page; Step 307: The target page is added to the preloaded page list.

在一些实施例中,该分布式系统还包括:上报者终端;基于此,终端可通过如下方式确定终端在分布式系统中的角色:从管理服务端处获取目标页面归属于预加载页面的结果;当结果指示目标页面为预加载页面时,确定终端在分布式系统中的角色;其中,该目标页面归属于预加载页面的结果,为管理服务端基于上报者终端上报的页面资源的数据大小所确定。In some embodiments, the distributed system further includes a reporter terminal; based on this, the terminal can determine its role in the distributed system by: obtaining the result from the management server that the target page belongs to the preloaded page; when the result indicates that the target page is a preloaded page, determining the role of the terminal in the distributed system; wherein the result that the target page belongs to the preloaded page is determined by the management server based on the data size of the page resources reported by the reporter terminal.

在一些实施例中,终端可通过如下方式上报页面资源的数据大小至管理服务端:当针对目标页面,终端的角色为上报者终端时,响应于针对目标页面的页面展示指令,加载目标页面的页面资源,并获取页面资源的数据大小;将页面资源的数据大小上报至管理服务端。In some embodiments, a terminal may report the size of page resources to the management server in the following manner: when the terminal is acting as the reporting terminal for a target page, it loads the page resources of the target page in response to a page display instruction for the target page and obtains the size of the page resources; and then reports the size of the page resources to the management server.

这里,该分布式系统中还包括上报者终端,该上报者终端,用于将自身加载的页面资源的数据大小上报至管理服务端。在实际应用中,当针对目标页面,终端的角色为上报者终端时,响应于针对目标页面的页面展示指令,在线加载目标页面的页面资源,并获取页面资源的数据大小,然后将页面资源的数据大小上报至管理服务端。Here, the distributed system also includes a reporting terminal, which is used to report the size of the page resources it loads to the management server. In practical applications, when the terminal acts as a reporting terminal for a target page, it responds to the page display instruction for the target page, loads the page resources of the target page online, obtains the size of the page resources, and then reports the size of the page resources to the management server.

管理服务端接收到上报者终端上报的页面资源的数据大小,当基于上报者终端上报的页面资源的数据大小超过数据大小阈值时,确定目标页面归属于预加载页面。此时,终端从管理服务端处获取到指示目标页面为预加载页面的结果,继续确定终端在分布式系统中的角色,即确定终端在分布式系统中的角色为使用者终端还是贡献者终端。The management server receives the data size of the page resources reported by the reporting terminal. When the data size of the page resources reported by the reporting terminal exceeds the data size threshold, it determines that the target page belongs to the pre-loaded page category. At this time, the terminal obtains the result indicating that the target page is a pre-loaded page from the management server and continues to determine the terminal's role in the distributed system, that is, whether the terminal's role in the distributed system is a user terminal or a contributor terminal.

参见图6,图6是本申请实施例提供的基于分布式系统的页面展示方法的流程示意图,包括:步骤401:终端向管理服务端发送针对预加载页面列表的获取请求,该预加载页面列表,用于存储预加载页面;步骤402:管理服务端接收到针对预加载页面列表的获取请求,返回预加载页面列表至终端;步骤403:当预加载页面列表中不包括目标页面时,针对目标页面,确定终端在分布式系统中的角色为上报者终端;步骤404:响应于针对目标页面的页面展示指令,加载目标页面的页面资源,并获取页面资源的数据大小;步骤405:将页面资源的数据大小上报至管理服务端;步骤406:管理服务端接收到页面资源的数据大小,并当页面资源的数据大小超过数据大小阈值时,确定目标页面为预加载页面;步骤407:将目标页面加入预加载页面列表中。Referring to Figure 6, which is a flowchart illustrating a page display method based on a distributed system provided in this application embodiment, the method includes: Step 401: The terminal sends a request to the management server to obtain a preloaded page list, which is used to store preloaded pages; Step 402: The management server receives the request to obtain the preloaded page list and returns the preloaded page list to the terminal; Step 403: When the target page is not included in the preloaded page list, the terminal's role in the distributed system is determined to be a reporting terminal for the target page; Step 404: In response to the page display instruction for the target page, the page resources of the target page are loaded, and the data size of the page resources is obtained; Step 405: The data size of the page resources is reported to the management server; Step 406: The management server receives the data size of the page resources, and when the data size of the page resources exceeds the data size threshold, the target page is determined to be a preloaded page; Step 407: The target page is added to the preloaded page list.

步骤102:当针对目标页面,终端的角色为使用者终端时,依据管理服务端处目标页面的页面资源地址,对目标页面的页面资源进行预加载。Step 102: When the terminal is a user terminal and the target page is the target page, the page resources of the target page are preloaded according to the page resource address of the target page in the management server.

其中,页面资源地址,为贡献者终端在加载页面资源后上报至管理服务端。The page resource address is the address that the contributor's terminal reports to the management server after loading the page resources.

这里,当针对目标页面,终端的角色为使用者终端时,则终端可以管理服务端处目标页面的页面资源地址,对目标页面的页面资源进行预加载。在实际实施时,终端可以发送针对页面资源地址的获取请求至管理服务端;管理服务端接收到针对页面资源地址的获取请求,返回目标页面的页面资源地址至终端;终端接收到返回的目标页面的页面资源地址,并依据目标页面的页面资源地址,对目标页面的页面资源进行预加载。其中,该页面资源地址,为贡献者终端在线加载目标页面的页面资源时,记录所加载的页面资源的页面资源地址,并在页面资源加载完成后上报至管理服务端的。Here, when the terminal acts as a user terminal for the target page, it can manage the page resource addresses of the target page on the server and preload the page resources of the target page. In practice, the terminal can send a request to the management server to obtain the page resource address; the management server receives the request and returns the page resource address of the target page to the terminal; the terminal receives the returned page resource address and preloads the page resources of the target page based on it. This page resource address is the address of the page resources loaded online by the contributor terminal, which is recorded and reported to the management server after the page resources are loaded.

在实际实施时,该预加载的目标页面的页面资源可以存储于终端本地的存储区域内,当触发针对目标页面的展示指令时,则可以基于预加载的页面资源展示目标页面,提高目标页面的展示速度。In practice, the page resources of the preloaded target page can be stored in the local storage area of the terminal. When a display instruction for the target page is triggered, the target page can be displayed based on the preloaded page resources, thereby improving the display speed of the target page.

在一些实施例中,终端对目标页面的页面资源进行预加载之后,还可确定在目标时长内页面展示指令是否被触发,得到相应的结果;当结果表征在目标时长内页面展示指令未被触发时,释放预加载的页面资源。In some embodiments, after the terminal preloads the page resources of the target page, it can also determine whether the page display instruction is triggered within the target duration and obtain the corresponding result; when the result indicates that the page display instruction is not triggered within the target duration, the preloaded page resources are released.

这里,终端在对目标页面的页面资源进行预加载之后,还可以确定在目标时长内页面展示指令是否被触发,得到相应的结果。在实际实施时,可以实时地检测在目标时长内页面展示指令是否被触发,也可以是周期性地检测在目标时长内页面展示指令是否被触发。当结果表征在目标时长内页面展示指令未被触发时,则释放预加载的页面资源。在实际实施时,该目标时长可以是预先设置的,也可以是以目标页面对应的历史展示数据(比如多长时间内被触发页面展示指令)为样本训练机器学习模型,然后基于预训练的机器学习模型预测得到的。Here, after preloading the page resources of the target page, the terminal can also determine whether the page display command has been triggered within the target duration and obtain the corresponding result. In practice, the triggering of the page display command within the target duration can be detected in real time or periodically. When the result indicates that the page display command has not been triggered within the target duration, the preloaded page resources are released. In practice, the target duration can be preset or obtained by training a machine learning model using historical display data of the target page (e.g., the time interval within which page display commands are triggered) as samples, and then predicting based on the pre-trained machine learning model.

应用上述实施例,通过确定在目标时长内页面展示指令是否被触发,并在确定在目标时长内页面展示指令未被触发时,释放预加载的页面资源,如此,能够减少内存的占用,提高存储空间的利用率。By applying the above embodiments, by determining whether the page display instruction is triggered within the target duration, and releasing the preloaded page resources when it is determined that the page display instruction is not triggered within the target duration, memory usage can be reduced and storage space utilization can be improved.

在一些实施例中,终端对目标页面的页面资源进行预加载之后,还可确定预加载的页面资源的第一版本,并获取管理服务端处的页面资源的第二版本;当第二版本与第一版本不一致时,依据管理服务端处目标页面的页面资源地址,对第二版本的页面资源进行预加载,并清除预加载的第一版本的页面资源。In some embodiments, after the terminal preloads the page resources of the target page, it can also determine the first version of the preloaded page resources and obtain the second version of the page resources at the management server. When the second version is inconsistent with the first version, the second version of the page resources is preloaded according to the page resource address of the target page at the management server, and the preloaded first version of the page resources is cleared.

这里,终端在对目标页面的页面资源进行预加载之后,还可以确定预加载的页面资源的第一版本,并获取管理服务端处的页面资源的第二版本,在实际实施时,可以实时地或者周期性地获取管理服务端处的页面资源的第二版本;然后将第一版本和第二版本进行比较,得到比较结果;当比较结果表征第二版本与第一版本不一致时,则表示页面资源的版本进行了更新,此时则依据管理服务端处目标页面的页面资源地址,对第二版本的页面资源进行预加载,以保证预加载的目标页面的页面资源为最新版本。同时,还可以清除预加载的第一版本的页面资源,以减少内存的占用,提高存储空间的利用率。Here, after preloading the page resources of the target page, the terminal can determine the first version of the preloaded page resources and obtain the second version of the page resources from the management server. In actual implementation, the second version of the page resources from the management server can be obtained in real time or periodically. Then, the first and second versions are compared to obtain the comparison result. When the comparison result indicates that the second version is inconsistent with the first version, it means that the page resource version has been updated. At this time, the second version of the page resources is preloaded according to the page resource address of the target page from the management server to ensure that the preloaded page resources of the target page are the latest version. At the same time, the preloaded first version of the page resources can also be cleared to reduce memory usage and improve storage space utilization.

应用上述实施例,通过获取管理服务端处的页面资源的第二版本、以及预加载的页面资源的第一版本,并比较第一版本和第二版本,确定页面资源是否发生了更新,并在更新后及时通过页面资源地址,对第二版本的页面资源进行预加载,以保证预加载的目标页面的页面资源为最新版本;同时清除预加载的第一版本的页面资源,减少内存的占用,提高存储空间的利用率。By applying the above embodiments, by obtaining the second version of the page resources at the management server and the first version of the preloaded page resources, and comparing the first version and the second version, it is determined whether the page resources have been updated. After the update, the second version of the page resources is preloaded in a timely manner through the page resource address to ensure that the page resources of the preloaded target page are the latest version. At the same time, the preloaded first version of the page resources is cleared to reduce memory usage and improve the utilization of storage space.

步骤103:当触发针对目标页面的页面展示指令时,基于预加载的页面资源展示目标页面。Step 103: When a page display instruction for the target page is triggered, the target page is displayed based on the preloaded page resources.

这里,终端在预加载完成目标页面的页面资源后,用户可以触发针对目标页面的页面展示指令,以基于页面展示指令触发目标页面的展示。此时,当触发针对目标页面的页面展示指令时,终端响应于页面展示指令,基于预加载的页面资源展示目标页面。Here, after the terminal has preloaded the page resources of the target page, the user can trigger a page display command for the target page, thereby triggering the display of the target page based on the page display command. At this time, when the page display command for the target page is triggered, the terminal responds to the page display command and displays the target page based on the preloaded page resources.

在一些实施例中,终端可获取针对页面资源的资源获取请求,该资源获取请求基于目标页面的页面展示指令所生成;对资源获取请求进行拦截处理。In some embodiments, the terminal may obtain a resource acquisition request for page resources, which is generated based on the page display instructions of the target page; and intercept the resource acquisition request.

这里,终端响应于页面展示指令展示目标页面时,实际情况下,当触发针对目标页面的页面展示指令时,终端会基于该目标页面的页面展示指令,生成针对页面资源的资源获取请求,以获取目标页面的页面资源。该资源获取请求为用于获取(比如从目标页面的后台服务器获取)页面资源的网络请求。而由于终端已经预加载完成目标页面的页面资源,无需再次获取目标页面的页面资源,因此,终端可以在获取到针对页面资源的资源获取请求,对资源获取请求进行拦截处理。从而,可以基于预加载的页面资源展示目标页面。Here, when the terminal responds to a page display instruction to display the target page, in practice, upon triggering the page display instruction for the target page, the terminal generates a resource acquisition request for the page resources based on that instruction to obtain the page resources of the target page. This resource acquisition request is a network request used to obtain (for example, from the target page's backend server) page resources. Since the terminal has already preloaded the page resources of the target page, it does not need to acquire them again. Therefore, the terminal can intercept and process the resource acquisition request upon receiving it. Thus, the target page can be displayed based on the preloaded page resources.

应用上述实施例,当终端获取到基于针对目标页面的页面展示指令生成的资源获取请求时,对资源获取请求进行拦截处理,避免页面资源的串行加载。Using the above embodiments, when the terminal receives a resource acquisition request generated based on a page display instruction for the target page, the resource acquisition request is intercepted to avoid serial loading of page resources.

在一些实施例中,终端可通过如下方式基于预加载的页面资源展示目标页面:加载目标页面的页面结构;基于页面结构,填充预加载的页面资源,以展示目标页面。In some embodiments, the terminal may display the target page based on preloaded page resources by: loading the page structure of the target page; and populating the preloaded page resources based on the page structure to display the target page.

这里,终端在基于预加载的页面资源展示目标页面时,可以首先加载目标页面的页面结构,比如在线加载页面HTML结构;然后基于页面结构,填充预加载的页面资源,并完成目标页面的渲染,以展示目标页面。在实际实施时,页面结构可以包括标题部分、图片部分、视频部分、正文部分、导航链接部分等等。可以将页面资源中对应各部分的页面资源,填充到页面结构中对应的部分,以展示目标页面。Here, when the terminal displays the target page based on preloaded page resources, it can first load the page structure of the target page, such as loading the page's HTML structure online; then, based on the page structure, it populates the preloaded page resources and completes the rendering of the target page to display it. In actual implementation, the page structure can include a title section, image section, video section, body section, navigation link section, etc. Page resources corresponding to each part of the page resources can be populated into the corresponding parts of the page structure to display the target page.

以页面结构为HTML结构为例,HTML结构可以包括:1)header部分:表示页面总的一个内容区块或者整个页面的标题;2)nav部分:表示页面中的导航链接部分;3)article部分:表示页面中的一块与上下文不相关的独立内容;4)section部分:表示页面中的一块内容区块,比如章节的页眉、页脚等,也可以标示文档的结构;5)aside部分:表示article元素内容之外的,和内容相关的辅助信息;6)footer部分:表示页面或者页面中的一块区域的页脚。Taking the HTML page structure as an example, the HTML structure can include: 1) header: representing the title of a content block or the entire page; 2) nav: representing the navigation links on the page; 3) article: representing an independent piece of content on the page that is not related to the context; 4) section: representing a content block on the page, such as the header or footer of a chapter, or indicating the structure of the document; 5) aside: representing supplementary information related to the content outside the article element; 6) footer: representing the footer of the page or a section of the page.

作为示例,参见图7,图7是本申请实施例提供的目标页面的页面结构的结构示意图。这里,页面结构包括:标题部分、图片部分、正文部分,如图7中A图所示;如此,可以将页面资源中对应各部分的页面资源,填充到页面结构中对应的部分,比如将页面资源中对应标题部分的页面资源“XX车展欢迎您”,填充至页面结构中的标题部分,将页面资源中对应图片部分的页面资源“图片1”,填充至页面结构中的图片部分,将页面资源中对应正文部分的页面资源“欢迎来到XX车展,这里有Y型号、Z型号等各种车……”,填充至页面结构中的正文部分,如图7中B图所示。As an example, refer to Figure 7, which is a schematic diagram of the page structure of the target page provided in the embodiment of this application. Here, the page structure includes: a title section, an image section, and a body text section, as shown in Figure A of Figure 7. In this way, page resources corresponding to each part in the page resources can be filled into the corresponding parts of the page structure. For example, the page resource "Welcome to XX Auto Show" corresponding to the title section in the page resources can be filled into the title section of the page structure; the page resource "Image 1" corresponding to the image section in the page resources can be filled into the image section of the page structure; and the page resource "Welcome to XX Auto Show, here are various cars such as Y model, Z model..." corresponding to the body text section in the page resources can be filled into the body text section of the page structure, as shown in Figure B of Figure 7.

应用上述实施例,基于预加载的页面资源并在线加载页面结构以展示目标页面,和提前加载完成目标页面(包括目标页面的代码执行)并隐藏的方式相比,降低了内存和网络资源的浪费,避免引起客户端不稳定的问题。By applying the above embodiments, the method of loading the page structure online based on preloaded page resources to display the target page, compared with the method of preloading the target page (including the execution of the target page's code) and hiding it, reduces the waste of memory and network resources and avoids problems that cause client instability.

参见图8,图8是本申请实施例提供的基于分布式系统的页面展示方法的流程示意图。这里,本申请实施例提供的基于分布式系统的页面展示方法包括:Referring to Figure 8, which is a flowchart illustrating a page display method based on a distributed system provided in an embodiment of this application, the page display method based on a distributed system provided in this embodiment includes:

步骤501:终端运行客户端,针对客户端中待加载页面资源的目标页面,向管理服务端发送针对预加载页面列表的获取请求。Step 501: The terminal runs the client and sends a request to the management server to obtain the list of preloaded pages for the target page of the page resources to be loaded in the client.

这里,该预加载页面列表,用于存储预加载页面。This list of preloaded pages is used to store preloaded pages.

步骤502:管理服务端接收到针对预加载页面列表的获取请求,返回预加载页面列表至终端。Step 502: The management server receives a request to retrieve the list of preloaded pages and returns the list of preloaded pages to the terminal.

步骤503:终端接收预加载页面列表,并确定预加载页面列表中是否包括目标页面,若否,执行步骤504,若是,执行步骤507。Step 503: The terminal receives the list of preloaded pages and determines whether the list of preloaded pages includes the target page. If not, proceed to step 504; if yes, proceed to step 507.

步骤504:针对目标页面,终端在分布式系统中的角色为上报者终端,响应于针对目标页面的页面展示指令,加载目标页面的页面资源,并获取相应的加载时长。Step 504: For the target page, the terminal's role in the distributed system is that of a reporting terminal. In response to the page display instruction for the target page, the terminal loads the page resources of the target page and obtains the corresponding loading time.

步骤505:当加载时长超过时长阈值时,终端上报页面加载超时消息至管理服务端。Step 505: When the loading time exceeds the time threshold, the terminal reports a page loading timeout message to the management server.

步骤506:管理服务端接收到页面加载超时消息,并当上报页面加载超时消息的上报者终端的数量超过数量阈值时,确定目标页面为预加载页面并加入加入预加载页面列表中。Step 506: When the management server receives the page load timeout message, and the number of reporting terminals that report the page load timeout message exceeds the number threshold, it determines the target page as a preloaded page and adds it to the preloaded page list.

步骤507:终端发送针对页面资源地址的获取请求至管理服务端。Step 507: The terminal sends a request to the management server to obtain the page resource address.

步骤508:管理服务端接收到针对页面资源地址的获取请求,返回响应消息至终端。Step 508: The management server receives the request for obtaining the page resource address and returns a response message to the terminal.

步骤509:终端接收到管理服务端基于获取请求返回的响应消息并确定响应消息中是否包括页面资源地址,若否,执行步骤510,若是,执行步骤513。Step 509: The terminal receives the response message returned by the management server based on the acquisition request and determines whether the response message includes the page resource address. If not, proceed to step 510; if yes, proceed to step 513.

步骤510:针对目标页面,终端在分布式系统中的角色为贡献者终端,响应于针对目标页面的页面展示指令,加载目标页面的页面资源,并记录页面资源的页面资源地址。Step 510: For the target page, the terminal acts as a contributor terminal in the distributed system. In response to the page display instruction for the target page, it loads the page resources of the target page and records the page resource address.

步骤511:终端将目标页面的页面资源地址上报至管理服务端。Step 511: The terminal reports the page resource address of the target page to the management server.

步骤512:管理服务端接收并存储目标页面的页面资源地址。Step 512: The management server receives and stores the page resource address of the target page.

步骤513:针对目标页面,终端在分布式系统中的角色为使用者终端,依据目标页面的页面资源地址,对目标页面的页面资源进行预加载。Step 513: For the target page, the terminal's role in the distributed system is that of a user terminal. Based on the page resource address of the target page, the page resources of the target page are preloaded.

步骤514:当触发针对目标页面的页面展示指令时,终端基于预加载的页面资源展示目标页面。Step 514: When a page display instruction for the target page is triggered, the terminal displays the target page based on the preloaded page resources.

应用本申请上述实施例,基于包括贡献者终端、使用者终端及管理服务端的分布式系统,通过分布式系统中的贡献者终端,在加载目标页面的页面资源后,将目标页面的页面资源地址上报至管理服务端;当针对终端待加载页面资源的目标页面,确定终端的角色为使用者终端时,终端依据管理服务端处的目标页面的页面资源地址,对目标页面的页面资源进行预加载,从而当触发针对目标页面的页面展示指令时,基于预加载的页面资源展示目标页面。如此,在进行页面预加载时,仅需加载页面的页面资源,在触发针对页面的页面展示指令时,才基于预加载的页面资源生成页面以进行展示,能够提高内存和网络资源的利用率,保证页面展示过程的稳定性,提高页面展示速度。By applying the above embodiments of this application, based on a distributed system including contributor terminals, user terminals, and a management server, the contributor terminals in the distributed system, after loading the page resources of the target page, report the page resource address of the target page to the management server. When the terminal's role is determined to be a user terminal for the target page whose page resources are to be loaded, the terminal preloads the page resources of the target page according to the page resource address of the target page at the management server. Thus, when a page display instruction for the target page is triggered, the target page is displayed based on the preloaded page resources. In this way, during page preloading, only the page resources of the page need to be loaded. When a page display instruction for the page is triggered, the page is generated and displayed based on the preloaded page resources. This can improve the utilization of memory and network resources, ensure the stability of the page display process, and improve the page display speed.

下面将说明本申请实施例在一个实际的应用场景中的示例性应用。下面以目标页面为落地页为例,对本申请实施例提供的基于分布式系统的页面展示方法进行说明。首先对本申请实施例涉及的名词进行解释,包括:The following will illustrate an exemplary application of the embodiments of this application in a real-world application scenario. Taking the target page as the landing page as an example, the page display method based on a distributed system provided by the embodiments of this application will be described below. First, the terms involved in the embodiments of this application will be explained, including:

1)无监督预加载:本申请实施例提供的用于解决“确定某个落地页是否需要执行预加载”以及“预加载的落地页的页面资源地址的来源”的问题、基于分布式系统的预加载方案。1) Unsupervised preloading: The preloading scheme based on a distributed system provided in this application embodiment is used to solve the problems of "determining whether a landing page needs to be preloaded" and "the source of the page resource address of the preloaded landing page".

相关技术中,通常预先执行页面代码并提前加载完成页面以达到页面预加载的目的,然后将加载完成的页面进行隐藏以在用户查看时展示。不仅会导致页面点击数据的提前上报,对很多业务(比如推广业务)来说,页面点击数据上报的混乱会大大影响计费,还会导致内存和网络资源的浪费,甚至引起展示落地页的客户端的不稳定。In related technologies, page code is typically executed in advance and the page is preloaded to achieve the purpose of page preloading. The loaded page is then hidden and displayed when the user views it. This not only leads to the premature reporting of page click data, which can significantly impact billing for many businesses (such as promotional businesses), but also wastes memory and network resources, and may even cause instability on the client displaying the landing page.

基于此,本申请实施例提供一种基于分布式系统的页面预加载方案,将客户端(或指客户端所处终端)组织成分布式系统,协同实现落地页的预加载,能够自动确定某个落地页是否需要执行预加载,以及自动确定需要执行预加载的落地页的页面资源地址。Based on this, this application provides a page preloading scheme based on a distributed system, which organizes the client (or the terminal where the client is located) into a distributed system to collaboratively implement the preloading of landing pages. It can automatically determine whether a landing page needs to be preloaded and automatically determine the page resource address of the landing page that needs to be preloaded.

在本申请实施例中,以提前预加载落地页的页面资源的方式实现落地页预加载,与隐藏提前打开Webview并加载落地页的方式有本质区别,本申请实施例中提前加载的是落地页的页面资源(比如落地页中的图片资源和文件资源),并未涉及页面代码的执行,不会影响页面点击数据的上报,也不会导致内存和网络资源浪费的问题,更不会引起展示落地页的客户端的不稳定。In this embodiment, the landing page preloading is achieved by preloading the landing page resources in advance, which is fundamentally different from the method of hiding and opening the WebView in advance and loading the landing page. In this embodiment, the landing page resources (such as image resources and file resources in the landing page) are preloaded in advance, without involving the execution of page code. It will not affect the reporting of page click data, nor will it cause the waste of memory and network resources, nor will it cause instability of the client displaying the landing page.

当落地页的页面资源预加载完成后,当用户触发针对该落地页的页面展示指令时,终端(客户端)在线加载页面结构(比如页面HTML结构),同时拦截Webview的资源获取请求,将本地预加载完成的落地页的页面资源返回至Webview,通过Webview完成落地页的渲染和展示,能够提升页面展示速度,并且打开速度非常稳定。Once the landing page's resources are preloaded, when a user triggers a page display command for that landing page, the terminal (client) loads the page structure (such as the page's HTML structure) online. At the same time, it intercepts the WebView's resource retrieval requests, returns the preloaded landing page resources locally to the WebView, and completes the rendering and display of the landing page through the WebView. This improves page display speed and ensures very stable loading speed.

在本申请实施例中,可通过如下方式1)确定落地页是否为需要执行预加载的页面,以尽可能减少设备资源浪费;以及2)确定落地页的页面资源的页面资源地址。接下来进行详细说明。In this embodiment, the following methods can be used to: 1) determine whether the landing page is a page that needs to be preloaded, so as to minimize the waste of device resources; and 2) determine the page resource address of the landing page. A detailed explanation follows.

在本申请实施例中,将整个用户群体(即用户群体对应的终端)、以及管理服务端作为一个分布式系统。本申请实施例提供的基于分布式系统的页面展示方案包括三个阶段,分别是超时上报阶段、资源地址上报阶段、以及预加载阶段。同时,可将分布式系统中的终端划分为三类,分别是上报者终端、贡献者终端、以及使用者终端。接下来结合图9分别进行说明,图9是本申请实施例提供的基于分布式系统的页面展示方法的流程示意图,包括:In this embodiment, the entire user group (i.e., the terminals corresponding to the user group) and the management server are treated as a distributed system. The page display scheme based on this distributed system provided in this embodiment includes three stages: timeout reporting, resource address reporting, and preloading. Simultaneously, the terminals in the distributed system can be divided into three categories: reporting terminals, contributor terminals, and user terminals. The following description, in conjunction with Figure 9, illustrates these stages. Figure 9 is a flowchart illustrating the page display method based on this distributed system provided in this embodiment, including:

第一阶段为超时上报阶段,终端作为分布式系统中的上报者终端。此时,针对终端运行的客户端内的各个落地页,终端判断落地页的在线加载时长是否超过时长阈值(例如3秒),若是,则认为该落地页的页面加载超,触发上报操作,向管理服务端上报该落地页对应的页面加载超时消息,并携带该落地页的页面标识(例如可以是页面的链接、链接的MD5、订单号、或者三者的组合等);需要说明的是,这里的页面加载超时指的是超出时长阈值,并非页面不能打开的超时,页面可能在等待较长时间后可以打开,也可能没法打开。The first stage is the timeout reporting stage, where the terminal acts as the reporting terminal in the distributed system. At this stage, for each landing page within the client running on the terminal, the terminal determines whether the online loading time of the landing page exceeds a timeout threshold (e.g., 3 seconds). If so, it considers the landing page to have exceeded the timeout threshold, triggering a reporting operation to report a page loading timeout message corresponding to the landing page to the management server, along with the page identifier of the landing page (e.g., the page link, the link's MD5 hash, the order number, or a combination of these). It should be noted that the page loading timeout here refers to exceeding the timeout threshold, not a timeout indicating the page cannot be opened. The page may open after a considerable wait, or it may not open at all.

管理服务端以落地页的页面标识为KEY,对上报的页面加载超时消息进行计数,在实际实施时,对不同上报者终端的上报进行累计计数,同一个上报者终端的上报不做累计。当管理服务端确定某个目标落地页的页面标识对应的计数满足预加载触发条件,比如超过计数阈值t(例如50次)时,将该目标落地页确定为需要预加载的预加载页面。The management server uses the landing page's page identifier as the key to count reported page load timeout messages. In practice, reports from different reporting terminals are cumulatively counted, but reports from the same reporting terminal are not cumulatively counted. When the management server determines that the count corresponding to the page identifier of a target landing page meets the preloading trigger condition, such as exceeding the counting threshold t (e.g., 50 times), it identifies that target landing page as a preloadable page that needs to be preloaded.

第二阶段为资源地址上报阶段,终端作为分布式系统中的贡献者终端。此时,贡献者终端当在线加载目标落地页的过程中,记录目标落地页的页面资源地址,并将页面资源地址进行拼接处理,得到页面资源地址列表,并将页面资源地址列表上报至管理服务端。The second stage is the resource address reporting stage, where the terminal acts as a contributor terminal in the distributed system. During this stage, as the contributor terminal loads the target landing page online, it records the page resource addresses of the target landing page, concatenates these addresses to obtain a list of page resource addresses, and then reports this list to the management server.

第三阶段为预加载阶段,终端作为分布式系统中的使用者终端。对于目标落地页,后续打开该目标落地页的使用者终端,从管理服务端获取该目标落地页的页面资源地址列表,并依据页面资源地址列表中的页面资源地址进行页面资源的预加载。当触发针对该目标落地页的页面展示指令时,拦截Webview中的资源请获取求,并提供本地预加载的页面资源进行页面展示。The third stage is the preloading stage, where the terminal acts as a user terminal in the distributed system. For the target landing page, subsequent user terminals that open the target landing page obtain a list of page resource addresses for that target landing page from the management server and preload the page resources based on the page resource addresses in the list. When a page display instruction for the target landing page is triggered, the resource request in the WebView is intercepted, and the locally preloaded page resources are provided for page display.

上述三个阶段为单个落地页的处理过程。任意一个终端都可以兼具上述三种角色,对于从管理服务端拉取到的不同web页面的信息,执行不同角色的任务。因此,上述三个阶段中,终端需要在客户端启动时,执行一次请求至管理服务端,以获取包括至少一个预加载页面的落地页列表,从而基于落地页列表来确定针对目标落地页,该终端在分布式系统中的角色。The above three stages represent the processing of a single landing page. Any terminal can perform all three roles, executing different tasks for different web pages retrieved from the management server. Therefore, in the above three stages, the terminal needs to make a request to the management server upon client startup to obtain a list of landing pages, including at least one preloaded page. Based on this list, the terminal's role in the distributed system is determined for the target landing page.

对于落地页列表不包括目标落地页的情况,针对该目标落地页,终端在分布式系统中的角色为上报者终端;对于落地页列表包括目标落地页的情况,则从管理服务端获取页面资源地址列表,当页面资源地址列表为空时,则针对该目标落地页,终端在分布式系统中的角色为贡献者终端;当页面资源地址列表不为空时,则针对该目标落地页,终端在分布式系统中的角色为使用者终端。从而基于不同的角色,执行不同的处理,如上述三个阶段所公开的。If the target landing page is not included in the landing page list, the terminal's role in the distributed system is that of a reporting terminal for that target landing page. If the target landing page is included in the landing page list, the terminal obtains a list of page resource addresses from the management server. If the list is empty, the terminal's role in the distributed system is that of a contributing terminal for that target landing page; if the list is not empty, the terminal's role in the distributed system is that of a user terminal for that target landing page. Thus, different processing is performed based on different roles, as disclosed in the three stages above.

在实际应用中,上述涉及的参数可以调整,比如页面加载时长对应的时长阈值“3秒”可以根据需要修改,比如修改为5秒。管理服务端确定落地页是否为预加载页面的计数阈值的次数t也可以修改,比如修改为30次。当然,上述参数也可以是动态调整的。In practical applications, the parameters mentioned above can be adjusted. For example, the page load time threshold of "3 seconds" can be modified as needed, such as to 5 seconds. The number of times the management server determines whether the landing page is a preloaded page, 't', can also be modified, for example, to 30 times. Of course, the above parameters can also be dynamically adjusted.

参见图10,图10是本申请实施例提供的目标页面的展示示意图。这里,如图10中A图所示,终端接收到针对媒体信息流中媒体信息1的触发操作(如点击操作),呈现该媒体信息1对应的目标页面,即web落地页,如图10中B图所示。本申请实施例可以应用于客户端打开web落地页的场景上,应用范围广,提升落地页的打开速度和用户体验的同时,也提升了落地页的到达率,有利于提升推广信息的效果数据。Referring to Figure 10, which is a schematic diagram illustrating the target page provided in this embodiment of the application, as shown in Figure 10A, the terminal receives a trigger operation (such as a click operation) on media information 1 in the media information stream and presents the target page corresponding to media information 1, i.e., the web landing page, as shown in Figure 10B. This embodiment of the application can be applied to scenarios where clients open web landing pages, has a wide range of applications, improves the opening speed and user experience of landing pages, and also increases the reach rate of landing pages, which is beneficial for improving the effectiveness data of promotional information.

应用本申请上述实施例,通过分布式系统包括的上报者终端、贡献者终端、以及使用者终端,能够自动确定需要执行预加载的落地页、以及获取到需要执行预加载的落地页的页面资源的页面资源地址,并实现落地页的页面资源的预加载,能够明显提升落地页的打开速度,提高用户体验和页面到达率。By applying the above embodiments of this application, through the reporter terminal, contributor terminal and user terminal included in the distributed system, it is possible to automatically determine the landing page that needs to be preloaded and obtain the page resource address of the landing page that needs to be preloaded, and realize the preloading of the landing page's page resources, which can significantly improve the landing page's opening speed, improve user experience and page reach rate.

可以理解的是,在本申请实施例中,涉及到用户信息等相关的数据,当本申请实施例运用到具体产品或技术中时,需要获得用户许可或者同意,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。It is understood that in the embodiments of this application, data such as user information are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

下面继续说明本申请实施例提供的基于分布式系统的页面展示装置555的实施为软件模块的示例性结构,在一些实施例中,如图2所示,存储在存储器550的基于分布式系统的页面展示装置555中的软件模块可以包括:The following continues to describe the exemplary structure of the distributed system-based page display device 555 provided in the embodiments of this application as a software module. In some embodiments, as shown in FIG2, the software module stored in the distributed system-based page display device 555 in the memory 550 may include:

确定模块5551,用于针对终端待加载页面资源的目标页面,确定所述终端在所述分布式系统中的角色;The determination module 5551 is used to determine the role of the terminal in the distributed system for the target page of the page resources to be loaded on the terminal.

预加载模块5552,用于当针对所述目标页面,所述终端的角色为使用者终端时,依据所述管理服务端处所述目标页面的页面资源地址,对所述目标页面的页面资源进行预加载;The preloading module 5552 is used to preload the page resources of the target page according to the page resource address of the target page at the management server when the terminal is a user terminal for the target page.

其中,所述页面资源地址,为所述贡献者终端在加载所述页面资源后上报至所述管理服务端;The page resource address is the address that the contributor terminal reports to the management server after loading the page resource.

展示模块5553,用于当触发针对所述目标页面的页面展示指令时,基于预加载的所述页面资源展示所述目标页面。The display module 5553 is used to display the target page based on the preloaded page resources when a page display instruction for the target page is triggered.

在一些实施例中,所述确定模块5551,还用于发送针对所述页面资源地址的获取请求至所述管理服务端,并接收所述管理服务端基于所述获取请求返回的响应消息;当所述响应消息中不包括所述页面资源地址时,确定所述终端在所述分布式系统中的角色为所述贡献者终端;当所述响应消息中包括所述页面资源地址时,确定所述终端在所述分布式系统中的角色为所述使用者终端。In some embodiments, the determining module 5551 is further configured to send a request to obtain the page resource address to the management server and receive a response message returned by the management server based on the request; when the response message does not include the page resource address, the role of the terminal in the distributed system is determined to be the contributor terminal; when the response message includes the page resource address, the role of the terminal in the distributed system is determined to be the user terminal.

在一些实施例中,所述确定模块5551,还用于获取所述目标页面的终端展示次数;当所述终端展示次数低于次数阈值时,确定所述终端在所述分布式系统中的角色为所述贡献者终端;当所述终端展示次数不低于次数阈值时,确定所述终端在所述分布式系统中的角色为所述使用者终端。In some embodiments, the determining module 5551 is further configured to obtain the number of times the target page is displayed on a terminal; when the number of times the terminal is displayed is lower than a threshold, the role of the terminal in the distributed system is determined to be the contributor terminal; when the number of times the terminal is displayed is not lower than the threshold, the role of the terminal in the distributed system is determined to be the user terminal.

在一些实施例中,所述分布式系统还包括:至少两个上报者终端;所述确定模块5551,还用于从所述管理服务端处获取所述目标页面归属于预加载页面的结果;当所述结果指示所述目标页面为预加载页面时,确定所述终端在所述分布式系统中的角色;其中,所述目标页面归属于预加载页面的结果,为所述管理服务端基于上报页面加载超时消息的上报者终端的数量所确定;其中,所述页面加载超时消息,用于指示相应上报者终端加载所述目标页面的页面资源的时长超过时长阈值。In some embodiments, the distributed system further includes: at least two reporting terminals; the determining module 5551 is further configured to obtain from the management server the result that the target page belongs to a preloaded page; when the result indicates that the target page is a preloaded page, determine the role of the terminal in the distributed system; wherein, the result that the target page belongs to a preloaded page is determined by the management server based on the number of reporting terminals that report page loading timeout messages; wherein, the page loading timeout message is used to indicate that the time for the corresponding reporting terminal to load the page resources of the target page exceeds a time threshold.

在一些实施例中,所述确定模块5551,还用于当针对所述目标页面,所述终端的角色为上报者终端时,响应于针对所述目标页面的页面展示指令,加载所述目标页面的页面资源,并获取相应的加载时长;当所述加载时长超过时长阈值时,上报所述页面加载超时消息至所述管理服务端。In some embodiments, the determining module 5551 is further configured to, when the terminal is a reporting terminal for the target page, load the page resources of the target page in response to the page display instruction for the target page and obtain the corresponding loading time; when the loading time exceeds the time threshold, report the page loading timeout message to the management server.

在一些实施例中,所述确定模块5551,还用于当针对所述目标页面,所述终端的角色为贡献者终端时,响应于针对所述目标页面的页面展示指令,加载所述目标页面的页面资源,并记录所述页面资源的页面资源地址;将所述目标页面的页面资源地址上报至所述管理服务端。In some embodiments, the determining module 5551 is further configured to, when the terminal is a contributor terminal for the target page, respond to a page display instruction for the target page, load the page resources of the target page, and record the page resource address of the page resources; and report the page resource address of the target page to the management server.

在一些实施例中,所述确定模块5551,还用于当所述页面资源地址为至少两个时,对所述至少两个页面资源地址进行拼接处理,得到所述目标页面对应的资源地址列表;将所述目标页面对应的资源地址列表上报至所述管理服务端。In some embodiments, the determining module 5551 is further configured to, when there are at least two page resource addresses, concatenate the at least two page resource addresses to obtain a list of resource addresses corresponding to the target page; and report the list of resource addresses corresponding to the target page to the management server.

在一些实施例中,所述分布式系统还包括:上报者终端;所述确定模块5551,还用于从所述管理服务端处获取所述目标页面归属于预加载页面的结果;当所述结果指示所述目标页面为预加载页面时,确定所述终端在所述分布式系统中的角色;其中,所述目标页面归属于预加载页面的结果,为所述管理服务端基于所述上报者终端上报的所述页面资源的数据大小所确定。In some embodiments, the distributed system further includes: a reporter terminal; the determining module 5551 is further configured to obtain from the management server the result that the target page belongs to a preloaded page; when the result indicates that the target page is a preloaded page, determine the role of the terminal in the distributed system; wherein, the result that the target page belongs to a preloaded page is determined by the management server based on the data size of the page resource reported by the reporter terminal.

在一些实施例中,所述确定模块5551,还用于当针对所述目标页面,所述终端的角色为上报者终端时,响应于针对所述目标页面的页面展示指令,加载所述目标页面的页面资源,并获取所述页面资源的数据大小;将所述页面资源的数据大小上报至所述管理服务端。In some embodiments, the determining module 5551 is further configured to, when the terminal is a reporting terminal for the target page, in response to a page display instruction for the target page, load the page resources of the target page and obtain the data size of the page resources; and report the data size of the page resources to the management server.

在一些实施例中,所述展示模块5553,还用于获取针对所述页面资源的资源获取请求,所述资源获取请求基于所述目标页面的页面展示指令所生成;对所述资源获取请求进行拦截处理。In some embodiments, the display module 5553 is further configured to acquire a resource acquisition request for the page resource, the resource acquisition request being generated based on the page display instruction of the target page; and to intercept the resource acquisition request.

在一些实施例中,所述展示模块5553,还用于加载所述目标页面的页面结构;基于所述页面结构,填充预加载的所述页面资源,以展示所述目标页面。In some embodiments, the display module 5553 is further configured to load the page structure of the target page; and based on the page structure, populate the preloaded page resources to display the target page.

在一些实施例中,所述展示模块5553,还用于确定在目标时长内所述页面展示指令是否被触发,得到相应的结果;当所述结果表征在目标时长内所述页面展示指令未被触发时,释放预加载的所述页面资源。In some embodiments, the display module 5553 is further configured to determine whether the page display instruction is triggered within a target duration and obtain a corresponding result; when the result indicates that the page display instruction is not triggered within the target duration, the preloaded page resources are released.

在一些实施例中,所述预加载模块5552,还用于确定预加载的所述页面资源的第一版本,并获取所述管理服务端处的所述页面资源的第二版本;当所述第二版本与所述第一版本不一致时,依据所述管理服务端处所述目标页面的页面资源地址,对所述第二版本的页面资源进行预加载,并清除预加载的所述第一版本的页面资源。In some embodiments, the preloading module 5552 is further configured to determine a first version of the preloaded page resource and obtain a second version of the page resource at the management server; when the second version is inconsistent with the first version, the second version of the page resource is preloaded according to the page resource address of the target page at the management server, and the preloaded first version of the page resource is cleared.

应用本申请上述实施例,基于包括贡献者终端、使用者终端及管理服务端的分布式系统,通过分布式系统中的贡献者终端,在加载目标页面的页面资源后,将目标页面的页面资源地址上报至管理服务端;当针对终端待加载页面资源的目标页面,确定终端的角色为使用者终端时,终端依据管理服务端处的目标页面的页面资源地址,对目标页面的页面资源进行预加载,从而当触发针对目标页面的页面展示指令时,基于预加载的页面资源展示目标页面。如此,在进行页面预加载时,仅需加载页面的页面资源,在触发针对页面的页面展示指令时,才基于预加载的页面资源生成页面以进行展示,能够提高内存和网络资源的利用率,保证页面展示过程的稳定性,提高页面展示速度。By applying the above embodiments of this application, based on a distributed system including contributor terminals, user terminals, and a management server, the contributor terminals in the distributed system, after loading the page resources of the target page, report the page resource address of the target page to the management server. When the terminal's role is determined to be a user terminal for the target page whose page resources are to be loaded, the terminal preloads the page resources of the target page according to the page resource address of the target page at the management server. Thus, when a page display instruction for the target page is triggered, the target page is displayed based on the preloaded page resources. In this way, during page preloading, only the page resources of the page need to be loaded. When a page display instruction for the page is triggered, the page is generated and displayed based on the preloaded page resources. This can improve the utilization of memory and network resources, ensure the stability of the page display process, and improve the page display speed.

本申请实施例还提供一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行本申请实施例提供的基于分布式系统的页面展示方法。This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the page display method based on a distributed system provided in this application.

本申请实施例还提供一种计算机可读存储介质,其中存储有可执行指令,当可执行指令被处理器执行时,将引起处理器执行本申请实施例提供的基于分布式系统的页面展示方法。This application also provides a computer-readable storage medium storing executable instructions. When the executable instructions are executed by a processor, the processor will execute the page display method based on a distributed system provided in this application.

在一些实施例中,计算机可读存储介质可以是FRAM、ROM、PROM、EP ROM、EEPROM、闪存、磁表面存储器、光盘、或CD-ROM等存储器;也可以是包括上述存储器之一或任意组合的各种设备。In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

在一些实施例中,可执行指令可以采用程序、软件、软件模块、脚本或代码的形式,按任意形式的编程语言(包括编译或解释语言,或者声明性或过程性语言)来编写,并且其可按任意形式部署,包括被部署为独立的程序或者被部署为模块、组件、子例程或者适合在计算环境中使用的其它单元。In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

作为示例,可执行指令可以但不一定对应于文件系统中的文件,可以可被存储在保存其它程序或数据的文件的一部分,例如,存储在超文本标记语言(HTML,Hyper TextMarkup Language)文档中的一个或多个脚本中,存储在专用于所讨论的程序的单个文件中,或者,存储在多个协同文件(例如,存储一个或多个模块、子程序或代码部分的文件)中。As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

作为示例,可执行指令可被部署为在一个计算设备上执行,或者在位于一个地点的多个计算设备上执行,又或者,在分布在多个地点且通过通信网络互连的多个计算设备上执行。As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

以上所述,仅为本申请的实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和范围之内所作的任何修改、等同替换和改进等,均包含在本申请的保护范围之内。The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims (18)

1.一种基于分布式系统的页面展示方法,其特征在于,所述分布式系统包括:贡献者终端、使用者终端、上报者终端及管理服务端,所述方法包括:1. A page display method based on a distributed system, characterized in that the distributed system comprises: contributor terminals, user terminals, reporting terminals, and a management server, and the method comprises: 针对终端待加载页面资源的目标页面,确定所述终端在所述分布式系统中的角色;For the target page of the page resources to be loaded on the terminal, determine the role of the terminal in the distributed system; 其中,所述目标页面归属于预加载页面的结果是由所述管理服务端通过以下方式至少之一确定的:当加载所述目标页面的时长超过时长阈值的所述上报者终端的数量超过数量阈值时,将所述目标页面确定为所述预加载页面;当所述上报者终端加载所述目标页面的页面资源的数据大小超过数据大小阈值时,确定所述目标页面归属于所述预加载页面;The result of the target page belonging to the preloaded page is determined by the management server through at least one of the following methods: when the number of reporting terminals whose loading time of the target page exceeds the time threshold exceeds the number threshold, the target page is determined to be the preloaded page; when the data size of the page resources of the target page loaded by the reporting terminal exceeds the data size threshold, the target page is determined to belong to the preloaded page. 当针对所述目标页面,所述终端的角色为使用者终端且所述目标页面为所述预加载页面时,依据所述管理服务端处所述目标页面的页面资源地址,对所述目标页面的页面资源进行预加载;When the terminal is a user terminal and the target page is the preloaded page, the page resources of the target page are preloaded according to the page resource address of the target page at the management server. 其中,所述页面资源地址,是由所述贡献者终端通过以下方式上报至所述管理服务端的:响应于针对所述目标页面的页面展示指令,加载所述目标页面的页面资源,并记录所述页面资源的页面资源地址,将所述目标页面的页面资源地址上报至所述管理服务端;The page resource address is reported to the management server by the contributor terminal in the following way: in response to the page display instruction for the target page, the page resources of the target page are loaded, the page resource address of the page resources is recorded, and the page resource address of the target page is reported to the management server. 当触发针对所述目标页面的页面展示指令时,基于预加载的所述页面资源展示所述目标页面。When a page display instruction for the target page is triggered, the target page is displayed based on the preloaded page resources. 2.如权利要求1所述的方法,其特征在于,所述确定所述终端在所述分布式系统中的角色,包括:2. The method as described in claim 1, wherein determining the role of the terminal in the distributed system comprises: 发送针对所述页面资源地址的获取请求至所述管理服务端,并接收所述管理服务端基于所述获取请求返回的响应消息;Send a request to obtain the page resource address to the management server, and receive a response message returned by the management server based on the request; 当所述响应消息中不包括所述页面资源地址时,确定所述终端在所述分布式系统中的角色为所述贡献者终端;When the response message does not include the page resource address, the terminal is determined to be the contributor terminal in the distributed system. 当所述响应消息中包括所述页面资源地址时,确定所述终端在所述分布式系统中的角色为所述使用者终端。When the response message includes the page resource address, the role of the terminal in the distributed system is determined to be the user terminal. 3.如权利要求1所述的方法,其特征在于,所述确定所述终端在所述分布式系统中的角色,包括:3. The method as described in claim 1, wherein determining the role of the terminal in the distributed system comprises: 获取所述目标页面的终端展示次数;Obtain the number of times the target page is displayed on the terminal; 当所述终端展示次数低于次数阈值时,确定所述终端在所述分布式系统中的角色为所述贡献者终端;When the number of times the terminal is displayed is less than the threshold, the terminal is determined to be the contributor terminal in the distributed system. 当所述终端展示次数不低于次数阈值时,确定所述终端在所述分布式系统中的角色为所述使用者终端。When the number of times the terminal is displayed is not less than the threshold, the terminal is determined to be the user terminal in the distributed system. 4.如权利要求1所述的方法,其特征在于,所述分布式系统还包括:至少两个上报者终端;所述确定所述终端在所述分布式系统中的角色,包括:4. The method as described in claim 1, wherein the distributed system further comprises: at least two reporting terminals; and determining the role of the terminal in the distributed system comprises: 从所述管理服务端处获取所述目标页面归属于预加载页面的结果;Obtain the result of the target page belonging to the preloaded page from the management server; 当所述结果指示所述目标页面为预加载页面时,确定所述终端在所述分布式系统中的角色;When the result indicates that the target page is a preloaded page, the role of the terminal in the distributed system is determined; 其中,所述目标页面归属于预加载页面的结果,为所述管理服务端基于上报页面加载超时消息的上报者终端的数量所确定;The target page is attributed to the preloaded page, which is determined by the number of reporting terminal devices that report page loading timeout messages by the management server. 其中,所述页面加载超时消息,用于指示相应上报者终端加载所述目标页面的页面资源的时长超过时长阈值。The page loading timeout message is used to indicate that the time taken for the corresponding reporting terminal to load the page resources of the target page exceeds a time threshold. 5.如权利要求4所述的方法,其特征在于,所述方法还包括:5. The method as described in claim 4, wherein the method further comprises: 当针对所述目标页面,所述终端的角色为上报者终端时,响应于针对所述目标页面的页面展示指令,加载所述目标页面的页面资源,并获取相应的加载时长;When the terminal acts as a reporting terminal for the target page, it responds to the page display instruction for the target page, loads the page resources of the target page, and obtains the corresponding loading time. 当所述加载时长超过时长阈值时,上报所述页面加载超时消息至所述管理服务端。When the loading time exceeds the time threshold, a page loading timeout message is reported to the management server. 6.如权利要求1所述的方法,其特征在于,所述方法还包括:6. The method as described in claim 1, wherein the method further comprises: 当所述页面资源地址为至少两个时,对所述至少两个页面资源地址进行拼接处理,得到所述目标页面对应的资源地址列表;When there are at least two page resource addresses, the at least two page resource addresses are concatenated to obtain a list of resource addresses corresponding to the target page. 将所述目标页面对应的资源地址列表上报至所述管理服务端。The list of resource addresses corresponding to the target page is reported to the management server. 7.如权利要求1所述的方法,其特征在于,所述方法还包括:7. The method as described in claim 1, wherein the method further comprises: 从所述管理服务端处获取所述目标页面归属于预加载页面的结果;Obtain the result of the target page belonging to the preloaded page from the management server; 当所述结果指示所述目标页面为预加载页面时,确定所述终端在所述分布式系统中的角色。When the result indicates that the target page is a preloaded page, the role of the terminal in the distributed system is determined. 8.如权利要求7所述的方法,其特征在于,所述方法还包括:8. The method as described in claim 7, wherein the method further comprises: 当针对所述目标页面,所述终端的角色为上报者终端时,响应于针对所述目标页面的页面展示指令,加载所述目标页面的页面资源,并获取所述页面资源的数据大小;When the terminal acts as a reporting terminal for the target page, it responds to the page display instruction for the target page, loads the page resources of the target page, and obtains the data size of the page resources; 将所述页面资源的数据大小上报至所述管理服务端。The size of the page resources is reported to the management server. 9.如权利要求1所述的方法,其特征在于,所述方法还包括:9. The method as described in claim 1, wherein the method further comprises: 获取针对所述页面资源的资源获取请求,所述资源获取请求基于所述目标页面的页面展示指令所生成;Obtain a resource acquisition request for the page resource, the resource acquisition request being generated based on the page display instructions of the target page; 对所述资源获取请求进行拦截处理。The resource acquisition request is intercepted. 10.如权利要求1所述的方法,其特征在于,所述基于预加载的所述页面资源展示所述目标页面,包括:10. The method as described in claim 1, wherein displaying the target page based on the preloaded page resources comprises: 加载所述目标页面的页面结构;Load the page structure of the target page; 基于所述页面结构,填充预加载的所述页面资源,以展示所述目标页面。Based on the page structure, the preloaded page resources are populated to display the target page. 11.如权利要求1所述的方法,其特征在于,所述对所述目标页面的页面资源进行预加载之后,所述方法还包括:11. The method as described in claim 1, characterized in that, after preloading the page resources of the target page, the method further includes: 确定在目标时长内所述页面展示指令是否被触发,得到相应的结果;Determine whether the page display instruction is triggered within the target duration and obtain the corresponding result; 当所述结果表征在目标时长内所述页面展示指令未被触发时,释放预加载的所述页面资源。When the result indicates that the page display instruction has not been triggered within the target duration, the preloaded page resources are released. 12.如权利要求1所述的方法,其特征在于,所述对所述目标页面的页面资源进行预加载之后,所述方法还包括:12. The method as described in claim 1, wherein after preloading the page resources of the target page, the method further includes: 确定预加载的所述页面资源的第一版本,并获取所述管理服务端处的所述页面资源的第二版本;Determine the first version of the preloaded page resource and obtain the second version of the page resource from the management server; 当所述第二版本与所述第一版本不一致时,依据所述管理服务端处所述目标页面的页面资源地址,对所述第二版本的页面资源进行预加载,并清除预加载的所述第一版本的页面资源。When the second version is inconsistent with the first version, the page resources of the second version are preloaded according to the page resource address of the target page at the management server, and the preloaded page resources of the first version are cleared. 13.一种基于分布式系统的页面展示装置,其特征在于,所述分布式系统包括:贡献者终端、使用者终端、上报者终端及管理服务端,所述装置包括:13. A page display device based on a distributed system, characterized in that the distributed system comprises: contributor terminals, user terminals, reporting terminals, and a management server, and the device comprises: 确定模块,用于针对终端待加载页面资源的目标页面,确定所述终端在所述分布式系统中的角色;The determination module is used to determine the role of the terminal in the distributed system for the target page of the page resources to be loaded on the terminal; 其中,所述目标页面归属于预加载页面的结果是由所述管理服务端通过以下方式至少之一确定的:当加载所述目标页面的时长超过时长阈值的所述上报者终端的数量超过数量阈值时,将所述目标页面确定为所述预加载页面;当所述上报者终端加载所述目标页面的页面资源的数据大小超过数据大小阈值时,确定所述目标页面归属于所述预加载页面;The result of the target page belonging to the preloaded page is determined by the management server through at least one of the following methods: when the number of reporting terminals whose loading time of the target page exceeds the time threshold exceeds the number threshold, the target page is determined to be the preloaded page; when the data size of the page resources of the target page loaded by the reporting terminal exceeds the data size threshold, the target page is determined to belong to the preloaded page. 预加载模块,用于当针对所述目标页面,所述终端的角色为使用者终端且所述目标页面为所述预加载页面时,依据所述管理服务端处所述目标页面的页面资源地址,对所述目标页面的页面资源进行预加载;The preloading module is used to preload the page resources of the target page according to the page resource address of the target page at the management server when the terminal is a user terminal and the target page is the preloaded page. 其中,所述页面资源地址,是由所述贡献者终端通过以下方式上报至所述管理服务端的:响应于针对所述目标页面的页面展示指令,加载所述目标页面的页面资源,并记录所述页面资源的页面资源地址,将所述目标页面的页面资源地址上报至所述管理服务端;The page resource address is reported to the management server by the contributor terminal in the following way: in response to the page display instruction for the target page, the page resources of the target page are loaded, the page resource address of the page resources is recorded, and the page resource address of the target page is reported to the management server. 展示模块,用于当触发针对所述目标页面的页面展示指令时,基于预加载的所述页面资源展示所述目标页面。The display module is used to display the target page based on the preloaded page resources when a page display instruction for the target page is triggered. 14.如权利要求13所述的装置,其特征在于,所述确定所述终端在所述分布式系统中的角色,包括:14. The apparatus of claim 13, wherein determining the role of the terminal in the distributed system comprises: 发送针对所述页面资源地址的获取请求至所述管理服务端,并接收所述管理服务端基于所述获取请求返回的响应消息;Send a request to obtain the page resource address to the management server, and receive a response message returned by the management server based on the request; 当所述响应消息中不包括所述页面资源地址时,确定所述终端在所述分布式系统中的角色为所述贡献者终端;When the response message does not include the page resource address, the terminal is determined to be the contributor terminal in the distributed system. 当所述响应消息中包括所述页面资源地址时,确定所述终端在所述分布式系统中的角色为所述使用者终端。When the response message includes the page resource address, the role of the terminal in the distributed system is determined to be the user terminal. 15.如权利要求13所述的装置,其特征在于,所述确定所述终端在所述分布式系统中的角色,包括:15. The apparatus of claim 13, wherein determining the role of the terminal in the distributed system comprises: 获取所述目标页面的终端展示次数;Obtain the number of times the target page is displayed on the terminal; 当所述终端展示次数低于次数阈值时,确定所述终端在所述分布式系统中的角色为所述贡献者终端;When the number of times the terminal is displayed is less than the threshold, the terminal is determined to be the contributor terminal in the distributed system. 当所述终端展示次数不低于次数阈值时,确定所述终端在所述分布式系统中的角色为所述使用者终端。When the number of times the terminal is displayed is not less than the threshold, the terminal is determined to be the user terminal in the distributed system. 16.一种电子设备,其特征在于,所述电子设备包括:16. An electronic device, characterized in that the electronic device comprises: 存储器,用于存储可执行指令;Memory, used to store executable instructions; 处理器,用于执行所述存储器中存储的可执行指令时,实现权利要求1至12任一项所述的基于分布式系统的页面展示方法。A processor, when executing executable instructions stored in the memory, implements the page display method based on a distributed system as described in any one of claims 1 to 12. 17.一种计算机可读存储介质,存储有可执行指令,其特征在于,所述可执行指令被处理器执行时,实现权利要求1至12任一项所述的基于分布式系统的页面展示方法。17. A computer-readable storage medium storing executable instructions, characterized in that, when the executable instructions are executed by a processor, they implement the page display method based on a distributed system as described in any one of claims 1 to 12. 18.一种计算机程序产品,包括计算机程序或指令,其特征在于,所述计算机程序或指令被处理器执行时,实现权利要求1至12任一项所述的基于分布式系统的页面展示方法。18. A computer program product, comprising a computer program or instructions, characterized in that, when the computer program or instructions are executed by a processor, they implement the page display method based on a distributed system as described in any one of claims 1 to 12.
HK42023079568.4A 2023-09-22 Page display method, device, equipment and storage medium based on distributed system HK40092128B (en)

Publications (2)

Publication Number Publication Date
HK40092128A HK40092128A (en) 2023-12-22
HK40092128B true HK40092128B (en) 2025-11-07

Family

ID=

Similar Documents

Publication Publication Date Title
US10325009B2 (en) Method and apparatus for using custom component parsing engine to parse tag of custom component
US8346889B1 (en) Event-driven module loading
CN104331369A (en) Browser-based webpage detection method and device, and server
CN105260424A (en) Processing method and apparatus for webpage browsing historical records and most common accesses of user
CN105094857B (en) Method and system for application loading
CN115563423A (en) Data acquisition method and device, computer equipment and storage medium
US9436669B1 (en) Systems and methods for interfacing with dynamic web forms
EP3863252A1 (en) Advertisement anti-shielding method and device
CN108140037A (en) Native application is instantiated in advance on backstage
EP4180951B1 (en) Generating lossless static object models of dynamic webpages
CN113553522B (en) A page display method, device, electronic device and storage medium
CN115454400A (en) Processing method, device, equipment, medium and program product of interface parameters
WO2020077681A1 (en) Method and apparatus for lazy loading of js script
HK40092128B (en) Page display method, device, equipment and storage medium based on distributed system
HK40092128A (en) Page display method, device, equipment and storage medium based on distributed system
CN119045941A (en) Page loading method and device, computer equipment and storage medium
CN116450962B (en) Page display method, device, equipment and storage medium based on distributed system
CN108268298A (en) Desktop icon generation method and device, storage medium and electronic equipment
CN110708270A (en) Abnormal link detection method and device
US20190095538A1 (en) Method and system for generating content from search results rendered by a search engine
CN116361588A (en) A network resource loading method, device, electronic equipment and storage medium
CN115935095A (en) Page generation method and device, electronic device, storage medium
CN116662143A (en) Test method, apparatus, device, storage medium and computer program product
CN115017429A (en) A method, device, system and storage medium for clipping linked objects
CN114357343A (en) Webpage data processing method, device, equipment and storage medium