Patent ID: 8768926

Claim:
A method comprising: maintaining data that represents sets of Uniform Resource Locators (URLs), each set of said sets comprising a plurality of URLs, the plurality of URLs of each set of said sets having one or more of: similarity between the plurality of URLs, or similarity between web pages referred to by the plurality of URLs; for at least one set of said sets, selecting a plurality of URL components from query string portions of URLs in the at least one set; for each of the plurality of URL components, computing a discriminative value based on URLs from one or more other sets of said sets; wherein a particular discriminative value, computed for a particular URL component of the plurality of URL components, is based on one of: (I) an entropy value of the particular URL component, wherein the lower the entropy value, the more the particular URL component discriminates between (a) URLs that belong to the at least one set and (b) URLs that belong to the one or more other sets of said sets, or (II) an information gain value for the particular URL component, wherein the higher the information gain value, the more the particular URL component discriminates between (a) URLs that belong to the at least one set and (b) URLs that belong to the one or more other sets of said sets; selecting a subset of URL components, from the plurality of URL components, based on how much the subset of URL components discriminate between (a) URLs that belong to the at least one set and (b) URLs that belong to the one or more other sets of said sets, as indicated by the computed discriminative values; wherein the subset of URL components includes less URL components than the plurality of URL components; and generating a particular regular expression based on said subset; receiving a URL that refers to a web page; and determining whether said received URL matches said generated particular regular expression; wherein the method is performed by one or more computing devices.