Movatterモバイル変換


[0]ホーム

URL:


CN106055720A - Webpage displaying method and device - Google Patents

Webpage displaying method and device
Download PDF

Info

Publication number
CN106055720A
CN106055720ACN201610565697.6ACN201610565697ACN106055720ACN 106055720 ACN106055720 ACN 106055720ACN 201610565697 ACN201610565697 ACN 201610565697ACN 106055720 ACN106055720 ACN 106055720A
Authority
CN
China
Prior art keywords
webpage
address
web page
web
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610565697.6A
Other languages
Chinese (zh)
Inventor
於飞
於一飞
张少伟
左景龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co LtdfiledCriticalBeijing Xiaomi Mobile Software Co Ltd
Priority to CN201610565697.6ApriorityCriticalpatent/CN106055720A/en
Publication of CN106055720ApublicationCriticalpatent/CN106055720A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本公开是关于一种网页显示方法及装置,属于终端技术领域,该方法包括:当接收到网页获取指令时,基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,并向服务器发送网页获取请求,该网页主体为目标网页中不产生变化的部分;在获取到该网页主体时,对该网页主体进行显示;当接收到该服务器基于该网页获取请求返回的网页数据时,对该网页数据进行解析,该网页数据为用于显示该目标网页的全部数据;将解析后的网页数据覆盖显示在该网页主体上,以完成该目标网页的显示。本公开通过显示目标网页地址对应的网页主体,从而增加了网页显示的丰富性和灵活性,避免了终端等待服务器返回网页数据时,显示界面为空白的现象。

The present disclosure relates to a method and device for displaying a webpage, which belongs to the field of terminal technology. The method includes: when a webpage acquisition instruction is received, based on the target webpage address carried by the webpage acquisition instruction, the corresponding webpage body is acquired from a local cache, And send a webpage acquisition request to the server, the main body of the webpage is the part that does not change in the target webpage; when the main body of the webpage is obtained, display the main body of the webpage; when receiving the webpage data returned by the server based on the webpage acquisition request When analyzing the webpage data, the webpage data is all the data used to display the target webpage; overlaying and displaying the parsed webpage data on the main body of the webpage to complete the display of the target webpage. The disclosure increases the richness and flexibility of webpage display by displaying the webpage body corresponding to the target webpage address, and avoids the phenomenon that the display interface is blank when the terminal waits for the server to return webpage data.

Description

Translated fromChinese
网页显示方法及装置Web page display method and device

技术领域technical field

本公开涉及互联网领域,尤其涉及一种网页显示方法及装置。The present disclosure relates to the Internet field, and in particular to a method and device for displaying a web page.

背景技术Background technique

随着技术的发展,网络已经成为生活中不可缺少的一部分,其中,通过网络进行网页浏览是用户使用网络的手段之一。当用户需要浏览网页时,可以通过终端从服务器中获取网页资源,并基于该网页资源显示网页。With the development of technology, the network has become an indispensable part of life, wherein web browsing through the network is one of the means for users to use the network. When the user needs to browse the webpage, the webpage resource can be obtained from the server through the terminal, and the webpage can be displayed based on the webpage resource.

相关技术中,当用户在终端中输入URL(Uniform Resource Locator,统一资源定位符)或点击一个URL时,该终端可以向服务器发送网页获取请求,该网页获取请求中携带该URL。当服务器接收到该网页获取请求时,获取该URL对应的HTML(Hyper Text MarkupLanguage,超文本标记语言)描述文档,该HTML描述文档中记载了显示该网页所需的各类网页数据的描述信息,比如,图片和视频等数据的描述信息。因此,当终端接收到该HTML描述文档时,可以从该HTML描述文档中解析出至少一个网页数据的描述信息,并基于每个网页数据的描述信息,向服务器发送数据获取请求。当服务器接收到该数据获取请求时,向该终端返回对应的网页数据。当该终端接收到该网页数据时,加载该网页数据,从而显示该网页。In related technologies, when a user inputs a URL (Uniform Resource Locator, Uniform Resource Locator) or clicks a URL in a terminal, the terminal may send a web page acquisition request to a server, and the web page acquisition request carries the URL. When the server receives the web page acquisition request, it obtains the HTML (Hyper Text Markup Language, Hypertext Markup Language) description document corresponding to the URL, which records the description information of various web page data required to display the web page, For example, description information of data such as pictures and videos. Therefore, when the terminal receives the HTML description document, it can parse the description information of at least one webpage data from the HTML description document, and send a data acquisition request to the server based on the description information of each webpage data. When the server receives the data acquisition request, it returns the corresponding web page data to the terminal. When the terminal receives the webpage data, it loads the webpage data to display the webpage.

发明内容Contents of the invention

为克服相关技术中存在的问题,本公开提供一种网页显示方法及装置。In order to overcome the problems existing in related technologies, the present disclosure provides a web page display method and device.

根据本公开实施例的第一方面,提供一种网页显示方法,所述方法包括:According to a first aspect of an embodiment of the present disclosure, a method for displaying a webpage is provided, the method comprising:

当接收到网页获取指令时,基于所述网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,并向服务器发送网页获取请求,所述网页主体为目标网页中不产生变化的部分;When receiving a webpage acquisition instruction, based on the target webpage address carried by the webpage acquisition instruction, the corresponding webpage body is obtained from the local cache, and a webpage acquisition request is sent to the server, and the webpage body is the one that does not change in the target webpage part;

在获取到所述网页主体时,对所述网页主体进行显示;When the webpage body is acquired, displaying the webpage body;

当接收到所述服务器基于所述网页获取请求返回的网页数据时,对所述网页数据进行解析,所述网页数据为用于显示所述目标网页的全部数据;When receiving the webpage data returned by the server based on the webpage acquisition request, parsing the webpage data, the webpage data is all data used to display the target webpage;

将解析后的网页数据覆盖显示在所述网页主体上,以完成所述目标网页的显示。Overlaying and displaying the parsed webpage data on the main body of the webpage to complete the display of the target webpage.

可选地,所述方法还包括:Optionally, the method also includes:

判断存储的网页地址集合中是否存在所述目标网页地址;Judging whether the target webpage address exists in the stored webpage address collection;

当所述网页地址集合中存在所述目标网页地址时,执行所述基于所述网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,并向服务器发送网页获取请求的操作。When the target webpage address exists in the webpage address set, perform the operation of obtaining the corresponding webpage body from the local cache based on the target webpage address carried by the webpage obtaining instruction, and sending a webpage obtaining request to the server.

需要说明的是,终端通过判断网页地址集合中是否存在该目标网页地址,并只有当存在该目标网页地址时,获取对应的网页主体,也即是,当不存在该目标网页地址时,可以无需执行获取对应的网页主体的操作,而是直接基于该网页获取指令,向服务器发送网页获取请求,从而减少了终端的运行负担,提高了终端的运行效率。It should be noted that, by judging whether the target webpage address exists in the webpage address set, the terminal obtains the corresponding webpage body only when the target webpage address exists, that is, when the target webpage address does not exist, it does not need to The operation of acquiring the corresponding webpage body is performed, but directly based on the webpage acquisition instruction, a webpage acquisition request is sent to the server, thereby reducing the operating burden of the terminal and improving the operating efficiency of the terminal.

可选地,所述基于所述网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,包括:Optionally, the acquiring the corresponding webpage body from the local cache based on the target webpage address carried by the webpage acquisition instruction includes:

判断存储的网页地址与网页主体之间的对应关系中,是否存储有所述目标网页地址对应的网页主体;Judging whether the webpage body corresponding to the target webpage address is stored in the corresponding relationship between the stored webpage address and the webpage body;

当所述网页地址与网页主体之间的对应关系中存储有所述目标网页地址对应的网页主体时,基于所述目标网页地址,从所述网页地址与网页主体之间的对应关系中获取所述网页主体。When the webpage body corresponding to the target webpage address is stored in the corresponding relationship between the webpage address and the webpage body, based on the target webpage address, the corresponding relationship between the webpage address and the webpage body is obtained. The main body of the web page.

需要说明的是,终端从网页地址与网页主体之间的对应关系中获取该目标网页地址对应的网页主体时,由于该网页地址与网页主体之间的对应关系存储在终端中,因此,当该网页地址与网页主体之间的对应关系中存储有该目标网页地址对应的网页主体时,终端可以很容易的获取该网页主体,从而减少了终端获取网页主体的时间,提高了终端获取网页主体的效率。It should be noted that when the terminal obtains the webpage body corresponding to the target webpage address from the correspondence between the webpage address and the webpage body, since the correspondence between the webpage address and the webpage body is stored in the terminal, when the When the webpage body corresponding to the target webpage address is stored in the correspondence between the webpage address and the webpage body, the terminal can easily obtain the webpage body, thereby reducing the time for the terminal to obtain the webpage body and improving the efficiency of the terminal to obtain the webpage body. efficiency.

可选地,所述基于所述网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,包括:Optionally, the acquiring the corresponding webpage body from the local cache based on the target webpage address carried by the webpage acquisition instruction includes:

判断本地存储的网页浏览历史记录中是否缓存有所述目标网页地址;Judging whether the address of the target webpage is cached in the locally stored webpage browsing history;

当所述网页浏览历史记录中缓存有所述目标网页地址时,基于所述目标网页地址,从所述网页浏览历史记录中获取对应的网页主体。When the target webpage address is cached in the webpage browsing history record, based on the target webpage address, the corresponding webpage body is obtained from the webpage browsing history record.

需要说明的是,终端从网页浏览历史记录中获取该目标网页地址对应的网页主体时,由于该网页浏览历史记录存储在终端中,因此,当该网页浏览历史记录中存储有该目标网页地址时,终端可以很容易根据该目标网页地址获取该网页主体,从而减少了终端获取网页主体的时间,提高了终端获取网页主体的效率。It should be noted that when the terminal acquires the webpage body corresponding to the target webpage address from the webpage browsing history record, since the webpage browsing history record is stored in the terminal, when the webpage browsing history record stores the target webpage address , the terminal can easily obtain the main body of the web page according to the address of the target web page, thereby reducing the time for the terminal to obtain the main body of the web page and improving the efficiency of the terminal for obtaining the main body of the web page.

可选地,所述基于所述网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,包括:Optionally, the acquiring the corresponding webpage body from the local cache based on the target webpage address carried by the webpage acquisition instruction includes:

判断存储的网页地址与网页主体之间的对应关系中,是否存储有所述目标网页地址对应的网页主体;Judging whether the webpage body corresponding to the target webpage address is stored in the corresponding relationship between the stored webpage address and the webpage body;

当所述网页地址与网页主体之间的对应关系中存储有所述目标网页地址对应的网页主体时,基于所述目标网页地址,从所述网页地址与网页主体之间的对应关系中获取所述网页主体;When the webpage body corresponding to the target webpage address is stored in the corresponding relationship between the webpage address and the webpage body, based on the target webpage address, the corresponding relationship between the webpage address and the webpage body is obtained. the main body of the webpage;

当所述网页地址与网页主体之间的对应关系中未存储所述目标网页地址对应的网页主体时,判断本地存储的网页浏览历史记录中是否缓存有所述目标网页地址;When the webpage body corresponding to the target webpage address is not stored in the corresponding relationship between the webpage address and the webpage body, it is judged whether the target webpage address is cached in the locally stored webpage browsing history records;

当所述网页浏览历史记录中缓存有所述目标网页地址时,基于所述目标网页地址,从所述网页浏览历史记录中获取对应的网页主体。When the target webpage address is cached in the webpage browsing history record, based on the target webpage address, the corresponding webpage body is obtained from the webpage browsing history record.

需要说明的是,由于终端从网页地址与网页主体之间的对应关系中无法获取该目标网页地址对应的网页主体时,还可以从网页浏览历史记录中获取该目标网页地址对应的网页主体时,从而提高了终端获取网页主体的可靠性和效率。It should be noted that when the terminal cannot obtain the webpage body corresponding to the target webpage address from the correspondence between the webpage address and the webpage body, it can also obtain the webpage body corresponding to the target webpage address from the webpage browsing history, Therefore, the reliability and efficiency of acquiring the main body of the webpage by the terminal are improved.

根据本公开实施例的第二方面,提供一种网页显示装置,所述装置包括:According to a second aspect of an embodiment of the present disclosure, there is provided a webpage display device, the device comprising:

获取模块,用于当接收到网页获取指令时,基于所述网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,所述网页主体为目标网页中不产生变化的部分;The obtaining module is configured to obtain the corresponding webpage body from the local cache based on the target webpage address carried by the webpage obtaining instruction when the webpage obtaining instruction is received, and the webpage body is a part of the target webpage that does not change;

发送模块,用于当接收到网页获取指令时,向服务器发送网页获取请求;A sending module, configured to send a webpage acquisition request to the server when a webpage acquisition instruction is received;

第一显示模块,用于在获取到所述网页主体时,对所述网页主体进行显示;A first display module, configured to display the main body of the web page when the main body of the web page is obtained;

解析模块,用于当接收到所述服务器基于所述网页获取请求返回的网页数据时,对所述网页数据进行解析,所述网页数据为用于显示所述目标网页的全部数据;A parsing module, configured to parse the webpage data when receiving webpage data returned by the server based on the webpage acquisition request, the webpage data being all data used to display the target webpage;

第二显示模块,用于将解析后的网页数据覆盖显示在所述网页主体上,以完成所述目标网页的显示。The second display module is used to overlay and display the parsed webpage data on the main body of the webpage, so as to complete the display of the target webpage.

可选地,所述装置还包括:Optionally, the device also includes:

判断模块,用于判断存储的网页地址集合中是否存在所述目标网页地址;A judging module, configured to judge whether the target webpage address exists in the stored webpage address collection;

触发模块,用于当所述判断模块确定所述网页地址集合中存在所述目标网页地址时,触发所述基于所述网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,并向服务器发送网页获取请求。A triggering module, configured to trigger the target webpage address carried by the webpage acquisition instruction based on the target webpage address carried by the webpage acquisition instruction when the judging module determines that the target webpage address exists in the webpage address set, and obtain the corresponding webpage body from the local cache, And send a web page acquisition request to the server.

可选地,所述获取模块包括:Optionally, the acquisition module includes:

第一判断单元,用于判断存储的网页地址与网页主体之间的对应关系中,是否存储有所述目标网页地址对应的网页主体;The first judging unit is used to judge whether the webpage body corresponding to the target webpage address is stored in the corresponding relationship between the stored webpage address and the webpage body;

第一获取单元,用于当所述网页地址与网页主体之间的对应关系中存储有所述目标网页地址对应的网页主体时,基于所述目标网页地址,从所述网页地址与网页主体之间的对应关系中获取所述网页主体。The first obtaining unit is configured to, when the webpage body corresponding to the target webpage address is stored in the corresponding relationship between the webpage address and the webpage body, based on the target webpage address, from between the webpage address and the webpage body The webpage body is obtained from the corresponding relationship between them.

可选地,所述获取模块包括:Optionally, the acquisition module includes:

第二判断单元,用于判断本地存储的网页浏览历史记录中是否缓存有所述目标网页地址;The second judging unit is used to judge whether the address of the target webpage is cached in the locally stored webpage browsing history;

第二获取单元,用于当所述网页浏览历史记录中缓存有所述目标网页地址时,基于所述目标网页地址,从所述网页浏览历史记录中获取对应的网页主体。The second acquiring unit is configured to acquire the corresponding webpage body from the webpage browsing history records based on the target webpage address when the target webpage address is cached in the webpage browsing history records.

可选地,所述获取模块包括:Optionally, the acquisition module includes:

第三判断单元,用于判断存储的网页地址与网页主体之间的对应关系中,是否存储有所述目标网页地址对应的网页主体;The third judging unit is used to judge whether the webpage body corresponding to the target webpage address is stored in the corresponding relationship between the stored webpage address and the webpage body;

第三获取单元,用于当所述网页地址与网页主体之间的对应关系中存储有所述目标网页地址对应的网页主体时,基于所述目标网页地址,从所述网页地址与网页主体之间的对应关系中获取所述网页主体;The third acquiring unit is configured to, when the webpage body corresponding to the target webpage address is stored in the corresponding relationship between the webpage address and the webpage body, based on the target webpage address, from between the webpage address and the webpage body Obtain the main body of the webpage from the corresponding relationship between them;

第四判断单元,用于当所述网页地址与网页主体之间的对应关系中未存储所述目标网页地址对应的网页主体时,判断本地存储的网页浏览历史记录中是否缓存有所述目标网页地址;The fourth judging unit is used for judging whether the target webpage is cached in the locally stored webpage browsing history records when the webpage body corresponding to the target webpage address is not stored in the correspondence between the webpage address and the webpage body address;

第四获取单元,用于当所述网页浏览历史记录中缓存有所述目标网页地址时,基于所述目标网页地址,从所述网页浏览历史记录中获取对应的网页主体。The fourth acquiring unit is configured to acquire the corresponding webpage body from the webpage browsing history record based on the target webpage address when the target webpage address is cached in the webpage browsing history record.

根据本公开实施例的第三方面,提供一种网页显示装置,所述装置包括:According to a third aspect of an embodiment of the present disclosure, there is provided a web page display device, the device comprising:

处理器;processor;

用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;

其中,所述处理器被配置为:Wherein, the processor is configured as:

当接收到网页获取指令时,基于所述网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,并向服务器发送网页获取请求,所述网页主体为目标网页中不产生变化的部分;When receiving a webpage acquisition instruction, based on the target webpage address carried by the webpage acquisition instruction, the corresponding webpage body is obtained from the local cache, and a webpage acquisition request is sent to the server, and the webpage body is the one that does not change in the target webpage part;

在获取到所述网页主体时,对所述网页主体进行显示;When the webpage body is acquired, displaying the webpage body;

当接收到所述服务器基于所述网页获取请求返回的网页数据时,对所述网页数据进行解析,所述网页数据为用于显示所述目标网页的全部数据;When receiving the webpage data returned by the server based on the webpage acquisition request, parsing the webpage data, the webpage data is all data used to display the target webpage;

将解析后的网页数据覆盖显示在所述网页主体上,以完成所述目标网页的显示。Overlaying and displaying the parsed webpage data on the main body of the webpage to complete the display of the target webpage.

本公开的实施例提供的技术方案可以包括以下有益效果:在本公开实施例中,当终端接收到该网页获取指令时,可以基于该网页获取指令中携带的目标网页地址,从本地缓存中获取对应的网页主体,并在获取到该网页主体时,将该网页主体进行显示,同时,还可以基于该网页获取指令,向服务器发送网页获取请求,并在接收到该服务器基于该网页获取请求返回的网页数据后,对该网页数据进行解析,从而将解析后的网页数据显示在该网页主体上,也即是,该终端可以正常显示该解析后的网页数据,从而避免了在网页显示过程中显示界面的闪烁,同时由于可以在显示完整的目标网页时,可以提前显示该目标网页的主体部分,从而增加了网页显示的丰富性和灵活性,避免了终端等待服务器返回网页数据时,显示界面为空白的现象。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: In the embodiments of the present disclosure, when the terminal receives the web page acquisition instruction, it can obtain the target web page address from the local cache based on the target web page address carried in the web page acquisition instruction. The corresponding webpage body, and when the webpage body is obtained, the webpage body is displayed. At the same time, based on the webpage acquisition instruction, a webpage acquisition request can be sent to the server, and the server returns based on the webpage acquisition request. After analyzing the webpage data, the webpage data is analyzed, so that the parsed webpage data is displayed on the main body of the webpage, that is, the terminal can normally display the parsed webpage data, thereby avoiding the The flickering of the display interface, and because the main part of the target webpage can be displayed in advance when displaying the complete target webpage, thereby increasing the richness and flexibility of the webpage display, and avoiding the display interface when the terminal waits for the server to return webpage data. blank phenomenon.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.

图1是根据一示例性实施例示出的一种网页显示方法的流程图。Fig. 1 is a flow chart of a method for displaying a web page according to an exemplary embodiment.

图2A是根据一示例性实施例示出的另一种网页显示方法的流程图。Fig. 2A is a flowchart of another method for displaying a web page according to an exemplary embodiment.

图2B是根据一示例性实施例示出的一种显示界面示意图。Fig. 2B is a schematic diagram of a display interface according to an exemplary embodiment.

图2C是根据一示例性实施例示出的另一种显示界面示意图。Fig. 2C is a schematic diagram of another display interface according to an exemplary embodiment.

图3A是根据一示例性实施例示出的一种网页显示装置的结构框图。Fig. 3A is a structural block diagram of a webpage display device according to an exemplary embodiment.

图3B是根据一示例性实施例示出的第一种获取模块的结构框图。Fig. 3B is a structural block diagram of a first acquisition module according to an exemplary embodiment.

图3C是根据一示例性实施例示出的第二种获取模块的结构框图。Fig. 3C is a structural block diagram of a second acquisition module according to an exemplary embodiment.

图3D是根据一示例性实施例示出的第三种获取模块的结构框图。Fig. 3D is a structural block diagram of a third acquisition module according to an exemplary embodiment.

图4是根据一示例性实施例示出的另一种网页显示装置的结构框图。Fig. 4 is a structural block diagram of another webpage display device according to an exemplary embodiment.

附图标记:Reference signs:

1:网页主体;1: The main body of the web page;

11:目标网页的标题,12:网页图案标识,13:子链接目录;11: the title of the target web page, 12: the pattern logo of the web page, 13: the sub-link directory;

2:目标网页更新的文本消息,3:图片消息。2: Text message for target page update, 3: Image message.

具体实施方式detailed description

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with aspects of the invention as recited in the appended claims.

在对本公开实施例进行详细地解释说明之前,先对本公开实施例的应用场景予以介绍。目前,当用户进行网页浏览时,终端通常可以基于用户输入的URL向服务器发送网页获取请求,当接收到服务器返回的HTML描述文档时,可以从该HTML描述文档中解析出至少一个网页数据的描述信息,并基于每个网页数据的描述信息,向服务器发送数据获取请求。当服务器接收到该数据获取请求时,向该终端返回对应的网页数据。当该终端接收到该网页数据时,加载该网页数据,从而显示该网页。当终端使用的网络连接方式的网速较慢时,终端在等待服务器响应该网页获取请求的过程中,终端的显示界面将是一片空白,影响了用户使用终端的体验效果。因此,本公开实施例提供了一种网页显示方法,可以提前显示网页的网页主体,从而使终端在显示网页时,提高了网页显示的灵活性和丰富性,避免了终端等待服务器返回网页数据时,显示界面为空白的现象,提高了用户体验效果。Before explaining and describing the embodiments of the present disclosure in detail, the application scenarios of the embodiments of the present disclosure will be introduced first. At present, when a user browses a webpage, the terminal can usually send a webpage acquisition request to the server based on the URL input by the user, and when receiving the HTML description document returned by the server, it can parse out at least one description of the webpage data from the HTML description document. information, and based on the description information of each webpage data, send a data acquisition request to the server. When the server receives the data acquisition request, it returns the corresponding web page data to the terminal. When the terminal receives the webpage data, it loads the webpage data to display the webpage. When the network speed of the network connection mode used by the terminal is relatively slow, the display interface of the terminal will be blank while the terminal is waiting for the server to respond to the web page acquisition request, which affects the user experience of using the terminal. Therefore, the embodiment of the present disclosure provides a method for displaying a webpage, which can display the main body of the webpage in advance, so that when the terminal displays the webpage, the flexibility and richness of the webpage display are improved, and the terminal is prevented from waiting for the server to return the webpage data. , the display interface is blank, which improves the user experience effect.

图1是根据一示例性实施例示出的一种网页显示方法的流程图,如图1所示,该方法用于终端中,包括以下步骤。Fig. 1 is a flowchart of a method for displaying a webpage according to an exemplary embodiment. As shown in Fig. 1, the method is used in a terminal and includes the following steps.

在步骤101中,当接收到网页获取指令时,基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,并向服务器发送网页获取请求,该网页主体为目标网页中不产生变化的部分。In step 101, when a webpage acquisition instruction is received, based on the target webpage address carried by the webpage acquisition instruction, the corresponding webpage body is obtained from the local cache, and a webpage acquisition request is sent to the server. The part that changes.

在步骤102中,在获取到该网页主体时,对该网页主体进行显示。In step 102, when the webpage body is acquired, the webpage body is displayed.

在步骤103中,当接收到该服务器基于该网页获取请求返回的网页数据时,对该网页数据进行解析,该网页数据为用于显示该目标网页的全部数据。In step 103, when the webpage data returned by the server based on the webpage acquisition request is received, the webpage data is parsed, and the webpage data is all data for displaying the target webpage.

在步骤104中,将解析后的网页数据覆盖显示在该网页主体上,以完成该目标网页的显示。In step 104, the parsed webpage data is overlaid and displayed on the main body of the webpage to complete the display of the target webpage.

在本公开实施例中,当终端接收到该网页获取指令时,可以基于该网页获取指令中携带的目标网页地址,从本地缓存中获取对应的网页主体,并在获取到该网页主体时,将该网页主体进行显示,同时,还可以基于该网页获取指令,向服务器发送网页获取请求,并在接收到该服务器基于该网页获取请求返回的网页数据后,对该网页数据进行解析,从而将解析后的网页数据显示在该网页主体上,也即是,该终端可以正常显示该解析后的网页数据,从而避免了在网页显示过程中显示界面的闪烁,同时由于可以在显示完整的目标网页时,可以提前显示该目标网页的主体部分,从而增加了网页显示的丰富性和灵活性,避免了终端等待服务器返回网页数据时,显示界面为空白的现象。In the embodiment of the present disclosure, when the terminal receives the webpage acquisition instruction, it can acquire the corresponding webpage body from the local cache based on the target webpage address carried in the webpage acquisition instruction, and when the webpage body is acquired, the The main body of the webpage is displayed, and at the same time, based on the webpage acquisition instruction, a webpage acquisition request can be sent to the server, and after receiving the webpage data returned by the server based on the webpage acquisition request, the webpage data can be analyzed, so that the parsed The final webpage data is displayed on the main body of the webpage, that is, the terminal can normally display the parsed webpage data, thereby avoiding the flickering of the display interface during the webpage display process, and because it can display the complete target webpage , the main part of the target webpage can be displayed in advance, thereby increasing the richness and flexibility of webpage display, and avoiding the phenomenon that the display interface is blank when the terminal is waiting for the server to return webpage data.

可选地,该方法还包括:Optionally, the method also includes:

判断存储的网页地址集合中是否存在该目标网页地址;Judging whether the target webpage address exists in the stored webpage address collection;

当该网页地址集合中存在该目标网页地址时,执行基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,并向服务器发送网页获取请求的操作。When the target webpage address exists in the webpage address set, execute the operation of obtaining the corresponding webpage body from the local cache based on the target webpage address carried by the webpage obtaining instruction, and sending a webpage obtaining request to the server.

可选地,基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,包括:Optionally, based on the target web page address carried by the web page acquisition instruction, the corresponding web page body is obtained from the local cache, including:

判断存储的网页地址与网页主体之间的对应关系中,是否存储有该目标网页地址对应的网页主体;judging whether there is a webpage body corresponding to the target webpage address stored in the corresponding relationship between the stored webpage address and the webpage body;

当该网页地址与网页主体之间的对应关系中存储有该目标网页地址对应的网页主体时,基于该目标网页地址,从该网页地址与网页主体之间的对应关系中获取该网页主体。When the webpage body corresponding to the target webpage address is stored in the correspondence between the webpage address and the webpage body, the webpage body is obtained from the correspondence between the webpage address and the webpage body based on the target webpage address.

可选地,基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,包括:Optionally, based on the target web page address carried by the web page acquisition instruction, the corresponding web page body is obtained from the local cache, including:

判断本地存储的网页浏览历史记录中是否缓存有该目标网页地址;Determine whether the target webpage address is cached in the locally stored webpage browsing history;

当该网页浏览历史记录中缓存有该目标网页地址时,基于该目标网页地址,从该网页浏览历史记录中获取对应的网页主体。When the webpage browsing history record caches the target webpage address, based on the target webpage address, the corresponding webpage body is obtained from the webpage browsing history record.

可选地,基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,包括:Optionally, based on the target web page address carried by the web page acquisition instruction, the corresponding web page body is obtained from the local cache, including:

判断存储的网页地址与网页主体之间的对应关系中,是否存储有该目标网页地址对应的网页主体;judging whether there is a webpage body corresponding to the target webpage address stored in the corresponding relationship between the stored webpage address and the webpage body;

当该网页地址与网页主体之间的对应关系中存储有该目标网页地址对应的网页主体时,基于该目标网页地址,从该网页地址与网页主体之间的对应关系中获取该网页主体;When the webpage body corresponding to the target webpage address is stored in the correspondence between the webpage address and the webpage body, based on the target webpage address, the webpage body is obtained from the correspondence between the webpage address and the webpage body;

当该网页地址与网页主体之间的对应关系中未存储该目标网页地址对应的网页主体时,判断本地存储的网页浏览历史记录中是否缓存有该目标网页地址;When the webpage body corresponding to the target webpage address is not stored in the corresponding relationship between the webpage address and the webpage body, it is judged whether the target webpage address is cached in the webpage browsing history records stored locally;

当该网页浏览历史记录中缓存有该目标网页地址时,基于该目标网页地址,从该网页浏览历史记录中获取对应的网页主体。When the webpage browsing history record caches the target webpage address, based on the target webpage address, the corresponding webpage body is obtained from the webpage browsing history record.

上述所有可选技术方案,均可按照任意结合形成本公开的可选实施例,本公开实施例对此不再一一赘述。All the above optional technical solutions may be combined in any way to form optional embodiments of the present disclosure, which will not be described in detail in the embodiments of the present disclosure.

图2A是根据一示例性实施例提供的一种网页显示方法的流程图,参照图2A,该方法包括如下步骤。Fig. 2A is a flowchart of a method for displaying a web page according to an exemplary embodiment. Referring to Fig. 2A, the method includes the following steps.

在步骤201中,当终端接收到网页获取指令时,基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,并向服务器发送网页获取请求,该网页主体为目标网页中不产生变化的部分。In step 201, when the terminal receives a webpage acquisition instruction, based on the target webpage address carried by the webpage acquisition instruction, it acquires the corresponding webpage body from the local cache, and sends a webpage acquisition request to the server. The part that doesn't change.

需要说明的是,网页获取指令用于获取目标网页的网页数据,且该网页获取指令可以由用户通过指定操作触发,该指定操作可以为点击操作、滑动操作、语音操作等,本公开实施例对此不做具体限定。It should be noted that the webpage acquisition instruction is used to acquire the webpage data of the target webpage, and the webpage acquisition instruction can be triggered by the user through a specified operation, and the specified operation can be a click operation, a slide operation, a voice operation, etc. This is not specifically limited.

进一步地,当该终端接收到网页获取指令时,还可以判断存储的网页地址集合中是否存在该目标网页地址;当该网页地址集合中存在该目标网页地址时,终端可以基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体。Further, when the terminal receives the webpage acquisition instruction, it can also judge whether the target webpage address exists in the stored webpage address set; when the target webpage address exists in the webpage address collection, the terminal can carry the webpage based on the webpage acquisition instruction The address of the target webpage, and obtain the corresponding webpage body from the local cache.

其中,终端判断存储的网页地址集合中是否存在该目标网页地址的操作可以为:将该目标网页地址与网页地址集合中的每个网页地址进行比较,当在该网页地址集合中存在与该目标网页地址相同的网页地址时,确定该网页地址集合中存在该目标网页地址,否则确定该目标网页地址中不存在该目标网页地址。Wherein, the operation of the terminal judging whether the target webpage address exists in the stored webpage address set may be as follows: comparing the target webpage address with each webpage address in the webpage address set; When the webpage address is the same webpage address, it is determined that the target webpage address exists in the webpage address set; otherwise, it is determined that the target webpage address does not exist in the target webpage address.

需要说明的是,该网页地址集合可以事先存储在该终端中,It should be noted that the set of web page addresses may be stored in the terminal in advance,

还需要说明的是,该网页主体可以包括网页的标题、子链接目录、网页图案标识等,本公开实施例对此不做具体限定。It should also be noted that the main body of the webpage may include a title of the webpage, a directory of sub-links, a pattern logo of the webpage, etc., which are not specifically limited in this embodiment of the present disclosure.

另外,当改网页地址集合中不存在该目标网页地址时,终端可以可以在接收到网页获取指令时,向服务器发送网页获取请求。In addition, when the target webpage address does not exist in the set of webpage addresses, the terminal may send a webpage acquisition request to the server when receiving the webpage acquisition instruction.

需要说明的是,终端通过判断网页地址集合中是否存在该目标网页地址,并只有当存在该目标网页地址时,获取对应的网页主体,也即是,当不存在该目标网页地址时,可以无需执行获取对应的网页主体的操作,而是直接基于该网页获取指令,向服务器发送网页获取请求,从而减少了终端的运行负担,提高了终端的运行效率。It should be noted that, by judging whether the target webpage address exists in the webpage address set, the terminal obtains the corresponding webpage body only when the target webpage address exists, that is, when the target webpage address does not exist, it does not need to The operation of acquiring the corresponding webpage body is performed, but directly based on the webpage acquisition instruction, a webpage acquisition request is sent to the server, thereby reducing the operating burden of the terminal and improving the operating efficiency of the terminal.

再者,该终端基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体的操作可以包括如下三种方式。Furthermore, based on the target web page address carried in the web page obtaining instruction, the terminal obtains the corresponding web page main body from the local cache, which may include the following three methods.

第一种方式,终端判断存储的网页地址与网页主体之间的对应关系中,是否存储有该目标网页地址对应的网页主体;当该网页地址与网页主体之间的对应关系中存储有该目标网页地址对应的网页主体时,基于该目标网页地址,从该网页地址与网页主体之间的对应关系中获取该网页主体。In the first way, the terminal judges whether the webpage body corresponding to the target webpage address is stored in the corresponding relationship between the stored webpage address and the webpage body; When the webpage body corresponds to the webpage address, based on the target webpage address, the webpage body is obtained from the correspondence between the webpage address and the webpage body.

比如,当目标网页地址为www.xx.com时,判断如表1所示的网页地址与网页主体之间的对应关系中,是否存储有该目标网页地址对应的网页主体,当该网页地址与网页主体之间的对应关系中存储有该目标网页地址www.xx.com对应的网页主体时,基于该目标网页地址www.xx.com,从该网页地址与网页主体之间的对应关系中获取该网页主体为网页主体B。For example, when the address of the target webpage is www.xx.com, it is judged whether there is a webpage body corresponding to the address of the target webpage stored in the corresponding relationship between the webpage address and the main body of the webpage as shown in Table 1. When the webpage body corresponding to the target webpage address www.xx.com is stored in the correspondence between the webpage subjects, based on the target webpage address www.xx.com, obtain from the correspondence between the webpage address and the webpage subject The webpage body is webpage body B.

表1Table 1

网页地址website link网页主体web page bodywww.yy.comwww.yy.com网页主体AWeb page body Awww.xx.comwww.xx.com网页主体BWeb page body Bwww.A.comwww.A.com网页主体CWeb page body Cwww.ab.comwww.ab.com网页主体DWeb page body D...... …...... …

需要说明的是,在本公开实施例中仅以上述表1所示的网页地址与网页主体之间的对应关系为例进行说明,并不对本公开实施例构成限定。It should be noted that, in the embodiment of the present disclosure, only the corresponding relationship between the webpage address and the webpage body shown in the above Table 1 is used as an example for illustration, which does not limit the embodiment of the present disclosure.

还需要说明的是,该网页地址与网页主体之间的对应关系可以事先设置。It should also be noted that the correspondence between the webpage address and the webpage body can be set in advance.

另外,当该网页地址与网页主体之间的对应关系中未存储有该目标网页地址对应的网页主体时,终端可以在接收到网页获取指令时,向服务器发送网页获取请求。In addition, when the webpage body corresponding to the target webpage address is not stored in the correspondence between the webpage address and the webpage body, the terminal may send a webpage acquisition request to the server when receiving the webpage acquisition instruction.

需要说明的是,终端从网页地址与网页主体之间的对应关系中获取该目标网页地址对应的网页主体时,由于该网页地址与网页主体之间的对应关系存储在终端中,因此,当该网页地址与网页主体之间的对应关系中存储有该目标网页地址对应的网页主体时,终端可以很容易的获取该网页主体,从而减少了终端获取网页主体的时间,提高了终端获取网页主体的效率。It should be noted that when the terminal obtains the webpage body corresponding to the target webpage address from the correspondence between the webpage address and the webpage body, since the correspondence between the webpage address and the webpage body is stored in the terminal, when the When the webpage body corresponding to the target webpage address is stored in the correspondence between the webpage address and the webpage body, the terminal can easily obtain the webpage body, thereby reducing the time for the terminal to obtain the webpage body and improving the efficiency of the terminal to obtain the webpage body. efficiency.

第二种方式,终端判断本地存储的网页浏览历史记录中是否缓存有该目标网页地址;当该网页浏览历史记录中缓存有该目标网页地址时,基于该目标网页地址,从该网页浏览历史记录中获取对应的网页主体。In the second method, the terminal judges whether the target webpage address is cached in the locally stored webpage browsing history record; Get the corresponding web page body in .

其中,终端可以将该目标网页地址与网页浏览历史记录中的网页地址进行比较,当在该网页浏览历史记录中存在与该目标网页地址相同的网页地址时,确定本地存储的网页浏览历史记录中缓存有该目标网页地址。Wherein, the terminal can compare the target webpage address with the webpage address in the webpage browsing history record, and when there is a webpage address identical to the target webpage address in the webpage browsing history record, determine the location in the locally stored webpage browsing history record The cache has the URL of the landing page.

需要说明的是,终端判断本地存储的网页浏览历史记录中是否缓存有该目标网页地址的操作不仅可以包括上述方式,还可以包括其他方式,本公开实施例对此不做具体限定。It should be noted that the operation of the terminal judging whether the address of the target webpage is cached in the locally stored webpage browsing history records may include not only the above methods, but also other methods, which are not specifically limited in this embodiment of the present disclosure.

还需要说明的是,网页浏览历史记录为当前时间之前终端进行网页显示的记录。It should also be noted that the web page browsing history is a record of web page display performed by the terminal before the current time.

另外,当该本地存储的网页浏览历史记录中未缓存有该目标网页地址时,终端同样可以在接收到该网页获取指令时,向服务器发送网页获取请求。In addition, when the target webpage address is not cached in the locally stored webpage browsing history, the terminal may also send a webpage acquisition request to the server when receiving the webpage acquisition instruction.

需要说明的是,终端从网页浏览历史记录中获取该目标网页地址对应的网页主体时,由于该网页浏览历史记录存储在终端中,因此,当该网页浏览历史记录中存储有该目标网页地址时,终端可以很容易根据该目标网页地址获取该网页主体,从而减少了终端获取网页主体的时间,提高了终端获取网页主体的效率。It should be noted that when the terminal acquires the webpage body corresponding to the target webpage address from the webpage browsing history record, since the webpage browsing history record is stored in the terminal, when the webpage browsing history record stores the target webpage address , the terminal can easily obtain the main body of the web page according to the address of the target web page, thereby reducing the time for the terminal to obtain the main body of the web page and improving the efficiency of the terminal for obtaining the main body of the web page.

第三种方式,终端判断存储的网页地址与网页主体之间的对应关系中,是否存储有该目标网页地址对应的网页主体;当该网页地址与网页主体之间的对应关系中存储有该目标网页地址对应的网页主体时,基于该目标网页地址,从该网页地址与网页主体之间的对应关系中获取该网页主体;当该网页地址与网页主体之间的对应关系中未存储该目标网页地址对应的网页主体时,判断本地存储的网页浏览历史记录中是否缓存有该目标网页地址;当该网页浏览历史记录中缓存有该目标网页地址时,基于该目标网页地址,从该网页浏览历史记录中获取对应的网页主体。In the third way, the terminal judges whether the webpage body corresponding to the target webpage address is stored in the corresponding relationship between the stored webpage address and the webpage body; When the webpage body corresponds to the webpage address, based on the target webpage address, the webpage body is obtained from the correspondence between the webpage address and the webpage body; when the target webpage is not stored in the correspondence between the webpage address and the webpage body When the address corresponds to the main body of the webpage, it is judged whether the target webpage address is cached in the webpage browsing history record stored locally; Get the corresponding web page body in the record.

需要说明的是,由于终端从网页地址与网页主体之间的对应关系中无法获取该目标网页地址对应的网页主体时,还可以从网页浏览历史记录中获取该目标网页地址对应的网页主体时,从而提高了终端获取网页主体的可靠性和效率。It should be noted that when the terminal cannot obtain the webpage body corresponding to the target webpage address from the correspondence between the webpage address and the webpage body, it can also obtain the webpage body corresponding to the target webpage address from the webpage browsing history, Therefore, the reliability and efficiency of acquiring the main body of the webpage by the terminal are improved.

还需要说明的是,终端基于该目标网页地址,从本地缓存中获取对应的网页主体的方式不仅可以包括上述三种方式,还可以包括其他方式,比如,终端可以判断本地存储的网页浏览历史记录中是否缓存有该目标网页地址;当该网页浏览历史记录中缓存有该目标网页地址时,基于该目标网页地址,从该网页浏览历史记录中获取对应的网页主体;当该网页浏览历史记录中未缓存有该目标网页地址时,终端可以判断存储的网页地址与网页主体之间的对应关系中,是否存储有该目标网页地址对应的网页主体;当该网页地址与网页主体之间的对应关系中存储有该目标网页地址对应的网页主体时,基于该目标网页地址,从该网页地址与网页主体之间的对应关系中获取该网页主体,本公开实施例对此不做具体限定。It should also be noted that, based on the address of the target webpage, the method for the terminal to obtain the corresponding webpage body from the local cache may include not only the above three methods, but also other methods. For example, the terminal may determine the locally stored webpage browsing history Whether the target webpage address is cached in the webpage browsing history; when the webpage browsing history record has the target webpage address cached, based on the target webpage address, the corresponding webpage subject is obtained from the webpage browsing history record; when the webpage browsing history record is When the target web page address is not cached, the terminal can determine whether the corresponding web page body corresponding to the target web page address is stored in the corresponding relationship between the stored web page address and the web page body; when the corresponding relationship between the web page address and the web page body When the webpage body corresponding to the target webpage address is stored in the webpage, based on the target webpage address, the webpage body is obtained from the correspondence between the webpage address and the webpage body, which is not specifically limited in this embodiment of the present disclosure.

另外,当网页地址与网页主体之间的对应关系中未存储有该目标网页地址对应的网页主体时,或者,当本地存储的网页浏览历史记录中未缓存有该目标网页地址时,终端同样可以在接收到该网页获取指令时,向服务器发送网页获取请求。In addition, when the web page body corresponding to the target web page address is not stored in the corresponding relationship between the web page address and the web page body, or when the target web page address is not cached in the locally stored web browsing history records, the terminal can also When the webpage acquisition instruction is received, a webpage acquisition request is sent to the server.

综上,无论终端是否可以从本地缓存中获取到该目标网页地址对应的网页主体,该终端都将在接收到网页获取指令时,向服务器发送网页获取请求。In summary, regardless of whether the terminal can obtain the webpage body corresponding to the target webpage address from the local cache, the terminal will send a webpage acquisition request to the server when receiving the webpage acquisition instruction.

在步骤202中,终端在获取到该网页主体时,对该网页主体进行显示。In step 202, when the terminal acquires the main body of the web page, it displays the main body of the web page.

比如,当终端在获取到该网页主体时,在如图2B所示的显示界面中显示该目标网页地址的网页主体1,该网页主体1中包括该目标网页的标题11、网页图案标识12和子链接目录13。For example, when the terminal acquires the webpage body, it displays the webpage body 1 of the target webpage address in the display interface as shown in FIG. Link Directory13.

需要说明的是,在本公开实施例中,终端执行步骤202和执行步骤203的时没有顺序的限制,也即是,该终端可以先执行步骤202,然后执行步骤203,也可以先执行步骤203,然后执行步骤202,还可以同时执行步骤202和步骤203,本公开实施例对此不做具体限定。It should be noted that, in the embodiment of the present disclosure, there is no order limitation when the terminal executes step 202 and step 203, that is, the terminal may execute step 202 first, then execute step 203, or execute step 203 first , and then step 202 is executed, and step 202 and step 203 may also be executed simultaneously, which is not specifically limited in this embodiment of the present disclosure.

在步骤203中,当服务器接收到该终端发送的网页获取请求时,基于该网页获取请求中携带的目标网页地址,向终端返回对应的网页数据。In step 203, when the server receives the webpage acquisition request sent by the terminal, based on the target webpage address carried in the webpage acquisition request, the server returns corresponding webpage data to the terminal.

需要说明的是,服务器基于该目标网页地址返回对应的网页数据的操作可以参考相关技术,本公开实施例对此不再进行一一赘述。It should be noted that for the operation of the server returning the corresponding webpage data based on the target webpage address, reference may be made to related technologies, which will not be repeated in this embodiment of the present disclosure.

在步骤204中,当终端接收到该服务器基于该网页获取请求返回的网页数据时,对该网页数据进行解析,该网页数据为用于显示该目标网页的全部数据。In step 204, when the terminal receives the webpage data returned by the server based on the webpage acquisition request, it parses the webpage data, and the webpage data is all data for displaying the target webpage.

需要说明的是,终端对网页数据进行解析的操作可以参考相关技术,本公开实施例对此同样不再进行一一赘述。It should be noted that related technologies may be referred to for the terminal's operation of parsing the web page data, which will not be repeated in this embodiment of the present disclosure.

在步骤205中,终端将解析后的网页数据覆盖显示在该网页主体上,以完成该目标网页的显示。In step 205, the terminal overlays and displays the parsed webpage data on the main body of the webpage, so as to complete the display of the target webpage.

需要说明的是,该网页数据可以包括网页主体的数据、目标网页更新的文本消息,图片消息等,本公开实施例对此不做具体限定。It should be noted that the webpage data may include data of the main body of the webpage, text messages of target webpage updates, picture messages, etc., which are not specifically limited in this embodiment of the present disclosure.

比如,参见图2C,当终端将解析后的网页数据显示在该网页主体1上后,该显示界面中可以显示该目标网页的网页主体1、目标网页更新的文本消息2和图片消息3。For example, referring to FIG. 2C, when the terminal displays the parsed webpage data on the webpage body 1, the display interface can display the webpage body 1 of the target webpage, the updated text message 2 and picture message 3 of the target webpage.

需要说明的是,终端不仅可以将解析后的网页数据覆盖显示在该网页主体上,同时,还可以将解析后的网页数据与网页主体的数据进行比较,当该解析后的网页数据中存在与该网页主体的数据相同的网页数据时,不对该相同的网页数据进行显示,而是将与该网页主体的数据不相同的网页数据进行显示,本公开实施例对此不做具体限定。It should be noted that the terminal can not only overlay and display the parsed webpage data on the webpage body, but also compare the parsed webpage data with the data of the webpage body. When the data of the webpage body is the same webpage data, the same webpage data is not displayed, but the webpage data different from the data of the webpage body is displayed, which is not specifically limited in the embodiments of the present disclosure.

另外,终端不仅可以通过上述方式将该解析后的网页数据进行显示,同样还可以通过其他方式进行显示,比如,当解析到该网页数据中包括视频数据时,可以对当前终端使用的网络连接方式进行判断;当该终端进行网络连接方式为移动数据流量时,可以不显示该视频数据,或者,当该终端进行网络连接方式为移动数据流量时,可以显示提示信息,该提示信息可以提示用户当前使用的网络连接方式为移动数据流量,在本公开实施例对此不做具体限定。In addition, the terminal can not only display the parsed webpage data in the above way, but also display it in other ways. For example, when it is analyzed that the webpage data includes video data, the network connection method currently used by the terminal can be displayed. Judging; when the terminal is connected to the network by mobile data flow, the video data may not be displayed, or, when the terminal is connected to the network by mobile data flow, a prompt message may be displayed, and the prompt message may remind the user of the current The network connection mode used is mobile data traffic, which is not specifically limited in this embodiment of the present disclosure.

还需要说明的是,由于终端可以将该解析后的网页数据进行显示,且该终端基于该目标网页地址,可能从本地缓存中无法获取到该目标网页地址对应的网页主体,因此,当该终端无法获取到该目标网页的网页主体时,该终端仍然可以显示该目标网页,从而保证了显示目标网页的可靠性。It should also be noted that since the terminal can display the parsed webpage data, and based on the target webpage address, the terminal may not be able to obtain the webpage body corresponding to the target webpage address from the local cache, therefore, when the terminal When the webpage body of the target webpage cannot be obtained, the terminal can still display the target webpage, thereby ensuring the reliability of displaying the target webpage.

在本公开实施例中,当终端接收到该网页获取指令时,可以基于该网页获取指令中携带的目标网页地址,从本地缓存中获取对应的网页主体,并在获取到该网页主体时,将该网页主体进行显示,同时,还可以基于该网页获取指令,向服务器发送网页获取请求,并在接收到该服务器基于该网页获取请求返回的网页数据后,对该网页数据进行解析,从而将解析后的网页数据显示在该网页主体上,也即是,该终端可以正常显示该解析后的网页数据,从而避免了在网页显示过程中显示界面的闪烁,同时,由于无论终端是否可以从本地缓存中获取到目标网页地址对应的网页主体,该终端都会显示从服务器中获取的网页数据,从而保证了显示目标网页的可靠性。另外,由于可以在显示完整的目标网页时,可以提前显示该目标网页的主体部分,从而增加了网页显示的丰富性和灵活性,避免了终端等待服务器返回网页数据时,显示界面为空白的现象。In the embodiment of the present disclosure, when the terminal receives the webpage acquisition instruction, it can acquire the corresponding webpage body from the local cache based on the target webpage address carried in the webpage acquisition instruction, and when the webpage body is acquired, the The main body of the webpage is displayed, and at the same time, based on the webpage acquisition instruction, a webpage acquisition request can be sent to the server, and after receiving the webpage data returned by the server based on the webpage acquisition request, the webpage data can be analyzed, so that the parsed The final webpage data is displayed on the main body of the webpage, that is, the terminal can normally display the parsed webpage data, thereby avoiding the flickering of the display interface during the webpage display process, and at the same time, because no matter whether the terminal can cache from the local After obtaining the webpage body corresponding to the target webpage address, the terminal will display the webpage data obtained from the server, thereby ensuring the reliability of displaying the target webpage. In addition, since the main part of the target webpage can be displayed in advance when the complete target webpage is displayed, the richness and flexibility of the webpage display is increased, and the phenomenon that the display interface is blank when the terminal is waiting for the server to return webpage data is avoided. .

图3A是根据一示例性实施例示出的一种网页显示装置结构框图。参照图3A,该装置包括获取模块301、发送模块302、第一显示模块303、解析模块304和第二显示模块305。Fig. 3A is a structural block diagram of a webpage display device according to an exemplary embodiment. Referring to FIG. 3A , the device includes an acquisition module 301 , a sending module 302 , a first display module 303 , an analysis module 304 and a second display module 305 .

获取模块301,用于当接收到网页获取指令时,基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,该网页主体为目标网页中不产生变化的部分;The acquiring module 301 is configured to acquire the corresponding webpage body from the local cache based on the target webpage address carried by the webpage acquiring instruction when the webpage acquiring instruction is received, and the webpage body is a part that does not change in the target webpage;

发送模块302,用于当接收到网页获取指令时,向服务器发送网页获取请求;The sending module 302 is configured to send a webpage acquisition request to the server when receiving the webpage acquisition instruction;

第一显示模块303,用于在获取到该网页主体时,对该网页主体进行显示;The first display module 303 is configured to display the main body of the web page when the main body of the web page is obtained;

解析模块304,用于当接收到该服务器基于该网页获取请求返回的网页数据时,对该网页数据进行解析,该网页数据为用于显示该目标网页的全部数据;The parsing module 304 is configured to parse the webpage data when receiving the webpage data returned by the server based on the webpage acquisition request, the webpage data being all data used to display the target webpage;

第二显示模块305,用于将解析后的网页数据覆盖显示在该网页主体上,以完成该目标网页的显示。The second display module 305 is used for overlaying and displaying the parsed webpage data on the main body of the webpage, so as to complete the display of the target webpage.

可选地,装置还包括:Optionally, the device also includes:

判断模块,用于判断存储的网页地址集合中是否存在该目标网页地址;A judging module, configured to judge whether the target webpage address exists in the stored webpage address collection;

触发模块,用于当该判断模块确定该网页地址集合中存在该目标网页地址时,触发该基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,并向服务器发送网页获取请求。A triggering module, configured to trigger the target webpage address carried by the webpage acquisition instruction based on the webpage acquisition instruction when the judging module determines that the target webpage address exists in the webpage address set, obtain the corresponding webpage body from the local cache, and send the webpage to the server Get request.

可选地,参见图3B,该获取模块301包括:Optionally, referring to FIG. 3B, the acquiring module 301 includes:

第一判断单元3011,用于判断存储的网页地址与网页主体之间的对应关系中,是否存储有该目标网页地址对应的网页主体;The first judging unit 3011 is used to judge whether the webpage body corresponding to the target webpage address is stored in the corresponding relationship between the stored webpage address and the webpage body;

第一获取单元3012,用于当该网页地址与网页主体之间的对应关系中存储有该目标网页地址对应的网页主体时,基于该目标网页地址,从该网页地址与网页主体之间的对应关系中获取该网页主体。The first obtaining unit 3012 is configured to, when the webpage body corresponding to the target webpage address is stored in the corresponding relationship between the webpage address and the webpage body, based on the target webpage address, from the correspondence between the webpage address and the webpage body Get the body of the page in the relationship.

可选地,参见图3C,该获取模块301包括:Optionally, referring to FIG. 3C, the obtaining module 301 includes:

第二判断单元3013,用于判断本地存储的网页浏览历史记录中是否缓存有该目标网页地址;The second judging unit 3013 is used to judge whether the target webpage address is cached in the locally stored webpage browsing history;

第二获取单元3014,用于当该网页浏览历史记录中缓存有该目标网页地址时,基于该目标网页地址,从该网页浏览历史记录中获取对应的网页主体。The second acquiring unit 3014 is configured to acquire the corresponding webpage body from the webpage browsing history record based on the target webpage address when the target webpage address is cached in the webpage browsing history record.

可选地,参见图3D,该获取模块301包括:Optionally, referring to FIG. 3D, the acquisition module 301 includes:

第三判断单元3015,用于判断存储的网页地址与网页主体之间的对应关系中,是否存储有该目标网页地址对应的网页主体;The third judging unit 3015 is used to judge whether the webpage body corresponding to the target webpage address is stored in the corresponding relationship between the stored webpage address and the webpage body;

第三获取单元3016,用于当该网页地址与网页主体之间的对应关系中存储有该目标网页地址对应的网页主体时,基于该目标网页地址,从该网页地址与网页主体之间的对应关系中获取该网页主体;The third acquiring unit 3016 is configured to, when the webpage body corresponding to the target webpage address is stored in the correspondence between the webpage address and the webpage body, based on the target webpage address, from the correspondence between the webpage address and the webpage body Get the main body of the web page in the relationship;

第四判断单元3017,用于当该网页地址与网页主体之间的对应关系中未存储该目标网页地址对应的网页主体时,判断本地存储的网页浏览历史记录中是否缓存有该目标网页地址;The fourth judging unit 3017 is used for judging whether the target webpage address is cached in the locally stored webpage browsing history records when the webpage body corresponding to the target webpage address is not stored in the corresponding relationship between the webpage address and the webpage body;

第四获取单元3018,用于当该网页浏览历史记录中缓存有该目标网页地址时,基于该目标网页地址,从该网页浏览历史记录中获取对应的网页主体。The fourth obtaining unit 3018 is configured to obtain the corresponding webpage body from the webpage browsing history record based on the target webpage address when the webpage browsing history record has the target webpage address cached.

在本公开实施例中,当终端接收到该网页获取指令时,可以基于该网页获取指令中携带的目标网页地址,从本地缓存中获取对应的网页主体,并在获取到该网页主体时,将该网页主体进行显示,同时,还可以基于该网页获取指令,向服务器发送网页获取请求,并在接收到该服务器基于该网页获取请求返回的网页数据后,对该网页数据进行解析,从而将解析后的网页数据显示在该网页主体上,也即是,该终端可以正常显示该解析后的网页数据,从而避免了在网页显示过程中显示界面的闪烁,同时由于可以在显示完整的目标网页时,可以提前显示该目标网页的主体部分,从而增加了网页显示的丰富性和灵活性,避免了终端等待服务器返回网页数据时,显示界面为空白的现象。In the embodiment of the present disclosure, when the terminal receives the webpage acquisition instruction, it can acquire the corresponding webpage body from the local cache based on the target webpage address carried in the webpage acquisition instruction, and when the webpage body is acquired, the The main body of the webpage is displayed, and at the same time, based on the webpage acquisition instruction, a webpage acquisition request can be sent to the server, and after receiving the webpage data returned by the server based on the webpage acquisition request, the webpage data can be analyzed, so that the parsed The final webpage data is displayed on the main body of the webpage, that is, the terminal can normally display the parsed webpage data, thereby avoiding the flickering of the display interface during the webpage display process, and because it can display the complete target webpage , the main part of the target webpage can be displayed in advance, thereby increasing the richness and flexibility of webpage display, and avoiding the phenomenon that the display interface is blank when the terminal is waiting for the server to return webpage data.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

图4是根据一示例性实施例示出的一种用于网页显示的装置400的框图。例如,装置400可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 4 is a block diagram of an apparatus 400 for displaying a web page according to an exemplary embodiment. For example, the apparatus 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.

参照图4,装置400可以包括以下一个或多个组件:处理组件402,存储器404,电源组件406,多媒体组件408,音频组件410,输入/输出(I/O)的接口412,传感器组件414,以及通信组件416。4, device 400 may include one or more of the following components: processing component 402, memory 404, power supply component 406, multimedia component 408, audio component 410, input/output (I/O) interface 412, sensor component 414, and communication component 416 .

处理组件402通常控制装置400的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件402可以包括一个或多个处理器420来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件402可以包括一个或多个模块,便于处理组件402和其他组件之间的交互。例如,处理组件402可以包括多媒体模块,以方便多媒体组件408和处理组件402之间的交互。The processing component 402 generally controls the overall operations of the device 400, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 402 may include one or more modules that facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402 .

存储器404被配置为存储各种类型的数据以支持在装置400的操作。这些数据的示例包括用于在装置400上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器404可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 404 is configured to store various types of data to support operations at the device 400 . Examples of such data include instructions for any application or method operating on device 400, contact data, phonebook data, messages, pictures, videos, and the like. The memory 404 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.

电源组件406为装置400的各种组件提供电源。电源组件406可以包括电源管理系统,一个或多个电源,及其他与为装置400生成、管理和分配电源相关联的组件。The power supply component 406 provides power to various components of the device 400 . Power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 400 .

多媒体组件408包括在所述装置400和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件408包括一个前置摄像头和/或后置摄像头。当装置400处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 408 includes a front camera and/or a rear camera. When the device 400 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.

音频组件410被配置为输出和/或输入音频信号。例如,音频组件410包括一个麦克风(MIC),当装置400处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器404或经由通信组件416发送。在一些实施例中,音频组件410还包括一个扬声器,用于输出音频信号。The audio component 410 is configured to output and/or input audio signals. For example, the audio component 410 includes a microphone (MIC), which is configured to receive external audio signals when the device 400 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 404 or sent via communication component 416 . In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.

I/O接口412为处理组件402和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 412 provides an interface between the processing component 402 and a peripheral interface module. The peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.

传感器组件414包括一个或多个传感器,用于为装置400提供各个方面的状态评估。例如,传感器组件414可以检测到装置400的打开/关闭状态,组件的相对定位,例如所述组件为装置400的显示器和小键盘,传感器组件414还可以检测装置400或装置400一个组件的位置改变,用户与装置400接触的存在或不存在,装置400方位或加速/减速和装置400的温度变化。传感器组件414可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件414还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件414还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 414 includes one or more sensors for providing status assessments of various aspects of device 400 . For example, the sensor component 414 can detect the open/closed state of the device 400, the relative positioning of components, such as the display and keypad of the device 400, and the sensor component 414 can also detect a change in the position of the device 400 or a component of the device 400 , the presence or absence of user contact with the device 400 , the device 400 orientation or acceleration/deceleration and the temperature change of the device 400 . The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

通信组件416被配置为便于装置400和其他设备之间有线或无线方式的通信。装置400可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件416经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件416还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 416 is configured to facilitate wired or wireless communication between the apparatus 400 and other devices. The device 400 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,装置400可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, apparatus 400 may be programmed by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器404,上述指令可由装置400的处理器420执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory 404 including instructions, which can be executed by the processor 420 of the device 400 to implement the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.

一种非临时性计算机可读存储介质,当所述存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行一种网页显示方法,所述方法包括:A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the mobile terminal, the mobile terminal can execute a webpage display method, the method comprising:

当接收到网页获取指令时,基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,并向服务器发送网页获取请求,该网页主体为目标网页中不产生变化的部分。When receiving a webpage acquisition instruction, based on the target webpage address carried by the webpage acquisition instruction, the corresponding webpage body is obtained from the local cache, and a webpage acquisition request is sent to the server. The webpage body is a part of the target webpage that does not change.

在获取到该网页主体时,对该网页主体进行显示。When the webpage body is obtained, the webpage body is displayed.

当接收到该服务器基于该网页获取请求返回的网页数据时,对该网页数据进行解析,该网页数据为用于显示该目标网页的全部数据。When the webpage data returned by the server based on the webpage acquisition request is received, the webpage data is parsed, and the webpage data is all data for displaying the target webpage.

将解析后的网页数据覆盖显示在该网页主体上,以完成该目标网页的显示。Covering and displaying the parsed webpage data on the main body of the webpage to complete the display of the target webpage.

可选地,该方法还包括:Optionally, the method also includes:

判断存储的网页地址集合中是否存在所述目标网页地址;Judging whether the target webpage address exists in the stored webpage address collection;

当所述网页地址集合中存在所述目标网页地址时,执行基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,并向服务器发送网页获取请求的操作。When the target webpage address exists in the webpage address set, execute the operation of acquiring the corresponding webpage body from the local cache based on the target webpage address carried by the webpage acquisition instruction, and sending a webpage acquisition request to the server.

可选地,基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,包括:Optionally, based on the target web page address carried by the web page acquisition instruction, the corresponding web page body is obtained from the local cache, including:

判断存储的网页地址与网页主体之间的对应关系中,是否存储有该目标网页地址对应的网页主体;judging whether there is a webpage body corresponding to the target webpage address stored in the corresponding relationship between the stored webpage address and the webpage body;

当该网页地址与网页主体之间的对应关系中存储有该目标网页地址对应的网页主体时,基于该目标网页地址,从该网页地址与网页主体之间的对应关系中获取该网页主体。When the webpage body corresponding to the target webpage address is stored in the correspondence between the webpage address and the webpage body, the webpage body is obtained from the correspondence between the webpage address and the webpage body based on the target webpage address.

可选地,基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,包括:Optionally, based on the target web page address carried by the web page acquisition instruction, the corresponding web page body is obtained from the local cache, including:

判断本地存储的网页浏览历史记录中是否缓存有该目标网页地址;Determine whether the target webpage address is cached in the locally stored webpage browsing history;

当该网页浏览历史记录中缓存有该目标网页地址时,基于该目标网页地址,从该网页浏览历史记录中获取对应的网页主体。When the webpage browsing history record caches the target webpage address, based on the target webpage address, the corresponding webpage body is obtained from the webpage browsing history record.

可选地,基于该网页获取指令携带的目标网页地址,从本地缓存中获取对应的网页主体,包括:Optionally, based on the target web page address carried by the web page acquisition instruction, the corresponding web page body is obtained from the local cache, including:

判断存储的网页地址与网页主体之间的对应关系中,是否存储有该目标网页地址对应的网页主体;judging whether there is a webpage body corresponding to the target webpage address stored in the corresponding relationship between the stored webpage address and the webpage body;

当该网页地址与网页主体之间的对应关系中存储有该目标网页地址对应的网页主体时,基于该目标网页地址,从该网页地址与网页主体之间的对应关系中获取该网页主体;When the webpage body corresponding to the target webpage address is stored in the correspondence between the webpage address and the webpage body, based on the target webpage address, the webpage body is obtained from the correspondence between the webpage address and the webpage body;

当该网页地址与网页主体之间的对应关系中未存储该目标网页地址对应的网页主体时,判断本地存储的网页浏览历史记录中是否缓存有该目标网页地址;When the webpage body corresponding to the target webpage address is not stored in the corresponding relationship between the webpage address and the webpage body, it is judged whether the target webpage address is cached in the webpage browsing history records stored locally;

当该网页浏览历史记录中缓存有该目标网页地址时,基于该目标网页地址,从该网页浏览历史记录中获取对应的网页主体。When the webpage browsing history record caches the target webpage address, based on the target webpage address, the corresponding webpage body is obtained from the webpage browsing history record.

在本公开实施例中,当终端接收到该网页获取指令时,可以基于该网页获取指令中携带的目标网页地址,从本地缓存中获取对应的网页主体,并在获取到该网页主体时,将该网页主体进行显示,同时,还可以基于该网页获取指令,向服务器发送网页获取请求,并在接收到该服务器基于该网页获取请求返回的网页数据后,对该网页数据进行解析,从而将解析后的网页数据显示在该网页主体上,也即是,该终端可以正常显示该解析后的网页数据,从而避免了在网页显示过程中显示界面的闪烁,同时由于可以在显示完整的目标网页时,可以提前显示该目标网页的主体部分,从而增加了网页显示的丰富性和灵活性,避免了终端等待服务器返回网页数据时,显示界面为空白的现象。In the embodiment of the present disclosure, when the terminal receives the webpage acquisition instruction, it can acquire the corresponding webpage body from the local cache based on the target webpage address carried in the webpage acquisition instruction, and when the webpage body is acquired, the The main body of the webpage is displayed, and at the same time, based on the webpage acquisition instruction, a webpage acquisition request can be sent to the server, and after receiving the webpage data returned by the server based on the webpage acquisition request, the webpage data can be analyzed, so that the parsed The final webpage data is displayed on the main body of the webpage, that is, the terminal can normally display the parsed webpage data, thereby avoiding the flickering of the display interface during the webpage display process, and because it can display the complete target webpage , the main part of the target webpage can be displayed in advance, thereby increasing the richness and flexibility of webpage display, and avoiding the phenomenon that the display interface is blank when the terminal is waiting for the server to return webpage data.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。Other embodiments of the invention will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present invention, these modifications, uses or adaptations follow the general principles of the present invention and include common knowledge or conventional technical means in the technical field not disclosed in this disclosure . The specification and examples are to be considered exemplary only, with a true scope and spirit of the invention being indicated by the following claims.

应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。It should be understood that the present invention is not limited to the precise constructions which have been described above and shown in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (11)

CN201610565697.6A2016-07-182016-07-18Webpage displaying method and devicePendingCN106055720A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610565697.6ACN106055720A (en)2016-07-182016-07-18Webpage displaying method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610565697.6ACN106055720A (en)2016-07-182016-07-18Webpage displaying method and device

Publications (1)

Publication NumberPublication Date
CN106055720Atrue CN106055720A (en)2016-10-26

Family

ID=57187811

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610565697.6APendingCN106055720A (en)2016-07-182016-07-18Webpage displaying method and device

Country Status (1)

CountryLink
CN (1)CN106055720A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2019000722A1 (en)*2017-06-272019-01-03武汉斗鱼网络科技有限公司Hypertext markup language webpage loading method and device
CN109756524A (en)*2017-11-012019-05-14温世文A kind of Webpage display process and device
CN115442440A (en)*2022-09-022022-12-06上海识装信息科技有限公司 Communication method, device, electronic device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103353886A (en)*2013-06-282013-10-16优视科技有限公司Method and system for previewing webpage
CN105208127A (en)*2015-10-092015-12-30上海瀚银信息技术有限公司Webpage caching processing method and system and intelligent terminal
CN105320687A (en)*2014-07-292016-02-10腾讯科技(北京)有限公司Webpage display method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103353886A (en)*2013-06-282013-10-16优视科技有限公司Method and system for previewing webpage
CN105320687A (en)*2014-07-292016-02-10腾讯科技(北京)有限公司Webpage display method and device
CN105208127A (en)*2015-10-092015-12-30上海瀚银信息技术有限公司Webpage caching processing method and system and intelligent terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2019000722A1 (en)*2017-06-272019-01-03武汉斗鱼网络科技有限公司Hypertext markup language webpage loading method and device
CN109756524A (en)*2017-11-012019-05-14温世文A kind of Webpage display process and device
CN115442440A (en)*2022-09-022022-12-06上海识装信息科技有限公司 Communication method, device, electronic device and storage medium
CN115442440B (en)*2022-09-022024-11-26上海得物信息集团有限公司 A communication method, device, electronic device and storage medium

Similar Documents

PublicationPublication DateTitle
CN107329743A (en)Methods of exhibiting, device and the storage medium of five application page
CN104636106B (en)Image display method and device, terminal device
CN106896991B (en) A method and device for updating information
CN106528617B (en)A kind of method and device that Web page picture is shown
EP2978170A2 (en)Method, device, terminal and server for pushing message through web application
CN105847430A (en)Hybrid application page data access method and device
CN107038214A (en)Expression information processing method and processing device
CN104679599A (en)Application program duplicating method and device
WO2016045277A1 (en)Method, device, and system for information acquisition
CN107220059B (en)Application interface display method and device
CN106066868A (en)Webpage loading method and device
CN107045541A (en)data display method and device
CN106708967B (en)Page display method and device
CN105808304B (en)Code deployment method, device and system
CN107220371A (en)Page display method, device and storage medium
CN107229403A (en)A kind of information content system of selection and device
CN104050236B (en)Web site contents update reminding method, server and client side
CN110413169B (en)Information display method, device and medium
CN106055720A (en)Webpage displaying method and device
EP3068097B1 (en)Method and device for filtering information
CN107943370A (en)Advertisement display method, device and storage medium
CN107679118A (en) Page loading method and device
CN105808767A (en)Data updating method and apparatus
CN106407458A (en)Method and device for acquiring content of browser application program
CN107423324A (en)Access method, device and the equipment of webpage

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20161026


[8]ページ先頭

©2009-2025 Movatter.jp