[go: up one dir, main page]

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

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

Info

Publication number
CN114238817A
CN114238817A CN202111579647.0A CN202111579647A CN114238817A CN 114238817 A CN114238817 A CN 114238817A CN 202111579647 A CN202111579647 A CN 202111579647A CN 114238817 A CN114238817 A CN 114238817A
Authority
CN
China
Prior art keywords
page
page data
data
link
type
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.)
Granted
Application number
CN202111579647.0A
Other languages
Chinese (zh)
Other versions
CN114238817B (en
Inventor
李永才
李涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Apas Digital Cloud Information Technology Co ltd
Original Assignee
Zhengzhou Apas Digital Cloud Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Apas Digital Cloud Information Technology Co ltd filed Critical Zhengzhou Apas Digital Cloud Information Technology Co ltd
Priority to CN202111579647.0A priority Critical patent/CN114238817B/en
Publication of CN114238817A publication Critical patent/CN114238817A/en
Application granted granted Critical
Publication of CN114238817B publication Critical patent/CN114238817B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

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

Abstract

本说明书一个实施例提供了一种页面加载方法、装置、设备和存储介质,该方法包括:获取多个目标页面数据,对目标页面数据进行分类,得到各类页面数据;根据各类页面数据的页面链接,确定各类页面数据的链接模板,根据各类页面数据的HTML元素,确定各类页面数据的页面框架模板;对各类页面数据的页面内容的内容来源进行分析,得到各类页面数据的页面内容来源规则;将各类页面数据的链接模板、页面框架模板和页面内容来源规则下发至用户终端,以便于用户终端基于页面框架模板加载待加载页面的页面框架,基于页面内容来源规则从网络获取待加载页面的内容并加载。通过本实施例,能够缓解现有技术在进行网页加速时,实现过程复杂且成本高的问题。

Figure 202111579647

An embodiment of the present specification provides a page loading method, device, device and storage medium. The method includes: acquiring multiple target page data, classifying the target page data, and obtaining various types of page data; Page link, determine the link template of various page data, determine the page frame template of various page data according to the HTML elements of various page data; analyze the content source of the page content of various page data, and obtain various page data The source rules of page content based on the page content; the link templates, page frame templates and page content source rules of various page data are delivered to the user terminal, so that the user terminal can load the page frame of the page to be loaded based on the page frame template, and based on the page content source rules Get the content of the page to be loaded from the network and load it. This embodiment can alleviate the problems of complicated implementation process and high cost when performing webpage acceleration in the prior art.

Figure 202111579647

Description

Page loading method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a page loading method, apparatus, device, and storage medium.
Background
At present, a user often browses various web pages through a mobile phone or a computer, for example, online shopping is performed based on a form of browsing web pages, and therefore, it is necessary to increase a web page loading speed and further improve a web page browsing experience of the user. In the prior art, in order to increase the webpage loading speed, a proxy server is usually arranged, and cloud acceleration is performed through the proxy server, so that the webpage loading speed is increased. However, this method requires a proxy server, and also requires a program written on the proxy server for web page acceleration, which has the disadvantages of high implementation cost and complex implementation process.
Disclosure of Invention
An embodiment of the present specification aims to provide a page loading method, device, equipment and storage medium, so as to alleviate the problem that in the prior art, when a web page is accelerated, the implementation process is complex and the cost is high.
To solve the above technical problem, one embodiment of the present specification is implemented as follows:
in a first aspect, an embodiment of the present specification provides a page loading method, including:
acquiring a plurality of target page data, and classifying each target page data according to the membership between each target page data and the page link of each target page data to obtain various page data;
determining a link template of each type of page data according to page links of each type of page data, and determining a page frame template of each type of page data according to hypertext markup language (HTML) elements of each type of page data;
analyzing content sources of page contents of various types of page data to obtain page content source rules of various types of page data; the page content source rule comprises a link template for providing content source links of page content;
and issuing the link template, the page frame template and the page content source rule of each type of page data to a user terminal, so that when the user terminal loads a page to be loaded, wherein the page link of the page is matched with the link template, the page frame of the page to be loaded is loaded based on the page frame template, and the page content of the page to be loaded is acquired from a network based on the page content source rule and loaded in the page frame of the page to be loaded so as to display the page to be loaded.
In a second aspect, an embodiment of the present specification provides a page loading method, including:
acquiring and storing a link template, a page frame template and page content source rules of various page data issued by a server; the page content source rule comprises a link template for providing content source links of page content;
after a page loading request is obtained, judging whether a target template matched with a page link of a page to be loaded exists in link templates of various types of page data;
if so, loading a target page frame template which belongs to the same type of page data as the target template to display a page frame of the page to be loaded;
and acquiring the page content of the page to be loaded from a network and loading the page content into a page frame of the page to be loaded to display the page to be loaded based on a target page content source rule of the target template belonging to the same type of page data.
In a third aspect, an embodiment of the present specification provides a page loading apparatus, including:
the page classification unit is used for acquiring a plurality of target page data, classifying the target page data according to the affiliation among the target page data and the page link of the target page data to obtain various page data;
the first determining unit is used for determining a link template of each type of page data according to page links of each type of page data, and determining a page frame template of each type of page data according to hypertext markup language (HTML) elements of each type of page data;
the second determining unit is used for analyzing content sources of page contents of various types of page data to obtain page content source rules of various types of page data; the page content source rule comprises a link template for providing content source links of page content;
and the data issuing unit is used for issuing the link templates, the page frame templates and the page content source rules of all types of page data to the user terminal, so that when the user terminal loads a page to be loaded, the page frame of the page to be loaded is loaded based on the page frame templates, and the page content of the page to be loaded is acquired from a network based on the page content source rules and loaded in the page frame of the page to be loaded so as to display the page to be loaded.
In a fourth aspect, an embodiment of the present specification provides a page loading apparatus, including:
the data acquisition unit is used for acquiring and storing a link template, a page frame template and page content source rules of various page data issued by the server; the page content source rule comprises a link template for providing content source links of page content;
the page judging unit is used for judging whether a target template matched with a page link of a page to be loaded exists in the link templates of various types of page data after a page loading request is obtained;
the frame display unit is used for loading a target page frame template which belongs to the same type of page data as the target template if the frame display unit exists so as to display the page frame of the page to be loaded;
and the page display unit is used for acquiring the page content of the page to be loaded from a network and loading the page content into a page frame of the page to be loaded to display the page to be loaded based on a target page content source rule of the page data belonging to the same class as the target template.
In a fifth aspect, another embodiment of the present specification provides a page loading apparatus, including: a memory, a processor and computer executable instructions stored on the memory and executable on the processor, which when executed by the processor implement the steps of the page loading method as described in the first or second aspect above.
In a sixth aspect, a further embodiment of the present specification provides a computer-readable storage medium for storing computer-executable instructions which, when executed by a processor, implement the steps of the page loading method according to the first or second aspect.
In one embodiment of the present specification, a plurality of target page data are obtained, each target page data is classified to obtain various page data, then a link template of each page data is determined according to a page link of each page data, a page frame template of each page data is determined according to an HTML element of each page data, then a content source of the page content of each page data is analyzed to obtain a page content source rule of each page data, finally the link template, the page frame template and the page content source rule of each page data are issued to a user terminal, so that the user terminal loads the page frame of the page to be loaded based on the page frame template when loading the page to be loaded with the page link matched with the link template, obtains the page content of the page to be loaded from a network based on the page content source rule and loads the page frame of the page to be loaded, to display the page to be loaded. Therefore, when the page is loaded through the embodiment, the user terminal can load the page frame based on the locally received page frame template, and then acquire the page content from the network and load the page content, so that the time consumption for requesting the page frame is saved, the page loading speed is increased, a proxy server for page loading is not required to be set, and the problems of complex implementation process and high cost due to the fact that the proxy server is required to be set when the webpage is accelerated in the prior art are solved.
Drawings
In order to more clearly illustrate the technical solutions in one or more embodiments of the present disclosure, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and for those skilled in the art, other drawings can be obtained according to these drawings without any creative effort.
Fig. 1 is a schematic view of an application scenario of a page loading method provided in an embodiment of the present specification;
fig. 2 is a schematic flowchart of a page loading method according to an embodiment of the present specification;
FIG. 3 is a diagram illustrating a classification of target page data according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a page loading method according to another embodiment of the present specification;
fig. 5 is a schematic structural diagram of a page loading apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a page loading apparatus according to another embodiment of the present specification;
fig. 7 is a schematic structural diagram of a page loading device according to an embodiment of the present specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in one or more embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all embodiments. All other embodiments that can be derived by a person skilled in the art from one or more of the embodiments described herein without making any inventive step shall fall within the scope of protection of this document.
An embodiment of the present specification provides a page loading method, which is used for increasing a page loading speed when a user terminal loads a page. Fig. 1 is a schematic view of an application scenario of a page loading method according to an embodiment of the present disclosure, as shown in fig. 1, the scenario includes a user terminal 100 and a server 200. The user terminal 100 and the server 200 are connected through a network 300. In fig. 1, the user terminal includes, but is not limited to, a mobile phone, a desktop computer, a tablet computer, a notebook computer, a vehicle-mounted computer, a wearable device, and the like, which can load a page, such as a web page. The server may be a server dedicated to web page acceleration.
In fig. 1, a server may obtain a plurality of target page data, classify the target page data according to the dependency relationship between the target page data and the page link of the target page data to obtain various page data, then determine the link templates of the various page data according to the page link of the various page data, determine the page frame templates of the various page data according to the HTML elements of the various page data, then analyze the content sources of the page contents of the various page data to obtain the page content source rules of the various page data, where the page content source rules include the link templates for providing the content source links of the page contents, and finally issue the link templates, the page frame templates, and the page content source rules of the various page data to a user terminal.
In fig. 1, after acquiring a page loading request, a user terminal determines whether a target template matching a page link of a page to be loaded exists in link templates of various types of page data, if so, loads a target page frame template belonging to the same type of page data as the target template to display a page frame of the page to be loaded, and acquires page content of the page to be loaded from a network and loads the page content in the page frame of the page to be loaded based on a target page content source rule belonging to the same type of page data as the target template to display the page to be loaded.
According to the page loading method in one or more embodiments of the present specification, the user terminal may load the page frame based on the locally received page frame template, and then obtain and load the page content from the network, so that time consumption for requesting the page frame is saved, the page loading speed is increased, a proxy server for page loading is not required, and the problems of complex implementation process and high cost due to the need of setting the proxy server when accelerating the web page in the prior art are solved.
The following describes in detail a specific process of the page loading method executed by the server.
Fig. 2 is a schematic flowchart of a page loading method provided in an embodiment of this specification, where the page loading method in fig. 2 is applied to a server and executed by the server, and as shown in fig. 2, the process includes:
step S202, acquiring a plurality of target page data, and classifying the target page data according to the affiliation among the target page data and the page link of the target page data to obtain various page data;
step S204, determining link templates of various page data according to page links of the various page data, and determining page frame templates of the various page data according to hypertext markup language (HTML) elements of the various page data;
step S206, analyzing content sources of page contents of various page data to obtain page content source rules of various page data; the page content source rule comprises a link template for providing content source links of the page content;
step S208, the link templates, the page frame templates and the page content source rules of various page data are issued to the user terminal, so that when the user terminal loads the page to be loaded, the page frame of the page to be loaded is loaded based on the page frame templates, the page content of the page to be loaded is obtained from the network based on the page content source rules and loaded in the page frame of the page to be loaded, and the page to be loaded is displayed.
In the embodiment, a plurality of target page data are firstly obtained, each target page data is classified to obtain various page data, then link templates of the various page data are determined according to page links of the various page data, page frame templates of the various page data are determined according to HTML elements of the various page data, content sources of page contents of the various page data are analyzed to obtain page content source rules of the various page data, finally the link templates, the page frame templates and the page content source rules of the various page data are issued to a user terminal, so that when the user terminal loads a page to be loaded with the page links matched with the link templates, the page frame of the page to be loaded is loaded based on the page frame templates, the page contents of the page to be loaded are obtained from a network based on the page content source rules and loaded in the page frame of the page to be loaded, to display the page to be loaded. Therefore, when the page is loaded through the embodiment, the user terminal can load the page frame based on the locally received page frame template, and then acquire the page content from the network and load the page content, so that the time consumption for requesting the page frame is saved, the page loading speed is increased, a proxy server for page loading is not required to be set, and the problems of complex implementation process and high cost due to the fact that the proxy server is required to be set when the webpage is accelerated in the prior art are solved.
In step S202, a plurality of target page data are acquired. In one embodiment, statistics may be performed on page data historically accessed by a large number of users in the internet, 500 webpages with the highest user access frequency in a certain time, such as the last three months, are determined, and data of the 500 webpages is obtained as target page data.
In the step S202, the target page data is classified according to the dependency relationship between the target page data and the page link of the target page data, so as to obtain various page data. The affiliation means that when the user jumps to the webpage B by triggering a certain control in the webpage a, the webpage B is the webpage affiliated to the webpage a. The page link may be a URL (Uniform Resource Locator) link.
In one embodiment, the target page data is classified according to the dependency relationship between the target page data and the page link of the target page data to obtain various page data, specifically:
(a1) if the target page data is website homepage data or subcategory homepage data subordinate to the website homepage data, taking the target page data as a type of page data; the website homepage data of different websites belong to different categories; different subcategory home page data belong to different categories; the different sub-category home page data comprises different sub-category home page data of the same website and different sub-category home page data of different websites;
(a2) if the target page data is sub-page data belonging to the same root page data, classifying the sub-page data belonging to the same root page data according to the page link of each sub-page data belonging to the same root page data to obtain various page data; the root page data includes the sub-category first page data and lower page data of the sub-category first page data.
It is understood that in a web site, there is a web site front page. Under the website home page, there are various subcategory home pages that are subordinate to the website home page. For example, a news website has a website home page, and below the website home page, there are a finance subcategory home page, an entertainment subcategory home page, a military subcategory home page, and the like, which belong to the website home page. In this regard, in the above-described operation (a1), when the target page data is the top page data or the subcategory top page data subordinate to the top page data, the target page data is regarded as the first-class page data. Considering that different websites have different top pages and different websites also have different subcategory top pages, the website top page data of the different websites are determined to be of different categories. The first page data of different sub-categories for the same website are also determined to be of different categories, and the first page data of different sub-categories for different websites are also determined to be of different categories.
In the above-described operation (a2), the sub-category top page data and the lower page data subordinate to the sub-category top page data are set as the root page data. For example, if a certain target page data is a sports section first page data, the target page data is a subcategory first page data and can be used as a root page data, and if a certain target page data is a next-level or multi-level sub-page data of the sports section first page data, the target page data is a next-level page data of the subcategory first page data and can also be used as a root page data. If the target page data are sub-page data belonging to the same root page data, classifying the sub-page data belonging to the same root page data according to the page link of the sub-page data belonging to the same root page data to obtain various page data. That is, when the target page data are sub-page data belonging to the same root page data, the sub-page data are classified according to page links of the sub-page data, and various types of page data are obtained.
The method comprises the following steps of classifying each sub-page data belonging to the same root page data according to the page link belonging to each sub-page data of the same root page data to obtain various page data, wherein the method specifically comprises the following steps:
(a21) acquiring page links of sub-page data belonging to the same root page data, and comparing domain names and paths in the acquired page links;
(a22) and taking sub-page data which are same in domain name and path and belong to the same root page data as page data of one class.
Specifically, page URL links of a plurality of sub-page data belonging to the same root page data are acquired, a domain name and a path in each acquired URL link are compared, and the plurality of sub-page data with the same domain name and path are used as one type of page data according to a comparison result. For example, there are 5 sub-page data belonging to the same root page data, the page URL links of the 5 sub-page data are obtained, the 5 URL links are compared, and it is found that the domain names and paths in the URL links of 1, 2, and 3 sub-page data are the same, and the domain names and paths in the URL links of 4 and 5 sub-page data are the same, so that the 1, 2, and 3 sub-page data can be used as one type of page data, and the 4, 5 sub-page data can be used as one type of page data.
Of course, if only one sub-page data exists under a certain root page data, the sub-page data itself belongs to a class of page data.
Fig. 3 is a schematic diagram of classifying target page data according to an embodiment of this specification, as shown in fig. 3, in an example, the obtained target page data respectively comes from a website a and a website B, and includes first page data of the website a, a plurality of subcategory first pages a1 and a2 of the website a, a1 and a2 respectively are an entertainment block first page and a financial block first page, first page data of the website B, a plurality of subcategory first pages B1 and B2 of the website B, and B1 and B2 respectively are a sports block first page and a news block first page, where 3 sub-page data a11, a12, a13, and B2 with a root page a1 are located below a1, and 3 sub-page data B11, B12, and B13 with a root page B2 being located below B2.
By the target page data classification method, the first page data of the website A, the subcategory first pages A1 and A2, the first page data of the website B, and the subcategory first pages B1 and B2 can be respectively and independently used as the first-class page data. Then, the domain names and the paths in the URL links of the sub-page data a11, a12 and a13 are compared, a11 and a12 are classified into a class of page data according to the comparison result, and a13 is classified into a class of page data. Finally, domain names and paths in URL links of the sub-page data B11, B12 and B13 are compared, B11 and B13 are classified into page data according to the comparison result, and B12 is classified into page data.
In fig. 3, if there are a plurality of sub-page data having any one of a11, a12, a13, B11, B12, and B13 as root page data, the domain name and the path in the URL link of the plurality of sub-page data may be similarly compared, and the plurality of sub-page data may be classified according to the comparison result. Of course, if there is one sub-page data having any one of a11, a12, a13, B11, B12, and B13 as root page data, the one sub-page data itself belongs to one type of page data.
Because the page architectures of different websites are different and the page architectures of the webpages of different levels are different, in this embodiment, according to the dependency relationship between the target page data and the page link of the target page data, the website top pages are classified into one type, the sub-type top pages are classified into one type, and the sub-pages are classified according to the URL link of the sub-pages to obtain various types of page data.
After the classification, in step S204, link templates of the various types of page data are determined according to page links of the various types of page data. The action specifically includes:
(b1) when the website homepage data or subcategory homepage data subordinate to the website homepage data are used as a type of page data, taking page links of the type of page data as link templates of the type of page data;
(b2) when various page data are obtained by classifying the sub-page data belonging to the same root page data, page links of the page data are compared, and a link template of the page data is constructed according to the comparison result.
According to the classification process of the target page data, three kinds of page data can be separated, wherein one kind of page data is website home page data, one kind of page data is subcategory home page data, and the other kind of page data is subpage data subordinate to root page data. The first two page data are respectively classified into one type, and the third page data are classified based on the domain name and the path in the URL. Based on this, in the action (b1), when the website top page data or the subcategory top page data subordinate to the website top page data is used as the category page data, since only one website top page data or one subcategory top page data is included in the category page data, the page link of the page data is used as the link template of the category page data. For example, the home page a1 of the website a is used as a type of page data, and the URL link of the website a1 is used as a link template of the type of page data.
In the act (b2), when the plurality of sub-page data belonging to the same root page data are classified to obtain various types of page data, the page links of the respective page data in the type of page data are compared, the same parameter and different parameters in the page links of the respective page data are extracted according to the comparison result, and the link template of the type of page data is constructed based on the extracted same parameter and different parameters. For example, there are 5 sub-page data1, 2, 3, 4, 5, and when the 5 sub-page data are classified to obtain two types of page data1, 2, 3, 4, 5, in one type of page data, the URL links of 1, 2, 3 are compared, the same parameter and different parameters in the URL links of 1, 2, 3 are determined according to the comparison result, and a link template of the type of page data is constructed based on the same parameter and different parameters. In another type of page data, the URL links of 4 and 5 are compared, the same parameters and different parameters in the URL links of 4 and 5 are determined according to the comparison result, and a link template of the page data is constructed based on the same parameters and different parameters.
In other embodiments, in the act (b2), when classifying the multiple sub-page data belonging to the same root page data to obtain various types of page data, a plurality of sample page data may also be extracted from each type of page data, where the sample page data may be extracted randomly or in an order from high to low access frequency of the page, the page links of the multiple sample page data are compared, the same parameter and different parameters in the page links of the multiple sample page data are extracted according to a comparison result, and the link template of the type of page data is constructed based on the extracted same parameter and different parameters.
The method comprises the following steps of constructing a link template of the page data based on the same parameters and different parameters, specifically: and replacing different parameters by using preset replacing symbols, and combining the same parameters and the replaced different parameters according to the same parameters and the arrangement sequence of the different parameters to construct a link template of the page data. For example, in the above example, if the URL link of the sub-page data 4 is abc.4.news, and the URL link of the sub-page data 5 is abc.5.news, the same parameters are abc and new, and different parameters are 4 and 5, then 4 and 5 are replaced with a substitute character, and the same parameters and the different replaced parameters are combined according to the arrangement order between the same parameters and the different parameters, so as to obtain the link template abc.
Of course, in the case where action (b2) is referred to, if there is only one sub-page data under a certain root page data, the one sub-page data itself belongs to a type of page data, and the link template of the type of page data is the URL link of the sub-page data.
Therefore, according to the embodiment, a corresponding URL link template can be constructed for each type of page data, and the URL link template can represent the common characteristics of the URL links of the type of page data.
After determining the link templates of each type of page data, in step S204, the page frame templates of each type of page data are also determined according to hypertext Markup language html (hypertext Markup language) elements of each type of page data.
In one embodiment, determining page frame templates of various types of page data according to HTML elements of various types of page data specifically includes:
(c1) when the website homepage data or subcategory homepage data subordinate to the website homepage data are taken as a type of page data, acquiring a plurality of HTML elements corresponding to the type of page data at a plurality of different access time points, extracting the same part in the plurality of HTM elements, and forming a page frame template of the type of page data;
(c2) when each sub-page data belonging to the same root page data is classified to obtain various page data, extracting a plurality of sub-page data from each page data, obtaining a plurality of HTML elements corresponding to the sub-page data, extracting the same part from the plurality of HTM elements, and forming a page frame template of the page data.
According to the classification process of the target page data, three kinds of page data can be separated, wherein one kind of page data is website home page data, one kind of page data is subcategory home page data, and the other kind of page data is subpage data subordinate to root page data. The first two page data are respectively classified into one type, and the third page data are classified based on the domain name and the path in the URL. Based on this, in the action (c1), when the website top page data or the subcategory top page data subordinate to the website top page data is used as the first-class page data, the first-class page data only includes one page data, a plurality of sets of HTML elements corresponding to the page data accessed at a plurality of different access time points are obtained, the same part of the plurality of sets of HTM elements is extracted, and the page frame template of the page data is formed. For example, www.a.com of a home page of a certain website is a type of page data, three HTML elements corresponding to when the page data is accessed at a plurality of different access time points, such as three time points of the past week, three days, and one day, are obtained, the same part of the three HTM elements is extracted, and a page frame template of the page data is formed. The page frame template may also be called a UI template.
In the act (c2), when classifying the multiple sub-page data belonging to the same root page data to obtain various types of page data, for each type of page data, extracting multiple sub-page data from each type of page data, where the multiple sub-page data may be extracted randomly or in an order from high to low access frequency of the page, obtaining multiple HTML elements corresponding to the multiple sub-page data, and extracting the same part from the multiple HTM elements to form a page frame template of the type of page data. For example, there are 5 sub-page data1, 2, 3, 4, and 5, and when the 5 sub-page data are classified to obtain two types of page data1, 2, 3, 4, and 5, in one type of page data, 1 and 2 are extracted from 1, 2, and 3, and two HTML elements corresponding to 1 and 2 are obtained, and the same part of the two HTM elements is extracted to form a page frame template of the type of page data. And in the other type of page data, extracting all 4 and 5, acquiring two HTML elements corresponding to 4 and 5, extracting the same part of the two HTM elements, and forming a page frame template of the type of page data.
Of course, in the case of action (c2), if there is only one sub-page data under a certain root page data, the one sub-page data itself belongs to a class of page data, and multiple HTML elements corresponding to the sub-page data at multiple different access time points are obtained in the manner of action (c1), and the same part of the multiple HTM elements is extracted to form a page frame template of the sub-page data.
Therefore, according to the embodiment, for each type of page data, a corresponding page frame template can be determined, and the page frame template can represent the common characteristics of the web page frames of the type of page data, that is, the common characteristics of the UI.
In the step S206, the content source of the page content of each type of page data is also analyzed to obtain the page content source rule of each type of page data; the page content source rule includes a link template for providing content source links for the page content. In one embodiment, the steps specifically include:
(d1) when the website homepage data or subcategory homepage data subordinate to the website homepage data are used as a type of page data, a content source link for providing page content for the type of page data is obtained, and the content source link is used as a link template of the content source link for providing the page content for the type of page data;
(d2) when various types of page data are obtained by classifying sub-page data belonging to the same root page data, extracting a plurality of sample page data from each type of page data, obtaining content source links for providing page contents for the sample page data, comparing the content source links corresponding to the sample page data in each type of page data, and constructing a link template of the content source links for providing the page contents for each type of page data according to the comparison result.
According to the classification process of the target page data, three kinds of page data can be separated, wherein one kind of page data is website home page data, one kind of page data is subcategory home page data, and the other kind of page data is subpage data subordinate to root page data. The first two page data are respectively classified into one type, and the third page data are classified based on the domain name and the path in the URL. Based on this, in the action (d1), when the website header data or the subcategory header data subordinate to the website header data is taken as one type of page data, the type of page data includes only one page data, a content source link for providing the page content to the page data is acquired, and the content source link is taken as a link template of the content source link for providing the page content to the type of page data. For example, a home page www.a.com of a certain website is a type of page data, content source links base1.com and data1.com for providing page content to the page data are obtained in a manual statistics manner, and base1.com and data1.com are used as link templates for providing content source links of the page content to the type of page data.
In the act (d2), when classifying the sub-page data belonging to the same root page data to obtain various types of page data, extracting a plurality of sample page data from each type of page data, where the sample page data may be extracted randomly or in an order from high to low of the access frequency of the page, obtaining content source links for providing the page content to the sample page data, comparing the content source links corresponding to the sample page data in each type of page data, extracting the same parameters and different parameters in the content source links according to the comparison result, and constructing a link template for providing the content source links for the page content to each type of page data based on the extracted same parameters and different parameters. For example, when there are 5 sub-page data1, 2, 3, 4, 5, and when the 5 sub-page data are classified to obtain two types of page data1, 2, 3, 4, 5, in one type of page data, 1 and 2 are extracted as sample page data, a content source link aaaa.bbbb.com for providing the page content to 1 by the user is obtained, a content source link aaaa.cccc.com for providing the page content to 2 is obtained, the content source link aaaa.bbbb.com and aaaa.cccc.com are compared, the same parameter aaaa.com and different parameters bbbb, cccc in the content source link are extracted according to the comparison result, and a link template for providing the content source link of the page content to each type of page data is constructed based on the extracted same parameter and different parameters, so as to obtain aaaa.
In another kind of page data, 4 and 5 are extracted as sample page data, content source links mmm.111.com and nnn.111.com for providing page contents to 4 by a user are obtained, content source links mmm.222.com and nnn.222.com for providing the page contents to 5 are obtained, the content source links mmm.111.com, mmm.222.com, nnn.111.com and nnn.222.com are compared, the same parameters mmm.com and nnn.com and different parameters 111 and 222 in the content source links are extracted according to the comparison result, and a link template for providing the content source links of the page contents to each kind of page data is constructed based on the extracted same parameters and different parameters, so that mmm. As can be seen from this example, when there are a plurality of content source links of each sample page data and the number of content source links of each sample page data is the same, the link templates of the content source links corresponding to each content source link are respectively generated.
The method comprises the following steps of constructing a link template of a content source link based on the same parameter and different parameters, specifically: and replacing different parameters by using preset replacing symbols, and combining the same parameters and the replaced different parameters according to the same parameters and the arrangement sequence of the different parameters to construct a link template of the content source link.
For example, in the above example, regarding aaaa.bbbb.com and aaaa.cccc.com, if the same parameters are determined to be aaaa and com, and the different parameters are bbbb and cccc, the same parameters and the different parameters after replacement are combined according to the arrangement order between the same parameters and the different parameters, so as to obtain the linked template aaaa.
Of course, in the case where action (d2) indicates that there is only one sub-page data under a certain piece of root page data, the one sub-page data itself belongs to a type of page data, and the content source link for providing the page content to the page data may be obtained in the manner of action (d1), and the content source link may be used as a link template of the content source link for providing the page content to the type of page data.
Therefore, according to the embodiment, for each type of page data, the corresponding page content source rule may be determined, where the page content source rule may include a link template for providing a content source link of the page content, so that the page content source rule reflects the source commonality of the page content of the type of page data.
Through the above process, after the plurality of target page data are obtained, the target page data can be classified, and the link templates of various page data, the page frame templates of various page data, and the page content source rules of various page data can be obtained. For example, for a certain type of page data, its link template is www.abc. times.com, its page frame template is < div > < span > < div class ═ content "> </div >, and its page content source rules include www.base. times.com and www.data. When the page frame template is determined, acquiring a cascading Style sheet css (caching Style sheets) of the type of page data and storing the cascading Style sheet css (caching Style sheets) together. The cascading style sheet of the type page data can be css of the sample page data in the type page data. When the website home page data or the subcategory home page data subordinate to the website home page data is taken as one type of page data, the sample page data is the website home page data or the subcategory home page data. When the sub-page data belonging to the same root page data are classified to obtain various page data, the sample page data are the page data extracted from the page data, and the extraction mode can be random extraction or extraction according to the sequence of the page access frequency from high to low.
Finally, in step S208, the link templates of various types of page data, the page frame templates of various types of page data, and the page content source rules of various types of page data are issued to the user terminal, so that when the user terminal loads a page to be loaded, where the page link matches the link template, the user terminal loads the page frame of the page to be loaded based on the page frame templates, and obtains the page content of the page to be loaded from the network based on the page content source rules and loads the page content into the page frame of the page to be loaded, so as to display the page to be loaded.
Therefore, when the page is loaded through the embodiment, the user terminal can load the page frame based on the locally received page frame template, and then acquire the page content from the network and load the page content, so that the time consumption for requesting the page frame is saved, the page loading speed is increased, a proxy server for page loading is not required to be set, and the problems of complex implementation process and high cost due to the fact that the proxy server is required to be set when the webpage is accelerated in the prior art are solved.
The following describes a detailed procedure of the page loading method of the user terminal. Fig. 4 is a schematic flowchart of a page loading method according to another embodiment of this specification, where the page loading method in fig. 4 is applied to a user terminal and executed by the user terminal, as shown in fig. 4, the process includes:
step S402, obtaining and storing link templates, page frame templates and page content source rules of various page data issued by a server; the page content source rule comprises a link template for providing content source links of the page content;
step S404, after a page loading request is obtained, judging whether a target template matched with a page link of a page to be loaded exists in link templates of various page data;
step S406, if the page frame template exists, loading a target page frame template which belongs to the same type of page data as the target template so as to display the page frame of the page to be loaded;
step S408, based on the target page content source rule of the target template belonging to the same type of page data, obtaining the page content of the page to be loaded from the network and loading the page content into the page frame of the page to be loaded, so as to display the page to be loaded.
Therefore, when the page is loaded through the embodiment, the user terminal can load the page frame based on the locally received page frame template, and then acquire the page content from the network and load the page content, so that the time consumption for requesting the page frame is saved, the page loading speed is increased, a proxy server for page loading is not required to be set, and the problems of complex implementation process and high cost due to the fact that the proxy server is required to be set when the webpage is accelerated in the prior art are solved.
In the step S402, the user terminal obtains and stores the link template, the page frame template, and the page content source rule of each type of page data issued by the server, where the page content source rule includes the link template for providing the content source link of the page content. The user terminal can store the link template, the page frame template and the page content source rule of various page data locally.
In step S404, after obtaining the page loading request based on the page access operation of the user, the user terminal determines whether a target template matching the page link of the page to be loaded exists in the link templates of the various types of locally stored page data. For example, the page link of the page to be loaded is www.abc.123.com, and the link template in which the user terminal stores some types of page data in advance is www.abc.
If yes, in step S406, the user terminal loads a target page frame template, that is, a UI frame, which belongs to the same type of page data as the target template, so as to display a page frame of the page to be loaded. Specifically, after the target template is determined to be stored, the page data type of the target template is determined, the page frame template of the page data is obtained from the local storage and is used as the target page frame template, and the target page frame template is loaded, so that the page frame of the page to be loaded is displayed. A page frame includes, but is not limited to, various frame portions in a web page.
In the step S408, based on the target page content source rule of the target template belonging to the same type of page data, the page content of the page to be loaded is obtained from the network and loaded in the page frame of the page to be loaded, so as to display the page to be loaded. Specifically, after the target template is determined to be stored, the page data type to which the target template belongs is determined, and the page content source rule of the page data is acquired from the local storage and is used as the target page content source rule. In one embodiment, the method for obtaining page content of a page to be loaded from a network based on a target page content source rule that a target template belongs to page data of the same type specifically includes:
(e1) analyzing the page to be loaded, and determining a page content source link corresponding to the page to be loaded;
(e2) screening links matched with each link template contained in the target page content source rule in page content source links corresponding to the page to be loaded;
(e3) and requesting the content corresponding to the matched link from the network as the page content of the page to be loaded.
Specifically, firstly, a page to be loaded is analyzed, and a page content source link corresponding to the page to be loaded is determined. For example, the content source links of the page corresponding to the page to be loaded obtained by analysis are 3, namely link 1, link 2 and link 3. And then, screening links matched with each link template contained in the target page content source rule in the page content source links corresponding to the page to be loaded. For example, each link template included in the target page content source rule includes a template a and a template B, and links matching the template a or the template B are screened among the links 1, 2, and 3. According to the screening result, it is determined that link 1 matches template a, link 2 matches template B, and link 3 has no matching template. And finally, requesting the content corresponding to the matched link from the network, namely requesting the content corresponding to the link 1 and the link 2 as the page content of the page to be loaded. Link 3 since there is no matching link template, link 3 is likely to be an advertisement link that is temporarily generated for the page to be loaded.
And finally, loading the page content of the page to be loaded into the page frame of the page to be loaded, thereby displaying the complete page to be loaded.
Therefore, when the page is loaded through the embodiment, the user terminal can load the page frame based on the locally received page frame template, and then acquire the page content from the network and load the page content, so that the time consumption for requesting the page frame is saved, the page loading speed is increased, a proxy server for page loading is not required to be set, and the problems of complex implementation process and high cost due to the fact that the proxy server is required to be set when the webpage is accelerated in the prior art are solved.
In an embodiment, the server periodically, for example, every other week based on the web page access condition of the internet user, re-determines the page with the higher access frequency as the target page data, re-classifies the latest target page data by the method flow in fig. 2, and issues the link template, the page frame template, and the page content source rule of each type of page data to the user terminal, so that the user terminal stores the link template, the page frame template, and the page content source rule for the latest target page data.
In an embodiment, if it is determined in step S404 that a target template matching the page link of the page to be loaded does not exist in the link templates of the various types of page data, on one hand, the user terminal may load the page to be loaded in a conventional manner, and on the other hand, the user terminal requests the server to use the page data to be loaded as the target page data, requests the server to classify the target page data again, and updates the link templates, the page frame templates, and the page content source rules of the various types of page data.
In an embodiment, after receiving the link templates, the page frame templates, and the page content source rules of various types of page data issued by the server, the user terminal sets the validity periods of the link templates, the page frame templates, and the page content source rules of various types of page data to be one week or other predetermined time, and loads a page through the flow in fig. 4 during the validity period, and when the validity period expires, the user terminal may actively apply to the server terminal for re-issuing the link templates, the page frame templates, and the page content source rules of various types of page data.
Fig. 5 is a schematic structural diagram of a page loading apparatus provided in an embodiment of this specification, where the apparatus is applied to a server side, and as shown in fig. 5, the apparatus includes:
a page classification unit 51, configured to acquire multiple pieces of target page data, and classify each piece of target page data according to a dependency relationship between each piece of target page data and a page link of each piece of target page data to obtain various pieces of page data;
the first determining unit 52 is configured to determine a link template of each type of page data according to a page link of each type of page data, and determine a page frame template of each type of page data according to a hypertext markup language HTML element of each type of page data;
a second determining unit 53, configured to analyze content sources of page contents of each type of the page data to obtain page content source rules of each type of the page data; the page content source rule comprises a link template for providing content source links of page content;
the data issuing unit 54 is configured to issue the link templates, the page frame templates, and the page content source rules of various types of page data to the user terminal, so that when the user terminal loads a page to be loaded, where a page link is matched with the link templates, the page frame of the page to be loaded is loaded based on the page frame templates, and the page content of the page to be loaded is acquired from a network based on the page content source rules and loaded in the page frame of the page to be loaded, so as to display the page to be loaded.
Optionally, the page classification unit is specifically configured to:
if the target page data is website homepage data or subcategory homepage data subordinate to the website homepage data, taking the target page data as a type of page data; the website homepage data of different websites belong to different categories; different subcategory home page data belong to different categories;
if the target page data is sub-page data belonging to the same root page data, classifying the sub-page data belonging to the same root page data according to the page link of each sub-page data belonging to the same root page data to obtain various page data; wherein the root page data includes the sub-category first page data and lower page data of the sub-category first page data.
Optionally, the page classification unit is further specifically configured to:
acquiring page links of sub-page data belonging to the same root page data, and comparing domain names and paths in the acquired page links;
and taking sub-page data which are same in domain name and path and belong to the same root page data as page data of one class.
Optionally, the first determining unit is specifically configured to:
when the website homepage data or subcategory homepage data subordinate to the website homepage data are used as a type of page data, taking page links of the type of page data as link templates of the type of page data;
when all sub-page data belonging to the same piece of page data are classified to obtain various types of page data, page links of the page data are compared, and a link template of the page data is constructed according to a comparison result.
Optionally, the first determining unit is specifically configured to:
when the website homepage data or subcategory homepage data subordinate to the website homepage data are taken as a type of page data, acquiring a plurality of HTML elements corresponding to the type of page data at a plurality of different access time points, extracting the same part in the plurality of HTM elements, and forming a page frame template of the type of page data;
when each sub-page data belonging to the same root page data is classified to obtain various page data, extracting a plurality of sub-page data from each page data, obtaining a plurality of HTML elements corresponding to the sub-page data, extracting the same part from the plurality of HTM elements, and forming a page frame template of the page data.
Optionally, the second determining unit is specifically configured to:
when website homepage data or subcategory homepage data subordinate to the website homepage data are used as a type of page data, a content source link for providing page content for the type of page data is obtained, and the content source link is used as a link template of the content source link for providing the page content for the type of page data;
when various types of page data are obtained by classifying sub-page data belonging to the same root page data, extracting a plurality of sample page data from each type of page data, obtaining content source links for providing page contents for the sample page data, comparing the content source links corresponding to the sample page data in each type of page data, and constructing a link template of the content source links for providing the page contents for each type of page data according to the comparison result.
The page loading device in this embodiment may implement each process of the aforementioned page loading method applied to the server side, and achieve the same function and effect, which is not repeated here.
Fig. 6 is a schematic structural diagram of a page loading apparatus according to another embodiment of the present disclosure, where the apparatus is applied to a user terminal, and as shown in fig. 6, the apparatus includes:
the data acquisition unit 61 is used for acquiring and storing a link template, a page frame template and page content source rules of various page data issued by the server; the page content source rule comprises a link template for providing content source links of page content;
the page judging unit 62 is configured to judge whether a target template matching a page link of a page to be loaded exists in link templates of various types of page data after a page loading request is obtained;
a frame display unit 63, configured to load a target page frame template belonging to the same type of page data as the target template if the target page frame template exists, so as to display a page frame of the page to be loaded;
and the page display unit 64 is configured to obtain the page content of the page to be loaded from the network and load the page content into the page frame of the page to be loaded, based on a target page content source rule of the page data belonging to the same class as the target template, so as to display the page to be loaded.
Optionally, the page display unit is specifically configured to:
analyzing the page to be loaded, and determining a page content source link corresponding to the page to be loaded;
screening links matched with link templates contained in the target page content source rules from page content source links corresponding to the pages to be loaded;
and requesting the content corresponding to the matched link from the network as the page content of the page to be loaded.
The page loading device in this embodiment can implement each process of the page loading method applied to the user terminal, and achieve the same function and effect, which is not repeated here.
Further, an embodiment of the present specification further provides a page loading device, fig. 7 is a schematic structural diagram of the page loading device provided in the embodiment of the present specification, and as shown in fig. 7, the page loading device includes: memory 701, processor 702, bus 703, and communication interface 704. The memory 701, processor 702, and communication interface 704 communicate via bus 703. the communication interface 704 may include input and output interfaces including, but not limited to, a keyboard, mouse, display, microphone, and the like.
In one embodiment, the memory 701 has stored thereon computer-executable instructions executable on the processor 702, which when executed by the processor 702 implement the following process:
acquiring a plurality of target page data, and classifying each target page data according to the membership between each target page data and the page link of each target page data to obtain various page data;
determining a link template of each type of page data according to page links of each type of page data, and determining a page frame template of each type of page data according to hypertext markup language (HTML) elements of each type of page data;
analyzing content sources of page contents of various types of page data to obtain page content source rules of various types of page data; the page content source rule comprises a link template for providing content source links of page content;
and issuing the link template, the page frame template and the page content source rule of each type of page data to a user terminal, so that when the user terminal loads a page to be loaded, wherein the page link of the page is matched with the link template, the page frame of the page to be loaded is loaded based on the page frame template, and the page content of the page to be loaded is acquired from a network based on the page content source rule and loaded in the page frame of the page to be loaded so as to display the page to be loaded.
Optionally, when executed by the processor, the computer-executable instruction classifies each target page data according to a dependency relationship between each target page data and a page link of each target page data, so as to obtain various types of page data, including:
if the target page data is website homepage data or subcategory homepage data subordinate to the website homepage data, taking the target page data as a type of page data; the website homepage data of different websites belong to different categories; different subcategory home page data belong to different categories;
if the target page data is sub-page data belonging to the same root page data, classifying the sub-page data belonging to the same root page data according to the page link of each sub-page data belonging to the same root page data to obtain various page data; wherein the root page data includes the sub-category first page data and lower page data of the sub-category first page data.
Optionally, when the computer executable instruction is executed by the processor, classifying each sub-page data belonging to the same root page data according to a page link of each sub-page data belonging to the same root page data, to obtain various types of page data, including:
acquiring page links of sub-page data belonging to the same root page data, and comparing domain names and paths in the acquired page links;
and taking sub-page data which are same in domain name and path and belong to the same root page data as page data of one class.
Optionally, when the computer-executable instructions are executed by the processor, determining a link template of each type of the page data according to a page link of each type of the page data includes:
when the website homepage data or subcategory homepage data subordinate to the website homepage data are used as a type of page data, taking page links of the type of page data as link templates of the type of page data;
when all sub-page data belonging to the same piece of page data are classified to obtain various types of page data, page links of the page data are compared, and a link template of the page data is constructed according to a comparison result.
Optionally, when executed by the processor, the computer-executable instructions determine page frame templates of various types of the page data according to HTML elements of various types of the page data, including:
when the website homepage data or subcategory homepage data subordinate to the website homepage data are taken as a type of page data, acquiring a plurality of HTML elements corresponding to the type of page data at a plurality of different access time points, extracting the same part in the plurality of HTM elements, and forming a page frame template of the type of page data;
when each sub-page data belonging to the same root page data is classified to obtain various page data, extracting a plurality of sub-page data from each page data, obtaining a plurality of HTML elements corresponding to the sub-page data, extracting the same part from the plurality of HTM elements, and forming a page frame template of the page data.
Optionally, when the computer executable instruction is executed by the processor, analyzing content sources of page contents of the various types of page data to obtain page content source rules of the various types of page data, where the analyzing includes:
when website homepage data or subcategory homepage data subordinate to the website homepage data are used as a type of page data, a content source link for providing page content for the type of page data is obtained, and the content source link is used as a link template of the content source link for providing the page content for the type of page data;
when various types of page data are obtained by classifying sub-page data belonging to the same root page data, extracting a plurality of sample page data from each type of page data, obtaining content source links for providing page contents for the sample page data, comparing the content source links corresponding to the sample page data in each type of page data, and constructing a link template of the content source links for providing the page contents for each type of page data according to the comparison result.
The page loading device in this embodiment may implement each process of the aforementioned page loading method applied to the server side, and achieve the same function and effect, which is not repeated here.
In another embodiment, the memory 701 has stored thereon computer-executable instructions executable on the processor 702, which when executed by the processor 702 implement the following:
acquiring and storing a link template, a page frame template and page content source rules of various page data issued by a server; the page content source rule comprises a link template for providing content source links of page content;
after a page loading request is obtained, judging whether a target template matched with a page link of a page to be loaded exists in link templates of various types of page data;
if so, loading a target page frame template which belongs to the same type of page data as the target template to display a page frame of the page to be loaded;
and acquiring the page content of the page to be loaded from a network and loading the page content into a page frame of the page to be loaded to display the page to be loaded based on a target page content source rule of the target template belonging to the same type of page data.
Optionally, when executed by the processor, the computer-executable instructions obtain the page content of the page to be loaded from the network based on a target page content source rule that the target template belongs to the same type of page data, including:
analyzing the page to be loaded, and determining a page content source link corresponding to the page to be loaded;
screening links matched with link templates contained in the target page content source rules from page content source links corresponding to the pages to be loaded;
and requesting the content corresponding to the matched link from the network as the page content of the page to be loaded.
The page loading device in this embodiment can implement the foregoing processes of the page loading method applied to the user terminal, and achieve the same functions and effects, which are not repeated here.
Further, another embodiment of the present specification also provides a computer-readable storage medium for storing computer-executable instructions, which when executed by a processor implement the following process:
acquiring a plurality of target page data, and classifying each target page data according to the membership between each target page data and the page link of each target page data to obtain various page data;
determining a link template of each type of page data according to page links of each type of page data, and determining a page frame template of each type of page data according to hypertext markup language (HTML) elements of each type of page data;
analyzing content sources of page contents of various types of page data to obtain page content source rules of various types of page data; the page content source rule comprises a link template for providing content source links of page content;
and issuing the link template, the page frame template and the page content source rule of each type of page data to a user terminal, so that when the user terminal loads a page to be loaded, wherein the page link of the page is matched with the link template, the page frame of the page to be loaded is loaded based on the page frame template, and the page content of the page to be loaded is acquired from a network based on the page content source rule and loaded in the page frame of the page to be loaded so as to display the page to be loaded.
Optionally, when executed by the processor, the computer-executable instruction classifies each target page data according to a dependency relationship between each target page data and a page link of each target page data, so as to obtain various types of page data, including:
if the target page data is website homepage data or subcategory homepage data subordinate to the website homepage data, taking the target page data as a type of page data; the website homepage data of different websites belong to different categories; different subcategory home page data belong to different categories;
if the target page data is sub-page data belonging to the same root page data, classifying the sub-page data belonging to the same root page data according to the page link of each sub-page data belonging to the same root page data to obtain various page data; wherein the root page data includes the sub-category first page data and lower page data of the sub-category first page data.
Optionally, when the computer executable instruction is executed by the processor, classifying each sub-page data belonging to the same root page data according to a page link of each sub-page data belonging to the same root page data, to obtain various types of page data, including:
acquiring page links of sub-page data belonging to the same root page data, and comparing domain names and paths in the acquired page links;
and taking sub-page data which are same in domain name and path and belong to the same root page data as page data of one class.
Optionally, when executed by the processor, the computer-executable instructions determine a link template of each type of the page data according to a page link of each type of the page data, including:
when the website homepage data or subcategory homepage data subordinate to the website homepage data are used as a type of page data, taking page links of the type of page data as link templates of the type of page data;
when all sub-page data belonging to the same piece of page data are classified to obtain various types of page data, page links of the page data are compared, and a link template of the page data is constructed according to a comparison result.
Optionally, when executed by the processor, the computer-executable instructions determine page frame templates of various types of the page data according to HTML elements of various types of the page data, including:
when the website homepage data or subcategory homepage data subordinate to the website homepage data are taken as a type of page data, acquiring a plurality of HTML elements corresponding to the type of page data at a plurality of different access time points, extracting the same part in the plurality of HTM elements, and forming a page frame template of the type of page data;
when each sub-page data belonging to the same root page data is classified to obtain various page data, extracting a plurality of sub-page data from each page data, obtaining a plurality of HTML elements corresponding to the sub-page data, extracting the same part from the plurality of HTM elements, and forming a page frame template of the page data.
Optionally, when executed by the processor, the computer-executable instructions analyze content sources of page contents of the various types of page data to obtain page content source rules of the various types of page data, including:
when website homepage data or subcategory homepage data subordinate to the website homepage data are used as a type of page data, a content source link for providing page content for the type of page data is obtained, and the content source link is used as a link template of the content source link for providing the page content for the type of page data;
when various types of page data are obtained by classifying sub-page data belonging to the same root page data, extracting a plurality of sample page data from each type of page data, obtaining content source links for providing page contents for the sample page data, comparing the content source links corresponding to the sample page data in each type of page data, and constructing a link template of the content source links for providing the page contents for each type of page data according to the comparison result.
The computer-readable storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The storage medium provided in an embodiment of this specification can implement the foregoing processes of the page loading method applied to the server side, and achieve the same functions and effects, which are not repeated here.
Further, another embodiment of the present specification also provides a computer-readable storage medium for storing computer-executable instructions, which when executed by a processor implement the following process:
acquiring and storing a link template, a page frame template and page content source rules of various page data issued by a server; the page content source rule comprises a link template for providing content source links of page content;
after a page loading request is obtained, judging whether a target template matched with a page link of a page to be loaded exists in link templates of various types of page data;
if so, loading a target page frame template which belongs to the same type of page data as the target template to display a page frame of the page to be loaded;
and acquiring the page content of the page to be loaded from a network and loading the page content into a page frame of the page to be loaded to display the page to be loaded based on a target page content source rule of the target template belonging to the same type of page data.
Optionally, when executed by the processor, the computer-executable instructions obtain the page content of the page to be loaded from the network based on a target page content source rule that the target template belongs to the same type of page data, including:
analyzing the page to be loaded, and determining a page content source link corresponding to the page to be loaded;
screening links matched with link templates contained in the target page content source rules from page content source links corresponding to the pages to be loaded;
and requesting the content corresponding to the matched link from the network as the page content of the page to be loaded.
The computer-readable storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The storage medium provided in an embodiment of this specification can implement the foregoing processes of the page loading method applied to the user terminal, and achieve the same functions and effects, which are not repeated here.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification and is not intended to limit the present document. Various modifications and changes may occur to the embodiments described herein, as will be apparent to those skilled in the art. Any modifications, equivalents, improvements, etc. which come within the spirit and principle of the disclosure are intended to be included within the scope of the claims of this document.

Claims (14)

1. A page loading method is characterized by comprising the following steps:
acquiring a plurality of target page data, and classifying each target page data according to the membership between each target page data and the page link of each target page data to obtain various page data;
determining a link template of each type of page data according to page links of each type of page data, and determining a page frame template of each type of page data according to hypertext markup language (HTML) elements of each type of page data;
analyzing content sources of page contents of various types of page data to obtain page content source rules of various types of page data; the page content source rule comprises a link template for providing content source links of page content;
and issuing the link template, the page frame template and the page content source rule of each type of page data to a user terminal, so that when the user terminal loads a page to be loaded, wherein the page link of the page is matched with the link template, the page frame of the page to be loaded is loaded based on the page frame template, and the page content of the page to be loaded is acquired from a network based on the page content source rule and loaded in the page frame of the page to be loaded so as to display the page to be loaded.
2. The method of claim 1, wherein classifying each of the target page data according to the dependency relationship between each of the target page data and the page link of each of the target page data to obtain various types of page data comprises:
if the target page data is website homepage data or subcategory homepage data subordinate to the website homepage data, taking the target page data as a type of page data; the website homepage data of different websites belong to different categories; different subcategory home page data belong to different categories;
if the target page data is sub-page data belonging to the same root page data, classifying the sub-page data belonging to the same root page data according to the page link of each sub-page data belonging to the same root page data to obtain various page data; wherein the root page data includes the sub-category first page data and lower page data of the sub-category first page data.
3. The method according to claim 2, wherein classifying the sub-page data belonging to the same root page data according to the page link of the sub-page data belonging to the same root page data to obtain various types of page data comprises:
acquiring page links of sub-page data belonging to the same root page data, and comparing domain names and paths in the acquired page links;
and taking sub-page data which are same in domain name and path and belong to the same root page data as page data of one class.
4. The method according to claim 2, wherein determining the link template of each type of the page data according to the page link of each type of the page data comprises:
when the website homepage data or subcategory homepage data subordinate to the website homepage data are used as a type of page data, taking page links of the type of page data as link templates of the type of page data;
when all sub-page data belonging to the same piece of page data are classified to obtain various types of page data, page links of the page data are compared, and a link template of the page data is constructed according to a comparison result.
5. The method of claim 2, wherein determining page frame templates for each type of the page data based on hypertext markup language (HTML) elements of the page data comprises:
when the website homepage data or subcategory homepage data subordinate to the website homepage data are taken as a type of page data, acquiring a plurality of HTML elements corresponding to the type of page data at a plurality of different access time points, extracting the same part in the plurality of HTM elements, and forming a page frame template of the type of page data;
when each sub-page data belonging to the same root page data is classified to obtain various page data, extracting a plurality of sub-page data from each page data, obtaining a plurality of HTML elements corresponding to the sub-page data, extracting the same part from the plurality of HTM elements, and forming a page frame template of the page data.
6. The method according to claim 2, wherein analyzing the content source of the page content of each type of the page data to obtain the page content source rule of each type of the page data comprises:
when website homepage data or subcategory homepage data subordinate to the website homepage data are used as a type of page data, a content source link for providing page content for the type of page data is obtained, and the content source link is used as a link template of the content source link for providing the page content for the type of page data;
when various types of page data are obtained by classifying sub-page data belonging to the same root page data, extracting a plurality of sample page data from each type of page data, obtaining content source links for providing page contents for the sample page data, comparing the content source links corresponding to the sample page data in each type of page data, and constructing a link template of the content source links for providing the page contents for each type of page data according to the comparison result.
7. A page loading method is characterized by comprising the following steps:
acquiring and storing a link template, a page frame template and page content source rules of various page data issued by a server; the page content source rule comprises a link template for providing content source links of page content;
after a page loading request is obtained, judging whether a target template matched with a page link of a page to be loaded exists in link templates of various types of page data;
if so, loading a target page frame template which belongs to the same type of page data as the target template to display a page frame of the page to be loaded;
and acquiring the page content of the page to be loaded from a network and loading the page content into a page frame of the page to be loaded to display the page to be loaded based on a target page content source rule of the target template belonging to the same type of page data.
8. The method according to claim 7, wherein obtaining the page content of the page to be loaded from the network based on the target page content source rule of the target template belonging to the same type of page data comprises:
analyzing the page to be loaded, and determining a page content source link corresponding to the page to be loaded;
screening links matched with link templates contained in the target page content source rules from page content source links corresponding to the pages to be loaded;
and requesting the content corresponding to the matched link from the network as the page content of the page to be loaded.
9. A page loading apparatus, comprising:
the page classification unit is used for acquiring a plurality of target page data, classifying the target page data according to the affiliation among the target page data and the page link of the target page data to obtain various page data;
the first determining unit is used for determining a link template of each type of page data according to page links of each type of page data, and determining a page frame template of each type of page data according to hypertext markup language (HTML) elements of each type of page data;
the second determining unit is used for analyzing content sources of page contents of various types of page data to obtain page content source rules of various types of page data; the page content source rule comprises a link template for providing content source links of page content;
and the data issuing unit is used for issuing the link templates, the page frame templates and the page content source rules of all types of page data to the user terminal, so that when the user terminal loads a page to be loaded, the page frame of the page to be loaded is loaded based on the page frame templates, and the page content of the page to be loaded is acquired from a network based on the page content source rules and loaded in the page frame of the page to be loaded so as to display the page to be loaded.
10. The apparatus according to claim 9, wherein the page classification unit is specifically configured to:
if the target page data is website homepage data or subcategory homepage data subordinate to the website homepage data, taking the target page data as a type of page data; the website homepage data of different websites belong to different categories; different subcategory home page data belong to different categories;
if the target page data is sub-page data belonging to the same root page data, classifying the sub-page data belonging to the same root page data according to the page link of each sub-page data belonging to the same root page data to obtain various page data; wherein the root page data includes the sub-category first page data and lower page data of the sub-category first page data.
11. The apparatus of claim 10, wherein the page classification unit is further specifically configured to:
acquiring page links of sub-page data belonging to the same root page data, and comparing domain names and paths in the acquired page links;
and taking sub-page data which are same in domain name and path and belong to the same root page data as page data of one class.
12. The apparatus according to claim 10, wherein the first determining unit is specifically configured to:
when the website homepage data or subcategory homepage data subordinate to the website homepage data are used as a type of page data, taking page links of the type of page data as link templates of the type of page data;
when all sub-page data belonging to the same piece of page data are classified to obtain various types of page data, page links of the page data are compared, and a link template of the page data is constructed according to a comparison result.
13. The apparatus according to claim 10, wherein the first determining unit is specifically configured to:
when the website homepage data or subcategory homepage data subordinate to the website homepage data are taken as a type of page data, acquiring a plurality of HTML elements corresponding to the type of page data at a plurality of different access time points, extracting the same part in the plurality of HTM elements, and forming a page frame template of the type of page data;
when each sub-page data belonging to the same root page data is classified to obtain various page data, extracting a plurality of sub-page data from each page data, obtaining a plurality of HTML elements corresponding to the sub-page data, extracting the same part from the plurality of HTM elements, and forming a page frame template of the page data.
14. A page loading apparatus, comprising:
the data acquisition unit is used for acquiring and storing a link template, a page frame template and page content source rules of various page data issued by the server; the page content source rule comprises a link template for providing content source links of page content;
the page judging unit is used for judging whether a target template matched with a page link of a page to be loaded exists in the link templates of various types of page data after a page loading request is obtained;
the frame display unit is used for loading a target page frame template which belongs to the same type of page data as the target template if the frame display unit exists so as to display the page frame of the page to be loaded;
and the page display unit is used for acquiring the page content of the page to be loaded from a network and loading the page content into a page frame of the page to be loaded to display the page to be loaded based on a target page content source rule of the page data belonging to the same class as the target template.
CN202111579647.0A 2021-12-22 2021-12-22 Page loading method, device, equipment and storage medium Active CN114238817B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111579647.0A CN114238817B (en) 2021-12-22 2021-12-22 Page loading method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111579647.0A CN114238817B (en) 2021-12-22 2021-12-22 Page loading method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114238817A true CN114238817A (en) 2022-03-25
CN114238817B CN114238817B (en) 2025-10-31

Family

ID=80761176

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111579647.0A Active CN114238817B (en) 2021-12-22 2021-12-22 Page loading method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114238817B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5987480A (en) * 1996-07-25 1999-11-16 Donohue; Michael Method and system for delivering documents customized for a particular user over the internet using imbedded dynamic content
CN101206570A (en) * 2006-12-21 2008-06-25 国际商业机器公司 Generating templates of nodes to structure content objects and steps to process the content objects
CN102902673A (en) * 2011-07-25 2013-01-30 北大方正集团有限公司 Method and device for dynamically generating web pages
CN107045546A (en) * 2017-03-31 2017-08-15 北京猎豹移动科技有限公司 A kind of web page processing method, device and intelligent terminal
CN109840298A (en) * 2018-12-29 2019-06-04 中国科学院计算技术研究所 The multi information source acquisition method and system of large scale network data
CN110633081A (en) * 2019-08-23 2019-12-31 北京浪潮数据技术有限公司 Page generation method and device
CN111190591A (en) * 2019-09-06 2020-05-22 腾讯科技(深圳)有限公司 Interface display method, data processing method, device, terminal and server
CN111914201A (en) * 2020-08-07 2020-11-10 腾讯科技(深圳)有限公司 Network page processing method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5987480A (en) * 1996-07-25 1999-11-16 Donohue; Michael Method and system for delivering documents customized for a particular user over the internet using imbedded dynamic content
CN101206570A (en) * 2006-12-21 2008-06-25 国际商业机器公司 Generating templates of nodes to structure content objects and steps to process the content objects
CN102902673A (en) * 2011-07-25 2013-01-30 北大方正集团有限公司 Method and device for dynamically generating web pages
CN107045546A (en) * 2017-03-31 2017-08-15 北京猎豹移动科技有限公司 A kind of web page processing method, device and intelligent terminal
CN109840298A (en) * 2018-12-29 2019-06-04 中国科学院计算技术研究所 The multi information source acquisition method and system of large scale network data
CN110633081A (en) * 2019-08-23 2019-12-31 北京浪潮数据技术有限公司 Page generation method and device
CN111190591A (en) * 2019-09-06 2020-05-22 腾讯科技(深圳)有限公司 Interface display method, data processing method, device, terminal and server
CN111914201A (en) * 2020-08-07 2020-11-10 腾讯科技(深圳)有限公司 Network page processing method and device

Also Published As

Publication number Publication date
CN114238817B (en) 2025-10-31

Similar Documents

Publication Publication Date Title
US11907644B2 (en) Detecting compatible layouts for content-based native ads
US20220156451A1 (en) Dynamic native content insertion
EP3518124A1 (en) Webpage rendering method and related device
US8762556B2 (en) Displaying content on a mobile device
US20170154013A9 (en) Ad blocking page display method and device
CN107256232B (en) Information recommendation method and device
US9563611B2 (en) Merging web page style addresses
WO2015062527A1 (en) Webpage advertisement interception method, device, and browser
CN110765208B (en) Data synchronization method and device, electronic equipment and storage medium
US11062019B2 (en) System and method for webpages scripts validation
CN111932308A (en) Data recommendation method, device and equipment
EP3289487B1 (en) Computer-implemented methods of website analysis
US8839126B1 (en) Secure HTML components for building client-side user interface
CN105205080A (en) Redundant file clearing method, device and system
CN111125605A (en) Page element acquisition method and device
CN112230952A (en) Form updating method, apparatus, computer equipment and storage medium
JP6763433B2 (en) Information gathering system, information gathering method, and program
CN114238817B (en) Page loading method, device, equipment and storage medium
JP2019139364A (en) Evaluation device, evaluation method and evaluation program
CN107622125B (en) Information crawling method and device and electronic equipment
CN107145543B (en) Information recommendation method and system in webpage interface
CN112073427B (en) System and method for identifying uplink and downlink flow data interfaces based on HTTP (hyper text transport protocol)
JP5372990B2 (en) Advertisement processing apparatus and method
CN105468611A (en) Webpage toolbar insertion method and apparatus
CN114330331B (en) Method and device for determining importance of word segmentation in link

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant