登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 计算机科学与技术 > 正文

基于python的搜索引擎开发毕业论文

 2021-12-21 09:12  

论文总字数:22775字

摘 要

在当今大数据时代的背景下,各个行业、领域中的相关数据产生了爆发式的增长,越来越多的人们已经习惯依赖互联网来获取自己想要的信息。随着人们对搜索引擎的需求日益增长,通用搜索引擎渐渐难以满足用户对搜索结果的高要求,当用户需要检索信息时,通用搜索引擎得到的结果总是包含大量无效信息或过时信息,与用户的需求不符,这极大的降低检索效率和用户体验。作为应届生,在进行职位相关信息检索时,对信息的时效性、准确性有着较高的要求。于是,通过开发本搜索引擎,帮助求职者快速、高效的进行职位信息检索。

在本搜索引擎中,主要通过Scrapy框架对目标网站进行数据的爬取、解析,基于ElasticSearch搜索引擎框架建立倒排索引并实现查询功能,此外还利用了余弦相似度计算关键词和广告内容的匹配程度,从而实现广告推荐功能,此外,还具有热门搜索、搜索历史、收藏夹等功能,页面的展示通过Django框架来进行实现。用户可以利用本搜索引擎快速检索职位信息,搜索结果可选择按相关度或发布时间排序,可以通过历史记录、收藏夹、热门搜索进行相关的检索,此外还可以获得推荐的广告。论文对搜索引擎的研究背景,结构设计,需求分析等各方面进行了介绍,最后对搜索引擎的各项功能进行了测试。

关键词: 搜索引擎;ElasticSearch;Scrapy;倒排索引

Search engine development based on Python

Abstract

Under the background of the era of big data, the relevant data in various industries and fields has an explosive growth. More and more people are used to relying on the Internet to get the information they want. With the increasing demand for search engines, general search engines are gradually unable to meet the high demand of users for search results. When users need to retrieve information, the results obtained by general search engines always contain a large number of invalid or outdated information, which is inconsistent with the needs of users, which greatly reduces the retrieval efficiency and user experience.As a new student, there is a high demand for timeliness and accuracy of information in the process of position related information retrieval. Therefore, through the development of this search engine, it can help job seekers to search position information quickly and efficiently.

In this search engine, it mainly crawls and analyzes the data of the target website through the framework of the scrapy, builds the inverted index based on the framework of the elasticsearch engine, and realizes the query function. In addition, it also uses the cosine similarity to calculate the matching degree of keywords and advertising content, so as to realize the function of advertising recommendation. In addition, it also has popular search, search history, favorites Function and page display are implemented through Django framework. Users can use this search engine to retrieve position information more quickly, choose to sort by relevance and publishing time, and can retrieve relevant information through historical records, favorites, and popular searches, as well as get recommended advertisements. This paper introduces the research background, structure design, demand analysis and other aspects of search engine, and finally tests the functions of search engine.

Key words: Search engine; ElasticSearch; Scrapy; inverted index

目 录

摘 要 I

ABSTRACT II

第一章 绪论 1

1.1 选题背景 1

1.2 课题研究现状 1

1.3 研究内容 2

1.4 主要设计思路 2

第二章 相关技术介绍 3

2.1 网络爬虫 3

2.1.1 网络爬虫技术介绍 3

2.1.2 网络爬虫策略 3

2.1.3 反爬虫及解决方案 4

2.2 Scrapy框架 4

2.2.1 Scrapy架构图 4

2.2.2 Scrapy框架执行流程 5

2.2.3 Scrapy框架的url去重策略 6

2.2.4 Scrapy-redis 6

2.3 ElasticSearch框架 7

2.3.1 ElasticSearch框架的基本概念 7

2.3.2 倒排索引 7

2.3.3 文档搜索 8

2.3.4 文档更新 10

2.4 文本相似度 10

2.4.1 TF-IDF 10

2.4.2 余弦相似度 11

第三章 需求分析 12

3.1 系统可行性分析 12

3.1.1 技术可行性 12

3.1.2 操作可行性 12

3.2 功能需求 12

3.3 性能需求 12

第四章 系统总体设计 14

4.1 概述 14

4.2 系统功能结构图 14

4.3 网络爬虫时序图 15

4.4 搜索引擎流程图 16

4.5 ElasticSearch存储结构 16

4.6 广告数据存储 17

第五章 系统的实现 18

5.1 开发环境搭建 18

5.2 数据处理模块 18

5.2.1 数据爬取 18

5.2.2 将数据写入ElasticSearch 19

5.3 数据搜索模块 20

5.3.1 搜索功能实现 20

5.3.2 补全提示和纠错功能实现 23

5.3.3 关键字高亮实现 24

5.3.4 分页实现 24

5.4 功能拓展模块 25

5.4.1 广告推荐功能 25

5.4.2 热门搜索功能 27

5.4.3 我的搜索功能 28

5.4.4 历史记录功能 29

5.4.5 收藏夹功能 30

第六章 系统的测试 32

6.1 测试方法 32

6.2 测试方案及结果 32

6.2.1 数据处理模块 32

6.2.2 数据搜索模块 33

6.2.3 功能拓展模块 34

参考文献 35

总 结 37

第一章 绪论

1.1 选题背景

随着互联网产业的不断发展,网络上的信息呈现爆炸式的增长,在信息量不断增加的情况下,无效的、重复的信息也越来越多,用户如何高效的获取信息成为了巨大的挑战。作为应届毕业生,我们在准备就业时,希望针对意向职位、地点、公司等进行信息检索,然而现在的主流招聘网站上,每日更新的招聘信息数量在十万条以上,信息的分类繁多,很难进行精准定位,查找到有价值的信息。面对这种情况,传统的通用搜索引擎开始难以符合用户日益增长的需求,于是通过Scrapy[1]、ElasticSearch[2]框架设计并实现面向求职者的招聘信息搜索引擎,提升搜索结果关联度,提升搜索效率。

1.2 课题研究现状

搜索引擎是工作在互联网上的一门检索技术,它的出现是为了提高人们获取搜集信息的速度。1990年,一名学生发明了Archie,这被看作是第一代搜索引擎,它支持用文件名查找文件,在Archie中,用户可以从分类目录中找到目标信息。1995年,随着AltaVista的出现定义了第二代搜索引擎,它实现了高级搜索语法,可向用户返回相关度高的信息,该搜索引擎通过信息检索模型来比较用户查询关键字和网页内容的关联性。1998年,Google在多方面功能上实现了革新,如网页快照、PageRank、用户界面等,对海量信息成功的进行了智能整合,并具有交互性较强的界面,自此搜索引擎进入了整合分析时代。现如今,搜索引擎进入了新的时代,主要目标是以用户为中心,通过用户输入的关键字来判断用户真正想要查询的内容。而最有可能实现精准到个人的搜索功能的公司,很有可能是掌握了大量个人信息的商业巨头,通过对用户进行大数据分析,从而为每个人定制不同的查询结果,比如淘宝、京东等产品。

请支付后下载全文,论文总字数:22775字

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图