WO2015172567A1 - 一种互联网信息搜索聚合呈现方法 - Google Patents

一种互联网信息搜索聚合呈现方法 Download PDF

Info

Publication number
WO2015172567A1
WO2015172567A1 PCT/CN2014/095164 CN2014095164W WO2015172567A1 WO 2015172567 A1 WO2015172567 A1 WO 2015172567A1 CN 2014095164 W CN2014095164 W CN 2014095164W WO 2015172567 A1 WO2015172567 A1 WO 2015172567A1
Authority
WO
WIPO (PCT)
Prior art keywords
content
webpage
page
node
dom tree
Prior art date
Application number
PCT/CN2014/095164
Other languages
English (en)
French (fr)
Inventor
李晓东
杨柳青
洪博
陈勇
耿光刚
Original Assignee
中国科学院计算机网络信息中心
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国科学院计算机网络信息中心 filed Critical 中国科学院计算机网络信息中心
Publication of WO2015172567A1 publication Critical patent/WO2015172567A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques

Definitions

  • the invention relates to an internet information search aggregation presentation method, belonging to the technical field of computer networks.
  • the search engine refers to a system that automatically collects information from the Internet and, after some sorting, provides the user with a query.
  • the information on the Internet is vast and unordered. All the information is like a small island on the ocean.
  • the web link is a bridge between these islands, and the search engine draws a clear picture for the user.
  • Information map for users to check at any time.
  • this patent designs a method for aggregating search results with high homogeneity or similarity, in order to aggregate information from different sources (ie, help users analyze) and provide valuable value to users.
  • Information services not as "information transfer stations.”
  • the invention provides a new Internet search information integration and presentation method, which integrates and aggregates core information of homologous or similar webpages to provide valuable information services for users.
  • the inventive goal is to provide users with valuable aggregated information, unlike existing search engines that merely provide a list of connections that contain information.
  • An internet information search aggregation presentation method the steps of which are:
  • the method for extracting the text content of the crawled webpage is:
  • step 23 According to the target webpage DOM tree and the reference webpage DOM tree processed in step 22), determine a core content path of the target webpage and the reference webpage, and extract the webpage text.
  • the method for deleting the same node in the DOM tree and the reference web page DOM tree is:
  • the method for determining the core content path is: calculating the number of texts of each node in the DOM tree of the target webpage and the DOM tree of the reference webpage, and deleting the node if the number of texts of a node is less than a threshold of the set number of texts. Extracting the remaining text-containing nodes in the target page DOM tree and the reference page DOM tree as the core content path of the corresponding DOM tree corresponding web page.
  • each node includes a link element ⁇ a> The link text density of the node, if it is greater than the set density threshold, delete the node.
  • the homogenous content is extracted for all the webpages in each similar page group. Take and extract the differentiated content.
  • the method for generating the page Pi is: fusing the homogenous content and the differentiated content into a new document, wherein the homogenous content font is bold or blackened, and the homogeneous content and the different content are presented in different colors. Then, the original address corresponding to all the webpages in the similar page group is attached to the document, and a new URL URLi is dynamically created for the page Pi to generate the page Pi.
  • the method for generating the similar page group is: traversing the webpage in the candidate result set by two or two, calculating a string matching degree T of the title, a matching degree L of the effective content length of the webpage, and N keys having the highest frequency of occurrence of the page.
  • the homogenization information of the webpage is searched from the candidate result set, and the webpages in the candidate result set are clustered according to the homogenization information degree, and then the webpages in each class are traversed one by two to calculate the similarity of the pages. Sex.
  • the query word and the finally formed aggregate result are saved into a database and indexed; when a new query word is input, the corresponding aggregate result is retrieved according to the index.
  • the "intrinsic template-based web page body content extraction" algorithm does not involve the convergence and periodicity of sample annotation and learning algorithms, and does not address web content language, web design style. Any assumptions made with the web page template style type greatly improve the efficiency of the algorithm and reduce the labor cost, and have good versatility for the core content extraction of modern website pages.
  • Impurity content deletion and core content path extraction algorithms in the algorithm for web page body content extraction based on intrinsic templates may be different according to needs and scalability issues. Only a reference is given in the description of the algorithm. In practical applications, suitable algorithms (including statistical algorithms, machine learning algorithms, etc.) can be used according to different situations or the steps can be omitted directly.
  • the method for obtaining the reference webpage in the webpage text content extraction algorithm based on the intrinsic template can also design a flexible method according to the actual application, and is not limited to the currently proposed strategy.
  • the invention we designed makes the query result obtained by the user more targeted, the redundancy of the content is smaller than the user's own search, and the query result is more accurate and clean because the useless information such as advertisement is removed. It provides a more diversified content presentation for reading needs, and provides a more convenient expansion and supplement for purposeful reading.
  • the present invention contemplates a method of aggregating search results of homogeneity or similarity in order to expect Aggregating information from different sources (ie, helping users analyze) directly provides users with valuable information services.
  • the invention improves the existing search engine as a defect of "information transfer station”.
  • Figure 1 is a flow chart of the method of the present invention.
  • the system For the user's query, the system first finds in the aggregated content library whether there is already a cached result, and if so, directly responds to the aggregated content in the form of hierarchical information, and renders on the user page; if the content is in the aggregated content library If there is no relevant content, the related page is indexed in the page library through the user's query, the similarity comparison and the aggregation operation are performed, the response data source is formed, the result data is organized and organized according to the information hierarchical manner, and finally the presentation result is displayed.
  • the web index library is crawled by web crawlers on the Internet, extracting and building the web content, and establishing related indexes.
  • the core extraction is carried out by the algorithm of “extracting the content of the webpage based on the intrinsic template”: removing the irrelevant advertisement links, website navigation bar, website copyright and other information in the webpage, so that the webpage content is more accurate and more concise; the algorithm is summarized.
  • the webpage template can be used to quickly extract the content of the webpage of the same topic and accelerate the processing of the basic resource data; the "extraction of the webpage content based on the intrinsic template” is as follows:
  • a method for calculating the similarity of URLs is a method for calculating the similarity of URLs:
  • the URL similarity between the reference webpage and the target webpage that is really beneficial to the text extraction is 1; that is, by setting the threshold value, the webpage to be extracted by the text is found to satisfy a certain condition similar to that on the URL.
  • the page, then the two pages serve as a "target page, reference page" pair to extract the text.
  • auxiliary nodes that are not related to the core content of the web page from the target web page and the reference web page, such as ⁇ style>, ⁇ script>, ⁇ noscript>, ⁇ link>, ⁇ meta>, and the like.
  • Template node processing the same node deletion algorithm (template node deletion) is performed in the form of text in each node of the target webpage DOM tree and the reference webpage DOM tree, and the "deletion algorithm" is as follows:
  • the link text density of the node containing the link element ⁇ a> ie (the number of texts contained in the link element) / (the total number of texts contained in the link element parent node)
  • the result interval of the indicator is [0, 1] If the indicator is greater than a certain threshold, the node (the parent of the link element) can be considered as having little relevance to the core of the web page, so that the node can be deleted.
  • the threshold according to the node text number property of the entire DOM tree (the text characteristics of the node include the number of texts in the node, the number of texts in the node containing the link element ⁇ a>, etc., and some statistical methods can be used by some sample web pages. Summarize the text features of the smallest node containing the body content to infer a threshold, which plays a role in distinguishing the core content nodes to exclude other nodes with obvious non-text features, and then delete the text features according to the threshold.
  • the body of the web page is extracted (after positioning the smallest node where the core content is located, all the nodes on the path of the node to the ⁇ body> node are recorded in turn, and these nodes constitute the path from the root node ⁇ body> to the core content node.
  • the path extraction facilitates text extraction with web pages having the same intrinsic template Because "the body of the page content based on internal template extraction" narrow the scope of the algorithm from the DOM tree node whole page to the smallest node contains only the core content of the).
  • the present invention recursively traverses the target web page DOM tree, streamlines the DOM tree structure, and removes elements that affect the processing of the template node, thereby improving algorithm precision and computational efficiency.
  • the DOM tree structure of the same channel or the same topic on the same website due to design style and development efficiency, often use the same template, as well as the same style and component scripts.
  • their content is in the DOM tree.
  • the layout in the middle is often traceable (such web pages generally have a very high similarity when they belong to the same website).
  • hot content recommendation, site navigation, site copyright information, etc. are almost identical on the nodes in the DOM tree of the same template, while the core content of the topic-related web pages is at the level and node of the DOM tree because of the content.
  • There is a difference in content so the removal of elements that are not related to the core content of the web page can be done using DOM tree alignment.
  • tags, attributes, and nodes with exactly the same content they are more likely to be unrelated to the core content of the page, so they can be deleted.
  • the remaining content is the unique content related to the content of the webpage, and a small amount of different information related to time, user statistics, and the like. This has greatly improved the accuracy of the extraction of the core content of the webpage.
  • the page content processed by the "intrinsic template based web page content extraction” algorithm will be used to store and index the results to build a result page set (ResultSet) based on the user's query.
  • ResultSet result page set
  • the user's query will search in the established index to retrieve the corresponding web pages.
  • These pages constitute the query result page set, and the body content of the pages in these page sets will be used to perform the aggregation algorithm to form the final. Processing results.
  • the result of the aggregation will be cached in the aggregate library, making it easy for the next user to respond to the same query.
  • the system After receiving the query word submitted by the user, the system first checks whether the response content of the query word exists in the aggregated content library (ContentDB), and if so, directly returns the aggregated result set as a search result, and ends the process; Exist, go to step 3;
  • ContentDB aggregated content library
  • the candidate result set (ResultSet) is obtained by retrieving the latest index library (the index database of the ordinary webpage and the indexing library of the webpage (such as news) with high real-time requirements), and the update frequency thereof is different.
  • the value will take into account the resource type of the page in the candidate result set: for example, consider whether the page is mainly text or image or video, and the alpha value will be larger for the image set and video page.
  • the homogenization information of this information is preferentially sought from the ResultSet (because some of the more popular content is easy to cause more Search and reprint, and these content are more common in news, encyclopedia, blog and other types of websites, so the aggregation of the page content indexed by such keywords in advance will increase the speed of responding to user queries; In the classified candidate result set, prioritizing the aggregation of news, encyclopedia, blog and other types of pages will also improve the aggregation efficiency.
  • These popular information can be obtained from data similar to the Baidu index; the acquisition of homogenization information remains. You can use the algorithm mentioned in step 4 to make the homogenization decision.), then go to the aggregation, which will drastically reduce the comparison time, which can be more real-time and more efficient.
  • the link first extracts the content with higher content similarity, and further extracts the portion with higher content difference, and the extraction method can use steps.
  • the algorithm for discriminating page similarity in 4 the scope of the algorithm is the paragraphs of the body text, not the entire document; thus distinguishing the similarity content and the difference content in the body content at a more precise granularity; Homogeneous content and differentiated content A new document Pi, in which the homogenous content font is bold or blackened (you can further add comments next to the homogeneous content, prompts from different K pages, etc.), and the homogenous content and the difference content are different.
  • the color is presented; in addition, the original address (URL) of all the web pages in Si is also attached to the Pi document, and a new URL URLi is dynamically created for the Pi to be accessed by the user.
  • URL original address
  • a return result page to the user based on the page and URL generated in step 4, taking the page Pi (ie, the new page representing each page group generated in step 4) as an example: select the first M characters of the Pi and associate it with the URLi Together as the ith result.
  • the above N results are displayed in turn on the return page.
  • the Pi document items can be distinguished from the search results of the general search engine, and can be distinguished by setting a special background color.
  • the above content is stored in the aggregated content library (ContentDB), corresponding to the result of the query word, and updated regularly to cope with the repeated query of the user.
  • ContentDB aggregated content library
  • search engine results are presented as separate summary information and original webpage hyperlinks, that is, functions of the information relay station; search results presented by the system of the present invention It is based on aggregated information after web content integration, and a list of source links behind the information.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种互联网信息搜索聚合呈现方法。本方法为:1)在互联网上爬取页面,并根据页面正文内容建立对应该网页的索引;2)根据输入的查询词检索聚合内容库,若存在该查询词对应的应答内容,则将其作为搜索结果返回;若不存在,则进行步骤3);3)根据该查询词利用所建索引进行网页检索,获得一候选结果集;4)将该候选结果集中的网页正文进行内容相似性对比,得到一系列的相似页面组{S1,S2,…Sk};5)对每一相似页面组Si,提取该组内所有网页的同质内容和差异化内容,并将其融合生成一新的页面Pi;6)将每一组Si及Pi作为应答内容返回,并保存到所述聚合内容库中。本发明可直接为用户提供有价值的信息服务。

Description

一种互联网信息搜索聚合呈现方法 技术领域
本发明涉及一种互联网信息搜索聚合呈现方法,属于计算机网络技术领域。
背景技术
搜索引擎指自动从因特网搜集信息,经过一定整理以后,提供给用户进行查询的系统。因特网上的信息浩瀚万千,而且毫无秩序,所有的信息像汪洋上的一个个小岛,网页链接是这些小岛之间纵横交错的桥梁,而搜索引擎,则为用户绘制一幅一目了然的信息地图,供用户随时查阅。
互联网用户冥思苦想,将要搜索的内容抽象为“查询词”;可是现有搜索引擎却返回一堆链接(其中有相当一部分为重复内容或无用信息);用户想要的结果均匀的分布在这些链接中,搜索引擎成了“信息中转站”,而用户成了“分析器”。随着互联网内容的不断膨胀,以上情况变得愈加糟糕,网上可以搜索的网页变得愈来愈多,而网页内容的质量亦变得良莠不齐,没有保证。同质化信息充斥网络,导致当前的搜索引擎的检索结果产生大量的重复信息和杂讯,用户无法快速定位到原本需要的查询结果。互联网上典型的同质信息,比如:新闻的转载,以及社交网络微博的转发等。
针对现有搜索引擎的上述缺陷,本专利设计了一种将同质或相似性高的搜索结果聚合呈现的方法,以期望从不同来源聚合信息(即帮用户分析),为用户提供有价值的信息服务,而不是作为“信息中转站”。
发明内容
本发明提供了一种新的互联网搜索信息集成与呈现方法,将同质或相似性高的网页核心信息进行集成聚合,为用户提供有价值信息服务。发明目的是为用户提供有价值的聚合信息,而不像现有的搜索引擎仅仅提供包含信息的连接列表。
本发明的技术方案为:
一种互联网信息搜索聚合呈现方法,其步骤为:
1)利用搜索引擎在互联网上爬取页面,对爬到的网页使用基于内在模板的网页正文内容提取算法做正文内容提取,并根据正文内容建立对应该网页的索引;
2)根据输入的查询词检索聚合内容库,若存在该查询词对应的应答内容,则将其作为搜 索结果返回;若不存在,则进行步骤3);
3)根据该查询词利用所建索引进行网页检索,获得一候选结果集;
4)将该候选结果集中的网页正文进行内容相似性对比,将同质或内容相似性大于设定阈值的页面作为一组,得到一系列的相似页面组{S1,S2,…Sk};
5)对每一相似页面组Si,提取该组内所有网页的同质内容和差异化内容,并将其融合生成一新的页面Pi;
6)将每一相似页面组Si及其对应页面Pi作为该查询词对应的应答内容返回,并且将该查询词及其对应的应答内容保存到所述聚合内容库中。
进一步的,所述对爬到的网页做正文内容提取的方法为:
21)将所爬取的网页集中一网页作为目标网页,从该网页集中搜寻一与该目标网页URL相似度最高网页作为参考网页,然后将这两个页面转化成相应的DOM树;
22)删除目标网页DOM树和参考网页DOM树中相同的节点;
23)根据步骤22)处理后的目标网页DOM树和参考网页DOM树,确定目标网页和参考网页的核心内容路径,进行网页正文的提取。
进一步的,所述删除目标网页DOM树和参考网页DOM树中相同的节点的方法为:
31)从目标网页DOM树中的第一层节点开始,对于每一层节点,在参考网页DOM树中寻找准相同节点:即标签相同,并且属性键值对也相同;
32)将准相同节点看成文本行进行逐行的字符串对比;如果两个节点的对应文本行完全相同,则这两个节点完全相同,在两颗DOM树中分别删除该节点;如果两个节点对应的文本行不同,则逐层递归地对该节点的子节点们进行比对,查找相同节点并在两颗DOM树中分别删除,直到目标网页DOM树中不再有与参考网页DOM树中相同的节点。
进一步的,所述核心内容路径的确定方法为:计算目标网页DOM树和参考网页DOM树中每一节点的文本数,如果某个节点的文本数小于设定的文本数阈值,则删除该节点;提取目标网页DOM树和参考网页DOM树中剩余的包含文本的节点作为相应DOM树对应网页的核心内容路径。
进一步的,确定所述核心内容路径之前,对目标网页DOM树和参考网页DOM树进行杂质内容删除处理,其方法:计算目标网页DOM树和参考网页DOM树中每一节点包含链接元素<a>的节点的链接文本密度,如果大于设定密度阈值,则删除该节点。
进一步的,以网页正文的段落为单元,对每一相似页面组内所有网页进行同质内容的提 取和差异化内容的提取。
进一步的,生成所述页面Pi的方法为:将同质内容和差异化内容融合为一新的文档,其中同质内容字体加粗或加黑,且同质内容和差异性内容以不同颜色呈现;然后将对应相似页面组内所有网页的原始地址附在该文档中,并为其动态建立一个新的网址URLi,生成所述页面Pi。
进一步的,生成所述相似页面组的方法为:两两遍历所述候选结果集中的网页,计算标题的字符串匹配度T、网页有效内容长度的匹配度L和页面出现频率最高的N个关键词的重叠度F,然后根据S=alpha*T+beta*L+gamma*F得到两个页面的相似性S,将相似性S大于设定阈值的页面作为一组;其中,alpha,beta和gamma的取值均在[0,1]区间,且alpha+beta+gamma=1。
进一步的,首先从所述候选结果集中寻找网页的同质化信息,根据同质化信息度所述候选结果集中的网页进行聚类,然后两两遍历每一类中的网页,计算页面的相似性。
进一步的,将查询词以及最终形成的聚合结果保存到一数据库中并建立索引;当输入新的查询词时,根据该索引检索出相对应的聚合结果。
与现有技术相比,本发明的优点:
1)“基于内在模板的网页正文内容提取”算法思路直观,启发式规则简单通用,执行效率高,运算速度快,对于高度模板化的网页内容提取效果非常好。
2)相比于使用纯统计规则和纯机器学习的方法,该“基于内在模板的网页正文内容提取”算法不涉及样本标注和学习算法的收敛和周期问题,并且不对网页内容语言,网页设计风格和网页模板样式类型做任何假设,在大大提高了算法的效率、减少了人力成本的同时,对于现代网站网页的核心内容提取有良好的通用性。
3)对于基于内在模板的网页正文内容提取的算法中的杂质内容删除和核心内容路径提取算法可以根据需要和可拓展性问题不一而足。算法描述中仅仅给出了一个参考,在实际应用中可以根据不同的情况使用合适的算法(包括统计算法,机器学习算法等等)或直接略去此步骤。对于基于内在模板的网页正文内容提取算法中的参考网页的获取方法也可以根据实际应用设计灵活多变的方法,而不局限于当前所提出的策略。
4)相比于普通网页,我们设计的发明使用户得到的查询结果更具有针对性,内容的冗余度比用户自己搜索更小,查询结果也因为去掉了广告等无用信息而更加精确和干净,对于阅读需求提供了更加多样化的内容呈现,为有目的性的阅读提供更便捷的拓展补充。
总的来说,本发明设计了一种将同质或相似性高的搜索结果聚合呈现的方法,以期望从 不同来源聚合信息(即帮用户分析),直接为用户提供有价值的信息服务,该发明改进现有搜索引擎作为“信息中转站”的缺陷。
附图说明
图1为本发明的方法流程图。
具体实施方式
本部分详细介绍发明的具体技术方案。
对于用户的查询,系统首先在聚合内容库中查找是否已有被缓存的结果,如果有,则直接按照信息层次化的形式将聚合内容响应,并在用户页面上进行呈现;如果聚合内容库中没有相关内容,则通过用户的查询在页面库中索引相关页面,进行相似性比对以及聚合操作,形成响应数据源,按照信息层次化的方式将结果数据进行呈现整理,最后将其呈现结果展示给用户,并在聚合内容库中对该内容进行缓存,以便快速响应相同查询。网页索引库由网络爬虫对互联网上的页面进行抓取,对网页内容进行提取、建库,并建立相关索引。
本发明的方法流程如图1所示:
1.利用搜索引擎在互联网上爬取页面,对爬到的网页做正文内容提取,并根据正文内容建立对应该网页的索引。
通过“基于内在模板的网页正文内容提取”算法进行核心提取:去掉网页中与阅读无关的广告链接,网站导航栏,网站版权等信息,使得网页内容的获取更精准,更简洁;算法归纳出的网页模板可以用于快速的将同一网站同一专题的网页内容进行内容提取,加速基础资源数据的处理过程;“基于内在模板的网页正文内容提取”如下:
1)从待处理的目标网页的源代码中搜寻相似度最高的URL,获得该URL所对应的参考网页页面,并将这两个页面转化成相应的DOM树以进行后续处理。由于搜索引擎会按照一些当今主流的算法来抓取网页,这些网页中肯定会存在URL相似的网页,这些网页可以两两相互配对来进行网页正文提取操作,同步完成网页正文提取,并根据提取的正文建立内容索引;即优先抓取URL相似度满足一定条件的网页;对于我们要从中提取正文的网页称为算法的目标网页,与该目标网页URL相似度达到一定程度的网页,会被用来配合该目标网页的正文提取,因此URL相似的网页称为算法的参考网页,由于我们的算法可以同时提取出目标网页与参考网页的正文内容,因此目标网页与参考网页是一个相对的概念,他们互称为目标网页和参考网页;对于N个(N>=2)URL相似度满足一定条件的DOM树,它们之间就可以完 全完成正文提取,且效率是逐个DOM树进行提取的2倍;对于找不到满足URL相似度的DOM树,我们可以在其所属网站的同一专题下寻找次一级的相似URL网页作为参考网页进行正文提取,其所产生的噪音信息粒度不足以影响索引的建立和聚合的精确度。这里给出一个URL相似度计算的方法:
待判定的URLa:
protocol1://domainname1/p1/p2/p3/p4/f1.ext;p=0?q=1&w=2#fragment1;
待判定的URLb:
protocol2://domainname2/p1/p2/f2.ext;p=1?q=2&w=3#fragment;
相似度值命名为similarity=0;
首先比较网络协议部分,即protocol1和protocol2,如果不同,则similarity=-1;退出比较;
如果相同,则比较主机部分,即domainname1和domainname2,如果不同,则similarity=-1;退出比较。
如果相同,则比较路径部分,即/p1/p2/p3/p4/f1.ext;p=0和/p1/p2/f2.ext;p=1部分,从根目录名开始,逐层比较直到文件名与路径参数,对于URLa的路径层数为la(本例la为5),对于URLb的路径层数为lb(本例lb为3),记两个路径的相同部分层数为cl(本例为2),在比较过程中如果发现不相同(比如,在本例中第一次不相同将发生在p3和f2.ext;p=1的比较),则similarity=max(la,lb)-cl,在本例中similarity=3;如果similarity不为0,则比较结束,similarity的值即为比较结果值;如果similarity为0,即他们的路径部分完全相同,则在去比较它们的查询部分,即比较q=1&w=2和q=2&w=3中的键值对,如果完全相同,则similarity=0,退出比较;如果不完全相同,则记la为URLa的查询部分的键值对个数,lb为URLb的查询部分的键值对个数,cl为两个URL完全相同的查询键值对个数,则similarity=max(la,lb)-cl,退出比较。
从上面的计算可以看出真正有利于正文提取的参考网页与目标网页之间的URL相似度为1;即通过设置的阈值,将要进行正文提取的网页寻找一个与它在URL上满足一定相似条件的网页,然后这两个网页作为一个“目标网页,参考网页”对来一并进行正文提取。
2)对目标网页DOM树和参考网页DOM树进行节点预处理,如下:
2-1)从目标网页和参考网页中删除人机交互节点,如<form>,<fieldset>,<legend>,<input>,<select>,<menu>,<button>,<applet>,<object>等。
2-2)从目标网页和参考网页中删除与网页核心内容无关的辅助型节点,如<style>,<script>,<noscript>,<link>,<meta>等。
2-3)从目标网页和参考网页中删除在视觉上不可见的节点,如[style=”display:none;”],[style=”visibility:hidden;”]等。
2-4)从目标网页和参考网页中删除空节点,如<xxx></xxx>,<xxx/>等形式的节点。
2-5)从目标网页和参考网页中删除被注释的代码和其他相关注释内容。
3)模板节点处理:将目标网页DOM树和参考网页DOM树中的各个节点以文本的形式的进行相同节点删除算法(模板节点删除),“删除算法”如下:
3-1)以逐层遍历的方式获得目标网页DOM树中的第一层节点,或者依次将<body>的子节点压入节点队列,即获取<body>节点的子节点,以便进行接下来的深度优先递归遍历;
3-2)对于在3.1中的每一个节点在参考网页的DOM树中寻找准相同节点:即标签相同,并且属性键值对也相同;比如对于节点<div id=”id1”class=”cls1”attr=”attr1”>…</div>来说,如果有一节点在标签名(div),属性键值对(id=”id1”,class=”cls1”,attr=”attr1”等)上完全相同,则认为这两个节点的标签相同,对于节点中的文本内容以及子节点的标签信息和内容,将在后续进行比较。
3-3)将相同节点看成文本行进行逐行的字符串对比;如果两个节点的对应文本行完全相同,则这两个节点完全相同,那么可以在两颗DOM树中分别删除该节点;如果两个节点对应的文本行出现不同(说明这两个节点的子节点群不同,可能是数量不同,也可能是标签类型和属性键值对有差异),则需要递归地对该节点的子节点们进行逐层的“删除算法”,即回到3.1,直到目标网页DOM树中所有的节点进行过了“删除算法”,并且不再有相同的节点的存在。(在两个不同网页的DOM树中,完全相同的节点包含核心内容的可能性非常小,因此这些相同节点基本是属于网页中共有的导航,版权,广告,全局热点推荐等等噪音信息,剩余的节点中包含的则主要是网页的核心内容)。
4)杂质内容删除及核心内容路径提取:
4-1)杂质内容删除:该环节主要考虑对“基于内在模板的网页正文内容提取”算法结果中没有去掉的一些异质但又非核心内容的一些数据信息,不限于固定算法;这一步骤并不是必须的,对于内容聚合来说,“基于内在模板的网页正文内容提取”算法的结果精度已经足够了,为了以后更精确的处理结果,可以在一步中加入适当处理,增加系统可拓展性。一种可能的处理方法是:
考察包含链接元素<a>的节点的链接文本密度,即(链接元素所包含的文本数)/(链接元素父节点所包含的总文本数),该指标的结果区间为[0,1],如果该指标大于某个阈值,则可以认为该节点(链接元素的父节点)与网页核心正文的相关性不大,从而可以删除该节点。
4-2)核心内容路径提取:该步骤为了以后更大规模的拓展和效率提升而考虑,对于核心内容节点在DOM中的定位,可以大大缩小“基于内在模板的网页正文内容提取”算法的作用数据域,从而提高算法的效率,这在现阶段也并不是必须的。一种可能的处理方法是:
根据整个DOM树的节点文本数特性设置阈值(节点的文本特性包括节点中的文本个数,节点中包含在链接元素<a>的文本个数等,可以通过一些样本网页利用统计学习的方法来总结出包含正文内容的最小节点的文本特征,来推测出一个阈值,此阈值起到一定的区分核心内容节点的作用,来排除其他具有明显非正文特征的节点),然后根据该阈值删除文本特征不明显的节点(文本数小于阈值),保留的包含文本的节点最终被认为是网页正文的核心内容,提取这些节点在整个DOM树中的节点路径作为该网页的正文内容模板,便于后续同一模板网页的正文提取(在定位了核心内容所在的最小节点后,依次记录该节点到<body>节点的路径上的所有节点,这些节点即构成了从根节点<body>定位到核心内容节点的路径,该路径提取可方便同具有同一内在模板的网页进行正文提取,因为“基于内在模板的网页正文内容提取”算法的作用域从整个网页DOM树中的节点缩小到只包含核心内容的最小节点上了)。
由于模板节点的处理,本发明将递归地遍历目标网页DOM树,精简DOM树结构,并从中去除影响模板节点处理的元素,提高算法精度和运算效率。
同一网站上同一频道或同一专题下网页DOM树结构,由于设计风格和开发效率的考虑往往使用同一模板,以及相同的样式和组件脚本,对于这类网站的核心内容提取,他们的内容在DOM树中的布局往往有迹可循(这类网页在同属于一个网站的时候,他们的页面URL一般具有极高的相似性)。对于全局广告,热点内容推荐,站点导航,站点版权信息等内容在同一模板的DOM树中的节点上几乎完全一样,而主题相关的网页核心内容则因为内容的不同而在DOM树的层次和节点内容上有所差异,因此对于网页核心内容无关的元素的去除可以利用DOM树比对来完成。对于标签,属性,以及内容完全一样的节点(该规则必需递归地被该节点的所有子节点所满足),它们与网页核心内容无关的可能性更大,因此,可以删去。算法执行完毕后剩下的内容即为与网页内容相关的特有的内容,以及少量与时间、用户统计等有关的各异信息。这对于网页核心内容的提取已经大大提高了准确性。
通过“基于内在模板的网页正文内容提取”算法处理后的页面内容将被用来入库并建立索引,以便根据用户的查询来构建结果页面集(ResultSet)。我们把广泛抓取到的页面做正文提取处理,然后根据提取出来的正文为这些页面建立索引,用以根据索引检索到这些页面。用户的查询将会在所建立的索引中进行寻找,检索出相对应的网页,这些页面构成查询结果页面集,而这些页面集中的页面的正文内容,将被用来进行聚合算法,以形成最后的处理结果。 聚合结果将被缓存到聚合库中,便于下一次用户相同查询的结果快速响应。
2.系统接收用户提交的查询词后,首先检查该查询词的应答内容是否存在于聚合内容库(ContentDB)中,若存在,则直接返回已聚合的结果集作为搜索结果,结束流程;若不存在,进入步骤3;
3.根据用户的查询词,通过检索最新的索引库(普通网页的索引库和实时性要求高的网页(比如新闻)索引库,其更新频率存在差异),获得候选结果集(ResultSet)。
4.通过对ResultSet中的页面进行内容相似性比对,确定同质或内容相似性高的页面,形成一系列的相似页面组{S1,S2,…Sk}。本发明不限定特定的网页内容相似性判定方法,一种可行的候选算法如下:
综合考虑网页标题进行字符串匹配度(T),网页有效内容(去掉HTML标签后的信息)长度的匹配度(L),和页面出现频率最高的N个关键词的重叠度(F),最终两个页面的相似性S=alpha*T+beta*L+gamma*F,其中,alpha,beta和gamma的取值均在[0,1]区间,且alpha+beta+gamma=1,其具体取值将考虑候选结果集中的页面的资源类型:比如,考虑页面以文本为主、还是以图片或视频为主等,对于图片集和视频类页面,alpha的取值将更大一些。
另外,考虑到互联网上网页数目巨大,如果对所有页面都互相对比,将会耗费大量时间和服务器资源。由于同质化信息容易被转载的会集中于某些领域,如,新闻类网站的内容(凤凰网,网易新闻等);百科类网站的内容(百度百科,果壳网);某些专业领域的博客(CSDN,新浪博客)等。根据八二原则,这些少量的重要信息会占有绝大多数的搜索量,所以,以这些信息为标杆,从ResultSet中优先寻找这些信息的同质化信息(因为一些较热门内容,容易引起更多的搜索和转载,而且这些内容在新闻,百科,博客等类型的网站中较常出现,因此,提前对这类关键字所索引的页面内容做聚合,会提高对用户查询进行响应的速度;而在分类后的候选结果集中,优先对新闻,百科,博客等类型的页面做聚合,也会提高聚合效率。这些热门信息,可以从类似百度指数这样的数据中获得;同质化信息的获取依然可以使用步骤4中提到的算法进行同质化判定。),再去聚合,这样会急剧减少比较的时间,可以做到更实时、更高效。
5.对步骤4生成的相似页面组Si,将Si内所有网页的内容进行集成:该环节首先提取内容相似性较高的部分,并进一步提取内容差异性更高的部分,提取方法可以使用步骤4中的判别页面相似性的算法,算法的作用域为正文的各个段落,而非整篇文档;这样在更精确的粒度上对正文内容中的相似性内容和差异性内容进行了区分;将同质内容和差异化内容融 合为一新的文档Pi,其中同质内容字体加粗或加黑等(可以进一步在同质内容旁边加注释,提示来自不同的K个页面等),且同质内容和差异性内容以不同颜色呈现;另外,Si内所有网页的原始地址(URL)也附在Pi文档中,进一步为Pi动态建立一个新的网址URLi,供用户访问。
6.基于步骤4生成的页面和URL生成返回结果页面给用户,以页面Pi(即步骤4生成的代表各个页面组的新页面)为例:选取Pi的前M个字符,并将其与URLi一起作为第i个结果。在返回页面中依次展示上述N个结果。在返回结果页中,Pi文档项要和通用搜索引擎的搜索结果能区分出来,可以通过设置特别的底色等方式加以区分。同时,将上述内容存入聚合内容库(ContentDB),对应于该查询词的结果,并定期更新,以应对用户的重复查询。
该搜索聚合与呈现系统与现有搜索引擎最大的不同体现在:现有搜索引擎结果呈现为一个个独立的摘要信息和原网页超链接,即信息中转站的功能;本发明系统呈现的搜索结果是基于网页内容集成后的聚合信息,以及这些信息背后的来源链接列表。

Claims (10)

  1. 一种互联网信息搜索聚合呈现方法,其步骤为:
    1)利用搜索引擎在互联网上爬取页面,对爬到的网页做正文内容提取,并根据正文内容建立对应该网页的索引;
    2)根据输入的查询词检索聚合内容库,若存在该查询词对应的应答内容,则将其作为搜索结果返回;若不存在,则进行步骤3);
    3)根据该查询词利用所建索引进行网页检索,获得一候选结果集;
    4)将该候选结果集中的网页正文进行内容相似性对比,将同质或内容相似性大于设定阈值的页面作为一组,得到一系列的相似页面组{S1,S2,…Sk};
    5)对每一相似页面组Si,提取该组内所有网页的同质内容和差异化内容,并将其融合生成一新的页面Pi;
    6)将每一相似页面组Si及其对应页面Pi作为该查询词对应的应答内容返回,并且将该查询词及其对应的应答内容保存到所述聚合内容库中。
  2. 如权利要求1所述的方法,其特征在于所述对爬到的网页做正文内容提取的方法为:
    21)将所爬取的网页集中一网页作为目标网页,从该网页集中搜寻一与该目标网页URL相似度最高网页作为参考网页,然后将这两个页面转化成相应的DOM树;
    22)删除目标网页DOM树和参考网页DOM树中相同的节点;
    23)根据步骤22)处理后的目标网页DOM树和参考网页DOM树,确定目标网页和参考网页的核心内容路径,进行网页正文的提取。
  3. 如权利要求2所述的方法,其特征在于所述删除目标网页DOM树和参考网页DOM树中相同的节点的方法为:
    31)从目标网页DOM树中的第一层节点开始,对于每一层节点,在参考网页DOM树中寻找准相同节点:即标签相同,并且属性键值对也相同;
    32)将准相同节点看成文本行进行逐行的字符串对比;如果两个节点的对应文本行完全相同,则这两个节点完全相同,在两颗DOM树中分别删除该节点;如果两个节点对应的文本行不同,则逐层递归地对该节点的子节点们进行比对,查找相同节点并在两颗DOM树中分别删除,直到目标网页DOM树中不再有与参考网页DOM树中相同的节点。
  4. 如权利要求2或3所述的方法,其特征在于所述核心内容路径的确定方法为:计算目标网页DOM树和参考网页DOM树中每一节点的文本数,如果某个节点的文本数小于设定的 文本数阈值,则删除该节点;提取目标网页DOM树和参考网页DOM树中剩余的包含文本的节点作为相应DOM树对应网页的核心内容路径。
  5. 如权利要求2或3所述的方法,其特征在于确定所述核心内容路径之前,对目标网页DOM树和参考网页DOM树进行杂质内容删除处理,其方法:计算目标网页DOM树和参考网页DOM树中每一节点包含链接元素<a>的节点的链接文本密度,如果大于设定密度阈值,则删除该节点。
  6. 如权利要求1所述的方法,其特征在于以网页正文的段落为单元,对每一相似页面组内所有网页进行同质内容的提取和差异化内容的提取。
  7. 如权利要求6所述的方法,其特征在于生成所述页面Pi的方法为:将同质内容和差异化内容融合为一新的文档,其中同质内容字体加粗或加黑,且同质内容和差异性内容以不同颜色呈现;然后将对应相似页面组内所有网页的原始地址附在该文档中,并为其动态建立一个新的网址URLi,生成所述页面Pi。
  8. 如权利要求1所述的方法,其特征在于生成所述相似页面组的方法为:两两遍历所述候选结果集中的网页,计算标题的字符串匹配度T、网页有效内容长度的匹配度L和页面出现频率最高的N个关键词的重叠度F,然后根据S=alpha*T+beta*L+gamma*F得到两个页面的相似性S,将相似性S大于设定阈值的页面作为一组;其中,alpha,beta和gamma的取值均在[0,1]区间,且alpha+beta+gamma=1。
  9. 如权利要求8所述的方法,其特征在于首先从所述候选结果集中寻找网页的同质化信息,根据同质化信息度所述候选结果集中的网页进行聚类,然后两两遍历每一类中的网页,计算页面的相似性。
  10. 如权利要求1所述的方法,其特征在于将查询词以及最终形成的聚合结果保存到一数据库中并建立索引;当输入新的查询词时,根据该索引检索出相对应的聚合结果。
PCT/CN2014/095164 2014-05-12 2014-12-26 一种互联网信息搜索聚合呈现方法 WO2015172567A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410198228.6A CN103955529B (zh) 2014-05-12 2014-05-12 一种互联网信息搜索聚合呈现方法
CN201410198228.6 2014-05-12

Publications (1)

Publication Number Publication Date
WO2015172567A1 true WO2015172567A1 (zh) 2015-11-19

Family

ID=51332804

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/095164 WO2015172567A1 (zh) 2014-05-12 2014-12-26 一种互联网信息搜索聚合呈现方法

Country Status (2)

Country Link
CN (1) CN103955529B (zh)
WO (1) WO2015172567A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111274467A (zh) * 2019-12-31 2020-06-12 中国电子科技集团公司第二十八研究所 面向大规模数据采集的三层分布式去重架构和方法
CN112862536A (zh) * 2021-02-25 2021-05-28 腾讯科技(深圳)有限公司 一种数据处理方法、装置、设备及存储介质
CN114372267A (zh) * 2021-11-12 2022-04-19 哈尔滨工业大学 一种基于静态域的恶意网页识别检测方法、计算机及存储介质

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955529B (zh) * 2014-05-12 2018-05-01 中国科学院计算机网络信息中心 一种互联网信息搜索聚合呈现方法
CN104834703A (zh) * 2015-04-29 2015-08-12 深圳市梦网科技股份有限公司 检索方法及系统
CN106802899B (zh) * 2015-11-26 2020-11-24 北京搜狗科技发展有限公司 网页正文抽取方法及装置
CN106855859B (zh) * 2015-12-08 2020-11-10 北京搜狗科技发展有限公司 一种网页正文提取方法及装置
CN106326447B (zh) * 2016-08-26 2019-06-21 北京量科邦信息技术有限公司 一种众包网络爬虫抓取数据的检测方法及系统
CN106372214A (zh) * 2016-09-05 2017-02-01 青岛海信宽带多媒体技术有限公司 网页页面的显示控制方法和智能终端
CN106777206A (zh) * 2016-12-23 2017-05-31 北京奇虎科技有限公司 影视剧类关键词搜索展现方法及装置
CN106844540B (zh) * 2016-12-30 2021-02-05 腾讯科技(深圳)有限公司 一种信息处理方法及装置
CN107656985B (zh) * 2017-09-11 2020-11-27 北京京东尚科信息技术有限公司 网页查询方法及其系统
CN107748802A (zh) * 2017-11-17 2018-03-02 北京百度网讯科技有限公司 文章聚合方法及装置
CN110162356B (zh) * 2018-05-14 2021-09-28 腾讯科技(深圳)有限公司 页面的融合方法、装置、存储介质及电子装置
CN110633407B (zh) * 2018-06-20 2022-05-24 百度在线网络技术(北京)有限公司 信息检索方法、装置、设备及计算机可读介质
CN110162607B (zh) * 2019-02-20 2021-08-31 北京捷风数据技术有限公司 一种基于卷积神经网络的政府组织公文信息追溯方法及装置
CN110134853A (zh) * 2019-05-13 2019-08-16 重庆八戒传媒有限公司 数据爬取方法及系统
CN110175288B (zh) * 2019-05-23 2020-05-19 中国搜索信息科技股份有限公司 一种面向青少年群体的文字和图像数据的过滤方法及系统
CN111966940B (zh) * 2020-07-30 2021-06-18 北京大学 一种基于用户请求序列的目标数据定位方法和装置
CN113836449A (zh) * 2021-09-28 2021-12-24 北京字节跳动网络技术有限公司 一种信息展示方法、装置以及计算机存储介质
CN116881595B (zh) * 2023-09-06 2023-12-15 江西顶易科技发展有限公司 一种可自定义的网页数据爬取方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010014954A2 (en) * 2008-08-01 2010-02-04 Google Inc. Providing posts to discussion threads in response to a search query
CN103294781A (zh) * 2013-05-14 2013-09-11 百度在线网络技术(北京)有限公司 一种用于处理页面数据的方法与设备
CN103544176A (zh) * 2012-07-13 2014-01-29 百度在线网络技术(北京)有限公司 用于生成多个页面所对应的页面结构模板的方法和设备
CN103955529A (zh) * 2014-05-12 2014-07-30 中国科学院计算机网络信息中心 一种互联网信息搜索聚合呈现方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4431744B2 (ja) * 2004-06-07 2010-03-17 独立行政法人情報通信研究機構 Webページ情報融合表示装置、Webページ情報融合表示方法、Webページ情報融合表示プログラムおよびそのプログラムを記録したコンピュータ読み取り可能な記録媒体
KR20080059713A (ko) * 2006-12-26 2008-07-01 한국과학기술정보연구원 과학기술 정보에 대한 융합 정보 검색 시스템 및 그 방법
CN100476830C (zh) * 2007-06-07 2009-04-08 北京金山软件有限公司 一种网络资源检索方法及系统
CN103559259A (zh) * 2013-11-04 2014-02-05 同济大学 基于云平台的消除近似重复网页方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010014954A2 (en) * 2008-08-01 2010-02-04 Google Inc. Providing posts to discussion threads in response to a search query
CN103544176A (zh) * 2012-07-13 2014-01-29 百度在线网络技术(北京)有限公司 用于生成多个页面所对应的页面结构模板的方法和设备
CN103294781A (zh) * 2013-05-14 2013-09-11 百度在线网络技术(北京)有限公司 一种用于处理页面数据的方法与设备
CN103955529A (zh) * 2014-05-12 2014-07-30 中国科学院计算机网络信息中心 一种互联网信息搜索聚合呈现方法

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111274467A (zh) * 2019-12-31 2020-06-12 中国电子科技集团公司第二十八研究所 面向大规模数据采集的三层分布式去重架构和方法
CN112862536A (zh) * 2021-02-25 2021-05-28 腾讯科技(深圳)有限公司 一种数据处理方法、装置、设备及存储介质
CN112862536B (zh) * 2021-02-25 2023-07-11 腾讯科技(深圳)有限公司 一种数据处理方法、装置、设备及存储介质
CN114372267A (zh) * 2021-11-12 2022-04-19 哈尔滨工业大学 一种基于静态域的恶意网页识别检测方法、计算机及存储介质
CN114372267B (zh) * 2021-11-12 2024-05-28 哈尔滨工业大学 一种基于静态域的恶意网页识别检测方法、计算机及存储介质

Also Published As

Publication number Publication date
CN103955529A (zh) 2014-07-30
CN103955529B (zh) 2018-05-01

Similar Documents

Publication Publication Date Title
WO2015172567A1 (zh) 一种互联网信息搜索聚合呈现方法
Shinzato et al. Tsubaki: An open search engine infrastructure for developing information access methodology
US9454599B2 (en) Automatic definition of entity collections
CN109033358B (zh) 新闻聚合与智能实体关联的方法
US8554800B2 (en) System, methods and applications for structured document indexing
CN103294781B (zh) 一种用于处理页面数据的方法与设备
US20090248707A1 (en) Site-specific information-type detection methods and systems
Su et al. Combining tag and value similarity for data extraction and alignment
US20150287047A1 (en) Extracting Information from Chain-Store Websites
WO2015051481A1 (en) Determining collection membership in a data graph
CN103559258A (zh) 基于云计算的网页排序方法
CN110889023A (zh) 一种elasticsearch的分布式多功能搜索引擎
CN104572934A (zh) 一种基于dom的网页关键内容抽取方法
Patil et al. Search engine optimization technique importance
CN113239111A (zh) 一种基于知识图谱的网络舆情可视化分析方法及系统
Grigalis Towards web-scale structured web data extraction
CN114443928B (zh) 一种网络文本数据爬虫方法与系统
Yu et al. Web content information extraction based on DOM tree and statistical information
CN109948015B (zh) 一种元搜索列表结果抽取方法及系统
Saravanan et al. Extraction of Core Web Content from Web Pages using Noise Elimination.
Moreira et al. Analysis of structured data on Wikipedia
Zhang et al. An improved ontology-based web information extraction
Lim et al. Generalized and lightweight algorithms for automated web forum content extraction
Qinghua Application of WebCrawler in Information Search and Data Mining
Wei et al. Semi-automated construction of a knowledge graph with template

Legal Events

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

Ref document number: 14892066

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14892066

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 20.03.2017)

122 Ep: pct application non-entry in european phase

Ref document number: 14892066

Country of ref document: EP

Kind code of ref document: A1