Domain name resolution method, device, equipment and storage medium
By conducting iterative query step by step based on the order of full domain names, authoritative domain names and top-level domain names during the domain name resolution process, the problem of high probability of domain names being attacked in the existing technology is solved, and the protection efficiency of domain names is improved.
Patent Information
- Application Number
- CN202211263581.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-11
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-10-11
AI Technical Summary
In the prior art, it is necessary to query the domain name at each level, which increases the probability of the domain name being attacked and makes the protection of the domain name inefficient.
By obtaining the domain name provided by the user, parsing it to determine the full domain name, authoritative domain name and top-level domain name, iterative query is carried out in the preset safeguard database based on the order of these domain names until the address corresponding to the domain name is obtained.
The number of iterative queries is reduced, the attacked nodes are reduced, and the protection efficiency of domain names is improved.
Smart Images

Figure CN115643234B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a domain name resolution method, device, equipment and storage medium. Background Art
[0002] With the rapid development of the Internet, a lot of information and data can be searched or shared through the Internet. However, when searching for information or data, it is necessary to search for the corresponding website through the domain name in order to accurately find the information or data.
[0003] When searching for information or data, users need to enter the domain name into the server, query the domain name through the server, and obtain the domain name address to access the website corresponding to the domain name. Among them, the server queries the domain name from the root domain name downwards in an iterative manner, which is easy to be attacked during the query process, and then the domain name address is tampered with. The current method of preventing attacks during iterative queries is to use the domain name filtering mechanism to help users block malicious domain names and filter out unhealthy domain names, reducing unnecessary iterative queries. However, this requires querying each level of the domain name to complete the iterative query, which increases the probability of the domain name being attacked and makes the protection of the domain name inefficient. Summary of the invention
[0004] The main purpose of this application is to provide a domain name resolution method, device, equipment and storage medium, aiming to solve the technical problem in the prior art that it is necessary to query the domain name at each level to complete an iterative query, which increases the probability of the domain name being attacked and makes the protection of the domain name inefficient.
[0005] To achieve the above purpose, the present application provides a domain name resolution method, which includes:
[0006] Get the domain name provided by the user;
[0007] Parsing the domain name to determine the full domain name, authoritative domain name, and top-level domain name in the domain name;
[0008] Based on the order of the full domain name, the authoritative domain name, and the top-level domain name, a step-by-step iterative query is performed in a preset security database until the address corresponding to the domain name is obtained.
[0009] Optionally, the step of performing iterative query in a preset security database based on the order of the full domain name, the authoritative domain name, and the top-level domain name until the address corresponding to the domain name is obtained includes:
[0010] Resolve the full domain name to obtain an identification record in the full domain name;
[0011] Identifying identification records based on the RPZ zone in the security database;
[0012] If the RPZ zone in the security database cannot recognize the identification record, the full domain name, the authoritative domain name, or the top-level domain name is queried in the zone file of the security database until the address corresponding to the domain name is obtained.
[0013] Optionally, if the RPZ zone in the security database cannot identify the identification record, querying the full domain name, the authoritative domain name, or the top-level domain name in the zone file of the security database until the address corresponding to the domain name is obtained includes:
[0014] If the RPZ zone in the security database cannot identify the identification record, the authoritative domain name is formatted to obtain an authoritative domain name file in a preset format;
[0015] Based on the authoritative domain name file, iterative query is performed in the domain name list of the zone file;
[0016] Wherein, based on the authoritative domain name, performing iterative query in the domain name list is a sequential query from the authoritative domain name to the full domain name;
[0017] If the authoritative domain name file cannot be found in the domain name list, converting the top-level domain name into a preset format to obtain a top-level domain name file;
[0018] Based on the top-level domain name file, iteratively query in the domain name list until the address corresponding to the domain name is obtained;
[0019] Wherein, based on the top-level domain name, the iterative query in the domain name list is a sequential query from the top-level domain name to the full domain name.
[0020] Optionally, if the RPZ zone in the security database cannot identify the identification record, then querying the full domain name, the authoritative domain name, or the top-level domain name in the zone file of the security database until the address corresponding to the domain name is obtained, the method includes:
[0021] Obtain historical domain names visited by the user;
[0022] The historical domain name is locally mirrored, and the zone file in the security database is obtained locally.
[0023] Optionally, the step of performing local mirroring screening on the historical domain name to obtain a zone file in the local preservation database includes:
[0024] Mirroring the historical domain name locally to obtain a mirror domain name;
[0025] Repeatedly screening the mirror domain name to obtain a screening domain name;
[0026] Performing address analysis on the screened domain name to obtain an access address corresponding to the historical domain name;
[0027] The historical domain name and the corresponding access address are locally saved, and the zone file in the preservation database is obtained locally.
[0028] Optionally, the step of querying the RPZ zone in the security database based on the identification record includes:
[0029] Performing type analysis on the full domain name to determine the type of the full domain name;
[0030] Based on the type, matching the RPZ zones in the security database to obtain an RPZ list corresponding to the type;
[0031] Based on the RPZ list, an identification record is identified.
[0032] Optionally, the domain name resolution method further includes:
[0033] After obtaining the address corresponding to the domain name, save the identification record in the domain name to a preset RPZ zone, and update the RPZ zone;
[0034] The authoritative domain name and the top-level domain name in the domain name are saved in a preset zone file, and the zone file is updated.
[0035] The present application also provides a domain name resolution device, the domain name resolution device comprising:
[0036] The first acquisition module is used to acquire the domain name provided by the user;
[0037] A parsing module, used to parse the domain name to determine the full domain name, authoritative domain name, and top-level domain name in the domain name;
[0038] The query module is used to perform a step-by-step iterative query in a preset security database based on the order of the full domain name, the authoritative domain name, and the top-level domain name until the address corresponding to the domain name is obtained.
[0039] The present application also provides a domain name resolution device, which is a physical node device. The domain name resolution device includes: a memory, a processor, and a program of the domain name resolution method stored in the memory and executable on the processor. When the program of the domain name resolution method is executed by the processor, the steps of the domain name resolution method as described above can be implemented.
[0040] The present application also provides a storage medium, on which is stored a program for implementing the above-mentioned domain name resolution method. When the program of the domain name resolution method is executed by a processor, the steps of the above-mentioned domain name resolution method are implemented.
[0041] The present application provides a domain name resolution method, device, equipment and storage medium. Compared with the prior art in which domain names at each level are queried, the probability of domain names being attacked is increased, which makes the protection efficiency of domain names low. In the present application, a domain name provided by a user is obtained; the domain name is resolved to determine the full domain name, the authoritative domain name, and the top-level domain name in the domain name; based on the order of the full domain name, the authoritative domain name, and the top-level domain name, a step-by-step iterative query is performed in a preset security database until the address corresponding to the domain name is obtained. In the present application, the domain name provided by the user is obtained, and a registration query is performed on the domain name. After determining that the domain name has been registered, the domain name is parsed to determine the full domain name, authoritative domain name, and top-level domain name in the domain name, and then based on the order from the full domain name to the top-level domain name, a step-by-step iterative query is performed in the preservation database from fine to coarse until the address corresponding to the domain name is obtained. That is, in the present application, after obtaining the domain name provided by the user, a step-by-step iterative query is performed in the preservation database from fine to coarse in the order from the full domain name to the top-level domain name to obtain the address corresponding to the domain name. It does not iterate from the root domain name to the full domain name, which reduces the number of iterative query levels, thereby reducing the nodes attacked and improving the efficiency of domain name protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] 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.
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0044] Figure 1 This is a flowchart of the first embodiment of the domain name resolution method of the present application;
[0045] Figure 2 This is a flowchart of the second embodiment of the domain name resolution method of the present application;
[0046] Figure 3 A schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application;
[0047] Figure 4 This is a diagram of the domain name hierarchy for this application.
[0048] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0049] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] The present application provides a domain name resolution method. In the first embodiment of the domain name resolution method of the present application, refer to Figure 1 , the domain name resolution method includes:
[0051] Step S10, obtaining the domain name provided by the user;
[0052] Step S20, parsing the domain name to determine the full domain name, authoritative domain name, and top-level domain name in the domain name;
[0053] Step S30, based on the order of the full domain name, the authoritative domain name, and the top-level domain name, perform a step-by-step iterative query in a preset security database until the address corresponding to the domain name is obtained.
[0054] This embodiment aims to reduce the number of iterative domain name queries, reduce the probability of being attacked, and thus improve the protection efficiency of the domain name.
[0055] In this embodiment, it should be noted that the domain name resolution method can be applied to a domain name resolution apparatus, which belongs to a domain name resolution device, and the domain name resolution device belongs to a domain name resolution system.
[0056] It should be noted that the domain name resolution system includes a domain name server, a recursive server, and an authoritative server, wherein the domain name server is used to obtain the domain name initiated by the user and to perform registration queries on the domain name; it is also used to resolve the domain name after determining that the domain name has been registered, and to determine the full domain name, authoritative domain name, and top-level domain name in the domain name; it is also used to perform iterative queries on the corresponding authoritative server through the recursive server based on the full domain name, authoritative domain name, and top-level domain name.
[0057] It should be noted that the previous level of the top-level domain name is the root domain name. If the corresponding address cannot be found based on the top-level domain name, it is necessary to query in the order from the root domain name to the full domain name. Among them, the full domain name includes the authoritative domain name, the authoritative domain name includes the top-level domain name, and the top-level domain name includes the root domain name. In other words, the lower the level of the domain name, the more specific the domain name.
[0058] For example, in the domain name www.ABC.cn, www.ABC.cn is the full domain name, ABC.cn is the authoritative domain name, ".cn" is the top-level domain name, and "." is the root domain name.
[0059] In this embodiment, the domain name is resolved, and the resolution result obtained may not include the full domain name. After querying the authoritative domain name, the full domain name containing the authoritative domain name can be obtained in the usage record.
[0060] The specific steps are as follows:
[0061] Step S10, obtaining the domain name provided by the user;
[0062] In this embodiment, the domain name that the user needs to access is obtained, and after the domain name is obtained, a registration query is performed on the domain name to determine whether the domain name is unregistered, and then determine whether the domain name exists. If the domain name is not registered, a reminder that the domain name is not registered is returned, for example, prompt information such as the website does not exist or access error. If the domain name is queried to be a registered domain name, the domain name is analyzed again, avoiding the query of unregistered domain names and improving the efficiency of domain name queries.
[0063] Step S20, parsing the domain name to determine the full domain name, authoritative domain name, and top-level domain name in the domain name;
[0064] Among them, authoritative domain names can include second-level authoritative domain names, third-level authoritative domain names, etc., that is, authoritative domain names can be multi-level domain names. For example, in the domain name www.ABCcn, ABCcn is an authoritative domain name and also a fourth-level authoritative domain name, BCcn is a third-level authoritative domain name, and C.cn is a second-level authoritative domain name.
[0065] It should be noted that the full domain name can include identification records. If the full domain name includes specific records, it can be queried directly through the RPZ zone to prevent the risk of recursive servers iterating queries to the upper layer.
[0066] In this embodiment, after determining that the domain name has been registered, the domain name is parsed to determine the full domain name, authoritative domain name, and top-level domain name in the domain name. The root domain name can also be parsed to avoid the problem of not being able to query the address corresponding to the domain name through the top-level domain name, and then iterating the query to the full domain name through the root domain name.
[0067] Step S30, based on the order of the full domain name, the authoritative domain name, and the top-level domain name, perform a step-by-step iterative query in a preset security database until the address corresponding to the domain name is obtained.
[0068] The preservation database includes the RPZ area and the zone area. The RPZ area is provided with an address identification list for identification records, and the zone area is provided with a domain name list. The domain name list is divided into different levels according to the level of the domain name. For example, for the domain name www.abccn, the domain name list in the zone area is provided with at least five levels of domain name lists, namely, the full domain name list, the fourth-level domain name list, the third-level domain name list, the second-level domain name list, and the top-level domain name list. And each domain name list can have multiple lists at the same level, for example, the top-level domain name list can include the ".cn" top-level domain name list, the ".com" top-level domain name list, and the ".net" top-level domain name list, etc., without specific restrictions.
[0069] In this embodiment, a query is first performed through the full domain name. If the address can be found through the full domain name, the corresponding address webpage is directly returned to the user without querying the authoritative domain name. If the address cannot be found through the full domain name, a query is performed through the authoritative domain name. If the address cannot be found through the authoritative domain name, a query is performed through the top-level domain name until the address corresponding to the domain name is found. If the address corresponding to the domain name is found through a certain level of domain name, the query is no longer iterated to the upper level, thereby reducing the number of nodes attacked and reducing the risk of being attacked during iterative queries.
[0070] Specifically, the step of performing iterative query in a preset security database based on the order of the full domain name, the authoritative domain name, and the top-level domain name until the address corresponding to the domain name is obtained includes:
[0071] Step S31, resolving the full domain name to obtain an identification record in the full domain name;
[0072] Step S32, identifying the identification record based on the RPZ zone in the security database;
[0073] Step S33, if the RPZ zone in the security database cannot recognize the identification record, then query the full domain name, the authoritative domain name, or the top-level domain name in the zone file of the security database until the address corresponding to the domain name is obtained.
[0074] Among them, RPZ (Response Policy Zone) provides a response interception mechanism for the domain name server. For the response result, it matches the domain name or IP identified by the filter and changes the response result. RPZ supports matching and filtering of the query domain name, the name of the A record contained in the response result, the read-only data segment and other data. The intervention actions include returning that the domain name does not exist, no host record, requiring the client to re-initiate the request using the transmission control protocol, and pointing the alias to another domain name and returning the response result of the domain name.
[0075] Among them, the zone file is a file that stores the domain name configuration on the domain name server.
[0076] The identification record may be an A record. Specifically, the A record is used to specify the IP address record corresponding to the host name (or domain name), that is, after obtaining the domain name with the A record, the address corresponding to the domain name can be directly determined through the A record.
[0077] In this embodiment, the full domain name is identified and resolved. If no identification record is obtained in the full domain name, an iterative query can be performed level by level through the zone file in the order of the full domain name, the authoritative domain name, and the top-level domain name until the address corresponding to the domain name is found. Feedback can also be given to the user that the domain name does not exist, or there is no host record, or the user re-initiates the request.
[0078] In this embodiment, if the user re-initiates a request and performs an identification query on the domain name again, but still cannot find the identification domain name, an iterative query is performed through the zone file domain name. This can prevent the user from entering the wrong domain name when entering the domain name. By re-entering and querying, it can be further determined whether the full domain name includes the identification record, thereby improving the accuracy of the query and preventing the address webpage obtained in the final query from not being what the user needs.
[0079] In this embodiment, if an identification record is obtained in the full domain name and the RPZ zone can recognize the identification record, the address corresponding to the identification record will be fed back to the user, so that the user can directly go to the web page of the address corresponding to the domain name, avoiding further iterative queries of the domain name to the superior, and performing all-round preservation of the domain name, that is, performing fine-grained preservation of the domain name.
[0080] For example, if an A record is found in the domain name www.abccn, and the RPZ zone also has a binding address for the A record, the address bound to the A record is directly obtained, and the web page corresponding to the address is fed back to the user, avoiding the recursive server from querying the upper-level authoritative server.
[0081] Specifically, if the RPZ zone in the security database cannot identify the identification record, then in the zone file of the security database, the full domain name, the authoritative domain name, or the top-level domain name is queried until the address corresponding to the domain name is obtained, the step includes:
[0082] Step S331, if the RPZ zone in the security database cannot identify the identification record, the authoritative domain name is formatted to obtain an authoritative domain name file in a preset format;
[0083] Step S332, based on the authoritative domain name file, iteratively query in the domain name list of the zone file;
[0084] Wherein, based on the authoritative domain name, performing iterative query in the domain name list is a sequential query from the authoritative domain name to the full domain name;
[0085] Step S333, if the authoritative domain name file cannot be found in the domain name list, the top-level domain name is converted into a preset format to obtain a top-level domain name file;
[0086] Step S334, based on the top-level domain name file, iteratively query in the domain name list until the address corresponding to the domain name is obtained;
[0087] Wherein, based on the top-level domain name, the iterative query in the domain name list is a sequential query from the top-level domain name to the full domain name.
[0088] The preset format may be a forward format, forward is a computer language instruction for forwarding a request, and the preset format may be a format of a computer language forwarding instruction. Specifically, the forwarding request may be a previous request that remains unchanged, and the subsequent forwarded file or program is processed.
[0089] In this embodiment, if the identification record cannot be identified in the RPZ zone, the format of the full domain name is converted into a preset format, and a query is performed in the domain name list in the zone file, that is, an accurate query is performed from the full domain name list in the domain name list. If the full domain name is queried in the full domain name list, the address corresponding to the domain name is obtained, and the web page corresponding to the address is fed back to the user; if it cannot be queried, the authoritative domain name is converted into a preset format, and a full domain name list containing the full domain name is queried in the authoritative domain name list of the domain name list. If a full domain name list containing the full domain name is queried in the authoritative domain name list, it is directly forwarded to the full domain name list, and the query is performed in the full domain name list until the address corresponding to the domain name is accurately obtained.
[0090] For example, when querying the domain name www.abccn, if the identification record of www.abccn cannot be identified in the RPZ zone, it is determined that the identification record of www.abccn is not saved in the RPZ zone, and then the full domain name list of the zone file is queried. If www.abccn (full domain name) cannot be found in the full domain name list, abccn is converted into a preset forwarding format and queried in the fourth-level domain name list. If abccn (fourth-level authoritative domain name) cannot be found in the third-level domain name list, it is determined that the authoritative server fails to identify the fourth-level authoritative domain name, and bccn is converted into a preset forwarding format and queried in the third-level domain name list. If bccn (third-level authoritative domain name) cannot be found in the second-level domain name list, c.cn is converted into a preset forwarding format and queried in the second-level authoritative domain name list. If bccn is identified in the third-level domain name list, the fourth-level domain name list where abccn is located is queried based on the third-level authoritative list corresponding to bccn, and the query is iterated level by level to the lower level until the address corresponding to the domain name is obtained.
[0091] In this embodiment, iterative queries are performed step by step upward until a domain name of a corresponding level is identified in the domain name list, and based on the domain name list of this level, the full domain name is iteratively queried step by step downward, and the corresponding address is determined based on the full domain name. That is, iterative queries are performed step by step upward until the domain name is identified, and then the corresponding address is iteratively queried in the lower layer based on the level of the identified domain name. Coarse-grained preservation of domain names is achieved through zones, and the number of iterations is based on the lowest-level domain name list that can identify the domain name, and the domain name is iteratively queried step by step downward for memory, thereby reducing unnecessary iterative query processes and levels, reducing iterative query nodes, and thereby reducing the risk of iterative queries being attacked, thereby improving the protection efficiency of domain name resolution.
[0092] Specifically, the step of identifying the identification record based on the RPZ zone in the security database includes:
[0093] Step S321, performing type analysis on the full domain name to determine the type of the full domain name;
[0094] Step S322, based on the type, matching the RPZ area in the security database to obtain an RPZ list corresponding to the type;
[0095] Step S333: Identify the identification record based on the RPZ list.
[0096] In this embodiment, the full domain name can be classified according to the prefix of the domain name, and can also be classified according to the suffix of the domain name, that is, the top-level domain name, etc. It should be noted that the classification of the full domain name needs to be split according to the category set in the RPZ list, that is, if the classification method of the RPZ list is prefix classification, the classification of the full domain name should also be prefix classification.
[0097] In this embodiment, the type of the full domain name is first determined, and the corresponding RPZ list is found in the RPZ zone according to the type, and based on the RPZ list, the identification records in the full domain name are identified, so as to regularly identify the identification records, thereby improving the identification efficiency of the identification records.
[0098] In this embodiment, a registration query is first performed on the domain name provided by the user. After determining that the domain name provided by the user is a registered domain name, the domain name is then parsed to determine the full domain name, authoritative domain name, top-level domain name, etc. of the domain name, and an identification record is identified for the full domain name through the RPZ zone. If an identification record is identified, the domain name is iteratively queried and identified from the lower level to the upper level in the order of the full domain name, authoritative domain name, top-level domain name, and root domain name. After the domain name is identified, the domain name is iteratively queried and identified from the current identification level to the lower level until the address corresponding to the domain name is obtained, and the web page corresponding to the address is fed back to the user.
[0099] The present application provides a domain name resolution method, device, equipment and storage medium. Compared with the prior art in which domain names at each level are queried, the probability of domain names being attacked is increased, which makes the protection efficiency of domain names low. In the present application, a domain name provided by a user is obtained; the domain name is resolved to determine the full domain name, the authoritative domain name, and the top-level domain name in the domain name; based on the order of the full domain name, the authoritative domain name, and the top-level domain name, a step-by-step iterative query is performed in a preset security database until the address corresponding to the domain name is obtained. In the present application, the domain name provided by the user is obtained, and a registration query is performed on the domain name. After determining that the domain name has been registered, the domain name is parsed to determine the full domain name, authoritative domain name, and top-level domain name in the domain name, and then based on the order from the full domain name to the top-level domain name, a step-by-step iterative query is performed in the preservation database from fine to coarse until the address corresponding to the domain name is obtained. That is, in the present application, after obtaining the domain name provided by the user, a step-by-step iterative query is performed in the preservation database from fine to coarse in the order from the full domain name to the top-level domain name to obtain the address corresponding to the domain name. It does not iterate from the root domain name to the full domain name, which reduces the number of iterative query levels, thereby reducing the nodes attacked and improving the efficiency of domain name protection.
[0100] Further, based on the above-mentioned embodiment in the present application, another embodiment of the present application is provided. In this embodiment, referring to Figure 2, if the RPZ zone in the security database cannot identify the identification record, then querying the full domain name, the authoritative domain name, or the top-level domain name in the zone file of the security database until the address corresponding to the domain name is obtained, the method includes:
[0101] Step S010, obtaining the historical domain names visited by the user;
[0102] Step S020, locally mirroring the historical domain name, and locally obtaining the zone file in the security database.
[0103] In this embodiment, the user's access domain name is obtained, and historical domain names that have been successfully accessed are screened out from the access domain names, and the root domain name of the historical domain name is determined. The root domain name is saved in a local zone file through a local mirror. It should be noted that the root domain name can also be updated through the root server.
[0104] In this embodiment, by saving the root domain name image locally, the interaction with the external network during the iterative query process is avoided, thereby reducing the chance of being attacked and improving the protection efficiency of the root domain name query.
[0105] In this embodiment, a domain name list corresponding to the historical domain name is set in the local zone file, and the domain name list is divided into a full domain name list, an authoritative domain name list, a top-level domain name list, etc. according to the domain name level, and the domain names of different levels in the historical domain names are saved in the domain name list of the corresponding level, and the historical domain name and the corresponding access address are bound, and a forwarding mechanism is set in the zone file, so that when the query identifies the domain name list where the domain name is located, it is directly forwarded to the domain name list through the forwarding mechanism for further query.
[0106] Specifically, the step of performing local mirroring screening on the historical domain name and obtaining the zone file in the local preservation database includes:
[0107] Step S0121, locally mirroring the historical domain name to obtain a mirror domain name;
[0108] Step S0122, duplicate filtering is performed on the mirror domain name to obtain a filtered domain name;
[0109] Step S0123, performing address analysis on the screened domain name to obtain an access address corresponding to the historical domain name;
[0110] Step S0124, locally save the historical domain name and the corresponding access address, and obtain the zone file in the preservation database locally.
[0111] In this embodiment, after the historical domain name is mirrored, the corresponding access address is analyzed from the mirrored historical domain name, and the historical domain name and the access address are correspondingly saved in a local zone file.
[0112] In this embodiment, after performing a hierarchical analysis on the historical domain names, domain names of different levels in the historical domain names are determined, and the domain names of different levels are repeatedly screened out, and the repeated domain names are screened out to reduce the space occupied by the zone file and reduce the number of queried domain names during the query.
[0113] In this embodiment, by saving the sub-domain names in a local zone file and setting a single domain name list in the zone file, domain name identification or iterative query are all performed locally, avoiding interaction with the external network during the domain name identification or iterative query process, reducing the chance of being attacked, and improving the protection efficiency of root domain name queries.
[0114] Further, based on the above embodiments in the present application, another embodiment of the present application is provided. In this embodiment, the domain name resolution method further includes:
[0115] Step D10, after obtaining the address corresponding to the domain name, save the identification record in the domain name to a preset RPZ zone, and update the RPZ zone;
[0116] Step D20, and save the authoritative domain name and the top-level domain name in the domain name into a preset zone file, and update the zone file.
[0117] In this embodiment, after obtaining the corresponding address for the domain name provided by the user, the domain name is saved in the zone file according to the domain name level, and an identification record is analyzed from the domain name, and the identification record is bound to the address and saved in the RPZ zone, and the RPZ zone is updated.
[0118] In this embodiment, if the data is saved in the RPZ zone all the time, there will be too many identification records in the RPZ zone, which will affect the domain name recognition process. Therefore, it is necessary to delete the identification records outside the preset time to alleviate the storage space of the RPZ zone, thereby improving the RPZ zone's efficiency in recognizing domain names.
[0119] It should be noted that the preset time can be set according to the access frequency and the duration of a single visit. The higher the access frequency and the longer the single access time, the more important the domain name is to the user. That is, the preset time of the identification record of a domain name with a high access frequency needs to be longer than that of the identification record of a domain name with a low access frequency.
[0120] For example, if the domain name www.abccn is visited 40 times per month with an average visit duration of 2 hours each time, and the domain name www.baccn is visited 10 times per month with an average visit duration of 30 minutes each time, then the preset time for the domain name www.abccn can be set to two months, and the preset time for the domain name www.baccn can be set to 15 days. After the domain name www.baccn has not been visited for 15 days, the RPZ zone will delete the identification record corresponding to the domain name www.baccn.
[0121] In this embodiment, it should be noted that the countdown time for the preset time is the end time of the last access to the domain name. In this embodiment, the retention time of domain names with high user access frequency and long single access time is longer than the retention time of domain names with low access frequency and short single access time, which can be more suitable for user use.
[0122] Reference Figure 3 , Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
[0123] like Figure 3 As shown, the domain name resolution device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0124] Optionally, the domain name resolution device may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0125] Those skilled in the art will understand that Figure 3 The domain name resolution device structure shown in the figure does not constitute a limitation on the domain name resolution device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0126] like Figure 3As shown, the memory 1005 as a storage medium may include an operating system, a network communication module and a domain name resolution program. The operating system is a program that manages and controls the hardware and software resources of the domain name resolution device, and supports the operation of the domain name resolution program and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and the communication with other hardware and software in the domain name resolution system.
[0127] exist Figure 3 In the domain name resolution device shown, the processor 1001 is used to execute the domain name resolution program stored in the memory 1005 to implement the steps of any of the above-mentioned domain name resolution methods.
[0128] The specific implementation of the domain name resolution device of the present application is basically the same as the embodiments of the above-mentioned domain name resolution method, and will not be repeated here.
[0129] The present application also provides a domain name resolution device, the domain name resolution device comprising:
[0130] The first acquisition module is used to acquire the domain name provided by the user;
[0131] A parsing module, used to parse the domain name to determine the full domain name, authoritative domain name, and top-level domain name in the domain name;
[0132] The query module is used to perform a step-by-step iterative query in a preset security database based on the order of the full domain name, the authoritative domain name, and the top-level domain name until the address corresponding to the domain name is obtained.
[0133] Optionally, the query module includes:
[0134] A parsing submodule, used to parse the full domain name to obtain an identification record in the full domain name;
[0135] an identification module, for identifying identification records based on the RPZ zone in the security database;
[0136] The first query submodule is used to query the full domain name, the authoritative domain name, or the top-level domain name in the zone file of the security database if the RPZ zone in the security database cannot recognize the identification record until the address corresponding to the domain name is obtained.
[0137] Optionally, the second query submodule includes:
[0138] A first format conversion module, configured to convert the authoritative domain name into a format to obtain an authoritative domain name file in a preset format if the RPZ zone in the security database cannot identify the identification record;
[0139] The second query submodule performs an iterative query in the domain name list of the zone file based on the authoritative domain name file;
[0140] Wherein, based on the authoritative domain name, performing iterative query in the domain name list is a sequential query from the authoritative domain name to the full domain name;
[0141] A second format conversion module is used to convert the top-level domain name into a preset format to obtain a top-level domain name file if the authoritative domain name file cannot be found in the domain name list;
[0142] A third query submodule, configured to perform an iterative query in the domain name list based on the top-level domain name file until an address corresponding to the domain name is obtained;
[0143] Wherein, based on the top-level domain name, the iterative query in the domain name list is a sequential query from the top-level domain name to the full domain name.
[0144] Optionally, the domain name resolution device further includes:
[0145] A second acquisition module is used to acquire the historical domain names visited by the user;
[0146] The mirror module is used to locally mirror the historical domain name and obtain the zone file in the security database locally.
[0147] Optionally, the mirroring module includes:
[0148] A mirror submodule, used to locally mirror the historical domain name to obtain a mirror domain name;
[0149] A screening module, used to filter out duplicates of the mirror domain name to obtain a screening domain name;
[0150] An analysis unit, configured to perform address analysis on the screened domain name to obtain an access address corresponding to the historical domain name;
[0151] The storage module is used to locally store the historical domain name and the corresponding access address, and obtain the zone file in the preservation database locally.
[0152] Optionally, the second query submodule includes:
[0153] An analysis submodule, used to perform type analysis on the full domain name to determine the type of the full domain name;
[0154] A matching module, configured to match the RPZ area in the security database based on the type to obtain an RPZ list corresponding to the type;
[0155] An identification unit is used to identify the identification record based on the RPZ list.
[0156] Optionally, the domain name resolution device further includes:
[0157] A first updating module, configured to save the identification record in the domain name to a preset RPZ zone after obtaining the address corresponding to the domain name, and update the RPZ zone;
[0158] The second updating module is used to save the authoritative domain name and the top-level domain name in the domain name into a preset zone file and update the zone file.
[0159] The specific implementation of the domain name resolution device of the present application is basically the same as the embodiments of the above-mentioned domain name resolution method, and will not be repeated here.
[0160] An embodiment of the present application provides a storage medium, and the storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of any of the above-mentioned domain name resolution methods.
[0161] The specific implementation of the storage medium of the present application is basically the same as the above-mentioned embodiments of the domain name resolution method, and will not be repeated here.
[0162] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0163] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0164] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0165] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A domain name resolution method, characterized in that: The domain name resolution method comprises: Get the domain name provided by the user; Parse the domain name to determine the full domain name, authoritative domain name and top-level domain name in the domain name, including: parse the full domain name to obtain the identification record in the full domain name; identify the identification record based on the RPZ zone in the security database; obtain the historical domain name visited by the user; locally mirror the historical domain name to obtain the mirror domain name; perform duplicate screening on the mirror domain name to obtain the screening domain name; perform address analysis on the screening domain name to obtain the access address corresponding to the historical domain name; locally save the historical domain name and the corresponding access address to obtain the zone file in the security database locally; if the RPZ zone in the security database cannot identify the identification record, The authoritative domain name is formatted to obtain an authoritative domain name file in a preset format; based on the authoritative domain name file, an iterative query is performed in the domain name list of the zone file; wherein, based on the authoritative domain name, the iterative query in the domain name list is a sequential query from the authoritative domain name to the full domain name; if the authoritative domain name file cannot be found in the domain name list, the top-level domain name is converted into a preset format to obtain a top-level domain name file; based on the top-level domain name file, an iterative query is performed in the domain name list until the address corresponding to the domain name is obtained; wherein, based on the top-level domain name, the iterative query in the domain name list is a sequential query from the top-level domain name to the full domain name; Based on the order of the full domain name, the authoritative domain name and the top-level domain name, an iterative query is performed in a preset security database until the address corresponding to the domain name is obtained.
2. The domain name resolution method according to claim 1, characterized in that: The step of identifying the identification record based on the RPZ zone in the security database includes: Performing type analysis on the full domain name to determine the type of the full domain name; Based on the type, matching the RPZ zones in the security database to obtain an RPZ list corresponding to the type; Based on the RPZ list, an identification record is identified.
3. The domain name resolution method according to claim 1, characterized in that: The domain name resolution method further includes: After obtaining the address corresponding to the domain name, save the identification record in the domain name to a preset RPZ zone, and update the RPZ zone; The authoritative domain name and the top-level domain name in the domain name are saved in a preset zone file, and the zone file is updated.
4. A domain name resolution device, characterized in that: The domain name resolution device comprises: The first acquisition module is used to acquire the domain name provided by the user; A parsing module, used to parse the domain name and determine the full domain name, authoritative domain name and top-level domain name in the domain name; A query module, configured to perform a step-by-step iterative query in a preset security database based on the order of the full domain name, the authoritative domain name, and the top-level domain name, until an address corresponding to the domain name is obtained; The parsing module is also used to parse the full domain name to obtain the identification record in the full domain name; identify the identification record based on the RPZ zone in the security database; obtain the historical domain name visited by the user; locally mirror the historical domain name to obtain the mirror domain name; perform duplicate screening on the mirror domain name to obtain the screened domain name; perform address analysis on the screened domain name to obtain the access address corresponding to the historical domain name; locally save the historical domain name and the corresponding access address to obtain the zone file in the security database locally; if the RPZ zone in the security database cannot recognize the identification record, the authoritative domain name is formatted. , obtain an authoritative domain name file in a preset format; based on the authoritative domain name file, perform an iterative query in the domain name list of the zone file; wherein, based on the authoritative domain name, the iterative query in the domain name list is a sequential query from the authoritative domain name to the full domain name; if the authoritative domain name file cannot be found in the domain name list, the top-level domain name is converted into a preset format to obtain a top-level domain name file; based on the top-level domain name file, perform an iterative query in the domain name list until the address corresponding to the domain name is obtained; wherein, based on the top-level domain name, the iterative query in the domain name list is a sequential query from the top-level domain name to the full domain name.
5. A domain name resolution device, characterized in that: The domain name resolution device comprises: a memory, a processor, and a program stored in the memory for implementing the domain name resolution method. The memory is used to store a program for implementing a domain name resolution method; The processor is used to execute a program for implementing the domain name resolution method to implement the steps of the domain name resolution method as claimed in any one of claims 1 to 3.
6. A storage medium, characterized in that: The storage medium stores a program for implementing a domain name resolution method, and the program for implementing a domain name resolution method is executed by a processor to implement the steps of the domain name resolution method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Domain name system DNS secondary recursion resolution method
CN106790747A
Domain name management method, domain name resolution method and device
CN112583946A