A web page clustering method and device based on multi-modal features
By acquiring webpage screenshots and extracting multimodal feature values for hierarchical clustering, the problem of insufficient accuracy in webpage clustering in existing technologies is solved, achieving higher accuracy webpage clustering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA INTERNET NETWORK INFORMATION CENTER
- Filing Date
- 2022-12-28
- Publication Date
- 2026-06-02
AI Technical Summary
The problem with existing technologies is how to effectively cluster web pages, as it is difficult to guarantee the accuracy of clustering.
By acquiring screenshots of web pages, extracting image feature values, performing preliminary clustering based on these image feature values, determining the web page structure information of the central web page, and judging whether to further cluster by using multimodal features such as the difference between web page structure information and image feature values, and using machine learning models to determine the clustering probability, hierarchical web page clustering is achieved.
This improves the accuracy of webpage clustering, ensuring the accuracy and effectiveness of clustering.
Smart Images

Figure CN115937871B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a web page clustering method and apparatus based on multimodal features. Background Technology
[0002] With the advancement of technology and the development of society, the internet has become an indispensable part of people's daily lives. By creating a large number of web pages, people have accelerated the speed of information flow.
[0003] Clustering, which groups web pages with similarity, helps extract useful information from the online world.
[0004] However, how to cluster web pages becomes a problem. Summary of the Invention
[0005] This application provides the following technical solution:
[0006] This application provides a webpage clustering method based on multimodal features, including:
[0007] Obtain a screenshot of each webpage to be clustered;
[0008] Image feature values are extracted from the webpage screenshots, and the webpages to be clustered are clustered based on the image feature values to obtain multiple first clusters;
[0009] Determine the central webpage in the first cluster and obtain the webpage structure information of the central webpage;
[0010] Determine whether the webpage structure information of the central point webpages in each of the two first clusters is consistent;
[0011] If they are consistent, determine whether the difference between the image feature values of any two center point web pages in the first cluster is greater than a set threshold.
[0012] If the number of clusters is not greater than the number of clusters, then cluster every two of the first clusters into the second cluster.
[0013] Optionally, after clustering every two first clusters into a second cluster, the method further includes:
[0014] Determine the spacing of text information, webpage structure information, and image feature values between every two central point webpages in the second cluster;
[0015] Input the text information spacing, webpage structure information spacing, and image feature value spacing between every two central point webpages in the second cluster into the machine learning model to obtain the first merging probability of the central point webpages determined by the machine learning model.
[0016] If the first merging probability of the central point webpage is greater than the first set probability threshold, then every two second clusters will be clustered into a third cluster.
[0017] Optionally, before clustering every two second clusters into a third cluster, the method further includes:
[0018] Determine whether the difference between the image feature values of any two center point web pages in the second cluster is greater than the set threshold.
[0019] If the number is not greater than the specified value, then cluster every two second clusters into a third cluster.
[0020] Optionally, if the webpage structure information of any two center point webpages in the first cluster is inconsistent, or if the difference between the image feature values of any two center point webpages in the first cluster is greater than the set threshold, the method further includes:
[0021] Determine the spacing of text information, webpage structure information, and image feature values between every two central point webpages in the first cluster;
[0022] Input the text information spacing, webpage structure information spacing, and image feature value spacing between every two central point webpages in the first cluster into the machine learning model to obtain the second merging probability of the central point webpages determined by the machine learning model.
[0023] If the second merging probability of the central point webpage is greater than the second set probability threshold, then every two first clusters will be clustered into a third cluster.
[0024] Optionally, image feature values are extracted from the webpage screenshot, including:
[0025] The average hash value, differential hash value, and perceived hash value of the webpage screenshot are determined, and the average hash value, differential hash value, and perceived hash value are determined as image feature values.
[0026] This application also provides a web page clustering device based on multimodal features, comprising:
[0027] The first acquisition module is used to acquire a screenshot of each webpage to be clustered;
[0028] The first clustering module is used to extract image feature values from the webpage screenshots, and to cluster each of the webpages to be clustered based on the image feature values to obtain multiple first clusters;
[0029] The first determining module is used to determine the central point webpage in the first cluster;
[0030] The second acquisition module is used to acquire the webpage structure information of the central point webpage;
[0031] The second determining module is used to determine whether the webpage structure information of the central point webpages in each of the two first clusters is consistent;
[0032] The third determining module is used to determine whether the difference between the image feature values of the two central point web pages in the first cluster is greater than a set threshold if the web page structure information of the two central point web pages in the first cluster is consistent.
[0033] The second clustering module is used to cluster every two first clusters into a second cluster if the difference between the image feature values of the center point web pages in every two first clusters is not greater than a set threshold.
[0034] Optionally, the device further includes:
[0035] The fourth determining module is used to determine the spacing of text information, webpage structure information, and image feature values between every two central point webpages in the second cluster;
[0036] The fifth determining module is used to input the text information spacing, webpage structure information spacing, and image feature value spacing between every two center point webpages in the second cluster into the machine learning model to obtain the first merging probability of the center point webpages determined by the machine learning model;
[0037] The third clustering module is used to cluster every two second clusters into a third cluster if the first merging probability of the central point webpage is greater than a first set probability threshold.
[0038] Optionally, the device further includes:
[0039] The sixth determining module is used to determine whether the difference between the image feature values of the center point webpages in every two second clusters is greater than the set threshold. If it is not greater, the third clustering module is triggered to cluster every two second clusters into a third cluster.
[0040] Optionally, the device further includes:
[0041] The seventh determining module is used to determine the text information spacing, webpage structure information spacing, and image feature value spacing between two central point webpages in the first cluster if the webpage structure information of each two central point webpages in the first cluster is inconsistent, or if the difference between the image feature values of each two central point webpages in the first cluster is greater than the set threshold.
[0042] The eighth determining module is used to input the text information spacing, webpage structure information spacing, and image feature value spacing between every two center point webpages in the first cluster into the machine learning model to obtain the second merging probability of the center point webpages determined by the machine learning model;
[0043] The fourth clustering module is used to cluster every two first clusters into a third cluster if the second merging probability of the central point webpage is greater than a second set probability threshold.
[0044] Compared with the prior art, the beneficial effects of this application are as follows:
[0045] In this application, a screenshot of each webpage to be clustered is obtained, image feature values are extracted from the screenshot, and the webpages to be clustered are clustered based on the image feature values to obtain multiple first clusters. The center webpage in the first cluster is determined, and the webpage structure information of the center webpage is extracted. It is determined whether the webpage structure information of every two center webpages in the first clusters is consistent. If they are consistent, it is determined whether the difference between the image feature values of every two center webpages in the first clusters is greater than a set threshold. If it is not greater, every two first clusters are clustered into a second cluster. This achieves hierarchical clustering of webpages to be clustered using multimodal features such as webpage screenshots and webpage structure information, which can ensure the accuracy of clustering. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a flowchart illustrating a webpage clustering method based on multimodal features provided in Embodiment 1 of this application;
[0048] Figure 2 This is a schematic diagram of the structure of a clustering system provided in this application;
[0049] Figure 3 This is a flowchart illustrating a webpage clustering method based on multimodal features provided in Embodiment 2 of this application;
[0050] Figure 4 This is a flowchart illustrating a webpage clustering method based on multimodal features provided in Embodiment 3 of this application;
[0051] Figure 5 This is a flowchart illustrating a webpage clustering method based on multimodal features provided in Embodiment 4 of this application;
[0052] Figure 6 This is a schematic diagram of the structure of a web page clustering device based on multimodal features provided in this application;
[0053] Figure 7This is a schematic diagram of another web page clustering device based on multimodal features provided in this application;
[0054] Figure 8 This is a schematic diagram of another web page clustering device based on multimodal features provided in this application;
[0055] Figure 9 This is a schematic diagram of another web page clustering device based on multimodal features provided in this application. Detailed Implementation
[0056] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0057] To address the aforementioned issues, this application provides a webpage clustering method based on multimodal features. The following section will introduce the webpage clustering method based on multimodal features provided in this application.
[0058] Reference Figure 1 This is a flowchart illustrating a webpage clustering method based on multimodal features provided in Embodiment 1 of this application. Figure 1 As shown, the method may include, but is not limited to, the following steps:
[0059] Step S11: Obtain a screenshot of each webpage to be clustered.
[0060] In this embodiment, multiple web pages and their text information, structure information, and screenshots can be obtained from a website through a crawler server, and the multiple web pages and their text information, structure information, and screenshots can be stored in a database server.
[0061] like Figure 2 As shown, the clustering algorithm server can obtain a screenshot of each webpage to be clustered from the database server.
[0062] Step S12: Extract image feature values from the webpage screenshots, and cluster each of the webpages to be clustered based on the image feature values to obtain multiple first clusters.
[0063] In this embodiment, extracting image feature values from the webpage screenshot may include, but is not limited to:
[0064] S121. Determine the average hash value, differential hash value, and perceptual hash value of the webpage screenshot, and determine the average hash value, differential hash value, and perceptual hash value as image feature values.
[0065] In this embodiment, the similarity between the image feature values of the web pages to be clustered in the first cluster meets the first similarity threshold, and each first cluster is different.
[0066] The clustering algorithm used to cluster the web pages to be clustered based on the image feature values is not limited in this application. For example, the clustering algorithm can be, but is not limited to, HDBSCAN (density-based hierarchical clustering algorithm).
[0067] Step S13: Determine the central webpage in the first cluster and obtain the webpage structure information of the central webpage.
[0068] The webpage that forms the center point in the first cluster may include, but is not limited to:
[0069] S131. Determine the mean value of the image feature values of each webpage to be clustered in the first cluster.
[0070] The image feature values of the web pages to be clustered are extracted from the screenshots of the web pages to be clustered.
[0071] S132. The webpage to be clustered in the first cluster whose image feature value differs from the mean value is taken as the center webpage.
[0072] The centroid webpage in the first cluster is one of the webpages to be clustered in the first cluster.
[0073] After determining the centroid webpage, the clustering algorithm server can obtain the webpage structure information of the centroid webpage from the database server.
[0074] Step S14: Determine whether the webpage structure information of the central point webpages in each of the two first clusters is consistent.
[0075] If they match, proceed to step S15.
[0076] Step S15: Determine whether the difference between the image feature values of the center point web pages in each of the two first clusters is greater than a set threshold.
[0077] This step may include, but is not limited to:
[0078] S151. Obtain screenshots of the webpages of the center points in every two of the first clusters from the database server;
[0079] S152. Extract image feature values from the webpage screenshot of the center point webpage.
[0080] For a detailed explanation of the process of extracting image feature values from the webpage screenshot of the center point, please refer to the relevant introduction of step S121, which will not be repeated here.
[0081] S153. Determine whether the difference between the image feature values of the center point web pages in each of the two first clusters is greater than a set threshold.
[0082] If it is not greater than, proceed to step S16.
[0083] Step S16: Cluster every two of the first clusters into a second cluster.
[0084] In this embodiment, by acquiring a screenshot of each webpage to be clustered, extracting image feature values from the screenshots, and clustering each webpage to be clustered based on the image feature values to obtain multiple first clusters, determining the centroid webpage in each first cluster, extracting the webpage structure information of the centroid webpage, and determining whether the webpage structure information of every two centroid webpages in the first clusters is consistent. If consistent, determining whether the difference between the image feature values of every two centroid webpages in the first clusters is greater than a set threshold. If not, clustering every two first clusters into a second cluster. This achieves hierarchical clustering of webpages to be clustered using multimodal features such as webpage screenshots and webpage structure information, ensuring the accuracy of clustering.
[0085] As another optional embodiment 2 of this application, it is mainly an extension of the web page clustering method based on multimodal features described in embodiment 1 above, such as... Figure 3 As shown, the method may include, but is not limited to, the following steps:
[0086] Step S21: Obtain a screenshot of each webpage to be clustered.
[0087] Step S22: Extract image feature values from the webpage screenshots, and cluster each of the webpages to be clustered based on the image feature values to obtain multiple first clusters.
[0088] Step S23: Determine the central webpage in the first cluster and obtain the webpage structure information of the central webpage.
[0089] Step S24: Determine whether the webpage structure information of the central point webpages in each of the two first clusters is consistent.
[0090] If they match, proceed to step S25.
[0091] Step S25: Determine whether the difference between the image feature values of the center point web pages in every two of the first clusters is greater than a set threshold.
[0092] If it is not greater than, proceed to step S26.
[0093] Step S26: Cluster every two of the first clusters into a second cluster.
[0094] For detailed procedures of steps S21-S26, please refer to the relevant description of steps S11-S16 in Example 1, which will not be repeated here.
[0095] Step S27: Determine the text information spacing, webpage structure information spacing, and image feature value spacing between every two center point webpages in the second cluster.
[0096] The process of determining the central point webpage in the second cluster can be found in the relevant description of steps S131-S132 in Embodiment 1, and will not be repeated here.
[0097] This step may include, but is not limited to:
[0098] S271. Determine the Jaccard coefficient for text information, the Jaccard coefficient for webpage structure information, and the Jaccard coefficient for image feature values between every two central point webpages in the second cluster.
[0099] Step S28: Input the text information spacing, webpage structure information spacing, and image feature value spacing between every two center point webpages in the second cluster into the machine learning model to obtain the first merging probability of the center point webpages determined by the machine learning model.
[0100] This application does not impose any restrictions on the machine learning model. For example, the machine learning model can be, but is not limited to, the XGBoost model.
[0101] Step S29: If the first merging probability of the central point webpage is greater than the first set probability threshold, then cluster every two second clusters into a third cluster.
[0102] The first set probability threshold can be set as needed and is not limited in this application. For example, the first set probability threshold can be, but is not limited to, 90%.
[0103] In this embodiment, by acquiring a screenshot of each webpage to be clustered, image feature values are extracted from the screenshots. Based on these image feature values, the webpages to be clustered are grouped to obtain multiple first clusters. The center webpages in the first clusters are determined, and their webpage structure information is extracted. It is determined whether the webpage structure information of any two center webpages in the first clusters is consistent. If they are consistent, it is determined whether the difference between the image feature values of any two center webpages in the first clusters is greater than a set threshold. If not, any two first clusters are grouped into a second cluster. The text information spacing, webpage structure information spacing, and image feature value spacing between the center webpages in any two second clusters are further determined. The text information spacing, webpage structure information spacing, and image feature value spacing are input into a machine learning model to obtain the center webpage merging probability determined by the machine learning model. If the center webpage merging probability is greater than a set probability threshold, any two second clusters are grouped into a third cluster. This method utilizes multimodal features such as webpage screenshots, webpage structure information, and text information to perform hierarchical clustering of webpages to be clustered, ensuring the accuracy of the clustering.
[0104] As another optional embodiment 3 of this application, it is mainly an extension of the web page clustering method based on multimodal features described in embodiment 2 above, such as... Figure 4 As shown, the method may include, but is not limited to, the following steps:
[0105] Step S31: Obtain a screenshot of each webpage to be clustered.
[0106] Step S32: Extract image feature values from the webpage screenshots, and cluster each of the webpages to be clustered based on the image feature values to obtain multiple first clusters.
[0107] Step S33: Determine the central webpage in the first cluster and obtain the webpage structure information of the central webpage.
[0108] Step S34: Determine whether the webpage structure information of the central point webpages in each of the two first clusters is consistent.
[0109] If they match, proceed to step S35.
[0110] Step S35: Determine whether the difference between the image feature values of the center point web pages in each of the two first clusters is greater than a set threshold.
[0111] If it is not greater than, proceed to step S36.
[0112] Step S36: Cluster every two of the first clusters into a second cluster.
[0113] Step S37: Determine the text information spacing, webpage structure information spacing, and image feature value spacing between every two center point webpages in the second cluster.
[0114] Step S38: Input the text information spacing, webpage structure information spacing, and image feature value spacing between every two center point webpages in the second cluster into the machine learning model to obtain the first merging probability of the center point webpages determined by the machine learning model.
[0115] For a detailed description of steps S31-S38, please refer to the relevant description of steps S21-S28 in Example 2, which will not be repeated here.
[0116] Step S39: If the first merging probability of the center point webpage is greater than the first set probability threshold, determine whether the difference between the image feature values of the center point webpages in every two second clusters is greater than the set threshold.
[0117] The image feature values of the central point webpages in every two of the second clusters are determined in the following way:
[0118] S391. Obtain screenshots of the webpages of the center points in every two second clusters from the database server;
[0119] S392. Extract image feature values from the webpage screenshot of the center point webpage in the second cluster.
[0120] If it is not greater than, proceed to step S310.
[0121] Step S310: Cluster every two second clusters into a third cluster.
[0122] In this embodiment, a screenshot of each webpage to be clustered is obtained, image feature values are extracted from the screenshots, and the webpages to be clustered are clustered based on the image feature values to obtain multiple first clusters. The center webpages in the first clusters are determined, and the webpage structure information of the center webpages is extracted. It is determined whether the webpage structure information of any two center webpages in the first clusters is consistent. If consistent, it is determined whether the difference between the image feature values of any two center webpages in the first clusters is greater than a set threshold. If not, any two first clusters are clustered into a second cluster. Furthermore, the text information between the center webpages in any two second clusters is determined. The text information spacing, webpage structure information spacing, and image feature value spacing are input into a machine learning model to obtain the first merging probability of the center point webpage determined by the machine learning model. If the first merging probability of the center point webpage is greater than a first set probability threshold, it is determined whether the difference between the image feature values of the center point webpages in every two second clusters is greater than the set threshold. If not, every two second clusters are clustered into a third cluster. This achieves hierarchical clustering of webpages to be clustered using multimodal features such as webpage screenshots, webpage structure information, and text information, which can ensure the accuracy of clustering.
[0123] As another optional embodiment 4 of this application, it is mainly an extension of the web page clustering method based on multimodal features described in embodiment 1 above, such as... Figure 5 As shown, the method may include, but is not limited to, the following steps:
[0124] Step S41: Obtain a screenshot of each webpage to be clustered.
[0125] Step S42: Extract image feature values from the webpage screenshots, and cluster each of the webpages to be clustered based on the image feature values to obtain multiple first clusters.
[0126] Step S43: Determine the central webpage in the first cluster and obtain the webpage structure information of the central webpage.
[0127] Step S44: Determine whether the webpage structure information of the central point webpages in every two of the first clusters is consistent.
[0128] If they match, proceed to step S45; if they do not match, proceed to step S47.
[0129] Step S45: Determine whether the difference between the image feature values of the center point web pages in every two of the first clusters is greater than a set threshold.
[0130] If the value is not greater than the specified value, proceed to step S46; if the value is greater than the specified value, proceed to step S47.
[0131] Step S46: Cluster every two of the first clusters into a second cluster.
[0132] For detailed procedures of steps S41-S46, please refer to the relevant description of steps S11-S16 in Example 1, which will not be repeated here.
[0133] Step S47: Determine the text information spacing, webpage structure information spacing, and image feature value spacing between every two center point webpages in the first cluster.
[0134] For a detailed description of this step, please refer to step S27 in Example 2, which will not be repeated here.
[0135] Step S48: Input the text information spacing, webpage structure information spacing, and image feature value spacing between every two center point webpages in the first cluster into the machine learning model to obtain the second merging probability of the center point webpages determined by the machine learning model.
[0136] This application does not impose any restrictions on the machine learning model. For example, the machine learning model can be, but is not limited to, the XGBoost model.
[0137] Step S49: If the second merging probability of the central point webpage is greater than the second set probability threshold, then cluster every two first clusters into a third cluster.
[0138] The second set probability threshold can be set as needed and is not limited in this application. For example, the second set probability threshold can be, but is not limited to, 90%.
[0139] It should be noted that steps S47-S49 can also be performed in any of the embodiments 1-3 when the webpage structure information of the center point webpages in every two first clusters is inconsistent, or when the difference between the image feature values of the center point webpages in every two first clusters is greater than the set threshold.
[0140] In this embodiment, by acquiring a screenshot of each webpage to be clustered, image feature values are extracted from the screenshots. Based on these image feature values, each webpage to be clustered is grouped into multiple first clusters. A centroid webpage is determined within each first cluster. The webpage structure information of the centroid webpage is extracted. It is determined whether the webpage structure information of any two centroid webpages in each first cluster is consistent. If consistent, it is determined whether the difference between the image feature values of any two centroid webpages in each first cluster is greater than a set threshold. If not, any two first clusters are clustered into a second cluster. If greater, the difference between the image feature values of any two first clusters is determined to be a second cluster. The spacing between text information, webpage structure information, and image feature values between the central webpages in the first cluster is used to input these spacings into a machine learning model. This yields a second merging probability for the central webpages determined by the machine learning model. If the second merging probability of the central webpages is greater than a second set probability threshold, then every two first clusters are clustered into a third cluster. This method utilizes multimodal features such as webpage screenshots, webpage structure information, and text information to hierarchically cluster the webpages to be clustered, ensuring the accuracy of the clustering.
[0141] Corresponding to the above embodiment of a webpage clustering method based on multimodal features provided in this application, this application provides an embodiment of a webpage clustering device based on multimodal features.
[0142] Please see Figure 6 The webpage clustering device based on multimodal features includes: a first acquisition module 10, a first clustering module 20, a first determination module 30, a second acquisition module 40, a second determination module 50, a third determination module 60, and a second clustering module 70.
[0143] The first acquisition module 10 is used to acquire a screenshot of each webpage to be clustered.
[0144] The first clustering module 20 is used to extract image feature values from the webpage screenshots, and to cluster each of the webpages to be clustered based on the image feature values to obtain multiple first clusters.
[0145] The first determining module 30 is used to determine the central point webpage in the first cluster.
[0146] The second acquisition module 40 is used to acquire the webpage structure information of the central point webpage.
[0147] The second determining module 50 is used to determine whether the webpage structure information of the central point webpages in each of the two first clusters is consistent.
[0148] The third determining module 60 is used to determine whether the difference between the image feature values of the two central point web pages in the first cluster is greater than a set threshold if the web page structure information of the two central point web pages in the first cluster is consistent.
[0149] The second clustering module 70 is used to cluster each two first clusters into a second cluster if the difference between the image feature values of the center point web pages in each of the two first clusters is not greater than a set threshold.
[0150] In this embodiment, as Figure 7 As shown, the web page clustering device based on multimodal features may further include:
[0151] The fourth determining module 80 is used to determine the text information spacing, webpage structure information spacing, and image feature value spacing between every two center point webpages in the second cluster.
[0152] The fifth determining module 90 is used to input the text information spacing, webpage structure information spacing, and image feature value spacing between every two center point webpages in the second cluster into the machine learning model to obtain the first merging probability of the center point webpages determined by the machine learning model.
[0153] The third clustering module 100 is used to cluster every two second clusters into a third cluster if the first merging probability of the central point webpage is greater than a first set probability threshold.
[0154] In this embodiment, as Figure 8 As shown, in Figure 7 Based on the webpage clustering device based on multimodal features shown, the webpage clustering device based on multimodal features may further include:
[0155] The sixth determining module 110 is used to determine whether the difference between the image feature values of the center point webpages in every two second clusters is greater than the set threshold. If it is not greater, the third clustering module is triggered to cluster every two second clusters into a third cluster.
[0156] In this embodiment, as Figure 9 As shown, in Figure 8 Based on the webpage clustering device based on multimodal features shown, the webpage clustering device based on multimodal features may further include:
[0157] The seventh determining module 120 is used to determine the text information spacing, webpage structure information spacing, and image feature value spacing between two central point webpages in the first cluster if the webpage structure information of each two central point webpages in the first cluster is inconsistent, or if the difference between the image feature values of each two central point webpages in the first cluster is greater than the set threshold.
[0158] The eighth determining module 130 is used to input the text information spacing, webpage structure information spacing and image feature value spacing between every two center point webpages in the first cluster into the machine learning model to obtain the second merging probability of the center point webpages determined by the machine learning model.
[0159] The fourth clustering module 140 is used to cluster every two first clusters into a third cluster if the second merging probability of the central point webpage is greater than a second set probability threshold.
[0160] It should be noted that each embodiment focuses on describing the differences from other embodiments, and the same or similar parts between the embodiments can be referred to accordingly. For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.
[0161] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0162] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0163] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0164] The above provides a detailed description of a webpage clustering method and apparatus based on multimodal features provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and its core ideas. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A webpage clustering method based on multimodal features, characterized in that, include: Obtain a screenshot of each webpage to be clustered; Image feature values are extracted from the webpage screenshots, and the webpages to be clustered are clustered based on the image feature values to obtain multiple first clusters; Determine the mean value of the image feature values of each webpage to be clustered in the first cluster; The webpage to be clustered with the smallest difference between the image feature value and the mean value in the first cluster is taken as the center point webpage of the first cluster, and the webpage structure information of the center point webpage is obtained. Determine whether the webpage structure information of the central point webpages in each of the two first clusters is consistent; If they are consistent, determine whether the difference between the image feature values of any two center point web pages in the first cluster is greater than a set threshold. If the number is not greater than the first cluster, then cluster every two of the first clusters into the second cluster; Determine the mean value of the image feature values of each webpage to be clustered in the second cluster; The webpage with the smallest difference between the image feature value and the mean value in the second cluster is taken as the center point webpage of the second cluster; the text information spacing, webpage structure information spacing and image feature value spacing between any two center point webpages in the second cluster are determined. Input the text information spacing, webpage structure information spacing, and image feature value spacing between every two central point webpages in the second cluster into the machine learning model to obtain the first merging probability of the central point webpages determined by the machine learning model. If the first merging probability of the central point webpage is greater than the first set probability threshold, then every two second clusters will be clustered into a third cluster.
2. The method according to claim 1, characterized in that, Before clustering every two second clusters into a third cluster, the process also includes: Determine whether the difference between the image feature values of any two center point web pages in the second cluster is greater than the set threshold. If the number is not greater than the specified value, then cluster every two second clusters into a third cluster.
3. The method according to any one of claims 1-2, characterized in that, If the webpage structure information of any two center point webpages in the first cluster is inconsistent, or if the difference in image feature values between any two center point webpages in the first cluster is greater than the set threshold, the method further includes: Determine the spacing of text information, webpage structure information, and image feature values between every two central point webpages in the first cluster; Input the text information spacing, webpage structure information spacing, and image feature value spacing between every two central point webpages in the first cluster into the machine learning model to obtain the second merging probability of the central point webpages determined by the machine learning model. If the second merging probability of the central point webpage is greater than the second set probability threshold, then every two first clusters will be clustered into a third cluster.
4. The method according to claim 1, characterized in that, Extracting image feature values from the webpage screenshot includes: The average hash value, differential hash value, and perceived hash value of the webpage screenshot are determined, and the average hash value, differential hash value, and perceived hash value are determined as image feature values.
5. A webpage clustering device based on multimodal features, characterized in that, include: The first acquisition module is used to acquire a screenshot of each webpage to be clustered; The first clustering module is used to extract image feature values from the webpage screenshots, and to cluster each of the webpages to be clustered based on the image feature values to obtain multiple first clusters; The first determining module is used to determine the centroid webpage in the first cluster; wherein, the process of determining the centroid webpage in the first cluster includes: determining the mean value of the image feature values of each webpage to be clustered in the first cluster; and taking the webpage to be clustered with the smallest difference between the image feature value and the mean value in the first cluster as the centroid webpage of the first cluster. The second acquisition module is used to acquire the webpage structure information of the central point webpage; The second determining module is used to determine whether the webpage structure information of the central point webpages in each of the two first clusters is consistent; The third determining module is used to determine whether the difference between the image feature values of the two central point web pages in the first cluster is greater than a set threshold if the web page structure information of the two central point web pages in the first cluster is consistent. The second clustering module is used to cluster each two first clusters into a second cluster if the difference between the image feature values of the central point web pages in each of the two first clusters is not greater than a set threshold. The fourth determining module is used to determine the mean value of the image feature values of each webpage to be clustered in the second cluster; to take the webpage to be clustered with the smallest difference between the image feature value and the mean value in the second cluster as the center point webpage of the second cluster; and to determine the text information spacing, webpage structure information spacing and image feature value spacing between every two center point webpages in the second cluster. The fifth determining module is used to input the text information spacing, webpage structure information spacing, and image feature value spacing between every two center point webpages in the second cluster into the machine learning model to obtain the first merging probability of the center point webpages determined by the machine learning model; The third clustering module is used to cluster every two second clusters into a third cluster if the first merging probability of the central point webpage is greater than a first set probability threshold.
6. The apparatus according to claim 5, characterized in that, The device further includes: The sixth determining module is used to determine whether the difference between the image feature values of the center point webpages in every two second clusters is greater than the set threshold. If it is not greater, the third clustering module is triggered to cluster every two second clusters into a third cluster.
7. The apparatus according to any one of claims 5-6, characterized in that, The device further includes: The seventh determining module is used to determine the text information spacing, webpage structure information spacing, and image feature value spacing between two central point webpages in the first cluster if the webpage structure information of each two central point webpages in the first cluster is inconsistent, or if the difference between the image feature values of each two central point webpages in the first cluster is greater than the set threshold. The eighth determining module is used to input the text information spacing, webpage structure information spacing, and image feature value spacing between every two center point webpages in the first cluster into the machine learning model to obtain the second merging probability of the center point webpages determined by the machine learning model; The fourth clustering module is used to cluster every two first clusters into a third cluster if the second merging probability of the central point webpage is greater than a second set probability threshold.