Webpage quality evaluation method and device, electronic equipment and storage medium
By constructing an end-to-end webpage quality assessment model based on convolutional neural networks and long short-term memory neural networks, the accuracy and efficiency problems of identifying low-quality and harmful webpages in existing technologies are solved, achieving efficient and accurate webpage quality assessment, and improving user experience and privacy protection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
- Filing Date
- 2023-09-07
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies are insufficient to effectively identify and block low-quality and harmful web pages, leading to a decline in user search experience and privacy leaks. Furthermore, traditional methods consume high computational resources and lack timeliness, making them unable to quickly respond to frequent cheating methods employed by black market operators.
By extracting webpage content and structural features using convolutional neural networks and long short-term memory neural networks, and combining them with fully connected networks for comprehensive evaluation, an end-to-end webpage quality evaluation model is constructed, reducing human intervention and improving the accuracy of identifying low-quality and harmful webpages.
It improves the accuracy and efficiency of webpage quality evaluation, reduces labor costs, and can identify black market template pages with similar structures and pages containing low-quality and harmful information, thereby enhancing the user search experience and privacy protection.
Smart Images

Figure CN117009705B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and more particularly to the fields of deep learning, natural language processing, intelligent search, and intelligent recommendation technology. More specifically, this disclosure provides a webpage quality assessment method, a training method for a webpage quality assessment model, an apparatus, an electronic device, and a storage medium. Background Technology
[0002] In the internet age, users can access a wealth of online resources through search engines. However, the internet is also rife with low-quality, cheating, and malicious web pages, which negatively impact users' search experience and even infringe on their privacy and harm their legitimate interests. Summary of the Invention
[0003] This disclosure provides a method, apparatus, device, and storage medium for evaluating webpage quality.
[0004] According to the first aspect, a webpage quality evaluation method is provided, the method comprising: in response to receiving a quality evaluation request for a target webpage, obtaining webpage content information and webpage structure information of the target webpage; determining content quality characteristics of the target webpage based on the webpage content information; determining structural quality characteristics of the target webpage based on the webpage structure information; and determining the quality evaluation result of the target webpage based on the content quality characteristics and the structural quality characteristics.
[0005] According to the second aspect, a training method for a webpage quality evaluation model is provided. The method includes: acquiring sample content information and sample structure information of sample webpages; using a preset model to determine the quality evaluation result of the sample webpages based on the sample content information and sample structure information; determining loss information based on the quality evaluation result and the labels of the sample webpages; and adjusting the model parameters of the preset model based on the loss information to obtain the webpage quality evaluation model.
[0006] According to a third aspect, a webpage quality evaluation device is provided, comprising: a webpage information acquisition module, configured to acquire webpage content information and webpage structure information of the target webpage in response to receiving a quality evaluation request for the target webpage; a content quality feature determination module, configured to determine the content quality features of the target webpage based on the webpage content information; a structure quality feature determination module, configured to determine the structure quality features of the target webpage based on the webpage structure information; and a quality evaluation result determination module, configured to determine the quality evaluation result of the target webpage based on the content quality features and the structure quality features.
[0007] According to the fourth aspect, a training device for a webpage quality evaluation model is provided. The device includes: a sample information acquisition module for acquiring sample content information and sample structure information of sample webpages; a sample evaluation module for determining the quality evaluation result of sample webpages based on the sample content information and sample structure information using a preset model; a loss determination module for determining loss information based on the quality evaluation result and the labels of sample webpages; and an adjustment module for adjusting the model parameters of the preset model based on the loss information to obtain the webpage quality evaluation model.
[0008] According to a fifth aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a method provided according to the present disclosure.
[0009] According to a sixth aspect, a non-transitory computer-readable storage medium is provided storing computer instructions for causing a computer to perform the methods provided in this disclosure.
[0010] According to a seventh aspect, a computer program product is provided, comprising a computer program stored on at least one of a readable storage medium and an electronic device, the computer program implementing the method provided in this disclosure when executed by a processor.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0012] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0013] Figure 1 This is an exemplary system architecture diagram illustrating a training method for webpage quality assessment methods and webpage quality assessment models that can be applied according to an embodiment of this disclosure;
[0014] Figure 2 This is a flowchart of a webpage quality evaluation method according to an embodiment of the present disclosure;
[0015] Figure 3 This is a schematic diagram of a webpage quality evaluation method according to an embodiment of the present disclosure;
[0016] Figure 4 This is a system architecture diagram of a webpage quality evaluation method according to an embodiment of the present disclosure;
[0017] Figure 5 This is a flowchart of a training method for a webpage quality evaluation model according to an embodiment of the present disclosure;
[0018] Figure 6 This is a block diagram of a webpage quality evaluation apparatus according to an embodiment of the present disclosure;
[0019] Figure 7 This is a block diagram of a training apparatus for a webpage quality evaluation model according to an embodiment of the present disclosure;
[0020] Figure 8 This is a block diagram of an electronic device comprising at least one of a webpage quality assessment method and a webpage quality assessment model training method according to an embodiment of the present disclosure. Detailed Implementation
[0021] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0022] In search engines, the display of search results pages faces numerous security and business challenges. For example, search results may include low-quality, meaningless content, generic domain manipulation, fake customer service, and maliciously redirected pages. This can increase the information filtering costs for users, negatively impacting user retention and search experience. More importantly, illegitimate pages may infringe on visitors' privacy, leading to identity theft or other financial losses. Furthermore, black market operators use templates to mass-produce low-quality pages and hijack websites to seize legitimate traffic for huge profits, squeezing the space for legitimate resources and harming users' legitimate interests.
[0023] Web page quality assessment technology is a collective term for a series of methods that identify low-quality or harmful pages based on the quality of page content and its linked pages. It is an important prerequisite for the organization of online information and a crucial basis for the effective utilization of online information. Filtering low-quality and harmful pages can prevent the bad from driving out the good, build a high-quality and safe content ecosystem, and improve the user search experience.
[0024] Existing network quality assessment methods include the following.
[0025] One webpage quality assessment method is based on link analysis. Such methods require acquiring all preceding and following links of a webpage and dynamically updating page quality weights across billions of pages, placing high demands on computing and storage resources. Furthermore, these methods rely on low-quality pages detected by other systems to reduce their importance and propagate their weight. In offline scenarios, they cannot quickly respond to frequent changes in low-quality page cheating methods, and their overall timeliness fails to meet the increasingly fierce competition in cheating attacks and defenses.
[0026] One method for evaluating webpage quality based on page content is needed. Low-quality and harmful webpages often differ from normal pages in their titles and content, such as embedding cheating keywords in the title or hyperlinks pointing to low-quality pages. Some machine learning-based methods have been proposed to model this type of differentiated information. However, these methods rely on manual statistical feature extraction, and frequent adversarial operations consume significant manpower. Furthermore, black market operators often use a quantity-based approach, generating a large number of structurally similar low-quality pages using a basic template, and profiting illegally from a small number of pages that successfully bypass interception. In other words, such title- and content-based quality evaluation methods do not consider the structural similarity of low-quality template pages, and even with a high precision-recall model based on page content, they cannot achieve satisfactory interception results.
[0027] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0028] In the technical solution disclosed herein, the user's authorization or consent is obtained before acquiring or collecting the user's personal information.
[0029] Figure 1 This is an exemplary system architecture diagram illustrating a training method for a webpage quality assessment method and a webpage quality assessment model that can be applied according to an embodiment of this disclosure. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.
[0030] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0031] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Terminal devices 101, 102, and 103 can be various electronic devices, including but not limited to smartphones, tablets, laptops, etc.
[0032] The webpage quality evaluation method provided in this disclosure can generally be executed by terminal devices 101, 102, and 103. Accordingly, the webpage quality evaluation device provided in this disclosure can generally be installed in terminal devices 101, 102, and 103.
[0033] The training method for the webpage quality assessment model provided in this disclosure can generally be executed by the server 105. Accordingly, the training device for the webpage quality assessment model provided in this disclosure can generally be located in the server 105.
[0034] Figure 2 This is a flowchart of a webpage quality evaluation method according to an embodiment of the present disclosure.
[0035] like Figure 2 As shown, the webpage quality evaluation method 200 includes operations S210 to S240.
[0036] In operation S210, in response to receiving a quality evaluation request for the target webpage, the webpage content information and webpage structure information of the target webpage are obtained.
[0037] A quality assessment request for a target webpage can be issued after the search results are obtained, and the target webpage can be a page included in the search results. This request can be automatically issued by the terminal device in response to the retrieved target webpage, or it can be issued by the user using the terminal device after the target webpage has been retrieved. There can be one or more target webpages, and a quality assessment request can be issued for each target page.
[0038] In this embodiment, the executing entity can be an electronic device (e.g., a server) that provides network quality evaluation services. After receiving a quality evaluation request from a terminal device in operation S210, the server performs operations S220 to S240 to obtain a quality evaluation result. Next, the server returns the quality evaluation result to the terminal device, or, based on the quality evaluation result, removes web pages with low quality evaluation scores from multiple target pages and returns web pages with high quality evaluation scores to the terminal.
[0039] This end-to-end approach, which involves sending a quality evaluation request to the server and receiving the evaluation result from the server, can reduce the cost of manual intervention.
[0040] According to embodiments of this disclosure, after receiving a quality evaluation request, the server can obtain page information of the target webpage from the request data packet. The page information includes webpage content information and webpage structure information. The webpage content information may include text content on the webpage, such as titles, body text, and anchor text. Anchor text may be text content on anchor links, and anchor links are hyperlinks containing text.
[0041] Webpage structure information can be represented by the webpage's frame, layout, and other related information. Specifically, it can be determined by the position and layout of elements such as the webpage's title, body text, images, and tables. Therefore, webpage structure information can include the position and order of various elements on the page. Specifically, based on the position and order of various elements on the webpage, an element sequence containing all elements on the webpage can be determined. This element sequence contains the page's layout information and can be used as webpage structure information.
[0042] In operation S220, the content quality characteristics of the target webpage are determined based on the webpage content information.
[0043] Web page content information includes titles, body text, anchor text, etc. Convolutional neural networks (CNNs) can be used to extract semantic embedding vectors from this content information. These semantic embedding vectors can then be used to determine the target web page's quality score in the content dimension, serving as a content quality feature. A suitable CNN is TextCNN (Text Convolutional Neural Networks).
[0044] In operation S230, the structural quality characteristics of the target webpage are determined based on the webpage structure information.
[0045] A sequence of elements on a webpage, arranged according to their position and order, can represent the webpage's structural information. A sequence encoder can be used to extract the structural embedding vector of this sequence, and the quality score of the target webpage in the structural dimension can be determined based on this vector, serving as a structural quality feature. The sequence encoder can be an LSTM (Long Short Term Memory Network).
[0046] In operation S240, the quality evaluation result of the target webpage is determined based on the content quality characteristics and structural quality characteristics.
[0047] Content quality features and structural quality features can be concatenated to obtain a fused feature. This fused feature is then input into a pre-defined neural network, which dynamically adjusts the weights of the content quality features and structural quality features to determine the final webpage quality score, which serves as the quality evaluation result for the target webpage. The pre-defined neural network can be a fully connected network.
[0048] The server can return the quality evaluation results of each target webpage to the terminal, and the terminal can redetermine the webpages displayed in the search results page based on the quality evaluation results of each target webpage.
[0049] The embodiments of this disclosure determine content quality features based on webpage content information, determine structural quality features based on webpage structure information, and determine the webpage quality evaluation result based on a combination of content quality features and structural quality features, which can improve the accuracy of webpage quality evaluation.
[0050] It is understood that the webpage quality evaluation method provided in this embodiment can capture pages with similar structures to black market template pages, as well as pages containing low-quality and harmful information, thereby reducing the omission of low-quality and harmful webpages and greatly raising the threshold for black market cheating.
[0051] According to embodiments of this disclosure, webpage content information and webpage structure information can be obtained from the webpage description file of the target webpage. The webpage description file includes an HTML (Hypertext Markup Language) file. The HTML file includes multiple elements (tags), each with attribute information. The attribute information indicates that the element is one of the following: title, body text, link, image, or table.
[0052] Figure 3 This is a schematic diagram of a webpage quality evaluation method according to an embodiment of the present disclosure.
[0053] like Figure 3 As shown, HTML file 30 is, for example, the webpage description file of the target webpage. HTML file 30 includes multiple elements, each with attribute information, which indicates that the element is one of the following: title, body text, link, image, or table.
[0054] Low-quality and harmful web pages often differ from normal pages in their titles, content, and anchor text. For example, they may embed cheating keywords in the title or point to low-quality web pages in the anchor text. To model based on this differentiated information, this embodiment can extract content information with distinctive features. For instance, harmful web pages often embed similar-looking or similar-sounding variant characters in their titles or anchor text, have long titles / anchor texts, or contain sensitive keywords. Therefore, titles and anchor text are the texts most likely to contain distinctive information. Title text can be extracted from elements with the attribute "title," and anchor text (link text) can be extracted from elements with the attribute "link." These title and anchor text can then be used as web page content information 310. It should be noted that, depending on actual needs, body text can also be extracted from elements with the attribute "body text," table text from elements with the attribute "table," image text from elements with the attribute "image," and so on. All of these texts can be used as web page content information 310.
[0055] In an HTML file, multiple elements are organized according to a certain position and order, such as in a tree structure (DOM tree). A normal webpage has a clean and tidy structure, while harmful webpages are often cluttered and contain animated effects. To model based on this differentiated information, this embodiment can traverse the DOM tree to obtain the traversal path, determine the order of each element from the traversal path, and thus determine the element sequence containing all elements of the page. This element sequence can be used as the webpage structure information 320. It should be noted that different traversal methods can yield different element sequences. For example, the DOM tree can be traversed using preorder, inorder, or postorder traversal methods to obtain the webpage structure information 320. It should also be noted that the webpage structure information 320 can be a sequence composed of all elements in the target webpage, or it can be a sequence obtained after filtering all element sequences. For example, elements such as titles, tables, images, and links in a webpage have a significant impact on the page structure and can be retained. The main text elements in a webpage have little impact on the webpage structure. These main text elements can be removed from the element sequence to obtain a processed element sequence, which serves as the webpage structure information (320). This reduces the sequence length and facilitates feature calculation.
[0056] Next, content quality features 311 can be determined based on the webpage content information 310. For example, the TextCNN network can be used to extract features from the webpage content information 310 to obtain semantic embedding vectors, and then the quality score of the content dimension can be determined based on the semantic embedding vectors as the content quality feature 311.
[0057] Correspondingly, structural quality features 321 can be determined based on the webpage structural information 320. For example, an LSTM network can be used to extract features from the webpage structural information 320 to obtain a structural embedding vector, and then the quality score of the structural dimension can be determined based on the structural embedding vector as the structural quality feature 321.
[0058] Next, content quality feature 311 and structural quality feature 321 can be concatenated to obtain fusion feature 330. The fusion feature 330 is then input into a fully connected network. The fully connected network adjusts the quality scores of each subdomain network, maps them to a one-dimensional value, and obtains a comprehensive score, which serves as the quality evaluation result 340.
[0059] This embodiment utilizes HTML files to obtain webpage content and structure information, which is convenient and saves on manual intervention costs.
[0060] Figure 4 This is a system architecture diagram of a webpage quality evaluation method according to an embodiment of the present disclosure.
[0061] like Figure 4 As shown, the system in this embodiment may include a multi-domain fusion end-to-end webpage quality evaluation model 400. This webpage quality evaluation model 400 may include a structural subdomain network 410, a title subdomain network 420, an anchor text subdomain network 430, and a multi-domain fusion network 440. The title subdomain network 420 and the anchor text subdomain network 430 may be collectively referred to as a semantic subdomain network.
[0062] The structural subdomain network 410 may include an embedding layer, a sequence encoder, and an output layer. The parameters of the embedding layer are randomly initialized and determined during synchronous training with the network. This layer maps the sequence of elements representing the webpage structure to an embedding vector matrix. The sequence encoder may employ variable-length LSTM network units, inputting the vector representation of each element in the sequence into the corresponding LSTM network unit of the encoder, and obtaining the hidden layer vector output by the last LSTM network unit as the encoded representation of the webpage structure. The output layer may be a single fully connected layer, mapping the encoded representation of the webpage structure to one dimension, serving as the page structure quality score.
[0063] Both the title subdomain network 420 and the anchor text subdomain network 430 can use the TextCNN network, but the parameters of the two TextCNN networks can be not shared, that is, the title subdomain network 420 and the anchor text subdomain network 430 are trained independently.
[0064] The TextCNN network comprises an embedding layer, a feature extraction layer, a pooling layer, and an output layer. For example, a vocabulary can be constructed based on the webpage title and anchor text, and word embeddings can be initialized using the Word2Vec tool to obtain pre-trained word vectors. The embedding layer parameters are initialized using these pre-trained word vectors. The word vector dimension can be set to 200, using the Skip-gram algorithm, and the window size can be set to 5. The feature extraction layer can contain 1D convolutional kernels (up to 64) with a stride of 2 to extract text features. The pooling layer can use 1D max pooling to aggregate the text features, forming a single 128-dimensional vector as the subdomain semantic vector. The output layer can be a single fully connected layer that maps the 128-dimensional semantic vector to 1D, representing the quality score of the current subdomain dimension. By inputting the title and anchor text sequences into their respective trained semantic subdomain networks, the title quality score and anchor text quality score can be obtained.
[0065] The multi-domain fusion network 440 dynamically adjusts the weights of the outputs from each sub-domain network and generates the final webpage quality score. For example, the webpage title quality score, anchor text quality score, and webpage structure quality score can be concatenated as input to the multi-domain fusion network. The multi-domain fusion network can consist of fully connected layers and an output layer. The fully connected layer has equal input and output dimensions and is used to dynamically adjust the weights of the sub-domain results. The output layer uses the sigmoid activation function to map the adjusted features to the (0, 1) interval to obtain the webpage quality score.
[0066] The end-to-end webpage quality evaluation model in this embodiment adopts an end-to-end modeling approach, which reduces the cost of manual intervention and relies only on the webpage structure and content. The input information is easy to obtain and the calculation is lightweight, meeting the system's timeliness requirements.
[0067] Furthermore, this embodiment proposes a webpage structure subdomain network from the perspective of black market activities, which can support the identification of similar low-quality template structures. From a content perspective, a webpage semantic subdomain network is proposed around page titles and anchor text to support the identification of low-quality and harmful content on webpages. A multi-domain fusion network is constructed, and the quality scores generated by the subdomain networks are dynamically weighted to ultimately provide a webpage quality score, improving the accuracy of webpage quality evaluation.
[0068] Figure 5 This is a flowchart of a training method for a webpage quality evaluation model according to an embodiment of the present disclosure.
[0069] like Figure 5 As shown, the training method 500 of the webpage quality evaluation model includes operations S510 to S540.
[0070] During operation of S510, sample content information and sample structure information of sample web pages are obtained.
[0071] Sample web pages can be extracted offline from production environment datasets. These samples include positive and negative samples. Positive samples include normal web pages, while negative samples include low-quality and harmful web pages. Low-quality and harmful web pages can contain low-quality text content, low-quality template structures used in black market activities, or both. Sample web page information includes sample content information and sample structure information. Sample content information can include sample title text and sample anchor text.
[0072] The method for obtaining sample page information is similar to that for obtaining target webpage information, so it will not be repeated here.
[0073] When operating S520, a preset model is used to determine the quality evaluation result of the sample webpage based on the sample content information and sample structure information.
[0074] The preset model can be an initialized webpage quality assessment model. This preset model may include a structure subdomain network, a title subdomain network, an anchor text subdomain network, and a multi-domain fusion network. The structure subdomain network is used to determine the quality score of the sample webpage's structure dimension based on sample structure information. The title subdomain network is used to determine the quality score of the title dimension based on sample title text. The anchor text subdomain network is used to determine the quality score of the anchor text dimension based on sample anchor text. The multi-domain fusion network dynamically adjusts the weights of the quality scores output by each subdomain network, ultimately obtaining the quality score of the sample webpage and constructing the response to be returned.
[0075] In the S530 operation, loss information is determined based on the quality evaluation results and tags of the sample web pages.
[0076] The quality assessment result returned by the server hosting the preset model is the quality score of the sample webpage output by the model. Each sample webpage has a label indicating whether it is a low-quality or harmful webpage; for example, a label of 0 indicates a low-quality or harmful webpage, while a label of 1 indicates a normal webpage. Therefore, based on the difference between the quality score returned by the server hosting the preset model and the label of the sample webpage, the loss information predicted by the preset model can be determined. For example, binary cross-entropy can be used as the loss function to calculate the difference between the model's predicted score and the label, thus obtaining the loss information.
[0077] When operating the S540, the model parameters of the preset model are adjusted based on the loss information to obtain the webpage quality evaluation model.
[0078] For example, gradient information can be determined based on the loss information, and this gradient information can be backpropagated to update the parameters of the entire quality assessment model. During gradient backpropagation, a gradient pruning strategy can be employed, limiting the upper bound of the gradient to 1. This training process is repeated until a model that meets the conditions and can be used to evaluate webpage quality is obtained. Preset conditions may include model convergence or a model evaluation accuracy greater than a threshold (e.g., 90%). The learning rate parameter of the model during training can decay according to a certain strategy, such as cosine decay.
[0079] This embodiment uses a dataset containing normal web pages and low-quality harmful web pages to train a model, which is then used to evaluate web page quality. This model can capture web pages with similar structures to black market templates, as well as pages containing low-quality harmful information, reducing the chances of missing low-quality harmful web pages and greatly raising the threshold for black market cheating.
[0080] Figure 6 This is a block diagram of a webpage quality evaluation apparatus according to an embodiment of the present disclosure.
[0081] like Figure 6As shown, the webpage quality evaluation device 600 includes a webpage information acquisition module 601, a content quality feature determination module 602, a structural quality feature determination module 603, and a quality evaluation result determination module 604.
[0082] The webpage information acquisition module 601 is used to acquire the webpage content information and webpage structure information of the target webpage in response to receiving a quality evaluation request for the target webpage.
[0083] The content quality feature determination module 602 is used to determine the content quality features of the target webpage based on the webpage content information.
[0084] The structural quality feature determination module 603 is used to determine the structural quality features of the target webpage based on the webpage structure information.
[0085] The quality evaluation result determination module 604 is used to determine the quality evaluation result of the target webpage based on the content quality characteristics and structural quality characteristics.
[0086] The webpage information acquisition module 601 includes a webpage description file acquisition submodule and a webpage content information determination submodule.
[0087] The webpage description file retrieval submodule is used to retrieve the webpage description file of the target webpage. The webpage description file includes multiple elements, each with attribute information.
[0088] The Webpage Content Information Determination submodule is used to determine the webpage content information based on attribute information.
[0089] According to embodiments of this disclosure, attribute information includes at least one of a title and a link. The webpage content information determination submodule includes a title text extraction unit, a link text extraction unit, and a webpage content information determination unit.
[0090] The title text extraction unit is used to extract title text from elements with the attribute "title".
[0091] The link text extraction unit is used to extract link text from elements with the attribute "link".
[0092] The webpage content information determination unit is used to determine at least one of the title text and link text as webpage content information.
[0093] According to embodiments of this disclosure, the webpage information acquisition module 601 further includes a tree structure determination submodule and a webpage structure information determination submodule.
[0094] The tree structure determination submodule is used to determine the tree structure of multiple elements in a web page description file.
[0095] The Webpage Structure Information Determination submodule is used to determine the webpage structure information based on the tree structure.
[0096] The webpage structure information determination submodule includes a traversal unit, an element sequence determination unit, and a webpage structure information determination unit.
[0097] The traversal unit is used to traverse the tree structure and obtain the traversal path.
[0098] The element sequence determination unit is used to determine an element sequence containing multiple elements based on the order of each element in the traversal path.
[0099] The webpage structure information determination unit is used to remove elements with specified attributes from the element sequence to obtain a processed element sequence, which serves as the webpage structure information.
[0100] The content quality feature determination module 602 includes a semantic encoding information determination submodule and a content quality feature determination submodule.
[0101] The semantic encoding information determination submodule is used to determine the semantic encoding information of web page content information.
[0102] The content quality feature determination submodule is used to determine content quality features based on semantic encoding information.
[0103] The structural quality characteristic determination module includes a structural coding information determination submodule and a structural quality characteristic determination submodule.
[0104] The structure encoding information determination submodule is used to determine the structure encoding information of the webpage structure.
[0105] The structural quality characteristic determination submodule is used to determine the structural quality characteristics based on the structural coding information.
[0106] The quality evaluation result determination module 604 includes a weight determination submodule, a first fusion submodule, and a quality evaluation result determination submodule.
[0107] The weight determination submodule is used to determine the weights of content quality features and structural quality features.
[0108] The first fusion submodule is used to combine content quality features and structural quality features to obtain the first fusion feature.
[0109] The Quality Evaluation Result Determination Submodule is used to determine the quality evaluation result of the target webpage based on the first fusion feature and weight.
[0110] Figure 7 This is a block diagram of a training apparatus for a webpage quality evaluation model according to an embodiment of the present disclosure.
[0111] like Figure 7As shown, the training device 700 for the webpage quality evaluation model includes a sample information acquisition module 701, a sample evaluation module 702, a loss determination module 703, and an adjustment module 704.
[0112] The sample information acquisition module 701 is used to acquire sample content information and sample structure information of sample web pages.
[0113] The sample evaluation module 702 is used to determine the quality evaluation result of the sample webpage based on the sample content information and sample structure information using a preset model.
[0114] The loss determination module 703 is used to determine loss information based on the quality evaluation results and tags of the sample web pages.
[0115] The adjustment module 704 is used to adjust the model parameters of the preset model based on the loss information to obtain the webpage quality evaluation model.
[0116] According to embodiments of this disclosure, the preset model includes a semantic subdomain network, a structural subdomain network, and a fusion network. The sample evaluation module 702 includes a semantic subdomain network processing submodule, a structural subdomain network processing submodule, a second fusion submodule, and a fusion network processing submodule.
[0117] The semantic subdomain network processing submodule is used to input sample content information into the semantic subdomain network to evaluate the quality of the content dimension and obtain content quality features.
[0118] The structural subdomain network processing submodule is used to input sample structural information into the structural subdomain network to evaluate the quality of the structural dimension and obtain structural quality features.
[0119] The second fusion submodule is used to combine content quality features and structural quality features to obtain the second fusion feature.
[0120] The fusion network processing submodule is used to input the second fusion feature into the fusion network for weight adjustment, thereby obtaining the quality evaluation result of the sample webpage.
[0121] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0122] Figure 8A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0123] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0124] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0125] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs at least one of the various methods and processes described above, such as webpage quality assessment methods and webpage quality assessment model training methods. For example, in some embodiments, at least one of the webpage quality assessment methods and webpage quality assessment model training methods can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of at least one of the webpage quality assessment methods and webpage quality assessment model training methods described above can be performed. Alternatively, in other embodiments, the computing unit 801 may be configured by any other suitable means (e.g., by means of firmware) to perform at least one of the web page quality assessment methods and the training methods of the web page quality assessment model.
[0126] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0127] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0128] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0129] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0130] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0131] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.
[0132] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0133] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for evaluating webpage quality, comprising: In response to receiving a quality evaluation request for a target webpage, the webpage content information and webpage structure information of the target webpage are obtained; Based on the webpage content information, the content quality features of the target webpage are determined via a text convolutional neural network. Based on the webpage structure information, the structural quality characteristics of the target webpage are determined via a long short-term memory neural network. as well as Based on the content quality characteristics and the structural quality characteristics, the quality evaluation result of the target webpage is determined via a fully connected network. Obtaining the webpage structure information further includes: Obtain the webpage description file of the target webpage, wherein the webpage description file includes multiple elements, each element having attribute information; Determine the tree structure of multiple elements in the webpage description file; Determining the webpage structure information based on the tree structure includes: Traverse the tree structure to obtain the traversal path; Based on the order of the elements in the traversal path, an element sequence containing the multiple elements is determined, the element sequence including the layout information of the target webpage; and Elements with the attribute "body" are removed from the element sequence to obtain the processed element sequence, which serves as the webpage structure information.
2. The method according to claim 1, wherein, The process of obtaining the webpage content information and webpage structure information of the target webpage includes: The webpage content information is determined based on the attribute information.
3. The method according to claim 2, wherein, The attribute information includes at least one of a title and a link; determining the webpage content information based on the attribute information includes: Extract the title text from elements with the attribute "title"; Extract the link text from elements with the attribute "link"; and At least one of the title text and the link text is identified as the webpage content information.
4. The method according to any one of claims 1 to 3, wherein, The step of determining the content quality characteristics of the target webpage based on the webpage content information includes: Determine the semantic encoding information of the webpage content; and The content quality features are determined based on the semantic encoding information.
5. The method according to any one of claims 1 to 3, wherein, The step of determining the structural quality characteristics of the target webpage based on the webpage structure information includes: Determine the structural encoding information of the webpage structure information; and The structural quality characteristics are determined based on the structural coding information.
6. The method according to any one of claims 1 to 3, wherein, The step of determining the quality evaluation result of the target webpage based on the content quality characteristics and the structural quality characteristics includes: Determine the weights of the content quality features and the structural quality features respectively; The content quality features and the structural quality features are concatenated to obtain a fused feature; and The quality evaluation result of the target webpage is determined based on the fusion features and the weights.
7. A training method for a webpage quality assessment model, comprising: Obtain sample content and structure information from the sample webpage; The quality evaluation result of the sample webpage is determined using a preset model based on the sample content information and sample structure information. The preset model includes a text convolutional neural network used as a semantic subdomain network, a long short-term memory neural network used as a structural subdomain network, and a fully connected network used as a fusion network. Based on the quality evaluation results and tags of the sample web pages, loss information is determined; and Based on the loss information, the model parameters of the preset model are adjusted to obtain the webpage quality evaluation model. Obtaining the sample structure information further includes: Obtain the sample description file of the sample webpage, wherein the sample description file includes multiple elements, each element having attribute information; Determine the tree structure of multiple elements in the sample description file; Determining the sample structure information based on the tree structure includes: Traverse the tree structure to obtain the traversal path; Based on the order of the elements in the traversal path, an element sequence containing the multiple elements is determined, the element sequence including the layout information of the sample webpage; and Elements with the attribute "text" are removed from the element sequence to obtain the processed element sequence, which serves as the sample structure information. The step of using a preset model to determine the quality evaluation result of the sample webpage based on the sample content information and sample structure information includes: The sample content information is input into the text convolutional neural network to perform quality evaluation of the content dimension, thereby obtaining content quality features; The sample structure information is input into the long short-term memory neural network to evaluate the quality of the structural dimension and obtain structural quality features. The content quality feature and the structural quality feature are concatenated to obtain the second fusion feature; The second fusion feature is input into the fully connected network for weight adjustment to obtain the quality evaluation result of the sample webpage.
8. A webpage quality evaluation device, comprising: The webpage information acquisition module is used to acquire the webpage content information and webpage structure information of the target webpage in response to receiving a quality evaluation request for the target webpage. The content quality feature determination module is used to determine the content quality features of the target webpage based on the webpage content information via a text convolutional neural network. The structural quality feature determination module is used to determine the structural quality features of the target webpage based on the webpage structural information via a long short-term memory neural network. as well as The quality evaluation result determination module is used to determine the quality evaluation result of the target webpage via a fully connected network based on the content quality characteristics and the structural quality characteristics. The webpage information acquisition module includes: The webpage description file acquisition submodule is used to acquire the webpage description file of the target webpage, wherein the webpage description file includes multiple elements, and each element has attribute information; A tree structure determination submodule is used to determine the tree structure of multiple elements in the webpage description file; and A webpage structure information determination submodule is used to determine the webpage structure information based on the tree structure, wherein the webpage structure information determination submodule includes: A traversal unit is used to traverse the tree structure and obtain the traversal path; An element sequence determination unit is used to determine an element sequence containing the multiple elements based on the order of the elements in the traversal path; and A webpage structure information determination unit is used to remove elements with specified attributes from the element sequence to obtain a processed element sequence, which serves as the webpage structure information.
9. The apparatus according to claim 8, wherein, The webpage information acquisition module also includes: The webpage content information determination submodule is used to determine the webpage content information based on the attribute information.
10. The apparatus according to claim 9, wherein, The attribute information includes at least one of the title and the link; the webpage content information determination submodule includes: The title text extraction unit is used to extract title text from elements with the attribute "title". The link text extraction unit is used to extract link text from elements with the "link" attribute; and A webpage content information determination unit is used to determine at least one of the title text and the link text as the webpage content information.
11. The apparatus according to any one of claims 8 to 10, wherein, The content quality feature determination module includes: A semantic encoding information determination submodule is used to determine the semantic encoding information of the webpage content information; and The content quality feature determination submodule is used to determine the content quality features based on the semantic encoding information.
12. The apparatus according to any one of claims 8 to 10, wherein, The structural quality characteristic determination module includes: A structure encoding information determination submodule is used to determine the structure encoding information of the webpage structure information; and The structural quality feature determination submodule is used to determine the structural quality features based on the structural coding information.
13. The apparatus according to any one of claims 8 to 10, wherein, The quality evaluation result determination module includes: The weight determination submodule is used to determine the weights of the content quality features and the structural quality features, respectively. The first fusion submodule is used to concatenate the content quality feature and the structural quality feature to obtain a first fusion feature; and The quality evaluation result determination submodule is used to determine the quality evaluation result of the target webpage based on the first fusion feature and the weight.
14. A training device for a webpage quality assessment model, comprising: The sample information acquisition module is used to acquire sample content information and sample structure information of sample web pages; The sample evaluation module is used to determine the quality evaluation result of the sample webpage based on the sample content information and sample structure information using a preset model. The preset model includes a text convolutional neural network used as a semantic subdomain network, a long short-term memory neural network used as a structural subdomain network, and a fully connected network used as a fusion network. A loss determination module is used to determine loss information based on the quality evaluation results and tags of the sample web pages; and The adjustment module is used to adjust the model parameters of the preset model based on the loss information to obtain a webpage quality evaluation model. The acquisition of the sample structure information includes: Obtain the sample description file of the sample webpage, wherein the sample description file includes multiple elements, each element having attribute information; Determine the tree structure of multiple elements in the sample description file; Determining the sample structure information based on the tree structure includes: Traverse the tree structure to obtain the traversal path; Based on the order of the elements in the traversal path, an element sequence containing the multiple elements is determined, the element sequence including the layout information of the sample webpage; and Elements with the attribute "text" are removed from the element sequence to obtain the processed element sequence, which serves as the sample structure information. The sample evaluation module includes: The semantic subdomain network processing submodule is used to input the sample content information into the text convolutional neural network to perform quality evaluation of the content dimension and obtain content quality features; The structural subdomain network processing submodule is used to input the sample structural information into the long short-term memory neural network to perform structural dimension quality evaluation and obtain structural quality features. The second fusion submodule is used to concatenate the content quality features and the structural quality features to obtain the second fusion feature; The fusion network processing submodule is used to input the second fusion feature into the fully connected network for weight adjustment to obtain the quality evaluation result of the sample webpage.
15. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.
16. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 7.
17. A computer program product comprising a computer program stored on at least one of a readable storage medium and an electronic device, the computer program implementing the method according to any one of claims 1 to 7 when executed by a processor.