爬虫技术综述
2017-11-20冯俐
冯俐
摘要:文章从介绍一般爬虫的逻辑结构开始,分类综述了发展历史中出现不同协作方式的顺序、并行和分布式爬虫,通用爬虫、深度爬虫以及增量爬虫等特殊分类的爬虫,着重介绍了主题爬虫的原理和相关策略,优势、应用和问题,最后提出主题爬虫未来的研究方向。
关键词:广域网分布式;Web爬虫;主题爬虫;知识主体
中图分类号:TP393 文献标识码:A 文章编号:1009-3044(2017)27-0213-02
Abstract: This article begins from the introduction of the logical structure of general crawler, reviews the different coordination modes of sequential, parallel and distributed crawler development history, general reptiles, Deep reptiles and incremental reptiles and other special classification of reptiles, focusing on the principles of the topical crawler and related strategies, advantages, applications and problems, and finally proposed the future research direction of the crawler.
Key words: Wan distributed Web crawler; topical crawler; knowledge subject
纵观爬虫技术的发展,实质是从一个简单的自动下载网络资源的程序,逐步发展到实现广域网范围内分布式协同的深度挖掘的精细分析方案。
1 爬虫结构
从斯坦福大学设计了爬虫系统的几个基本模块开始,早期的爬虫结构由四个部分组成:网页下载模块、内容分析模块、URL地址去重以及URL地址分配[1]。经过下载模块中host控制和DNS解析后,得到的网页再由网页分析模块进行预处理和信息抽取,URL分配模块解决划分URL策略和性能优化问题;在爬取的过程中,URL地址去重考虑消除重复链接。这个早期的爬虫结构也是爬虫程序的基本逻辑,也是顺序爬虫的原型。
2 爬虫协作方式的发展
周中华等人提出了一种并行架构的网络爬虫,专门用于新浪微博的数据采集[2]。这种并行爬虫采用一主多从模式。主节点负责整体的抓取队列和任务分配,各个从节点仅负责按任务队列抓取数据,抓取过程中获得的新队列则传回给主节点进行管理和分配。并行架构是指多个从节点并行抓取数据的结构。与串行爬虫相比,并行爬虫对爬取节点进行了角色的分工。……
