Pornographic website recognition method, device, electronic device and storage medium

Through the multimodal fusion model, combining website features and image features, text and image models are trained, the false alarm and missed response problems of pornographic website detection in the existing technology are solved, and a higher recognition accuracy and recall rate are achieved.

CN114491358BActive Publication Date: 2025-07-25QI AN XIN TECHNOLOGY GROUP INC +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111618296.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-07-25
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

The detection methods of pornographic websites in the prior art have problems of false alarms and missed reports, resulting in low recognition accuracy.

Method used

A multimodal fusion model is used to extract the features and image features of the website to be identified, and the text model and image model are trained separately, and a multimodal fusion is combined for pornographic website recognition.

Benefits of technology

It improves the accuracy of pornographic website detection, reduces false alarms and missed reports, and achieves more comprehensive pornographic website recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114491358B_ABST
    Figure CN114491358B_ABST
Patent Text Reader

Abstract

The present invention provides a method, apparatus, electronic device and storage medium for identifying pornographic websites. The method for identifying pornographic websites includes: obtaining a website to be identified, and obtaining the characteristics of the website to be identified and the image of the website to be identified based on the website to be identified; based on the characteristics of the website to be identified and the image of the website to be identified, using a text model and an image model to identify whether the website to be identified is a pornographic website, wherein the text model is trained by website feature training data, and the image model is trained by website image training data. By using the method for identifying pornographic websites provided by the present invention, the accuracy of pornographic website detection can be improved, the situations of false positives and missed detections can be reduced, and it is helpful to comprehensively identify pornographic websites.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security technology, and in particular, to a method, device, electronic device, and storage medium for identifying pornographic websites. Background Art

[0002] As known from related technologies, the current mainstream methods for detecting pornographic websites include keyword matching methods, website image detection methods, and text classification methods based on deep learning. Since the foregoing methods often result in false positives and false negatives, the recognition accuracy of pornographic websites is not high. Summary of the Invention

[0003] The present invention provides a method, device, electronic device, and storage medium for identifying pornographic websites, which are used to solve the defects of false positives and false negatives of pornographic websites in the prior art, and improve the recognition accuracy of pornographic websites.

[0004] The present invention provides a method for identifying a pornographic website, the method comprising: obtaining a website to be identified, and obtaining characteristics of the website to be identified and an image of the website to be identified based on the website to be identified; identifying whether the website to be identified is a pornographic website based on the characteristics of the website to be identified and the image of the website to be identified through a text model and an image model, wherein the text model is trained by website characteristic training data, and the image model is trained by website image training data.

[0005] According to a method for identifying a pornographic website provided by the present invention, the identifying whether the website to be identified is a pornographic website based on the characteristics of the website to be identified and the image of the website to be identified through a text model and an image model comprises: inputting the characteristics of the website to be identified into the text model to obtain a first output result regarding the characteristics of the website to be identified; and identifying whether the website to be identified is a pornographic website based on the first output result and a second output result of the image of the website to be identified regarding the image model.

[0006] According to a method for identifying a pornographic website provided by the present invention, the identifying whether the website to be identified is a pornographic website based on the first output result and the second output result of the image of the website to be identified regarding the image model comprises: if the first output result is that the website to be identified is a pornographic website, using the first output result as the identification result of the website to be identified; if the first output result is that the website to be identified is not a pornographic website, inputting the image of the website to be identified into the image model to obtain the second output result, and using the second output result as the identification result of the website to be identified.

[0007] According to a pornographic website identification method provided by the present invention, before inputting the website features to be identified into the text model, the method further includes: preprocessing the website features to be identified, and using the preprocessed website features to be identified as the final website features to be input into the text model, where the preprocessing includes one or more of missing value processing, normalization processing, and one-hot encoding processing.

[0008] According to a pornographic website identification method provided by the present invention, before identifying the website to be identified as a pornographic website based on the first output result and the second output result of the website image to be identified with respect to the image model, the method further includes: performing image segmentation processing on the website image to be identified to obtain multiple segmented website images, and using the multiple segmented website images as the final website images to be input into the image model, and determining the second output result based on the output results of the multiple segmented website images with respect to the image model.

[0009] According to a pornographic website identification method provided by the present invention, the website features to be identified include website URL features to be identified, and the website features to be identified are determined in the following manner: determining the website URL of the website to be identified, obtaining the domain name of the website to be identified based on the website URL, and counting the number of links, the number of requests, the number of IP accesses, the access duration, the domain name features, the domain name level, and the number of special characters of the domain name; determining the website URL features to be identified based on one or more of the number of links, the number of requests, the number of IP accesses, the access duration, the domain name features, the domain name level, and the number of special characters of the domain name.

[0010] According to a pornographic website identification method provided by the present invention, the website features to be identified include website content features to be identified, and the website features to be identified are determined in the following manner: determining the number of Chinese sensitive words after a preset character in the web page of the website to be identified, where the Chinese sensitive words are determined based on a pornographic keyword list; determining the website content features to be identified based on the number of Chinese sensitive words.

[0011] A method for identifying pornographic websites provided by the present invention, wherein the website feature training data includes website URL feature training data, and the website URL feature training data includes one or more of the number of links of the domain name, the number of domain name requests, the number of IP accesses, the domain name access duration, and the number of domain name levels. The text model is trained in the following manner: based on the number of links of the domain name, the number of domain name requests, the number of IP accesses, the domain name access duration, and the number of domain name levels, the text model is trained.

[0012] A method for identifying pornographic websites provided by the present invention, wherein the website feature training data includes website content feature training data, and the website content feature training data includes the number of Chinese sensitive words after a preset character. The text model is trained in the following manner: based on the number of Chinese sensitive words after the preset character, the text model is trained.

[0013] The present invention also provides a device for identifying pornographic websites, which includes: an acquisition module for acquiring a website to be identified and obtaining website features to be identified and an image of the website to be identified based on the website to be identified; a processing module for identifying the website to be identified as a pornographic website based on the website features to be identified and the image of the website to be identified through a text model and an image model, wherein the text model is trained by website feature training data, and the image model is trained by website image training data.

[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the pornographic website identification method as described in any one of the above are implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the pornographic website identification method as described in any one of the above are implemented.

[0016] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the pornographic website identification method as described in any one of the above are implemented.

[0017] The pornographic website recognition method, device, electronic device and storage medium provided by the present invention determine multi-modal features of a website to be recognized based on the features of the website to be recognized and the image of the website to be recognized, and based on the multi-modal features, use a pre-trained text model and image model to recognize the website to be recognized as a pornographic website. By this method, the accuracy of pornographic website detection can be improved, false positives and false negatives can be reduced, and it helps to comprehensively identify pornographic websites. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0019] Figure 1 is one of the flow diagrams of the pornographic website recognition method provided by the present invention;

[0020] Figure 2 is one of the schematic diagrams of the training process of the text model provided by the present invention;

[0021] Figure 3 is one of the flow diagrams of recognizing a website to be recognized as a pornographic website based on the features of the website to be recognized and the image of the website to be recognized, through a text model and an image model, provided by the present invention;

[0022] Figure 4 is one of the flow diagrams of determining the features of the website to be recognized provided by the present invention;

[0023] Figure 5 is the second of the flow diagrams of determining the features of the website to be recognized provided by the present invention;

[0024] Figure 6 is the application scenario diagram of determining the features of the website to be recognized provided by the present invention;

[0025] Figure 7 is the second of the flow diagrams of the pornographic website recognition method provided by the present invention;

[0026] Figure 8 is the structural diagram of the pornographic website recognition device provided by the present invention;

[0027] Figure 9 is the structural diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0028] To make the objectives, technical solutions and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts belong to the scope of protection of the present invention.

[0029] In recent years, the Internet technology has developed rapidly, and the Internet has penetrated into all aspects of people's lives. At the same time, the Internet is a double-edged sword, and online pornographic content has also penetrated into every corner of the Internet. Moreover, such websites have low construction costs, strong concealment, and many means to avoid supervision, seriously affecting the network environment. Therefore, it is necessary to accurately and timely identify pornographic websites and take corresponding treatment measures.

[0030] The current mainstream methods for detecting pornographic websites are as follows:

[0031] 1. Keyword matching method: By matching pornographic keywords in the website, if the matching reaches a certain number of times or more, the website is determined to be a pornographic website. Since many current pornographic websites are piled up with a large number of pictures or video links, or processed in the web source code so that the real page information cannot be returned. This method is prone to a large number of missed reports, and the recall rate of identifying pornographic websites is relatively low. Among them, the recall rate is an index to evaluate the ability of the model, that is, the proportion of the number of correctly predicted results of the model in the total number of data in this category.

[0032] 2. Website image detection method: By constructing an image model to detect the pictures in the website to identify whether the website is a pornographic website. In the application process, only detecting through the form of pictures cannot comprehensively detect pornographic websites. At present, there are a large number of websites on the Internet that spread pornographic information through pornographic novels, or websites with a large number of normal network pictures mixed with pornographic pictures. The accuracy rate detected by this method is not high and the detection efficiency also needs to be improved.

[0033] 3. Text classification method based on deep learning: The current mainstream text classification method based on deep learning mainly uses the Textcnn deep learning algorithm to identify the text of pornographic websites. However, pornographic websites are usually mixed in normal websites such as news websites, company official websites, search engine websites and other general text information. This method has a relatively high false alarm rate for pornographic websites.

[0034] To address the above challenges, the present invention proposes a method for detecting pornographic websites based on a multi-modal fusion model. Here, a modality refers to the way in which something occurs or exists, and each source or form of information can be referred to as a modality. Multi-modal refers to the combination of various forms of two or more modalities. The present invention obtains multi-modal fusion through the fusion of text information (also known as the characteristics of the website to be identified) and image information (also known as the image of the website to be identified), and identifies pornographic websites based on the multi-modal fusion.

[0035] In the present invention, two types of modal data, namely the website feature and the website image feature of the training website, are extracted and two types of models, namely the text model and the image model, are trained respectively. Then, using the idea of an integrated model, the data to be identified is input into the text model and the image model successively to obtain the detection result. Among them, the core of the text model is to extract the text features and input them into a machine learning model. The core of the image model is to input the website screenshot into a deep learning model. The former model has a small size, a fast detection rate and a high accuracy, while the latter improves the recall rate of pornographic website detection. This invention helps to identify pornographic websites better and more comprehensively.

[0036] The present invention will illustrate the process of the pornographic website identification method in conjunction with the following embodiments.

[0037] Figure 1 is one of the schematic flowcharts of the pornographic website identification method provided by the present invention.

[0038] In an exemplary embodiment of the present invention, as Figure 1 shown, the pornographic website identification method may include step 110 and step 120, and each step will be introduced separately below.

[0039] In step 110, the website to be identified is obtained, and the characteristics of the website to be identified and the image of the website to be identified are obtained based on the website to be identified.

[0040] In one embodiment, the website to be identified can be obtained. And based on the website to be identified, multi-dimensional characteristics about the website to be identified are obtained, for example, the characteristics of the website to be identified and the image of the website to be identified. Among them, the characteristics of the website to be identified may include the characteristics of the URL (Uniform Resource Locator) of the website to be identified and the content characteristics of the website to be identified. Further, based on the characteristics of the website to be identified and the image of the website to be identified, the website to be identified is identified as a pornographic website.

[0041] In step 120, based on the website features to be recognized and the website images to be recognized, a pornographic website recognition is performed on the website to be recognized through a text model and an image model. Among them, the text model is trained through website feature training data, and the image model is trained through website image training data.

[0042] In one embodiment, a pornographic website recognition can be performed on the website to be recognized based on the website features to be recognized and the website images to be recognized through a text model and an image model.

[0043] In one embodiment, pornographic websites and normal websites (for example, website data ranked among the top 50,000 in domestic visits) can be selected as training data, and the training data is labeled. In an example, training data regarding website features can be extracted from the training data, and the text model is trained based on the website feature training data. Among them, the website feature training data can include website URL feature training data and website content feature training data. In another example, training data regarding website images can also be extracted from the training data, and the image model is trained based on the website image training data.

[0044] The pornographic website recognition method provided by the present invention determines multi-modal features regarding the website to be recognized based on the website features to be recognized and the website images to be recognized, and based on the multi-modal features, a pornographic website recognition is performed on the website to be recognized through a pre-trained text model and image model. Through this method, the accuracy of pornographic website detection can be improved, the situations of false positives and false negatives can be reduced, which helps to comprehensively recognize pornographic websites.

[0045] The present invention will describe the training process of the text model based on the website URL feature training data and the website content feature training data in combination with the following embodiments.

[0046] In one embodiment, as Figure 2 shown, the training process of the text model may include step 210 to step 270, and each step will be introduced separately below.

[0047] In step 210, website feature training data is extracted.

[0048] In step 220, website URL feature training data is extracted.

[0049] In step 230, website content feature training data is extracted.

[0050] In one embodiment, pornographic websites and normal websites (e.g., website data of the top 50,000 visited websites in China) can be selected as training data and labeled. Further, website feature training data can be extracted. Among them, the website feature training data can include website URL feature training data and website content feature training data.

[0051] In one example, the URL link data contained in the source code of pornographic websites and normal websites can be counted, and the URL link data contained in the source code of the website can be used as the website URL feature training data. It can be understood that for pornographic websites, the URL link data contained in their source code is more, and much larger than the URL link data contained in the source code of normal websites. In the application process, the URL link data contained in the source code of the website can be used as a criterion for judging whether the website is a pornographic website.

[0052] In another example, the top-level domain name in the URL of the website used as training data can be extracted, and the number of requests to access this domain name can be counted. In the application process, the total number of requests for the website's top-level domain name can be used as the website URL feature training data. It can be understood that for pornographic websites, the number of requests to access their top-level domain names is more, and much larger than the number of requests to access the top-level domain names of normal websites. In the application process, the total number of requests for the website's top-level domain name can be used as a criterion for judging whether the website is a pornographic website.

[0053] In yet another example, the sub-domain name in the URL of the website used as training data can be extracted, and the number of requests to access this sub-domain name can be counted. In the application process, the total number of requests for the website's sub-domain name can be used as the website URL feature training data. It can be understood that for pornographic websites, the number of requests to access their sub-domain names is more, and much larger than the number of requests to access the sub-domain names of normal websites. In the application process, the total number of requests for the website's sub-domain name can be used as a criterion for judging whether the website is a pornographic website.

[0054] In yet another example, the top-level domain name in the URL of the website used as training data can be extracted, and the number of IP (Internet Protocol) addresses accessing this top-level domain name can be counted. In the application process, the number of IP addresses accessing the website's top-level domain name can be used as the website URL feature training data. It can be understood that for pornographic websites, the number of IP addresses accessing their website's top-level domain names is more, and much larger than the number of IP addresses accessing the website's top-level domain names of normal websites. In the application process, the number of IP addresses accessing the website's top-level domain name can be used as a criterion for judging whether the website is a pornographic website.

[0055] In yet another example, the sub - domain name in the URL of a website used as training data can be extracted, and the number of IPs accessing this sub - domain name can be counted. During the application process, the number of IPs accessing the sub - domain name of a website can be used as training data for website URL features. It can be understood that for pornographic websites, the number of IPs accessing their website sub - domain names is relatively large, and is much greater than the number of IPs accessing the website sub - domain names of normal websites. During the application process, based on the number of IPs accessing the sub - domain name of a website, it can be used as a criterion for judging whether the website is a pornographic website.

[0056] In yet another example, the full - domain name in the URL of a website used as training data can be extracted, and the access duration of accessing this full - domain name can be counted. During the application process, the access duration of accessing the full - domain name of a website can be used as training data for website URL features. It can be understood that for pornographic websites, the access duration of accessing their website full - domain names is relatively long, and is much greater than the access duration of accessing the website full - domain names of normal websites. During the application process, based on the access duration of accessing the full - domain name of a website, it can be used as a criterion for judging whether the website is a pornographic website.

[0057] In yet another example, the full - domain name in the URL of a website used as training data can be extracted, and features such as the registration expiration date, the number of domain name servers, and the domain name service provider of this domain name can be extracted through whois domain name resolution results, and the aforementioned features can be used as training data for website URL features. It can be understood that for the full - domain name in the URL of a pornographic website, the features such as its corresponding domain name registration expiration date, the number of domain name servers, and the domain name service provider are different from those of normal websites. In one example, the registration expiration date of the domain name of a pornographic website is significantly shorter than that of the domain name of a normal website. In another example, the number of domain name servers of the domain name of a pornographic website is significantly more than that of the domain name of a normal website. In yet another example, the domain name service provider of a pornographic website is significantly different from that of a normal website. During the application process, based on features such as the domain name registration expiration date, the number of domain name servers, and the domain name service provider, it can be used as a criterion for judging whether a website is a pornographic website.

[0058] In another example, the domain name in the URL of a website that serves as training data can be extracted, and the number of levels of the domain name can be calculated. During the application process, the top-level domain name of the domain name can be found first, and then the number of elements obtained by splitting the remaining characters after removing the top-level domain name string with "." can be determined. It can be understood that the number of elements after splitting is the number of levels of the domain name. Further, the number of levels of the domain name can be used as training data for the website URL features. It can be understood that for pornographic websites, the number of levels of their website domain names is relatively high and much higher than that of normal websites. During the application process, based on the number of levels of the website domain name, it can be used as a criterion for judging whether the website is a pornographic website.

[0059] In another example, the domain name in the URL of a website that serves as training data can be extracted, and the number of digits, special characters ("*", "#", "-", etc.), and letters contained in the domain name string can be calculated. And the number of digits, special characters, and letters contained in the domain name string can be used as training data for the website URL features. It can be understood that for pornographic websites, the number of digits, special characters, and letters contained in their website domain name strings is relatively large and much larger than that of normal websites. During the application process, based on the number of digits, special characters, and letters contained in the website domain name string, it can be used as a criterion for judging whether the website is a pornographic website.

[0060] It should be noted that the training data for website URL features can be one or a combination of the above examples. In this embodiment, no specific limitation is imposed on the training data for website URL features.

[0061] In one embodiment, the website feature training data may include the website URL feature training data. Among them, the website URL feature training data may include the number of links to the domain name corresponding to the website URL, the number of domain name requests, the number of IP accesses, the domain name access duration, and the number of domain name levels. Among them, the text model can be trained in the following way: based on one or more of the number of links to the domain name, the number of domain name requests, the number of IP accesses, the domain name access duration, and the number of domain name levels, the text model is trained.

[0062] In one embodiment, Chinese characters are extracted from pornographic data in all training data. During the application process, the jieba word segmentation tool can be used to segment the extracted Chinese characters and remove stop words, and then the word frequency of each word after segmentation is counted, that is, the number of times each word appears. For example, the number of times explicit pornographic keywords such as sexual intercourse, av, and temptation appear. Then, the word frequencies after each segmentation are sorted from high to low, and the top 500 words with the highest word frequencies are selected as the pornographic keyword list. In the present invention, the website content features can be the features statistically based on this keyword list.

[0063] It can be understood that the website content feature training data can be determined based on the pornographic keyword list.

[0064] The process of determining the website content feature training data will be described below in conjunction with the following examples.

[0065] It can be understood that for pornographic websites, there are often special characters in the website content, and there are many pornographic words after the special characters.

[0066] In one example, it can be determined that the source code of the website used as training data contains " <title>” field and extract the text parts in the two "< / title> <title>”. Count the number of words in the text that contain the words in the pornographic keyword list, and use the number of pornographic words in the text of the two "< / title> <title>” as the training data for the website content features. During the application process, according to the special characters in the website content "< / title> <title>” followed by the number of pornographic words, as a criterion for judging whether the website is a pornographic website. < / title>

[0067] In another example, it can be determined that the source code of the website used as training data contains the "<meta name=description" field, and the text part in the content after it is extracted. The number of words in the text that contain the words in the pornographic keyword list is counted, and the number of pornographic words is used as the website content feature training data. During the application process, according to the number of pornographic words contained after the special character " <meta name=description> " in the website content, it can be used as a criterion for judging whether the website is a pornographic website.

[0068] In yet another example, it can be determined that the source code of the website used as training data contains the "<meta name=keywords" field. And the text part in the content after it is extracted, the number of words in the text that contain the words in the pornographic keyword list is counted, and the number of pornographic words is used as the website content feature training data. During the application process, according to the number of pornographic words contained after the special character "<meta name=keywords" in the website content, it can be used as a criterion for judging whether the website is a pornographic website.

[0069] In yet another example, it can be determined that the source code of the website used as training data contains " ” field. And extract the text part between the two "”. Count the number of words in the text that contain the words in the pornographic keyword list, and use the number of pornographic words as the training data for the website content features. During the application process, according to the two special characters in the website content " The number of pornographic words contained between "” is used as a criterion for judging whether the website is a pornographic website.

[0070] In another example, the "” field contained in the source code of the website that is used as training data can be determined. And the text part between two "” is extracted, the number of words in the text that contain the words in the pornographic keyword list is counted, and the number of pornographic words is used as the training data of the website content feature. During the application process, the number of pornographic words contained between the two special characters "” in the website content can be used as a criterion for judging whether the website is a pornographic website.

[0071] It should be noted that the training data of the website content feature can be one or a combination of the above examples. In one example, the above-mentioned all statistical quantities can be added to obtain the training data of the website content feature regarding the web page. In this embodiment, no specific limitation is imposed on the training data of the website content feature.

[0072] In one embodiment, the website feature training data may include the training data of the website content feature. The training data of the website content feature may include the number of Chinese sensitive words after the preset character. Among them, the text model can be trained in the following way: based on the number of Chinese sensitive words after the preset character, the text model is trained. Among them, the preset character can be determined according to the actual situation. For example, it can be the " <title>”、"< / title> <meta name=description> ” or " Such as "or", etc. In this embodiment, no specific limitation is imposed on the preset characters.

[0073] In step 240, preprocess the website URL feature training data.

[0074] In step 250, preprocess the website content feature training data.

[0075] In step 260, obtain the random forest text model.

[0076] In step 270, store the random forest text model in the form of a PKL file.

[0077] In one embodiment, the website URL feature training data and the website content feature training data can be preprocessed separately. And based on the preprocessed website URL feature training data and website content feature training data, obtain the random forest text model. It can be understood that the random forest text model is the text model of the present invention. In one example, the random forest text model can be stored in the form of a PKL file. Storing the random forest text model in the form of a PKL file can facilitate the identification processing of the random forest text model. It should be noted that the text model is a random forest model in machine learning algorithms, which has good processing ability in high-dimensional features, high running efficiency, and high recognition accuracy.

[0078] In one example, the missing value preprocessing can be performed on the website URL feature training data and the website content feature training data. Through the missing value preprocessing, the missing values in the website URL feature training data and the website content feature training data can be filled to ensure the comprehensiveness and integrity of the training data. In another example, the normalization preprocessing can be performed on the website URL feature training data and the website content feature training data. In the application process, through the normalization formula, the website URL feature training data and the website content feature training data are normalized to avoid the influence of too large or too small training data on the accuracy of the training model. In yet another example, the one-hot encoding preprocessing can be performed on the website URL feature training data and the website content feature training data. Through the one-hot encoding preprocessing, the website URL feature training data and the website content feature training data can be converted into numerical values of 0 or 1 to reduce the complexity of data processing.

[0079] In one embodiment, the image model can be trained in the following manner. During the process of extracting website image training data, screenshots of pornographic websites and normal websites can be extracted, and the screenshots can be cut into four pictures of the same size. Then, the cut pornographic website screenshots are cleaned, and the pictures without obvious pornographic images are removed. During the preprocessing of website image training data, the above-mentioned cut pictures can be converted into pictures with a size of 64mm * 64mm. During the process of training the image model, the above-mentioned processed pornographic website and normal website pictures can be input into the Resnet50 model for model training, parameter tuning, and model evaluation, and finally a solidified image model is output.

[0080] The present invention will describe the process of identifying a pornographic website for a website to be identified in conjunction with the following embodiments.

[0081] Figure 3 It is one of the flow charts of the present invention for identifying a pornographic website for a website to be identified based on the characteristics of the website to be identified and the image of the website to be identified through a text model and an image model.

[0082] In an exemplary embodiment of the present invention, as Figure 3 shown, based on the characteristics of the website to be identified and the image of the website to be identified, identifying a pornographic website for the website to be identified through a text model and an image model may include step 310 and step 320, and each step will be introduced separately below.

[0083] In step 310, the characteristics of the website to be identified are input into the text model to obtain a first output result regarding the characteristics of the website to be identified.

[0084] In step 320, based on the first output result and the second output result of the image of the website to be identified regarding the image model, a pornographic website is identified for the website to be identified.

[0085] In one embodiment, the characteristics of the website to be identified can be input into a pre-trained text model to obtain a first output result regarding the characteristics of the website to be identified. Further, based on the first output result and the second data result of the image of the website to be identified regarding the image model, a pornographic website is identified for the website to be identified. In this embodiment, by adopting a multi-modal model (text model and image model) for serial detection, the detection efficiency can be improved, and the accuracy and recall rate of pornographic website detection can also be enhanced, and finally a more comprehensive and accurate identification effect can be obtained.

[0086] To further introduce the pornographic website recognition method provided by the present invention, the process of recognizing a website to be recognized as a pornographic website based on the first output result and the second output result of the website image to be recognized with respect to the image model will be described below in conjunction with the following embodiments.

[0087] In an exemplary embodiment of the present invention, based on the first output result and the second output result of the website image to be recognized with respect to the image model, the recognition of a website to be recognized as a pornographic website can be achieved in the following manner: If the first output result is that the website to be recognized is a pornographic website, then the first output result is used as the recognition result of the website to be recognized; if the first output result is that the website to be recognized is not a pornographic website, then the website image to be recognized is input into the image model to obtain the second output result, and the second output result is used as the website to be recognized.

[0088] In one embodiment, if the first output result regarding the features of the website to be recognized is that the website to be recognized is a pornographic website, then the first output result is used as the recognition result of the website to be recognized. It can be understood that the recognition result is that the website to be recognized is a pornographic website. If the first output result regarding the features of the website to be recognized is that the website to be recognized is not a pornographic website, in order to avoid false alarms, the website image to be recognized will also be input into the image model to obtain the second output result, and the second output result is used as the recognition result of the website to be recognized. In an example, if it is detected based on the second output result that the website image to be recognized is a pornographic image, then the website to be recognized is a pornographic website. If it is detected based on the second output result that the website image to be recognized is not a pornographic image, then the website to be recognized is not a pornographic website. In this embodiment, by extracting two types of modal data, namely website features and website image features of the training websites, and training two types of models, namely a text model and an image model respectively. Then, adopting the idea of an integrated model, the data to be recognized is input into the text model and the image model successively to obtain the detection result. Among them, the core of the text model is to extract text features and input them into a machine learning model. The core of the image model is to input the website screenshot into a deep learning model. The former model has a smaller volume, a faster detection rate and a higher accuracy, while the latter improves the recall rate of detecting pornographic websites. This invention helps to better and more comprehensively recognize pornographic websites.

[0089] In an exemplary embodiment of the present invention, before inputting the features of the website to be recognized into the text model, the pornographic website recognition method may further include preprocessing the features of the website to be recognized, and using the preprocessed features of the website to be recognized as the final features of the website to be recognized input into the text model. Among them, the preprocessing may include one or more of missing value processing, normalization processing, and one-hot encoding processing.

[0090] In one example, missing value preprocessing can be performed on the website features to be recognized. Through missing value preprocessing, the missing values in the website features to be recognized can be filled to ensure the comprehensiveness and integrity of the training data. In another example, normalization preprocessing can be performed on the website features to be recognized. During application, normalization processing of the website features to be recognized through the normalization formula can avoid the influence of data that is too large or too small on the accuracy of the recognition result. In yet another example, one-hot encoding preprocessing can be performed on the website features to be recognized. Through one-hot encoding preprocessing, the website features to be recognized can be converted into numerical values of 0 or 1 to reduce the complexity of data processing.

[0091] In an exemplary embodiment of the present invention, before identifying a pornographic website based on the first output result and the second output result of the website image to be recognized with respect to the image model, the pornographic website recognition method may further include performing image segmentation processing on the website image to be recognized to obtain multiple segmented website images, and using the multiple segmented website images as the website images that are finally input into the image model, and determining the second output result based on the output results of the multiple segmented website images with respect to the image model.

[0092] In one embodiment, the website screenshot of the website to be recognized can be extracted, for example, the website image to be recognized. Each website image to be recognized of each website to be recognized can be cut into four pictures of the same size, and the cut pictures can be placed in a folder named with the website URL. Then all the pictures are converted into pictures with a size of 64mm * 64mm and input into the fixed image model. If 50% of the four segmented pictures of a certain website image to be recognized are predicted as pornographic pictures, the website to be recognized corresponding to the website image to be recognized is determined as a pornographic website. In this embodiment, determining whether the website image to be recognized is a pornographic picture based on multiple segmented images of the website image to be recognized can improve the accuracy of picture recognition, and thus improve the accuracy of website recognition.

[0093] The present invention will describe the process of determining the website features to be recognized in conjunction with the following embodiments.

[0094] Figure 4 is one of the schematic flowcharts of determining the website features to be recognized provided by the present invention.

[0095] In an exemplary embodiment of the present invention, the website features to be recognized may include the website URL features of the website to be recognized. As Figure 4 shown, determining the website features to be recognized may include step 410 and step 420, which will be introduced separately below.

[0096] In step 410, determine the website URL of the website to be recognized, obtain the domain name of the website to be recognized based on the website URL, and count the number of links, request times, IP access times, access duration, domain name features, domain name levels, and the number of special characters of the domain name regarding the domain name.

[0097] In step 420, determine the website URL feature of the website to be recognized based on one or more of the number of links, request times, IP access times, access duration, domain name features, domain name levels, and the number of special characters of the domain name.

[0098] In one example, it is possible to count the URL link data contained in the source code of the website to be recognized, and use the URL link data contained in the source code of the website as the website URL feature to be recognized.

[0099] In another example, it is possible to extract the fully qualified domain name in the website URL of the website to be recognized, and count the number of requests to access this domain name. During the application process, the total number of requests regarding the website's fully qualified domain name can be used as the website URL feature to be recognized.

[0100] In yet another example, it is possible to extract the subdomain name in the website URL of the website to be recognized, and count the number of requests to access this subdomain name. During the application process, the total number of requests regarding the website's sub-fully qualified domain name can be used as the website URL feature to be recognized.

[0101] In yet another example, it is possible to extract the fully qualified domain name in the website URL of the website to be recognized, and count the number of IPs accessing this fully qualified domain name. During the application process, the number of IPs accessing the website's fully qualified domain name can be used as the website URL feature to be recognized.

[0102] In yet another example, it is possible to extract the subdomain name in the website URL of the website to be recognized, and count the number of IPs accessing this subdomain name. During the application process, the number of IPs accessing the website's subdomain name can be used as the website URL feature to be recognized.

[0103] In yet another example, it is possible to extract the fully qualified domain name in the website URL of the website to be recognized, and count the access duration of accessing this fully qualified domain name. During the application process, the access duration of accessing the website's fully qualified domain name can be used as the website URL feature to be recognized.

[0104] In yet another example, it is possible to extract the fully qualified domain name in the website URL of the website to be recognized, and extract features such as the registration expiration date, the number of domain name servers, and the domain name service provider regarding this domain name through the whois domain name resolution result, and use the foregoing features as the website URL feature to be recognized.

[0105] In yet another example, the domain name in the website URL of the website to be recognized can be extracted, and the level number of the domain name can be calculated. During the application process, the top-level domain name of the domain name can be found first, and then the number of elements obtained by splitting the remaining characters after removing the top-level domain name string with "." can be determined. It can be understood that the number of elements after splitting is the level number of the domain name. Further, the level number of the domain name can be used as the feature of the website URL to be recognized.

[0106] In yet another example, the domain name in the website URL of the website to be recognized can be extracted, and the number of digits, special characters ("*", "#", "-", etc.), and letters contained in the domain name string can be calculated. And the number of digits, special characters, and letters contained in the domain name string can be used as the feature of the website URL to be recognized.

[0107] It should be noted that the feature of the website URL to be recognized can be one or a combination of the above examples. In this embodiment, the feature of the website URL to be recognized is not specifically limited.

[0108] The present invention will describe the process of determining the feature of the website to be recognized in conjunction with the following embodiments.

[0109] Figure 5 is the second schematic flow chart of determining the feature of the website to be recognized provided by the present invention.

[0110] In an exemplary embodiment of the present invention, the feature of the website to be recognized may include the feature of the content of the website to be recognized. As Figure 5 shown, determining the feature of the website to be recognized may include step 510 and step 520, and each step will be introduced separately below.

[0111] In step 510, determine the number of Chinese sensitive words after the preset characters in the web page of the website to be recognized, where the Chinese sensitive words are determined based on the pornographic keyword list.

[0112] In step 520, based on the number of Chinese sensitive words, determine the feature of the content of the website to be recognized.

[0113] It should be noted that the preset characters can be determined according to the actual situation. In this embodiment, the preset characters are not specifically limited.

[0114] In one embodiment, pornographic data in all training data can be used to extract Chinese characters on the website. During the application process, the jieba word segmentation tool can be used to segment the extracted Chinese characters and remove stop words. Then, the word frequency of each word after segmentation is counted, that is, the number of times each word appears. For example, the number of times explicit pornographic keywords such as sexual intercourse, av, and temptation appear. Then, the word frequencies after each segmentation are sorted from high to low, and the top 500 words with the highest word frequencies are selected as the pornographic keyword list. In the present invention, the website content features can be features statistically based on this word list.

[0115] It can be understood that the website content features to be recognized can be determined based on the pornographic keyword list.

[0116] The process of determining the website content features to be recognized will be described below in conjunction with the following examples.

[0117] In one example, combined with Figure 6 it can be determined that the website source code of the website to be recognized contains " <title>” field and extract the text parts in the two "< / title> <title>”. Count the number of words in the text that contain the words in the pornographic keyword list, and use the number of pornographic words in the text of the two "< / title> <title>” as the content features of the website to be recognized. < / title>

[0118] In another example, it can be determined that the website source code of the website to be recognized contains the "<meta name=description" field, and the text part in the content after it is extracted. The number of words in the text that contain the words in the pornographic keyword list is counted, and the number of pornographic words is used as the website content feature to be recognized.

[0119] In yet another example, it can be determined that the website source code of the website to be recognized contains the "<meta name=keywords" field, and the text part in the content after it is extracted. The number of words in the text that contain the words in the pornographic keyword list is counted, and the number of pornographic words is used as the website content feature to be recognized.

[0120] In yet another example, it can be determined that the website source code of the website to be recognized contains " ” field and extract the two " The text part between the quotes. Count the number of words in the text that are in the pornographic keyword list, and use the number of pornographic words as the feature of the website content to be recognized.

[0121] In another example, it is possible to determine the "” field contained in the website source code of the website to be recognized, and extract the text part between the two "”. Count the number of words in the text that are in the pornographic keyword list, and use the number of pornographic words as the feature of the website content to be recognized.

[0122] It should be noted that the features of the website content to be recognized can be one or a combination of the above examples. In one example, all the above statistical quantities can be added together to obtain the features of the website content to be recognized. In this embodiment, no specific limitation is imposed on the features of the website content to be recognized.

[0123] The pornographic website recognition method provided by the present invention can comprehensively extract the features of pornographic websites, extract the features of two modal information, and comprehensively extract the distinguishing features between pornographic websites and normal websites from aspects such as the URL features, website content features, and website image features of the website. Compared with the previous single keyword extraction, text model, and image model methods, the pornographic website recognition method provided by the present invention covers more comprehensive features and can better reflect the details of pornographic websites, thus facilitating the training and testing of machine learning models. It can be understood that the model constructed using this method has a high accuracy rate and recall rate, and finally a more comprehensive and accurate recognition effect can be obtained.

[0124] In order to further introduce the pornographic website recognition method provided by the present invention, the following will be described in conjunction with the following embodiments.

[0125] Figure 7 It is the second flow diagram of the pornographic website recognition method provided by the present invention.

[0126] In an exemplary embodiment of the present invention, as Figure 7 shown, the pornographic website recognition method may include steps 7010 to 7150, and each step will be introduced separately below.

[0127] In step 7010, obtain website feature training data.

[0128] In step 7020, based on the website feature training data, perform text model training.

[0129] In step 7030, output the text model.

[0130] In one embodiment, pornographic websites and normal websites (e.g., website data of the top 50,000 visited websites in China) can be selected as training data, and the training data can be labeled. In one example, training data regarding website features can be extracted from the training data, and a text model can be trained based on the training data of website features. Among them, the training data of website features can include training data of website URL features and training data of website content features.

[0131] In step 7040, website image training data is obtained.

[0132] In step 7050, an image model is trained based on the website image training data.

[0133] In step 7060, the image model is output.

[0134] In one embodiment, training data regarding website images can be extracted from the training data, and an image model can be trained based on the training data of website images.

[0135] In one embodiment, the image model can be trained in the following manner. During the process of extracting website image training data, screenshots of pornographic websites and normal websites can be extracted, and the screenshots can be cut into four pictures of the same size. Then, the cut screenshots of pornographic websites are cleaned, and the pictures without obvious pornographic images are removed. During the process of preprocessing the website image training data, the above-mentioned cut pictures can be converted into pictures with a size of 64mm * 64mm. During the process of training the image model, the above-mentioned processed pictures of pornographic websites and normal websites can be input into the Resnet50 model for model training, parameter tuning, and model evaluation, and finally a solidified image model is output.

[0136] In step 7070, website features to be recognized are obtained.

[0137] In step 7080, the website features to be recognized are input into the text model to obtain a first output result.

[0138] In step 7090, it is determined whether the first output result is a pornographic website.

[0139] In step 7100, if the first output result is a pornographic website, it is determined that the website to be recognized is a pornographic website.

[0140] In step 7110, if the first output result is not a pornographic website, the website image to be recognized is obtained.

[0141] In step 7120, the website image to be recognized is input into the image model to obtain a second output result.

[0142] In step 7130, it is determined whether the second output result is a pornographic website.

[0143] In step 7140, if the second output result is a pornographic website, it is determined that the website to be recognized is a pornographic website.

[0144] In step 7150, if the second output result is not a pornographic website, it is determined that the website to be recognized is not a pornographic website.

[0145] In one embodiment, the features of the website to be recognized can be input into a pre-trained text model to obtain a first output result regarding the features of the website to be recognized. Further, based on the first output result and the second data result of the image of the website to be recognized regarding the image model, pornographic website recognition is performed on the website to be recognized. If the first output result is that the website to be recognized is a pornographic website, the first output result is used as the recognition result of the website to be recognized, that is, it is determined that the website to be recognized is a pornographic website. If the first output result is that the website to be recognized is not a pornographic website, the image of the website to be recognized is obtained, and the image of the website to be recognized is input into the image model to obtain a second output result, and the second output result is used as the recognition result of the website to be recognized. In one example, if the second output result is a pornographic website, it is determined that the website to be recognized is a pornographic website. In another example, if the second output result is not a pornographic website, it is determined that the website to be recognized is not a pornographic website. In this embodiment, by using a multi-modal model for serial detection, the detection efficiency can be improved, and the accuracy and recall rate of pornographic website detection can also be enhanced, and finally a more comprehensive and accurate recognition effect can be obtained.

[0146] According to the above description, it can be known that the pornographic website recognition method provided by the present invention determines the multi-modal features of the website to be recognized based on the features of the website to be recognized and the image of the website to be recognized, and based on the multi-modal features, pornographic website recognition is performed on the website to be recognized through a pre-trained text model and an image model. By this method, the accuracy of pornographic website detection can be improved, the situations of false alarms and missed detections can be reduced, and it is helpful to comprehensively recognize pornographic websites.

[0147] Based on the same concept, the present invention also provides a pornographic website recognition device.

[0148] The pornographic website recognition device provided by the present invention will be described below, and the device described below can be correspondingly referred to the pornographic website recognition method described above.

[0149] Figure 8 It is a schematic structural diagram of the pornographic website recognition device provided by the present invention.

[0150] In an exemplary embodiment of the present invention, as Figure 8 As shown, the pornographic website recognition device may include an acquisition module 810 and a processing module 820. Each module will be introduced separately below.

[0151] The acquisition module 810 may be configured to acquire the website to be recognized, and based on the website to be recognized, acquire the characteristics of the website to be recognized and the image of the website to be recognized.

[0152] The processing module 820 may be configured to, based on the characteristics of the website to be recognized and the image of the website to be recognized, recognize the website to be recognized as a pornographic website through a text model and an image model. Among them, the text model is trained through website feature training data, and the image model is trained through website image training data.

[0153] In an exemplary embodiment of the present invention, the processing module 820 may adopt the following method to recognize the website to be recognized as a pornographic website based on the characteristics of the website to be recognized and the image of the website to be recognized through a text model and an image model: input the characteristics of the website to be recognized into the text model to obtain a first output result regarding the characteristics of the website to be recognized; based on the first output result and the second output result of the image of the website to be recognized regarding the image model, recognize the website to be recognized as a pornographic website.

[0154] In an exemplary embodiment of the present invention, the processing module 820 may adopt the following method to recognize the website to be recognized as a pornographic website based on the first output result and the second output result of the image of the website to be recognized regarding the image model: if the first output result is that the website to be recognized is a pornographic website, then use the first output result as the recognition result of the website to be recognized; if the first output result is that the website to be recognized is not a pornographic website, then input the image of the website to be recognized into the image model to obtain a second output result, and use the second output result as the recognition result of the website to be recognized.

[0155] In an exemplary embodiment of the present invention, the processing module 820 may also be configured to preprocess the characteristics of the website to be recognized, and use the characteristics of the website to be recognized after preprocessing as the final characteristics of the website to be recognized input into the text model, where the preprocessing includes one or more of missing value processing, normalization processing, and one-hot encoding processing.

[0156] In an exemplary embodiment of the present invention, the processing module 820 may also be configured to perform image segmentation processing on the image of the website to be recognized to obtain multiple segmented website images, and use the multiple segmented website images as the final website images input into the image model, and determine the second output result based on the output results of the multiple segmented website images regarding the image model.

[0157] In an exemplary embodiment of the present invention, the website features to be recognized may include the website URL features of the website to be recognized. The acquisition module 810 may determine the website features to be recognized in the following manner: Determine the website URL of the website to be recognized, obtain the domain name of the website to be recognized based on the website URL, and count the number of links, request times, IP access times, access duration, domain name features, domain name levels, and the number of special characters of the domain name; Based on one or more of the number of links, request times, IP access times, access duration, domain name features, domain name levels, and the number of special characters of the domain name, determine the website URL features of the website to be recognized.

[0158] In an exemplary embodiment of the present invention, the website features to be recognized may include the website content features of the website to be recognized. The acquisition module 810 may determine the website features to be recognized in the following manner: Determine the number of Chinese sensitive words after the preset characters in the web page of the website to be recognized, where the Chinese sensitive words are determined based on the pornographic keyword list; Based on the number of Chinese sensitive words, determine the website content features of the website to be recognized.

[0159] In an exemplary embodiment of the present invention, the website feature training data may include website URL feature training data. The website URL feature training data may include the number of links of the domain name, the number of domain name requests, the number of IP accesses, the domain name access duration, and the domain name level. The processing module 820 may train the text model in the following manner: Based on one or more of the number of links of the domain name, the number of domain name requests, the number of IP accesses, the domain name access duration, and the domain name level, train the text model.

[0160] In an exemplary embodiment of the present invention, the website feature training data may include website content feature training data. The website content feature training data may include the number of Chinese sensitive words after the preset characters. The processing module 820 may train the text model in the following manner: Based on the number of Chinese sensitive words after the preset characters, train the text model. Figure 9 Illustrates a schematic diagram of the physical structure of an electronic device, such as Figure 9 As shown, the electronic device may include: a processor 910, a communications interface 920, a memory 930, and a communication bus 940. Among them, the processor 910, the communications interface 920, and the memory 930 communicate with each other through the communication bus 940. The processor 910 can call the logical instructions in the memory 930 to execute the pornographic website recognition method. The method includes: obtaining the website to be recognized, and based on the website to be recognized, obtaining the features of the website to be recognized and the image of the website to be recognized; based on the features of the website to be recognized and the image of the website to be recognized, using a text model and an image model to perform pornographic website recognition on the website to be recognized, where the text model is trained with website feature training data, and the image model is trained with website image training data.

[0161] In addition, when the logical instructions in the above-mentioned memory 930 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0162] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the pornographic website recognition method provided by the above-mentioned various methods. The method includes: obtaining the website to be recognized, and based on the website to be recognized, obtaining the features of the website to be recognized and the image of the website to be recognized; based on the features of the website to be recognized and the image of the website to be recognized, using a text model and an image model to perform pornographic website recognition on the website to be recognized, where the text model is trained with website feature training data, and the image model is trained with website image training data.

[0163] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the pornographic website recognition method provided by the above-mentioned various methods. The method includes: obtaining a website to be recognized, and based on the website to be recognized, obtaining the characteristics of the website to be recognized and the image of the website to be recognized; based on the characteristics of the website to be recognized and the image of the website to be recognized, through a text model and an image model, performing pornographic website recognition on the website to be recognized, wherein the text model is trained by website feature training data, and the image model is trained by website image training data.

[0164] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative work.

[0165] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying pornographic websites, characterized in that, The method includes: Obtain the website to be recognized, and based on the website to be recognized, obtain the characteristics of the website to be recognized and the image of the website to be recognized; Based on the characteristics of the website to be recognized and the image of the website to be recognized, use a text model and an image model to identify whether the website to be recognized is a pornographic website. Among them, the text model is trained with website feature training data, and the image model is trained with website image training data. Among them, the website feature training data includes website URL feature training data and website content feature training data; among them, the website feature training data includes website URL feature training data, and the website URL feature training data includes the number of links of the domain name, the number of domain name requests, the number of IP accesses, the access duration of the domain name, and the domain name level. The text model is trained in the following way: Based on one or more of the number of links of the domain name, the number of domain name requests, the number of IP accesses, the access duration of the domain name, and the domain name level, train the text model; among them, The step of using a text model and an image model to identify whether the website to be recognized is a pornographic website based on the characteristics of the website to be recognized and the image of the website to be recognized includes: Input the characteristics of the website to be recognized into the text model to obtain a first output result regarding the characteristics of the website to be recognized; Based on the first output result and the second output result of the image of the website to be recognized regarding the image model, identify whether the website to be recognized is a pornographic website. Among them, The step of using the first output result and the second output result of the image of the website to be recognized regarding the image model to identify whether the website to be recognized is a pornographic website includes: If the first output result is that the website to be recognized is a pornographic website, then use the first output result as the recognition result of the website to be recognized; If the first output result is that the website to be recognized is not a pornographic website, then input the image of the website to be recognized into the image model to obtain the second output result, and use the second output result as the recognition result of the website to be recognized.

2. The pornographic website identification method according to claim 1, wherein Before inputting the characteristics of the website to be recognized into the text model, the method further includes: Preprocess the characteristics of the website to be recognized, and use the preprocessed characteristics of the website to be recognized as the final characteristics of the website to be recognized input into the text model. Among them, the preprocessing includes one or more of missing value processing, normalization processing, and one-hot encoding processing.

3. The pornographic website recognition method according to claim 1, characterized in that, Before using the first output result and the second output result of the image of the website to be recognized regarding the image model to identify whether the website to be recognized is a pornographic website, the method further includes: Perform image segmentation on the image of the website to be recognized to obtain multiple segmented website images, and use the multiple segmented website images as the final website images input into the image model, and Based on the output results of the multiple segmented website images regarding the image model, determine the second output result.

4. The pornographic website recognition method according to claim 1, characterized in that, The website features to be recognized include the URL features of the website to be recognized, and the website features to be recognized are determined in the following manner: Determine the website URL of the website to be recognized, obtain the domain name of the website to be recognized based on the website URL, and count the number of links, the number of requests, the number of IP accesses, the access duration, the domain name features, the domain name level, and the number of special characters in the domain name with respect to the domain name; Based on one or more of the number of links, the number of requests, the number of IP accesses, the access duration, the domain name features, the domain name level, and the number of special characters in the domain name, determine the URL features of the website to be recognized.

5. The pornographic website identification method according to claim 1, characterized in that, The website features to be recognized include the content features of the website to be recognized, and the website features to be recognized are determined in the following manner: Determine the number of Chinese sensitive words after a preset character in the web page of the website to be recognized, where the Chinese sensitive words are determined based on a pornographic keyword list; Based on the number of Chinese sensitive words, determine the content features of the website to be recognized.

6. The pornographic website recognition method according to claim 1, characterized in that The website feature training data includes website content feature training data, and the website content feature training data includes the number of Chinese sensitive words after a preset character. The text model is trained in the following manner: Based on the number of Chinese sensitive words after the preset character, train the text model.

7. An apparatus for identifying pornographic websites, characterized in that, The device is used to implement the pornographic website recognition method according to any one of claims 1 to 6. The device includes: An acquisition module, configured to acquire a website to be recognized, and based on the website to be recognized, acquire website features to be recognized and an image of the website to be recognized; A processing module, configured to, based on the website features to be recognized and the image of the website to be recognized, perform pornographic website recognition on the website to be recognized through a text model and an image model, where the text model is trained through website feature training data, and the image model is trained through website image training data.

8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, the steps of the pornographic website recognition method according to any one of claims 1 to 6 are implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the pornographic website recognition method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the pornographic website recognition method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Website information identification method and device and electronic equipment

    CN110275958A