CN107992565B - 一种优化搜索引擎的方法及*** - Google Patents

一种优化搜索引擎的方法及*** Download PDF

Info

Publication number
CN107992565B
CN107992565B CN201711228647.XA CN201711228647A CN107992565B CN 107992565 B CN107992565 B CN 107992565B CN 201711228647 A CN201711228647 A CN 201711228647A CN 107992565 B CN107992565 B CN 107992565B
Authority
CN
China
Prior art keywords
library
index
term
search
frequency
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.)
Active
Application number
CN201711228647.XA
Other languages
English (en)
Other versions
CN107992565A (zh
Inventor
谢永恒
于吉胜
火一莽
万月亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian 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 Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN201711228647.XA priority Critical patent/CN107992565B/zh
Publication of CN107992565A publication Critical patent/CN107992565A/zh
Application granted granted Critical
Publication of CN107992565B publication Critical patent/CN107992565B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • 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/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例公开了一种优化搜索引擎的方法及***,其中所述方法包括:定期获取倒排索引库中的高频词项,检查所述高频词项是否在预先建立的搜索词库中,其中,所述搜索词库中保存有用户输入的搜索词;如果所述高频词项不在所述搜索词库中,则在所述倒排索引库中删除所述高频词项及其索引,并把所述高频词项添加到不建索引词项库中。本发明实施例通过减少倒排索引库的规模,从而降低搜索引擎的存储空间和提升搜索引擎的搜索效率。

Description

一种优化搜索引擎的方法及***
技术领域
本发明涉及全文检索领域,尤其涉及一种优化搜索引擎的方法及***。
背景技术
随着互联网技术的快速发展,网络上的信息量每天都在飞速增加,网民主要通过搜索引擎筛选获取自己所需要的信息。搜索引擎从互联网上搜集网页信息,利用分词技术和网页排名算法构建词项的倒排索引库,网民输入搜索词,搜索引擎从倒排索引库中查找该搜索词,找到搜索词对应的网页并展现给网民。
由于网民要搜索的关键词是不可预期的,搜索引擎通过建立全量的分词倒排索引库以满足用户的搜索需求。但是这种方法仍存在如下问题:倒排索引库中大量的关键词从来不会被用户搜索,造成倒排索引库的存储空间的浪费,降低了搜索引擎的搜索效率。
发明内容
本发明实施例提供了一种优化搜索引擎的方法及***,以实现降低搜索引擎的存储空间,提升搜索引擎的搜索效率。
第一方面,本发明实施例提供了一种优化搜索引擎的方法,包括:
定期获取倒排索引库中的高频词项,检查所述高频词项是否在预先建立的搜索词库中,其中,所述搜索词库中保存有用户输入的搜索词;
如果所述高频词项不在所述搜索词库中,则在所述倒排索引库中删除所述高频词项及其索引,并把所述高频词项添加到不建索引词项库中。
第二方面,本发明实施例还提供了一种优化搜索引擎的***,包括:
获取检查模块,用于定期获取倒排索引库中的高频词项,检查所述高频词项是否在预先建立的搜索词库中,其中,所述搜索词库中保存有用户输入的搜索词;
处理模块,用于如果所述高频词项不在所述搜索词库中,则在所述倒排索引库中删除所述高频词项及其索引,并把所述高频词项添加到不建索引词项库中。
本发明实施例提供的一种优化搜索引擎的方法及***,通过将倒排索引库中的高频词项与搜索词库中的搜索词进行比对,删除倒排索引库中的用户从不检索的高频词项,有效消减倒排索引库的规模,降低搜索引擎的存储空间,提升搜索引擎的搜索效率。
附图说明
图1是本发明实施例一提供的一种优化搜索引擎的方法的流程示意图;
图2是本发明实施例二提供的一种优化搜索引擎的方法的流程示意图;
图3是本发明实施例三提供的一种优化搜索引擎的***的结构示意图。
具体实施方式
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。
实施例一
图1是本发明实施例一提供的一种优化搜索引擎的方法的流程图,本实施例可适用于对搜索引擎进行优化的情况,该方法可以由优化搜索引擎的***来执行,具体包括如下步骤:
步骤110、定期获取倒排索引库中的高频词项,检查所述高频词项是否在预先建立的搜索词库中。
倒排索引是一种索引方法,用于存储在全文搜索下某个关键词在一个文档或者一组文档中的存储位置的映射,即关键词到文档ID的映射,每个关键词都对应着一系列的文档,这些文档中都出现这个关键词。通过倒排索引,可以根据关键词快速获取包含这个关键词的文档列表。表1示出了倒排索引库的一种示例,如下:
表1
关键词 文档ID 词频
技术 1、14、26、123、267、2637、…… 92345
贝叶斯 3、26、28783、…… 123
北京 23、21、123、3214、43232、3244、…… 71234
说明 56、323、4433、343、244、2323、…… 9874
动手 2、23、45、678、1234、743998、…… 1234
如表1所示,倒排索引库主要包括关键词、关键词对应的文档ID以及关键词的词频,其中,可以根据关键词的词频由大到小对关键词进行排序,筛选出词频排在前N项的关键词作为高频词项,示例性的,表1所示的倒排索引库中,关键词“技术”、“北京”、“说明”的词频最高,根据相应的词频排序后,可将它们作为高频词项。
搜索词库用于保存有用户输入的搜索词,优选的,还保存搜索词的词频与搜索日期,表2示出了搜索词库的一种示例,如下:
表2
搜索词 最近搜索日期 词频
贝叶斯 2017-09-21 132
万达评级下调 2017-09-19 23
日本解散众议院 2017-09-23 1244
红黄蓝上市 2017-08-12 3244
倒排索引 2017-05-09 22422
具体的,把用户输入的搜索词保存在搜索词库之前,还需判断该搜索词是否在搜索词库中,如果该搜索词不在搜索词库中,新增该搜索词并初始化该搜索词的词频为1,同时初始化该搜索词最近搜索日期为当日,如果该搜索词在搜索词库中已存在则该搜索词的词频加1,并更新最近搜索日期。在本实施例中,优选的可根据搜索词的词频由高到低对搜索词进行排序,倒排索引词库中的每一个高频词项从搜索词词频最高的搜索词开始一一进行比对,检查高频词项是否在搜索词库中,如果高频词项在搜索词库中,循环检查下一个词项。由此提升比对的效率。同时结合搜索日期可统计用户在某段时间内的检索规律,为以后优化搜索引擎提供一定参考。
***定期获取倒排索引库中的高频词项,具体的,***依据配置文件定期获取倒排索引库中的高频词项,其中,所述配置文件中设置有获取倒排索引库中的高频词项的周期和数目。
步骤120、如果所述高频词项不在所述搜索词库中,则在所述倒排索引库中删除所述高频词项及其索引,并把所述高频词项添加到不建索引词项库中。
如果***定期获取的高频词项不在所述搜索词库中,即是该高频词项从来没有被用户搜索过,因此将该高频词项从倒排索引库中删除,并添加到不建索引词项库中,以减少倒排索引库的规模。
在本实施例中,通过将倒排索引库中的高频词项与搜索词库中的搜索词进行比对,删除倒排索引库中的用户从不检索的高频词项,有效消减倒排索引库的规模,降低搜索引擎的存储空间,提升搜索引擎的搜索效率。
实施例二
图2为本发明实施例二提供的一种优化搜索引擎的方法的流程示意图。本实施例在上述实施例的基础上进行优化,把所述高频词项添加到不建索引词项库中之后增加了以下步骤:对获取的网页进行分词处理,检查每个分词是否在所述不建索引词项库中;对于在所述不建索引词项库中的分词,则不需建立其倒排索引;对于不在所述不建索引词项库中的分词,则在倒排索引库中构建其倒排索引。
由此,在向不建索引词项库添加词项之后,搜索引擎对新获取的网页进行分词,检查分词是否在不建索引词项库中,以决定是否构建该分词的倒排索引。
相应的,本实施例的方法包括以下步骤:
步骤210、定期获取倒排索引库中的高频词项,检查所述高频词项是否在预先建立的搜索词库中。
步骤220、如果所述高频词项不在所述搜索词库中,则在所述倒排索引库中删除所述高频词项及其索引,并把所述高频词项添加到不建索引词项库中。
步骤230、对获取的网页进行分词处理,检查每个分词是否在所述不建索引词项库中,对于在所述不建索引词项库中的分词执行步骤240,反之执行步骤250。
对网页进行分词处理,优选的可以通过分词词库对网页文本内容进行分词,可将网页文本内容与分词词库中的词汇进行匹配,筛选出匹配成功的分词。筛选出的分词与不建索引词项库中的词项进行比对,检查筛选出的分词是否在不建索引词项库中。
步骤240、对于在所述不建索引词项库中的分词,则不需建立其倒排索引。
如果分词在不建索引词项库中,则说明该分词是用户从不进行检索的词项,为节省倒排索引库的空间,可不对该分词建立倒排索引。
步骤250、对于不在所述不建索引词项库中的分词,则在倒排索引库中构建其倒排索引。
如果分词不在不建索引词项库中,则该分词是用户经常检索的词项,需要对其建立倒排索引,通过该分词可以找到相应的一系列文档。
本实施例通过对新获取的网页进行分词后,检查分词是否在不建索引库中,以决定是否对分词建立倒排索引,有效降低倒排索引库的规模,减少搜索引擎的存储空间,提升搜索效率。
实施例三
图3是本发明实施例三提供的一种优化搜索引擎的***的结构示意图,如图3所示,所述***包括:
获取检查模块310,用于定期获取倒排索引库中的高频词项,检查所述高频词项是否在预先建立的搜索词库中,其中,所述搜索词库中保存有用户输入的搜索词;
处理模块320,用于如果所述高频词项不在所述搜索词库中,则在所述倒排索引库中删除所述高频词项及其索引,并把所述高频词项添加到不建索引词项库中。
本实施例提供的一种优化搜索引擎的***,通过将倒排索引库中的高频词项与搜索词库中的搜索词进行比对,删除倒排索引库中的用户从不检索的高频词项,有效消减倒排索引库的规模,降低搜索引擎的存储空间,提升搜索引擎的搜索效率。
在上述各实施例的基础上,所述***还包括:
分词处理检查模块,用于对获取的网页进行分词处理,检查每个分词是否在所述不建索引词项库中;
构建倒排索引模块,用于对于不在所述不建索引词项库中的分词,则在倒排索引库中构建所述分词的倒排索引。
进一步的,所述***中的获取检查模块还包括:
配置文件模块,用于依据配置文件定期获取倒排索引库中的高频词项,其中,所述配置文件中设置有获取倒排索引库中的高频词项的周期和数目。
本发明实施例所提供的一种优化搜索引擎的***可执行本发明任意实施例所提供的一种优化搜索引擎的方法,具备执行方法相应的功能模块和有益效果。
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。

Claims (6)

1.一种优化搜索引擎的方法,其特征在于,包括:
定期获取倒排索引库中的高频词项,检查所述高频词项是否在预先建立的搜索词库中,其中,所述搜索词库中保存有用户输入的搜索词,倒排索引库包括关键词、关键词对应的文档ID以及关键词的词频;
如果所述高频词项不在所述搜索词库中,则在所述倒排索引库中删除所述高频词项及其索引,并把所述高频词项添加到不建索引词项库中。
2.根据权利要求1所述的方法,其特征在于,在把所述高频词项添加到不建索引词项库中之后,所述方法还包括:
对获取的网页进行分词处理,检查每个分词是否在所述不建索引词项库中;
对于在所述不建索引词项库中的分词,则不需建立其倒排索引;
对于不在所述不建索引词项库中的分词,则在倒排索引库中构建其倒排索引。
3.根据权利要求1所述的方法,其特征在于,所述定期获取倒排索引库中的高频词项包括:
依据配置文件定期获取倒排索引库中的高频词项,其中,所述配置文件中设置有获取倒排索引库中的高频词项的周期和数目。
4.一种优化搜索引擎的***,其特征在于,所述***包括:
获取检查模块,用于定期获取倒排索引库中的高频词项,检查所述高频词项是否在预先建立的搜索词库中,其中,所述搜索词库中保存有用户输入的搜索词,倒排索引库包括关键词、关键词对应的文档ID以及关键词的词频;
处理模块,用于如果所述高频词项不在所述搜索词库中,则在所述倒排索引库中删除所述高频词项及其索引,并把所述高频词项添加到不建索引词项库中。
5.根据权利要求4所述的***,其特征在于,所述***还包括:
分词处理检查模块,用于对获取的网页进行分词处理,检查每个分词是否在所述不建索引词项库中;
构建倒排索引模块,用于对于不在所述不建索引词项库中的分词,则在倒排索引库中构建所述分词的倒排索引。
6.根据权利要求4所述的***,其特征在于,所述获取检查模块还包括:
配置文件模块,用于依据配置文件定期获取倒排索引库中的高频词项,其中,所述配置文件中设置有获取倒排索引库中的高频词项的周期和数目。
CN201711228647.XA 2017-11-29 2017-11-29 一种优化搜索引擎的方法及*** Active CN107992565B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711228647.XA CN107992565B (zh) 2017-11-29 2017-11-29 一种优化搜索引擎的方法及***

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711228647.XA CN107992565B (zh) 2017-11-29 2017-11-29 一种优化搜索引擎的方法及***

Publications (2)

Publication Number Publication Date
CN107992565A CN107992565A (zh) 2018-05-04
CN107992565B true CN107992565B (zh) 2020-11-03

Family

ID=62034118

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711228647.XA Active CN107992565B (zh) 2017-11-29 2017-11-29 一种优化搜索引擎的方法及***

Country Status (1)

Country Link
CN (1) CN107992565B (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111767308A (zh) * 2019-04-01 2020-10-13 广州精选速购网络科技有限公司 一种商品实时筛选和排序的方法、***、电子设备及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887417A (zh) * 2009-05-13 2010-11-17 上海即略网络信息科技有限公司 一种搜索方法
CN102722553A (zh) * 2012-05-24 2012-10-10 浙江大学 基于用户日志分析的分布式倒排索引组织方法
CN103903621A (zh) * 2012-12-26 2014-07-02 联想(北京)有限公司 一种语音识别的方法及电子设备
CN105930416A (zh) * 2016-04-19 2016-09-07 中山大学 一种用户反馈信息的可视化处理方法及***

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8271499B2 (en) * 2009-06-10 2012-09-18 At&T Intellectual Property I, L.P. Incremental maintenance of inverted indexes for approximate string matching

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887417A (zh) * 2009-05-13 2010-11-17 上海即略网络信息科技有限公司 一种搜索方法
CN102722553A (zh) * 2012-05-24 2012-10-10 浙江大学 基于用户日志分析的分布式倒排索引组织方法
CN103903621A (zh) * 2012-12-26 2014-07-02 联想(北京)有限公司 一种语音识别的方法及电子设备
CN105930416A (zh) * 2016-04-19 2016-09-07 中山大学 一种用户反馈信息的可视化处理方法及***

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于综合倒排索引的个性化搜索技术研究;林洁;《中国优秀硕士学位论文全文数据库 信息科技辑》;中国学术期刊(光盘版)电子杂志社;20090315(第3期);第I138-970页 *

Also Published As

Publication number Publication date
CN107992565A (zh) 2018-05-04

Similar Documents

Publication Publication Date Title
US9864808B2 (en) Knowledge-based entity detection and disambiguation
US9317613B2 (en) Large scale entity-specific resource classification
CN109885773B (zh) 一种文章个性化推荐方法、***、介质及设备
Rong et al. Egoset: Exploiting word ego-networks and user-generated ontology for multifaceted set expansion
US20170212899A1 (en) Method for searching related entities through entity co-occurrence
US20110264997A1 (en) Scalable Incremental Semantic Entity and Relatedness Extraction from Unstructured Text
KR102069341B1 (ko) 전자 문서 검색 방법 및 그 서버
US9858332B1 (en) Extracting and leveraging knowledge from unstructured data
CN107844493B (zh) 一种文件关联方法及***
CN111026710A (zh) 一种数据集的检索方法及***
Adamu et al. A survey on big data indexing strategies
Nuray-Turan et al. Attribute and object selection queries on objects with probabilistic attributes
CN107229714B (zh) 一种基于分布式数据库的全文搜索引擎
US8949254B1 (en) Enhancing the content and structure of a corpus of content
Nguyen et al. Tag-based paper retrieval: minimizing user effort with diversity awareness
CN107992565B (zh) 一种优化搜索引擎的方法及***
CN108509449B (zh) 一种信息处理的方法及服务器
WO2012091541A1 (en) A semantic web constructor system and a method thereof
Moumtzidou et al. Discovery of environmental nodes in the web
Gugnani et al. Triple indexing: an efficient technique for fast phrase query evaluation
Omri Effects of terms recognition mistakes on requests processing for interactive information retrieval
US11726972B2 (en) Directed data indexing based on conceptual relevance
CN111639099A (zh) 全文索引方法及***
Jia et al. Towards finding non-obvious papers: an analysis of citation recommender systems
Nan et al. Keywords extraction from Chinese document based on complex network theory

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
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method and system for optimizing search engine

Effective date of registration: 20220105

Granted publication date: 20201103

Pledgee: China Co. truction Bank Corp Beijing Zhongguancun branch

Pledgor: RUN TECHNOLOGIES Co.,Ltd. BEIJING

Registration number: Y2022990000005

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20220712

Granted publication date: 20201103

Pledgee: China Co. truction Bank Corp Beijing Zhongguancun branch

Pledgor: RUN TECHNOLOGIES Co.,Ltd. BEIJING

Registration number: Y2022990000005

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Method and system for optimizing search engine

Effective date of registration: 20220907

Granted publication date: 20201103

Pledgee: China Co. truction Bank Corp Beijing Zhongguancun branch

Pledgor: RUN TECHNOLOGIES Co.,Ltd. BEIJING

Registration number: Y2022110000206

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Granted publication date: 20201103

Pledgee: China Co. truction Bank Corp Beijing Zhongguancun branch

Pledgor: RUN TECHNOLOGIES Co.,Ltd. BEIJING

Registration number: Y2022110000206