The disclosed embodiments relate generally to search engine crawlers for use in computer network systems, and in particular to a scheduler for a search engine crawler.
A search engine is a tool that identifies documents, typically stored on hosts distributed over a network, that satisfy search queries specified by users. Web search engines work by storing information about a large number of web pages (hereinafter also referred to as “pages” or “documents”), which they retrieve from the World Wide Web (WWW). These documents are retrieved by a web crawler. The web crawler follows links found in crawled documents so as to discover additional documents to download. The contents of the downloaded documents are indexed, mapping the terms in the documents to identifiers of the documents. The resulting index is configured to enable a search to identify documents matching the terms in search queries. Some search engines also store all or part of the document itself, in addition to the index entries. When a user submits a search query having one or more terms, the search engine searches the index for documents that satisfy the query, and provides a listing of matching documents, typically including for each listed document the URL, the title of the document, and in some search engines a portion of document's text deemed relevant to the query.
While web pages can be manually selected for crawling, this becomes impracticable as the number of web pages grows. Moreover, to keep within the capacity limits of the crawler, automated selection mechanisms are needed to determine not only which web pages to crawl, but which web pages to avoid crawling. For instance, as of the end of 2003, the WWW is believed to include well in excess of 10 billion distinct documents or web pages, while a search engine may have a crawling capacity that is less than half as many documents.
A search engine crawler includes a set of schedulers that are associated with one or more segments of document identifiers (e.g., URLs) corresponding to documents on a network (e.g., WWW). Each scheduler handles the scheduling of document identifiers (for crawling) for a subset of the known document identifiers. Using a starting set of document identifiers, such as the document identifiers crawled (or scheduled for crawling) during the most recent completed crawl, the scheduler removes from the starting set those document identifiers that have been unreachable in one or more previous crawls. Other filtering mechanisms may also be used to filter out some of the document identifiers in the starting set.
Priority scores are computed for each remaining document identifier based on predetermined criteria (e.g., a page importance score of the document). In some embodiments, the predetermined criteria include a boost function that boosts the priority scores of pages matching predefined boost criteria. The document identifiers are sorted in accordance with their priority scores, and then the document identifiers having the N top priority scores are selected for scheduling, where N is a predefined or previously selected value. N is typically less than the crawling capacity of a corresponding web crawler, because a portion of the web crawler's capacity is reserved for crawling documents discovered during the course of a crawl.
In some embodiments, the set of N document identifiers is further reduced by applying a set of predefined capacity limits to the N document identifiers. For instance, the set of predefined capacity limits may include limits on the number of documents in any one domain, limits on the number of documents having a common host limits on documents having particular file types, and so on.
In some embodiments, the resulting list of document identifiers is written to a scheduled output file for use in a next crawl cycle. The document identifiers rejected on the basis of low priority scores, capacity limits and the like are optionally written to an unscheduled output file, which may be used, for instance, as a source of document identifiers for a low priority background crawl.
In some embodiments, a scheduler system for a search engine crawler includes a memory for storing a set of document identifiers corresponding to documents on a network and associated status data collected during one or more previous crawls by the search engine crawler. A plurality of schedulers are configured to select a subset of the document identifiers for crawling. The schedulers are configured to compute priority scores for at least some of the subset of document identifiers and to schedule for crawling at least one of the subset of document identifiers based on the priority scores and status data.
In some embodiments, a method of scheduling a search engine crawler includes selecting a first subset of document identifiers from a set of document identifiers corresponding to documents on a network. Priority scores are computed for the subset of document identifiers. The subset of document identifiers are then scheduled for crawling based on the priority scores and status data collected during one or more previous crawls by the search engine crawler.
In some embodiments, a computer-readable medium includes instructions, which when executed by a processor in a scheduler system for a search engine crawler, cause the processor to perform various operations. These operations include selecting a first subset of document identifiers from a set of document identifiers corresponding to documents on a network. Priority scores for the subset of document identifiers are computed. The subset of document identifiers are scheduled for crawling based on the priority scores and status data collected during one or more previous crawls by the search engine crawler.
The URL scheduler 202 determines which URLs will be crawled in each epoch, and stores that information in the data structure 100. In some embodiments, the URL scheduler 202 allocates URLs to segments of the data structure, where the segments correspond to the epochs. In these embodiments, the URL scheduler 202 also determines which URLs within each segment are to be crawled, as will be described in more detail below.
The controller 201 selects a segment 112 for crawling. The selected segment 112 is referred to hereinafter as the “active segment.” Typically, at the start of each epoch, the controller 201 selects a different segment 112 as the active segment so that, over the course of several epochs, all the segments 112a, . . . , n are selected for crawling in a round-robin manner.
A query-independent score (also called a document score) is computed for each URL by URL page rankers 222. The page rankers 222 compute a page importance score for a given URL. In some embodiments, the page importance score is computed by considering not only the number of URLs that reference a given URL but also the page importance score of such referencing URLs. Page importance score data is provided to URL managers 204, which pass a page importance score for each URL to URL server 206, robots 208, and content processing servers 210. One example of a page importance score is PageRank, which is used the page importance metric used in the Google search engine. An explanation of the computation of PageRank is found in U.S. Pat. No. 6,285,999, which is incorporated by reference herein in its entirety.
From time to time, the URL server 206 requests URLs from the URL managers 204. In response, the URL managers 204 provide the URL server 206 with URLs obtained from data structure 100. The URL server 206 then distributes URLs from the URL managers 204 to crawlers 208 (hereinafter also called “robots” or “bots”) to be crawled. A robot 208 is a server that retrieves documents at the URLs provided by the URL server 206. The robots 208 use various known protocols to download pages associated with URLs (e.g., HTTP, HTTPS, Gopher, FTP, etc.).
Pages obtained from URLs that have been crawled by robots 208 are delivered to content processing servers 210, which perform a number of tasks. In some embodiments, these tasks include indexing the content of the pages, generating records of the outbound links in the pages, detecting duplicate pages, and creating various log records to record information about the crawled pages. In one embodiment, these log records are stored in log files, including link logs 214, history logs 218, and status logs 212. The link logs 214 include a link record for each document obtained from a URL by a robot 208 and passed to the content processing servers 210. Each link log 214 record identifies all the links (e.g., URLs, also called outbound links) that are found in the document associated with the record and the text that surrounds the link. The information in the link logs 214 is used by the content processing servers 210 to create link maps 220. The records in the link map 220 are similar to records in the link logs 214 with the exception that text is stripped and the records are keyed by a “fingerprint” of the normalized value of the source URL. In some embodiments, a URL fingerprint is a 64-bit integer determined by applying a hash function or other one way function to a URL. The bit-length of the URL fingerprint may be longer or shorter than 64 bits in other embodiments. The records in each link map 220 may optionally be sorted or keyed by a fingerprint. The link maps 220 are used by the page rankers 222 to adjust the page importance score of URLs within data structure 100. Preferably, such page importance scores persist between epochs.
Referring to the lower half of
In some embodiments, the reuse table 309 includes a record for each URL and each URL record includes at least three fields. The first field includes the URL fingerprint (FP) and the second field includes a Reuse Type flag indicating whether the URL associated with the URL FP is to be reused, or downloaded, or conditionally reused. If the Reuse Type flag is set to REUSE, then the document associated with the URL FP will be retrieved from a data repository. If the Reuse Type flag is set to DOWNLOAD, then the document will be downloaded in the next crawl cycle. If the Reuse Type Flag is set to REUSE IF NOT MODIFIED SINCE, the third field specifies a date or a date and time or a timestamp value. When the Reuse Type Flag is set to this conditional value, and the document associated with the URL was “modified since” the time and date specified in the reuse table 309, then the document will be downloaded by a robot in the next crawl cycle. Otherwise, the document associated with URL will be retrieved form a data depository. The reuse/download scheduling process is described more fully with respect to
Some of the fields of the history record 432 are unused, or undefined, in the event that the crawl attempt is unsuccessful, or if the crawl attempt is a reuse of the document from a local document repository.
The process begins by retrieving 400 from a URL manager 304 a list of URLs downloaded in the last crawl and selecting 402 a URL to process. If 404 the page importance score for the URL is greater than a first predetermined threshold (e.g., a threshold associated with the top x % of page importance scores), then its Reuse Type flag is set 416 to DOWNLOAD and stored 414 in the reuse table 309. The URL page importance score used in steps 404 and 406 can be obtained from the page rankers 222, or can be retrieved from the URL history log 218, or it can be obtained by obtaining the historical page importance score for the URL for a predefined number of prior crawls and then performing a predefined filtering function on those values to obtain the URL page importance score.
If the page importance score of the URL is not above the first predefined threshold, its page importance score is compared against a second predetermined threshold. If 406 the page importance score is greater than the second predetermined threshold (e.g., in the top y % of page ranks), and the last crawl of the document was from the web (i.e., was not a reuse of the document from a local document repository) 407, then the date and time of the current version of the URL is determined 418, the Reuse Type flag is set 420 to REUSE UNLESS MODIFIED SINCE and the determined date and time are also stored in Reuse table entry for the URL. When this URL is scheduled for crawling, the robot assigned this URL will establish a connection to the host to determine the date and time of the last update to the document at the URL. If the update date and time are after the date and time specified in the reuse table, the robot downloads the document from the host server. Otherwise, the robot reuses the document from a document repository.
On the other hand, if 406 the page importance score is greater than the second predetermined threshold (e.g., in the top y % of page importance scores), and the last crawl of the document was not from the web (i.e., was a reuse of the document from a local document repository) 407, then the Reuse Type Flag is set 416 to Download. After setting the Reuse Type flag, the URL record is stored 414 in the reuse table 309 and another URL is selected 402 from the URL list for processing.
If 404, 406, the page importance score for the URL does not exceed the predetermined thresholds, and if 408 the content of the document associated with the URL has changed at least one over a predefined period (e.g., the 45 day period ending at the time of the last scheduled crawl of the URL), then the Reuse Type flag is set 422 to DOWNLOAD. In some embodiments, the history logs 218 include a content checksum 440 for the content of a document each time it is downloaded by a robot. By comparing the content checksums for two or more of the downloads of the URL during a predefined period of time, the reuse server can determine if the document at the URL has changed during that predefined period. After setting the Reuse Type flag, the URL record is stored 414 in the reuse table 309 and another URL is selected 402 from the URL list for processing.
If 408 the content of the URL has remained unchanged for the entire predefined period, and if 410 the URL was reused in all of the last Y crawls, then the Reuse Type flag is set 412 to DOWNLOAD. Otherwise, the Reuse Type flag is set 424 to REUSE. For example, if Y=3, then a URL is reused at most three time in a row. On the other hand, once a document qualifies for reuse, it will be reused for Y successive crawls, after which the reuse server will enabling the document to be downloaded. After setting the Reuse Type flag, the URL record is stored 414 in the reuse table 309 and another URL is selected 402 from the URL list for processing.
In other embodiments, various aspects of the reuse scheduling process may differ from those shown in
The reuse scheduler 307 includes one or more processing units (CPU's) 472, one or more network or other communications interfaces 480, memory 482, and one or more communication buses 484 for interconnecting these components. The system 307 may optionally include a user interface 474, for instance a display 476 and a keyboard 478. Memory 912 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic disk storage devices. Memory 482 may include mass storage that is remotely located from the central processing unit(s) 472.
The memory 482 stores an operating system 486 (e.g., Linux or Unix), a network communication module 480, a system initialization module 490 and a reuse scheduler module 492. The operating system 486 generally includes procedures for handling various basic system services and for performing hardware dependent tasks. The network communication module 488 is used for connecting the system 307 to other servers or computers in the web crawler system 300 (
The operation of the reuse scheduler module 492 was described above with respect to
A page importance score is assigned to a URL FP at the time the document download operation is performed or attempted. The page importance score can change over time, as the set of pages having links to the page corresponding to URL FP changes, and as the page importance scores of these referring pages change. The prior crawl status can include multiple fields, including without limitation an error field and an unreachable field. The error field records information associated with a download error. An example of an error is “HTTP Error 4xx,” which may indicate that the web page does not exist, or that access is not authorized, or some other error. In some embodiments, the error field indicates the number of consecutive times an attempt to download the URL resulted in an error. The unreachable field records information associated with a URL being unreachable (e.g., because the host server is busy). For example, the unreachable field can include the number of consecutive times the URL was unreachable in previous crawls. The segment ID identifies the particular crawl segment associated with the URL FP at the time that the document download operation was performed or attempted.
In some embodiments, information about document download errors and unreachable URLs is stored in one or more separate files (hereinafter called URL Error Files). For example, for each complete segment crawl, a first file may be created for each URL scheduler that indicates all the URLs scheduled by that URL scheduler which resulted in downloading error, and a second file may be created for each URL scheduler that indicates all the URLs scheduled by that URL scheduler that were determined to be unreachable. The information in these files is then used by the URL scheduler while determining which URLs to schedule for downloading in a next crawl cycle.
The URL scheduler 700 includes one or more processing units (CPU's) 702, one or more network or other communications interfaces 710, memory 712, and one or more communication buses 714 for interconnecting these components. The system 700 may optionally include a user interface 704, for instance a display 706 and a keyboard 708. Memory 712 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic disk storage devices. Memory 712 may include mass storage that is remotely located from the central processing unit(s) 702. Memory 712, or one or more of the storage devices (e.g., one or more non-volatile storage devices) in memory 712, includes a computer readable storage medium.
The memory 712 stores an operating system 716 (e.g., Linux or Unix), a network communication module 718, a system initialization module 720 and a URL scheduler module 722. The operating system 716 generally includes procedures for handling various basic system services and for performing hardware dependent tasks. The network communication module 718 is used for connecting the system 700 to other servers or computers in the web crawler system 300 (
The memory 712 also includes a URL scheduler module 722, which is used to implement various aspects of the disclosed embodiments, as described below with respect to
After deleting URLs from the URL list 726, the page importance scores for the remaining URLs are used to compute 808 priority scores using a priority score function 730, which in some embodiments is given by
Priority Scorei=page_importancei*boost factor, (1)
where the subscript i denotes an ith URL and the boost factor is a scalar (e.g., a number larger or smaller than 1.0) that is used to demote or promote the priority score of the URL. For example, the boost factor can be used to promote URLs of homepages of major companies (e.g., Fortune 100) or popular news sites (e.g., CNN). Note that more or fewer priority scores can be computed using a variety of priority functions, as needed, depending upon the architecture of the scheduling system 300.
After computing 808 the priority scores for the URLs, the URLs are sorted 810 by priority score and the top N sorted URLs are selected 812 as candidates to be crawled. In some embodiments, the number N may be a predefined number, related to the URL handling capacity of the web crawling system during each epoch. For example, N may be equal to a predefined percentage (e.g., 65% or 75% or 80%) of the URL handling capacity of the web crawling system during an epoch.
In some embodiments, one or more scheduler limits 732 (e.g., capacity limits) can be applied 814 to the selected URLs. Some examples of scheduler limits 732 include values that represent the maximum number of URLs that can be scheduled on a host-by-host, domain and/or group basis. For example, there may be hardware or software limits on the number of URLs that a particular host machine can process in a crawl cycle or epoch. There may also be limits on the number of URLs having a particular domain name or that are associated with a particular file type (e.g., CGI files). Note that any number and types of scheduler limits 732 can be applied to the selected URLs, as needed, depending upon the architecture of the scheduler system 300.
After applying 814 the scheduler limits 732 (if any), the selected URLs are written 816 to a schedule output file 728, as shown in
Referring again to
The foregoing description, for purpose of explanation, has been described with reference to specific embodiments. However, the illustrative discussions above are not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations are possible in view of the above teachings. The embodiments were chosen and described in order to best explain the principles of the invention and its practical applications, to thereby enable others skilled in the art to best utilize the invention and various embodiments with various modifications as are suited to the particular use contemplated.
This application is a continuation-in-part of U.S. patent application Ser. No. 10/614,113, filed Jul. 3, 2003, now U.S. Pat. No. 7,308,643, which application is incorporated by reference herein in its entirety. This application is related to U.S. patent application Ser. No. 10/882,955, “Document Reuse In a Search Engine Crawler”, filed Jun. 30, 2004, which application is incorporated by reference herein in its entirety.
Number | Name | Date | Kind |
---|---|---|---|
5634062 | Shimizu et al. | May 1997 | A |
5801702 | Dolan et al. | Sep 1998 | A |
5832494 | Egger et al. | Nov 1998 | A |
5898836 | Freivald et al. | Apr 1999 | A |
6003060 | Aznar et al. | Dec 1999 | A |
6012087 | Freivald et al. | Jan 2000 | A |
6049804 | Burgess et al. | Apr 2000 | A |
6189019 | Blumer et al. | Feb 2001 | B1 |
6219818 | Freivald et al. | Apr 2001 | B1 |
6243091 | Berstis | Jun 2001 | B1 |
6263350 | Wollrath et al. | Jul 2001 | B1 |
6263364 | Najork et al. | Jul 2001 | B1 |
6269370 | Kirsch | Jul 2001 | B1 |
6285999 | Page | Sep 2001 | B1 |
6321265 | Najork et al. | Nov 2001 | B1 |
6336123 | Inoue et al. | Jan 2002 | B2 |
6351755 | Najork et al. | Feb 2002 | B1 |
6377984 | Najork et al. | Apr 2002 | B1 |
6404446 | Bates et al. | Jun 2002 | B1 |
6418433 | Chakrabarti et al. | Jul 2002 | B1 |
6418453 | Kraft et al. | Jul 2002 | B1 |
6424966 | Meyerzon et al. | Jul 2002 | B1 |
6547829 | Meyerzon et al. | Apr 2003 | B1 |
6594662 | Sieffert et al. | Jul 2003 | B1 |
6631369 | Meyerzon et al. | Oct 2003 | B1 |
6638314 | Meyerzon et al. | Oct 2003 | B1 |
6701350 | Mitchell | Mar 2004 | B1 |
6751612 | Schuetze et al. | Jun 2004 | B1 |
6763362 | McKeeth | Jul 2004 | B2 |
6772203 | Feiertag et al. | Aug 2004 | B1 |
6950874 | Chang et al. | Sep 2005 | B2 |
6952730 | Najork et al. | Oct 2005 | B1 |
7043473 | Rassool et al. | May 2006 | B1 |
7047491 | Schubert et al. | May 2006 | B2 |
7080073 | Jiang et al. | Jul 2006 | B1 |
7089233 | Osias | Aug 2006 | B2 |
7139747 | Najork | Nov 2006 | B1 |
7148991 | Suzuki et al. | Dec 2006 | B2 |
7171619 | Bianco | Jan 2007 | B1 |
7200592 | Goodwin et al. | Apr 2007 | B2 |
7231606 | Miller et al. | Jun 2007 | B2 |
7260543 | Saulpaugh et al. | Aug 2007 | B1 |
7299219 | Green et al. | Nov 2007 | B2 |
7308643 | Zhu et al. | Dec 2007 | B1 |
7310632 | Meek et al. | Dec 2007 | B2 |
7343412 | Zimowski | Mar 2008 | B1 |
7346839 | Acharya et al. | Mar 2008 | B2 |
7447777 | Ahuja et al. | Nov 2008 | B1 |
7483891 | Liu et al. | Jan 2009 | B2 |
7725452 | Randall | May 2010 | B1 |
7769742 | Brawer et al. | Aug 2010 | B1 |
20020010682 | Johnson | Jan 2002 | A1 |
20020023158 | Polizzi et al. | Feb 2002 | A1 |
20020052928 | Stern et al. | May 2002 | A1 |
20020065827 | Christie et al. | May 2002 | A1 |
20020073188 | Rawson, III | Jun 2002 | A1 |
20020087515 | Swannack et al. | Jul 2002 | A1 |
20020099602 | Moskowitz et al. | Jul 2002 | A1 |
20020129062 | Luparello | Sep 2002 | A1 |
20030061260 | Rajkumar | Mar 2003 | A1 |
20030131005 | Berry | Jul 2003 | A1 |
20030158839 | Faybishenko et al. | Aug 2003 | A1 |
20040044962 | Green et al. | Mar 2004 | A1 |
20040064442 | Popovitch | Apr 2004 | A1 |
20040128285 | Green et al. | Jul 2004 | A1 |
20040225642 | Squillante et al. | Nov 2004 | A1 |
20040225644 | Squillante et al. | Nov 2004 | A1 |
20050071766 | Brill et al. | Mar 2005 | A1 |
20050086206 | Balasubramanian et al. | Apr 2005 | A1 |
20050154746 | Liu et al. | Jul 2005 | A1 |
20050192936 | Meek et al. | Sep 2005 | A1 |
20060036605 | Powell et al. | Feb 2006 | A1 |
20060069663 | Adar et al. | Mar 2006 | A1 |
20060277175 | Jiang et al. | Dec 2006 | A1 |
Number | Date | Country |
---|---|---|
WO 0150320 | Jul 2001 | WO |
WO 0186507 | Nov 2001 | WO |
Number | Date | Country | |
---|---|---|---|
Parent | 10614113 | Jul 2003 | US |
Child | 10882956 | US |