[论文解读] Archiving Deferred Representations Using a Two-Tiered Crawling Approach
本文提出一种两级网络爬取策略,利用分类器将依赖客户端JavaScript渲染的延迟呈现内容路由至PhantomJS进行完整渲染,而无需延迟的资源则使用速度更快的Heritrix进行爬取。该方法相较于纯PhantomJS爬取实现了5.2倍的性能提升,相较于仅使用Heritrix的爬取,爬取范围扩大了1.8倍,显著提升了归档完整性,同时未牺牲性能。
Web resources are increasingly interactive, resulting in resources that are increasingly difficult to archive. The archival difficulty is based on the use of client-side technologies (e.g., JavaScript) to change the client-side state of a representation after it has initially loaded. We refer to these representations as deferred representations. We can better archive deferred representations using tools like headless browsing clients. We use 10,000 seed Universal Resource Identifiers (URIs) to explore the impact of including PhantomJS -- a headless browsing tool -- into the crawling process by comparing the performance of wget (the baseline), PhantomJS, and Heritrix. Heritrix crawled 2.065 URIs per second, 12.15 times faster than PhantomJS and 2.4 times faster than wget. However, PhantomJS discovered 531,484 URIs, 1.75 times more than Heritrix and 4.11 times more than wget. To take advantage of the performance benefits of Heritrix and the URI discovery of PhantomJS, we recommend a tiered crawling strategy in which a classifier predicts whether a representation will be deferred or not, and only resources with deferred representations are crawled with PhantomJS while resources without deferred representations are crawled with Heritrix. We show that this approach is 5.2 times faster than using only PhantomJS and creates a frontier (set of URIs to be crawled) 1.8 times larger than using only Heritrix.
研究动机与目标
- 为解决依赖客户端JavaScript才能完整渲染的延迟呈现内容的归档挑战。
- 衡量传统爬虫(Heritrix、wget)与支持JavaScript执行的爬虫(PhantomJS)在爬取速度与爬取范围大小方面的性能权衡。
- 开发并验证一种分层爬取策略,以最小化性能开销,同时最大化对延迟呈现内容中嵌入资源的发现。
- 通过针对性地使用无头浏览器处理JavaScript依赖资源,提升归档质量,确保完整创建memento。
提出的方法
- 训练分类器以基于DOM特征预测网页资源是否包含延迟呈现内容,准确率达到79%。
- 两级策略将被分类为延迟的资源路由至PhantomJS进行完整客户端渲染与URI发现,而无需延迟的资源则使用Heritrix进行快速爬取。
- 使用10,000个种子URI的数据集评估爬取性能,测量爬取时间、爬取范围大小及嵌入资源发现情况。
- 使用PhantomJS执行JavaScript,发现传统爬虫遗漏的URI,特别是动态加载的嵌入资源。
- 对比wget、Heritrix和PhantomJS三种爬虫的爬取范围大小与爬取时间,量化其性能权衡。
- 通过真实数据验证模拟的两级爬取,结果表明其性能与完整性均优于单一爬虫策略。
实验结果
研究问题
- RQ1与Heritrix和wget相比,将PhantomJS引入爬取流程对爬取范围大小和爬取速度有何影响?
- RQ2分类器能否准确预测哪些资源包含延迟呈现内容,从而实现PhantomJS的选择性使用?
- RQ3仅对延迟呈现内容使用PhantomJS与对所有资源使用PhantomJS相比,性能影响如何?
- RQ4与仅使用Heritrix相比,采用分层策略结合PhantomJS与Heritrix后,爬取范围大小扩大了多少?
- RQ5使用PhantomJS时,重复URI(如包含会话特定参数的URI)在多大程度上会膨胀爬取范围?
主要发现
- PhantomJS发现了531,484个URI,是Heritrix的1.75倍,也是wget的4.11倍,归因于其执行JavaScript并发现动态加载内容的能力。
- Heritrix的爬取速度为每秒2.065个URI,比PhantomJS快12.15倍,比wget快2.4倍,确立了其作为最快爬虫的地位。
- 两级策略通过仅对延迟呈现内容使用PhantomJS,对非延迟内容使用Heritrix,相较于纯PhantomJS爬取实现了5.2倍的性能提升。
- 两级策略的爬取范围大小是仅使用Heritrix的1.8倍,表明URI发现能力显著增强。
- PhantomJS平均每个URI发现的嵌入资源比Heritrix多19.70个,凸显其在捕获动态内容方面的优势。
- PhantomJS发现的53%的URI在去除会话特定参数后为重复URI,表明爬取流程中需引入去重机制。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。