# US 2019/0377765 A1 · Web page clustering method and device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0377765 A1
- Document ID: US20190377765A1
- Status: Published application
- Kind: A1
- Application number: 16/463,084
- Filed: 2017-11-24
- Published: 2019-12-12
- Earliest claimed: 2016-11-25
- Assignees: Nsfocus Information Technology Co., Ltd.; Nsfocus Technologies, Inc.
- Applicants: Nsfocus Information Technology Co., Ltd.; Nsfocus Technologies,Inc.
- Inventors: Yangyang GUO; Shaobin LIU; Fei LI; Hu LI; Lijun LIU
- Web page: https://patentgrep.com/patent/US20190377765A1

## CPC

- G06F 16/951: Indexing; Web crawling techniques
- G06F 16/9566: {URL specific, e.g. using aliases, detecting broken or misspelled links}
- G06F 16/986: {Document structures and storage, e.g. HTML extensions}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A web page clustering method and device, used for clustering web pages according to a web page framework, the method including: acquiring uniform resource locators (URL) of a plurality of web pages to be clustered; for the URL of each web page to be clustered, determining rewriting rules of the URL and classifying the URL according to the rewriting rules of the URL; determining a web page framework of the web page corresponding to each URL in each URL class, and determining whether each URL may be clustered according to the web page framework of the web page corresponding to each URL; and retaining the URL class if each URL may be clustered.

## Claims

### Claim 1

A method for clustering web pages, the method comprising:
acquiring Uniform Resource Locators (URLs) of a plurality of pages to be clustered;
determining a rewriting rule of a URL of each of the pages to be clustered, and classifying the URL according to the rewriting rule of the URL; and
determining page frameworks of the pages corresponding to respective URLs in a URL class, determining whether the respective URLs can be clustered, according to the page frameworks of the pages corresponding to the respective URLs, and if so, reserving the URL class.

### Claim 2 (depends on 1)

The method according to claim 1, wherein determining, for the URL of each page to be clustered, the rewriting rule of the URL, and classifying the URL according to the rewriting rule of the URL comprises:
determining URLs of the plurality of pages to be clustered as a set of URLs;
extracting a rewriting rule of two different URLs from any two different URLs in the set of URLs;
determining whether the rewriting rule of the two different URLs is a trustable rewriting rule, and if so, searching the set of URLs for URLs satisfying the trustable rewriting rule, and determining the URLs satisfying the trustable rewriting rule as a same URL class; and
deleting the URLs in the same URL class from the set of URLs, and returning to a step of extracting a rewriting rule of two different URLs from any two different URLs in the set of URLs.

### Claim 3 (depends on 2)

The method according to claim 2, wherein extracting the rewriting rule of two different URLs from the any two different URLs in the set of URLs comprises:
extracting a first URL and a second URL from the set of URLs, and determining a rewriting rule of the first URL and the second URL; and
the method further comprises:
if the rewriting rule of the first URL and the second URL is a rewriting rule which is not trustable, extracting a third URL and a fourth URL from the set of URLs, determining a rewriting rule of the third URL and the fourth URL, and returning to a step of determining the rewriting rule of the two different URLs is a trustable rewriting rule, wherein at least one of the third URL and the fourth URL is another URL in the set of URLs than the first URL and the second URL.

### Claim 4 (depends on 1)

The method according to claim 1, wherein determining the page frameworks of the pages corresponding to the respective URLs in the URL class, determining whether the respective URLs can be clustered, according to the page frameworks of the pages corresponding to the respective URLs comprises:
acquiring a Hyper Text Markup Language (HTML) file of a page corresponding to each URL in the respective URL classes; and acquiring fingerprint characteristic values of the HTML file according to labels in the HTML file;
determining whether differences between the fingerprint characteristic values of the respective URLs are below a preset threshold; and
if so, determining that the respective URLs can be clustered.

### Claim 5 (depends on 4)

The method according to claim 4, wherein acquiring the fingerprint characteristic values of the HTML file according to the labels in the HTML file comprises:
extracting attribute values of the respective labels from the HTML file, wherein different attributes correspond to respective attribute weights;
determining positional weights of the respective labels according to different positions of the respective labels in the HTML file; and
acquiring the fingerprint characteristic values of the HTML file according to the positional weights of the respective labels, and the attribute values and the attribute weights of the different attributes in the respective labels.

### Claim 6 (depends on 5)

The method according to claim 5, wherein acquiring the fingerprint characteristic values of the HTML file according to the positional weights of the respective labels, and the attribute values and the attribute weights of the different attributes in the respective labels comprises:
dividing the HTML file into three components comprising head, middle, and tail components, wherein a positional weight of a label at the head position is higher than a positional weight of a label at the middle position, and a positional weight of a label at the tail position is higher than a positional weight of the label at the middle position; and
determining attributes of a label as an identity attribute, a class attribute, and non-typical attributes comprising other attributes than the identity and class attributes, wherein an attribute weight of the identity attribute is higher than an attribute weight of a non-typical attribute, and an attribute weight of the class attribute is higher than an attribute weight of the non-typical attribute.

### Claim 7 (depends on 1)

An apparatus for clustering web pages, the apparatus comprising: a memory configured to store program instructions; and
a processor configured to execute the program instructions stored in the memory, and to perform the method according to claim 1 according to executed program instructions.

### Claim 8 (depends on 7)

The apparatus according to claim 7, wherein the processor is configured to execute the program instructions stored in the memory:
to determine the URLs of the plurality of pages to be clustered as a set of URLs;
to extract a rewriting rule of two different URLs from any two different URLs in the set of URLs;
to determine whether the rewriting rule of the two different URLs is a trustable rewriting rule, and if so, to search the set of URLs for URLs satisfying the trustable rewriting rule, and determining the URLs satisfying the trustable rewriting rule as a same URL class; and
to delete the URLs in the same URL class from the set of URLs, and to return to an operation of extracting a rewriting rule of two different URLs from any two different URLs in the set of URLs.

### Claim 9 (depends on 8)

The apparatus according to claim 8, wherein the processor is further configured to execute the program instructions stored in the memory:
to extract a first URL and a second URL from the set of URLs, and to determine a rewriting rule of the first URL and the second URL; and
the classifying module is further configured:
when the rewriting rule of the first URL and the second URL is a rewriting rule which is not trustable, to extract a third URL and a fourth URL from the set of URLs, to determine a rewriting rule of the third URL and the fourth URL, and to return to the operation of determining the rewriting rule of the two different URLs is a trustable rewriting rule, wherein at least one of the third URL and the fourth URL is another URL in the set of URLs than the first URL and the second URL.

### Claim 10 (depends on 7)

The apparatus according to claim 7, wherein the processor is configured to execute the program instructions stored in the memory:
to acquire a Hyper Text Markup Language (HTML) file of a page corresponding to each URL in the respective URL classes; and to acquire fingerprint characteristic values of the HTML file according to labels in the HTML file;
to determine whether differences between the fingerprint characteristic values of the respective URLs are below a preset threshold; and
if so, to determine that the respective URLs can be clustered.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the processor is configured to execute the program instructions stored in the memory:
to extract attribute values of the respective labels from the HTML file, wherein different attributes correspond to their respective attribute weights;
to determine positional weights of the respective labels according to different positions of the respective labels in the HTML file; and
to acquire the fingerprint characteristic values of the HTML file according to the positional weights of the respective labels, and the attribute values and the attribute weights of the different attributes in the respective labels.

### Claim 12 (depends on 11)

The apparatus according to claim 11, wherein the processor is configured to execute the program instructions stored in the memory:
to divide the HTML file into three components comprising head, middle, and tail components, wherein a positional weight of a label at the head position is higher than a positional weight of a label at the middle position, and a positional weight of a label at the tail position is higher than a positional weight of the label at the middle position; and
to determine attributes of a label as an identity attribute, a class attribute, and non-typical attributes comprising other attributes than the identity and class attributes, wherein an attribute weight of the identity attribute is higher than an attribute weight of a non-typical attribute, and an attribute weight of the class attribute is higher than an attribute weight of the non-typical attribute.

### Claim 13 (depends on 1)

A nonvolatile computer readable storage medium, storing computer executable instructions for causing a computer upon being executed on the computer to perform the method according to claim 1.

### Claim 14

(canceled)

### Claim 15 (depends on 1)

A computer program product, causing a computer upon being executed on the computer to perform the method according to claim 1.
