垂直搜索引擎爬蟲系統(tǒng)的研究與實現(xiàn)
本文關(guān)鍵詞:垂直搜索引擎爬蟲系統(tǒng)的研究與實現(xiàn),由筆耕文化傳播整理發(fā)布。
貴州大學(xué)
碩士學(xué)位論文
垂直搜索引擎爬蟲系統(tǒng)的研究與實現(xiàn)
姓名:吳建強(qiáng)
申請學(xué)位級別:碩士
專業(yè):計算機(jī)軟件與理論
指導(dǎo)教師:羅文俊
20080401
摘要
隨著因特網(wǎng)的迅猛發(fā)展,WEB信息的增加,用戶要在信息海洋里查找信息,就像大海撈針一樣,搜索引擎服務(wù)能成為最受歡迎的服務(wù)是因為它幫助用戶在浩瀚的互聯(lián)網(wǎng)快速的查找信息。在海量的網(wǎng)頁里找信息,按照傳統(tǒng)方式需要用戶逐個網(wǎng)站逐級目錄查找。要耗費大量的精力和時間,幾乎是不可能實現(xiàn)的任務(wù)。互聯(lián)網(wǎng)的信息量爆炸性增長,幾年前全球式搜索引擎收錄的網(wǎng)頁量只有幾千萬頁,而現(xiàn)在已經(jīng)達(dá)到幾十億頁。數(shù)量增加帶來的是搜索服務(wù)的品質(zhì)下降,查詢的結(jié)果集已經(jīng)是海量級的,多達(dá)數(shù)十萬條結(jié)果,結(jié)果里存在大量的重復(fù)信息和垃圾信息。用戶越來越感覺到很難在短時間內(nèi)準(zhǔn)確的篩選出需要的內(nèi)容,很難迅速的找到需要的信息。因此,搜索服務(wù)需要細(xì)化,需要提供更專業(yè),更有效的服務(wù)。
垂直搜索引擎是針對某一特定領(lǐng)域、某一特定人群或某一特定需求提供的有一定價值的信息和相關(guān)服務(wù)。垂直搜索引擎主要涉及的技術(shù)有:爬蟲,網(wǎng)頁結(jié)構(gòu)化信息抽取技術(shù)或元數(shù)據(jù)采集技術(shù),分詞和索引,其它信息處理技術(shù)。本文的工作主要研究垂直搜索引擎的爬蟲系統(tǒng),,并用程序?qū)崿F(xiàn)整個爬蟲系統(tǒng)。
網(wǎng)絡(luò)爬蟲(也叫網(wǎng)絡(luò)蜘蛛或網(wǎng)絡(luò)機(jī)器人)通過網(wǎng)頁的鏈接地址來尋找網(wǎng)頁,從網(wǎng)站某一個頁面(通常是首頁)開始,讀取網(wǎng)頁的內(nèi)容,找到在網(wǎng)頁中的其它鏈接地址,然后通過這些鏈接地址尋找下一個網(wǎng)頁,這樣一直循環(huán)直到把這個網(wǎng)站所有需要的網(wǎng)頁都抓取完為止。整個互聯(lián)網(wǎng)當(dāng)成一個網(wǎng)站,爬蟲就可以用這個原理把互聯(lián)網(wǎng)上所有的網(wǎng)頁都抓取下來。爬蟲系統(tǒng)需要運用到的技術(shù)有分布式、并發(fā)、鏈接選擇算法、鏈接過濾消重算法等。
有色網(wǎng)(ColoredPetriNet,以下簡稱ClaN)是具有層次性的高級Petri網(wǎng),是分布式并發(fā)系統(tǒng)建模和分析的最佳工具之一,用它建立的模型是可執(zhí)行的,有利于動態(tài)仿真。CPN庫所的顏色可以是任意復(fù)雜的數(shù)據(jù),大大簡化系統(tǒng)的復(fù)雜度;具有層次結(jié)構(gòu),可以從整體到局部、由粗到精地把系統(tǒng)分頁,逐步細(xì)化,突出重點。CPN是一種圖形化建模工具,也是一種形式化數(shù)學(xué)工具。本文采用CPN來為爬蟲系統(tǒng)建立模型,并驗證其正確性。m
但是,CPN是用來描述和分析要開發(fā)的系統(tǒng)模型的工具,不是計算機(jī)的實現(xiàn)】:具。一本文的最終目標(biāo)是要開發(fā)出能夠運行的爬蟲系統(tǒng),需要把CPN建立的模型轉(zhuǎn)化成計算機(jī)的實現(xiàn)。當(dāng)前主流的軟件開發(fā)技術(shù)是面向?qū)ο蠹夹g(shù),我們也將用面向?qū)ο蠹夹g(shù)實現(xiàn)爬蟲系統(tǒng)。在面向?qū)ο笙到y(tǒng)使用最為廣泛的建模工具是UML,UML是一種定義良好、易于表達(dá)、功能強(qiáng)大且普遍適用的建模語言。它溶入了軟件工程領(lǐng)域的新思想、新方法和新技術(shù),它的作用域不限于支持面向?qū)ο蟮姆治雠c設(shè)計,還支持從需求分析開始的軟件開發(fā)的全過程。在CPN模型的基礎(chǔ)上,提取用例,建立系統(tǒng)的用例圖,結(jié)合用例圖和CPN模型圖,設(shè)計系統(tǒng)靜態(tài)圖,主要設(shè)計系統(tǒng)的關(guān)鍵類,并崩狀態(tài)圖說明系統(tǒng)的關(guān)鍵部分。
本文選.Hjjava語言作為軟件的實現(xiàn)1:具,因為java語言有良好的跨平臺性,可以在window平臺開發(fā),移植至lJlinux平臺運行。系統(tǒng)選用mysql數(shù)據(jù)庫存儲數(shù)據(jù),linux為運行平臺。作為北京人正語言知識處理有限公司農(nóng)業(yè)難商搜索引擎項目的數(shù)據(jù)采集系統(tǒng),要抓取的網(wǎng)站數(shù)量總共92個,新聞資訊類網(wǎng)站82個,供求類網(wǎng)站10個。爬蟲開啟10個線程抓取新聞資訊類網(wǎng)站,3個線程抓取供求類網(wǎng)站。第一次完全抓取時,新聞資訊類網(wǎng)站平均每小時抓。保等f個網(wǎng)頁,供求類的平均每小時抓。矗埃埃皞網(wǎng)頁,平均每天可以抓。矗叭f網(wǎng)頁(晚上速度會快些)。十天的時間完成除阿里巴巴供求信息外所有網(wǎng)站的完全抓取,總共抓劍網(wǎng)頁410萬。此后每天屬于增量更新,目標(biāo)網(wǎng)站所發(fā)布的信息可以在半小時以內(nèi)被抓取,每天人約更新8000條數(shù)據(jù)。.
關(guān)鍵詞:垂直搜索引擎;爬蟲;CPN;UML;面向?qū)ο;Java:?/p>
Abstract
withtherapiddevelopmentoftheInteractandincrea∞ofWEBinformation,peoplehavemoredifficultyinfindinginformationintheinformationsea.SearchenginecanbecomethemostpopularservicesbecauseithelpsusersinthevastnessoftheInteracttofindinformationquickly.Findinginformationinthemassivepage,inaccordancewiththetraditionalmethodrequirestheuserstepbystep—by?sitedirectorytofind,tospendalotofenergyandtime,itisalmostimpossibletoachievethetask.TheexplosivegrowthofIntemetinformation,afewyearsagotheglobalsearchengineincludedonlyafewpagesof10million,andhasnowreachedsomelbillion.neincreaseinthenumberofpagesisthedeclineinthequalityofsearchservices,theresultsofinquirieshavebeensetisthemassivelevel,asmanyas100,000oftheresults。Therearealo|聯(lián)informationandrefusetorepeatinformation.Usersfeelmoreandmoredifficultinashortperiodoftimerequiredtoaccuratelyfilterthecontent.Itisdifficulttoquicklyfindtheinformationneeded.Therefore,thesearchserviceneedsrefinement,theneedtoprovideamoreprofessional,moreeffectiveservices.
Verticalsearchengineprovidesacertainvalueoftheinformationandrelatedservicesforaparticulararea,aspecificgroupofpeopleoraspecificneeds.Verticalsearchenginesmainlyinvolvestechnology:crawler,structureoftheWebinformationextractiontechnologyormetadatacollection,segmentationandindexing,informationprocessingtechnology.Ⅲspaperstudiestheverticalsearchengin,escrawlersystem,anddevelopsthesystem..
Networkcrawler(alsocallednetworkspidersornetworkrobot)viathewebtofindthelinkpage.Fromapage(usuallyhome)orasite,readthecontentstofindtheWebaddressoftheotherlinks,andthenthroughtheselinkstofindtheaddressofother、№bpage,soithasbeencirculatinguntilallpagesorthesitehasbeencrawled.IftheentireInteractasaW曲site,crawlerCallcrawlea玨theweb-pagesonthisprinciple.Crawlersystemneedstousethetechnologydistributed,concurrency,linkselectionalgorithmandlinks-eliminationfilteralgorithm.
ColoredPetriNet(calledCPN)isalevelofhigh—levelPetrinetandoneofthebesttoolstomodelandanalyzedistributedconcurrentsystem.nlemodelwithCPNisexecutiveandconducivetodynamicsimulation.ColorsetofCPNplacecanbearbitrarycomplexdata,greatlysimplifyingthecomplexityofthesystem.CPNishierarchicalstructureandpagessystemandgraduallyrefinedfromwholetolocal.coarse—to—fine.CPNisnotonlyagraphicalmodelingtool,butalsoaformalmathematicalt001.CrawlersystemismodeledwithCPNandverifieditscorrectnessinthispaper.
Howeve毛theCPNisadeveloptoolbeingusedtodescribeandanalyzethesystemmodel,nottherealizationofcomputertools.Becausetheultimategoalofthispaperistodevelopanexecutivecrawlersystem,weneedtoCPNmodelintoacomputerprogram.Crawlersystemisdevelopeduseobject-orientedtechnologybecausethecurrentmainSoftwaredevelopmenttechnologyisobject-orientedtechno!ogy.UMLmodelingtoolismostwidelyusedinobject-orientedsystem.UM已isawelldefinition,easytoexpress,powerfulanduniversallyapplicableModelingLanguage.UMLincludesthefieldofSoftwareengineeringofnewideas,newmethodsandnewtechnologies。Itsscopeisnotlimitedtosupportforobject-orientedanalysisanddesign,butsupportthewholeprocessofsoftwaredevelopmentfromthebeginningofrequirementsanalysis.ExtractingusecaseandprovidingusecasediagrambasedonCPNmodel。4
Thesystemstaticdiagram,mainlytheimportantclass,isdesignedwith毪secasediagramandtheCPNmodel。Andthekeypartofsystemisilluminatedwith
Thispaperusejava
cross-platform
linuxasastatediagram。toolfortherealizationofsoftware,becausejavahasgoodruncharacteristic.Theusesysteme強(qiáng)hedevelopedinthewindowandtransplantedtoplatform.Thesystemmysqldatabasefordatastorageandisrunninglinuxplatform.As
OildataacquisitionsystemofagriculturalVerticalsearchenginesLanguageKnowledgeServiceslad,thereareprojectof&黿堍DaZheng92sitestobecrawled,newsandinformationsite
82,thesupplyanddemandWebsite10.Thecrawlersopen10-threadcrawlNewsWebsite,threethreadstOcrawlsupplyanddemandWebsite.Thefirstfullcrawl,NewsWebsitecategoryaverage
ashourlycrawl15,000pages,suchsupplyanddemandof4,000perhourtOcrawlthepage,the
speeddailyaveragecancrawl400,000pages(atfaster).Apartfrom10daystocompleteAlibaba
asupplyanddemandinformation,thefullcrawlallsites,caughttotalof4.1millionpages.Aftera
calldayofincrementalupdates,thetargetsiteissuedbytheinformationbecrawledwithinhalf鍾
hour,aboutthedailyupdated8000data.
.
Keyword:VerticalSearchEngine;Crawler;CPN;UML;Object—Oriented;Java;5
原創(chuàng)性聲明
本人鄭重聲明:所呈交的學(xué)位論文,是本人在導(dǎo)師的指導(dǎo)下,獨立進(jìn)行研究所取得的成果。除文中已經(jīng)注明引用的內(nèi)容外,本論文不包含任何其他個人或集體已經(jīng)發(fā)表或撰寫過的科研成果。對本文的研究在做出重要貢獻(xiàn)的個人和集體,均已在文中以明確方式標(biāo)明。本人完全意識到本聲明的法律責(zé)任由本人承擔(dān)。,
論文作者簽名::殷蘭‰霹期:瀣舔.£。
關(guān)于學(xué)位論文使用授權(quán)的聲明
本人完全了解貴州大學(xué)有關(guān)保留、使用學(xué)位論文的規(guī)定,同意學(xué)校保留或向國家有關(guān)部門或機(jī)構(gòu)送交論文的復(fù)印件和電子版,允許論文被查閱和借閱;本人授權(quán)貴州大學(xué)可以將本學(xué)位論文的全部或部分內(nèi)容編入有關(guān)數(shù)據(jù)庫進(jìn)行檢索,可以采用影印、縮印或其他復(fù)制手段保存論文和匯編本學(xué)位論文.
(保密論文在解密后應(yīng)遵守此規(guī)定)
論文作者簽名:.垃蘊導(dǎo)師簽名:匾]鑫日期:迢亟:h企!。
本文關(guān)鍵詞:垂直搜索引擎爬蟲系統(tǒng)的研究與實現(xiàn),由筆耕文化傳播整理發(fā)布。
本文編號:171266
本文鏈接:http://www.sikaile.net/kejilunwen/sousuoyinqinglunwen/171266.html