A Web crawler is a typical part of a search engine that procures information subsequently served by the search service to its users. As the Web is becoming increasingly more dynamic, in addition to discovering new web pages, a crawler needs to keep revisiting those already in the search engine's index, in order to keep the index fresh by picking up the pages' changed content. This refresh process is resource intensive.
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
The technology described herein provides a more efficient crawl schedule for content trackers, such as search engines, to use when refreshing a content index. As the Web becomes more dynamic, services that rely on Web data face the increasingly challenging problem of keeping up with content changes. Whether it be a continuous-query system, a virtual assistant, or an Internet search engine, such a service tracks many remote sources of content—web pages or data streams. Users expect trackers to surface the latest content that appears at the sources. For all content sources a tracker monitors, the tracker decides when to re-request (crawl) the content source in order to refresh the content in view of changes made since the last time the content was crawled. A policy that makes these crawl decisions well solves a freshness crawl scheduling problem.
The technology described herein is a holistic approach to freshness crawl scheduling that is computationally efficient and generates optimal freshness results using a type of reinforcement learning. In the ideal world, the search engine would revisit the content source as soon as the content changes. As a practical matter, this is often not technologically possible: most content sources, e.g., web pages, don't notify search engines when their content changes Even if they did, network bandwidth constraints would prevent the search engine's crawler from updating content upon every change notification. The goal is to find the optimal times to revisit these content sources while taking the overall available bandwidth into consideration, along with an estimated change rate for the content sources, the importance of the content sources, and the change notifications received.
At a high level, the technology described herein builds an optimal refresh schedule by minimizing a cost function that characterizes penalties a search engine incurs for staleness, i.e., the lack of freshness of its index, constrained by an available refresh bandwidth. The cost function takes into account a search-engine-defined importance score for a content item and a change rate of the content item as input in order to optimize the schedule. The optimization problem is solved when a refresh schedule is found that minimizes the cost while using the available bandwidth and no more. The optimal refresh schedule, sometimes described herein as a refresh policy, allocates an amount of available bandwidth to each content item in a set to be refreshed. In sum, the bandwidth allocated to each item within the set is less than or equal to the available bandwidth.
The optimal schedule created using the technology described herein will maximize overall item freshness. Both the change rate of a content item and an importance score for the content item are used to allocate bandwidth. It is also a feature of the technology described herein that all of the content items in a set to be refreshed will be allocated at least some bandwidth during a time horizon covered by the schedule.
The technology described herein can be optimized to build a refresh schedule for content items with different associated amounts of change data. The technology can build an optimized schedule to refresh content items with incomplete change data (when the search engine gets to observe an item from time to time and thereby detect changes, but doesn't know how many times the item changed in between observations), content items with complete change data (when the search engine gets notified every time when the content item changes), or a mixture of content items with and without complete change data. An optimized schedule is built by selecting differently parameterized cost functions for the different scenarios. In particular, the cost function used for sites with complete change data may depend on a probability of crawling in response to a change notification for the content site. In other words, the system may not crawl every content item every time a change notification is received. Instead, a probability is used to determine whether to visit the site, with different probability values translating to different values of the cost function. Conceptually, this can be imagined as flipping a coin to determine whether to visit the site when a change notification is received. Instead of the 50% probability associated with flipping a coin, the probability calculated for the item would be used to make the crawl or no crawl decision.
The present disclosure is described in detail below with reference to the attached drawing figures, wherein:
The subject matter of the present disclosure is described with specificity herein to meet statutory requirements. However, the description itself is not intended to limit the scope of this patent. Rather, the inventors have contemplated that the claimed subject matter might also be embodied in other ways, for other cost functions, to include different steps or combinations of steps similar to the ones described in this document, in conjunction with other present or future technologies. Moreover, although the terms “step” and/or “block” may be used herein to connote different elements of methods employed, the terms should not be interpreted as implying any particular order among or between various steps herein disclosed unless and except when the order of individual steps is explicitly described. Each method described herein may comprise a computing process that may be performed using any combination of hardware, firmware, and/or software. For instance, various functions may be carried out by a processor executing instructions stored in memory. The methods may also be embodied as computer-usable instructions stored on computer storage media. The methods may be provided by a standalone application, a service or hosted service (standalone or in combination with another hosted service), or a plug-in to another product, to name a few.
The technology described herein provides a more efficient crawl schedule for content trackers, such as search engines, to use when refreshing a content index. As the Web becomes more dynamic, services that rely on Web data face the increasingly challenging problem of keeping up with content changes. Whether it be a continuous-query system, a virtual assistant, or an Internet search engine, such a service tracks many remote sources of content—web pages or data streams. Users expect trackers to surface the latest content that appears at the sources. For all content sources a tracker monitors, the tracker decides when to re-request (crawl) the content source in order to refresh the content in view of changes made since the last time the content was crawled. A policy that makes these crawl decisions well solves a freshness crawl scheduling problem.
Freshness crawl scheduling has several challenging aspects. For most content sources, the tracker finds out whether the content has changed only when it crawls the source. To guess when the changes happen, and hence should be downloaded, the tracker needs a predictive model whose parameters are initially unknown. Thus, the tracker needs to learn these models and optimize a freshness-related objective when scheduling crawls. For some web pages, however, sitemap polling and other means can provide trustworthy near-instantaneous signals that the page has changed in a meaningful way, though not what the change is exactly. But even with these remote change observations and known change model parameters, freshness crawl scheduling remains highly nontrivial because the tracker cannot react to every individual predicted or actual change. The tracker's infrastructure imposes a bandwidth constraint on the average daily number of crawls, usually limiting it to a fraction of the change event volume.
The technology described herein is a holistic approach to freshness crawl scheduling that is computationally efficient and generates optimal freshness results using a type of reinforcement learning. In the ideal world, the search engine would revisit the content source as soon as the content changes. As a practical matter, this is often not technologically possible: most content sources, e.g., web pages, don't notify search engines when their content changes Even if they did, network bandwidth constraints would prevent the search engine's crawler from updating content upon every change notification. The goal is to find the optimal times to revisit these content sources while taking the overall available bandwidth into consideration, along with an estimated change rate for the content sources, the importance of the content sources, and the change notifications received.
At a high level, the technology described herein builds an optimal refresh schedule by minimizing a cost function that characterizes penalties a search engine incurs for staleness, i.e., the lack of freshness of its index, constrained by an available refresh bandwidth. The cost function takes into account a search-engine-defined importance score for a content item and a change rate of the content item as input in order to optimize the schedule. The optimization problem is solved when a refresh schedule is found that minimizes the cost while using the available bandwidth and no more. The optimal refresh schedule, sometimes described herein as a refresh policy, allocates an amount of available bandwidth to each content item in a set to be refreshed. In sum, the bandwidth allocated to each item within the set is less than or equal to the available bandwidth.
The optimal schedule created using the technology described herein will maximize overall item freshness. It is also a feature of the technology described herein that all of the content items in a set to be refreshed will be allocated at least some bandwidth during a time horizon covered by the schedule. As will be described in more detail, it may be that an individual content item is not crawled during the time horizon, however, the plan allows the possibility that the content item could be crawled depending on events, such as receiving a change notification for the content item, that occur during the time horizon.
A key goal of the technology described herein is to generate an optimal refresh schedule. As used herein, an optimal refresh schedule maximizes the overall freshness of content items within a set to be refreshed. Further, the importance of an item is considered when assigning bandwidth. The importance score is used to define the importance of items. An item is stale, as used herein, when it has changed and not been crawled by the refresh process. Otherwise, the item is fresh if it has not changed since the last time the item was downloaded to a cache.
Optimization can be better understood in contrast to a non-optimal approach, such as evenly distributing crawl bandwidth across all items in a set. Taking just change frequency into account, an even distribution of crawl resources across items in the content set is not optimal because sites that change frequently would be crawled as frequently as sites that do not change frequently. Given an environment where bandwidth is limited, this means that frequently changing sites will likely be stale for a comparatively long time, while infrequently changing sites will be crawled multiple times before a change occurs. Thus, evenly distributing crawl opportunities will not maximize overall freshness. Other simple heuristics, such as distributing crawl opportunities in proportion to just change rate or importance score will also produce suboptimal results.
The cost function used with the technology described herein assigns the higher per-time-unit penalty to a content item the more times the content item has changed since it was last refreshed/crawled by the tracker. Thus, it penalizes the tracker for every change that happened at a source since the previous crawl, not just the first one. This may be described as a monotonically increasing penalty. In one aspect, the cost increase is not linear. Instead, a cost function is selected such that the cost increases at a decreasing rate as the number of unsynchronized changes at a content item increases. This reflects the intuition that while all undetected changes at a content item matter, the first one matters most, as it marks the transition from freshness to staleness. Thus, in one aspect, the cost function related to change rate is both monotonically increasing and discrete-concave, providing diminishing penalty increases over time.
The importance score is also used to optimize the schedule. The importance score assigned to a content item can take many forms and can be built taking various characteristics as input. For example, a spam score can be an input to the importance score. Web traffic to a content item can be an input to the importance score with sites having high-traffic being more important. A click-through rate on search results can be another factor with a high click-through rate resulting in a higher importance score. Similarly, a higher query frequency can result in a higher importance score. In one aspect, various content items are already assigned an importance score (even if not called an importance score) by a search engine or other service and this score may be used by aspects of the technology either as the importance score or as a component of a new score. In one method, the different factors are given different weights to produce the importance score. In an aspect, the importance score is greater than zero, as using zero within the cost function would result in zero cost for not visiting the content item. Zero cost would likely result in zero scheduled crawls for the item, which is inconsistent with a goal of the technology described herein. If a content item should not be refreshed, it would better to exclude it from the content set being evaluated.
A goal of the technology described herein is to build a refresh policy that does not starve any content item in the set to be refreshed. In other words, every item in the set should have the possibility of being crawled during a planning time covered by the refresh schedule. As described in more detail, the cost function takes change rate and an importance score as inputs. Aspects of the technology ensure that the refresh solution does not result in any content item having no probability of being crawled during the planning horizon.
In some situations, it may be desirable to exclude content items from being refreshed. For example, known spam pages may have zero importance and may be undesirable to refresh. Similarly, sites that are known not to change may also be excluded. This can be handled by not including the sites in a set of content items to be refreshed. As used herein, the set of content items need not include all known content items in a cache or index.
The technology described herein can be optimized to build a refresh schedule for content items with different associated amounts of change data. The technology can build an optimized schedule to refresh content items with incomplete change data (when the search engine gets to observe an item from time to time and thereby detect changes, but doesn't know how many times the item changed in between observations), content items with complete change data (when the search engine gets notified every time when the content item changes), or a mixture of content items with and without complete change data. An optimized schedule is built by selecting differently parameterized cost functions for the different scenarios. In particular, the cost function used for sites with complete change data may depend on a probability of crawling in response to a change notification for the content site. In other words, the system may not crawl every content item every time a change notification is received. Instead, a probability is used to determine whether to visit the site, with different probability values translating to different values of the cost function. Conceptually, this can be imagined as flipping a coin to determine whether to visit the site when a change notification is received. Instead of the 50% probability associated with flipping a coin, the probability calculated for the item would be used to make the crawl or no crawl decision. For example, a random number generator could be used to generate a number between 1 and 100 every time a change notification is received for a content item. A 0.6 crawl probability could be implemented by crawling the content item when the randomly generated number is less than or equal to 60.
A content item has complete change data when nearly instantaneous change notifications are received whenever the content item changes. Change data may be obtained by leveraging telemetry signals from users visiting different content. For example, a web browser may provide webpage information to the tracker's a change analysis component. The web browser may be associated with the tracker. Web sites that are frequently visited may have complete change data provided by the browsers of the many visitors. Web sites themselves may maintain sitemap files that reliably log every change on the web site's pages and can be polled very frequently by the tracker in order to find out about these changes. A threshold may be used to determine what level of change information is needed to classify an item as having complete change information. The threshold may take both the analysis frequency and historical change frequency into account. Any content item that does not satisfy the complete-change threshold is classified as incomplete.
All of these topics will be explained in more detail subsequently, especially with reference to
As the content items 108 offered by the content item hosts 106 change over time, the items 104 in the item cache 102 have to be refreshed in order to avoid producing stale results referencing old versions of the content items 108. Therefore, a cache refreshing resource set 120 may be utilized to refresh the items 104 in the item cache 102. For example, the cache refreshing resource set 120 might comprise a first refreshing resource 122 and a second refreshing resource 124, each of which might comprise a process designed to refresh items 104 in the item cache 102. As one possible but inefficient example, the cache refreshing resources 122 might be configured to select an item 104 at random from the item cache 102, retrieve the corresponding content item 108 from the corresponding content item host 106, and compare the item 104 with the content item 108. If any differences are detected between the item 104 and the content item 108, the refreshing process may write the content item 108 over the stale version of the content item 108 stored in the item cache 102, thereby refreshing the item 104. This may be described as a crawl event. The time at which the crawl event occurred may be memorialized along with whether a change was detected in the content. This data can be used to determine a change rate for the content, as described subsequently.
In these and other scenarios, stale results, while not necessarily fatal to the operation of the item cache 102, are to be avoided by allocating cache refreshing resource set 120 in a manner that reduces the probability of serving an out-of-date item. For example, the cache refreshing resource set 120 may be allocated to refresh the items 104 in the item cache 102 based on various relevant factors. In one aspect, the first cache refreshing resource 122 may be responsible for refreshing a set of content items with limited real-time change data. The second cache refreshing resource 124 may be responsible for refreshing a set of content items with complete real-time change data. Each of the first cache refreshing resource 122 and the second cache refreshing resource 124 may have a designated amount of crawling bandwidth.
A cache refreshing policy may be selected in pursuit of many priorities, such as allocating resources to refresh the most frequently requested items 104, maximizing the percentage of fresh items 104 in the item cache 102, or most efficiently allocating the cache refreshing resource set 120, such that the requests are only issued for content items 108 that are most likely to have been updated since the last refresh of the corresponding item 104. Depending on the selected priorities and the comparative significance thereof, the strategy for refreshing the item cache 102 may be configured to allocate the cache refreshing resource set 120 that most efficiently promote these priorities, i.e., in order to achieve the most useful allocation of the cache refreshing resource set 120. Therefore, the refresh strategies utilized in these techniques may involve using the predicted query frequency and update frequency of respective items 104 in order to devise a refreshing policy that achieves a high refresh utility, according to the selected set of priorities and the comparative significance thereof.
Turning now to
Among other components not shown, operating environment 200 includes a number of user devices, such as user devices 202a and 202b through 202n; a number of content sources, such as content sources 204a and 204b through 204n; search server 206; cache 205; user 203a, and network 220. It should be understood that environment 200 shown in
It should be understood that any number of user devices, servers, users, and content sources may be employed within operating environment 200 within the scope of the present disclosure. Each may comprise a single device or multiple devices cooperating in a distributed environment. For instance, search server 206 may be provided via multiple devices arranged in a distributed environment that collectively provide the functionality described herein. Additionally, other components not shown may also be included within the distributed environment.
User devices 202a and 202b through 202n may comprise any type of computing device capable of use by a user 203a. For example, in one embodiment, user devices 202a through 202n may be the type of computing device described in relation to
User devices 202a and 202b through 202n can be client devices on the client-side of operating environment 200, while search server 206 can be on the server-side of operating environment 200. Each user device 202a and 202b through 202n can be associated with one or more users, such as user 203a. Some user devices can be associated with multiple users, such as a family PC, game console, meeting room PC, electronic white board, and such. Similarly, a single user can be associated with multiple devices, including shared devices. A user sign-in identification can be used to determine the user operating a user device at a point in time and to associate actions taken with a user record. The user devices can submit queries and provide webpage summaries that can be used to detect changes upon navigating to a content item.
Content sources 204a and 204b through 204n may comprise content sources and/or content systems, which are configured to make content available to any of the various constituents of operating environment 200, or refresh scheduling environment 300 described in connection to
Turning now to
The components of the refresh scheduling environment 300 includes content sources 204a and 204b through 204n, user device 320, and the refresh system 330. The user device includes a browser 322 that includes a function to send change information to the change notification component 332. The refresh system 330 includes the change notification component 332, the change frequency determiner 334, the importance-score computation component 336, the incomplete change data scheduler 338, the complete change data scheduler 340, the hybrid scheduler 342, the crawler 344, and the content cache 346. Moreover, these components of
The change notification component 332 identifies content changes by analyzing signals received from client devices or other sources. Some webpage changes can be detected apart from crawling. For example, the browser can catch a fingerprint of the content and provide this to the search engine. In this way, the search engine receives a stream of fingerprints. The fingerprints can be a hash of page content. If the page has not changed then the fingerprint will remain the same. On the other hand, if the page changed then the fingerprint will change. The search engine will then know the pages changed.
A browser (or other client side) function may provide a web page summary to a content change component that analyzes the summary to determine if a meaningful change occurred. The browser function detects the HTML sections of a web page, calculates a summary, such as a hash code for each section, and sends the information about the web page to the change component. The information submitted may include: the section hash codes, the URL of the web page, and the date and time of the access. If applicable, data from a “last modified” HTML tag may be provided. The summary may include information from the following parts of the web page: title, header, body and footer. The hash is then compared against previous hashes of the page/page sections. Changes in the hash reflect a change in the page.
In one aspect, a web host or other content source may provide a content update notification. It is often in the interest of content providers for search engines to have up to date content. When provided, this notification is considered a change confirmation. When a change is detected, a change notification may be communicated to the change notification component 332. A record of changes may be saved and used to calculate a change frequency for the item.
The change frequency determiner 334 calculates an estimated change rate for an individual content item. The estimated change rate may be calculated using a reinforcement learning methodology. The reinforcement learning methodology updates an estimated change rate using change observations obtained by crawling sources according to a refresh schedule obtained from the current change rate estimates. Although staleness minimization is efficient under the models described herein, in reality, actual change rates are usually unavailable and vary with time, requiring frequent relearning. An improved change rate estimation can result in an improved refresh schedule.
Suppose for a given source w the tracker has observed a sequence of binary change indicator variables z1, z2, . . . , zU, where t0, . . . , tU are times when the observations arrived, and, for 1≤j≤U, zj=1 if and only if the source changed compared to time tj−1 at least once. Consider how changes can be detected when complete change information is available and when incomplete change information is available.
When incomplete change information is available for w, then the tracker crawls the content item to make a determination whether the individual content item changed between crawl events. After each crawl at time t1, . . . , tU, the tracker checks for changes compared to the content item's previous crawl, and records zj=1 if the content is different or zj=0 is the content is the same. A change determination may be made by looking at the current content and/or structure of a content item in view of a previous version of the content item. For example, the text could be compared by isolating text in the content item, counting total characters in the text, and counting distinct characters in the text. When a change in the total characters or distinct characters occurs between different visits to the content item, then the content item is determined to have changed. There may be more than one change since the last crawl but the tracker cannot determine this. Denoting aj=tj−tj−1, j≥1 the estimated change rate Δ solves to:
Equation 1 is a maximum-likelihood estimator of the change rate for the given content item.
The second case occurs when complete change observations are available. As mentioned, change observations may be derived from browsers visiting the content item and sending back content information. In this case, for all j, zj=1, a change observation arrives only when there is a change and indicates exactly one change. The estimated change rate in this case can simply be the number of observed changes averaged over the observation time period from t0 to tU.
Once a change rate is estimated, they can be used to generate a new refresh schedule. The schedule can be followed and additional change observations gathered by following it can be added to the data set. Updated change rates can then be estimated.
The importance-score computation component 336 supplies importance scores to other components of the system. The importance score assigned to a content item can take many forms and can be built taking various characteristics as input. For example, a spam score can be an input to the importance score calculation. Web traffic to a content item can be an input to the importance score with sites having high traffic being more important. A click-through rate on search results can be another factor with a high click-through rate resulting in a higher importance score. Similarly, a higher frequency of queries to which a given content item is relevant can result in a higher importance score. In one aspect, various content items are already assigned an importance score (even if not called an importance score) by a search engine or other tracker, and this score may be used by aspects of the technology either as the importance score or as a component of a new score. In one method, the different factors are given different weights to produce the importance score. In an aspect, the importance score is greater than zero, as using zero within the cost function would result in zero cost for not visiting the content item. Zero cost would likely result in zero scheduled crawls for the item, which is inconsistent with a goal of the technology described herein. If a content item should not be refreshed, it would better to exclude it from the content set being evaluated.
The incomplete change data scheduler 338, builds a refresh schedule across content items having incomplete change data. The incomplete change data scheduler 338 may follow method 400, described subsequently, to build the refresh schedule. Once built, the refresh schedule may be output to the crawler 344 for execution. In other words, the crawler 344 will use the refresh schedule built by the incomplete change data scheduler 338 to refresh content over a time horizon.
A content item is said to have complete change data if nearly instantaneous change notifications are received whenever the content item changes; otherwise it is said to have incomplete change data. Change data may be obtained by leveraging signals from users visiting different content. For example, a browser may provide webpage information, such as a page hash, to a change analysis component. Web sites that are frequently visited may generate substantially complete change data provided via the browsers of the many visitors. A threshold may be used to determine what level of change information is needed to classify an item as having complete change information. The threshold may take both the analysis frequency and historical change frequency into account. Any content that does not satisfy the complete-change threshold is classified as incomplete.
The complete change data scheduler 340, builds a refresh schedule across content items having complete change data. The complete change data scheduler 340 may follow method 500, described subsequently, to build the refresh schedule. Once built, the refresh schedule may be output to the crawler 344 for execution. In other words, the crawler 344 will use the refresh schedule built by the complete change data scheduler 340 to refresh content over a planning horizon. A criterion for determining whether a content item has complete change data has been described previously.
The hybrid scheduler 342, builds a refresh schedule across content items having both complete change data and incomplete change data. The hybrid scheduler 342 may follow method 600, described subsequently, to build the refresh schedule. Once built, the refresh schedule may be output to the crawler 344 for execution. In other words, the crawler 344 will use the refresh schedule built by the hybrid scheduler 342 to refresh content over a time horizon. A criterion for determining whether a content item has complete or incomplete change data has been described previously.
The crawler 344 comprises one or more web crawlers responsible for keeping a set of content items fresh. The crawler 344 is typically associated with a tracker, such as a search engine. The crawler 344 receives refresh schedules and follows them. The crawler 344 may collect other data describing its refresh efforts. For example, the crawler 344 may make a record of every content item visited, the time of visit, and whether the content item had changed or not at the time of visit. This information may be used to provide an updated change rate estimate.
The content cache 346 stores copies of content items retrieved by the crawler 344. The copies may not be exact. For example, meta data or other information from the content may be optionally omitted from the cache. The cache 346 may help a search engine quickly retrieve content items or information derived from content items in the case of search results.
Turning now to
At step 410, a bandwidth constraint is received that limits a total amount of crawls the crawler is allowed to make across the content set in a fixed unit of time (e.g., an hour or a day). The bandwidth constraint can have two components. The first component is a crawler constraint. The second component is a host constraint, sometimes referred to as a politeness constraint. The crawler constraint may be thought of as a bottleneck created by the combination of hardware and software involved in the refresh process. The specific bottleneck could be limited to a network bandwidth, a processor bandwidth, a memory bandwidth, software constraints, or some other system limitation that allows for so many crawl events per unit of time. The crawler constraint could be a virtual constraint. For example, even though more network resources are available in theory, in reality a subset of these available resources are designated for use by a particular crawler. For example, different crawlers associated with a tracker may have responsibility to refresh different sets of content. These crawlers may be allocated a particular amount of resources to perform these functions by a system administrator, or the like. The goal of the refresh schedule is to maximize the freshness of content with whatever bandwidth constraint is in place. In some aspects, only the crawler constraint is considered when building the optimized refresh schedule.
The second constraint is a content-host imposed constraint. Some hosts may limit the number of times a crawler can access a content host in a fixed unit of time (e.g., an hour or a day). This constraint may apply to a collection of content items having a common content host. In other words, the limitation may not be per item, but across a collection of items. A refresh schedule that does not consider the host-imposed constraint may not utilize all available bandwidth as some crawling efforts would be directed at ultimately inaccessible content items. Further, content items could go stale for long periods if available crawl events were used up early in the planning horizon. The overall freshness can be maximized by distributing these limited crawl events more evenly.
At step 420, a set of importance scores is received that comprises an individual importance score for each content item in the content set. The importance score assigned to a content item can take many forms and can be built taking various characteristics as input. For example, a spam score can be an input to the importance score calculation. Web traffic to a content item can be an input to the importance score with sites having high traffic being more important. A click-through rate on search results can be another factor with a high click-through rate resulting in a higher importance score. Similarly, a higher frequency of queries to which a given content item is relevant can result in a higher importance score. In one aspect, various content items are already assigned an importance score (even if not called an importance score) by a search engine or other tracker, and this score may be used by aspects of the technology either as the importance score or as a component of a new score. In one method, the different factors are given different weights to produce the importance score. In an aspect, the importance score is greater than zero, as using zero within the cost function would result in zero cost for not visiting the content item. Zero cost would likely result in zero scheduled crawls for the item, which is inconsistent with a goal of the technology described herein. If a content item should not be refreshed, it would better to exclude it from the content set being evaluated.
At step 430, a set of change rates is received that comprises an individual change rate for each content item in the content set. The change rates are estimated change rates based on previous observations of the content item. Different estimators may be used, as described previously with reference to
At step 440, a crawl rate schedule for the content set that comprises an individual crawl rate for each individual content item in the content set is calculated using a cost function. The set of change rates and the set of importance scores are inputs to the cost function. The crawl rate schedule is a solution to the cost function that minimizes a sum of costs across all content items and is constrained by the bandwidth constraint, such that a sum of crawl rates for all content items in the content set is equal to the bandwidth constraint.
The cost function may be expressed as:
Where Jπ is the cost penalty of refresh policy π;
where W− is the content set comprising content items with incomplete change information and w is an individual content item in the content set;
ρw=a crawl rate for an individual content item;
Δw= an estimated change rate for an individual content item; and
μw= an importance score for an individual content item.
In one aspect, the Lagrange multiplier method is used to solve the cost function in equation 2. In this implementation, the optimal refresh plan may be expressed as the following system of equations.
where R is the bandwidth constraint; and
λ is the Lagrange multiplier.
The Lagrange multiplier can be calculated by the bisection search method or some other mechanism. In one aspect, a test Lagrange multiplier is selected and the equation system solved. If the sum of crawl rates for all items in the set exceeds the bandwidth constraint then the process is repeated with a higher test Lagrange multiplier. Otherwise, if the sum of crawl rates for all items in the set falls short of the bandwidth constraint then the process is repeated with a lower Lagrange multiplier. In this way, the optimal Lagrange multiplier is iteratively determined.
Further, assuming that neither the change rate nor the importance score is zero, some cost will be calculated for not visiting a content item using the equation system shown.
At step 450, the crawl rate schedule is output for use by the crawler. The crawl rate schedule can take the form of a crawl rate vector where a crawl rate is specified for each content item in the content set. A crawler can then be used to execute the crawl rate schedule and retrieve fresh content. The fresh content could be added to a cache. Data gathered during the executed crawl rate schedule can be collected and used to improve the change rate of different items. A new crawl rate schedule can then be generated, further optimizing the crawl schedule.
Turning now to
At step 510, a bandwidth constraint is received that limits a total amount of crawls the crawler is allowed to make across the content set per unit of time. The bandwidth constraint can have two components. The first component is a crawler constraint. The second component is a host constraint, sometimes referred to as a politeness constraint. These bandwidth constraints have been described previously, for example, with reference to
At step 520, a set of importance scores is received that comprises an individual importance score for each content item in the content set. The importance score assigned to a content item can take many forms and can be built taking various characteristics as input. Importance scores have been described previously, for example, with reference to
At step 530, a set of change rates is received that comprises an individual change rate for each content item in the content set. The change rates are estimated change rates based on previous observations of the content item. Different estimators may be used, as described previously with reference to
At step 540, a crawl probability vector is determined that comprises an individual crawl probability for each individual content item in the content set using the bandwidth constraint, the set of importance scores, and the set of change rates. The individual crawl probability is used to determine whether to crawl an associated individual content item upon receiving a change notification for the associated individual content item. In other words, the system may not crawl every content item every time a change notification is received. Instead, a crawl probability is used to determine whether to visit the site, with different probability values translating to different values of the cost function. Conceptually, this can be imagined as flipping a coin to determine whether to visit the site when a change notification is received. Instead of the 50% probability associated with flipping a coin, the crawl probability calculated for the item would be used to make the crawl or no crawl decision. For example, a random number generator could be used to generate a number between 1 and 100 every time a change notification is received for a content item. A 0.6 crawl probability could be implemented by crawling the content item when the randomly generated number is less than or equal to 60.
In one aspect, the cost function used to determine the crawl probability is
where W° is the content set comprising content items with complete change information, w is an individual content item in the content set, pw is item w's refresh (crawl) probability upon receiving a change notification, and uw is its importance score.
Under any refresh policy, the crawl rate of any content item is related to its change rate. Every time a change observation is received, a crawl will occur with crawl probability pw. Thus, the crawl rate for a content item is the product of the item's crawl probability and change rate. The probability is expressed as a number between 0 and 1. Also, a bandwidth greater than the overall change rate of all items in the content set will not provide a benefit since this would result in more crawls than changes. Given these inputs, the following system can be used to calculate the optimal fresh schedule:
Solving Equation 5 requires non-linear optimization under inequality constraints, which, in general, could take time exponential to the constraint number. If inequality constraints are ignored the solution can be expressed as:
In this example, {circumflex over (p)}*w represents the crawl probability for a content item. Equation 6 indicates that the relaxation's solution never has a probability less than 1, but it may indeed violate the constraints by having a probability greater than 1. The main difficulty of inequality-constrained optimization is exactly in determining the subset of inequality constraints that are active under the optimal solution, i.e., in this case, finding all content items w for which the optimal probability is 1. These content items can be found iteratively. Whenever an individual content item is calculated via equation 7 to have a greater probability than 1, then it is assigned a probability of 1 and set aside. The available bandwidth is then reduced by the estimated change rate of the item and the process is repeated for the remaining items. In this way, all content items are assigned a value greater than zero, but less than 1.
At step 550, a crawl probability vector comprising the individual crawl probability for each individual content item is output for use by the crawler. The probability vector can take the form of a crawl probability vector where a crawl probability is specified for each content item in the content set. A crawler can then be used to execute the crawl probability vector by crawling content items with corresponding probabilities when change notifications arrive and thereby retrieve fresh content. The fresh content could be added to a cache. Data gathered during the executed crawl rate schedule can be collected and used to improve the change rate of different items. A new crawl probability vector can then be generated, further optimizing the crawl schedule.
Turning now to
At step 610, a bandwidth constraint is received that limits a total amount of crawls the crawler is allowed to make across the content set per unit of time. The content set comprises a first subset of content items with incomplete change information and a second subset of content items with complete change information. A content item has complete change data when nearly instantaneous change notifications are received when the content item changes, otherwise it has incomplete change data. Change data may be obtained by leveraging signals from users visiting different content. For example, a browser may provide webpage information, such as a page hash, to a change analysis component. Web sites that are frequently visited may have substantially complete change data provided by the browsers of the many visitors. A threshold may be used to determine what level of change information is needed to classify an item as having complete change information. The threshold may take both the analysis frequency and historical change frequency into account. Any content that does not satisfy the complete-change threshold is classified as incomplete.
The bandwidth constraint can have two components. The first component is a crawler constraint. The second component is a host constraint, sometimes referred to as a politeness constraint. These bandwidth constraints have been described previously, for example, with reference to
At step 620, a set of importance scores is received that comprises an individual importance score for each content item in the content set. The importance score assigned to a content item can take many forms and can be built taking various characteristics as input. Importance scores have been described previously, for example, with reference to
At step 630, a set of change rates is received that comprises an individual change rate for each content item in the content set. The change rates are estimated change rates based on previous observations of the content item. Different estimators may be used, but the general assumption is that change rates in the future will be similar to previously observed change rates. The change observations can be derived from crawl events and change telemetry. Change rates have been described previously, for example, with reference to
At step 640, an optimized split of available crawl bandwidth between the first subset and the second subset is determined. The available crawl bandwidth can be defined by the bandwidth constraint of step 610. The end result of the optimized split can be a first bandwidth allocation to the first subset and a second bandwidth allocation to the second subset. The optimized split can be determined by minimizing a combined cost function that comprises a first cost function for the first subset and a second cost function for the second subset. The first and second cost functions are different from each other. This requires combining the first cost function and second cost function into a single cost function that can be solved together, as shown:
This can be restated as follows:
The optimization objective (Equation 9) is strictly concave as a sum of concave functions over the region described by the constraints, and therefore has a unique maximizer. To find the maximizer efficiently, we observe that solving Equation 9 amounts to deciding how to split the global bandwidth constraint R into an allotment R° for content with complete change observations and R−=R−R° for the rest. The optimal split can be efficiently found numerically by iteratively guessing a split, evaluating the split by summing the costs calculated by the first cost function and the second cost function, and generating a next guess split that improves on the value of the previous one.
The iterative approach can involve repeating the following steps until an optimized solution is found. The first step is to receive or generate a test split of bandwidth comprising a first test bandwidth for the first content set and a second test bandwidth for the second content set. Each iteration will have a different test split. Next, a first optimized schedule for the first subset of content items is calculated using the method described in
At step 650, the first bandwidth allocation for use calculating a crawl rate schedule for the first subset and the second bandwidth allocation for use calculating the crawl probability vector for the second subset are output.
Once the optimal split is determined, the method 400 can be used to calculate the optimal crawl rate schedule for content items with incomplete change data and the method 500 can be used to determine the probability vector for content items with complete change data. The crawl rate schedule and the crawl probability vector are output for use by the crawler. The crawl rate schedule can take the form of a crawl rate vector where a crawl rate is specified for each content item in the content set. A crawler can then be used to execute the crawl rate schedule and retrieve fresh content. The fresh content could be added to a cache. Data gathered during the executed crawl rate schedule can be collected and used to improve the change rate of different items. A new crawl rate schedule can then be generated, further optimizing the crawl schedule.
The probability vector can take the form of a crawl probability vector where a crawl probability is specified for each content item in the content set. A crawler can then be used to execute the crawl probability vector and retrieve fresh content. The fresh content could be added to a cache. Data gathered during the executed crawl rate schedule can be collected and used to improve the change rate of different items. A new crawl probability vector can then be generated, further optimizing the crawl schedule.
Exemplary Computing Environment
As described with reference to
Computing device 700 typically includes a variety of computer-readable media. Computer-readable media can be any available media that can be accessed by computing device 700 and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer-readable media may comprise computer-storage media and communication media.
Computer-storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVDs) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by computing device 700. Computer storage media does not comprise signals per se.
Communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media, such as a wired network or direct-wired connection, and wireless media, such as acoustic, RF, infrared, and other wireless media. Combinations of any of the above should also be included within the scope of computer-readable media.
Memory 712 includes computer storage media in the form of volatile and/or nonvolatile memory. The memory may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical-disc drives, etc. Computing device 700 includes one or more processors 714 that read data from various entities such as memory 712 or I/O components 720. Presentation component(s) 716 presents data indications to a user or other device. Exemplary presentation components include a display device, speaker, printing component, vibrating component, and the like.
The I/O ports 718 allow computing device 700 to be logically coupled to other devices, including I/O components 720, some of which may be built in Illustrative components include a microphone, joystick, game pad, satellite dish, scanner, printer, wireless device, etc.
The I/O components 720 may provide a natural user interface (NUI) that processes air gestures, voice, or other physiological inputs generated by a user. In some instances, inputs may be transmitted to an appropriate network element for further processing. An NUI may implement any combination of speech recognition, touch and stylus recognition, facial recognition, biometric recognition, gesture recognition both on screen and adjacent to the screen, air gestures, head and eye tracking, and touch recognition associated with displays on the computing device 700. The computing device 700 may be equipped with depth cameras, such as stereoscopic camera systems, infrared camera systems, RGB camera systems, and combinations of these, for gesture detection and recognition. Additionally, the computing device 700 may be equipped with accelerometers or gyroscopes that enable detection of motion. The output of the accelerometers or gyroscopes may be provided to the display of the computing device 700 to render immersive augmented reality or virtual reality.
Some aspects of computing device 700 may include one or more radio(s) 724 (or similar wireless communication components). The radio 724 transmits and receives radio or wireless communications. The computing device 700 may be a wireless terminal adapted to receive communications and media over various wireless networks. Computing device 700 may communicate via wireless protocols, such as code division multiple access (“CDMA”), global system for mobiles (“GSM”), or time division multiple access (“TDMA”), as well as others, to communicate with other devices. The radio communications may be a short-range connection, a long-range connection, or a combination of both a short-range and a long-range wireless telecommunications connection. When we refer to “short” and “long” types of connections, we do not mean to refer to the spatial relation between two devices. Instead, we are generally referring to short range and long range as different categories, or types, of connections (i.e., a primary connection and a secondary connection). A short-range connection may include, by way of example and not limitation, a Wi-Fi® connection to a device (e.g., mobile hotspot) that provides access to a wireless communications network, such as a WLAN connection using the 802.11 protocol; a Bluetooth connection to another computing device is a second example of a short-range connection, or a near-field communication connection. A long-range connection may include a connection using, by way of example and not limitation, one or more of CDMA, GPRS, GSM, TDMA, and 802.16 protocols.
Turning now to
At step 810, a crawl probability vector is determined that comprises an individual crawl probability for each individual content item in the content set. The individual crawl probability is used to determine whether to crawl an associated individual content item upon receiving a change notification for the associated individual content item using the bandwidth constraint, the set of importance scores, and the set of change rates. In other words, the system may not crawl every content item every time a change notification is received. Instead, a crawl probability is used to determine whether to visit the site, with different crawl probability values translating to different values of the cost function. Conceptually, this can be imagined as flipping a coin to determine whether to visit the site when a change notification is received. Instead of the 50% probability associated with flipping a coin, the crawl probability calculated for the item would be used to make the crawl or no crawl decision. For example, a random number generator could be used to generate a number between 1 and 100 every time a change notification is received for a content item. A 0.6 crawl probability could be implemented by crawling the content item when the randomly generated number is less than or equal to 60.
Different inputs may be used to determine the crawl probability. For example, a bandwidth constraint may be received that limits a total amount of crawls the crawler is allowed to make across the content set per unit of time. The bandwidth constraint can have two components. The first component is a crawler constraint. The second component is a host constraint, sometimes referred to as a politeness constraint. These bandwidth constraints have been described previously, for example, with reference to
A set of importance scores may be received that comprises an individual importance score for each content item in the content set. The importance score assigned to a content item can take many forms and can be built taking various characteristics as input. Importance scores have been described previously, for example, with reference to
A set of change rates is received that comprises an individual change rate for each content item in the content set. The change rates are estimated change rates based on previous observations of the content item. Different estimators may be used, as described previously with reference to
In one aspect, the cost function used to determine the crawl probability is
where W° is the content set comprising content items with complete change information, w is an individual content item in the content set, pw is item w's refresh (crawl) probability upon receiving a change notification, and muw is its importance score.
Under any refresh policy, the crawl rate of any content item is related to its change rate. Every time a change observation is received, a crawl will occur with crawl probability pw. Thus, the crawl rate for a content item is the product of the item's crawl probability and change rate. The probability is expressed as a number between 0 and 1. Also, a bandwidth greater than the overall change rate of all items in the content set will not provide a benefit since this would result in more crawls than changes. Given these inputs, the following system can be used to calculate the optimal fresh schedule:
Solving Equation 5 requires non-linear optimization under inequality constraints, which, in general, could take time exponential to the constraint number. If inequality constraints are ignored the solution can be expressed as:
In this example, {circumflex over (p)}*w represents the crawl probability for a content item. Equation 6 indicates that the relaxation's solution never has a probability less than 1, but it may indeed violate the constraints by having a probability greater than 1. The main difficulty of inequality-constrained optimization is exactly in determining the subset of inequality constraints that are active under the optimal solution, i.e., in this case, finding all content items w for which the optimal probability is 1. These content items can be found iteratively. Whenever an individual content item is calculated via equation 7 to have a greater probability than 1, then it is assigned a probability of 1 and set aside. The available bandwidth is then reduced by the estimated change rate of the item and the process is repeated for the remaining items. In this way, all content items are assigned a value greater than zero, but less than 1.
At step 820, a crawl probability vector comprising the individual crawl probability for each individual content item is output for use by the crawler. The probability vector can take the form of a crawl probability vector where a crawl probability is specified for each content item in the content set. A crawler can then be used to execute the crawl probability vector by crawling content items with corresponding probabilities when change notifications arrive and thereby retrieve fresh content. The fresh content could be added to a cache. Data gathered during the executed crawl rate schedule can be collected and used to improve the change rate of different items. A new crawl probability vector can then be generated, further optimizing the crawl schedule.
Many different arrangements of the various components depicted, as well as components not shown, are possible without departing from the scope of the claims below. Embodiments of the present disclosure have been described with the intent to be illustrative rather than restrictive. Alternative embodiments will become apparent to readers of this disclosure after and because of reading it. Alternative means of implementing the aforementioned can be completed without departing from the scope of the claims below. Certain features and sub-combinations are of utility, may be employed without reference to other features and sub-combinations, and are contemplated within the scope of the claims.
Number | Name | Date | Kind |
---|---|---|---|
7310632 | Meek et al. | Dec 2007 | B2 |
7725452 | Randall | May 2010 | B1 |
7769742 | Brawer et al. | Aug 2010 | B1 |
7774782 | Popescu | Aug 2010 | B1 |
9213780 | Azar et al. | Dec 2015 | B2 |
20040044962 | Green et al. | Mar 2004 | A1 |
20110320428 | Erera | Dec 2011 | A1 |
20130212100 | Hajaj | Aug 2013 | A1 |
20170116653 | Smith | Apr 2017 | A1 |
Entry |
---|
“International Search Report and Written Opinion Issued in PCT Application No. PCT/US2020/023056”, dated May 29, 2020, 14 Pages. |
Number | Date | Country | |
---|---|---|---|
20200372084 A1 | Nov 2020 | US |