Domain name knowledge graph construction method
Patent Information
- Application Number
- CN202510762118.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-08-01
AI Technical Summary
[0005]本申请提供一种域名知识图谱构建方法,以解决现有域名知识图谱无法全面反应域名整体情况的问题
Smart Images

Figure CN120416221A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of domain name management, and particularly relates to a method for constructing a domain name knowledge graph. Background Art
[0002] Domain names are important basic resources of the Internet and are crucial for the overall development of network security and stability. How to utilize and manage domain name resources well has become an important issue faced by the high-quality development of the current Internet industry.
[0003] Knowledge graphs are important technical means for efficiently carrying out intelligent integration and display analysis of massive data, and have now been widely applied in many industry fields. Therefore, current domain name management based on knowledge graphs is very extensive.
[0004] Currently, the general domain name management solution based on knowledge graphs is to construct a knowledge graph through data crawling for domain name management. However, due to the existing technology only based on data crawling of domain name logs, the constructed knowledge graph cannot comprehensively reflect the overall situation of domain names. Summary of the Invention
[0005] This application provides a method for constructing a domain name knowledge graph to solve the problem that the existing domain name knowledge graph cannot comprehensively reflect the overall situation of domain names.
[0006] The method includes:
[0007] Construct a domain name data ontology;
[0008] Perform knowledge extraction based on the domain name data ontology to obtain domain name knowledge data, where the domain name knowledge data at least includes domain name resolution data, domain name registration data, and domain name application data;
[0009] Construct a domain name knowledge graph based on the domain name knowledge data.
[0010] Preferably, the step of constructing the domain name data ontology includes:
[0011] Respectively construct a first domain name ontology model, a second domain name ontology model, and a third domain name ontology model corresponding to the domain name resolution data, the domain name registration data, and the domain name application data;
[0012] Integrate the first domain name ontology model, the second domain name ontology model, and the third domain name ontology model to obtain the domain name data ontology.
[0013] Preferably, the domain name resolution data includes NS record information, A record information, and MX record information;
[0014] The domain name registration data includes the registrant information to which the domain name belongs and the domain name registrar information;
[0015] The domain name application data includes website information of the website corresponding to the domain name.
[0016] Preferably, the step of performing knowledge extraction based on the domain name data ontology includes:
[0017] Obtaining the domain name resolution data by using the first domain name ontology model;
[0018] Obtaining the domain name registration data by using the second domain name ontology model;
[0019] Obtaining the domain name application data by using the third domain name ontology model.
[0020] Preferably, the step of obtaining the domain name resolution data by using the first domain name ontology model includes:
[0021] Creating a domain name entity node, where the domain name entity node corresponds to the domain name;
[0022] Querying the domain name entity node by using the dig or nslookup command to obtain the NS record information, A record information, and MX record information of the domain name entity node;
[0023] Creating a server node and a location node corresponding to the domain name entity node, where the server node corresponds to the location node;
[0024] Obtaining the first subordination relationship of the server node and the second subordination relationship between the server node and the location node.
[0025] Preferably, the step of obtaining the domain name registration data by using the second domain name ontology model includes:
[0026] Creating a registrant entity node and a registrar entity node corresponding to the domain name entity node through WHOIS query information;
[0027] Obtaining the third subordination relationship between the domain name entity node, the entity node, and the registrar entity node;
[0028] Obtaining the registrant information, domain name registrar information, and registration time information according to the third subordination relationship.
[0029] Preferably, the server node includes an authoritative server entity node, a host server entity node, and a mail server entity node, and the step of obtaining the domain name resolution data by using the first domain name ontology model further includes:
[0030] Create the authoritative server entity node, the host server entity node, and the mail server entity node corresponding to the domain name entity node, and obtain the first subordination relationship among the authoritative server entity node, the host server entity node, and the mail server entity node;
[0031] Create an AS autonomous domain entity node and a geographical location entity node by querying the IP address library corresponding to the domain name entity node, and obtain the second subordination relationship among the server node, the AS autonomous domain entity node, and the geographical location entity node.
[0032] Preferably, the step of obtaining the domain name application data by using the third domain name ontology model includes:
[0033] Access the host server of the domain name, and determine whether there is a corresponding website for the domain name; the host server corresponds to the host server entity node;
[0034] If so, create a website entity node corresponding to the website, and obtain the fourth subordination relationship between the domain name entity node and the website entity node;
[0035] Obtain the website information of the website through web crawler technology.
[0036] Preferably, the step of accessing the host server of the domain name includes:
[0037] Access the port 80 of the host server of the domain name through the http protocol, and access the port 443 of the host server of the domain name through the https protocol.
[0038] Preferably, the step of constructing a domain name knowledge graph based on the domain name knowledge data includes:
[0039] Use the Neo4j-import tool to import and store the domain name knowledge data to form a CSV file;
[0040] Construct the domain name knowledge graph according to the CSV file and each subordination relationship.
[0041] As can be seen from the above, the present application provides a method for constructing a domain name knowledge graph, and the method includes constructing a domain name data ontology; performing knowledge extraction based on the domain name data ontology to obtain domain name knowledge data, where the domain name knowledge data at least includes domain name resolution data, domain name registration data, and domain name application data; constructing a domain name knowledge graph based on the domain name knowledge data. The present application solves the problem that the existing domain name knowledge graph cannot comprehensively reflect the overall situation of the domain name through the above method. Brief Description of the Drawings
[0042] To more clearly illustrate the technical solutions of this application, the following will briefly introduce the accompanying drawings required in the embodiments. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0043] Figure 1 It is a flowchart of a method for constructing a domain name knowledge graph of this application;
[0044] Figure 2 It is a flowchart of constructing a domain name data ontology in a method for constructing a domain name knowledge graph of this application;
[0045] Figure 3 It is a flowchart of knowledge extraction in a method for constructing a domain name knowledge graph of this application;
[0046] Figure 4 It is an application flowchart of the first domain name ontology model in a method for constructing a domain name knowledge graph of this application;
[0047] Figure 5 It is an application flowchart of the second domain name ontology model in a method for constructing a domain name knowledge graph of this application;
[0048] Figure 6 It is an application flowchart of the third domain name ontology model in a method for constructing a domain name knowledge graph of this application;
[0049] Figure 7 It is a flowchart of constructing a domain name knowledge graph in a method for constructing a domain name knowledge graph of this application;
[0050] Figure 8 It is a schematic diagram of a domain name knowledge graph in a method for constructing a domain name knowledge graph of this application. Detailed implementation manners
[0051] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0052] It should be noted that the brief description of the terms in this application is only for the convenience of understanding the following described implementation manners, rather than intending to limit the implementation manners of this application. Unless otherwise specified, these terms should be understood in their ordinary and common meanings.
[0053] It should be noted that in this application, words such as "exemplary" or "for example" are used to give examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0054] As an important part of the core infrastructure of the Internet, the strategic value of the domain name system has transcended the scope of simple technical identification and evolved into a key fulcrum for digital space governance. At present, with the deep integration of the digital economy and the real economy, the efficient allocation and security control of domain name resources are directly related to the maintenance of cyberspace sovereignty, the security of data element circulation, and the effectiveness of the construction of new infrastructure. Facing the daily new domain name registration demand in the order of hundreds of thousands and the dynamic evolution of a huge amount of stock resources, the traditional management mode relying on manual experience and static databases has been difficult to meet the needs of intelligent governance, and there is an urgent need to build a more forward-looking technical solution.
[0055] Knowledge graph technology provides an innovative path to solve the domain name governance problem. By constructing a structured knowledge network, this technology can achieve data association and value mining across platforms and scenarios, and has shown significant advantages in fields such as financial risk control and smart cities. Specifically in the domain name management scenario, its technical value is mainly reflected in three dimensions: First, establish an association model for multi-source heterogeneous data, breaking through the field isolation limit of traditional databases; second, construct a dynamic evolution mechanism to capture the characteristic changes in each stage of the domain name life cycle in real time; third, form a visual analysis framework to provide an intuitive situation awareness interface for decision-makers. This technical characteristic makes it naturally suitable for the closed-loop management requirements of "discovery - analysis - decision - response" in domain name governance.
[0056] Although the existing technical solutions have formed a basic framework, there are still structural shortcomings in the data collection dimension and the depth of knowledge modeling. The current mainstream solutions mostly focus on structured data such as DNS resolution logs, and lack effective integration of key elements such as domain name registration information change records, associated IP reputation data, and digital certificate chains. This data collection strategy leads to three cognitive blind spots in the knowledge graph: First, it is impossible to completely depict the full life cycle trajectory of domain name entities, especially key events such as registration information changes and resolution service migrations; second, it is difficult to establish the association relationship between domain names and infrastructure elements (such as ASN numbers, CDN nodes), which limits the ability to trace the origin of network attacks; third, there is a lack of in-depth analysis of the semantic characteristics of domain names, making it difficult to identify hidden threats such as counterfeit domain names and malicious jumps.
[0057] Based on the above problems, this application provides the following implementation manners.
[0058] Figure 1This is a flowchart of a method for constructing a domain name knowledge graph in the present application.
[0059] See Figure 1 It can be seen that this embodiment provides a method for constructing a domain name knowledge graph, and the method includes:
[0060] S100. Construct a domain name data ontology. Specifically, in this embodiment, the domain name data ontology can be understood as a model for obtaining domain name-related data. Through this model, domain name data is obtained, providing a data basis for subsequent knowledge graph construction.
[0061] The method further includes:
[0062] S200. Perform knowledge extraction based on the domain name data ontology to obtain domain name knowledge data; the domain name knowledge data at least includes domain name resolution data, domain name registration data, and domain name application data.
[0063] Specifically, in this embodiment, knowledge extraction is performed through the domain name data ontology, that is, data is obtained on the domain name node to obtain the domain name knowledge data; it should be noted that different from the prior art, the method provided in this embodiment not only obtains domain name log data, that is, the corresponding domain name application data and domain name registration data, but also obtains the domain name resolution data through the domain name data ontology to construct a more comprehensive knowledge graph.
[0064] Among them, the domain name resolution data includes NS record information, A record information, and MX record information; the domain name registration data includes the registrant information and domain name registrar information to which the domain name belongs; the domain name application data includes the website information of the website corresponding to the domain name.
[0065] The method further includes:
[0066] S300. Construct a domain name knowledge graph based on the domain name knowledge data. Specifically, in this embodiment, after obtaining relevant data, the domain name knowledge graph is constructed through these data and the association relationship between each data.
[0067] Figure 2 This is a flowchart of constructing a domain name data ontology in a method for constructing a domain name knowledge graph in the present application.
[0068] See Figure 2 It can be seen that, further, in some embodiments, the steps of constructing the domain name data ontology include:
[0069] S110. Respectively construct a first domain name ontology model, a second domain name ontology model, and a third domain name ontology model corresponding to the domain name resolution data, the domain name registration data, and the domain name application data;
[0070] S120, integrate the first domain name ontology model, the second domain name ontology model, and the third domain name ontology model to obtain the domain name data ontology.
[0071] Specifically, in this embodiment, the domain name data ontology is divided into three regions, namely the first domain name ontology model, the second domain name ontology model, and the third domain name ontology model. Corresponding data are obtained through the first domain name ontology model, the second domain name ontology model, and the third domain name ontology model respectively, and the three models are integrated together to facilitate data acquisition when constructing a knowledge graph.
[0072] Figure 3 This is a flowchart of knowledge extraction in a method for constructing a domain name knowledge graph of this application.
[0073] See Figure 3 It can be seen that, further, in some embodiments, the steps of performing knowledge extraction based on the domain name data ontology include:
[0074] S210, obtain the domain name resolution data by using the first domain name ontology model;
[0075] S220, obtain the domain name registration data by using the second domain name ontology model;
[0076] S230, obtain the domain name application data by using the third domain name ontology model.
[0077] Specifically, in this embodiment, the uses of each model are introduced, that is, the corresponding data are obtained by using the first domain name ontology model, the second domain name ontology model, and the third domain name ontology model respectively in the above description.
[0078] It should be noted that each model obtains data independently, that is, three types of data can be obtained simultaneously. Therefore, steps S210, S220, and S230 are all independent.
[0079] Figure 4 This is an application flowchart of the first domain name ontology model in a method for constructing a domain name knowledge graph of this application.
[0080] Figure 8 This is a schematic diagram of a domain name knowledge graph in a method for constructing a domain name knowledge graph of this application.
[0081] See Figure 4 and Figure 8 It can be seen that, further, in some embodiments, the steps of obtaining the domain name resolution data by using the first domain name ontology model include:
[0082] S211. Create a domain name entity node, where the domain name entity node corresponds to a domain name;
[0083] S212. Use the dig or nslookup command to query the domain name entity node to obtain the NS record information, A record information, and MX record information of the domain name entity node;
[0084] S213. Create a server node and a location node corresponding to the domain name entity node, where the server node corresponds to the location node;
[0085] S214. Obtain the first subordination relationship of the server node and the second subordination relationship between the server node and the location node.
[0086] Specifically, in this embodiment, the server node includes an authoritative server entity node, a host server entity node, and a mail server entity node; create the authoritative server entity node, the host server entity node, and the mail server entity node corresponding to the domain name entity node, and obtain the first subordination relationship among the authoritative server entity node, the host server entity node, and the mail server entity node.
[0087] Create an AS autonomous domain entity node and a geographical location entity node by querying the IP address library corresponding to the domain name entity node, and obtain the second subordination relationship between the server node, the AS autonomous domain entity node, and the geographical location entity node.
[0088] Exemplarily, first create a domain name entity node, and then query and obtain the NS record, A record, and MX record of the domain name entity through commands such as dig or nslookup, and respectively create the authoritative server, host server, and mail server entity nodes of the domain name. At the same time, determine that the domain name entity and the above servers belong to a control relationship. At the same time, obtain and create the AS autonomous domain entity node and the geographical location entity node corresponding to the above servers by querying the IP address library, and at the same time determine that the above servers and the above AS autonomous domain and geographical location belong to a subordination relationship.
[0089] Among them, both the dig and nslookup commands are the most core DNS diagnostic tools in network management and are used to query domain name resolution information.
[0090] Figure 5 This is the application flow chart of the second domain ontology model in a method for constructing a domain name knowledge graph of the present application.
[0091] See Figure 5It can be seen that, further, in some embodiments, the step of obtaining the domain name registration data by using the second domain name ontology model includes:
[0092] S221, creating a registrant entity node and a registrar entity node corresponding to the domain name entity node through WHOIS query information;
[0093] S222, obtaining a third subordination relationship between the domain name entity node, the entity node, and the registrar entity node;
[0094] S223, obtaining the registrant information, domain name registrar information, and registration time information according to the third subordination relationship.
[0095] Specifically, in this embodiment, entity nodes such as the registrant and registrar to which the domain name belongs are created through WHOIS query information. At the same time, it is determined that the domain name entity belongs to a subordination relationship with the above entity nodes, and attributes such as the registration time of the domain name are obtained and added through WHOIS query information.
[0096] Among them, WHOIS query information is an Internet protocol and query service used to query the registration information of domain names, IP addresses, or autonomous systems (AS). It provides key technical and management data to help users verify the identity of website owners, troubleshoot network problems, or trace the source of infringement.
[0097] Figure 6 This is the application flow chart of the third domain name ontology model in a method for constructing a domain name knowledge graph of the present application.
[0098] See Figure 6 It can be seen that, further, in some embodiments, the step of obtaining the domain name application data by using the third domain name ontology model includes:
[0099] S231, accessing the host server of the domain name and determining whether there is a corresponding website for the domain name; the host server corresponds to the host server entity node;
[0100] S232, if so, creating a website entity node corresponding to the website and obtaining a fourth subordination relationship between the domain name entity node and the website entity node;
[0101] S233, obtaining the website information of the website through web crawler technology.
[0102] Specifically, in this embodiment, the 80 port of the domain name host server (and the servers pointed to by AAAA and CNAME records) is accessed through the http protocol, and the 443 port of the domain name host server (and the servers pointed to by AAAA and CNAME records) is accessed through the https protocol to determine whether there is a corresponding website for the domain name and create an entity node for the website corresponding to the domain name, determine that the domain name entity and the website corresponding to the domain name belong to a control relationship, and at the same time obtain and add attributes such as the website name through web crawlers.
[0103] Figure 7 It is a flowchart for constructing a domain name knowledge graph in a method for constructing a domain name knowledge graph of this application.
[0104] See Figure 7 It can be seen that further, in some embodiments, the steps of constructing a domain name knowledge graph based on the domain name knowledge data include:
[0105] S310, use the Neo4j-import tool to import and store the domain name knowledge data to form a CSV file;
[0106] S320, construct the domain name knowledge graph according to the CSV file and each subordinate relationship.
[0107] Specifically, in this embodiment, knowledge import is performed, the extracted knowledge is formed into a CSV file, and the Neo4j-import tool provided by the Neo4j graph database is used to import and store the above knowledge. Entities are represented by nodes, and relationships between entities are represented by edges. According to the actual situation, two methods of full database import or incremental import can be selected, and finally the construction of the domain name knowledge graph is completed.
[0108] Among them, the Neo4j graph database is a high-performance graph database management system that stores data in a graph structure and uses nodes, relationships, and properties as the core data models. Compared with traditional relational databases, it has significant performance advantages in processing complex associated data (such as social networks, recommendation systems, knowledge graphs) and supports the use of the Cypher query language for efficient retrieval and graph analysis.
[0109] The Neo4j-import tool is a high-throughput command-line tool designed specifically for importing large-scale initial data sets and is suitable for the initialization scenario of a new database.
[0110] This embodiment has the following advantages:
[0111] (1) This embodiment is specifically used for constructing a domain name knowledge graph and is a knowledge graph construction method specifically for domain names proposed for the first time;
[0112] (2) The domain name knowledge graph construction method proposed in this embodiment constructs an ontology model based on three types of data, namely domain name resolution data, domain name registration data, and domain name application data. The constructed domain name knowledge graph can comprehensively reflect the overall situation of domain names.
[0113] For the sake of convenience in explanation, the above description has been made in combination with specific embodiments. However, the above discussion in some embodiments is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. According to the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are for better explaining the content of the present disclosure, so that those skilled in the art can better use the embodiments.
Claims
1. A method for constructing a domain name knowledge graph, characterized in that, The method includes: Constructing a domain name data ontology; Performing knowledge extraction based on the domain name data ontology to obtain domain name knowledge data; the domain name knowledge data at least includes domain name resolution data, domain name registration data, and domain name application data; Constructing a domain name knowledge graph based on the domain name knowledge data.
2. The method for constructing a domain name knowledge graph according to claim 1, wherein The step of constructing the domain name data ontology includes: Respectively constructing a first domain name ontology model, a second domain name ontology model, and a third domain name ontology model corresponding to the domain name resolution data, the domain name registration data, and the domain name application data; Integrating the first domain name ontology model, the second domain name ontology model, and the third domain name ontology model to obtain the domain name data ontology.
3. The method for constructing a domain name knowledge graph according to claim 2, wherein, The domain name resolution data includes NS record information, A record information, and MX record information; The domain name registration data includes registrant information and domain name registrar information to which the domain name belongs; The domain name application data includes website information of the website corresponding to the domain name.
4. A method for constructing a domain name knowledge graph according to claim 3, characterized in that, The step of performing knowledge extraction based on the domain name data ontology includes: Using the first domain name ontology model to obtain the domain name resolution data; Using the second domain name ontology model to obtain the domain name registration data; Using the third domain name ontology model to obtain the domain name application data.
5. A method for constructing a domain name knowledge graph according to claim 4, characterized in that The step of using the first domain name ontology model to obtain the domain name resolution data includes: Creating a domain name entity node, which corresponds to the domain name; Querying the domain name entity node using the dig or nslookup command to obtain the NS record information, A record information, and MX record information of the domain name entity node; Creating a server node and a location node corresponding to the domain name entity node, where the server node corresponds to the location node; Obtaining a first subordination relationship of the server node, and a second subordination relationship between the server node and the location node.
6. The method for constructing a domain name knowledge graph according to claim 5, characterized in that, The step of using the second domain name ontology model to obtain the domain name registration data includes: Creating a registrant entity node and a registrar entity node corresponding to the domain name entity node through WHOIS query information; Obtaining a third subordination relationship between the domain name entity node, the entity node, and the registrar entity node; Obtaining the registrant information, domain name registrar information, and registration time information according to the third subordination relationship.
7. A method for constructing a domain name knowledge graph according to claim 6, characterized in that, The server node includes an authoritative server entity node, a host server entity node, and a mail server entity node. The step of using the first domain name ontology model to obtain the domain name resolution data further includes: Creating the authoritative server entity node, the host server entity node, and the mail server entity node corresponding to the domain name entity node, and obtaining the first subordination relationship between the authoritative server entity node, the host server entity node, and the mail server entity node; Create an AS autonomous domain entity node and a geographical location entity node by querying the IP address library corresponding to the domain name entity node, and obtain the second subordination relationship between the server node, the AS autonomous domain entity node, and the geographical location entity node.
8. A method for constructing a domain name knowledge graph according to claim 7, characterized in that The step of obtaining the domain name application data by using the third domain name ontology model includes: Access the host server of the domain name and determine whether there is a corresponding website for the domain name; the host server corresponds to the host server entity node; If so, create a website entity node corresponding to the website, and obtain the fourth subordination relationship between the domain name entity node and the website entity node; Obtain the website information of the website through web crawler technology.
9. A method for constructing a domain name knowledge graph according to claim 8, characterized in that, The step of accessing the host server of the domain name includes: Access the 80 port of the host server of the domain name through the http protocol, and access the 443 port of the host server of the domain name through the https protocol.
10. A method for constructing a domain name knowledge graph according to claim 9, characterized in that The step of constructing a domain name knowledge graph based on the domain name knowledge data includes: Use the Neo4j-import tool to import and store the domain name knowledge data to form a CSV file; Construct the domain name knowledge graph according to the CSV file and each subordination relationship.