基于广度优先算法的多线程网络爬虫设计.doc
《基于广度优先算法的多线程网络爬虫设计.doc》由会员分享,可在线阅读,更多相关《基于广度优先算法的多线程网络爬虫设计.doc(69页珍藏版)》请在启牛文库网上搜索。
1、沈阳理工大学学士学位论文 摘要 目前即使通讯软件在平时的生活中有着十分广泛的应用,但是对绝大部分的软件来说,都必须应用在互联网上,必须在一个INTERNET环境下才能使用。有时候单位内部的员工,同学,在没有互联网环境下或因其他原因希望不用INTERNET就可以进行信息交互,这样开发局域网通信就有了必要性。本文提出了局域网信息交互的需求,并详细对网络协议TCP/IP 协议族进行了介绍和研究,如TCP,UDP,广播等相关技术。并对网络信息交互原理惊醒了说明,在此基础上利用SOCKET网络编程实现了一种基于WINDOWS平台的局域网信息交互功能。网络爬虫是一种自动搜集互联网信息的程序。通过网络爬虫不
2、仅能够为搜索引擎采集网络信息,而且可以作为定向信息采集器,定向采集某些网站下的特定信息,如招聘信息,租房信息等。本文通过JAVA实现了一个基于广度优先算法的多线程爬虫程序。为何要使用多线程,以及如何实现多线程;系统实现过程中的数据存储;网页信息解析等。通过实现这一爬虫程序,可以搜集某一站点的URLs,并将搜集到的URLs存入数据库。将解析的网页存入XML文档。【关键词】 网络爬虫; SOCKET编程;TCP/IP;网络编程 ;JAVA AbstractInstant message software in our daily lives has a very wide range of app
3、lication , However ,most of the software must be used in the Internet , and it must be used in a Internet environment .Sometimes Internal staff, students ,may not have the Internet environment or other reasons do not wish to be able to communicate on the Internet .This development will have a need f
4、or LAN communication program .Therefore ,this paper presents the needs of local area network exchange information Software ,And details of the network protocol TCP/IP protocol suite are introduced and research such as TCP, UDP, broadcast ,and other technologies . and network information exchange the
5、ory is discussed . Base on this condition I use of Socket Network programming based on Windows platform to develop a LAN chat application . SPIDER is a program which can auto collect informations from internet. SPIDER can collect data for search engines, also can be a Directional information collect
6、or, collects specifically informations from some web sites, such as HR informations, house rent informations.In this paper, use JAVA implements a breadth-first algorithm multi-thread SPDIER. This paper expatiates some major problems of SPIDER: why to use multi-threading, and how to implement multi-t
7、hread; data structure; HTML code parse. etc. This SPIDER can collect URLs from one web site, and store URLs into database.【KEY WORD】SPIDER; JAVA;;Socket programming; TCP/IP ;Network programmingII沈阳理工大学学士学位论文 目录1 绪论11.1 网络爬虫的发展11.2 国内外技术发展现状21.3 系统设计的意义32 总体设计方案42.1 系统设计方案42.2 系统设计框图42.3 网络爬虫的相关技术52.
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 基于 广度 优先 算法 多线程 网络 爬虫 设计