网络爬虫毕业设计

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

沈阳理工大学学士学位论文I摘要目前即使通讯软件在平时的生活中有着十分广泛的应用,但是对绝大部分的软件来说,都必须应用在互联网上,必须在一个INTERNET环境下才能使用。有时候单位内部的员工,同学,在没有互联网环境下或因其他原因希望不用INTERNET就可以进行信息交互,这样开发局域网通信就有了必要性。本文提出了局域网信息交互的需求,并详细对网络协议TCP/IP协议族进行了介绍和研究,如TCP,UDP,广播等相关技术。并对网络信息交互原理惊醒了说明,在此基础上利用SOCKET网络编程实现了一种基于WINDOWS平台的局域网信息交互功能。网络爬虫是一种自动搜集互联网信息的程序。通过网络爬虫不仅能够为搜索引擎采集网络信息,而且可以作为定向信息采集器,定向采集某些网站下的特定信息,如招聘信息,租房信息等。本文通过JAVA实现了一个基于广度优先算法的多线程爬虫程序。为何要使用多线程,以及如何实现多线程;系统实现过程中的数据存储;网页信息解析等。通过实现这一爬虫程序,可以搜集某一站点的URLs,并将搜集到的URLs存入数据库。将解析的网页存入XML文档。【关键词】网络爬虫;SOCKET编程;TCP/IP;网络编程;JAVA沈阳理工大学学士学位论文IIAbstractInstantmessagesoftwareinourdailyliveshasaverywiderangeofapplication,However,mostofthesoftwaremustbeusedintheInternet,anditmustbeusedinaInternetenvironment.SometimesInternalstaff,students,maynothavetheInternetenvironmentorotherreasonsdonotwishtobeabletocommunicateontheInternet.ThisdevelopmentwillhaveaneedforLANcommunicationprogram.Therefore,thispaperpresentstheneedsoflocalareanetworkexchangeinformationSoftware,AnddetailsofthenetworkprotocolTCP/IPprotocolsuiteareintroducedandresearchsuchasTCP,UDP,broadcast,andothertechnologies.andnetworkinformationexchangetheoryisdiscussed.BaseonthisconditionIuseofSocketNetworkprogrammingbasedonWindowsplatformtodevelopaLANchatapplication.SPIDERisaprogramwhichcanautocollectinformationsfrominternet.SPIDERcancollectdataforsearchengines,alsocanbeaDirectionalinformationcollector,collectsspecificallyinformationsfromsomewebsites,suchasHRinformations,houserentinformations.Inthispaper,useJAVAimplementsabreadth-firstalgorithmmulti-threadSPDIER.ThispaperexpatiatessomemajorproblemsofSPIDER:whytousemulti-threading,andhowtoimplementmulti-thread;datastructure;HTMLcodeparse.etc.ThisSPIDERcancollectURLsfromonewebsite,andstoreURLsintodatabase.【KEYWORD】SPIDER;JAVA;;Socketprogramming;TCP/IP;Networkprogramming沈阳理工大学学士学位论文III目录1绪论.........................................................................................................................11.1网络爬虫的发展...............................................................................................11.2国内外技术发展现状.......................................................................................21.3系统设计的意义...............................................................................................32总体设计方案.........................................................................................................42.1系统设计方案....................................................................................................42.2系统设计框图...................................................................................................42.3网络爬虫的相关技术.......................................................................................52.3.1URL............................................................................................................52.3.2HTTP协议.................................................................................................62.3.3JAVA多线程..............................................................................................92.3.4JAVA网络编程........................................................................................163系统软件设计.......................................................................................................213.1系统软件概述.................................................................................................213.2ECLIPSE软件介绍............................................................................................213.3服务器端设计.................................................................................................223.3.1网本页解析部分......................................................................................223.3.2获取新的网络代理部分..........................................................................363.4.1登录部分..................................................................................................373.4.2Table模块...............................................................................................373.4.2上传档及查询部分..................................................................................393.5SOCKET通信部分............................................................................................393.5.1什么是Socket..........................................................................................393.5.2服务端部分..............................................................................................443.5.3客户端部分..............................................................................................464系统运行.................................................................................................................494.1服务器端界面.................................................................................................494.2客户端界面......................................................................................................50结论.............................................................................................................................52致谢................................................................

1 / 69
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功