Domain name data classification method and device, electronic equipment and storage medium

By obtaining and matching domain name log data and CDN domain name suffix database, extracting features and training classification models, it solves the problem that CDN domain name classification technology is difficult to deal with complex structures and dynamic changes, achieves efficient and accurate domain name classification and dynamic updates, and improves the system Adaptability.

CN118690248APending Publication Date: 2024-09-24CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410915293.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing CDN domain name classification technology is difficult to cope with complex domain name structures and dynamic changes, resulting in insufficient classification accuracy, low efficiency and high misclassification rate.

Method used

By obtaining the domain name log data and the CDN domain name suffix database, perform matching processing to obtain the domain name positive sample set and the domain name to be classified, extract features and train the classification model, predict whether the domain name belongs to the CDN domain name, and update the suffix database through CDN service verification.

Benefits of technology

It achieves efficient classification of domain name data, avoids the limitations of manual data collection, improves CDN domain name recognition accuracy and classification adaptability, and enhances the system's adaptability to complex dynamic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690248A
    Figure CN118690248A
Patent Text Reader

Abstract

The invention provides a domain name data classification method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring domain name log data and a CDN domain name suffix library, and matching a plurality of domain names in the domain name log data with the CDN domain name suffix library to obtain a domain name positive sample set and to-be-classified domain names; performing feature extraction on each domain name in the domain name positive sample set to obtain a domain name feature set; training a domain name classification model according to the domain name positive sample set and the domain name feature set, and predicting whether the to-be-classified domain name belongs to the CDN domain name through the domain name classification model; and verifying the prediction result of the domain name classification model through the CDN service, and updating the CDN domain name suffix library according to the verification result. According to the method, efficient classification of the domain name data is realized, limitation of manual collection of the domain name data is avoided, accurate identification of the CDN domain names is also realized, and accuracy and adaptability of domain name classification are improved by dynamically updating the CDN domain name suffix library.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of DNS technology, and in particular to a domain name data classification method, device, electronic device and storage medium. Background Art

[0002] The Content Delivery Network (CDN) distributes source site content to acceleration nodes around the world. When a user initiates a website resource request to the source domain website through the source domain name, the request will be adjusted to the node closest to the user, thereby increasing the user's network access speed. For content providers, their source domain names belong to their assets, but the CNAME domain names used to achieve content distribution are controlled and resolved by the CDN provider and are not their assets. Therefore, when conducting asset mapping, it is necessary to distinguish between the domain names belonging to the content provider and the CDN domain names belonging to the CDN provider.

[0003] At present, the available CDN domain name classification technologies mainly include: keyword matching method and supervised machine learning method; however, the existing domain name classification methods rely on simple rule matching or static feature learning, which is difficult to cope with complex domain name structures and dynamic changes, resulting in insufficient classification accuracy and high misclassification rate; in addition, supervised machine learning methods require a lot of computing resources and time when processing a large number of domain names, resulting in low efficiency in domain name classification. Summary of the invention

[0004] The present application provides a domain name data classification method, device, electronic device and storage medium to solve the technical problems that the existing CDN domain name classification technology is difficult to cope with complex domain name structures and dynamic changes, as well as the domain name classification accuracy is insufficient, the classification efficiency is low, and the misclassification rate is high.

[0005] In a first aspect, the present application provides a domain name data classification method, comprising:

[0006] Obtain domain name log data and a CDN domain name suffix library, wherein the domain name log data includes multiple domain names;

[0007] Matching the multiple domain names with the CDN domain name suffix library to obtain a domain name positive sample set and a domain name to be classified, wherein the domain name positive sample set is used to indicate domain names that match the CDN domain name suffix library consistently, and the domain name to be classified is used to indicate domain names that do not match the CDN domain name suffix library consistently;

[0008] Extracting features from each domain name in the domain name positive sample set to obtain a domain name feature set;

[0009] Training a domain name classification model based on the domain name positive sample set and the domain name feature set, and predicting whether the domain name to be classified belongs to a CDN domain name through the domain name classification model;

[0010] The prediction result of the domain name classification model is verified through the CDN service, and the CDN domain name suffix library is updated according to the verification result.

[0011] Optionally, matching the multiple domain names with the CDN domain name suffix library to obtain a domain name positive sample set and a domain name to be classified includes:

[0012] Generate domain name resolution chains for the multiple domain names respectively according to the domain name log data, the domain name resolution chains are used to indicate resolution paths of the domain name system for the domain names;

[0013] The domain name resolution chains of the multiple domain names are matched with the CDN domain name suffix library respectively to obtain the domain name positive sample set and the domain name to be classified.

[0014] Optionally, the matching processing is performed on the domain name resolution chain of each domain name and the CDN domain name suffix library to obtain the domain name positive sample set and the domain name to be classified, including:

[0015] According to the domain name resolution chains of the multiple domain names, respectively extracting the domain name information recorded in the multiple domain name resolution chains;

[0016] Matching the domain name information of the multiple domain name resolution chains with the CDN domain name suffix library respectively;

[0017] For each domain name resolution chain, if at least one domain name information in the domain name resolution chain matches the suffix domain name in the CDN domain name suffix library, the domain name corresponding to the domain name resolution chain is marked as a positive sample and added to the domain name positive sample set;

[0018] If there is no domain name information in the domain name information of the domain name resolution chain that matches the suffix domain name in the CDN domain name suffix library, the domain name corresponding to the domain name resolution chain is marked as the domain name to be classified.

[0019] Optionally, extracting features from each domain name in the domain name positive sample set to obtain a domain name feature set includes:

[0020] Parsing the domain name positive sample set to obtain a domain name resolution log corresponding to each domain name, wherein the domain name resolution log includes an IP address distribution feature and a CNAME text feature;

[0021] For each domain name in the domain name positive sample set, determining the similarity between the domain name and the domain name resolution chain corresponding to the domain name;

[0022] The domain name feature set is generated based on the domain name resolution logs of multiple domain names in the domain name positive sample set and the corresponding similarities.

[0023] Optionally, training a domain name classification model according to the domain name positive sample set and the domain name feature set, and predicting whether the domain name to be classified belongs to a CDN domain name by using the domain name classification model includes:

[0024] Get the pre-trained classification model;

[0025] Based on the domain name positive sample set and the domain name feature set, the pre-trained classification model is trained to obtain a domain name classification model;

[0026] The domain name to be classified is predicted by the domain name classification model, and multiple domain names to be classified belonging to the CDN domain name in the prediction results are respectively determined as target domain names.

[0027] Optionally, verifying the prediction result of the domain name classification model by using the CDN service includes:

[0028] Determine a target domain name among the domain names to be classified, wherein the target domain name is a domain name predicted to be a CDN domain name;

[0029] Calling multiple public domain name servers in different geographical locations through the CDN service, for any target domain name, controlling the multiple public domain name servers to perform resolution processing on the target domain name to obtain multiple resolution results;

[0030] If the multiple resolution results are inconsistent, determining multiple corresponding domain name suffixes for each target domain name in the domain name to be classified;

[0031] The CDN domain name suffix library is updated based on the domain name suffixes of each target domain name to obtain a new CDN domain name suffix library.

[0032] Optionally, the method further includes:

[0033] Determine the number of second-level domain names served by different second-level domain name suffixes in the domain name log data;

[0034] Obtaining a preset domain name quantity threshold, and for each second-level domain name suffix, comparing the preset domain name quantity threshold with the number of second-level domain names corresponding to the second-level domain name suffix;

[0035] If the number of the second-level domain names is greater than the preset domain name number threshold, the second-level domain name suffix is ​​added to the CDN domain name suffix library.

[0036] In a second aspect, the present application provides a domain name data classification device, comprising:

[0037] The acquisition module is used to acquire domain name log data and a CDN domain name suffix library, wherein the domain name log data includes multiple domain names.

[0038] The processing module is used to match the multiple domain names with the CDN domain name suffix library to obtain a domain name positive sample set and a domain name to be classified, wherein the domain name positive sample set is used to indicate the domain names that match the CDN domain name suffix library, and the domain name to be classified is used to indicate the domain names that do not match the CDN domain name suffix library.

[0039] The processing module is further used to extract features from each domain name in the domain name positive sample set to obtain a domain name feature set.

[0040] The processing module is further used to train a domain name classification model according to the domain name positive sample set and the domain name feature set, and predict whether the domain name to be classified belongs to a CDN domain name through the domain name classification model.

[0041] The processing module is also used to verify the prediction result of the domain name classification model through the CDN service, and update the CDN domain name suffix library according to the verification result.

[0042] Optionally, the processing module is further used to generate domain name resolution chains for the multiple domain names respectively according to the domain name log data, and the domain name resolution chains are used to indicate the resolution path of the domain name system for the domain name.

[0043] The processing module is further used to match the domain name resolution chains of the multiple domain names with the CDN domain name suffix library respectively to obtain the domain name positive sample set and the domain name to be classified.

[0044] Optionally, the processing module is further used to extract domain name information recorded in multiple domain name resolution chains respectively according to the domain name resolution chains of the multiple domain names.

[0045] The processing module is further used to match the domain name information of the multiple domain name resolution chains with the CDN domain name suffix library respectively.

[0046] For each domain name resolution chain, if there is at least one domain name information in the domain name information of the domain name resolution chain that matches the suffix domain name in the CDN domain name suffix library, the processing module is also used to mark the domain name corresponding to the domain name resolution chain as a positive sample and add it to the domain name positive sample set.

[0047] If there is no domain name information in the domain name information of the domain name resolution chain that matches the suffix domain name in the CDN domain name suffix library, the processing module is also used to mark the domain name corresponding to the domain name resolution chain as the domain name to be classified.

[0048] Optionally, the processing module is further used to perform resolution processing on the domain name positive sample set to obtain a domain name resolution log corresponding to each domain name, wherein the domain name resolution log includes IP address distribution features and CNAME text features.

[0049] The domain name data classification device also includes: a determination module.

[0050] The determination module is used to determine, for each domain name in the domain name positive sample set, a similarity between the domain name and a domain name resolution chain corresponding to the domain name.

[0051] The processing module is further configured to generate the domain name feature set based on the domain name resolution logs of multiple domain names in the domain name positive sample set and the corresponding similarities.

[0052] Optionally, the acquisition module is also used to acquire a pre-trained classification model.

[0053] The processing module is further used to train the pre-trained classification model based on the domain name positive sample set and the domain name feature set to obtain a domain name classification model.

[0054] The processing module is further used to perform prediction processing on the domain name to be classified through the domain name classification model.

[0055] The determination module is further used to determine the multiple to-be-classified domain names belonging to the CDN domain name in the prediction result as target domain names respectively.

[0056] Optionally, the determination module is further used to determine a target domain name among the domain names to be classified, wherein the target domain name is a domain name predicted to be a CDN domain name.

[0057] The processing module is further used to call multiple public domain name servers in different geographical locations through the CDN service, and for any target domain name, control the multiple public domain name servers to perform resolution processing on the target domain name to obtain multiple resolution results.

[0058] If the multiple parsing results are inconsistent, the determination module is further configured to determine a corresponding plurality of domain name suffixes for each target domain name in the domain names to be classified.

[0059] The processing module is further used to update the CDN domain name suffix library based on the domain name suffix of each target domain name to obtain a new CDN domain name suffix library.

[0060] Optionally, the determination module is further used to determine the number of second-level domain names served by different second-level domain name suffixes in the domain name log data.

[0061] The acquisition module is further used to acquire a preset domain name quantity threshold.

[0062] The processing module is further configured to compare, for each second-level domain name suffix, the preset domain name quantity threshold with the quantity of second-level domain names corresponding to the second-level domain name suffix.

[0063] If the number of the second-level domain names is greater than the preset domain name number threshold, the processing module is further configured to add the second-level domain name suffix to the CDN domain name suffix library.

[0064] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0065] The memory stores computer-executable instructions;

[0066] The processor executes the computer-executable instructions stored in the memory to implement the domain name data classification method as described in the first aspect and various possible implementations of the first aspect.

[0067] In a fourth aspect, the present application provides a computer-readable storage medium having computer execution instructions stored thereon, which, when executed by a processor, are used to implement the domain name data classification method as described in the first aspect and various possible implementation methods of the first aspect.

[0068] In a fifth aspect, the present application provides a program product, including a computer program, which implements the domain name data classification method as described above when executed by a processor.

[0069] The domain name data classification method provided in the present application obtains domain name log data and a CDN domain name suffix library, generates domain name resolution chains of multiple domain names based on the domain name log data, and matches the domain name resolution chains of multiple domain names with the CDN domain name suffix library to obtain a domain name positive sample set and a domain name to be classified; the domain name positive sample set is parsed to obtain a domain name resolution log corresponding to each domain name, and for each domain name in the domain name positive sample set, the similarity between the domain name and the domain name resolution chain corresponding to the domain name is determined, and a domain name feature set is generated based on the domain name resolution logs and the corresponding similarities of multiple domain names in the domain name positive sample set; a pre-trained classification model is obtained, and the pre-trained classification model is trained based on the domain name positive sample set and the domain name feature set to obtain a domain name classification model; the domain name to be classified is predicted by the domain name classification model, and multiple domain names to be classified that belong to the CDN domain name in the prediction results are determined as target domain names; multiple target domain names are verified by the CDN service, and the CDN domain name suffix library is updated according to the verification results. This method achieves efficient classification of domain name data, avoids the limitations of manual collection of domain name data, and realizes accurate identification of CDN domain names. By dynamically updating the CDN domain name suffix library, it improves the accuracy and adaptability of domain name classification and enhances the system's adaptability to the complex and dynamically changing Internet domain name environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0071] Figure 1 A schematic diagram of a scenario of the domain name data classification method provided for this application;

[0072] Figure 2 Schematic diagram of the process of the domain name data classification method provided for this application Figure 1 ;

[0073] Figure 3 Schematic diagram of the process of the domain name data classification method provided for this application Figure 2 ;

[0074] Figure 4 Schematic diagram of the process of the domain name data classification method provided for this application Figure 3 ;

[0075] Figure 5 It is a flowchart of a domain name data classification method based on PU learning algorithm provided by this application;

[0076] Figure 6 A schematic diagram of the structure of the domain name data classification device provided by this application;

[0077] Figure 7 A schematic diagram of the structure of the domain name data classification device provided in this application.

[0078] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0079] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0080] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein, for example.

[0081] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0082] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0083] First, the terms involved in this application are explained.

[0084] Domain name: It is a unique name used to identify a website or server on the Internet. It consists of a string of characters separated by dots, usually including top-level domain names (such as .com, .net, .org, etc.) and second-level domain names (i.e. the specific name of the website or server). The main function of a domain name is to match an easy-to-remember character combination with the computer's IP address, so that people can access resources on the Internet by entering the domain name without having to remember the complex numerical IP address.

[0085] Domain Name System: Domain Name System, referred to as DNS, is a distributed database system used to resolve user-friendly domain names into computer-readable IP addresses; it is a core service of the Internet that provides a mapping relationship between domain names and IP addresses.

[0086] Content Delivery Network: Content Delivery Network, referred to as CDN, is a network composed of server clusters distributed in different geographical locations, which work together to transmit Internet content such as web pages, videos and other media resources faster. The main purpose of CDN is to reduce latency and increase content transmission speed by caching content on servers close to the user's physical location. In addition, CDN can also help cope with high traffic demands by distributing requests among multiple servers to prevent any single server from being overloaded, ensuring service stability and responsiveness.

[0087] CNAME: Canonical Name, is a record type in the DNS system, used to map one domain name to another domain name; when a user queries a CNAME record, the DNS system returns another domain name, and then needs to query the returned domain name again to obtain the final IP address or other resource information.

[0088] A record: A record type in the DNS system that is used to map a domain name to an IPv4 address.

[0089] Semi-Supervised Learning: Semi-Supervised Learning, referred to as SSL, is an important branch of machine learning. It combines the ideas of supervised learning and unsupervised learning. Its basic idea is to use a small amount of labeled data (that is, data whose true category is known) and a large amount of unlabeled data (that is, data whose true category is unknown) to train the model.

[0090] The content distribution network distributes the source site content to acceleration nodes around the world. When a user initiates a website resource request to the source domain website through the source domain name, the request will be adjusted to the node closest to the user, thereby increasing the user's network access speed. For content providers, their source domain names belong to the content provider's assets, but the CNAME domain name for content distribution is controlled and resolved by the CDN provider and is not an asset of the content provider. Therefore, when conducting asset mapping, it is necessary to distinguish between the domain name belonging to the content provider and the CDN domain name belonging to the CDN provider.

[0091] At present, the available CDN domain name detection technologies mainly include: keyword matching method and supervised machine learning method; among them, the keyword matching method can segment the text to be matched, extract the keywords therein, and match these keywords with the preset keyword list, so as to screen out domain names related to CDN; the supervised machine learning method, by training the machine learning model, learns the rules and patterns from a large amount of data, so as to determine whether the domain name to be identified is related to CDN.

[0092] However, due to the huge number of domain names in the Internet environment and their constant changes, existing domain name classification methods are difficult to classify domain names quickly and effectively, and are difficult to cope with complex domain name structures and dynamic changes; keyword matching methods rely on manual collection of keywords related to CDN domain names or CDN providers, which requires a lot of manual intervention and is prone to false positives and false negatives, leading to inaccurate domain name classification; supervised machine learning methods also rely on a large amount of labeled data for training, and the collected labeled data is easily affected by the network environment, making the labeled data inaccurate, resulting in inefficient domain name classification.

[0093] The domain name data classification method provided in this application is intended to solve the above technical problems in the prior art.

[0094] First, the implementation scenario of this application is described.

[0095] Figure 1 A schematic diagram of the scenario of the domain name data classification method provided in this application. Figure 1As shown, the user device 101 is connected to the server 102 where the domain name system is located, and the server 102 where the domain name system is located is connected to the edge server 103 group in the CDN network; the server 102 where the domain name system is located can receive the domain name query request sent by the user device 101, and parse the domain name query request. Based on the parsing process of the acquired domain name, the domain name classification module set on the server 102 can predict whether the domain names from different user devices 101 use the CDN service, thereby assisting the domain name system in managing the existing domain names; when the domain name classification module determines that the CDN service has been used, After the domain name, the edge server group 103 in the CDN network at different geographical locations can be called to resolve the domain name that has used the CDN service respectively, and the obtained resolution results are compared. When the resolution results output by the edge servers in different geographical locations are inconsistent, it can be further determined that the domain name belongs to the domain name that has used the CDN service; wherein the user device 101 can be, for example, a mobile terminal or a user-side server; the server 102 where the domain name system is located can be, for example, a central server where the domain name system is located; the edge server 103 group under the CDN network can be, for example, multiple edge servers in different geographical locations.

[0096] The present application provides a domain name data classification method, which matches the domain name resolution log with the preset CDN domain name suffix library, and determines the domain names with consistent matches as the positive sample set, and the domain names with inconsistent matches as the domain names to be classified; for the positive sample set, the IP address distribution characteristics, CNAME text characteristics and corresponding similarities of different domain names are determined respectively, and the feature set of the positive sample set is generated thereby; the PU learning algorithm is adopted, and the model training is combined with the positive sample set and the corresponding feature set to generate a domain name classification model, and then the domain name classification model is controlled to classify the domain names to be classified; for any domain name that uses CDN service in the classification result, a distributed verification based on active request is performed, and when the verification is passed, the CDN domain name suffix library is dynamically updated. This method realizes the efficient classification of domain name data, avoids the limitations of manually collecting domain name data, and also realizes the accurate identification of CDN domain names, and by dynamically updating the CDN domain name suffix library, the accuracy and adaptability of domain name classification are improved, and the adaptability of the system to the complex and dynamically changing Internet domain name environment is enhanced.

[0097] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0098] Figure 2 Schematic diagram of the process of the domain name data classification method provided in the embodiment of the present application Figure 1 The execution subject of this embodiment may be, for example, a domain name classification module based on PU learning set in the domain name system. Figure 2 As shown, the domain name data classification method provided in this embodiment includes:

[0099] S201: Obtain domain name log data and CDN domain name suffix library.

[0100] S202: Match multiple domain names with the CDN domain name suffix library to obtain a domain name positive sample set and a domain name to be classified.

[0101] Among them, domain name log data is used to indicate the data information generated by the domain name system when processing the domain name query request sent by the user device; the CDN domain name suffix library is used to store and manage the secondary domain name suffixes used in the CDN service; the domain name positive sample set is used to indicate the domain names that match the CDN domain name suffix library, and the domain names to be classified that do not match the CDN domain name suffix library.

[0102] It can be understood that the executor of this step is the domain name classification module, and the domain name classification module is set in the domain name system. It is mainly used to distinguish whether the domain name involved uses the CDN service in the process of the domain name system processing the domain name query request of the user device. By accurately classifying whether the domain name uses the CDN service, the network traffic can be better monitored and managed to ensure the rational use of resources and the stability of services; the domain name system can provide the corresponding network address for the domain name query request sent by the user device to realize the website access needs of the user device. In the process of the domain name system providing services to the user device, the CDN service also plays an important role. Through the global node deployment and intelligent adjustment strategy of the CDN service, the content transmission speed can be greatly accelerated and the user experience can be improved; at the same time, the collaboration between the CDN service and the domain name system also ensures that users can accurately find the target website and obtain high-quality content services.

[0103] The CDN domain name suffix library usually refers to the domain name list or domain name rules used for acceleration in the CDN service, and these rules are managed and maintained by the CDN service provider; specifically, CDN service providers usually deploy multiple CDN nodes around the world, and each node contains part or all of the information in the CDN domain name suffix library; when a user requests the content of a website or application, the CDN will intelligently direct the user's request to the nearest CDN node, and then forward the request to the correct source server or cache server according to the rules in the CDN domain name suffix library; illustratively, when a user requests to access a website that uses CDN, the DNS server will direct the request to the nearest CDN node to provide faster content transmission and better performance. Specifically, the domain name suffixes stored in the CDN domain name suffix library are all second-level domain name suffixes, which refer to the part after the primary domain name, which is located under the top-level domain name; for example, in "www.111.com.cdn1.com", ".com" is the top-level domain name, "111.com" is the second-level domain name, and "cdn1.com" is the second-level domain name suffix.

[0104] The domain name log data within a preset time window is obtained, and the CDN domain name suffix library that can be provided by the current CDN service is called; the domain name log data includes multiple domain names, that is, the domain names corresponding to the query requests of multiple user devices, and the multiple domain names within the preset time window that can be obtained at that time are matched with the CDN domain name suffix library; if there is a domain name that matches the CDN domain name suffix library, it indicates that the domain name is stored in the CDN domain name suffix library, and at this time, the corresponding domain name can be determined as a positive sample; if there is a domain name that does not match the CDN domain name suffix library, it indicates that the domain name is not stored in the CDN domain name suffix library, and at this time, the corresponding domain name can be determined as a domain name to be classified; traverse the multiple domain names that can be obtained within the preset time window until the multiple domain names are matched with the CDN domain name suffix library, add the obtained multiple positive samples to the same set, and determine the set as the domain name positive sample set.

[0105] For example, if the preset time window is T, the domain name classification module based on PU learning obtains the domain name log data recorded by the domain name system within time T, and calls the CDN domain name suffix library that the current CDN service can provide; if the domain name log data obtained this time is: [www.111.com, www.111.com.cdn1.com], [www.222.com, www.222.com.cdn2.com], [www.333.com, www.333.com.cdn1.com], [www.444.com, www.444.com.cdn3.com], the corresponding second-level domain name suffixes include: "cdn1.com", "cdn2.com", "cdn3.com", "cdn4.com", "cdn5.com", "cdn6.com", "cdn7.com", "cdn8.com", "cdn9.com", "cdn10.com", "cdn11.com", "cdn12.com", "cdn13.com", "cdn14.com", "cdn15.com", "cdn16.com", "cdn17.com", "cdn18.com", "cdn19.com", "cdn2 n2.com", "cdn3.com"; if the second-level domain name suffixes stored in the CDN domain name suffix library obtained this time include: "cdn1.com", "cdn2.com", the corresponding second-level domain name suffix in the domain name log data is matched with the second-level domain name suffix in the CDN domain name suffix library, and the matching results are: "The second-level domain name suffixes with consistent matching include: 'cdn1.com', 'cdn2.com'" and "The second-level domain name suffixes with inconsistent matching include: 'cdn3.com'"; at this time, the second-level domain name suffixes with inconsistent matching are taken as the domain names to be classified, and the second-level domain name suffixes with consistent matching are added to the same set, and the set is determined as the domain name positive sample set.

[0106] S203: Extracting features from each domain name in the domain name positive sample set to obtain a domain name feature set.

[0107] The domain name feature set is used to indicate a collection of various attributes and features for describing and analyzing a domain name.

[0108] It can be understood that the feature extraction standard is pre-stored in the domain name classification module, and multiple feature categories are set in the feature extraction standard. Therefore, when performing feature extraction, feature data of different domain names in the domain name positive sample set can be extracted according to different feature categories, so as to complete the feature extraction of each domain name in the domain name positive sample set.

[0109] The conversion process between each domain name in the domain name positive sample set and the network address stored in the domain name system is obtained, that is, the mapping process between each domain name and the network address, so as to obtain the resolution process of different domain names; for any domain name in the domain name positive sample set, according to the feature category pre-stored in the domain name classification module, the feature information involved in the resolution process of the domain name is extracted; all domain names in the domain name positive sample set are traversed to obtain the feature information of multiple positive samples, and the domain name feature set of the domain name positive sample set is generated based on this.

[0110] For example, the multiple feature categories pre-stored in the domain name classification module include: the number of different IP addresses, the maximum number of dots ('.') in the CNAME record, the maximum number of dashes in the CNAME record, the maximum number of mapped user domain names of the CNAME record, the prefix similarity of the domain name and the CNAME record, and the suffix similarity of the domain name and the CNAME record; the second-level domain name suffixes in the domain name positive sample set obtained this time include: "cdn1.com" and "cdn2.com", and the corresponding domain names include: "www.111.com, www.222.com, www.333.com", and the DNS resolution log of the domain name www.111.com corresponding to the second-level domain name suffix cdn1.com in the domain name positive sample set is shown in Table 1 below:

[0111] Table 1

[0112] Domain RR type RR www.111.com CNAME www.111.com.cdn1.com www.111.com.cdn1.com CNAME 11111.cdn1.com 11111.cdn1.com CNAME 22222.cdn1.com 22222.cdn1.com A 2.2.2.1 22222.cdn1.com A 2.2.2.2 22222.cdn1.com A 2.2.2.3

[0113] Wherein, Domain is the domain name, RR is the resource record, RR type is the record type, and the record types obtained this time include: CNAME and A; based on the above table; the number of different IP addresses, that is, the number of different IP addresses to which the domain name is finally mapped in the DNS resolution log, then the characteristic value of the domain name www.111.com is 3; the maximum number of dots ('.') in the CNAME record, that is, the maximum number of '.' contained in a single CNAME record in the DNS resolution log of the domain name, then the characteristic value of the domain name www.111.com is 4; the maximum number of dashes in the CNAME record, that is, the maximum number of '_' and '-' contained in a single CNAME record in the DNS resolution log of the domain name, then the characteristic value of the domain name www.111.com is 0; the maximum number of mapped user domain names of the CNAME record, that is, the maximum number of secondary user domain names served by the secondary domain name of a single CNAME record in the DNS resolution log of the domain name The number of domain names, then the feature value of the domain name www.111.com is 3; the prefix similarity between the domain name and the CNAME record, that is, in the DNS resolution log of the domain name, there is at least one CNAME record whose prefix matches the domain name, then the corresponding feature value is 1, otherwise it is 0, and the feature value of the domain name www.111.com is 1; the suffix similarity between the domain name and the CNAME record, that is, in the DNS resolution log of the user's domain name, the second-level domain name suffix of all CNAME records matches the second-level domain name suffix of the user's domain name, then the feature value is 1, otherwise it is 0, and the feature value of the domain name www.111.com is 0; the above feature determination process for the domain name www.111.com is also applicable to the domain names corresponding to other second-level suffixes in the positive sample set of the domain name, so as to extract the features in the positive sample set of the domain name, and add the obtained feature extraction results to the same set to obtain the domain name feature set.

[0114] S204: training a domain name classification model according to the domain name positive sample set and the domain name feature set, and predicting whether the domain name to be classified belongs to a CDN domain name through the domain name classification model.

[0115] It can be understood that the domain name classification model adopts a semi-supervised learning algorithm, which combines the domain name log data that can match the CDN domain name suffix library and the corresponding domain name features to achieve accurate classification of domain names that cannot match the CDN domain name suffix library.

[0116] The domain name positive sample set and domain name feature set obtained this time are used as training data sets for model training to train the domain name classification model; after the domain name classification model is trained, the domain name to be classified is input into the domain name classification model, and based on the output result, it is determined whether the domain name to be classified belongs to the CDN domain name.

[0117] It can be understood that during the training process of the domain name classification model, the model can more accurately identify and classify domain names by learning the association between features and domain names using CDN services; therefore, the domain name classification model includes not only a semi-supervised learning algorithm, but also a domain name feature extraction submodule.

[0118] For example, the semi-supervised learning algorithm used this time is the PU learning algorithm, and the PU learning algorithm is used to process the domain name positive sample set and the domain name feature set, so as to learn the relationship between the features and the domain names that use the CDN service, and complete the training of the domain name classification model; based on the trained domain name classification model, the domain names to be classified that are obtained this time are classified, and the output result of the domain name classification model is the possibility score of each domain name to be classified using the CDN service; at this time, the score threshold T is set 1 , and the likelihood score is greater than T 1 The user domain name is marked as a domain name that uses CDN services, and the remaining domain names are marked as domain names that do not use CDN services, thereby completing the classification of the domain names to be classified; when the secondary domain name suffix that is inconsistent with the CDN suffix library is "cdn3.com", its corresponding domain name is "www.444.com", that is, the domain name to be classified is "www.444.com", the domain name to be classified is input into the domain name classification model, and the domain name classification model extracts features of the domain name to be classified through the feature extraction submodule, and then predicts and scores whether the domain name uses CDN services based on the PUlearning learning algorithm, and the obtained scoring result is T 2 , compared with the predicted score T of the obtained domain name 2 With the score threshold T 1 The size relationship between them; when the prediction score T 2 and greater than or equal to the score threshold T 1 When the predicted score T 2 and less than the score threshold T 1 When the domain name "www.444.com" is determined to be a domain name that does not use CDN services. This application does not impose any special restrictions on the output results of the domain name classification model.

[0119] It is understandable that the threshold T 1 The setting of T is closely related to the performance of the domain classification model (such as accuracy, precision, recall and F1 score), application scenarios and business requirements (such as crisis tolerance and business goals), data distribution (such as the ratio of positive and negative samples and feature distribution) and model calibration (such as score calibration method). Based on the above influencing factors, the threshold T can be set independently. 1This application applies to the threshold T 1 No special restrictions.

[0120] S205: Verify the prediction result of the domain name classification model through the CDN service, and update the CDN domain name suffix library according to the verification result.

[0121] It is understandable that the purpose of verifying the prediction results of the domain name classification model is to ensure the accuracy and reliability of the domain name classification model, as well as to continuously improve and optimize the model performance and update the CDN domain name suffix library to maintain its timeliness and accuracy, thereby improving the overall performance and reliability of the entire domain name classification module.

[0122] The servers in the CDN network are usually distributed in multiple geographical locations. These servers are mainly responsible for resolving domain names and converting domain name query requests from user devices into corresponding network addresses. When verifying the output results of the domain name classification model, any domain name in the output results can be resolved using servers in multiple different geographical locations in the CDN network to determine the accuracy of the domain name classification model.

[0123] By calling multiple CDN servers in different geographical locations through the CDN service, any domain name in the prediction results of the domain name classification model is resolved by using the multiple CDN servers called at that time; when user devices in different geographical locations send out domain name query requests, the CDN service will allocate a network address to the user device nearby. Therefore, if the resolution results of multiple CDN servers are exactly the same, the corresponding domain name can be verified as a domain name that does not use the CDN service, otherwise it can be verified as a domain name that uses the CDN service; according to the verification result, the secondary domain name suffix corresponding to the domain name that uses the CDN service is added to the CDN domain name suffix library to realize dynamic update of the CDN domain name suffix.

[0124] For example, multiple CDN servers in different geographical locations are called through the CDN service, and the CDN servers called this time may be: CDN server 1 and CDN server 2; when the domain name in the prediction result of the domain name classification model includes: "www.444.com", CDN server 1 and CDN server 2 are controlled to resolve the domain name respectively, and the resolution process of the domain name on different CDN servers is determined; if the CNAME record list and IP address list of CDN server 1 and CDN server 2 for the domain name "www.444.com" are consistent, it indicates that the resolution process of the domain name is not affected by the geographical location, that is, there is no need to use the CDN service, and the domain name is verified as not using CNAME record list and IP address list of CDN server 1 and CDN server 2. DN service domain name; if the CNAME record list and IP address list of CDN server 1 and CDN server 2 for the domain name "www.444.com" are inconsistent, it means that the resolution process of the domain name is affected by the geographical location, that is, it is necessary to use the CDN service to call CDN servers in different geographical locations to meet the query needs of user devices. At this time, the domain name is verified as a domain name using the CDN service; if the verification result shows that the domain name "www.444.com" uses the CDN service, the corresponding second-level domain name suffix includes: "cdn3.com", at this time, the second-level domain name suffix "cdn3.com" is added to the CDN domain name suffix library to realize the dynamic update of the CDN domain name suffix.

[0125] The domain name data classification method provided in this embodiment obtains domain name log data and CDN domain name suffix library, and matches multiple domain names in the domain name log data with the CDN domain name suffix library to obtain a domain name positive sample set and a domain name to be classified; extracts features from each domain name in the domain name positive sample set to obtain a domain name feature set; trains a domain name classification model based on the domain name positive sample set and the domain name feature set, and predicts whether the domain name to be classified belongs to a CDN domain name through the domain name classification model; verifies the prediction result of the domain name classification model through the CDN service, and updates the CDN domain name suffix library based on the verification result. This method realizes efficient classification of domain name data, avoids the limitations of manually collecting domain name data, and also realizes accurate identification of CDN domain names, and improves the accuracy and adaptability of domain name classification by dynamically updating the CDN domain name suffix library.

[0126] Figure 3 Schematic diagram of the process of the domain name data classification method provided in the embodiment of the present application Figure 2 .like Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, the domain name data classification method is described in detail. The domain name data classification method shown in this embodiment includes:

[0127] S301: Obtain domain name log data and CDN domain name suffix library.

[0128] S302: Generate domain name resolution chains for the multiple domain names respectively according to the domain name log data.

[0129] The domain name resolution chain is used to indicate the resolution path of the domain name system for the domain name.

[0130] It can be understood that the domain name system stores the resolution process for different domain names, that is, the mapping process between each domain name and the network address, thereby determining the resolution path of different domain names and generating the corresponding domain name resolution chain.

[0131] Obtain the domain name log data within a preset time window, and call the CDN domain name suffix library that the current CDN service can provide; the domain name log data includes multiple domain names, that is, the domain names corresponding to the query requests of multiple user devices, determine the resolution paths of different domain names in the domain name log data, and determine them as the domain name resolution chains of the corresponding domain names.

[0132] For example, if the domain name log data obtained this time includes: [www.111.com, www.111.com.cdn1.com], [www.222.com, www.222.com.cdn2.com], [www.333.com, www.333.com.cdn1.com], [www.444.com, www.444.com.cdn3.com], the corresponding second-level domain name suffixes include: "cdn1.com", "cdn2.com", "cdn3.com"; among them, the DNS resolution log of the domain name "www.111.com" is shown in Table 1 above, it can be obtained that the corresponding domain name resolution chain is: [www.111.com, www.111.com.cdn1.com, 11111.cdn1.com, 22222.cdn1.com].

[0133] Preferably, the method further comprises:

[0134] Determine the number of second-level domain names served by different second-level domain name suffixes in the domain name log data; obtain a preset domain name quantity threshold, and for each second-level domain name suffix, compare the preset domain name quantity threshold with the number of second-level domain names corresponding to the second-level domain name suffix; if the number of second-level domain names is greater than the preset domain name quantity threshold, add the second-level domain name suffix to the CDN domain name suffix library.

[0135] The preset domain name quantity threshold is used to filter out high-traffic secondary domain name suffixes that require CDN services. The preset domain name quantity threshold may be N, for example.

[0136] It is understandable that CDN providers usually provide content distribution services for a large number of domain names in the form of alias records (CNAME records), and a CDN domain name suffix library initialization submodule is also provided in the domain name classification module. Therefore, in order to identify the domain names providing CDN services in the CNAME records, a sufficiently long time window can be defined to control the CDN domain name suffix library initialization submodule to collect the number of secondary user domain names served by different secondary domain name suffixes in the domain name log data within the time window, and generate a CDN domain name suffix library in combination with a preset domain name quantity threshold.

[0137] The CDN domain name suffix library initialization submodule can determine the number of second-level domain names served by different second-level domain name suffixes in the domain name log data; obtain a preset domain name quantity threshold, and for each second-level domain name suffix, compare the preset domain name quantity threshold with the number of second-level domain names corresponding to the second-level domain name suffix; if the number of second-level domain names is greater than the preset domain name quantity threshold, it indicates that the second-level domain name suffix has a high number of visits and traffic, and at this time, the second-level domain name suffix is ​​added to the CDN domain name suffix library; if the number of second-level domain names is not greater than the preset domain name quantity threshold, it indicates that the second-level domain name suffix does not have a high number of visits and traffic, and at this time, no processing is performed on the second-level domain name suffix.

[0138] For example, the parsing record of the domain name log data obtained this time is shown in Table 2 below:

[0139] Table 2

[0140] Domain RR type RR www.111.com CNAME www.111.com.cdn1.com www.222.com CNAME www.222.com.cdn1.com www.333.com CNAME www.444.com.cdn1.com www.444.com CNAME www.444.com.cdn2.com www.555.com CNAME www.555.com.cdn2.com aaa.555.com CNAME aaa.555.com.cdn2.com

[0141] Among them, the number of secondary user domain names served by the secondary CNAME suffix cdn1.com is 3, and the number of secondary user domain names served by the secondary CNAME suffix cdn2.com is 2; if the preset domain name quantity threshold is 2, the number of secondary user domain names corresponding to the secondary CNAME suffix cdn1.com is 3, which is greater than the preset domain name quantity threshold 2, that is, it meets the screening requirements and can be added to the CDN domain name suffix library; the number of secondary user domain names corresponding to the secondary CNAME suffix cdn2.com is 2, which is equal to the preset domain name quantity threshold 2, that is, the secondary CNAME suffix cdn2.com does not meet the screening requirements. At this time, no processing is performed on the secondary CNAME suffix cdn2.com.

[0142] S303: Match the domain name resolution chains of the multiple domain names with the CDN domain name suffix library respectively to obtain a domain name positive sample set and a domain name to be classified.

[0143] The domain name resolution chains of the multiple domain names obtained this time are matched with the CDN domain name suffix library; for each domain name resolution chain, if there is a second-level domain name suffix in the domain name resolution chain that matches the second-level domain name suffix in the CDN domain name suffix library, it means that the second-level domain name suffix is ​​stored in the CDN domain name suffix library, and it can be directly determined that the second-level domain name suffix belongs to the second-level domain name suffix that uses the CDN service. At this time, the domain name corresponding to the domain name resolution chain can be determined as a positive sample; if there is a second-level domain name suffix in the domain name resolution chain that does not match the CDN domain name suffix library, it means that the CDN domain name suffix library does not store the domain name. At this time, the domain name corresponding to the domain name resolution chain can be determined as a domain name to be classified; according to the matching results, the obtained multiple positive samples are added to the same set, and the set is determined as a domain name positive sample set.

[0144] Preferably, matching processing is performed on the domain name resolution chain and the CDN domain name suffix library of each domain name to obtain a domain name positive sample set and the domain name to be classified, which specifically also includes:

[0145] According to the domain name resolution chains of multiple domain names, the domain name information recorded in the multiple domain name resolution chains are respectively extracted; the domain name information of the multiple domain name resolution chains are respectively matched with the CDN domain name suffix library; for each domain name resolution chain, if there is at least one domain name information in the domain name resolution chain that matches the suffix domain name in the CDN domain name suffix library, the domain name corresponding to the domain name resolution chain is marked as a positive sample and added to the domain name positive sample set; if there is no domain name information in the domain name resolution chain that matches the suffix domain name in the CDN domain name suffix library, the domain name corresponding to the domain name resolution chain is marked as a domain name to be classified.

[0146] The domain name information is used to indicate the secondary domain name suffix involved in the domain name resolution process.

[0147] The domain name information recorded in multiple domain name resolution chains is extracted respectively, and the obtained multiple domain name information is matched with the CDN domain name suffix library; for each domain name resolution chain, if there is at least one domain name information in the domain name information of the domain name resolution chain that matches the suffix domain name in the CDN domain name suffix library, it means that there is at least one CNAME record in the domain name resolution chain whose suffix completely matches the suffix domain name in the CDN domain name suffix library. At this time, the domain name corresponding to the domain name resolution chain is marked as a positive sample and added to the domain name positive sample set; if there is no domain name information in the domain name information of the domain name resolution chain that matches the second-level domain name suffix in the CDN domain name suffix library, it means that the suffix of the CNAME record in the domain name resolution chain does not match the second-level domain name suffix in the CDN domain name suffix library. At this time, the domain name corresponding to the domain name resolution chain is marked as a domain name to be classified.

[0148] For example, the domain name obtained this time includes: "www.111.com", and the domain name resolution chain corresponding to the domain name "www.111.com" is: [www.111.com, www.111.com.cdn1.com, 11111.cdn1.com, 22222.cdn1.com], the domain name information in the domain name resolution chain is the corresponding second-level domain name suffix, and the second-level domain name suffix specifically includes: "cdn1.com"; the CDN domain name suffix library obtained this time includes: "cdn1.com" and "cdn2.com", and the second-level domain name suffix "cdn1.com" corresponding to the domain name resolution chain obtained this time is matched with the second-level domain name suffixes "cdn1.com" and "cdn2.com" in the CDN domain name suffix library, thereby obtaining that the second-level domain name suffix "cdn1.com" It completely matches the second-level domain name suffix "cdn1.com" in the CDN domain name suffix library. At this time, "www.111.com" can be marked as a positive sample and added to the positive sample set; the domain name obtained this time also includes: "www.444.com", and the domain name resolution chain corresponding to the domain name "www.444.com" is: [www.444.com, www.444.com.cdn3.com, 44444.cdn3.com, 333333.cdn3.com], from which it can be determined that the corresponding second-level domain name suffix is ​​"cdn3.com", and the second-level domain name suffix is ​​matched with the CDN domain name suffix library. "cdn1.com" and "cdn2.com" do not completely match "cdn3.com". At this time, "www.444.com" can be marked as a domain name to be classified.

[0149] S304: performing resolution processing on the domain name positive sample set to obtain a domain name resolution log corresponding to each domain name.

[0150] S305: For each domain name in the domain name positive sample set, determine the similarity between the domain name and the domain name resolution chain corresponding to the domain name.

[0151] S306: Generate the domain name feature set based on the domain name resolution logs of multiple domain names in the domain name positive sample set and the corresponding similarities.

[0152] The domain name resolution log includes IP address distribution features and CNAME text features, and the similarity includes: prefix similarity and suffix similarity.

[0153] It can be understood that the IP address distribution feature refers to the distribution of different IP addresses during the domain name resolution process; the CNAME text feature refers to the text content of the CNAME record involved in the domain name resolution process; and the prefix similarity and suffix similarity refer to the similarity between two domain names in the prefix part (that is, the character part in front of the full domain name) and in the suffix part (that is, the top-level domain name and the second-level domain name part); the IP address distribution feature, CNAME text feature, and the prefix similarity and suffix similarity of the domain name can analyze the behavior patterns and traffic characteristics of domain name resolution, so that the domain name classification model can learn the characteristics of the domain name using CDN services.

[0154] The positive sample set of domain names is parsed to obtain the parsing process of each domain name, from which the CNAME records of different domain names are determined, and the corresponding IP address distribution is determined, so that the domain name resolution log of the corresponding domain name can be obtained; based on the domain name resolution logs of different domain names obtained at that time, for each domain name's CNAME record, the prefix part and suffix part corresponding to the different domain names are determined, and compared with the corresponding domain name, so as to determine the similarity between the different domain names and their corresponding prefix part and suffix part, that is, to obtain the prefix similarity and suffix similarity.

[0155] For example, IP address distribution includes: the number of different IP addresses, the number of different autonomous domains; CNAME text features include: the maximum number of dots ('.') in CNAME records, the maximum number of dashes in CNAME records, the maximum number of numbers in CNAME records, the maximum length of CNAME records, the maximum number of mapped user domain names of CNAME records, and the maximum number of mapped IP addresses of CNAME records; prefix similarity is the similarity between the prefix of the domain name and the CNAME record, and suffix similarity is the similarity between the suffix of the domain name and the CNAME record; after parsing the positive sample set of domain names, the domain name resolution logs of each domain name are shown in Table 3 below:

[0156] Table 3

[0157] Domain RR type RR www.111.com CNAME www.111.com.cdn1.com www.111.com.cdn1.com CNAME 11111.cdn1.com 11111.cdn1.com CNAME 22222.cdn1.com 22222.cdn1.com A 2.2.2.1 22222.cdn1.com A 2.2.2.2 22222.cdn1.com A 2.2.2.3 www.222.com CNAME www.222.com.cdn2.com www.333.com CNAME www.333.com.cdn1.com www.222.com.cdn2.com A 3.3.3.1 www.222.com.cdn2.com A 3.3.3.2 www.333.com.cdn1.com A 3.3.3.3

[0158] Based on the above table, we can obtain the IP address distribution, CNAME text features and similarity of the corresponding domain names of different domain names in the current domain name positive sample set; specifically, the number of different IP addresses, that is, the number of different IP addresses to which the domain name is finally mapped in the DNS resolution log, and the characteristic value of the domain name www.111.com is 3; the number of different autonomous domains, that is, the number of different autonomous domains to which the IP address to which the domain name is finally mapped in the DNS log belongs, and the characteristic value of the domain name www.111.com is 1; the maximum number of dots ('.') in the CNAME record, that is, the maximum number of '.' contained in a single CNAME record in the DNS resolution log of the domain name, The characteristic value of the domain name www.111.com is 4; the maximum number of dashes in the CNAME record is the maximum number of '_' and '-' contained in a single CNAME record in the DNS resolution log of the domain name, so the characteristic value of the domain name www.111.com is 0; the maximum number of numbers in the CNAME record is the maximum number of numbers contained in a single CNAME record in the CNAME resolution chain of the corresponding domain name, so the characteristic value of the domain name www.111.com is 6; the maximum length of the CNAME record is the maximum length of a single CNAME record in the CNAME resolution chain of the corresponding domain name, so the characteristic value of the domain name www.111.com is is 20; the maximum number of user domain names mapped by CNAME records, that is, the maximum number of secondary user domain names served by a single CNAME record in the DNS resolution log of the domain name, then the characteristic value of the domain name www.111.com is 3; the maximum number of IP addresses mapped by CNAME records, that is, the maximum number of IP records resolved by all domain names under a single CNAME record in the CNAME resolution chain of the corresponding domain name, then the characteristic value of the domain name www.111.com is 6; the prefix similarity of the domain name and the CNAME record, that is, in the DNS resolution log of the domain name, there is at least one CNAME record with a prefix that matches the domain name , then the corresponding feature value is 1, otherwise it is 0. In this case, the feature value of the domain name www.111.com is 1; the suffix similarity between the domain name and the CNAME record, that is, in the DNS resolution log of the user's domain name, the second-level domain name suffix of all CNAME records matches the second-level domain name suffix of the user's domain name, then the feature value is 1, otherwise it is 0. In this case, the feature value of the domain name www.111.com is 0; the above feature determination process for the domain name www.111.com is also applicable to domain names corresponding to other second-level suffixes in the positive sample set of the domain name, so as to extract features from the positive sample set of the domain name, and add the obtained feature extraction results to the same set to obtain the domain name feature set.

[0159] S307: Obtain a pre-trained classification model, and train the pre-trained classification model based on the domain name positive sample set and the domain name feature set to obtain a domain name classification model.

[0160] S308: Predicting the domain names to be classified by using the domain name classification model, and determining multiple domain names to be classified that belong to the CDN domain names in the prediction results as target domain names.

[0161] It is understandable that the pre-trained classification model is a model with broad applicability and cannot classify specific data. Therefore, different learning algorithms and label data can be used to train the pre-trained classification model so that it can classify specific data information, thereby achieving efficient classification of domain name data.

[0162] A pre-trained classification model is obtained, and the domain name positive sample set and domain name feature set obtained this time are used as the training data set of the pre-trained classification model, and are input into the pre-trained classification model to train the domain name classification model; after the training of the domain name classification model is completed, the domain name to be classified is input into the domain name classification model, and according to the output result obtained, it is determined whether the domain name to be classified belongs to the CDN domain name, and multiple domain names to be classified that belong to the CDN domain name in the obtained result are respectively determined as target domain names.

[0163] For example, the semi-supervised learning algorithm used this time is the PU learning algorithm, and the PU learning algorithm is used to process the domain name positive sample set and the domain name feature set, so that the pre-trained classification model can learn the relationship between the characteristics of the domain name and the domain name that uses the CDN service, complete the training of the pre-trained classification model, and obtain the domain name classification model. The domain name classification model can predict the domain name that cannot be matched by the CDN domain name suffix library, determine whether the domain name uses the CDN service, and the output result of the domain name classification model is the possibility score of each domain name to be classified using the CDN service; obtain the score threshold T set this time. 1 , and the probability score is greater than T 1 The user domain name is marked as a domain name that uses CDN services, and the remaining domain names are marked as domain names that do not use CDN services; when the second-level domain name suffix that does not match the CDN suffix library is "cdn3.com", its corresponding domain name is "www.444.com", that is, the domain name to be classified is "www.444.com", the domain name to be classified is input into the domain name classification model, the domain name classification model extracts features of the domain name to be classified through the feature extraction submodule, and then predicts whether the domain name uses CDN services based on the PU learning algorithm. The score result is T 2 , compared with the predicted score T of the obtained domain name2 With the score threshold T 1 The size relationship between them; when the prediction score T 2 and greater than or equal to the score threshold T 1 When the domain name "www.444.com" is used, it can be determined that the domain name is a domain name that uses the CDN service. At this time, the domain name www.444.com can be determined as the target domain name.

[0164] S309: verifying the prediction result of the domain name classification model through the CDN service, and updating the CDN domain name suffix library according to the verification result.

[0165] Through the CDN service, multiple CDN servers in different geographical locations are called, and the target domain name output by the domain name classification model is resolved by using the multiple CDN servers called at that time; if the resolution results of multiple CDN servers are exactly the same, then the target domain name can be verified as a domain name that does not use the CDN service, otherwise it can be verified as a domain name that uses the CDN service; based on the verification result, the secondary domain name suffix corresponding to the target domain name that uses the CDN service is added to the CDN domain name suffix library to realize dynamic update of the CDN domain name suffix.

[0166] For example, multiple CDN servers in different geographical locations are called through the CDN service, and the CDN servers called this time may be: CDN server 1 and CDN server 2; when the target domain name output by the domain name classification model includes: "www.444.com", CDN server 1 and CDN server 2 are controlled to perform resolution processing on the target domain name; if the CNAME record list and IP address list of CDN server 1 and CDN server 2 for the target domain name "www.444.com" are consistent, it indicates that the resolution process of the domain name is not affected by the geographical location, that is, there is no need to use the CDN service. At this time, the target domain name is verified as a domain name that does not use the CDN service; if CDN server 1 and CDN server 2 have the same CNAME record list and IP address list for the target domain name "www.444.com", it indicates that the resolution process of the domain name is not affected by the geographical location, that is, there is no need to use the CDN service. At this time, the target domain name is verified as a domain name that does not use the CDN service; If the CNAME record lists and IP address lists of the target domain name "www.444.com" of N server 1 and CDN server 2 are inconsistent, it means that the resolution process of the domain name is affected by the geographical location, that is, it is necessary to use the CDN service to call CDN servers in different geographical locations to meet the query needs of user devices. At this time, the domain name is verified as a domain name using the CDN service; if the verification result shows that the target domain name "www.444.com" uses the CDN service, and the corresponding second-level domain name suffix includes: "cdn3.com", at this time, the second-level domain name suffix "cdn3.com" is added to the CDN domain name suffix library to realize the dynamic update of the CDN domain name suffix.

[0167] The domain name data classification method provided in the present implementation obtains domain name log data and a CDN domain name suffix library, generates domain name resolution chains of multiple domain names based on the domain name log data, and matches the domain name resolution chains of multiple domain names with the CDN domain name suffix library to obtain a domain name positive sample set and a domain name to be classified; the domain name positive sample set is parsed to obtain a domain name resolution log corresponding to each domain name, and for each domain name in the domain name positive sample set, the similarity between the domain name and the domain name resolution chain corresponding to the domain name is determined, and a domain name feature set is generated based on the domain name resolution logs and the corresponding similarities of multiple domain names in the domain name positive sample set; a pre-trained classification model is obtained, and the pre-trained classification model is trained based on the domain name positive sample set and the domain name feature set to obtain a domain name classification model; the domain name to be classified is predicted by the domain name classification model, and multiple domain names to be classified that belong to the CDN domain name in the prediction results are determined as target domain names; multiple target domain names are verified by the CDN service, and the CDN domain name suffix library is updated according to the verification results. This method achieves efficient classification of domain name data, avoids the limitations of manual collection of domain name data, and realizes accurate identification of CDN domain names. By dynamically updating the CDN domain name suffix library, it improves the accuracy and adaptability of domain name classification and enhances the system's adaptability to the complex and dynamically changing Internet domain name environment.

[0168] Figure 4 Schematic diagram of the process of the domain name data classification method provided for this application Figure 3 .like Figure 4 As shown, in this embodiment Figure 3 Based on the embodiment, the dynamic update process of the CDN domain name suffix library is described in detail. The domain name data classification method shown in this embodiment includes:

[0169] S401: Determine a target domain name among the domain names to be classified, wherein the target domain name is a domain name predicted to be a CDN domain name.

[0170] S402: calling multiple public domain name servers in different geographical locations through the CDN service, and for any target domain name, controlling the multiple public domain name servers to perform resolution processing on the target domain name to obtain multiple resolution results.

[0171] It can be understood that after the domain name classification model completes the prediction of the domain name to be classified, multiple target domain names can be obtained, that is, the domain names that use the CDN service in the prediction results of the domain name classification model; using the CDN service, it is verified whether any target domain name uses the CDN service, so as to further improve the accuracy of the domain name classification model.

[0172] Determine a target domain name among the domain names to be classified, wherein the target domain name is a domain name predicted to be a CDN domain name; call multiple public domain name servers in different geographical locations through the CDN service, and for any target domain name, use the multiple public domain name servers called at that time to parse and process the target domain name to obtain multiple parsing results, and in the process of verifying the target domain name, only one of the multiple target domain names needs to be verified.

[0173] S403: If the multiple resolution results are inconsistent, then for each target domain name in the to-be-classified domain name, determine a corresponding multiple domain name suffixes.

[0174] S404: updating the CDN domain name suffix library based on the domain name suffixes of each target domain name to obtain a new CDN domain name suffix library.

[0175] If the resolution results of multiple CDN servers are exactly the same, it means that the resolution process of the target domain name is affected by the geographical location, that is, it is necessary to use the CDN service to call CDN servers in different geographical locations to meet the query needs of user devices. At this time, the target domain name is verified as a domain name using the CDN service; based on the current verification result, the second-level domain name suffix corresponding to the target domain name using the CDN service is extracted, and the second-level domain name suffix obtained this time is added to the CDN domain name suffix library to realize dynamic update of the CDN domain name suffix.

[0176] Preferably, if the resolution results of multiple CDN servers are completely consistent, it indicates that the resolution process of the target domain name is not affected by the geographical location, that is, there is no need to use CDN services. At this time, the corresponding target domain name can be verified as a domain name that does not use CDN services.

[0177] For example, the public DNS server database stores a group of public DNS servers distributed in different locations, denoted as: S = [s1, ..., sn], where s1 = [d11, ..., d1m] is a group of public DNS servers distributed in the same geographical location; for the target domain name D output by the domain name classification model t , select one server from each group of public DNS servers in s1, ..., sn, to form a DNS server list S = [st1, ..., stn], that is, the DNS servers in ST are distributed in n geographical locations; then request all DNS servers in ST to resolve D t , the resolution result obtained this time is A = [a1, ..., an], where a1, ..., an represent the different DNS servers for the target domain name D tresolution result; if all the results in the resolution result A are exactly the same, that is, the CNAME record list and the IP address list are the same, then the user domain name is verified as a domain name that does not use CDN, otherwise it is verified as a domain name that uses CDN services; for the target domain name U that is verified to use CDN, its CNAME resolution chain is recorded as: C = [c1, ..., cq], and the CNAME resolution chain C is traversed from front to back, and the ci that are different from the suffix of the target domain name U are all considered to be domain names that provide CDN services. At this time, their suffixes can be extracted to update the CDN domain name suffix library, which will be used in the subsequent matching process of the CDN domain name suffix library.

[0178] The domain name data classification method provided by this implementation determines the target domain name among the domain names to be classified, wherein the target domain name is the domain name predicted to be the CDN domain name; through the CDN service, multiple public domain name servers in different geographical locations are called, and for any target domain name, multiple public domain name servers are controlled to perform resolution processing on the target domain name to obtain multiple resolution results; if the multiple resolution results are inconsistent, multiple corresponding domain name suffixes are determined for each target domain name among the domain names to be classified, and the CDN domain name suffix library is updated based on the domain name suffixes of each target domain name to obtain a new CDN domain name suffix library. This method improves the accuracy and adaptability of domain name classification by dynamically updating the CDN domain name suffix library, and enhances the system's adaptability to the complex and dynamically changing Internet domain name environment.

[0179] It can be understood that the domain name data classification method provided in the above embodiment relies on the CDN domain name suffix library and the domain name classification model, so as to realize the classification of domain names and the dynamic update of the CDN domain name suffix library; specifically, in the process of classifying the domain name log data, the domain name log data is first matched with the CDN domain name suffix library, and the domain names with consistent matches and inconsistent matches are output; combined with the domain names that are determined to be consistent with the CDN domain name suffix library at that time, the domain name classification model is used to classify the inconsistent domain names, thereby completing the entire classification of the domain name log data obtained at that time; in order to further improve the accuracy of the output results of the domain name classification model, the classification results at that time are verified again, and the CDN domain name suffix library is updated based on the verified domain names.

[0180] For example, Figure 5 is a flowchart of a domain name data classification method based on PU learning provided by this application. Figure 5As shown, the method can be divided into three stages according to the processing process of the domain name log data, specifically including: a domain name suffix matching stage based on a rule matching submodule, a domain name classification stage to be classified based on a domain name data classification model learned by PU learning, and a verification stage of the model classification result based on a result verification submodule; wherein, the rule matching submodule depends on a CDN domain name suffix library, which mainly includes secondary domain name suffixes, and matches the domain names in the DNS resolution log based on the CDN domain name suffix data stored therein, and then marks the successfully matched domain names as domain names using CDN, that is, positive samples; the domain name data classification model based on PU learning includes a domain name feature extraction submodule and a classifier based on a PU learning learning algorithm, and the domain name feature extraction submodule can extract features from DNS data and hand it over to a classifier based on a PU learning learning algorithm for classification processing; the result verification submodule, which depends on a public DNS server database, verifies the domain names marked as CDN in the model classification results based on active requests, outputs the domain names determined to be using CDN, and updates the CDN domain name suffix library accordingly.

[0181] Figure 6 This is a schematic diagram of the structure of the domain name data classification device provided by this application. Figure 6 As shown, the present application provides a domain name data classification device, and the domain name data classification device 600 includes:

[0182] The acquisition module 601 is used to acquire domain name log data and a CDN domain name suffix library, wherein the domain name log data includes multiple domain names.

[0183] The processing module 602 is used to match the multiple domain names with the CDN domain name suffix library to obtain a domain name positive sample set and a domain name to be classified, wherein the domain name positive sample set is used to indicate the domain names that match the CDN domain name suffix library, and the domain name to be classified is used to indicate the domain names that do not match the CDN domain name suffix library.

[0184] The processing module 602 is further configured to extract features from each domain name in the domain name positive sample set to obtain a domain name feature set.

[0185] The processing module 602 is further configured to train a domain name classification model according to the domain name positive sample set and the domain name feature set, and predict whether the domain name to be classified belongs to a CDN domain name through the domain name classification model.

[0186] The processing module 602 is further used to verify the prediction result of the domain name classification model through the CDN service, and update the CDN domain name suffix library according to the verification result.

[0187] Optionally, the processing module 602 is further used to generate domain name resolution chains for the multiple domain names respectively according to the domain name log data, and the domain name resolution chains are used to indicate the resolution path of the domain name system for the domain name.

[0188] The processing module 602 is further configured to match the domain name resolution chains of the multiple domain names with the CDN domain name suffix library respectively to obtain the domain name positive sample set and the domain name to be classified.

[0189] Optionally, the processing module 602 is further configured to extract domain name information recorded in multiple domain name resolution chains respectively according to the domain name resolution chains of the multiple domain names.

[0190] The processing module 602 is further used to match the domain name information of the multiple domain name resolution chains with the CDN domain name suffix library respectively.

[0191] For each domain name resolution chain, if there is at least one domain name information in the domain name resolution chain that matches the suffix domain name in the CDN domain name suffix library, the processing module 602 is also used to mark the domain name corresponding to the domain name resolution chain as a positive sample and add it to the domain name positive sample set.

[0192] If there is no domain name information in the domain name information of the domain name resolution chain that matches the suffix domain name in the CDN domain name suffix library, the processing module 602 is further used to mark the domain name corresponding to the domain name resolution chain as the domain name to be classified.

[0193] Optionally, the processing module 602 is further configured to perform resolution processing on the domain name positive sample set to obtain a domain name resolution log corresponding to each domain name, wherein the domain name resolution log includes an IP address distribution feature and a CNAME text feature.

[0194] The domain name data classification device further includes: a determination module 603.

[0195] The determination module 603 is used to determine, for each domain name in the domain name positive sample set, the similarity between the domain name and the domain name resolution chain corresponding to the domain name.

[0196] The processing module 602 is further configured to generate the domain name feature set based on the domain name resolution logs of multiple domain names in the domain name positive sample set and the corresponding similarities.

[0197] Optionally, the acquisition module 601 is also used to acquire a pre-trained classification model.

[0198] The processing module 602 is further configured to train the pre-trained classification model based on the domain name positive sample set and the domain name feature set to obtain a domain name classification model.

[0199] The processing module 602 is further configured to perform prediction processing on the domain name to be classified by using the domain name classification model.

[0200] The determination module 603 is further configured to determine the multiple domain names to be classified that belong to the CDN domain name in the prediction result as target domain names respectively.

[0201] Optionally, the determination module 603 is further configured to determine a target domain name among the domain names to be classified, wherein the target domain name is a domain name predicted to be a CDN domain name.

[0202] The processing module 602 is further configured to call multiple public domain name servers in different geographical locations through the CDN service, and control the multiple public domain name servers to perform resolution processing on any target domain name to obtain multiple resolution results.

[0203] If the multiple parsing results are inconsistent, the determination module 603 is further configured to determine a corresponding plurality of domain name suffixes for each target domain name in the domain names to be classified.

[0204] The processing module 602 is further configured to update the CDN domain name suffix library based on the domain name suffix of each target domain name to obtain a new CDN domain name suffix library.

[0205] Optionally, the determination module 603 is further configured to determine the number of second-level domain names served by different second-level domain name suffixes in the domain name log data.

[0206] The acquisition module 601 is further used to acquire a preset domain name quantity threshold.

[0207] The processing module 602 is further configured to compare the preset domain name quantity threshold with the quantity of second-level domain names corresponding to each second-level domain name suffix.

[0208] If the number of the second-level domain names is greater than the preset domain name number threshold, the processing module 602 is further configured to add the second-level domain name suffix to the CDN domain name suffix library.

[0209] Figure 7 A schematic diagram of the structure of the domain name data classification device provided in this application. Figure 7 As shown, the present application provides a domain name data classification device, and the domain name data classification device 700 includes: a receiver 701, a transmitter 702, a processor 703 and a memory 704.

[0210] Receiver 701, for receiving instructions and data;

[0211] A transmitter 702, used to send instructions and data;

[0212] Memory 704, for storing computer-executable instructions;

[0213] The processor 703 is used to execute the computer-executable instructions stored in the memory 704 to implement the various steps performed by the domain name data classification method in the above embodiment. For details, please refer to the relevant description in the above domain name data classification method embodiment.

[0214] Optionally, the memory 704 may be independent or integrated with the processor 703 .

[0215] When the memory 704 is independently provided, the electronic device further includes a bus for connecting the memory 704 and the processor 703 .

[0216] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the domain name data classification method executed by the above-mentioned domain name data classification device is implemented.

[0217] The present application also provides a program product, including a computer program, which implements the domain name data classification method as described above when executed by a processor.

[0218] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0219] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0220] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0221] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.

[0222] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. If not specifically stated, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. If not specifically stated, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc.

[0223] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several instructions for 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 various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0224] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not 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.

[0225] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0226] So far, the technical solution of the present application has been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments, and the above embodiments are only used to illustrate the technical solution 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 replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A domain name data classification method, It is characterized in that The method comprises: Obtain domain name log data and a CDN domain name suffix library, wherein the domain name log data includes multiple domain names; Matching the multiple domain names with the CDN domain name suffix library to obtain a domain name positive sample set and a domain name to be classified, wherein the domain name positive sample set is used to indicate domain names that match the CDN domain name suffix library consistently, and the domain name to be classified is used to indicate domain names that do not match the CDN domain name suffix library consistently; Extracting features from each domain name in the domain name positive sample set to obtain a domain name feature set; Training a domain name classification model based on the domain name positive sample set and the domain name feature set, and predicting whether the domain name to be classified belongs to a CDN domain name through the domain name classification model; The prediction result of the domain name classification model is verified through the CDN service, and the CDN domain name suffix library is updated according to the verification result.

2. The method according to claim 1, It is characterized in that The matching process of the multiple domain names with the CDN domain name suffix library to obtain a domain name positive sample set and a domain name to be classified includes: Generate domain name resolution chains for the multiple domain names respectively according to the domain name log data, the domain name resolution chains are used to indicate resolution paths of the domain name system for the domain names; The domain name resolution chains of the multiple domain names are matched with the CDN domain name suffix library respectively to obtain the domain name positive sample set and the domain name to be classified.

3. The method according to claim 2, It is characterized in that The matching processing of the domain name resolution chains of the multiple domain names with the CDN domain name suffix library to obtain the domain name positive sample set and the domain name to be classified includes: According to the domain name resolution chains of the multiple domain names, respectively extracting the domain name information recorded in the multiple domain name resolution chains; Matching the domain name information of the multiple domain name resolution chains with the CDN domain name suffix library respectively; For each domain name resolution chain, if at least one domain name information in the domain name resolution chain matches the suffix domain name in the CDN domain name suffix library, the domain name corresponding to the domain name resolution chain is marked as a positive sample and added to the domain name positive sample set; If there is no domain name information in the domain name information of the domain name resolution chain that matches the suffix domain name in the CDN domain name suffix library, the domain name corresponding to the domain name resolution chain is marked as the domain name to be classified.

4. The method according to claim 2, It is characterized in that The feature extraction of each domain name in the domain name positive sample set to obtain a domain name feature set includes: Parsing the domain name positive sample set to obtain a domain name resolution log corresponding to each domain name, wherein the domain name resolution log includes an IP address distribution feature and a CNAME text feature; For each domain name in the domain name positive sample set, determining the similarity between the domain name and the domain name resolution chain corresponding to the domain name; The domain name feature set is generated based on the domain name resolution logs of multiple domain names in the domain name positive sample set and the corresponding similarities.

5. The method according to claim 1, It is characterized in that The training of a domain name classification model according to the domain name positive sample set and the domain name feature set, and predicting whether the domain name to be classified belongs to a CDN domain name by using the domain name classification model, includes: Get the pre-trained classification model; Based on the domain name positive sample set and the domain name feature set, the pre-trained classification model is trained to obtain a domain name classification model; The domain name to be classified is predicted by the domain name classification model, and multiple domain names to be classified belonging to the CDN domain name in the prediction results are respectively determined as target domain names.

6. The method according to claim 1, It is characterized in that The verifying the prediction result of the domain name classification model by using the CDN service, and updating the CDN domain name suffix library according to the verification result, includes: Determine a target domain name among the domain names to be classified, wherein the target domain name is a domain name predicted to be a CDN domain name; Calling multiple public domain name servers in different geographical locations through the CDN service, for any target domain name, controlling the multiple public domain name servers to perform resolution processing on the target domain name to obtain multiple resolution results; If the multiple resolution results are inconsistent, determining multiple corresponding domain name suffixes for each target domain name in the domain name to be classified; The CDN domain name suffix library is updated based on the domain name suffix of each target domain name to obtain a new CDN domain name suffix library.

7. The method according to claim 1, It is characterized in that The method further comprises: Determine the number of second-level domain names served by different second-level domain name suffixes in the domain name log data; Obtaining a preset domain name quantity threshold, and for each second-level domain name suffix, comparing the preset domain name quantity threshold with the number of second-level domain names corresponding to the second-level domain name suffix; If the number of the second-level domain names is greater than the preset domain name number threshold, the second-level domain name suffix is ​​added to the CDN domain name suffix library.

8. A domain name data classification device, It is characterized in that include: An acquisition module, used to acquire domain name log data and a CDN domain name suffix library, wherein the domain name log data includes multiple domain names; a processing module, configured to match the multiple domain names with the CDN domain name suffix library to obtain a domain name positive sample set and a domain name to be classified, wherein the domain name positive sample set is used to indicate domain names that match the CDN domain name suffix library consistently, and the domain name to be classified is used to indicate domain names that do not match the CDN domain name suffix library consistently; The processing module is further used to extract features from each domain name in the domain name positive sample set to obtain a domain name feature set; The processing module is further used to train a domain name classification model according to the domain name positive sample set and the domain name feature set, and predict whether the domain name to be classified belongs to a CDN domain name through the domain name classification model; The processing module is also used to verify the prediction result of the domain name classification model through the CDN service, and update the CDN domain name suffix library according to the verification result.

9. An electronic device, It is characterized in that include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Patent Citations

  • Domain name detection method and device, equipment and medium

    CN113098896A

  • Classification model construction method and classification system for domain name classification

    CN116502153A

  • Method and apparatus for determining domain name homology, electronic device, and storage medium

    WO2024031884A1