Domain name anomaly detection method and computer equipment based on domain name detection model
Through the method based on the domain name detection model, semantic features of the domain name are extracted and detected, and abnormal detection is performed in combination with category information, which solves the problem of frequent updates of rule databases and the binary classification model in the existing technology, and realizes timely detection and alarm. Improves the security of network services.
Patent Information
- Application Number
- CN202411225931.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-09-03
AI Technical Summary
The existing domain name exception detection method has frequent updates to the rule base, making it difficult to detect new abnormal domain names in time, the binary classification model cannot detect the categories and malicious levels of abnormal domain names, and the convolutional neural network is difficult to extract the associated semantic information between domain name characters, resulting in The accuracy of abnormal domain name detection and alarm accuracy are low.
Using a method based on the domain name detection model, the initial domain name information set and category feature information database are obtained, semantic feature extraction is performed through the pre-trained domain name detection model, abnormal detection is performed in combination with category features, and abnormal domain name information that meets the conditions is sent to the alarm terminal .
It improves the security of network services, can promptly detect and alert newly generated abnormal domain names, and improves the accuracy of abnormal domain name detection and alarm accuracy.
Smart Images

Figure CN118764317B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of domain name anomaly detection, and specifically to a domain name anomaly detection method and computer device based on a domain name detection model. Background Art
[0002] As a convenient addressing mode, domain names have become an indispensable form of communication for surfing the Internet, daily office work, business applications, etc. Virus programs often attack user networks through malicious domain names and abnormal domain names. At present, when performing domain name anomaly detection, the commonly used methods are: using pre-set firewalls and rule bases to detect abnormal domain names or using binary classification models to detect and identify abnormal domain names.
[0003] However, in practice, it is found that when the above method is used to detect domain name anomalies, the following technical problems often occur:
[0004] First, the pre-set rule base needs to be updated regularly. Before the rule base is updated, it is difficult to detect newly generated abnormal domain names in time, which makes it difficult to issue alarms for abnormal domain names in time, and thus reduces the security of network services.
[0005] Second, the binary classification model can only detect whether a domain name is abnormal, but cannot detect the category and maliciousness level of the abnormal domain name, which reduces the accuracy of abnormal domain name detection and, as a result, reduces the accuracy of abnormal domain name alerts.
[0006] In the process of adopting technical solutions to solve the above-mentioned technical problem one, the following problems often occur: classification detection is only performed based on the category of the domain name, and no further feature extraction is performed on the domain name content, resulting in a decrease in the accuracy of abnormal domain name detection, thereby resulting in a decrease in the accuracy of abnormal domain name alarms. In response to the above problems, the conventional solution is generally to use a convolutional neural network to extract semantic features in the domain name. However, the above-mentioned conventional solution still has the following technical problem three: the convolutional neural network can only extract single character features of the domain name, and it is difficult to extract the associated semantic information between characters, which will lead to a decrease in the accuracy of abnormal domain name detection, thereby resulting in a decrease in the accuracy of abnormal domain name alarms. Summary of the invention
[0007] The content of this application is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this application is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0008] Some embodiments of the present application propose a domain name anomaly detection method, a computer device, and a computer-readable storage medium based on a domain name detection model to solve one or more of the technical problems mentioned in the above background technology section.
[0009] In a first aspect, some embodiments of the present application provide a domain name anomaly detection method based on a domain name detection model, the method comprising: obtaining an initial domain name information set and a domain name category feature information library; inputting the above initial domain name information set into a pre-trained domain name detection model to obtain a domain name detection information group set; performing semantic feature extraction processing on each domain name detection information in the above domain name detection information group set to generate domain name semantic feature information, to obtain a domain name semantic feature information group set; based on the above domain name category feature information library, performing anomaly detection processing on each domain name semantic feature information in the above domain name semantic feature information group set to generate a domain name anomaly detection result, to obtain a domain name anomaly detection result group set; sending each domain name anomaly detection result in the above domain name anomaly detection result group set that meets a preset anomaly condition and the corresponding initial domain name information to an alarm terminal for alarm processing.
[0010] In a second aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the method described in any implementation of the first aspect is implemented.
[0011] In a third aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the method described in any implementation of the first aspect is implemented.
[0012] The above-mentioned various embodiments of the present application have the following beneficial effects: through the domain name anomaly detection method based on the domain name detection model of some embodiments of the present application, the security of network services can be improved. Specifically, the reason for the reduction of the security of network services is that the pre-set rule base needs to be updated regularly. Before the rule base is updated, it is difficult to detect the newly generated abnormal domain name in time, which makes it difficult to warn the abnormal domain name in time. Based on this, the domain name anomaly detection method based on the domain name detection model of some embodiments of the present application first obtains the initial domain name information set and the domain name category feature information library. Thus, the domain name to be detected and the pre-set domain name rule library can be obtained, so as to perform subsequent domain name anomaly detection. Secondly, the above-mentioned initial domain name information set is input into the pre-trained domain name detection model to obtain the domain name detection information group set. Thus, the domain name can be detected according to the category to which the domain name belongs. Then, each domain name detection information in the above-mentioned domain name detection information group set is subjected to semantic feature extraction processing to generate domain name semantic feature information, and obtain the domain name semantic feature information group set. Thus, the content of the domain name can be further feature extracted, so as to perform subsequent domain name anomaly detection. Then, based on the above-mentioned domain name category feature information library, each domain name semantic feature information in the above-mentioned domain name semantic feature information group set is subjected to anomaly detection processing to generate a domain name anomaly detection result, and a domain name anomaly detection result group set is obtained. Thus, anomaly detection can be performed according to the category to which the domain name belongs and the content of the domain name, further improving the accuracy of abnormal domain name detection. Finally, each domain name anomaly detection result that meets the preset abnormal condition in the above-mentioned domain name anomaly detection result group set and the corresponding initial domain name information are sent to the alarm terminal for alarm processing. Thus, an alarm can be issued for abnormal domain names. Therefore, some domain name anomaly detection methods based on domain name detection models of the present application can first classify and detect the domain name, then perform semantic extraction on the content of the domain name, and at the same time, perform anomaly detection on the domain name according to the category information and semantic information of the domain name, and then issue an alarm for the abnormal domain name. Therefore, the newly generated abnormal domain name can be detected in time, so that the abnormal domain name can be alarmed in time, and then the security of network services can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0014] Figure 1 is a flowchart of some embodiments of a domain name anomaly detection method based on a domain name detection model according to the present application;
[0015] Figure 2It is a schematic diagram of the structure of a computer device suitable for implementing some embodiments of the present application. DETAILED DESCRIPTION
[0016] Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.
[0017] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0018] It should be noted that the concepts such as "first" and "second" mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0019] It should be noted that the modifications of "one" and "plurality" mentioned in the present application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0020] The names of the messages or information exchanged between multiple devices in the embodiments of the present application are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0021] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments.
[0022] Figure 1 The process 100 of some embodiments of the domain name anomaly detection method based on the domain name detection model according to the present application is shown. The domain name anomaly detection method based on the domain name detection model includes the following steps:
[0023] Step 101: Obtain an initial domain name information set and a domain name category feature information database.
[0024] In some embodiments, the execution subject of the domain name anomaly detection method based on the domain name detection model can obtain the initial domain name information set and the domain name category feature information library from the storage terminal through a wired connection or a wireless connection. Among them, the above-mentioned storage terminal can be a terminal for storing the initial domain name information set and the domain name category feature information library. The initial domain name information in the above-mentioned initial domain name information set can represent a domain name. The above-mentioned domain name category feature information library can be a rule library for storing the naming rules of domain names of various target categories.
[0025] As an example, the target category may be, but is not limited to, at least one of the following: information representing an "education domain name", information representing a "news domain name", or information representing an "entertainment domain name".
[0026] It should be noted that the above wireless connection methods may include but are not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0027] Step 102: Input the initial domain name information set into a pre-trained domain name detection model to obtain a domain name detection information group set.
[0028] In some embodiments, the execution entity may input the initial domain name information set into a pre-trained domain name detection model to obtain a domain name detection information group set. Each initial domain name information in the initial domain name information set may be input into a pre-trained domain name detection model to generate domain name detection information to obtain a domain name detection information set. Here, the domain name detection information may represent the category information of the initial domain name information. Then, each domain name detection information in the domain name detection information set may be detected and processed to obtain a domain name detection information group set. Here, each domain name detection information with the same category information represented in the domain name detection information set may be determined as a domain name detection information group to obtain a domain name detection information group set. Specifically, the pre-trained domain name detection model may be a pre-trained neural network model that takes the initial domain name information as input and the domain name detection information as output.
[0029] As an example, the above-mentioned category information may be, but is not limited to, at least one of the following: information representing an "education domain name", information representing a "news domain name", or information representing an "entertainment domain name".
[0030] Optionally, before inputting the initial domain name information set into the pre-trained domain name detection model to obtain the domain name detection information group set, the execution subject may further perform the following steps:
[0031] The first step is to obtain a sample domain name information set and a sample domain name category information set. The sample domain name information in the sample domain name information set corresponds to the sample domain name category information in the sample domain name category information set. The sample domain name information set and the sample domain name category information set can be obtained from a storage terminal. Here, the sample domain name information in the sample domain name information set can represent a domain name. The sample domain name category information in the sample domain name category information set can represent the category information of the sample domain name information corresponding to the sample domain name category information.
[0032] As an example, the above-mentioned category information may be, but is not limited to, at least one of the following: information representing an "education domain name", information representing a "news domain name", or information representing an "entertainment domain name".
[0033] The second step is to determine the first detection submodel based on the sample domain name information set and the preset first initial detection submodel, wherein the preset first initial detection submodel can be an untrained neural network model that takes the sample domain name information as input and the domain name detection information as output.
[0034] As an example, the above-mentioned preset first initial detection sub-model can be but is not limited to at least one of the following: RNN (Recurrent Neural Networks) model, I-RNN (Identity Matrix Recurrent Neural Networks) model, LSTM (Long Short-Term Memory Networks) model, CNN (Convolutional Neural Network) model or CNN-LSTM (Convolutional Neural Network-Long Short-Term Memory Neural Network) model.
[0035] The third step is to determine the second detection submodel based on the sample domain name information set and the preset second initial detection submodel. The specific implementation method of determining the second detection submodel and the technical effect it brings can refer to step 102 in the above embodiment, which will not be repeated here.
[0036] As an example, the above-mentioned preset second initial detection sub-model can be but is not limited to at least one of the following: RNN (Recurrent Neural Networks) model, I-RNN (Identity Matrix Recurrent Neural Networks) model, LSTM (Long Short-Term Memory Networks) model, CNN (Convolutional Neural Network) model or CNN-LSTM (Convolutional Neural Network-Long Short-Term Memory Neural Network) model.
[0037] The fourth step is to determine the third detection sub-model based on the sample domain name information set and the preset third initial detection sub-model. The specific implementation method of determining the third detection sub-model and the technical effect it brings can refer to step 102 in the above embodiment, which will not be repeated here.
[0038] As an example, the above-mentioned preset third initial detection sub-model can be but is not limited to at least one of the following: RNN (Recurrent Neural Networks) model, I-RNN (Identity Matrix Recurrent Neural Networks) model, LSTM (Long Short-Term Memory Networks) model, CNN (Convolutional Neural Network) model or CNN-LSTM (Convolutional Neural Network-Long Short-Term Memory Neural Network) model.
[0039] Step 5: Determine the fourth detection submodel based on the sample domain name information set and the preset fourth initial detection submodel. The specific implementation of the fourth detection submodel and the technical effect thereof can be referred to step 102 in the above embodiment, which will not be described in detail here.
[0040] As an example, the above-mentioned preset fourth initial detection sub-model can be but is not limited to at least one of the following: RNN (Recurrent Neural Networks) model, I-RNN (Identity Matrix Recurrent Neural Networks) model, LSTM (Long Short-Term Memory Networks) model, CNN (Convolutional Neural Network) model or CNN-LSTM (Convolutional Neural Network-Long Short-Term Memory Neural Network) model.
[0041] Step 6: Based on the sample domain name information set and the preset fifth initial detection sub-model, determine the fifth detection sub-model. The specific implementation method of determining the fifth detection sub-model and the technical effect it brings can refer to step 102 in the above embodiment, which will not be repeated here.
[0042] As an example, the above-mentioned preset fifth initial detection sub-model can be but is not limited to at least one of the following: RNN (Recurrent Neural Networks) model, I-RNN (Identity Matrix Recurrent Neural Networks) model, LSTM (Long Short-Term Memory Networks) model, CNN (Convolutional Neural Network) model or CNN-LSTM (Convolutional Neural Network-Long Short-Term Memory Neural Network) model.
[0043] In the seventh step, the first detection sub-model, the second detection sub-model, the third detection sub-model, the fourth detection sub-model and the fifth detection sub-model are aggregated to obtain an initial domain name detection model. The above-mentioned aggregating the first detection sub-model, the second detection sub-model, the third detection sub-model, the fourth detection sub-model and the fifth detection sub-model to obtain the initial domain name detection model may be: the first detection sub-model, the second detection sub-model, the third detection sub-model, the fourth detection sub-model and the fifth detection sub-model are respectively used as the first layer network, the second layer network, the third layer network, the fourth layer network and the fifth layer network included in the initial domain name detection model. Specifically, the initial domain name detection model may be an untrained neural network model that takes sample domain name information as input and takes initial domain name category information as output.
[0044] As an example, the above initial domain name detection model can be a cascade detector model.
[0045] Step 8: Select sample domain name information from the sample domain name information set and perform the following general training sub-steps:
[0046] In the first sub-step, the sample domain name information is input into the initial domain name detection model to obtain initial domain name category information, wherein the sample domain name information can be randomly selected from the above sample domain name information set.
[0047] In the second sub-step, based on a preset total detection loss function, a total detection loss value of the sample domain name category information and the initial domain name category information corresponding to the sample domain name information in the sample domain name category information set is determined.
[0048] As an example, the above-mentioned preset total detection loss function can be but is not limited to one of the following: a cross entropy loss function, a least square function or a multi-detection cross entropy loss function.
[0049] In a third sub-step, in response to determining that the total detection loss value is less than the total target threshold, the initial domain name detection model is determined as the domain name detection model.
[0050] As an example, the above-mentioned total target threshold may be 0.01.
[0051] Optionally, the execution subject may also adjust relevant parameters in the initial domain name detection model in response to determining that the total detection loss value is greater than or equal to the total target threshold, determine the adjusted initial domain name detection model as the initial domain name detection model, and select a sample domain name information set from each sample domain name information that has not been selected in the sample domain name information set, so as to perform the total training step again. The relevant parameters in the initial domain name detection model may be adjusted by a preset adjustment algorithm.
[0052] As an example, the preset adjustment algorithm mentioned above may be but is not limited to one of the following: a back propagation algorithm or a stochastic gradient algorithm.
[0053] In some optional implementations of some embodiments, the execution subject determines the first detection submodel based on the sample domain name information set and the preset first initial detection submodel, and may select sample domain name information from the sample domain name information set to perform the following first training substep:
[0054] In the first sub-step, the sample domain name information is input into a preset first initial detection sub-model to obtain the first initial category information. The sample domain name information can be randomly selected from the sample domain name information set. Specifically, the preset first initial detection sub-model can be an untrained neural network model that takes the sample domain name information as input and the first initial category information as output.
[0055] The second sub-step is to determine, based on a preset first detection loss function, a first detection loss value of the sample domain name category information and the first initial category information corresponding to the sample domain name information in the sample domain name category information set.
[0056] As an example, the above-mentioned preset first detection loss function can be but is not limited to one of the following: a cross entropy loss function, a least square function or a multi-detection cross entropy loss function.
[0057] The third sub-step is to determine the first initial detection sub-model as the first detection sub-model in response to determining that the first detection loss value is less than the first target threshold.
[0058] As an example, the first target threshold mentioned above may be 0.01.
[0059] Optionally, the execution subject may also adjust relevant parameters in the first initial detection submodel in response to determining that the first detection loss value is greater than or equal to the first target threshold, determine the adjusted first initial detection submodel as the first initial detection submodel, and select a sample domain name information set from each sample domain name information that has not been selected in the sample domain name information set, so as to perform the first training step again. The relevant parameters in the first initial detection submodel may be adjusted by the preset adjustment algorithm.
[0060] The relevant content of step 102 is an inventive point of the embodiment of the present application, which solves the technical problem 2 mentioned in the background technology, "the accuracy of abnormal domain name alarm is reduced". Among them, the factors that lead to the insufficient adaptability of the abnormal domain name alarm function are often as follows: using a binary classification model, it can only detect whether the domain name is abnormal, and cannot detect the category and malicious level of the abnormal domain name, resulting in a decrease in the accuracy of abnormal domain name detection. If the above factors are solved, the effect of improving the accuracy of abnormal domain name alarm can be achieved. In order to achieve this effect, the present application can use a sample domain name information set to train at least one neural network model for classification detection processing. Then, each neural network model used for detection can be aggregated into a cascade detector model. Then, the sample domain name information set can be used to train the aggregated cascade detector to obtain a trained detection model. As a result, the accuracy of the detection model can be improved, thereby, the accuracy of domain name detection can be improved, so that domain name anomaly detection can be performed later according to the domain name category information. Therefore, the category and malicious level of the abnormal domain name can be detected, thereby, the accuracy of abnormal domain name detection can be improved, and then, the accuracy of abnormal domain name alarm can be improved.
[0061] Step 103: Perform semantic feature extraction processing on each domain name detection information in the domain name detection information set to generate domain name semantic feature information, and obtain the domain name semantic feature information set.
[0062] In some embodiments, the execution entity may perform semantic feature extraction processing on each domain name detection information in the domain name detection information set to generate domain name semantic feature information, and obtain a domain name semantic feature information set.
[0063] Considering the problems of the above conventional solutions, facing the above technical problem three: the convolutional neural network can only extract the single character features of the domain name, and it is difficult to extract the associated semantic information between the characters, which will lead to a decrease in the accuracy of abnormal domain name detection, and thus a decrease in the accuracy of abnormal domain name alarms. Combined with the current technical status, we can decide to adopt the following solution.
[0064] In some optional implementations of some embodiments, the execution subject performs semantic feature extraction processing on each domain name detection information in the domain name detection information set to generate domain name semantic feature information, and obtains the domain name semantic feature information set, which may include the following steps:
[0065] The first step is to vectorize the domain name detection information to obtain a domain name detection vector. The domain name detection information can be vectorized using a preset vectorization algorithm to obtain a domain name detection vector.
[0066] As an example, the preset vectorization algorithm may be, but is not limited to, at least one of the following: a CBOW (continuous bag of words) algorithm or a NNLM (Neural Network Language Model) algorithm.
[0067] The second step is to input the domain name detection vector into a pre-trained semantic feature extraction model to obtain a domain name semantic feature vector. The pre-trained semantic feature extraction model can be a pre-trained neural network model that takes the domain name detection vector as input and the domain name semantic feature vector as output.
[0068] The third step is to determine the domain name semantic feature vector as the domain name semantic feature information.
[0069] Optionally, before inputting the domain name detection vector into a pre-trained semantic feature extraction model to obtain the domain name semantic feature vector, the execution subject may further perform the following steps:
[0070] The first step is to obtain a sample domain name detection information set and a sample domain name semantic feature information set, wherein the sample domain name detection information in the sample domain name detection information set corresponds one-to-one to the sample domain name semantic feature information in the sample domain name semantic feature information set. The sample domain name detection information may include but is not limited to at least one of the following: sample domain name information and sample domain name category information. Here, the sample domain name information may be a domain name. The sample domain name category information may represent the category information of the domain name. The sample domain name semantic feature information may represent the semantic features of the sample domain name detection information corresponding to the sample domain name semantic feature information.
[0071] As an example, the above-mentioned category information may be, but is not limited to, at least one of the following: information representing an "education domain name", information representing a "news domain name", or information representing an "entertainment domain name".
[0072] The second step is to vectorize each sample domain name detection information in the sample domain name detection information set to generate a sample domain name detection vector and obtain a sample domain name detection vector set. In particular, each sample domain name detection information in the sample domain name detection information set can be vectorized by the preset vectorization algorithm to generate a sample domain name detection vector and obtain a sample domain name detection vector set.
[0073] The third step is to vectorize each sample domain name semantic feature information in the sample domain name semantic feature information set to generate a sample domain name semantic feature vector, thereby obtaining a sample domain name semantic feature vector set. The preset vectorization algorithm can be used to vectorize each sample domain name semantic feature information in the sample domain name semantic feature information set to generate a sample domain name semantic feature vector.
[0074] Step 4: Select a sample domain name detection vector from the sample domain name detection vector set and perform the following feature extraction training sub-steps:
[0075] In the first sub-step, the sample domain name detection vector is input into the first feature extraction sub-model included in the initial semantic feature extraction model to obtain the first initial domain name semantic feature vector, wherein the initial semantic feature extraction model further includes: a second feature extraction sub-model, a fusion layer, a connection layer and a normalization layer. Here, the sample domain name detection vector can be randomly selected from the sample domain name detection vector set. Specifically, the first feature extraction sub-model and the second feature extraction sub-model can be used to extract semantic features in the sample domain name detection vector respectively to obtain the first initial domain name semantic feature vector and the second initial domain name semantic feature vector. Then, the fusion layer can be used to fuse the first initial domain name semantic feature vector and the second initial domain name semantic feature vector to obtain the initial domain name semantic feature fusion vector. Next, the connection layer can be used to further fuse the initial domain name semantic feature fusion vector to obtain the initial domain name semantic feature connection vector. Finally, the normalization layer can be used to normalize the initial domain name semantic feature connection vector to obtain the initial domain name semantic feature vector.
[0076] As an example, the first feature extraction sub-model may be a CNN (Convolutional Neural Network) model. The second feature extraction sub-model may be a BIGRU (Bidirectional Gated Recurrent Unit) model. The fusion layer may be a merge layer model. The connection layer may be a DenseNet (Densely Connected Network) model. The normalization layer may be a Softmax (normalization) model.
[0077] The second sub-step is to input the sample domain name detection vector into the second feature extraction sub-model included in the initial semantic feature extraction model to obtain a second initial domain name semantic feature vector.
[0078] In a third sub-step, the first initial domain name semantic feature vector and the second initial domain name semantic feature vector are input into a fusion layer included in the initial semantic feature extraction model to obtain an initial domain name semantic feature fusion vector.
[0079] In the fourth sub-step, the initial domain name semantic feature fusion vector is input into the connection layer included in the initial semantic feature extraction model to obtain the initial domain name semantic feature connection vector.
[0080] In the fifth sub-step, the initial domain name semantic feature concatenation vector is input into the normalization layer included in the initial semantic feature extraction model to obtain the initial domain name semantic feature vector.
[0081] The sixth sub-step is to determine the feature extraction loss values of the sample domain name semantic feature vector and the initial domain name semantic feature vector corresponding to the sample domain name detection vector in the sample domain name semantic feature vector set based on a preset feature extraction loss function.
[0082] As an example, the above-mentioned preset feature extraction loss function can be but is not limited to one of the following: a cross entropy loss function, a least square function or a multi-detection cross entropy loss function.
[0083] In a seventh sub-step, in response to determining that the feature extraction loss value is less than the feature extraction target threshold, the initial semantic feature extraction model is determined as the semantic feature extraction model.
[0084] As an example, the above feature extraction target threshold may be 0.01.
[0085] Optionally, the execution subject may also adjust relevant parameters in the initial semantic feature extraction model in response to determining that the feature extraction loss value is greater than or equal to the feature extraction target threshold, determine the adjusted initial semantic feature extraction model as the initial semantic feature extraction model, and select a sample domain name detection vector from each sample domain name detection vector that has not been selected in the sample domain name detection vector set to perform the feature extraction training step again. The relevant parameters in the initial semantic feature extraction model may be adjusted by the preset adjustment algorithm.
[0086] Thus, at least one feature extraction model can be used to extract features from the detected domain name, and then the extracted feature vectors can be fused and connected to obtain a fused feature vector. Thus, the word features and the associated features between characters in the domain name can be fused, thereby improving the accuracy of abnormal domain name detection, and further, improving the accuracy of abnormal domain name warnings.
[0087] Step 104: Based on the domain name category feature information database, anomaly detection processing is performed on each domain name semantic feature information in the domain name semantic feature information set to generate a domain name anomaly detection result, and obtain a domain name anomaly detection result set.
[0088] In some embodiments, the execution subject may perform anomaly detection processing on each domain name semantic feature information in the domain name semantic feature information set based on the domain name category feature information library to generate a domain name anomaly detection result, and obtain a domain name anomaly detection result set. The domain name anomaly detection result may be information indicating that "the domain name is not abnormal" or information indicating that "the domain name is abnormal".
[0089] In some optional implementations of some embodiments, the execution subject performs anomaly detection processing on each domain name semantic feature information in the domain name semantic feature information group set based on the domain name category feature information library to generate a domain name anomaly detection result, which may include the following steps:
[0090] The first step is to determine the domain name category feature information corresponding to the domain name semantic feature information in the domain name category feature information database as the target domain name category feature information. The domain name category feature information of the same category as the domain name represented by the domain name semantic feature information in the domain name category feature information database can be determined as the target domain name category feature information.
[0091] The second step is to determine the semantic feature similarity value between the target domain name category feature information and the domain name semantic feature information. The semantic feature similarity value between the target domain name category feature information and the domain name semantic feature information can be determined by a preset similarity function.
[0092] As an example, the preset similarity function may be, but is not limited to, at least one of the following: a Pearson correlation coefficient function, a Euclidean distance function, or a log-likelihood similarity function.
[0093] The third step is to generate the domain name anomaly detection result based on the semantic feature similarity value. The above-mentioned domain name anomaly detection result is generated based on the semantic feature similarity value, which can be: in response to determining that the semantic feature similarity value is greater than or equal to the target similarity threshold, the first preset detection result is determined as the domain name anomaly detection result. In response to determining that the semantic feature similarity value is less than the target similarity threshold, the second preset detection result is determined as the domain name anomaly detection result. Here, the first preset detection result can be information representing that "there is no anomaly in the domain name". The second preset detection result can be information representing that "there is anomaly in the domain name".
[0094] As an example, the target similarity threshold may be 0.8.
[0095] Step 105: Send each domain name anomaly detection result that meets the preset anomaly condition and the corresponding initial domain name information in the domain name anomaly detection result group to an alarm terminal for alarm processing.
[0096] In some embodiments, the execution subject may send each domain name anomaly detection result that meets the preset anomaly condition in the domain name anomaly detection result group and the corresponding initial domain name information to the alarm terminal for alarm processing. The preset anomaly condition may be that the domain name anomaly detection result is information indicating that "the domain name is abnormal". Here, the alarm terminal may be a terminal for displaying warning text or emitting a prompt sound in response to receiving the initial domain name information.
[0097] The above-mentioned various embodiments of the present application have the following beneficial effects: through the domain name anomaly detection method based on the domain name detection model of some embodiments of the present application, the security of network services can be improved. Specifically, the reason for the reduction of the security of network services is that the pre-set rule base needs to be updated regularly. Before the rule base is updated, it is difficult to detect the newly generated abnormal domain name in time, which makes it difficult to warn the abnormal domain name in time. Based on this, the domain name anomaly detection method based on the domain name detection model of some embodiments of the present application first obtains the initial domain name information set and the domain name category feature information library. Thus, the domain name to be detected and the pre-set domain name rule library can be obtained, so as to perform subsequent domain name anomaly detection. Secondly, the above-mentioned initial domain name information set is input into the pre-trained domain name detection model to obtain the domain name detection information group set. Thus, the domain name can be detected according to the category to which the domain name belongs. Then, each domain name detection information in the above-mentioned domain name detection information group set is subjected to semantic feature extraction processing to generate domain name semantic feature information, and obtain the domain name semantic feature information group set. Thus, the content of the domain name can be further feature extracted, so as to perform subsequent domain name anomaly detection. Then, based on the above-mentioned domain name category feature information library, each domain name semantic feature information in the above-mentioned domain name semantic feature information group set is subjected to anomaly detection processing to generate a domain name anomaly detection result, and a domain name anomaly detection result group set is obtained. Thus, anomaly detection can be performed according to the category to which the domain name belongs and the content of the domain name, further improving the accuracy of abnormal domain name detection. Finally, each domain name anomaly detection result that meets the preset abnormal condition in the above-mentioned domain name anomaly detection result group set and the corresponding initial domain name information are sent to the alarm terminal for alarm processing. Thus, an alarm can be issued for abnormal domain names. Therefore, some domain name anomaly detection methods based on domain name detection models of the present application can first classify and detect the domain name, then perform semantic extraction on the content of the domain name, and at the same time, perform anomaly detection on the domain name according to the category information and semantic information of the domain name, and then issue an alarm for the abnormal domain name. Therefore, the newly generated abnormal domain name can be detected in time, so that the abnormal domain name can be alarmed in time, and then the security of network services can be improved.
[0098] The present application also provides a computer device 200. Figure 2 As shown, the computer device 200 includes: a bus 201, a processor 202, a memory 203 and a communication interface 204. The processor 202, the memory 203 and the communication interface 204 communicate with each other through the bus 201. The computer device 200 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computer device 200.
[0099] The bus 201 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 2 The bus 201 is represented by only one line, but it does not mean that there is only one bus or one type of bus. The bus 201 may include a path for transmitting information between various components of the computer device 200 (for example, the memory 203, the processor 202, and the communication interface 204).
[0100] The processor 202 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0101] The memory 203 may include a volatile memory, such as a random access memory (RAM). The memory 203 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0102] The memory 203 stores executable program codes, and the processor 202 executes the executable program codes to respectively implement the functions of the aforementioned acquisition module, sampling module, determination module, and mixing module, thereby implementing the aforementioned domain name anomaly detection method based on the domain name detection model. That is, the memory 203 stores instructions for executing the aforementioned domain name anomaly detection method based on the domain name detection model.
[0103] The communication interface 204 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computer device 200 and other devices or a communication network.
[0104] An embodiment of the present application also provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to execute the above-mentioned domain name anomaly detection method based on the domain name detection model.
[0105] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned domain name anomaly detection method based on the domain name detection model.
[0106] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0107] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present application.
Claims
1. A domain name anomaly detection method based on a domain name detection model, comprising: Obtaining an initial domain name information set and a domain name category feature information database; Inputting the initial domain name information set into a pre-trained domain name detection model to obtain a domain name detection information group set; Performing semantic feature extraction processing on each domain name detection information in the domain name detection information set to generate domain name semantic feature information, thereby obtaining a domain name semantic feature information set; Based on the domain name category feature information database, performing anomaly detection processing on each domain name semantic feature information in the domain name semantic feature information set to generate a domain name anomaly detection result, and obtaining a domain name anomaly detection result set; Sending each domain name anomaly detection result that meets the preset anomaly condition in the domain name anomaly detection result group and the corresponding initial domain name information to the alarm terminal for alarm processing; The step of performing semantic feature extraction processing on each domain name detection information in the domain name detection information set to generate domain name semantic feature information includes: Performing vectorization processing on the domain name detection information to obtain a domain name detection vector; Acquire a sample domain name detection information set and a sample domain name semantic feature information set, wherein the sample domain name detection information in the sample domain name detection information set corresponds one-to-one to the sample domain name semantic feature information in the sample domain name semantic feature information set; Performing vectorization processing on each sample domain name detection information in the sample domain name detection information set to generate a sample domain name detection vector, thereby obtaining a sample domain name detection vector set; Performing vectorization processing on each sample domain name semantic feature information in the sample domain name semantic feature information set to generate a sample domain name semantic feature vector, thereby obtaining a sample domain name semantic feature vector set; Select a sample domain name detection vector from the sample domain name detection vector set and perform the following feature extraction training steps: Inputting the sample domain name detection vector into a first feature extraction sub-model included in an initial semantic feature extraction model to obtain a first initial domain name semantic feature vector, wherein the initial semantic feature extraction model further includes: a second feature extraction sub-model, a fusion layer, a connection layer, and a normalization layer; Inputting the sample domain name detection vector into a second feature extraction sub-model included in the initial semantic feature extraction model to obtain a second initial domain name semantic feature vector; Inputting the first initial domain name semantic feature vector and the second initial domain name semantic feature vector into a fusion layer included in the initial semantic feature extraction model to obtain an initial domain name semantic feature fusion vector; Inputting the initial domain name semantic feature fusion vector into the connection layer included in the initial semantic feature extraction model to obtain the initial domain name semantic feature connection vector; Inputting the initial domain name semantic feature connection vector into the normalization layer included in the initial semantic feature extraction model to obtain the initial domain name semantic feature vector; Based on a preset feature extraction loss function, determine feature extraction loss values of the sample domain name semantic feature vector and the initial domain name semantic feature vector corresponding to the sample domain name detection vector in the sample domain name semantic feature vector set; In response to determining that the feature extraction loss value is less than the feature extraction target threshold, determining the initial semantic feature extraction model as the semantic feature extraction model; Inputting the domain name detection vector into a pre-trained semantic feature extraction model to obtain a domain name semantic feature vector; The domain name semantic feature vector is determined as the domain name semantic feature information.
2. The domain name anomaly detection method based on the domain name detection model according to claim 1, wherein: The method further comprises: In response to determining that the feature extraction loss value is greater than or equal to the feature extraction target threshold, adjusting relevant parameters in the initial semantic feature extraction model, determining the adjusted initial semantic feature extraction model as the initial semantic feature extraction model, and selecting a sample domain name detection vector from each sample domain name detection vector that has not been selected in the sample domain name detection vector set, so as to perform the feature extraction training step again.
3. The domain name anomaly detection method based on the domain name detection model according to claim 1, wherein: The performing anomaly detection processing on each domain name semantic feature information in the domain name semantic feature information set based on the domain name category feature information library to generate a domain name anomaly detection result includes: Determine the domain name category feature information corresponding to the domain name semantic feature information in the domain name category feature information database as the target domain name category feature information; Determine a semantic feature similarity value between the target domain name category feature information and the domain name semantic feature information; Based on the semantic feature similarity value, the domain name anomaly detection result is generated.
4. A computer device, wherein: The computer device comprises a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 2 are implemented.
5. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.
