Website classification method, device, equipment and computer-readable storage medium

By generating a URL graph network and using seed URLs and access period information for iterative calculations, the problem of low URL classification accuracy in the existing technology is solved, and more efficient and accurate URL classification is achieved.

CN113569983BActive Publication Date: 2024-10-15WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110934260.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-13
Publication Date
2024-10-15
Estimated Expiration
2041-08-13

AI Technical Summary

Technical Problem

Existing website classification methods are based on website information prediction, which have low accuracy, heavy workload and lots of noise, making it difficult to classify effectively.

Method used

By generating a URL graph network, the seed URL and access period information are used to perform iterative calculations to determine the category of the URL to be classified and improve the classification accuracy.

Benefits of technology

It improves the accuracy of website classification, reduces workload and noise, and enhances the reliability of classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113569983B_ABST
    Figure CN113569983B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and computer-readable storage medium for classifying web addresses. The method comprises: generating a web address graph network according to a web address access list, and counting seed web addresses adjacent to the web addresses to be classified according to the web address graph network and a set of seed web addresses; iteratively calculating the web address graph network according to the time period information when the web addresses to be classified and the seed web addresses in the web address access list are accessed; and determining the category of the web addresses to be classified in the web address graph network according to the result of the iterative calculation of the web address graph network. The present invention generates a web address graph network according to a web address access list, counts seed web addresses adjacent to the web addresses to be classified in the web address graph network, and iteratively calculates the web address graph network according to the time period information when the web addresses in the web address access list are accessed, thereby determining the category of the web addresses to be classified, thereby improving the accuracy of web address classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial technology, and in particular to methods, devices, equipment and computer-readable storage media for classifying web addresses. Background Art

[0002] Existing URL classification is often predicted based on URL information, such as the English name of the URL or the content of the web page. The English name of the URL often contains very limited information, making it difficult to classify the content of the URL. Judging the URL category from the content of the web page often requires a large amount of crawler information, which is not only cumbersome and requires a lot of storage resources, but also often contains a lot of noise, resulting in low accuracy of URL classification. Therefore, how to improve the accuracy of URL classification is an urgent problem to be solved. Summary of the invention

[0003] The main purpose of the present invention is to propose a website classification method, device, equipment and computer-readable storage medium, aiming to solve the problem of how to improve the accuracy of website classification.

[0004] To achieve the above object, the present invention provides a method for classifying a website, which comprises the following steps:

[0005] Generate a URL graph network according to the URL access list, and count the seed URLs adjacent to the URL to be classified according to the URL graph network and the seed URL set;

[0006] According to the time period information of the to-be-classified website and the seed website in the website access list, iteratively calculating the website graph network;

[0007] According to the result of the iterative calculation of the website map network, the category of the website to be classified in the website map network is determined.

[0008] Preferably, before the step of generating a URL map network according to the URL access list and counting the seed URLs adjacent to the URL to be classified according to the URL map network and the seed URL set, the URL classification method further comprises:

[0009] According to a preset website category set, a seed website address corresponding to each website category in the preset website category set is determined to obtain the seed website address set.

[0010] Preferably, the steps of generating a URL map network according to the URL access list, and counting the seed URLs adjacent to the URL to be classified according to the URL map network and the seed URL set include:

[0011] Generate the URL graph network according to the URL name and access time period of each URL in the URL access list;

[0012] According to the connection relationship of the URL graph network, all URLs adjacent to the URL to be classified are counted, and all URLs are compared with all seed URLs in the seed URL set to determine the seed URLs adjacent to the URL to be classified.

[0013] Preferably, the step of iteratively calculating the URL graph network according to the time period information of each of the URLs to be classified and the seed URLs in the URL access list being accessed comprises:

[0014] According to the access time period of each website in the website access list, determine the number of first time periods during which the website to be classified is accessed, the number of second time periods during which the seed website is accessed, and the number of third time periods during which the website to be classified and the seed website are simultaneously accessed;

[0015] The URL graph network is iteratively calculated according to the first time period number, the second time period number and the third time period number.

[0016] Preferably, the step of iteratively calculating the URL graph network according to the first time period number, the second time period number and the third time period number comprises:

[0017] Calculate the weight set of the adjacent edges of the seed URL and the URL to be classified in the URL graph network according to the first time period number, the second time period number and the third time period number, and determine the pre-category of the URL to be classified according to the weight set;

[0018] Calculating the inconsistency rate between the pre-categorization of the to-be-classified website in the website graph network and the pre-categorization of the to-be-classified website obtained in the last iteration, and comparing the inconsistency rate with a preset threshold to obtain a comparison result;

[0019] If the comparison result is that the inconsistency rate is not less than the preset threshold, the steps are executed: according to the visited time period of each URL in the URL access list, the number of first time periods in which the URL to be classified is visited, the number of second time periods in which the seed URL is visited, and the number of third time periods in which the URL to be classified and the seed URL are visited simultaneously are determined.

[0020] Preferably, according to the result of iterative calculation of the website map network, the step of determining the category of the website to be classified in the website map network comprises:

[0021] If the comparison result is that the inconsistency rate is less than the preset threshold, the category of the to-be-classified website is determined according to the weight set of the adjacent edges between the seed website and the to-be-classified website in the website graph network.

[0022] Preferably, after the step of determining the category of the to-be-classified website in the website graph network according to the result of the iterative calculation of the website graph network, the website classification method further comprises:

[0023] The seed URLs corresponding to each URL category in the preset URL category set are updated to obtain an updated seed URL set, and the following steps are performed: a URL map network is generated according to the URL access list, and seed URLs adjacent to the URL to be classified are counted according to the URL map network and the seed URL set.

[0024] In addition, to achieve the above purpose, the present invention also provides a website classification device, the website classification device comprising:

[0025] A statistics module, used for generating a URL map network according to the URL access list, and counting the seed URLs adjacent to the URL to be classified according to the URL map network and the seed URL set;

[0026] An iteration module, in which a user performs iterative calculation on the URL graph network according to the time period information of the URL to be classified and the seed URL being accessed in the URL access list;

[0027] The determination module is used to determine the category of the to-be-classified website in the website graph network according to the result of the iterative calculation of the website graph network.

[0028] Preferably, the statistical module is also used for:

[0029] According to a preset website category set, a seed website address corresponding to each website category in the preset website category set is determined to obtain the seed website address set.

[0030] Preferably, the statistical module is also used for:

[0031] Generate the URL graph network according to the URL name and access time period of each URL in the URL access list;

[0032] According to the connection relationship of the URL graph network, all URLs adjacent to the URL to be classified are counted, and all URLs are compared with all seed URLs in the seed URL set to determine the seed URLs adjacent to the URL to be classified.

[0033] Preferably, the iteration module is further used for:

[0034] According to the access time period of each website in the website access list, determine the number of first time periods during which the website to be classified is accessed, the number of second time periods during which the seed website is accessed, and the number of third time periods during which the website to be classified and the seed website are simultaneously accessed;

[0035] The URL graph network is iteratively calculated according to the first time period number, the second time period number and the third time period number.

[0036] Preferably, the iteration module is further used for:

[0037] Calculate the weight set of the adjacent edges of the seed URL and the URL to be classified in the URL graph network according to the first time period number, the second time period number and the third time period number, and determine the pre-category of the URL to be classified according to the weight set;

[0038] Calculating the inconsistency rate between the pre-categorization of the to-be-classified website in the website graph network and the pre-categorization of the to-be-classified website obtained in the last iteration, and comparing the inconsistency rate with a preset threshold to obtain a comparison result;

[0039] If the comparison result is that the inconsistency rate is not less than the preset threshold, the step of determining the first time period number of the to-be-classified website being visited, the second time period number of the seed website being visited, and the third time period number of the to-be-classified website and the seed website being visited simultaneously according to the visited time period of each website in the website access list.

[0040] Preferably, the determining module is further used for:

[0041] If the comparison result is that the inconsistency rate is less than the preset threshold, the category of the to-be-classified website is determined according to the weight set of the adjacent edges between the seed website and the to-be-classified website in the website graph network.

[0042] Preferably, the determining module is further used for:

[0043] The seed URLs corresponding to each URL category in the preset URL category set are updated to obtain an updated seed URL set, and the following steps are performed: a URL map network is generated according to the URL access list, and seed URLs adjacent to the URL to be classified are counted according to the URL map network and the seed URL set.

[0044] In addition, to achieve the above-mentioned purpose, the present invention also provides a URL classification device, which includes: a memory, a processor, and a URL classification program stored in the memory and executable on the processor, and when the URL classification program is executed by the processor, the steps of the URL classification method described above are implemented.

[0045] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a website classification program is stored, and when the website classification program is executed by a processor, the steps of the website classification method described above are implemented.

[0046] The web address classification method proposed in the present invention generates a web address graph network according to a web address access list, and counts seed web addresses adjacent to the web addresses to be classified according to the web address graph network and a set of seed web addresses; iteratively calculates the web address graph network according to the time period information when the web addresses to be classified and the seed web addresses in the web address access list are accessed; and determines the category of the web addresses to be classified in the web address graph network according to the result of the iterative calculation of the web address graph network; the present invention generates a web address graph network according to the web address access list, counts seed web addresses adjacent to the web addresses to be classified in the web address graph network, and iteratively calculates the web address graph network according to the time period information when the web addresses in the web address access list are accessed, thereby determining the category of the web addresses to be classified, thereby improving the accuracy of web address classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;

[0048] Figure 2 This is a flow chart of a first embodiment of the website classification method of the present invention;

[0049] The realization of the purpose, functional features and advantages of the present invention will be further explained with reference to the accompanying drawings in combination with the embodiments. DETAILED DESCRIPTION

[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0051] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

[0052] The device in the embodiment of the present invention may be a PC or a server device.

[0053] like Figure 1As shown, the device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0054] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0055] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a website classification program.

[0056] Among them, the operating system is a program for managing and controlling portable URL classification devices and software resources, supporting the operation of network communication modules, user interface modules, URL classification programs and other programs or software; the network communication module is used to manage and control the network interface 1004; the user interface module is used to manage and control the user interface 1003.

[0057] exist Figure 1 In the URL classification device shown, the URL classification device calls the URL classification program stored in the memory 1005 through the processor 1001, and executes the operations in each embodiment of the following URL classification method.

[0058] Based on the above hardware structure, an embodiment of the website classification method of the present invention is proposed.

[0059] Reference Figure 2 , Figure 2 This is a flow chart of a first embodiment of a method for classifying web addresses of the present invention. The method includes:

[0060] Step S10, generating a URL map network according to the URL access list, and counting the seed URLs adjacent to the URL to be classified according to the URL map network and the seed URL set;

[0061] Step S20, iteratively calculating the website graph network according to the time period information of the to-be-classified website and the seed website in the website access list;

[0062] Step S30, determining the category of the to-be-classified website in the website graph network according to the result of the iterative calculation of the website graph network.

[0063] The URL classification method of this embodiment is applied to the URL classification device of a financial technology institution. The URL classification device can be a terminal or a PC device. For the convenience of description, the URL classification device is taken as an example for description; the URL classification device determines the seed URL corresponding to each URL type in the preset URL category set according to the preset URL category set, obtains the seed URL set, and generates a URL graph network according to the URL access list, and counts the seed URLs adjacent to the URLs to be classified according to the URL graph network and the seed URL set; the URL classification device calculates the weight set of the adjacent edges of the seed URL in the URL graph network and the URL to be classified according to the time period information when the URL to be classified and the seed URL in the URL access list are accessed, and then calculates the inconsistency rate between the pre-category of the URL to be classified in the URL graph network and the pre-category of the URL to be classified obtained in the previous iteration, and compares the inconsistency rate with the preset threshold to obtain the comparison result, and performs iterative calculation or determines the category of the URL to be classified according to the comparison result.

[0064] The web address classification method of this embodiment generates a web address graph network according to a web address access list, and counts seed web addresses adjacent to the web addresses to be classified according to the web address graph network and the seed web address set; iteratively calculates the web address graph network according to the time period information when the web addresses to be classified and the seed web addresses are accessed in the web address access list; and determines the category of the web addresses to be classified in the web address graph network according to the result of the iterative calculation of the web address graph network. The present invention generates a web address graph network according to a web address access list, counts seed web addresses adjacent to the web addresses to be classified in the web address graph network, and iteratively calculates the web address graph network according to the time period information when the web addresses in the web address access list are accessed, thereby determining the category of the web addresses to be classified, thereby improving the accuracy of web address classification.

[0065] The following is a detailed description of each step:

[0066] Step S10, generating a URL map network according to the URL access list, and counting the seed URLs adjacent to the URL to be classified according to the URL map network and the seed URL set;

[0067] In this embodiment, the URL classification device generates a corresponding URL access list according to the URL access records of all users and the preset time interval, and generates a corresponding URL graph network according to the URL access list, and counts the seed URLs adjacent to the URL to be classified according to the URL graph network and the seed URL set; for example, if the preset time interval is one day, the URL classification device generates a corresponding URL access list according to the URL access records of all users within one day, and then generates a corresponding URL graph network according to the URL access list, and counts the seed URLs adjacent to the URL to be classified according to the URL graph network and the seed URL set; it should be noted that the preset time interval is generally one day, and can preferably be set according to specific circumstances; the URL access list includes but is not limited to the URL name and the URL access time period; in the URL graph network, there will be an edge between two URLs that are accessed at the same time, that is, the two URLs that are accessed at the same time are adjacent in the URL graph network; in the URL access list, there may be one or more seed URLs in the seed URL set among the URLs that are accessed at the same time as the URL to be classified, or there may be no seed URL that is accessed at the same time as the URL to be classified.

[0068] Specifically, before step S10, the method includes:

[0069] Step a, according to a preset website category set, determining the seed website corresponding to each website category in the preset website category set, and obtaining the seed website set;

[0070] In this step, the URL classification device obtains URLs of a certain category according to a preset URL category set, selects one or more URLs of the same category from the URLs of the certain category, determines the seed URLs corresponding to each URL category in the preset URL category set, and generates a seed URL set from all the corresponding seed URLs. It should be noted that the number of seed URLs corresponding to a certain URL type can be one or more, which can be set according to the specific situation.

[0071] Specifically, step S10 also includes:

[0072] Step b, generating the website map network according to the website name and access time period of each website in the website access list;

[0073] In this step, the website classification device places the website names visited in the same period in adjacent positions according to the website name and the visited time period of each website in the website access list, thereby generating a website graph network.

[0074] Step c, counting all URLs adjacent to the URL to be classified according to the connection relationship of the URL graph network, and comparing all URLs with all seed URLs in the seed URL set to determine the seed URLs adjacent to the URL to be classified.

[0075] In this step, the URL classification device counts the names of all URLs adjacent to the URL to be classified based on the connection relationship of the URL graph network, and compares the names of all URLs with the names of all seed URLs in the seed URL set, thereby determining all seed URLs adjacent to the URL to be classified. For other URLs whose names are different from all the seed URLs in the seed URL set, even if the URL has been clearly classified, its relationship with the URL to be classified is not considered in this step.

[0076] Step S20, iteratively calculating the website graph network according to the time period information of the to-be-classified website and the seed website in the website access list;

[0077] In this embodiment, the URL classification device determines the pre-classification of the URL to be classified based on the time period information of the URL to be classified and the seed URL in the URL access list, and calculates the inconsistency rate between the pre-classification of the URL to be classified and the pre-classification of the URL to be classified after the previous iteration, and compares the inconsistency rate with a preset threshold. If the comparison result is that the inconsistency rate is not less than the preset threshold, the URL graph network is iteratively calculated.

[0078] Specifically, step S20 also includes:

[0079] Step d, determining the number of first time periods during which the to-be-classified website is accessed, the number of second time periods during which the seed website is accessed, and the number of third time periods during which the to-be-classified website and the seed website are simultaneously accessed, according to the access time period of each website in the website access list;

[0080] In this step, the URL classification device determines the first time period number of the URL to be classified being visited, the second time period number of the seed URL being visited, and the third time period number of the URL to be classified and the seed URL being visited simultaneously according to the visited time period of each URL in the URL access list; for example: if it is stipulated that the URL is visited once only when it is one hour, and the URL access records of 3 users are recorded in the URL access list, the URL classification device determines the first time period number of the URL to be classified being visited as 15 according to the visited time period of each URL in the URL access list, if it is determined that a certain URL to be classified is visited by each user for 5 hours, then the first time period number of the URL to be classified being visited is determined to be 15, if it is determined that a certain seed URL is visited by each user for 4 hours, then the second time period number of the seed URL being visited is determined to be 12, if it is determined that the URL to be classified and the seed URL are visited by each user for 2 hours, then the third time period number of the URL to be classified and the seed URL being visited simultaneously is determined to be 6, and the first time period number, the second time period number and the third time period number of other URLs to be classified and seed URLs are determined by referring to the above method, which will not be repeated here.

[0081] Step e: performing iterative calculation on the URL graph network according to the first time period number, the second time period number and the third time period number.

[0082] In this step, the URL classification device determines the pre-category corresponding to the URL to be classified based on the number of first time periods when the URL to be classified is visited, the number of second time periods when the seed URLs adjacent to the URL to be classified are visited, and the number of third time periods corresponding to when the URL to be classified and its adjacent seed URLs are visited simultaneously, and then calculates the inconsistency rate between the pre-classification of all the URLs to be classified in the URL graph network and the pre-classification of all the URLs to be classified in the URL graph network after the previous iteration, compares the inconsistency rate with a preset threshold, and if the comparison result is that the inconsistency rate is not less than the preset threshold, iterative calculation is performed on the URL graph network.

[0083] Further, according to the first time period number, the second time period number and the third time period number, a weight set of the adjacent edges of the seed website and the website to be classified in the website graph network adjacent to the website to be classified is calculated, and according to the weight set, a pre-category of the website to be classified is determined;

[0084] In this step, the website classification device calculates the weight sets of the adjacent edges of the seed websites adjacent to each website to be classified and each website to be classified in the website graph network according to the first time period number of visits to each website to be classified, the second time period number of visits to the seed websites adjacent to each website to be classified, and the third time period number corresponding to the simultaneous visits to each website to be classified and its adjacent seed websites, and determines the pre-category corresponding to each website to be classified according to the category of the seed website corresponding to the maximum weight in the weight set; for example: if it is stipulated that the duration of a website being visited is one hour to be considered as a visit, the website access list records the website access records of three users, and a website to be classified in the website graph network has three adjacent websites, two of which are seed websites of category A and seed websites of category B, the website classification device determines the first time period number of visits to the website to be classified as 15 according to the visited time period of each website in the website access list, if it is determined that the duration of a website to be classified being visited by each user is 5 hours, then the seed website of category A adjacent to the website to be classified is determined to be 4 hours, then the seed website of category A is determined to be 5 hours. The second time period number of URL accesses is 12. If it is determined that the B-category seed URL adjacent to the URL to be classified is accessed by each user for 3 hours, then the second time period number of the B-category seed URL accesses is 9. If it is determined that the URL to be classified and the A-category seed URL are simultaneously accessed by each user for 2 hours, then the third time period number of the URL to be classified and the A-category seed URL are simultaneously accessed is 6. If it is determined that the URL to be classified and the B-category seed URL are simultaneously accessed by each user for 1 hour, then the URL to be classified and the B-category seed URL are simultaneously accessed by each user for 1 hour. The number of the third time period in which the seed URL is simultaneously accessed is 3; the URL classification device calculates the weight of the adjacent edge between the seed URL of type A and the URL to be classified as 0.45 based on the above parameters, and calculates the weight of the adjacent edge between the seed URL of type B and the URL to be classified as 0.26. The seed URL of type A has a larger weight, so the pre-classification of the URL to be classified is determined to be category A. The weight calculation method of the adjacent edge between other URLs to be classified and their adjacent seed URLs refers to the above steps and is not repeated here; it should be noted that the formula for calculating the weight of the adjacent edge between the seed URL and the URL to be classified is:

[0085]

[0086] Among them, k represents the weight, |x AB | means the number of time periods in which users browse URL A and URL B at the same time. That is, count the time periods in which each user browses URLs AB at the same time, and then add up the time periods of all users. A| means the number of time periods for users who browsed URL A, that is, the number of time periods for each user to browse URL A is counted, and then the time periods for all users are added up. B | means the number of time periods in which users browsed URL B. That is, the number of time periods in which each user browsed URL B is counted, and then the time periods of all users are added up.

[0087] Further, calculating the inconsistency rate between the pre-categorization of the to-be-classified website in the website graph network and the pre-categorization of the to-be-classified website obtained in the previous iteration, and comparing the inconsistency rate with a preset threshold to obtain a comparison result;

[0088] In this step, the URL classification device calculates the inconsistency rate between the pre-categories of all URLs to be classified in the URL graph network and the pre-categories of all URLs to be classified in the URL graph network obtained in the previous iteration, and compares the inconsistency rate with a preset threshold to obtain a comparison result.

[0089] Furthermore, if the comparison result is that the inconsistency rate is not less than the preset threshold, the steps are executed: according to the visited time period of each URL in the URL access list, the number of first time periods in which the URL to be classified is visited, the number of second time periods in which the seed URL is visited, and the number of third time periods in which the URL to be classified and the seed URL are visited simultaneously are determined.

[0090] In this step, if the comparison result obtained by the URL classification device is that the inconsistency rate is not less than the preset threshold, the steps of determining the first time period number of visits to the URL to be classified, the second time period number of visits to the seed URL, and the third time period number of simultaneous visits to the URL to be classified and the seed URL are performed according to the visited time period of each URL in the URL access list, as well as subsequent steps. For example, assuming that the preset threshold is 0.01, the URL classification device calculates that the pre-categories of all URLs to be classified in the URL graph network are inconsistent with the pre-categories of all URLs to be classified in the URL graph network obtained in the previous iteration, and the inconsistency rate is 0.05. At this time, the inconsistency rate is not less than the preset threshold. Then, the URL classification device determines the first time period number of URLs to be classified visited, the second time period number of seed URLs visited, and the third time period number of URLs to be classified and seed URLs visited simultaneously according to the visited time period of each URL in the URL access list, and performs the next iteration calculation on the URL graph network. At this time, the pre-categories of other adjacent URLs to be classified of each URL to be classified in the URL graph network may have changed. For example, the URLs to be classified that were originally adjacent to other URLs to be classified and seed URLs, after this iteration, the pre-categories of other adjacent URLs to be classified that were originally not determined are determined; for another example, the URLs to be classified that were originally adjacent to all other URLs to be classified, and the pre-categories of other URLs to be classified are determined in this iteration. The URL to be classified needs to be determined in the next iteration based on the pre-categories of other adjacent URLs to be classified and the weight set of adjacent edges.

[0091] Step S30, determining the category of the to-be-classified website in the website graph network according to the result of the iterative calculation of the website graph network.

[0092] In this embodiment, the URL classification device determines the category of all URLs to be classified in the URL map network based on the result of the iterative calculation of the URL map network. The result of the iterative calculation of the URL map network is the inconsistency rate between the pre-categories of all URLs to be classified in the URL map network and the pre-categories of all URLs to be classified in the URL map network obtained in the previous iteration.

[0093] Specifically, step S30 also includes:

[0094] Step f: if the comparison result is that the inconsistency rate is less than the preset threshold, the category of the to-be-classified website is determined according to the weight set of the adjacent edges between the seed website and the to-be-classified website in the website graph network.

[0095] In this step, after the URL classification device iterates and calculates the URL graph network for multiple times, if the comparison result is that the inconsistency rate is less than the preset threshold, the URL graph network obtained by the last iterative calculation is used to determine the number of first time periods in which each URL to be classified is visited, the number of second time periods in which the seed URLs adjacent to each URL to be classified are visited, and the number of third time periods corresponding to the simultaneous visits of each URL to be classified and its adjacent seed URLs are calculated. The weight sets of the adjacent edges of the seed URLs adjacent to each URL to be classified and each URL to be classified in the URL graph network are calculated respectively, and the category corresponding to each URL to be classified is determined according to the category of the seed URL corresponding to the maximum weight in the weight set.

[0096] The URL classification device of this embodiment determines the seed URL corresponding to each URL type in the preset URL category set according to the preset URL category set, obtains the seed URL set, and generates a URL graph network according to the URL access list, and counts the seed URLs adjacent to the URLs to be classified according to the URL graph network and the seed URL set; the URL classification device calculates the weight set of the adjacent edges of the seed URLs in the URL graph network and the URL to be classified according to the time period information when the URLs to be classified and the seed URLs in the URL access list are accessed, and then calculates the inconsistency rate between the pre-category of the URL to be classified in the URL graph network and the pre-category of the URL to be classified obtained in the previous iteration, and compares the inconsistency rate with the preset threshold to obtain a comparison result, and based on the comparison result, iterative calculation is performed or the category of the URL to be classified is determined, thereby improving the accuracy of URL classification.

[0097] Furthermore, based on the first embodiment of the website classification method of the present invention, a second embodiment of the website classification method of the present invention is proposed.

[0098] The second embodiment of the website classification method is different from the first embodiment of the website classification method in that, after step S30, the method further includes:

[0099] Step g, updating the seed URL corresponding to each URL category in the preset URL category set, obtaining an updated seed URL set, and executing the steps: generating a URL map network according to the URL access list, and counting the seed URLs adjacent to the URL to be classified according to the URL map network and the seed URL set.

[0100] In this embodiment, after the URL classification device determines the categories of all URLs to be classified in the URL map network, it updates the seed URLs corresponding to each URL category in the preset URL category set according to the preset URL category set, obtains the updated seed URL set, and executes the steps of generating a URL map network according to the URL access list, and counting the seed URLs adjacent to the URLs to be classified according to the URL map network and the seed URL set, and the subsequent steps of reconfirming the classification of all URLs to be classified in the URL map network.

[0101] Furthermore, when updating the seed URL, the URL classification device determines whether there are any incorrectly classified URLs among the URLs to be classified in the previous iteration. If there are no incorrectly classified URLs, the seed URL is directly updated. If there are incorrectly classified URLs, the category corresponding to the incorrectly classified URLs is corrected, and the correct category is used as the final category of the URL, and the probability of the URL being selected as a seed URL is increased.

[0102] Furthermore, the URL classification device identifies the URLs to be classified whose categories were determined in the previous round of iterations, and the URLs to be classified include the URLs classified for the first time and the URLs that already had classification labels before the iteration; when identifying the URLs classified for the first time, relevant personnel are required to identify the URLs to determine whether the classification is incorrect; when identifying the URLs that already had classification labels before the iteration, the URL classification device compares the category determined in the previous round of iterations with the category of the classification labels that existed before the iteration. If there is a difference between the category determined in the previous round of iterations and the category of the classification labels that existed before the iteration, it is determined that the classification of the URL is incorrect, and then the URL is marked to increase its probability of being selected as a seed URL when updating the seed URL.

[0103] The URL classification device of this embodiment determines whether there are incorrectly classified URLs among the URLs to be classified in the previous iteration to increase the probability of incorrectly classified URLs being selected as seed URLs, updates the seed URLs corresponding to each URL category, and generates a URL map network according to the URL access list, and counts the seed URLs adjacent to the URLs to be classified according to the URL map network and the seed URL set, and the subsequent step reconfirms the classification of all URLs to be classified in the URL map network, thereby further improving the accuracy of URL classification.

[0104] The present invention also provides a website classification device. The website classification device of the present invention comprises:

[0105] A statistics module, used for generating a URL map network according to the URL access list, and counting the seed URLs adjacent to the URL to be classified according to the URL map network and the seed URL set;

[0106] An iteration module, in which a user performs iterative calculation on the URL graph network according to the time period information of the URL to be classified and the seed URL being accessed in the URL access list;

[0107] The determination module is used to determine the category of the to-be-classified website in the website graph network according to the result of the iterative calculation of the website graph network.

[0108] Preferably, the statistical module is also used for:

[0109] According to a preset website category set, a seed website address corresponding to each website category in the preset website category set is determined to obtain the seed website address set.

[0110] Preferably, the statistical module is also used for:

[0111] Generate the URL graph network according to the URL name and access time period of each URL in the URL access list;

[0112] According to the connection relationship of the URL graph network, all URLs adjacent to the URL to be classified are counted, and all URLs are compared with all seed URLs in the seed URL set to determine the seed URLs adjacent to the URL to be classified.

[0113] Preferably, the iteration module is further used for:

[0114] According to the access time period of each website in the website access list, determine the number of first time periods during which the website to be classified is accessed, the number of second time periods during which the seed website is accessed, and the number of third time periods during which the website to be classified and the seed website are simultaneously accessed;

[0115] The URL graph network is iteratively calculated according to the first time period number, the second time period number and the third time period number.

[0116] Preferably, the iteration module is further used for:

[0117] Calculate the weight set of the adjacent edges of the seed URL and the URL to be classified in the URL graph network according to the first time period number, the second time period number and the third time period number, and determine the pre-category of the URL to be classified according to the weight set;

[0118] Calculating the inconsistency rate between the pre-categorization of the to-be-classified website in the website graph network and the pre-categorization of the to-be-classified website obtained in the last iteration, and comparing the inconsistency rate with a preset threshold to obtain a comparison result;

[0119] If the comparison result is that the inconsistency rate is not less than the preset threshold, the steps are executed: according to the visited time period of each URL in the URL access list, the number of first time periods in which the URL to be classified is visited, the number of second time periods in which the seed URL is visited, and the number of third time periods in which the URL to be classified and the seed URL are visited simultaneously are determined.

[0120] Preferably, the determining module is further used for:

[0121] If the comparison result is that the inconsistency rate is less than the preset threshold, the category of the to-be-classified website is determined according to the weight set of the adjacent edges between the seed website and the to-be-classified website in the website graph network.

[0122] Preferably, the determining module is further used for:

[0123] The seed URLs corresponding to each URL category in the preset URL category set are updated to obtain an updated seed URL set, and the following steps are performed: a URL map network is generated according to the URL access list, and seed URLs adjacent to the URL to be classified are counted according to the URL map network and the seed URL set.

[0124] The present invention also provides a computer-readable storage medium.

[0125] The computer-readable storage medium of the present invention stores a website classification program, and when the website classification program is executed by a processor, the steps of the website classification method described above are implemented.

[0126] The method implemented when the website classification program running on the processor is executed can refer to the various embodiments of the website classification method of the present invention, and will not be described in detail here.

[0127] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0128] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0129] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0130] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for classifying web addresses, characterized in that: The website classification method comprises the following steps: According to the URL name and the access time period of each URL in the URL access list, the URL names of the URLs accessed in the same time period are placed in adjacent positions to generate a URL graph network, and according to the URL graph network and the seed URL set, the seed URLs adjacent to the URL to be classified are counted; According to the time period information of the to-be-classified website and the seed website in the website access list, iteratively calculating the website graph network; Determining the category of the to-be-classified website in the website graph network according to the result of the iterative calculation of the website graph network; The step of iteratively calculating the URL graph network according to the URL access list, the time period information of the URLs to be classified and the seed URLs being accessed, comprises: According to the access time period of each website in the website access list, determine the number of first time periods during which the website to be classified is accessed, the number of second time periods during which the seed website is accessed, and the number of third time periods during which the website to be classified and the seed website are simultaneously accessed; According to the first number of time periods, the second number of time periods and the third number of time periods, the pre-category corresponding to the web address to be classified is determined, and then the inconsistency rate between the pre-classification of all web addresses to be classified in the web address map network and the pre-classification of all web addresses to be classified in the web address map network after the last iteration is calculated, and the inconsistency rate is compared with the preset threshold value. If the comparison result is that the inconsistency rate is not less than the preset threshold value, the web address map network is iteratively calculated.

2. The method for classifying web addresses according to claim 1, wherein: Before the step of placing the URL names of the URLs visited in the same period in adjacent positions according to the URL name and the visited time period of each URL in the URL access list to generate a URL graph network, and counting the seed URLs adjacent to the URL to be classified according to the URL graph network and the seed URL set, the URL classification method further includes: According to a preset website category set, a seed website address corresponding to each website category in the preset website category set is determined to obtain the seed website address set.

3. The method for classifying web addresses as claimed in claim 2, characterized in that: The steps of placing the URL names of URLs visited in the same period in adjacent positions according to the URL name and the visited time period of each URL in the URL access list to generate a URL graph network, and counting the seed URLs adjacent to the URL to be classified according to the URL graph network and the seed URL set include: According to the website name and the access time period of each website in the website access list, the website names of the websites accessed in the same time period are placed in adjacent positions to generate the website graph network; According to the connection relationship of the URL graph network, all URLs adjacent to the URL to be classified are counted, and all URLs are compared with all seed URLs in the seed URL set to determine the seed URLs adjacent to the URL to be classified.

4. The method for classifying web addresses according to claim 1, wherein: The step of determining the pre-classification corresponding to the to-be-classified web address according to the first time period number, the second time period number and the third time period number, and then calculating the inconsistency rate between the pre-classification of all to-be-classified web addresses in the web address graph network and the pre-classification of all to-be-classified web addresses in the web address graph network after the last iteration, and comparing the inconsistency rate with a preset threshold value, and if the comparison result shows that the inconsistency rate is not less than the preset threshold value, performing iterative calculation on the web address graph network includes: Calculate the weight set of the adjacent edges of the seed URL and the URL to be classified in the URL graph network according to the first time period number, the second time period number and the third time period number, and determine the pre-category of the URL to be classified according to the weight set; Calculating the inconsistency rate between the pre-categorization of the to-be-classified website in the website graph network and the pre-categorization of the to-be-classified website obtained in the last iteration, and comparing the inconsistency rate with a preset threshold to obtain a comparison result; If the comparison result is that the inconsistency rate is not less than the preset threshold, the steps are executed: according to the visited time period of each URL in the URL access list, the number of first time periods in which the URL to be classified is visited, the number of second time periods in which the seed URL is visited, and the number of third time periods in which the URL to be classified and the seed URL are visited simultaneously are determined.

5. The method for classifying web addresses as claimed in claim 4, characterized in that: The step of determining the category of the to-be-classified website in the website graph network according to the result of the iterative calculation of the website graph network comprises: If the comparison result is that the inconsistency rate is less than the preset threshold, the category of the to-be-classified website is determined according to the weight set of the adjacent edges between the seed website and the to-be-classified website in the website graph network.

6. The method for classifying web addresses as claimed in claim 2, characterized in that: After the step of determining the category of the to-be-classified website in the website graph network according to the result of the iterative calculation of the website graph network, the website classification method further comprises: The seed URLs corresponding to each URL category in the preset URL category set are updated to obtain an updated seed URL set, and the following steps are performed: a URL map network is generated according to the URL access list, and seed URLs adjacent to the URL to be classified are counted according to the URL map network and the seed URL set.

7. A website classification device, characterized in that: The website classification device comprises: A statistics module is used to place the URL names of URLs visited in the same period in adjacent positions according to the URL name and the visited time period of each URL in the URL access list, generate a URL graph network, and count the seed URLs adjacent to the URL to be classified according to the URL graph network and the seed URL set; An iteration module, configured to perform iterative calculation on the URL graph network according to the time period information of the URLs to be classified and the seed URLs being accessed in the URL access list; A determination module, used to determine the category of the to-be-classified website in the website graph network according to the result of iterative calculation of the website graph network; The iteration module is also used for: According to the access time period of each website in the website access list, determine the number of first time periods during which the website to be classified is accessed, the number of second time periods during which the seed website is accessed, and the number of third time periods during which the website to be classified and the seed website are simultaneously accessed; According to the first number of time periods, the second number of time periods and the third number of time periods, the pre-category corresponding to the web address to be classified is determined, and then the inconsistency rate between the pre-classification of all web addresses to be classified in the web address map network and the pre-classification of all web addresses to be classified in the web address map network after the last iteration is calculated, and the inconsistency rate is compared with the preset threshold value. If the comparison result is that the inconsistency rate is not less than the preset threshold value, the web address map network is iteratively calculated.

8. A website classification device, characterized in that: The website classification device comprises: a memory, a processor and a website classification program stored in the memory and executable on the processor. When the website classification program is executed by the processor, the steps of the website classification method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a website classification program, and when the website classification program is executed by the processor, the steps of the website classification method according to any one of claims 1 to 6 are implemented.