Website risk assessment method and device, electronic equipment and storage medium

Through joint training of multi-modal feature extraction and deep factorization machine models, a benchmark model is generated and website data is enhanced, which solves the problem of insufficient website risk assessment accuracy in the existing technology and improves the prediction accuracy and security protection capabilities of the model. .

CN118802203APending Publication Date: 2024-10-18CHINA MOBILE GROUP ZHEJIANG +2
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311209055.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing website risk assessment methods use single-modal features and artificial feature processing, resulting in insufficient model prediction accuracy and difficulty in coping with massive amounts of rapidly changing Internet information. They also lack the ability to intelligently mine and integrate features, which affects the accuracy of fraud risk assessment. sex.

Method used

Through multi-modal feature extraction, including URL, web page text and web page screenshot features, combined with the deep factorization machine model, feature extraction and joint training are performed to generate a benchmark model, and the website data is enhanced through inverse label sample selection to improve website risk probability assessment. Generalization performance of the model.

Benefits of technology

It improves the prediction accuracy and robustness of the website risk assessment model, enhances the security protection capabilities of the website to be evaluated, and improves the accuracy and actual business value of the website risk assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802203A_ABST
    Figure CN118802203A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and provides a website risk assessment method and device, electronic equipment and a storage medium, and the method comprises the steps: inputting an original feature of a to-be-assessed website into a website risk probability assessment model, and obtaining a website risk probability outputted by the model; wherein the website risk probability assessment model is obtained by training a reference model through third sample website data and a label thereof; the third sample website data comprises the second sample website data and enhanced website data; the enhanced website data is obtained by carrying out inverse label sample selection on the basis of the second sample website data through the reference model; the reference model is obtained by performing joint training based on the first sample feature and the second sample feature; the first sample feature is obtained by performing multi-modal feature extraction, and the second sample feature is obtained by performing feature extraction through a depth factorization machine model; and performing security protection on the website to be evaluated based on the website risk probability. According to the invention, the accuracy of website risk assessment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a website risk assessment method, device, electronic device and storage medium. Background Art

[0002] With the advent of the Internet age, when the Internet becomes a way of life for the people, various hidden risks follow, especially fraud based on malicious URLs, which affect a large number of people, cause great harm, and change quickly, bringing new challenges to network security governance.

[0003] In traditional URL risk identification, the main methods used are based on blacklists and heuristic rules, etc. These methods have high maintenance and iteration costs, and the low level of intelligence makes it difficult to cope with the massive and rapidly changing Internet information. Therefore, current advanced technical solutions often use machine learning or deep learning methods to detect, identify and evaluate massive URLs. For example: the original features of the URL training sample set are input into the machine learning or deep learning model for training after feature engineering. After the model training is completed, the predicted URL sample is input and feature engineering is performed in the same way. The model can output a fraud risk assessment score, and the fraud risk level can be subsequently determined according to the business rules of the public security. However, the above scheme only uses the structured features processed by feature engineering, and does not consider the fusion features, which leads to insufficient accuracy of model prediction, and ultimately leads to low accuracy in the current URL risk assessment. Summary of the invention

[0004] The embodiments of the present application provide a website risk assessment method, device, electronic device and storage medium to solve the problem of low accuracy in current website risk assessment.

[0005] In a first aspect, an embodiment of the present application provides a website risk assessment method, comprising:

[0006] Get the URL to be evaluated;

[0007] The original features of the URL to be evaluated are input into a URL risk probability assessment model to obtain the URL risk probability output by the URL risk probability assessment model; wherein the URL risk probability assessment model is obtained by training a benchmark model through third sample URL data and its labels; the third sample URL data includes second sample URL data and enhanced URL data; the enhanced URL data is obtained by inverse label sample selection based on the second sample URL data through the benchmark model; the benchmark model is obtained by joint training based on the first sample features and the second sample features; the first sample features are obtained by multimodal feature extraction based on the first sample URL data, and the second sample features are obtained by feature extraction based on the first sample URL data through a deep factor decomposition machine model;

[0008] The website to be evaluated is protected against security based on the risk probability of the website.

[0009] In one embodiment, the multimodal features include URL features, web page text features, and web page screenshot features;

[0010] The URL features and the webpage text features are extracted based on the first sample URL data through a TextCNN model;

[0011] The webpage screenshot features are extracted through the ResNet-101 model based on the first sample URL data.

[0012] In one embodiment, the webpage text features are extracted by the following steps:

[0013] Obtaining webpage text corresponding to the first sample URL data;

[0014] Performing data preprocessing on the webpage text to obtain preprocessed text;

[0015] Performing mask processing on the preprocessed text to obtain masked text;

[0016] The masked text is subjected to feature extraction through the TextCNN model to obtain web page text features.

[0017] In one embodiment, the second sample feature is determined by the following steps:

[0018] Obtaining external statistical information of the first sample URL data;

[0019] Encoding the external statistical information into a binary vector to obtain an encoding vector;

[0020] The encoding vector is subjected to feature extraction through a deep factor decomposition machine model to obtain a second sample feature.

[0021] In one embodiment, the benchmark model is obtained by jointly training a preset risk assessment model based on the first sample feature and the second sample feature; the specific expression of the preset risk assessment model is as follows:

[0022]

[0023] Among them, x represents feature information, and the feature information is obtained by concatenating the first sample feature and the second sample feature; y represents the label of the web page corresponding to the browsed URL; z represents the label of being deceived; pFrR represents the risk probability score of the user being deceived after browsing the web page corresponding to the URL; p(y=1|x) represents the risk probability score of the user browsing the web page corresponding to the URL; p(y=1,z=1|x) represents the risk probability score of the user browsing the web page corresponding to the URL and being deceived.

[0024] In one embodiment, the enhanced URL data is determined by the following steps:

[0025] Performing mask processing on the second sample URL data to obtain mask data;

[0026] generating fourth sample URL data based on the mask data;

[0027] The fourth sample URL data is subjected to inverse label sample selection through the benchmark model, and enhanced URL data is determined based on the URL data obtained through inverse label sample selection.

[0028] In one embodiment, the performing security protection on the to-be-evaluated website based on the website risk probability includes:

[0029] Determining the risk level of the website to be evaluated according to the risk probability of the website;

[0030] A target security protection solution for the website to be evaluated is determined and executed based on the risk level.

[0031] In a second aspect, an embodiment of the present application provides a website risk assessment device, comprising:

[0032] The acquisition module is used to obtain the URL to be evaluated;

[0033] An input module is used to input the original features of the URL to be evaluated into a URL risk probability assessment model to obtain the URL risk probability output by the URL risk probability assessment model; wherein the URL risk probability assessment model is obtained by training a benchmark model through third sample URL data and its labels; the third sample URL data includes second sample URL data and enhanced URL data; the enhanced URL data is obtained by selecting samples based on the inverse label of the second sample URL data by the benchmark model; the benchmark model is obtained by joint training based on the first sample feature and the second sample feature; the first sample feature is obtained by multimodal feature extraction based on the first sample URL data, and the second sample feature is obtained by feature extraction based on the first sample URL data through a deep factor decomposition machine model;

[0034] A protection module is used to perform security protection on the website to be evaluated based on the risk probability of the website.

[0035] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory storing a computer program, wherein when the processor executes the program, the website risk assessment method described in the first aspect is implemented.

[0036] In a fourth aspect, an embodiment of the present application provides a storage medium, which is a computer-readable storage medium and includes a computer program. When the computer program is executed by a processor, the website risk assessment method described in the first aspect is implemented.

[0037] The website risk assessment method, device, electronic device and storage medium provided by the embodiment of the present application, extracts the first sample feature through multimodal features of the first sample website data, and extracts the second sample feature through the deep factor decomposition machine model based on the first sample website data, thereby obtaining a benchmark model through joint training based on the first sample feature and the second sample feature; further, the second sample website data can be subjected to inverse label sample selection through the benchmark model to obtain enhanced website data, and finally, the third sample website data including the enhanced website data and the second sample website data and their labels are used to train the benchmark model to obtain a website risk probability assessment model. The benchmark model obtained by training the multimodal features and the features extracted by the deep factor decomposition machine model is made to have high robustness, and the sample website is enhanced through the benchmark model, so that the generalization performance of the website risk probability assessment model obtained by training based on the enhanced website data and the second sample website data can be improved, thereby improving the prediction accuracy of the website risk probability assessment model, making it more accurate to predict the original features of the website to be evaluated through the website risk probability assessment model, and then accurately perform security protection on the website to be evaluated according to the predicted website risk probability, which can improve the accuracy of website risk assessment. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0039] Figure 1 It is a flowchart of a website risk assessment method provided in an embodiment of the present application;

[0040] Figure 2 This is an overall model architecture diagram of the website risk assessment method provided by the embodiment of the present application;

[0041] Figure 3 It is a DeepFM model architecture diagram of the website risk assessment method provided in the embodiment of the present application;

[0042] Figure 4 It is a functional module diagram of an embodiment of a website risk assessment device of the present application;

[0043] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiments of the present application. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, in the absence of mutual contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of this application.

[0045] In traditional URL risk identification, the methods used are based on blacklists and heuristic rules. These methods have high maintenance and iteration costs, and their low intelligence level makes it difficult to cope with the massive and rapidly changing Internet information.

[0046] Current advanced technical solutions often use machine learning or deep learning methods to detect, identify and evaluate massive URLs. The specific solution is: the original features of the URL training sample set (including Uniform Resource Locator (URL) lexical, statistical features, external information, etc.) are input into the machine learning or deep learning model for training after feature engineering. After the model training is completed, the predicted URL sample is input and feature engineering is performed in the same way. The model can then output a fraud risk assessment score, and the fraud risk level can be subsequently determined according to the business rules of the public security.

[0047] However, this solution only uses structured features after feature engineering. It has the following disadvantages:

[0048] (1) This method only uses single-modal data features and has no ability to combine multimodal information, so the accuracy of website risk assessment is not high.

[0049] (2) The algorithm has many idealized assumptions and constraints. The accuracy and robustness of the model are highly dependent on the level of manual feature processing and lack the ability to intelligently mine and integrate features.

[0050] (3) The level of intelligent support for downstream public security investigation tasks is not high.

[0051] (4) Most deep learning solutions are limited to using multiple heterogeneous neural networks to extract features of multiple modalities separately, without considering the fusion of statistical features. The uniformity of the feature space needs to be manually designed according to the task.

[0052] (5) Although it has a strong ability to characterize high-order features, it ignores the memory ability of low-order features. In the field of URL fraud risk assessment, it is difficult to adapt to the real-time scenarios of massive URLs.

[0053] (6) It is difficult to take into account the sparsity of some modal feature spaces, which affects the model performance.

[0054] (7) Compared with single-modality, multi-modal representation learning has not been widely and deeply studied, and there are few application scenarios.

[0055] Moreover, the common essential problem of the above schemes is that the training sample space is inconsistent with the actual sample space. This is because the URL being judged as a fraudulent URL does not mean a high risk for the user. From the user browsing the URL to the user being defrauded is a chain behavior. Traditional schemes often assess the risk of the content of the URL itself. However, in actual business, there are other factors that may lead to the user being deceived after browsing the URL. In fact, the risk assessment is conducted on the URL samples of the entire sample space, rather than the sample set of the browsed URLs, which results in a decrease in the generalization of the model, and then a significant decrease in online business results and actual business value.

[0056] Based on the above problems, the present application example provides a website risk assessment method, device, electronic device and storage medium.

[0057] The website risk assessment method, device, electronic device and storage medium provided by the present invention are described in detail below in conjunction with the embodiments.

[0058] Figure 1 A flowchart of a website risk assessment method provided in an embodiment of the present application. Figure 1 , the embodiment of the present application provides a website risk assessment method, which may include:

[0059] Step 100, obtaining the website to be evaluated;

[0060] It should be noted that the executor of the URL risk assessment method provided in the embodiment of the present application can be a computer device, such as a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc.

[0061] The computer device of the present application may be provided with a URL fraud risk assessment system, which may include at least components such as a multi-task joint module, a URL enhancement training module and a URL risk assessment module.

[0062] Among them, the multi-task joint module is used to conduct joint training of models to obtain a baseline model; the URL enhancement training module is used to perform data enhancement on sample URL data, and further train the baseline model through enhanced data and original data to obtain a URL risk probability assessment model; the URL risk assessment module is used to apply the URL risk probability assessment model to perform URL risk probability prediction.

[0063] In this application, URLs that have not been risk assessed can be obtained as URLs to be assessed.

[0064] Step 200, inputting the original features of the URL to be evaluated into the URL risk probability evaluation model to obtain the URL risk probability output by the URL risk probability evaluation model;

[0065] In the present application, the first sample URL data can be obtained in advance, wherein the first sample URL data can be specifically represented in the form of a URL. Further, multimodal feature extraction is performed based on the first sample URL data to obtain first sample features; wherein the first sample features can include multimodal features such as URL features, web page text features, and web page screenshot features.

[0066] And through the Deep Factorization Machine (DeepFM) model, feature extraction is performed based on the first sample URL data to obtain the second sample feature; the second sample feature can be an external statistical feature.

[0067] Furthermore, a benchmark model is obtained by jointly training the model based on the first sample feature and the second sample feature.

[0068] Among them, DeepFM is a recommendation model that combines the Factorization Machine (FM) and the Deep Neural Network (DNN).

[0069] Furthermore, the second sample URL data can be subjected to inverse label sample selection based on the benchmark model to obtain enhanced URL data, and the third sample URL data can be generated based on the second sample URL data and the enhanced URL data.

[0070] The labels of the third sample URL data are obtained, wherein the labels may include labels indicating whether the webpage corresponding to the URL has been browsed; and labels indicating whether the user has been deceived.

[0071] Furthermore, the benchmark model may be trained based on the third sample URL data and its labels to obtain a URL risk probability assessment model.

[0072] Therefore, after obtaining the website to be evaluated, the original features of the website to be evaluated, such as the URL, web page text, web page screenshots, and external statistical information, can be obtained, and the original features of the website to be evaluated can be input into the website risk probability assessment model. The risk probability of the input website to be evaluated is predicted through the website risk probability assessment model to obtain the website risk probability output by the website risk probability assessment model.

[0073] Step 300: Perform security protection on the URL to be evaluated based on the risk probability of the URL.

[0074] After obtaining the website risk probability, security protection can be performed on the website to be evaluated based on the website risk probability.

[0075] Specifically, the risk level can be assessed according to the risk probability of the website, and the security protection plan pre-formulated for the risk level can be executed according to the assessed risk level. The specific content of the security protection plan is not limited in this application.

[0076] The website risk assessment method provided by the embodiment of the present application is to extract the first sample website data through multimodal features to obtain the first sample feature, and to extract the second sample feature based on the first sample website data through the deep factor decomposition machine model, thereby obtaining the benchmark model through joint training based on the first sample feature and the second sample feature; further, the second sample website data can be subjected to inverse label sample selection through the benchmark model to obtain enhanced website data, and finally, the benchmark model can be trained through the third sample website data including the enhanced website data and the second sample website data and their labels to obtain the website risk probability assessment model. The benchmark model obtained through joint training with the features extracted by the multimodal features and the deep factor decomposition machine model has high robustness, and the sample website is enhanced through the benchmark model, which can improve the generalization performance of the website risk probability assessment model obtained through the training based on the enhanced website data and the second sample website data, thereby improving the prediction accuracy of the website risk probability assessment model, making it more accurate when predicting the website to be evaluated through the website risk probability assessment model, and then accurately protecting the website to be evaluated according to the predicted website risk probability, which can improve the accuracy of website risk assessment.

[0077] In one embodiment, the present application can define three basic training objectives of multi-task learning based on the chain behavior relationship task of "browsing a website → being cheated":

[0078] The risk model of web browsing itself is expressed as follows:

[0079] pBrR=p(y=1|x);

[0080] The risk model of users being deceived after browsing the web is expressed as follows:

[0081] pFrR=p(z=1|y=1,x);

[0082] Modeling the entire chain behavior, its risk probability score pBrFrR is expressed as follows:

[0083] pBrFrR=p(y=1,z=1|x);

[0084] Given the mined feature vector x, the browsed URL label y and the deceived label z, the above probability scores satisfy the following relationship:

[0085] pBrFrR=pBrR·pFrR;

[0086] Therefore, pFrR (the main task) can be implicitly learned by explicitly learning pBrR and pBrFrR (as auxiliary tasks), both of which can be learned in the entire sample space. Here, pFrR is just a variable in the network without explicit supervision signals. Therefore, the specific expression of the preset risk assessment model can be as follows:

[0087]

[0088] Among them, x represents feature information, which is obtained by concatenating the first sample feature and the second sample feature; y represents the label of the web page corresponding to the browsed URL; z represents the label of being deceived; pFrR represents the risk probability score of being deceived after the user browses the web page corresponding to the URL; p(y=1|x) represents the risk probability score of the user browsing the web page corresponding to the URL; p(y=1,z=1|x) represents the risk probability score of the user browsing the web page corresponding to the URL and being deceived

[0089] Figure 2 This is a diagram of the overall model architecture of the website risk assessment method provided in the embodiment of the present application. Figure 2It should be noted that the feature extraction for the main task and the auxiliary task in this application is similar, and the main task and the auxiliary task share the embedding; considering multimodal URLs, web page texts, and web page screenshots, the features are automatically extracted through the feature extractors of the pre-trained TextCNN model, ResNet model, such as the ResNet-101 model; wherein, when extracting URL features, the feature extraction can be directly performed through the TextCNN model; when extracting web page text features, it is necessary to first convert the URL content text (also called web page text) into a pre-trained word vector, and then perform feature extraction through the TextCNN model; when extracting web page screenshot features, it is necessary to first convert the URL content screenshot (also called web page screenshot) into a pre-trained image vector, and then perform feature extraction through the ResNet model. Since the types of external statistical features are rich and heterogeneous, they contain different information from different dimensions, including discrete variables and continuous variables, that is, sparse statistical features and numerical statistical features. Therefore, considering the algorithm based on the DeepFM model, while using FM to automatically learn low-order features, DNN is used to automatically learn high-order features to achieve multi-dimensional feature information intersection. Specifically, the sparse statistical features and numerical statistical features can be converted into DeepFM embedding vectors, and then feature extraction is performed through the FM model and the DNN model. Furthermore, the vectors of multimodal features and statistical features are concatenated and connected to a preset number of fully connected layers, and the probability scores are output through softmax with temperature coefficients to obtain pBrR and pFrR. pBrR and pFrR can be further multiplied to obtain pBrFrR.

[0090] By using multi-task learning and chain behavior modeling, the risk of fraudulent websites can be accurately characterized. The joint training of the main task and the auxiliary task unifies the training sample space and the actual sample space, improving the accuracy and generalization of the model.

[0091] In one embodiment, the multimodal features include URL features, web page text features, and web page screenshot features;

[0092] The URL features and webpage text features are extracted based on the first sample URL data through the TextCNN model;

[0093] The webpage screenshot features are extracted based on the first sample URL data through the ResNet-101 model.

[0094] For the extraction of URL features, the first sample URL data can be preprocessed. Specifically, since it is difficult to reasonably slice the string in the URL using a word segmentation tool, the URL is directly segmented at the character level, and then vectorized using one-hot encoding. The vector dimension is 32, and features of different granularities are extracted using multiple convolution kernels of different window sizes of the TextCNN model. Specifically, each character will have its corresponding vectorized representation. Suppose the number of characters in the URL is n, and the window size of the convolution kernel is k, then a feature vector with a length of n-k+1 is output. For each feature vector, the pooling operation of the attention mechanism is used to extract important information to obtain the URL feature representation R. u , and then connect a weight W uf The fully connected layer is used to unify the size of multimodal features, and the final normalized URL feature can be expressed as:

[0095] R U =W uf R u ;

[0096] Among them, one-hot encoding is a commonly used feature encoding method, which is used to convert discrete classification features into numerical representations that can be processed by machine learning models.

[0097] The extraction of web page text features can be obtained through the following steps:

[0098] Obtaining webpage text corresponding to the first sample URL data;

[0099] Performing data preprocessing on web page text to obtain preprocessed text;

[0100] Perform mask processing on the preprocessed text to obtain masked text;

[0101] The feature extraction of masked text is performed through the TextCNN model to obtain the web page text features.

[0102] Specifically, the present application can obtain basic information by using a web crawler, put the URL of the page to be visited into a queue, and visit the URL in sequence according to the queue. Send a request to the server, obtain the page content of the server's response, parse the obtained Hypertext Markup Language (HTML) page information, locate the text information in the page information, and obtain the web page text.

[0103] Perform basic natural language processing (NLP) preprocessing on the text information parsed from the page, including cleaning, word segmentation, etc. In order to apply the BERT pre-trained language model, an additional preprocessing step is required, that is, randomly mask 15% of the words in the web page text, 80% of which are masked with the [MASK] label, and the other 10% are randomly replaced with words from the preset vocabulary, and the last 10% remain unchanged. The specific steps are as follows:

[0104] 1. Read web page text, the data format is consistent with the BERT pre-trained language model;

[0105] 2. Clean the data, use jieba to segment the web page text, and store the segmented data in a dictionary; jieba is a Chinese word segmentation tool that can segment Chinese text according to the granularity of words and divide the text into meaningful words.

[0106] 3. Convert web page text into identifiers (id) and add special tags such as [CLS], [SEP], [UNK], [PAD], etc.

[0107] 4. Traverse the webpage text corresponding to each URL, use random.random() to randomly generate numbers, and determine the ratio of the numbers to [MASK] to mask. If a character in a word is masked, mask the entire word as well.

[0108] 5. Use the BERT pre-trained language model to obtain the text word vectors and then concatenate them to obtain the masked text. Furthermore, multiple convolution kernels with different window sizes of the TextCNN model are used to extract features of different granularities to obtain the text feature representation R t , and then connect a weight W tf The fully connected layer is used to unify the size of multimodal features, and the final normalized page text features can be expressed as:

[0109] R T =W tf R t ;

[0110] For the extraction of web page screenshot features, we can use web crawlers to obtain basic information, put the URL of the page to be visited into a queue, and visit the URLs in the order of the queue. Send a request to the server, obtain the page content of the server's response, take a screenshot of the page content, and obtain the web page screenshot. Further, using the ResNet-101 model, extract the second-to-last layer network to obtain the feature representation R of the web page screenshot.i , and then connect a weight W if The fully connected layer is used to unify the size of multimodal features, and the final normalized page image features can be expressed as:

[0111] R I =W if R i ;

[0112] It should be noted that due to the limited information quality of the screenshots, in order to avoid overfitting during the joint training with the text feature extractor, the parameters of the pre-trained ResNet-101 model remain fixed.

[0113] In one embodiment, the second sample feature is determined by the following steps:

[0114] Obtain external statistical information of the first sample URL data;

[0115] Encode the external statistical information into a binary vector to obtain an encoded vector;

[0116] The feature extraction of the encoding vector is performed through the deep factor decomposition machine model to obtain the second sample feature.

[0117] Understandably, in addition to the multimodal learning methods based on text and images, external statistical information also plays an important role. The extraction of these features is of great help to the credibility of risk assessment information. Because the main task and the auxiliary task have different focuses, the main task will add the external statistical information of vulnerable users on the basis of the external statistical information of the website.

[0118] The external statistical information of the website mainly includes but is not limited to the following features:

[0119] Keyword distribution and information entropy contained in URLs;

[0120] The number of fraud risk hits, incoming links, and outgoing links of the URL’s external links;

[0121] WHOIS domain name registration details (such as registrar, time, geographic location, etc.); WHOIS is a protocol and database system used to obtain domain name registration information; it can query and publicly display relevant information such as domain name registrant, registrar, registration date, expiration date, domain name server, etc.

[0122] Whether the URL is in the blacklist (URL, Internet Protocol (IP));

[0123] The website's ranking and PageRank on Google, Baidu, and Alexa.

[0124] And, external statistical information of vulnerable users mainly includes but is not limited to the following characteristics:

[0125] Basic profile grouping information (such as gender, age, occupation, marital status, etc.);

[0126] Calculate relevant statistics (such as maximum value, minimum value, variance, etc.) for a 14-day sequence of URL visits in units of days.

[0127] Generally, consider using one-hot encoding to represent external statistical information as vectors, where each vector contains only one position with a value. For discrete features, the value of the character index in the feature category is 1, and all other positions are 0; for continuous features, the index value of the segment where the original feature value is located after discretization is 1, and all other positions are 0. In order to make full use of these multi-source, sparse external statistical information and consider the connection between features, the DeepFM model algorithm is uniformly used to extract features.

[0128] The main idea of ​​the DeepFM model is to use FM to solve the second-order feature intersection while using DNN to solve the high-order feature intersection. FM contains multiple inner product operation units to combine different feature vectors in pairs, which can deal with high-dimensional sparse category features. In this way, the FM part enhances the model's "memory ability", that is, the ability to discover the direct association rules of the target sample; while the DNN part enhances the model's "generalization ability", that is, to mine the high-dimensional and indirect correlation of the target.

[0129] Figure 3 This is a DeepFM model architecture diagram of the website risk assessment method provided in the embodiment of the present application. Figure 3 In this application, the original external statistical information of the DeepFM model will be used as the common input of the FM and DNN model parts to ensure the accuracy and consistency of the model features. At the same time, the Deep part and the second-order FM part share the dense embedding vector (Denseembedding) of DeepFM, which is aligned with the multimodal learning part; the dense embedding vector is input into the DNN model after concatenation and flattening, and output after passing through the fully connected layer 1 and fully connected layer 2 of the DNN model. After joint training, the FM part feature representation R F and the feature representation R of the DNN part D And as the second sample feature.

[0130] In addition to the characteristics of the URL itself, this application also uses the DeepFM model to take into account the low-order and high-order statistical characteristics of the URL, and uses multiple pre-trained models to align the feature vectors of the URL, web page text, and web page screenshots; at the same time, the dense embedding vector of the DeepFM model is aligned with the multimodal learning part, realizing the complementary advantages of different types of technology selection, and significantly improving the accuracy and practical application value of the model in this field. Taking into account the automatic cross-combination of features, the automatic construction of low-order features and high-order features is realized, solving the problem of training sparse features.

[0131] It should be noted that the benchmark model in the present application is obtained by jointly training a preset risk assessment model based on the first sample features and the second sample features.

[0132] Specifically, during joint training, the auxiliary task and the main task can be trained jointly, where the embedding layer shares the network weights. U , Web page text feature representation R T , Web page screenshot feature representation R I , FM partial feature representation R F and the feature representation R of the DNN part D The five multi-source feature representations are concatenated, and the overall feature representation R O for:

[0133]

[0134] During the training process, FTRL with L1 regularization term is used as the optimization algorithm for the FM part, while Adam is used as the optimization algorithm for the multimodal part and the DNN part.

[0135] The loss function of multi-task learning in this application adopts cross entropy loss, which accumulates the two explicit label losses of auxiliary tasks. The specific expression is as follows:

[0136]

[0137] Among them, θ aux is the auxiliary task network parameter, θ main is the main task network parameter; x represents the feature information, which is obtained by concatenating the first sample feature and the second sample feature; y represents the label of the web page corresponding to the browsed URL; z represents the deceived label.

[0138] After completing the joint training, the baseline model is obtained.

[0139] In one embodiment, the enhanced URL data is determined by the following steps:

[0140] Performing mask processing on the second sample URL data to obtain mask data;

[0141] generating fourth sample URL data based on the mask data;

[0142] The fourth sample URL data is subjected to inverse label sample selection through the benchmark model, and the enhanced URL data is determined based on the URL data obtained by the inverse label sample selection.

[0143] Specifically, in order to better improve the model capabilities, the URL enhancement training module can be used to enhance the second sample URL data using data enhancement methods. Considering the multimodal characteristics of URL data, both images and texts contain rich information that matches each other. Traditional manually designed data enhancement methods have problems such as sample error and omission bias and loss of key sample information. Applying data enhancement methods such as cropping, color change, and flipping to the image will affect its text representation. Therefore, in this embodiment, a method specifically for URL tags is designed for data enhancement. The specific steps are as follows:

[0144] 1. Train a baseline model according to the training method of the multi-task joint module

[0145] 2. Use the masked language model and masked pixel model to generate new augmented data. Specifically, the samples (x, y) can be randomly masked using the prompt paradigm as multi-dimensional input, and these masks can be predicted using a multi-layer Transformer to generate new samples. For each URL training sample x i , you can generate a new set of URL samples

[0146] 3. Filter new URL samples with the help of the baseline model f. For the original sample (x i ,y i ), corresponding to a new URL sample set S i , use the benchmark model f to select the reverse label samples (y′≠y i ),Right now:

[0147]

[0148] Furthermore, the sample with the highest confidence can be selected from the URL data obtained by selecting the inverse label samples as the original sample (x i ,y i ) to generate enhanced samples and obtain enhanced URL data;

[0149] Furthermore, the model can be retrained using the original samples and enhanced samples specifically for URL labels, that is, third sample URL data is formed based on the second sample URL data and the enhanced URL data, and then the baseline model is trained using the third sample URL data and its labels to obtain a URL risk probability assessment model.

[0150] Specifically, this application can input the original features of the URL to be evaluated into the URL risk probability assessment model through the URL risk assessment module, and output the risk probability score (0-1) of the URL in the real business scenario, so as to assess the risk index (for example, high, medium, low) according to the business needs of the public security department, and provide an effective intelligent tool for the early warning, judgment and handling of relevant cases. The risk assessment score is dynamically updated according to the model results of users and URLs, which has a real-time intelligent effect.

[0151] This embodiment performs data enhancement through a method specifically targeting URL tags, thereby improving data efficiency and the generalization performance of the model.

[0152] In one embodiment, security protection is performed on the URL to be evaluated based on the URL risk probability, including:

[0153] Step 301, determining the risk level of the website to be evaluated according to the risk probability of the website;

[0154] Step 302: Determine and execute a target security protection solution for the website to be evaluated based on the risk level.

[0155] In this application, a risk level can be set in advance according to different website risk probabilities. For example, a website risk probability of 0-0.3 corresponds to low risk, a website risk probability of 0.3-0.6 corresponds to medium risk, and a website risk probability of 0.6-1 corresponds to high risk. It should be noted that the above is only used for example and does not represent the specific correlation between the website risk probability and risk level set in this application, which can be set and adjusted according to actual conditions.

[0156] Therefore, after obtaining the risk probability of the website, the risk level corresponding to the risk probability of the website can be determined from multiple risk wind turbines according to the correlation between the risk probability of the website and the risk level as the risk level of the website to be evaluated.

[0157] It should be noted that the application can also set up corresponding security protection plans in advance according to different risk levels. For example, a security protection plan is set for low risk, a security protection plan is set for medium risk, and a security protection plan is set for high risk. The specific content of the security protection plan is not limited in this application, and it can be set and adjusted according to the scenario and business needs.

[0158] Therefore, after obtaining the risk level of the website to be evaluated, the present application can query the security protection solution associated with the risk level of the website to be evaluated through the association relationship between the risk level and the security protection solution and determine it as the target security protection solution.

[0159] Furthermore, a target security protection solution may be executed to achieve security protection for the website to be evaluated.

[0160] This embodiment can determine a security protection solution suitable for the website to be evaluated based on the website risk probability predicted from the original features of the website to be evaluated, so as to reduce the probability of users being deceived.

[0161] Furthermore, the present application also provides a website risk assessment device.

[0162] Reference Figure 4 , Figure 4 This is a schematic diagram of the functional modules of an embodiment of a website risk assessment device of the present application.

[0163] The website risk assessment device comprises:

[0164] The acquisition module 410 is used to acquire the website to be evaluated;

[0165] Input module 420, used for inputting the original features of the URL to be evaluated into the URL risk probability evaluation model, and obtaining the URL risk probability output by the URL risk probability evaluation model; wherein the URL risk probability evaluation model is obtained by training the benchmark model through the third sample URL data and its label; the third sample URL data includes the second sample URL data and the enhanced URL data; the enhanced URL data is obtained by selecting samples of the second sample URL data by inverse labeling based on the benchmark model; the benchmark model is obtained by joint training based on the first sample feature and the second sample feature; the first sample feature is obtained by multimodal feature extraction based on the first sample URL data, and the second sample feature is obtained by feature extraction based on the first sample URL data through a deep factor decomposition machine model;

[0166] The protection module 430 is used to perform security protection on the URL to be evaluated based on the risk probability of the URL.

[0167] The website risk assessment device provided by the embodiment of the present application performs multimodal feature extraction on the first sample website data to obtain the first sample feature, and performs feature extraction on the first sample website data through the deep factor decomposition machine model to obtain the second sample feature, thereby jointly training the first sample feature and the second sample feature to obtain the benchmark model; further, the second sample website data can be subjected to inverse label sample selection through the benchmark model to obtain enhanced website data, and finally the benchmark model can be trained through the third sample website data including the enhanced website data and the second sample website data and their labels to obtain the website risk probability assessment model. The benchmark model obtained by training the multimodal features and the features extracted by the deep factor decomposition machine model is made to have high robustness, and the sample website is enhanced through the benchmark model, so that the generalization performance of the website risk probability assessment model obtained by training based on the enhanced website data and the second sample website data can be improved, thereby improving the prediction accuracy of the website risk probability assessment model, making it more accurate to predict the original features of the website to be assessed through the website risk probability assessment model, and then accurately perform security protection on the website to be assessed according to the predicted website risk probability, thereby improving the accuracy of website risk assessment.

[0168] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other via the communication bus 540. The processor 510 may call a computer program in the memory 530 to execute the steps of the website risk assessment method, for example including:

[0169] Get the URL to be evaluated;

[0170] The original features of the URL to be evaluated are input into a URL risk probability assessment model to obtain the URL risk probability output by the URL risk probability assessment model; wherein the URL risk probability assessment model is obtained by training a benchmark model through third sample URL data and its labels; the third sample URL data includes second sample URL data and enhanced URL data; the enhanced URL data is obtained by inverse label sample selection based on the second sample URL data through the benchmark model; the benchmark model is obtained by joint training based on the first sample features and the second sample features; the first sample features are obtained by multimodal feature extraction based on the first sample URL data, and the second sample features are obtained by feature extraction based on the first sample URL data through a deep factor decomposition machine model;

[0171] The website to be evaluated is protected against security based on the risk probability of the website.

[0172] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0173] On the other hand, an embodiment of the present application further provides a storage medium, wherein the storage medium is a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program is used to enable a processor to execute the steps of the methods provided in the above embodiments, for example, including:

[0174] Get the URL to be evaluated;

[0175] The original features of the URL to be evaluated are input into a URL risk probability assessment model to obtain the URL risk probability output by the URL risk probability assessment model; wherein the URL risk probability assessment model is obtained by training a benchmark model through third sample URL data and its labels; the third sample URL data includes second sample URL data and enhanced URL data; the enhanced URL data is obtained by inverse label sample selection based on the second sample URL data through the benchmark model; the benchmark model is obtained by joint training based on the first sample features and the second sample features; the first sample features are obtained by multimodal feature extraction based on the first sample URL data, and the second sample features are obtained by feature extraction based on the first sample URL data through a deep factor decomposition machine model;

[0176] The website to be evaluated is protected against security based on the risk probability of the website.

[0177] The computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0178] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0179] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method 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 is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for 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.

[0180] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A website risk assessment method, characterized in that: include: Get the URL to be evaluated; The original features of the URL to be evaluated are input into a URL risk probability assessment model to obtain the URL risk probability output by the URL risk probability assessment model; wherein the URL risk probability assessment model is obtained by training a benchmark model through third sample URL data and its labels; the third sample URL data includes second sample URL data and enhanced URL data; the enhanced URL data is obtained by performing inverse label sample selection based on the second sample URL data through the benchmark model; the benchmark model is obtained by joint training based on the first sample features and the second sample features; The first sample feature is obtained by performing multimodal feature extraction based on the first sample URL data, and the second sample feature is obtained by performing feature extraction based on the first sample URL data through a deep factor decomposition machine model; The website to be evaluated is protected against security based on the risk probability of the website.

2. The website risk assessment method according to claim 1, characterized in that: The multimodal features include URL features, web page text features and web page screenshot features; The URL features and the webpage text features are extracted based on the first sample URL data through a TextCNN model; The webpage screenshot features are extracted through the ResNet-101 model based on the first sample URL data.

3. The website risk assessment method according to claim 2, characterized in that: The webpage text features are specifically extracted through the following steps: Obtaining webpage text corresponding to the first sample URL data; Performing data preprocessing on the webpage text to obtain preprocessed text; Performing mask processing on the preprocessed text to obtain masked text; The masked text is subjected to feature extraction through the TextCNN model to obtain web page text features.

4. The website risk assessment method according to claim 1, characterized in that: The second sample feature is determined by the following steps: Obtaining external statistical information of the first sample URL data; Encoding the external statistical information into a binary vector to obtain an encoding vector; The encoding vector is subjected to feature extraction through a deep factor decomposition machine model to obtain a second sample feature.

5. The website risk assessment method according to claim 1, characterized in that: The benchmark model is obtained by jointly training a preset risk assessment model based on the first sample feature and the second sample feature; the specific expression of the preset risk assessment model is as follows: Among them, x represents feature information, and the feature information is obtained by concatenating the first sample feature and the second sample feature; y represents the label of the web page corresponding to the browsed URL; z represents the label of being deceived; pFrR represents the risk probability score of the user being deceived after browsing the web page corresponding to the URL; p(y=1|x) represents the risk probability score of the user browsing the web page corresponding to the URL; p(y=1,z=1|x) represents the risk probability score of the user browsing the web page corresponding to the URL and being deceived.

6. The website risk assessment method according to claim 1, characterized in that: The enhanced URL data is determined by the following steps: Performing mask processing on the second sample URL data to obtain mask data; generating fourth sample URL data based on the mask data; The fourth sample URL data is subjected to inverse label sample selection through the benchmark model, and enhanced URL data is determined based on the URL data obtained through inverse label sample selection.

7. The website risk assessment method according to any one of claims 1 to 6, characterized in that: The performing security protection on the to-be-assessed website based on the website risk probability includes: Determining the risk level of the website to be evaluated according to the risk probability of the website; A target security protection solution for the website to be evaluated is determined and executed based on the risk level.

8. A website risk assessment device, characterized in that: include: The acquisition module is used to obtain the URL to be evaluated; An input module is used to input the original features of the URL to be evaluated into a URL risk probability assessment model to obtain the URL risk probability output by the URL risk probability assessment model; wherein the URL risk probability assessment model is obtained by training a benchmark model with third sample URL data and its labels; the third sample URL data includes second sample URL data and enhanced URL data; the enhanced URL data is obtained by selecting samples based on the inverse label of the second sample URL data by the benchmark model; the benchmark model is obtained by joint training based on the first sample features and the second sample features; the first sample features are obtained by multimodal feature extraction based on the first sample URL data, and the second sample features are obtained by feature extraction based on the first sample URL data by a deep factor decomposition machine model; A protection module is used to perform security protection on the website to be evaluated based on the risk probability of the website.

9. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the website risk assessment method according to any one of claims 1 to 7 is implemented.

10. A storage medium, the storage medium being a computer-readable storage medium, comprising a computer program, characterized in that: When the computer program is executed by a processor, the website risk assessment method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Malicious website identification method based on PageRank algorithm

    CN119788409A

  • Phishing website detection method and device, equipment and storage medium

    CN120856480A