CN116800718A - Domain name query method and device, nonvolatile storage medium and electronic equipment - Google Patents

Domain name query method and device, nonvolatile storage medium and electronic equipment Download PDF

Info

Publication number
CN116800718A
CN116800718A CN202310946774.2A CN202310946774A CN116800718A CN 116800718 A CN116800718 A CN 116800718A CN 202310946774 A CN202310946774 A CN 202310946774A CN 116800718 A CN116800718 A CN 116800718A
Authority
CN
China
Prior art keywords
domain name
address
preset
type
query request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310946774.2A
Other languages
Chinese (zh)
Inventor
向九松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202310946774.2A priority Critical patent/CN116800718A/en
Publication of CN116800718A publication Critical patent/CN116800718A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4552Lookup mechanisms between a plurality of directories; Synchronisation of directories, e.g. metadirectories

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a domain name query method and device, a nonvolatile storage medium and electronic equipment. Wherein the method comprises the following steps: acquiring a first domain name query request of a target domain name based on a first domain name type, wherein the first domain name query request is used for indicating to query a first domain name address based on an internet protocol version 6 IPv6 corresponding to the target domain name and the first domain name type in a preset cache space; under the condition that the first domain name address cannot be queried in a preset cache space, converting the first domain name request into a second domain name query request based on a second domain name type, wherein the second domain name query request is used for indicating to query a second domain name address based on the internet protocol version 4 IPv4 corresponding to the target domain name and the second domain name type in the preset cache space; and converting the second domain name address into the first domain name address according to a preset algorithm mapping table. The invention solves the technical problem that the prior art can not enable the service only supporting IPv4 to support the use of the IPv6 single stack.

Description

Domain name query method and device, nonvolatile storage medium and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a domain name query method and apparatus, a nonvolatile storage medium, and an electronic device.
Background
The dual stack network is a transition stage from the evolution of the network to the IPv6, is not suitable for being used as a long-term deployment and operation state, and the pure IPv6 is certainly an evolution trend of the 5G independent networking. The 5G standard organization 3GPP has required to support the IPv6 protocol for both its related standard design and device implementation, and the devices deployed in the existing network also support the IPv6 protocol. With development of the deployment work of the IPv6 scale, most of internet services have been modified by double stacks, but some of the services still only support IPv4. In combination with the actual situation of the existing network, the difficulty of the IPv6 single stack scale deployment is how to keep supporting only normal use of IPv4 services.
Aiming at the problem that the prior art can not enable the service only supporting IPv4 to support the use of an IPv6 single stack, no effective solution is proposed at present.
Disclosure of Invention
The embodiment of the invention provides a domain name query method, a domain name query device, a nonvolatile storage medium and electronic equipment, which at least solve the technical problem that the prior art cannot enable a service only supporting IPv4 to support IPv6 single stack use.
According to an aspect of an embodiment of the present invention, there is provided a domain name query method, including: acquiring a first domain name query request of a target domain name based on a first domain name type, wherein the first domain name query request is used for indicating to query a first domain name address corresponding to the target domain name and the first domain name type in a preset cache space, the preset cache space is used for recording at least one group of domain name mapping relations, each group of domain name mapping relations is used for recording a group of preset domain names and preset domain name addresses corresponding to the preset domain name type, and the preset domain name type comprises: the preset domain name address comprises: a first domain name address based on internet protocol version 6 IPv6 corresponding to the first domain name type, and a second domain name address based on internet protocol version 4 IPv4 corresponding to the first domain name type; converting the first domain name request into a second domain name query request based on a second domain name type under the condition that the first domain name address cannot be queried in the preset cache space, wherein the second domain name query request is used for indicating to query the second domain name address corresponding to the target domain name and the second domain name type in the preset cache space; and converting the second domain name address into the first domain name address according to a preset algorithm mapping table, wherein the preset algorithm mapping table is used for representing the domain name address conversion relation between the IPv4 version of the Internet protocol and the IPv6 version of the Internet protocol.
Optionally, obtaining the first domain name query request of the target domain name based on the first domain name type includes: receiving a target domain name query request of the target domain name; identifying a user type that initiates the target domain name query request, wherein the user type comprises: a dual stack user, a first single stack user based on internet protocol version 6 IPv6, and a second single stack user based on internet protocol version 4 IPv 4; and determining the target domain name query request as the first domain name query request under the condition that the user type is the first single stack user.
Optionally, in the case that the user type is the first single stack user, the method further includes: judging whether a target user initiating the target domain name query request is a preset differentiated user or not; judging whether the target domain name is a preset differentiated domain name or not under the condition that the target user is the preset differentiated user; and under the condition that the target domain name is the preset differentiated domain name, determining that the target domain name query request is a third domain name query request, wherein the third domain name query request is used for indicating to query a first domain name address corresponding to the target domain name and the first domain name type in a customized cache space, and the customized cache space is the same as the preset cache space.
Optionally, after identifying the user type that initiated the target domain name query request, the method further comprises: determining that the target domain name query request is a fourth domain name query request under the condition that the user type is the double-stack user or the second single-stack user; responding to the fourth domain name inquiry request, inquiring a third domain name address corresponding to the target domain name in a public buffer space, wherein the public buffer space is used for recording the corresponding relation between at least one preset domain name and the third domain name address, and the third domain name address comprises: a third domain name address based on internet protocol version 4 IPv4 corresponding to the first domain name type, and a second third domain name address based on internet protocol version 6 IPv6 corresponding to the second domain name type.
Optionally, the method further comprises: if the third domain name address cannot be queried in the public cache space, sending the fourth domain name query request to a recursion server, wherein the recursion server is used for analyzing the fourth domain name query request to acquire the third domain name address; receiving the third domain name address returned by the recursion server; and storing the target domain name and the corresponding third domain name address into the public cache space.
Optionally, the method further comprises: acquiring at least one preset domain name and a corresponding third domain name address stored in the public cache space; identifying the preset domain name type corresponding to the third domain name address; and determining each third domain name address, the corresponding preset domain name and the corresponding preset domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in the preset cache space.
Optionally, in a case that the first domain name address cannot be queried in the preset cache space, converting the first domain name request into a second domain name query request based on a second domain name type includes: if the first domain name address cannot be queried in the preset cache space, sending the first domain name query request to a recursion server, wherein the recursion server is used for analyzing the first domain name query request to acquire the first domain name address; in the event that the recursive server fails to obtain the first domain name address, the first domain name request is converted to a second domain name query request based on a second domain name type.
Optionally, after sending the first domain name query request to a recursion server, the method further comprises: receiving the first domain name address returned by the recursion server; identifying the preset domain name type corresponding to the first domain name address as the first domain name type; and determining each first domain name address, the corresponding preset domain name and the corresponding first domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in the preset cache space.
Optionally, converting the second domain name address into the first domain name address according to a preset algorithm mapping table includes: acquiring the second domain name address, wherein the address number of the second domain name address is 32 bits; adding a preset address prefix before the second domain name address according to the preset algorithm mapping table to obtain a target domain name address; detecting whether the address digit of the target domain name address reaches a preset address digit, wherein the preset address digit is 128 bits; under the condition that the address digit of the detected target domain name address does not reach the preset address digit, supplementing a preset numerical value at the last digit of the target domain name address until reaching the preset address digit; and determining the target domain name address reaching the preset address digit as the first domain name address.
Optionally, the method further comprises: if the second domain name address cannot be queried in the preset cache space, sending the second domain name query request to a recursion server, wherein the recursion server is used for analyzing the second domain name query request to acquire the second domain name address; and receiving the second domain name address returned by the recursion server.
Optionally, after receiving the second domain name address returned by the recursive server, the method further comprises: identifying the preset domain name type corresponding to the second domain name address as the second domain name type; and determining each second domain name address, the corresponding preset domain name and the corresponding second domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations into the preset cache space.
Optionally, after converting the second domain name address into the first domain name address according to a preset algorithm mapping table, the method further includes: identifying the preset domain name type corresponding to the first domain name address as the first domain name type; and determining each first domain name address, the corresponding preset domain name and the corresponding first domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in the preset cache space.
According to another aspect of the embodiment of the present invention, there is also provided a domain name query device, including: the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring a first domain name query request of a target domain name based on a first domain name type, the first domain name query request is used for indicating to query a first domain name address corresponding to the target domain name and the first domain name type in a preset cache space, the preset cache space is used for recording at least one group of domain name mapping relations, each group of domain name mapping relations is used for recording a group of preset domain names and preset domain name addresses corresponding to the preset domain name type, and the preset domain name type comprises: the preset domain name address comprises: a first domain name address based on internet protocol version 6 IPv6 corresponding to the first domain name type, and a second domain name address based on internet protocol version 4 IPv4 corresponding to the first domain name type; a type conversion module, configured to convert, when the first domain name address cannot be queried in the preset cache space, the first domain name request into a second domain name query request based on a second domain name type, where the second domain name query request is used to instruct to query, in the preset cache space, the second domain name address corresponding to the target domain name and the second domain name type; the address conversion module is used for converting the second domain name address into the first domain name address according to a preset algorithm mapping table, wherein the preset algorithm mapping table is used for representing the domain name address conversion relation between the 4 th edition IPv4 of the Internet protocol and the 6 th edition IPv6 of the Internet protocol.
According to another aspect of the embodiment of the present invention, there is further provided a nonvolatile storage medium, where the nonvolatile storage medium is configured to store a program, and when the program runs, control a device where the nonvolatile storage medium is located to execute the domain name query method described above.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device, including: the system comprises a memory and a processor, wherein the processor is used for running a program stored in the processor, and the domain name query method is executed when the program runs.
In the embodiment of the invention, the preset cache space is utilized, the corresponding preset domain name address can be stored and queried according to the unit of the preset domain name and the preset domain name type, the first domain name query request can be a domain name query request of an IPv6 single stack, the query result of the first domain name query request can only be the first domain name address based on the IPv6 version of internet protocol, the first domain name query request of the first domain name type can be further responded by utilizing the preset cache space, the first domain name address based on the IPv6 version of internet protocol can be queried, the first domain name query request of the first domain name type can be further converted into the second domain name query request of the second domain name type under the condition that the first domain name address cannot be queried, the second domain name query request is responded to query the second domain name address based on the IPv4 version of internet protocol, and then the second domain name address is converted into the first domain name address by utilizing the preset algorithm mapping table, so that the technical effect that only the IPv6 single stack of the service supporting IPv4 can be used by utilizing the preset cache space and the preset algorithm mapping table is realized, and the technical effect that the query result can not be met by using the prior art stack supporting only the IPv4 can be further solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a domain name query method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an architecture according to an embodiment of the application;
FIG. 3 is a schematic diagram of a DNS64 standard resolution in accordance with an embodiment of the present application;
FIG. 4 is a schematic diagram of an optimized DNS64 resolution procedure in accordance with an embodiment of the present application;
FIG. 5 is a schematic diagram of a cache data synchronization flow in accordance with an embodiment of the present application;
FIG. 6 is a schematic diagram of a user identification process according to an embodiment of the application;
FIG. 7 is a schematic diagram of a customized partition update flow according to an embodiment of the present application;
FIG. 8 is a schematic diagram of providing a prefix for non-domain name applications according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a domain name query device according to an embodiment of the application;
fig. 10 is a block diagram of a computer terminal according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, a domain name query method embodiment is provided, it being noted that the steps shown in the flowchart of the figures may be performed in a computer system, such as a set of computer-executable instructions, and, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order other than that shown or described herein.
Fig. 1 is a flowchart of a domain name query method according to an embodiment of the present invention, as shown in fig. 1, the method includes the steps of:
step S102, a first domain name query request of a target domain name based on a first domain name type is obtained, wherein the first domain name query request is used for indicating to query a first domain name address corresponding to the target domain name and the first domain name type in a preset cache space, the preset cache space is used for recording at least one group of domain name mapping relations, each group of domain name mapping relations is used for recording a group of preset domain names and preset domain name addresses corresponding to the preset domain name type, and the preset domain name type comprises: the first domain name type and the second domain name type, and the preset domain name address comprises: a first domain name address based on internet protocol version 6 IPv6 corresponding to the first domain name type, and a second domain name address based on internet protocol version 4 IPv4 corresponding to the first domain name type;
Step S104, under the condition that the first domain name address cannot be queried in the preset cache space, converting the first domain name request into a second domain name query request based on a second domain name type, wherein the second domain name query request is used for indicating to query the second domain name address corresponding to the target domain name and the second domain name type in the preset cache space;
step S106, converting the second domain name address into the first domain name address according to a preset algorithm mapping table, wherein the preset algorithm mapping table is used for representing the domain name address conversion relationship between the 4 th edition IPv4 of the Internet protocol and the 6 th edition IPv6 of the Internet protocol.
In the embodiment of the invention, the preset cache space is utilized, the corresponding preset domain name address can be stored and queried according to the unit of the preset domain name and the preset domain name type, the first domain name query request can be a domain name query request of an IPv6 single stack, the query result of the first domain name query request can only be the first domain name address based on the IPv6 version of internet protocol, the first domain name query request of the first domain name type can be further responded by utilizing the preset cache space, the first domain name address based on the IPv6 version of internet protocol can be queried, the first domain name query request of the first domain name type can be further converted into the second domain name query request of the second domain name type under the condition that the first domain name address cannot be queried, the second domain name query request is responded to query the second domain name address based on the IPv4 version of internet protocol, and then the second domain name address is converted into the first domain name address by utilizing the preset algorithm mapping table, so that the technical effect that only the IPv6 single stack of the service supporting IPv4 can be used by utilizing the preset cache space and the preset algorithm mapping table is realized, and the technical effect that the query result can not be met by using the prior art stack supporting only the IPv4 can be further solved.
In the above step S102, the first domain name query request may be issued by an IPv6 single stack user, and is used to indicate that the target domain name is acquired based on the first domain name of IPv 6.
In the above step S102, the preset cache space may be a DNS 64-based cache space.
In the step S102, the preset buffer space is dedicated to responding to the first domain name query request sent by the IPv6 single stack user.
In the step S102, the preset buffer space takes the "preset domain name and the preset domain name type" as the basic units for storing and querying, and records the corresponding preset domain name address, where the preset domain name type includes a first domain name type indicating that the acquisition of the IPv6 address based on the internet protocol is requested, and a second domain name type based on the IPv4 address based on the internet protocol.
In the above step S102, the preset buffer spaces may respectively store: a first domain name address corresponding to a preset domain name and a first domain name type, and a second domain name address corresponding to a preset domain name and a second domain name type.
Optionally, the first domain name address based on the internet protocol version 6 IPv6 may be stored in the preset cache space as a record in AAAA form, that is, the record in AAAA form corresponds to the first domain name type; the second domain name address based on the internet protocol version 4 IPv4 may be stored in the preset cache space as a record in a form a, that is, the record in a form corresponds to the second domain name type.
In the step S102, after the first domain name query request is obtained, the "target domain name and the first domain name type" may be determined from the plurality of "preset domain names and preset domain name types" recorded in the preset buffer space, and then the first domain name address of the target domain name may be determined according to the mapping relationship.
In the step S104, if the preset buffer space fails to query the first domain name address indicated by the first domain name query request, the first domain name request may be converted into a second domain name query request based on the second domain name type, and then the second domain name address having a mapping relationship with the target domain name and the second domain name type is queried in the preset buffer space.
In the step S106, the preset algorithm mapping table is used to record a domain name address conversion relationship for converting the domain name address based on the IPv4 version of internet protocol into the domain name address based on the IPv6 version of internet protocol, and in the case that the second domain name address can be obtained, the obtained second domain name address can be converted into the first domain name address, and the response is made to the first domain name query request.
As an alternative embodiment, acquiring the first domain name query request of the target domain name based on the first domain name type includes: receiving a target domain name query request of a target domain name; identifying a user type initiating a target domain name query request, wherein the user type comprises: a dual stack user, a first single stack user based on internet protocol version 6 IPv6, and a second single stack user based on internet protocol version 4 IPv 4; and under the condition that the user type is a first single stack user, determining the target domain name query request as a first domain name query request.
In the above embodiment of the present invention, the user initiating the domain name query may be a dual stack user, a first single stack user based on the IPv6 version of the internet protocol, and a second single stack user based on the IPv4 version of the internet protocol, where the target domain name query request initiated by the dual stack user indicates to obtain a domain name address of the target domain name based on the IPv6 version of the internet protocol or a domain name address based on the IPv4 version of the internet protocol; a target domain name query request initiated by a second single stack user indicates to acquire a domain name address of a target domain name based on IPv4 version 4 of an Internet protocol; the target domain name query request initiated by the first single-stack user indicates to acquire the domain name address of the target domain name based on the IPv6 version of the Internet protocol, so that the first single-stack user can be used as the first domain name query request based on the first domain name type, and the identification of the preset domain name type of the target domain name query request is realized.
As an alternative embodiment, in case the user type is a first single stack user, the method further comprises: judging whether a target user initiating a target domain name query request is a preset differentiated user or not; judging whether the target domain name is a preset differentiated domain name or not under the condition that the target user is the preset differentiated user; and under the condition that the target domain name is a preset differentiated domain name, determining that the target domain name query request is a third domain name query request, wherein the third domain name query request is used for indicating to query a first domain name address corresponding to the target domain name and the first domain name type in a customized cache space, and the customized cache space is the same as the preset cache space.
In the above embodiment of the present invention, when the user type is the first single-stack user, the response to the first domain name query request sent by the first single-stack user is indicated to use the preset buffer space, but the preset buffer space needs to process a large number of first domain name query requests sent by a plurality of first single-stack users, so that the response speed to the first domain name query request is affected by the number of requests of the first domain name query request, and cannot be responded quickly, further, in order to improve the response speed, the preset differential user and the preset differential domain name can be preset, the target domain name query request made by the preset differential user to the preset differential domain name is used as the third domain name query request, and the custom buffer space is configured to respond to the third domain name query request, because the custom buffer space only responds to the third domain name query request, the third domain name query request needing the custom buffer space response will be far less than the first domain name query request needing the preset buffer space response, so the third domain name query request can be responded quickly based on the custom buffer space.
Optionally, the customized cache space is the same as the preset cache space, and the preset domain name type can be used as basic units for storage and inquiry, and the corresponding preset domain name address is recorded, wherein the preset domain name type comprises a first domain name type which indicates that the acquisition of the IPv6 address based on the internet protocol is requested, and a second domain name type based on the IPv4 address of the internet protocol.
Alternatively, the preset domain name stored in the custom cache space may be a preset differentiated domain name.
Alternatively, the preset differentiated user may be a user having a high priority, and the preset differentiated domain name may be a domain name having a high priority.
As an alternative embodiment, after identifying the user type that initiated the target domain name query request, the method further comprises: under the condition that the user type is a double-stack user or a second single-stack user, determining that the target domain name query request is a fourth domain name query request; responding to a fourth domain name inquiry request, inquiring a third domain name address corresponding to the target domain name in a public cache space, wherein the public cache space is used for recording the corresponding relation between at least one preset domain name and the third domain name address, and the third domain name address comprises: a class III domain name address based on IPv4 version of Internet protocol corresponding to the first domain name type, and a class III domain name address based on IPv6 version of Internet protocol corresponding to the second domain name type.
In the above embodiment of the present invention, the preset domain name, a class of third domain name address based on the 4 th version IPv4 of internet protocol and a class of second third domain name address based on the 6 th version IPv6 of internet protocol are recorded in the public buffer space by using the preset domain name as a mapping unit, and when the target object for initiating the target domain name query request is a dual-stack user or a second single-stack user, the public buffer space can be used to respond to a fourth domain name query request sent by the dual-stack user or the second single-stack user, so as to implement the response to the fourth domain name query request.
Optionally, the public buffer space can provide a class of third domain name address based on the internet protocol version 4 IPv4 and a class of second domain name address based on the internet protocol version 6 IPv6, but mainly uses the class of third domain name address based on the internet protocol version 4 IPv4, so that the dual-stack user can use the class of third domain name address based on the internet protocol version 4 IPv4 and the class of second domain name address based on the internet protocol version 6 IPv6, and the use requirements of the dual-stack user and the second single-stack user can be met based on the public buffer space.
However, the first single stack user can only use the domain name address based on the internet protocol version 6 IPv6, and the public buffer space cannot respond to the first domain name query request of the first single stack user in the case that the target domain name does not have the domain name address based on the internet protocol version 6 IPv 6.
As an alternative embodiment, the method further comprises: under the condition that the third domain name address cannot be queried in the public cache space, a fourth domain name query request is sent to a recursion server, wherein the recursion server is used for analyzing the fourth domain name query request to acquire the third domain name address; receiving a third domain name address returned by the recursion server; and storing the target domain name and the corresponding third domain name address into a public buffer space.
In the above embodiment of the present invention, the preset domain name stored in the public buffer space may be a domain name frequently accessed by a user, and when the public buffer space cannot provide the third domain name address for the fourth domain name query request, the fourth domain name query request may be sent to the recursive server, and the recursive server is used to parse the fourth domain name query request to obtain the third domain name address, complete the obtaining of the third domain name address, and store the obtained third domain name address in the public buffer space, so that the third domain name address that is recursively obtained at this time is conveniently and quickly called when the public buffer space subsequently responds to the fourth domain name query request.
As an alternative embodiment, the method further comprises: acquiring at least one preset domain name and a corresponding third domain name address stored in a public cache space; identifying a preset domain name type corresponding to the third domain name address; and determining each third domain name address, the corresponding preset domain name and the corresponding preset domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in a preset cache space.
According to the embodiment of the invention, the corresponding relation between the preset domain name and the third domain name address stored in the public cache space can be adjusted to be the domain name mapping relation between the preset domain name and the domain name type and the preset domain name address, so that the domain name address synchronization of the public cache space and the preset cache space is realized.
Optionally, determining each third domain name address and the corresponding preset domain name and preset domain name type as a set of domain name mapping relationships to store in the preset cache space includes: and under the condition that the preset domain name type corresponding to the third domain name address is the first domain name type, taking the third domain name address as the first domain name address, and then establishing a domain name mapping relation.
Optionally, determining each third domain name address and the corresponding preset domain name and preset domain name type as a set of domain name mapping relationships to store in the preset cache space includes: and under the condition that the preset domain name type corresponding to the third domain name address is the second domain name type, taking the third domain name address as the second domain name address, and then establishing a domain name mapping relation.
Optionally, determining each third domain name address and the corresponding preset domain name and preset domain name type as a set of domain name mapping relationships to store in the preset cache space includes: when the preset domain name type corresponding to the third domain name address is the second domain name type, the third domain name address is used as the second domain name address; and converting the second domain name address into a first domain name address according to a preset algorithm mapping table, and then establishing a domain name mapping relation.
As an alternative embodiment, in the case that the first domain name address cannot be queried in the preset cache space, converting the first domain name request into the second domain name query request based on the second domain name type includes: under the condition that the first domain name address cannot be queried in a preset cache space, a first domain name query request is sent to a recursion server, wherein the recursion server is used for analyzing the first domain name query request to acquire the first domain name address; in the event that the recursive server fails to obtain the first domain name address, the first domain name request is translated into a second domain name query request based on the second domain name type.
In the above embodiment of the present invention, the preset domain name stored in the preset buffer space may be a domain name frequently accessed by a user, and when the preset buffer space cannot provide the first domain name address for the first domain name query request, the first domain name query request may be sent to the recursive server, and the recursive server is used to parse the first domain name query request to obtain the first domain name address, so as to complete the obtaining of the first domain name address.
In the above embodiment of the present invention, the direct use of the first domain name address based on the 6 th edition IPv6 of the internet protocol is superior to the use of the first domain name address converted by the second domain name address, so in the case that the target domain name has the first domain name address based on the 6 th edition IPv6 of the internet protocol, the first domain name address of the target domain name needs to be preferentially obtained, and further in the case that the first domain name address of the target domain name cannot be obtained by the recursive server, it is described that the target domain name is not configured with the first domain name address, but in order to enable the first single stack user who issues the first domain name query request to use the target domain name, the second domain name address of the target domain name needs to be converted into the first domain name address.
As an alternative embodiment, after sending the first domain name query request to the recursive server, the method further comprises: receiving a first domain name address returned by the recursion server; identifying a preset domain name type corresponding to the first domain name address as a first domain name type; and determining each first domain name address, the corresponding preset domain name and the first domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in a preset cache space.
According to the embodiment of the invention, under the condition that the first domain name address is acquired through the recursion server, the first domain name address acquired through the recursion server can be stored in the preset cache space, so that the first domain name address which is recursion at this time can be called under the condition that the preset cache space subsequently responds to the first domain name query request, and the response to the first domain name query request can be fast carried out.
As an alternative embodiment, the method further comprises: under the condition that the second domain name address cannot be queried in the preset cache space, sending a second domain name query request to a recursion server, wherein the recursion server is used for analyzing the second domain name query request to acquire the second domain name address; receiving a second domain name address returned by the recursion server; and converting the second domain name address into the first domain name address according to a preset algorithm mapping table.
In the above embodiment of the present invention, the preset domain name stored in the preset buffer space may be a domain name frequently accessed by a user, and when the preset buffer space cannot provide the second domain name address for the second domain name query request, the second domain name query request may be sent to the recursive server, and the recursive server is used to parse the second domain name query request to obtain the second domain name address, so as to complete the obtaining of the second domain name address, and further convert the second domain name address returned by the recursive server into the first domain name address, so as to complete the response to the first domain name query request.
As an alternative embodiment, after receiving the second domain name address returned by the recursive server, the method further comprises: identifying a preset domain name type corresponding to the second domain name address as a second domain name type; and determining each second domain name address, the corresponding preset domain name and the second domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in a preset cache space.
According to the embodiment of the invention, under the condition that the second domain name address is acquired through the recursion server, the second domain name address acquired through the recursion server can be stored in the preset cache space, so that the second domain name address which is recursion at this time can be called under the condition that the preset cache space subsequently responds to the second domain name query request, and the response to the second domain name query request can be fast carried out.
As an alternative embodiment, after receiving the second domain name address returned by the recursive server, the method further comprises: converting the second domain name address into the first domain name address according to a preset algorithm mapping table, and identifying a preset domain name type corresponding to the first domain name address as a first domain name type; and determining each first domain name address, the corresponding preset domain name and the first domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in a preset cache space.
According to the embodiment of the invention, under the condition that the second domain name address is acquired through the recursion server, the second domain name address acquired through the recursion server can be converted into the first domain name address, and then the first domain name address is stored in the preset cache space, so that the converted first domain name address can be directly called and quickly responded to the first domain name query request under the condition that the preset cache space subsequently responds to the first domain name query request.
As an alternative embodiment, converting the second domain name address into the first domain name address according to the preset algorithm mapping table includes: acquiring a second domain name address, wherein the address digit of the second domain name address is 32 bits; adding a preset address prefix in front of the second domain name address according to a preset algorithm mapping table to obtain a target domain name address; detecting whether the address digit of the target domain name address reaches a preset address digit, wherein the preset address digit is 128 bits; under the condition that the address digit of the detected target domain name address does not reach the preset address digit, supplementing a preset numerical value at the last digit of the target domain name address until reaching the preset address digit; and determining the target domain name address reaching the preset address digit as the first domain name address.
According to the embodiment of the invention, the preset algorithm mapping table records the conversion rule of converting the second domain name address into the first domain name address, wherein the second domain name address based on the IPv4 version of the Internet protocol is 32 bits, and the first domain name address based on the IPv6 version of the Internet protocol is 128 bits, so that the second domain name address is converted into the first domain name address, the domain name address needs to be adjusted from 32 bits to 128 bits, a preset address prefix can be added before the second domain name address with 32 bits, and the preset value is used as a second domain name address complementary bit, so that the first domain name address with 128 bits can be obtained, and the technical effect of converting the second domain name address into the first domain name address is realized.
The present invention also provides a preferred embodiment that provides a DNS64 implementation method based on intelligent caching.
From the technical maturity and deployment experience of other operators worldwide, 464XLAT technology is currently the best solution to mobile network single stack. This technique requires the terminal to support the CLAT function, and the network side deploys NAT64 and DNS64 functions. At present, products of Microsoft, google, apple, cisco and other companies all support IPv6 single stacks, IOS and Android terminal products support IPv6 single stacks very early, and at present, firewall equipment basically supports NAT64 functions, but at present, DNS of an operator basically cannot realize formal business cases, and DNS of the operator needs to support normal business of DNS64 functions and RFC7050 protocols through transformation.
Currently, open source software with DNS resolution functions mainly includes BIND and UNBOUND, but these software exist at a distance from a formal scale business, and mainly include the following aspects:
in terms of DNS performance, DNS request traffic of operators is very huge, for example, telecommunication DNS in a certain area currently exceeds 1200 ten thousand QPS, operators generally adopt a cache+recursive secondary architecture, and the cache carries more than 95% of common domain name resolution requests, but existing mainstream open source software cannot support the secondary architecture well.
In terms of DNS functionality, bind only supports configuration according to view, does not support domain name prefix-based configuration, ubound does not support view, and can only globally configure prefixes, so that it cannot support some customized analysis requirements of operators.
In terms of DNS security, caching and recursive separation reduce the impact of monomer failures on the system, and different protection policies can be formulated. The high-speed buffer system mainly provides buffer analysis service and related strategies, and mainly comprises a strong solution function, a plugging function, an intelligent routing redirection function, an error domain name redirection function, a Forward forwarding function and a safety protection module, wherein the safety protection module mainly comprises ACL access control, IP speed limit (accurate and global), domain name speed limit (accurate and global), amplification attack and recursion attack, domain name type access control and other functions. The recursion subsystem mainly provides recursion resolution service and pays attention to the realization of DNS protocol functions; the recursion system does not directly provide services to the outside, and has better anti-attack capability. These open source DNS software are also not implemented in terms of network security.
In summary, operators cannot directly use off-the-shelf DNS software to achieve large-scale business of DNS64, requiring custom optimization modifications to existing network caches and recursions.
According to the technical scheme, through analyzing the technical characteristics of the DNS64 plus the NAT64 and the defects of the current DNS64 open source software, the method for modifying the operation level DNS64 system is provided by combining the DNS system architecture of the main stream of an operator and the IPv6 single stack service requirement.
It should be noted that, the conventional cache software does not support DNS64 function, when a user initiates a domain name request of AAAA type (i.e., the first domain name type), and the user cannot obtain the IPv6 address of the domain name (i.e., cannot query the first domain name address based on the first domain name query request) when the user cannot query the cache and recursively cannot obtain the result; therefore, in order to meet the resolution requirement of the single stack user, the cache software of the DNS64 needs to add the functions of the DNS64, and 3 functional modules are added for the cache software: DNS64 configuration module, DNS64 judgment execution module, DNS64 storage module.
FIG. 2 is a schematic diagram of an architecture according to an embodiment of the present application, as shown in FIG. 2, including at least: the system comprises a DNS64 configuration module, a DNS64 judgment execution module and a DNS64 storage module.
Optionally, the DNS64 configuration module includes: DNS64 function switches and DNS64 matching policies, wherein DNS64 function switches are further divided into "DNS64 function master switches" and "nxdomain recursion result DNS64 control switches". The "DNS64 function master switch" if closed, remains consistent with the existing network cache function. The "nxdomain recursive result DNS64 control switch" is mainly used to control whether the domain name AAAA requests that the recursive result is that nxdomain performs DNS64 function; DNS64 matching policy functions mainly include prefix address configuration, VIP client configuration, partition configuration, and the like.
Optionally, the DNS64 determining execution module includes:
DNS64 performs the condition: the DNS64 function master switch is opened; a domain name AAAA type recursion request (e.g., a first domain name query request based on a first domain name type) does not obtain a corresponding set of address results (e.g., a first domain name address); .
DNS64 recursion requests execute: the AAAA type request for the domain name is changed to an a type request (e.g., the first domain name request is converted to a second domain name query request based on a second domain name type), and recursion is performed again.
DNS64 policy matching performs: for the recursive response result, it is determined whether the response is a response of the DNS64 recursive request, and if the response is a response of the DNS64 recursive request, the IPv4 address in the response result is mapped to the IPv6 address (e.g., the second domain name address is converted to the first domain name address).
Optionally, the DNS64 storage module (i.e. a preset cache space) stores the "domain name+record type" (i.e. a preset domain name and a preset domain name type) as the unit information for cache lookup and storage, which is different from the original DNS famous open source software BIND that is stored and queried in the domain unit. After the DNS64 policy is executed, a result set of "domain name+a type" (i.e., recording a second domain name address corresponding to the target domain name and the second domain name type) and a mapping result set of "domain name+aaaa type" (i.e., recording a first domain name address corresponding to the target domain name and the first domain name type) are recorded respectively.
Optionally, to increase the cache hit rate and reduce the recursive load, the cache (i.e. the preset cache space) may actively synchronize the non-empty AAAA record data newly received by the public cache space (i.e. the first domain name address associated with the first domain name type in the public cache space) to the DNS64 universal cache space (i.e. the preset cache space) through the cache data synchronization sub-module.
As an alternative embodiment, the mapping method of the a record and the AAAA record (i.e. converting the second domain name address to the first domain name address) includes: and converting the IPv4 address into the IPv6 address by adopting a prefix conversion mode, adding an address prefix to the IPv4 address according to a certain rule, and realizing the mapping from IPv4 to IPv6, wherein the IPv4 address is embedded in the IPv6 address after mapping. The cache software of DNS64 defines an IPv4 and IPv6 conversion algorithm mapping table (i.e., a preset algorithm mapping table), and according to this algorithm mapping table, an IPv4 address can be converted into an IPv6 address. As long as the algorithm mapping table is not modified, the mapping relation between IPv4 and IPv6 is not changed, and the method is a stable and reliable conversion relation.
It should be noted that, the 32-bit address is used by IPv4, the 128-bit address is used by IPv6, and the maximum 96 bits of address prefix are limited by DNS64 cache software, and for illegal address prefix, the error is reported by DNS64 cache software loading. The mapped IPv6 address composition format is: and after the address prefix (i.e. the preset address prefix) +IPv4 address is assembled, if the address length of IPv6 is smaller than 128 bits, 0 is supplemented behind the address of IPv6 until the address length of IPv6 reaches 128 bits.
Optionally, as shown in fig. 2, when the DNS64 cache software receives an AAAA type domain name request (i.e. receives a first domain name query request), an AAAA type IPv6 response result set of the domain name is first obtained (i.e. the first domain name address is queried according to the first domain name query request), if the AAAA type is not obtained, the AAAA request type is modified to be an a request type (i.e. the first domain name request is converted to be a second domain name query request based on a second domain name type), an a type IPv4 response result set of the domain name is obtained (i.e. the second domain name address is queried according to the second domain name query request), the obtained IPv4 response result set (i.e. the second domain name address) is mapped to be an IPv6 result set (i.e. the first domain name address), and finally the IPv6 result set is responded to the client.
Optionally, the recursive software processing manner of DNS64 is similar to the caching software processing manner of DNS64, if the domain name request cannot obtain the AAAA type IPv6 response result set (i.e., the first domain name address cannot be recursively obtained according to the first domain name query request), then the domain name further obtains the a type IPv4 response result set (i.e., the second domain name address is recursively obtained according to the second domain name query request), maps the IPv4 response result to the IPv6 result set (i.e., the second domain name address is converted to the first domain name address), and finally responds to the AAAA type request (i.e., the first domain name query request) of the domain name with the IPv6 result set (i.e., the first domain name address).
Fig. 3 is a schematic diagram of DNS64 standard resolution according to an embodiment of the present invention, as shown in fig. 3, in the case where a DNS request resolves an IPv6 address (i.e., a first domain name address) of an example abc. Com, the DNS64 server may forward a request for the IPv6 address to the DNS server, determine whether the example abc. Com has an IPv6 address, and further, in the case where it is determined that an IPv6 address exists, the DNS server may perform a DNS response through the DNS64 server, and return the IPv6 address of the example abc.
Optionally, in the case that it is determined that there is no IPv6 address, resolving the IPv4 address (i.e., the second domain name address) of example, abc, com by the DNS64 server, then forwarding the request for the IPv4 address to the DNS server, and further, the DNS server may perform a DNS reply through the DNS64 server to determine the IPv address of example, abc, com, and then the DNS64 server converts the IPv4 address of example, abc, com to the IPv6 address, and returns the IPv6 address of example, abc.
Fig. 4 is a schematic diagram of an optimized DNS64 resolution flow according to an embodiment of the present invention, as shown in fig. 4, including the following steps:
s41, receiving a DNS request (namely, receiving a target domain name query request).
S42, judging whether the user is a single stack address segment (namely judging whether the user type sending the target domain name query request is a first single stack user), if so, executing S43; if not, S421 is performed, a response is made by the public buffer space.
S421, judging whether the domain name request hits the common cache (namely judging whether a third domain name address can be queried in the public cache space), if so, executing S46; if not, S422 is performed.
S422, normal recursion/forwarding (i.e., sending the fourth domain name query request to the recursion server).
S423, updating the common area cache (namely storing the target domain name and the corresponding third domain name address into the public cache space).
S424, the synchronization data is cached in the DNS64 (i.e. each third domain name address and the corresponding preset domain name and preset domain name type are determined as a set of domain name mapping relationships and stored in the preset cache space).
S43, judging whether the domain name is differentiated by the differentiated client (judging whether the target user initiating the target domain name query request is a preset differentiated user or not and judging whether the target domain name is the preset differentiated domain name or not), if yes, executing S44, otherwise executing S431, and responding by the preset cache space.
S431, judging whether the DNS64 universal cache is hit or not (namely judging whether the response from the preset cache space is needed or not), if yes, determining the first domain name address through the preset cache space to execute S46, otherwise executing S432.
S432, recursion AAAA records (i.e. sends the first domain name query request to the recursion server to obtain the first domain name address).
S433, whether the AAAA record is empty is requested, if yes, that is, if the recursive server fails to acquire the first domain name address, S434 is executed; if not, that is, if the recursive server returns the first domain name address, S45 is executed.
S434, a recursion a record (i.e. sending the second domain name query request to a recursion server, obtaining a second domain name address).
S435, the resolution results (i.e., the second domain name address is converted into the first domain name address) are combined, and then S45 is performed.
S44, judging whether the DNS64 partition cache is hit (namely judging whether the cache space is responded by the customized cache), if yes, executing S46, otherwise, initiating ECS recursion, and executing S45 after receiving ECS recursion results.
Alternatively, the ECS recursion may deploy the cloud server as a recursion server, by which the recursion process is performed, the recursion efficiency may be improved.
S45, the DNS64 cache is updated (i.e. the domain name address returned by the recursive server is stored in the preset cache space), and then S46 is executed.
S46, a cache response is used for responding to the target domain name query request and returning a corresponding preset domain name address.
Optionally, in order to meet the resolution requirements of different customer service customizations, the DNS system is improved in terms of policy matching, and can support configuring different resolution prefixes for different source IPs (views), and also support configuring different resolution prefixes for different domain names under the same view; in terms of caching logic, after the DNS64 caches the recursively returned results, the domain name+request type (a or AAAA, etc.) is written to the cache region in a combined manner, i.e., the same domain name+different request types may have different cache entries.
FIG. 5 is a schematic diagram of a process for synchronizing cache data according to an embodiment of the invention, as shown in FIG. 5, including the steps of:
s51, starting the module.
S52, receiving a new recursive AAAA response message (corresponding to receiving the third domain name address, namely receiving the second class of third domain name addresses).
And S53, updating the public cache (namely storing the target domain name and the corresponding third domain name address into a public cache space).
S54, it is determined whether the AAAA record is empty (i.e., whether the third domain name address can be queried in the public cache space), if yes, S55 is executed, and if no, S56 is executed.
S55, responding to the user request (i.e., responding to the fourth domain name query request).
S56, updating the DNS64 universal cache (namely, determining that each third domain name address and the corresponding preset domain name and preset domain name type are stored in the preset cache space as a group of domain name mapping relations), and then executing S57.
S57, in response to the user request (i.e., in response to the first domain name query request).
Fig. 6 is a schematic diagram of a user identification process according to an embodiment of the present invention, as shown in fig. 6, including the following steps:
s61, a user request (i.e., a target domain name query request) is received.
S62, judging whether the user is an IPv6 single stack user (namely judging whether the user is a first single stack user), if not, executing S63, and if so, executing S64.
S63, the public cache responds (i.e. determines the target domain name query request is a fourth domain name query request, and responds to the fourth domain name query request by the public cache space).
S64, judging whether the user is a differentiated user (namely judging whether the target user initiating the target domain name query request is a preset differentiated user), if not, executing S65, and if so, executing S66.
S65, DNS64 generally responds (i.e. determines the target domain name query request as the first domain name query request and responds to the first domain name query request by a preset buffer space)
S66, judging whether the domain name is a differentiated domain name (namely judging whether the target domain name is a preset differentiated domain name), if not, executing S65, and if so, executing S67.
S66, customizing the partition cache response (namely determining that the target domain name query request is a third domain name query request and responding to the third domain name query request by customizing the cache space).
Fig. 7 is a schematic diagram of a customized partition update procedure according to an embodiment of the present invention, as shown in fig. 7, if the address field is a differentiated address field of a single stack, but the access domain name is a non-differentiated domain name, the DNS64 universal cache module responds (i.e. the preset cache space is responded to with respect to the first domain name query request). When the domain name is a differentiated domain name, a request is initiated to the customized partition (namely, the customized cache space is responded to aiming at a third domain name query request), if the customized partition request is not in hit of the cache, the customized partition initiates the request to the ECS recursion, the ECS recursion is authorized to be supported, the ECS recursion is directly initiated, and if the ECS recursion is not supported, the ECS recursion is directly forced to analyze according to a strategy.
Fig. 8 is a schematic diagram of providing prefixes for non-domain name applications according to an embodiment of the present invention, as shown in fig. 8, including: in order to facilitate non-domain name application to accurately acquire IPv6 prefix, RFC7050 service sub-flow is newly added, the flow is mainly used for detecting whether DNS64 operates or not and how to find out the IPv6 prefix used for network connection protocol conversion, a non-IPv 6 single stack user directly feeds back null information when requesting AAAA record of domain name ip 4only. Arpa. Common IPv6 single stack user directly uses general prefix: +192.0.0.170/192.0.0.170, and differentiated IPv6 single stack user directly uses contracted prefix: +192.0.0.170/192.0.0.170.
Optionally, in terms of user identification, if the address field is a non-single stack address field (for a dual stack user), the address field is directly responded by the public cache, and if the address field is a single stack differentiated address field (for a preset differentiated user), and the access domain name is a differentiated domain name (for example, a preset differentiated domain name), the address field is responded by a differentiated custom partition cache (for example, custom cache space), and other requests are responded by a DNS64 universal cache module (for example, a preset cache space).
Optionally, in terms of data synchronization, the cache actively synchronizes the non-empty AAAA record data newly received in the public cache space to the DNS64 universal cache space (i.e. synchronize the third domain name address in the public cache space to the preset cache space), the unit information of cache lookup and storage is "domain name+record type" (i.e. preset domain name and preset domain name type), which is different from the manner that the original DNS famous open source software BIND stores and queries in units of domains, and after the DNS64 policy is executed, the mapping result set (e.g. the second domain name address) of "domain name+a type" (e.g. preset domain name and second domain name type) and the mapping result set (e.g. the first domain name address) of "domain name+aaaa type" (e.g. preset domain name and first domain name type) are recorded respectively.
According to the embodiment of the application, the traditional method of realizing the DNS64 by using open source recursion software is changed, and the DNS64 is realized by modifying a cache, so that the service capability of the DNS64 is greatly improved, and the existing recursion system can be shared; the fusion bearing of the common cache and the DNS64 cache is realized, so that equipment resources are saved, and the cache hit rate is improved; the ECS function can be utilized to provide differentiated analysis, such as differentiated analysis results, different IPV6 prefixes and the like, for VIP clients, and the function can be utilized to develop partial value-added services in the follow-up process; the recursion analysis efficiency is effectively improved by using a cache partition data synchronization technology; the kylin chip and the system letter operating system for Huacheng have been adapted.
According to the embodiment of the application, from the deployment effect, the intelligent cache, common recursion and ECS recursion fusion bearing scheme is utilized, so that the analysis requirements of common clients are met, and the analysis requirements of DNS64 and differentiated clients are met; DNS64 service is provided for realizing full IPV6 transformation of the mobile person networking and the Internet of things; providing differentiated resolution services for VIP clients; the application range is wide, and the method is applicable to DNS systems of operators at all levels; the popularization process of the IPV6 service can be effectively promoted.
As an alternative example, consider first two domain names www.xxxx123.com and www.xxxx456.com, www.xxxx123.com having both a corresponding record a (e.g., second domain name type) and AAAA record (e.g., first domain name type), www.xxxx456.com having only a record (e.g., second domain name type).
When the general dual stack user resolves www.xxxx123.com, both an IPv4 address (e.g., a second domain name address) and an IPv6 address (e.g., a first domain name address) can be obtained, and the user can access the website through IPv4 (e.g., the second domain name address) or IPv6 (e.g., the first domain name address), and when the user resolves www.xxxx456.com, only an IPv4 address (e.g., the second domain name address) can be obtained, so that only the website can be accessed through the IPv4 address (e.g., the second domain name address).
Optionally, in the DNS64+nat networking environment, when a single stack IPv6 user (e.g., a first single stack user) accesses www.xxxx123com, it only needs to directly access the IPv6 address (e.g., the first domain name address) resolved by the AAAA. When accessing www.xxxx456.com, the DNS64 is required to provide a corresponding IPv6 resolution result (e.g., the first domain name address), and the NAT64 performs corresponding NAT translation. Wherein the DNS64 resolution process is as follows:
1. if the common user (such as a dual stack user or a second single stack user) accesses the two domain names www.xxxx123.com and www.xxxx456.com, the common cache (such as a common cache space) of the cache directly responds, if the cache is not hit, the common cache initiates a recursion acquisition result and then responds to the user (namely, a fourth domain name inquiry request is sent to a recursion server under the condition that a third domain name address is not inquired in the common cache space); to increase the success rate of the cache resolution, the AAAA non-empty record automatically synchronizes a copy of data to the DNS4 cache (i.e., the synchronization of the public cache space and the preset cache space).
2. If the IPV6 single-stack user (e.g., the first single-stack user) accesses www.xxxx123.com, the DNS64 caches the response AAAA request (e.g., the first domain name query request), and if the cache is not hit, the cache initiates the recursive acquisition result and then responds to the user (i.e., the first domain name query request is sent to the recursive server if the first domain name address is not queried in the preset cache space).
3. If an IPV6 single stack user (e.g., a first single stack user) accesses www.xxxx456.com, the DNS64 cache responds to the AAAA request (e.g., a first domain name query request), if the result is hit in the cache, the cache directly feeds back the result, if the result is missed, the cache initiates an AAAA recursive query (i.e., the first domain name query request is sent to the recursive server if the first domain name address is not found in the preset cache space), the DNS64 cache finds that the AAAA result is empty (i.e., the recursive server fails to obtain the first domain name address) when the recursive result is obtained, then initiates a recursive query of the a record (i.e., the first domain name request is converted into a second domain name query request based on the second domain name type), after the corresponding a record is obtained, the AAAA response message is constructed by using the agreed IPV6 prefix, the result is fed back to the user (i.e., the second domain name address is converted into the first domain name address) after the construction is completed, and the result is stored in the resident DNS64 cache (i.e., the preset cache space).
4. If the single stack user is a VIP support client (i.e., a preset differentiated user), and www.xxxx456.com is a specified differentiated domain name (i.e., a preset differentiated domain name), then the single stack user is responded by a specific customized cache partition (i.e., a customized cache space), if the single stack user hits the cache, the single stack user is directly responded by the customized cache (i.e., the customized cache space), if the single stack user misses the cache, a request is recursively initiated to the ECS by the cache, and then ECS recursion or domain name resolution is performed according to conventions. After the recursive analysis result is obtained by the buffer memory, an AAAA response message is constructed according to the agreed prefix, and the result is fed back to the client. The customer DNS64 may be assigned a particular prefix or resolution for a particular domain name for VIP.
According to the technical scheme, the fusion bearing of the common cache and the DNS64 cache is realized, so that equipment resources are saved, and the cache hit rate is improved; the ECS function can be utilized to provide differentiated analysis for VIP clients, and if the differentiated analysis result, different IPv6 prefixes and the like are obtained, the function can be utilized to develop partial value-added services in the follow-up process; and the recursion analysis efficiency is effectively improved by using the cache partition data synchronization technology.
According to the embodiment of the present application, a domain name query device is provided, and it should be noted that the domain name query device may be used to execute the domain name query method in the embodiment of the present application, and the domain name query method in the embodiment of the present application may be executed in the domain name query device.
Fig. 9 is a schematic diagram of a domain name query device according to an embodiment of the present invention, as shown in fig. 9, the device may include: the obtaining module 92 is configured to obtain a first domain name query request of the target domain name based on a first domain name type, where the first domain name query request is used to instruct to query, in a preset buffer space, a first domain name address corresponding to the target domain name and the first domain name type, the preset buffer space is used to record at least one set of domain name mapping relationships, each set of domain name mapping relationships is used to record a set of preset domain names and preset domain name addresses corresponding to the preset domain name type, and the preset domain name types include: the first domain name type and the second domain name type, and the preset domain name address comprises: a first domain name address based on internet protocol version 6 IPv6 corresponding to the first domain name type, and a second domain name address based on internet protocol version 4 IPv4 corresponding to the first domain name type; a type conversion module 94, configured to convert, if the first domain name address cannot be queried in the preset cache space, the first domain name request into a second domain name query request based on a second domain name type, where the second domain name query request is used to instruct to query, in the preset cache space, the second domain name address corresponding to the target domain name and the second domain name type; the address conversion module 96 is configured to convert the second domain name address into the first domain name address according to a preset algorithm mapping table, where the preset algorithm mapping table is used to represent a domain name address conversion relationship between the 4 th version IPv4 of the internet protocol and the 6 th version IPv6 of the internet protocol.
It should be noted that, the acquiring module 92 in this embodiment may be used to perform step S102 in the embodiment of the present application, the type converting module 94 in this embodiment may be used to perform step S104 in the embodiment of the present application, and the address converting module 96 in this embodiment may be used to perform step S106 in the embodiment of the present application. The above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments.
In the embodiment of the application, the preset cache space is utilized, the corresponding preset domain name address can be stored and queried according to the unit of the preset domain name and the preset domain name type, the first domain name query request can be a domain name query request of an IPv6 single stack, the query result of the first domain name query request can only be the first domain name address based on the IPv6 version of internet protocol, the first domain name query request of the first domain name type can be further responded by utilizing the preset cache space, the first domain name address based on the IPv6 version of internet protocol can be queried, the first domain name query request of the first domain name type can be further converted into the second domain name query request of the second domain name type under the condition that the first domain name address cannot be queried, the second domain name query request is responded to query the second domain name address based on the IPv4 version of internet protocol, and then the second domain name address is converted into the first domain name address by utilizing the preset algorithm mapping table, so that the technical effect that only the IPv6 single stack of the service supporting IPv4 can be used by utilizing the preset cache space and the preset algorithm mapping table is realized, and the technical effect that the query result can not be met by using the prior art stack supporting only the IPv4 can be further solved.
As an alternative embodiment, the obtaining module includes: the first receiving unit is used for receiving a target domain name query request of a target domain name; the first identifying unit is used for identifying the user type of the target domain name query request, wherein the user type comprises the following components: a dual stack user, a first single stack user based on internet protocol version 6 IPv6, and a second single stack user based on internet protocol version 4 IPv 4; and the first determining unit is used for determining that the target domain name query request is a first domain name query request under the condition that the user type is a first single stack user.
As an alternative embodiment, in case the user type is a first single stack user, the apparatus further comprises: the first judging unit is used for judging whether a target user initiating the target domain name query request is a preset differentiated user or not; the second judging unit is used for judging whether the target domain name is a preset differentiated domain name or not under the condition that the target user is the preset differentiated user; the second determining unit is configured to determine, when the target domain name is a preset differential domain name, that the target domain name query request is a third domain name query request, where the third domain name query request is used to instruct to query, in a customized cache space, a first domain name address corresponding to the target domain name and the first domain name type, and the customized cache space is the same as the preset cache space.
As an alternative embodiment, the apparatus further comprises: the third determining unit is used for determining that the target domain name query request is a fourth domain name query request under the condition that the user type is a double-stack user or a second single-stack user after the user type for initiating the target domain name query request is identified; the query unit is configured to respond to a fourth domain name query request, and query a third domain name address corresponding to the target domain name in a public cache space, where the public cache space is configured to record a correspondence between at least one preset domain name and the third domain name address, and the third domain name address includes: a class III domain name address based on IPv4 version of Internet protocol corresponding to the first domain name type, and a class III domain name address based on IPv6 version of Internet protocol corresponding to the second domain name type.
As an alternative embodiment, the apparatus further comprises: a sending unit, configured to send a fourth domain name query request to a recursive server if the third domain name address cannot be queried in the public cache space, where the recursive server is configured to parse the fourth domain name query request to obtain the third domain name address; the second receiving unit is used for receiving a third domain name address returned by the recursion server; and the first storage unit is used for storing the target domain name and the corresponding third domain name address into the public buffer space.
As an alternative embodiment, the apparatus further comprises: the first acquisition unit is used for acquiring at least one preset domain name and a corresponding third domain name address stored in the public cache space; the second identification unit is used for identifying a preset domain name type corresponding to the third domain name address; the second storage unit is used for determining each third domain name address, the corresponding preset domain name and the corresponding preset domain name type as a group of domain name mapping relations and storing the group of domain name mapping relations into the preset cache space.
As an alternative embodiment, the type conversion module includes: the first sending sub-module is used for sending a first domain name query request to the recursion server under the condition that the first domain name address cannot be queried in a preset cache space, wherein the recursion server is used for resolving the first domain name query request to acquire the first domain name address; and the type conversion sub-module is used for converting the first domain name request into a second domain name query request based on the second domain name type in the case that the recursion server fails to acquire the first domain name address.
As an alternative embodiment, the apparatus further comprises: the first receiving sub-module is used for receiving a first domain name address returned by the recursion server after sending the first domain name query request to the recursion server; the first identification sub-module is used for identifying that the preset domain name type corresponding to the first domain name address is the first domain name type; the first storage sub-module is used for determining each first domain name address, the corresponding preset domain name and the first domain name type as a group of domain name mapping relations and storing the group of domain name mapping relations into a preset cache space.
As an alternative embodiment, the address translation module comprises: the second acquisition unit is used for acquiring a second domain name address, wherein the address number of the second domain name address is 32 bits; the adding unit is used for adding a preset address prefix before the second domain name address according to the preset algorithm mapping table to obtain a target domain name address; the detection unit is used for detecting whether the address digits of the target domain name address reach preset address digits, wherein the preset address digits are 128 digits; the supplementing unit is used for supplementing a preset numerical value at the last bit of the target domain name address until reaching the preset address digit under the condition that the address digit of the target domain name address is detected to not reach the preset address digit; and the fourth determining unit is used for determining that the target domain name address reaching the preset address digit is the first domain name address.
As an alternative embodiment, the apparatus further comprises: the second sending sub-module is used for sending a second domain name query request to the recursion server under the condition that the second domain name address cannot be queried in the preset cache space, wherein the recursion server is used for resolving the second domain name query request to acquire the second domain name address; the second receiving sub-module is used for receiving a second domain name address returned by the recursion server; and the first address conversion sub-module is used for converting the second domain name address into the first domain address according to a preset algorithm mapping table.
As an alternative embodiment, the apparatus further comprises: the second recognition sub-module is used for recognizing that the preset domain name type corresponding to the second domain name address is the second domain name type after receiving the second domain name address returned by the recursion server; and the second storage sub-module is used for determining each second domain name address, the corresponding preset domain name and the second domain name type as a group of domain name mapping relations and storing the group of domain name mapping relations into the preset cache space.
As an alternative embodiment, the apparatus further comprises: the second address conversion sub-module is used for converting the second domain name address into the first domain name address according to a preset algorithm mapping table after receiving the second domain name address returned by the recursion server; the third identification sub-module is used for identifying that the preset domain name type corresponding to the first domain name address is the first domain name type; and the third storage sub-module is used for determining each first domain name address, the corresponding preset domain name and the first domain name type as a group of domain name mapping relations and storing the group of domain name mapping relations into the preset cache space.
Embodiments of the present invention may provide a computer terminal, which may be any one of a group of computer terminals. Alternatively, in the present embodiment, the above-described computer terminal may be replaced with a terminal device such as a mobile terminal.
Alternatively, in this embodiment, the above-mentioned computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
In this embodiment, the computer terminal may execute the program code of the following steps in the domain name query method: acquiring a first domain name query request of a target domain name based on a first domain name type, wherein the first domain name query request is used for indicating to query a first domain name address corresponding to the target domain name and the first domain name type in a preset cache space, the preset cache space is used for recording at least one group of domain name mapping relations, each group of domain name mapping relations is used for recording a group of preset domain name and a preset domain name address corresponding to the preset domain name type, and the preset domain name type comprises: the first domain name type and the second domain name type, and the preset domain name address comprises: a first domain name address based on internet protocol version 6 IPv6 corresponding to the first domain name type, and a second domain name address based on internet protocol version 4 IPv4 corresponding to the first domain name type; under the condition that the first domain name address cannot be queried in the preset cache space, converting the first domain name request into a second domain name query request based on a second domain name type, wherein the second domain name query request is used for indicating to query the second domain name address corresponding to the target domain name and the second domain name type in the preset cache space; and converting the second domain name address into the first domain name address according to a preset algorithm mapping table, wherein the preset algorithm mapping table is used for representing the domain name address conversion relation between the 4 th edition IPv4 of the Internet protocol and the 6 th edition IPv6 of the Internet protocol.
Alternatively, fig. 10 is a block diagram of a computer terminal according to an embodiment of the present invention. As shown in fig. 10, the computer terminal 1000 may include: one or more (only one is shown) processors 1002, and memory 1004.
The memory may be used to store software programs and modules, such as program instructions/modules corresponding to the domain name query method and apparatus in the embodiments of the present invention, and the processor executes the software programs and modules stored in the memory, thereby executing various functional applications and data processing, that is, implementing the domain name query method described above. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory remotely located with respect to the processor, which may be connected to terminal a through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor may call the information and the application program stored in the memory through the transmission device to perform the following steps: acquiring a first domain name query request of a target domain name based on a first domain name type, wherein the first domain name query request is used for indicating to query a first domain name address corresponding to the target domain name and the first domain name type in a preset cache space, the preset cache space is used for recording at least one group of domain name mapping relations, each group of domain name mapping relations is used for recording a group of preset domain name and a preset domain name address corresponding to the preset domain name type, and the preset domain name type comprises: the first domain name type and the second domain name type, and the preset domain name address comprises: a first domain name address based on internet protocol version 6 IPv6 corresponding to the first domain name type, and a second domain name address based on internet protocol version 4 IPv4 corresponding to the first domain name type; under the condition that the first domain name address cannot be queried in the preset cache space, converting the first domain name request into a second domain name query request based on a second domain name type, wherein the second domain name query request is used for indicating to query the second domain name address corresponding to the target domain name and the second domain name type in the preset cache space; and converting the second domain name address into the first domain name address according to a preset algorithm mapping table, wherein the preset algorithm mapping table is used for representing the domain name address conversion relation between the 4 th edition IPv4 of the Internet protocol and the 6 th edition IPv6 of the Internet protocol.
Optionally, the above processor may further execute program code for: receiving a target domain name query request of a target domain name; identifying a user type initiating a target domain name query request, wherein the user type comprises: a dual stack user, a first single stack user based on internet protocol version 6 IPv6, and a second single stack user based on internet protocol version 4 IPv 4; and under the condition that the user type is a first single stack user, determining the target domain name query request as a first domain name query request.
Optionally, the above processor may further execute program code for: judging whether a target user initiating a target domain name query request is a preset differentiated user or not under the condition that the user type is a first single stack user; judging whether the target domain name is a preset differentiated domain name or not under the condition that the target user is the preset differentiated user; and under the condition that the target domain name is a preset differentiated domain name, determining that the target domain name query request is a third domain name query request, wherein the third domain name query request is used for indicating to query a first domain name address corresponding to the target domain name and the first domain name type in a customized cache space, and the customized cache space is the same as the preset cache space.
Optionally, the above processor may further execute program code for: after identifying the user type of the target domain name query request, determining that the target domain name query request is a fourth domain name query request under the condition that the user type is a double-stack user or a second single-stack user; responding to a fourth domain name inquiry request, inquiring a third domain name address corresponding to the target domain name in a public cache space, wherein the public cache space is used for recording the corresponding relation between at least one preset domain name and the third domain name address, and the third domain name address comprises: a class III domain name address based on IPv4 version of Internet protocol corresponding to the first domain name type, and a class III domain name address based on IPv6 version of Internet protocol corresponding to the second domain name type.
Optionally, the above processor may further execute program code for: under the condition that the third domain name address cannot be queried in the public cache space, a fourth domain name query request is sent to a recursion server, wherein the recursion server is used for analyzing the fourth domain name query request to acquire the third domain name address; receiving a third domain name address returned by the recursion server; and storing the target domain name and the corresponding third domain name address into a public buffer space.
Optionally, the above processor may further execute program code for: acquiring at least one preset domain name and a corresponding third domain name address stored in a public cache space; identifying a preset domain name type corresponding to the third domain name address; and determining each third domain name address, the corresponding preset domain name and the corresponding preset domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in a preset cache space.
Optionally, the above processor may further execute program code for: under the condition that the first domain name address cannot be queried in a preset cache space, a first domain name query request is sent to a recursion server, wherein the recursion server is used for analyzing the first domain name query request to acquire the first domain name address; in the event that the recursive server fails to obtain the first domain name address, the first domain name request is translated into a second domain name query request based on the second domain name type.
Optionally, the above processor may further execute program code for: after the first domain name query request is sent to the recursion server, receiving a first domain name address returned by the recursion server; identifying a preset domain name type corresponding to the first domain name address as a first domain name type; and determining each first domain name address, the corresponding preset domain name and the first domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in a preset cache space.
Optionally, the above processor may further execute program code for: acquiring a second domain name address, wherein the address digit of the second domain name address is 32 bits; adding a preset address prefix in front of the second domain name address according to a preset algorithm mapping table to obtain a target domain name address; detecting whether the address digit of the target domain name address reaches a preset address digit, wherein the preset address digit is 128 bits; under the condition that the address digit of the detected target domain name address does not reach the preset address digit, supplementing a preset numerical value at the last digit of the target domain name address until reaching the preset address digit; and determining the target domain name address reaching the preset address digit as the first domain name address.
Optionally, the above processor may further execute program code for: under the condition that the second domain name address cannot be queried in the preset cache space, sending a second domain name query request to a recursion server, wherein the recursion server is used for analyzing the second domain name query request to acquire the second domain name address; receiving a second domain name address returned by the recursion server; and converting the second domain name address into the first domain name address according to a preset algorithm mapping table.
Optionally, the above processor may further execute program code for: after receiving a second domain name address returned by the recursion server, identifying a preset domain name type corresponding to the second domain name address as a second domain name type; and determining each second domain name address, the corresponding preset domain name and the second domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in a preset cache space.
Optionally, the above processor may further execute program code for: after receiving a second domain name address returned by the recursion server, identifying a preset domain name type corresponding to the first domain name address as a first domain name type; and determining each first domain name address, the corresponding preset domain name and the first domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in a preset cache space.
By adopting the embodiment of the invention, a domain name query scheme is provided. By using the preset cache space, the corresponding preset domain name address can be stored and queried according to the unit of the preset domain name and the preset domain name type, the first domain name query request can be an IPv6 single-stack domain name query request, the query result of the first domain name query request can only be the first domain name address based on the IPv6 version of internet protocol, further, the first domain name query request based on the IPv6 version of internet protocol can be queried by using the preset cache space, the first domain name address based on the IPv6 version of internet protocol can also be queried, the first domain name query request of the first domain name type can be converted into the second domain name query request of the second domain name type under the condition that the first domain name address cannot be queried, the second domain name address based on the IPv4 version of internet protocol is queried in response to the second domain name query request, and then, the second domain name address is converted into the first domain name address by using the preset algorithm mapping table, so that the technical effect that only the IPv4 service supporting the IPv4 single use of the IPv6 can be supported by using the preset cache space and the preset algorithm mapping table is realized, the query result can meet the first domain name query request, and the technical problem that only the IPv4 service supporting the IPv4 single-stack cannot be solved by using the prior art.
It will be appreciated by those skilled in the art that the configuration shown in fig. 10 is only illustrative, and the computer terminal may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm-phone computer, a mobile internet device (Mobile Internet Devices, MID), a PAD, etc. Fig. 10 is not limited to the structure of the electronic device. For example, computer terminal 1000 can also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute on hardware associated with the terminal device, the program may be stored in a nonvolatile storage medium, and the nonvolatile storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
Embodiments of the present invention also provide a nonvolatile storage medium. Alternatively, in this embodiment, the above-described nonvolatile storage medium may be used to store the program code executed by the domain name query method provided in the above-described embodiment.
Alternatively, in this embodiment, the above-mentioned nonvolatile storage medium may be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: acquiring a first domain name query request of a target domain name based on a first domain name type, wherein the first domain name query request is used for indicating to query a first domain name address corresponding to the target domain name and the first domain name type in a preset cache space, the preset cache space is used for recording at least one group of domain name mapping relations, each group of domain name mapping relations is used for recording a group of preset domain name and a preset domain name address corresponding to the preset domain name type, and the preset domain name type comprises: the first domain name type and the second domain name type, and the preset domain name address comprises: a first domain name address based on internet protocol version 6 IPv6 corresponding to the first domain name type, and a second domain name address based on internet protocol version 4 IPv4 corresponding to the first domain name type; under the condition that the first domain name address cannot be queried in the preset cache space, converting the first domain name request into a second domain name query request based on a second domain name type, wherein the second domain name query request is used for indicating to query the second domain name address corresponding to the target domain name and the second domain name type in the preset cache space; and converting the second domain name address into the first domain name address according to a preset algorithm mapping table, wherein the preset algorithm mapping table is used for representing the domain name address conversion relation between the 4 th edition IPv4 of the Internet protocol and the 6 th edition IPv6 of the Internet protocol.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: receiving a target domain name query request of a target domain name; identifying a user type initiating a target domain name query request, wherein the user type comprises: a dual stack user, a first single stack user based on internet protocol version 6 IPv6, and a second single stack user based on internet protocol version 4 IPv 4; and under the condition that the user type is a first single stack user, determining the target domain name query request as a first domain name query request.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: judging whether a target user initiating a target domain name query request is a preset differentiated user or not under the condition that the user type is a first single stack user; judging whether the target domain name is a preset differentiated domain name or not under the condition that the target user is the preset differentiated user; and under the condition that the target domain name is a preset differentiated domain name, determining that the target domain name query request is a third domain name query request, wherein the third domain name query request is used for indicating to query a first domain name address corresponding to the target domain name and the first domain name type in a customized cache space, and the customized cache space is the same as the preset cache space.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: after identifying the user type of the target domain name query request, determining that the target domain name query request is a fourth domain name query request under the condition that the user type is a double-stack user or a second single-stack user; responding to a fourth domain name inquiry request, inquiring a third domain name address corresponding to the target domain name in a public cache space, wherein the public cache space is used for recording the corresponding relation between at least one preset domain name and the third domain name address, and the third domain name address comprises: a class III domain name address based on IPv4 version of Internet protocol corresponding to the first domain name type, and a class III domain name address based on IPv6 version of Internet protocol corresponding to the second domain name type.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: under the condition that the third domain name address cannot be queried in the public cache space, a fourth domain name query request is sent to a recursion server, wherein the recursion server is used for analyzing the fourth domain name query request to acquire the third domain name address; receiving a third domain name address returned by the recursion server; and storing the target domain name and the corresponding third domain name address into a public buffer space.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: acquiring at least one preset domain name and a corresponding third domain name address stored in a public cache space; identifying a preset domain name type corresponding to the third domain name address; and determining each third domain name address, the corresponding preset domain name and the corresponding preset domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in a preset cache space.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: under the condition that the first domain name address cannot be queried in a preset cache space, a first domain name query request is sent to a recursion server, wherein the recursion server is used for analyzing the first domain name query request to acquire the first domain name address; in the event that the recursive server fails to obtain the first domain name address, the first domain name request is translated into a second domain name query request based on the second domain name type.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: after the first domain name query request is sent to the recursion server, receiving a first domain name address returned by the recursion server; identifying a preset domain name type corresponding to the first domain name address as a first domain name type; and determining each first domain name address, the corresponding preset domain name and the first domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in a preset cache space.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: acquiring a second domain name address, wherein the address digit of the second domain name address is 32 bits; adding a preset address prefix in front of the second domain name address according to a preset algorithm mapping table to obtain a target domain name address; detecting whether the address digit of the target domain name address reaches a preset address digit, wherein the preset address digit is 128 bits; under the condition that the address digit of the detected target domain name address does not reach the preset address digit, supplementing a preset numerical value at the last digit of the target domain name address until reaching the preset address digit; and determining the target domain name address reaching the preset address digit as the first domain name address.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: under the condition that the second domain name address cannot be queried in the preset cache space, sending a second domain name query request to a recursion server, wherein the recursion server is used for analyzing the second domain name query request to acquire the second domain name address; and receiving a second domain name address returned by the recursion server.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: receiving a second domain name address returned by the recursion server, and identifying a preset domain name type corresponding to the second domain name address as a second domain name type; and determining each second domain name address, the corresponding preset domain name and the second domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in a preset cache space.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: after converting the second domain name address into the first domain name address according to a preset algorithm mapping table, identifying a preset domain name type corresponding to the first domain name address as a first domain name type; and determining each first domain name address, the corresponding preset domain name and the first domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in a preset cache space.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a non-volatile storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a non-volatile storage medium, including instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned nonvolatile storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (15)

1. A domain name query method, comprising:
acquiring a first domain name query request of a target domain name based on a first domain name type, wherein the first domain name query request is used for indicating to query a first domain name address corresponding to the target domain name and the first domain name type in a preset cache space, the preset cache space is used for recording at least one group of domain name mapping relations, each group of domain name mapping relations is used for recording a group of preset domain names and preset domain name addresses corresponding to the preset domain name type, and the preset domain name type comprises: the preset domain name address comprises: a first domain name address based on internet protocol version 6 IPv6 corresponding to the first domain name type, and a second domain name address based on internet protocol version 4 IPv4 corresponding to the first domain name type;
converting the first domain name request into a second domain name query request based on a second domain name type under the condition that the first domain name address cannot be queried in the preset cache space, wherein the second domain name query request is used for indicating to query the second domain name address corresponding to the target domain name and the second domain name type in the preset cache space;
And converting the second domain name address into the first domain name address according to a preset algorithm mapping table, wherein the preset algorithm mapping table is used for representing the domain name address conversion relation between the IPv4 version of the Internet protocol and the IPv6 version of the Internet protocol.
2. The method of claim 1, wherein obtaining a first domain name query request for the target domain name based on the first domain name type comprises:
receiving a target domain name query request of the target domain name;
identifying a user type that initiates the target domain name query request, wherein the user type comprises: a dual stack user, a first single stack user based on internet protocol version 6 IPv6, and a second single stack user based on internet protocol version 4 IPv 4;
and determining the target domain name query request as the first domain name query request under the condition that the user type is the first single stack user.
3. The method of claim 2, wherein in the case where the user type is the first single stack user, the method further comprises:
judging whether a target user initiating the target domain name query request is a preset differentiated user or not;
judging whether the target domain name is a preset differentiated domain name or not under the condition that the target user is the preset differentiated user;
And under the condition that the target domain name is the preset differentiated domain name, determining that the target domain name query request is a third domain name query request, wherein the third domain name query request is used for indicating to query a first domain name address corresponding to the target domain name and the first domain name type in a customized cache space, and the customized cache space is the same as the preset cache space.
4. The method of claim 2, wherein after identifying the user type that originated the target domain name query request, the method further comprises:
determining that the target domain name query request is a fourth domain name query request under the condition that the user type is the double-stack user or the second single-stack user;
responding to the fourth domain name inquiry request, inquiring a third domain name address corresponding to the target domain name in a public buffer space, wherein the public buffer space is used for recording the corresponding relation between at least one preset domain name and the third domain name address, and the third domain name address comprises: a third domain name address based on internet protocol version 4 IPv4 corresponding to the first domain name type, and a second third domain name address based on internet protocol version 6 IPv6 corresponding to the second domain name type.
5. The method according to claim 4, wherein the method further comprises:
if the third domain name address cannot be queried in the public cache space, sending the fourth domain name query request to a recursion server, wherein the recursion server is used for analyzing the fourth domain name query request to acquire the third domain name address;
receiving the third domain name address returned by the recursion server;
and storing the target domain name and the corresponding third domain name address into the public cache space.
6. The method according to claim 4 or 5, characterized in that the method further comprises:
acquiring at least one preset domain name and a corresponding third domain name address stored in the public cache space;
identifying the preset domain name type corresponding to the third domain name address;
and determining each third domain name address, the corresponding preset domain name and the corresponding preset domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in the preset cache space.
7. The method of claim 1, wherein converting the first domain name request to a second domain name query request based on a second domain name type if the first domain name address cannot be queried in the preset cache space comprises:
If the first domain name address cannot be queried in the preset cache space, sending the first domain name query request to a recursion server, wherein the recursion server is used for analyzing the first domain name query request to acquire the first domain name address;
in the event that the recursive server fails to obtain the first domain name address, the first domain name request is converted to a second domain name query request based on a second domain name type.
8. The method of claim 7, wherein after sending the first domain name query request to a recursive server, the method further comprises:
receiving the first domain name address returned by the recursion server;
identifying the preset domain name type corresponding to the first domain name address as the first domain name type;
and determining each first domain name address, the corresponding preset domain name and the corresponding first domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in the preset cache space.
9. The method of claim 1, wherein converting the second domain name address to the first domain name address according to a predetermined algorithm mapping table comprises:
Acquiring the second domain name address, wherein the address number of the second domain name address is 32 bits;
adding a preset address prefix before the second domain name address according to the preset algorithm mapping table to obtain a target domain name address;
detecting whether the address digit of the target domain name address reaches a preset address digit, wherein the preset address digit is 128 bits;
under the condition that the address digit of the detected target domain name address does not reach the preset address digit, supplementing a preset numerical value at the last digit of the target domain name address until reaching the preset address digit;
and determining the target domain name address reaching the preset address digit as the first domain name address.
10. The method according to claim 1, wherein the method further comprises:
if the second domain name address cannot be queried in the preset cache space, sending the second domain name query request to a recursion server, wherein the recursion server is used for analyzing the second domain name query request to acquire the second domain name address;
receiving the second domain name address returned by the recursion server;
And converting the second domain name address into the first domain name address according to a preset algorithm mapping table.
11. The method of claim 10, wherein after receiving the second domain name address returned by the recursive server, the method further comprises:
identifying the preset domain name type corresponding to the second domain name address as the second domain name type;
and determining each second domain name address, the corresponding preset domain name and the corresponding second domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations into the preset cache space.
12. The method of claim 10, wherein after receiving the second domain name address returned by the recursive server, the method further comprises:
converting the second domain name address into the first domain name address according to a preset algorithm mapping table;
identifying the preset domain name type corresponding to the first domain name address as the first domain name type;
and determining each first domain name address, the corresponding preset domain name and the corresponding first domain name type as a group of domain name mapping relations, and storing the group of domain name mapping relations in the preset cache space.
13. A domain name query device, comprising:
The system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring a first domain name query request of a target domain name based on a first domain name type, the first domain name query request is used for indicating to query a first domain name address corresponding to the target domain name and the first domain name type in a preset cache space, the preset cache space is used for recording at least one group of domain name mapping relations, each group of domain name mapping relations is used for recording a group of preset domain names and preset domain name addresses corresponding to the preset domain name type, and the preset domain name type comprises: the preset domain name address comprises: a first domain name address based on internet protocol version 6 IPv6 corresponding to the first domain name type, and a second domain name address based on internet protocol version 4 IPv4 corresponding to the first domain name type;
a type conversion module, configured to convert, when the first domain name address cannot be queried in the preset cache space, the first domain name request into a second domain name query request based on a second domain name type, where the second domain name query request is used to instruct to query, in the preset cache space, the second domain name address corresponding to the target domain name and the second domain name type;
The address conversion module is used for converting the second domain name address into the first domain name address according to a preset algorithm mapping table, wherein the preset algorithm mapping table is used for representing the domain name address conversion relation between the 4 th edition IPv4 of the Internet protocol and the 6 th edition IPv6 of the Internet protocol.
14. A non-volatile storage medium, wherein the non-volatile storage medium is configured to store a program, and wherein the program, when executed, controls a device in which the non-volatile storage medium is located to perform the domain name query method of any one of claims 1 to 12.
15. An electronic device, comprising: a memory and a processor for executing a program stored in the processor, wherein the program is executed to perform the domain name query method of any of claims 1 to 12.
CN202310946774.2A 2023-07-28 2023-07-28 Domain name query method and device, nonvolatile storage medium and electronic equipment Pending CN116800718A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310946774.2A CN116800718A (en) 2023-07-28 2023-07-28 Domain name query method and device, nonvolatile storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310946774.2A CN116800718A (en) 2023-07-28 2023-07-28 Domain name query method and device, nonvolatile storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116800718A true CN116800718A (en) 2023-09-22

Family

ID=88034938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310946774.2A Pending CN116800718A (en) 2023-07-28 2023-07-28 Domain name query method and device, nonvolatile storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116800718A (en)

Similar Documents

Publication Publication Date Title
US20210243170A1 (en) Methods for processing encrypted domain name server, dns, queries received from user equipment in a telecommunication network
CN103262503B (en) Node selecting method and equipment in packet core network
US8161135B2 (en) Device identification number based name service
CN101325552B (en) Triangle forwarding method for access request and GLB server
CN107786678B (en) Domain name resolution method, device and system
CN107360270B (en) DNS (Domain name Server) analysis method and device
US10470017B2 (en) Identity information processing method, database control system, and related device
JP4699530B2 (en) Methods, systems, and applications for service addressing
CN110933156A (en) Domain name resolution method and device
CN112235408A (en) Network system, reverse proxy method and reverse proxy server
CN103685584A (en) Method and system of resisting domain name hijacking based on tunnelling
US12069023B2 (en) Domain name system services for variable-length address networks
CN101651718B (en) Method and system for changing IP flow protocol stack
CN110035134B (en) Network address translation method, device and access equipment
CN112887441B (en) Domain name resolution method, terminal and DNS (Domain name Server)
CN111988441B (en) IPv 6-based networking access method and system
CN101938789B (en) Method and system for selecting packet network gateway with designated capability
CN110677512B (en) Address resolution method and device
JP6484166B2 (en) Name resolution device, name resolution method, and name resolution program
CN117220903A (en) Secure access method and system for private network
CN116800718A (en) Domain name query method and device, nonvolatile storage medium and electronic equipment
CN114731338B (en) System and method for controlling load of domain name system server
CN111147621B (en) Method for supporting IPv6 service access of external network user
KR102185665B1 (en) Server, Terminal, Method, and Recording Medium for IPv6-based Communication in All-IP environment
CN114095471A (en) Address translation method and device and address tracing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination