Configuration method for domain name resolution, domain name resolution method, device and equipment
By associating the network logo with the domain name analysis configuration information in the public cloud scene, and setting a domain name specific parsing strategy in the configuration information, the problem isolation of the domain name analysis strategy caused by the multi -tenant shared DNS server in the public cloud, realized that it has become more Efficient domain name analysis ability.
Patent Information
- Application Number
- CN202411630461.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-01-24
AI Technical Summary
In public cloud scenarios, multiple tenants share DNS servers, the domain name resolution policy cannot be isolated according to the tenant, and the actual business needs cannot be met.
By associating the network identifier of the target network with the first configuration information for domain name resolution, and setting the second configuration information associated with different domain names in the first configuration information, the network and domain name are isolated from the domain name resolution policy.
It solves the problem of all networks sharing a domain name resolution policy in the public cloud scenario, realizes the isolation of domain name resolution policies for different networks and different domain names in the same network, and improves the domain name resolution capability in the public cloud scenario.
Smart Images

Figure CN119363711A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication Internet technology, and in particular to a configuration method, a domain name resolution method, an apparatus and a device for domain name resolution. Background Art
[0002] Public clouds usually have a unified DNS (Domain Name System) access point, and cloud resources (such as cloud servers) use this DNS access point as the default DNS server, and multiple tenants on the cloud share this DNS access point. Based on this technical implementation principle, the domain name resolution capability in public cloud scenarios is limited and cannot meet actual business needs.
[0003] Therefore, there is an urgent need for a method to improve domain name resolution capabilities in public cloud scenarios. Summary of the invention
[0004] In view of this, the present disclosure provides a configuration method for domain name resolution, a domain name resolution method, a configuration device for domain name resolution, a domain name resolution device, an electronic device, a computer-readable storage medium and a computer program product, which can improve the domain name resolution capability in a public cloud scenario.
[0005] In a first aspect, the present disclosure provides a configuration method for domain name resolution, the method comprising:
[0006] In response to receiving the configuration instruction, displaying a configuration interface, the configuration interface including a network identification configuration area and a first configuration area corresponding to the network identification configuration area, the first configuration area including at least one domain name configuration area and a second configuration area corresponding one-to-one to the domain name configuration area;
[0007] In response to an input instruction of a network identifier in the network identifier configuration area and an input instruction of first configuration information in the first configuration area, a first association relationship is generated for the network identifier and the first configuration information in the corresponding area, wherein the first association relationship is used to specify that a domain name resolution request sent from a target network represented by the network identifier is resolved according to the first configuration information associated with the network identifier;
[0008] In response to an input instruction for a domain name in the domain name configuration area and an input instruction for second configuration information in the second configuration area, a second association relationship is generated for the domain name in the corresponding area and the second configuration information, wherein the second association relationship is used to specify that the domain name associated with the second configuration information is resolved according to the second configuration information.
[0009] In a second aspect, the present disclosure provides a domain name resolution method, the method comprising:
[0010] Receiving a domain name resolution request from a target network, the domain name resolution request being used to specify a target domain name to be resolved and a network identifier of the target network;
[0011] If the network identifier is associated with first configuration information for domain name resolution, searching for the target domain name in the first configuration information, wherein the first configuration information includes at least one domain name, and each domain name has respective associated second configuration information for domain name resolution;
[0012] If the first configuration information includes the target domain name, the target domain name is resolved according to the second configuration information associated with the target domain name.
[0013] In a third aspect, the present disclosure provides a configuration device for domain name resolution, the device comprising:
[0014] an interface display module, configured to display a configuration interface in response to receiving a configuration instruction, wherein the configuration interface includes a network identification configuration area and a first configuration area corresponding to the network identification configuration area, wherein the first configuration area includes at least one domain name configuration area and a second configuration area corresponding one-to-one to the domain name configuration area;
[0015] a first association module, configured to generate a first association relationship between the network identifier and the first configuration information in the corresponding area in response to an input instruction of the network identifier in the network identifier configuration area and an input instruction of the first configuration information in the first configuration area, wherein the first association relationship is used to specify that a domain name resolution request sent from a target network represented by the network identifier is resolved according to the first configuration information associated with the network identifier;
[0016] A second association module is used to generate a second association relationship between the domain name in the corresponding area and the second configuration information in response to an input instruction of the domain name in the domain name configuration area and an input instruction of the second configuration information in the second configuration area, wherein the second association relationship is used to specify that the domain name associated with the second configuration information is resolved according to the second configuration information.
[0017] In a fourth aspect, the present disclosure provides a domain name resolution device, the device comprising:
[0018] A request receiving module, used for receiving a domain name resolution request from a target network, wherein the domain name resolution request is used for specifying a target domain name to be resolved and a network identifier of the target network;
[0019] a domain name search module, configured to search for the target domain name in first configuration information for domain name resolution if the network identifier is associated with the first configuration information for domain name resolution, wherein the first configuration information includes at least one domain name, and each domain name has respective associated second configuration information for domain name resolution;
[0020] A domain name resolution module is used to resolve the target domain name according to the second configuration information associated with the target domain name if the first configuration information includes the target domain name.
[0021] In a fifth aspect, the present disclosure provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the configuration method for domain name resolution as described above, or executes the domain name resolution method as described above, by executing the computer instructions.
[0022] In a sixth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the configuration method for domain name resolution as described above, or to execute the domain name resolution method as described above.
[0023] In a seventh aspect, the present disclosure provides a computer program product, including computer instructions, which are used to enable a computer to execute the configuration method for domain name resolution as described above, or execute the domain name resolution method as described above.
[0024] In the technical solutions of some embodiments of the present application, by associating the network identifier of the target network with the first configuration information used for domain name resolution, and setting the second configuration information associated with different domain names in the first configuration information, the domain name resolution strategy can be isolated according to the network and the domain name, that is, the domain name resolution strategies of different networks can be different, and the domain name resolution strategies of different domain names in the same network can be different, which solves the problem of all networks sharing one domain name resolution strategy in the public cloud scenario, thereby greatly improving the domain name resolution capability in the public cloud scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1 It is a flowchart of a configuration method for domain name resolution provided by an embodiment of the present application;
[0027] Figure 2 is a schematic diagram of a configuration interface provided by an embodiment of the present application;
[0028] Figure 3 is Figure 2 The schematic diagram obtained after completing the configuration in the configuration interface shown;
[0029] Figure 4 is a schematic diagram of a configuration interface provided by another embodiment of the present disclosure;
[0030] Figure 5 It is a flowchart of a domain name resolution method provided by an embodiment of the present application;
[0031] Figure 6 is a module schematic diagram of a configuration device provided by an embodiment of the present application;
[0032] Figure 7 It is a module diagram of a domain name resolution device provided by an embodiment of the present application;
[0033] Figure 8 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0035] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0036] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.
[0037] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0038] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0039] It is understandable that before using the technical solutions disclosed in the various embodiments of the present disclosure, the types, scopes of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to relevant users and their authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. The relevant users may include any type of right holders, such as individuals, enterprises, and groups.
[0040] For example, in response to receiving an active request from a user, a prompt message is sent to the relevant user to clearly prompt the relevant user that the operation requested to be performed will require obtaining and using the information of the relevant user, so that the relevant user can independently choose whether to provide information to software or hardware such as an electronic device, application, server or storage medium that executes the operation of the technical solution of the present disclosure based on the prompt message.
[0041] As an optional but non-limiting implementation, in response to receiving an active request from a relevant user, a prompt message is sent to the relevant user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide information to the electronic device.
[0042] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0043] Since multiple tenants on a public cloud share the same DNS server, in some technologies, multiple tenants on a public cloud can only share one set of domain name resolution policies, and domain name resolution policies cannot be isolated by tenant, which cannot meet actual business needs. For example, if tenant A needs the DNS server to forward domain name A to server A for domain name resolution, and tenant B needs to resolve domain name A on the DNS server, this is impossible to achieve in some technologies.
[0044] In view of this, the present application provides a configuration method for domain name resolution and a domain name resolution method based on the configuration method, which can solve the problems in the above-mentioned technology and improve the domain name resolution capability in the public cloud scenario.
[0045] The configuration method for domain name resolution can be applied to a policy configuration device that is connected to a DNS server. The policy configuration device includes but is not limited to a tablet computer, a laptop computer, a desktop computer, etc. Figure 1 , which is a flow chart of a configuration method for domain name resolution provided in one embodiment of the present application. Figure 1 The configuration method includes the following steps:
[0046] Step S101, in response to receiving a configuration instruction, display a configuration interface, the configuration interface includes a network identification configuration area and a first configuration area corresponding to the network identification configuration area, the first configuration area includes at least one domain name configuration area and a second configuration area corresponding to the domain name configuration area one by one.
[0047] Specifically, the policy configuration device may be installed with configuration software. When the configuration software is triggered to run, a configuration instruction may be generated to enable the policy configuration device to display a configuration interface. The configuration interface may be a software interface of the configuration software.
[0048] Combined with reference Figure 2 , which is a schematic diagram of a configuration interface provided for an embodiment of the present application. Figure 2 In the configuration interface, one or more network identification configuration areas may be included, and each network identification configuration area has a corresponding first configuration area. For example, network identification configuration area A1 corresponds to first configuration area B1, and network identification configuration area A2 corresponds to first configuration area B2.
[0049] In each network identification configuration area, you can configure the network identification of the target network that needs to customize the domain name resolution policy. In the first configuration area corresponding to the network identification configuration area, you can configure the domain name resolution policy corresponding to the target network. Among them, the target network can be a private network, proprietary network, etc. created by each tenant on the public cloud. The domain name resolution policy includes but is not limited to the DNS server for resolving the domain name, the processing strategy when the domain name resolution fails, whether the domain name resolution result is cached, etc. The domain name resolution policies corresponding to different target networks may not be exactly the same. For any target network, the domain name resolution request sent from the target network can be resolved according to the domain name resolution policy corresponding to the target network.
[0050] For example, the network identifier aa of the target network A1 can be configured in the network identifier configuration area A1, and the domain name resolution policy A1 corresponding to the target network A1 can be configured in the first configuration area B1, and the network identifier bb of the target network A2 can be configured in the network identifier configuration area A2, and the domain name resolution policy A2 corresponding to the target network A2 can be configured in the first configuration area B2. Among them, the domain name resolution policy A1 and the domain name resolution policy A2 may not be exactly the same. The domain name resolution request sent from the target network A1 can be resolved according to the domain name resolution policy A1, and the domain name resolution request sent from the target network A2 can be resolved according to the domain name resolution policy A2.
[0051] In each first configuration area, the domain name resolution policy can be configured according to the domain name. Specifically, each first configuration area can include one or more domain name configuration areas, and each domain name configuration area can have a corresponding second configuration area. The domain name can be configured in the domain name configuration area, and the domain name resolution policy of the domain name can be configured in the second configuration area corresponding to the domain name configuration area. In this way, different domain name resolution requests sent from the same target network can be resolved according to different domain name resolution policies.
[0052] For example, in the first configuration area B1, the domain name configuration area b11 corresponds to the second configuration area b12, the domain name configuration area b13 corresponds to the second configuration area b14, and the domain name configuration area b15 corresponds to the second configuration area b16. In the domain name configuration area b11, the domain name a.com can be configured, and the domain name resolution policy A1 for the domain name a.com can be configured in the second configuration area b12. In the domain name configuration area b13, the domain name bacom can be configured, and the domain name resolution policy A2 for the domain name bacom can be configured in the second configuration area b14. Assuming that the network identifier aa of the target network A1 is configured in the network identifier configuration area A1, the domain name resolution request for the domain name a.com sent from the target network A1 can be resolved according to the domain name resolution policy A1, and the domain name resolution request for the domain name bacom sent from the target network A1 can be resolved according to the domain name resolution policy A2.
[0053] It should be noted that the same domain name can be configured in different first configuration areas, but the domain name resolution policies configured for the domain name in different first configuration areas may not be exactly the same, which means that domain name resolution requests for the same domain name sent from different target networks can be resolved according to different domain name resolution policies. Figure 3 , for Figure 2 The schematic diagram obtained after completing the configuration in the configuration interface shown. Figure 3In the field "forward_addr", the domain name needs to be forwarded to the target DNS server. In simple terms, after the domain name is sent from the target network to the public cloud's shared DNS server, the shared DNS server needs to forward the domain name to the target DNS server corresponding to the field "forward_addr" for resolution; if there is no field "forward_addr" or the value of the field "forward_addr" is empty, it can be said that the domain name resolution is performed in the shared DNS server. The field "fallback" indicates the processing strategy for domain name resolution failure. Figure 3 In the example, the value of the field "fallback" is an IP, which means that after the domain name resolution based on the target DNS server or shared DNS server corresponding to the field "forward_addr" fails, the domain name is sent to the DNS server corresponding to the field "fallback" for re-resolution. If there is no field "fallback" or the value of the field "fallback" is empty, it means that there is no strategy for handling domain name resolution failure.
[0054] from Figure 3 It can be seen that the domain name a.com is configured in both the first configuration area B1 and the second configuration area B2, which means: if a domain name resolution request for domain name a.com is sent from the target network A1 represented by the network identifier aa, the domain name a.com needs to be sent to the target DNS server 10.0.0.1 for resolution, and there is no failure processing strategy after the domain name resolution fails; if a domain name resolution request for domain name a.com is sent from the target network A2 represented by the network identifier bb, the domain name a.com is directly resolved in the shared DNS server, and after the domain name resolution fails, the domain name a.com is sent to the DNS server 8.8.8.8 for re-resolution.
[0055] It should be noted that the domain name resolution strategy can be configured according to the actual situation. Figure 3 The domain name resolution strategy configured in does not constitute a limitation of this application.
[0056] Step S102, in response to an input instruction of a network identifier in a network identifier configuration area and an input instruction of first configuration information in a first configuration area, generates a first association relationship for the network identifier and the first configuration information in the corresponding area, wherein the first association relationship is used to specify that a domain name resolution request sent from a target network represented by the network identifier is resolved according to the first configuration information associated with the network identifier.
[0057] As described in step S101, the first configuration information may be a domain name resolution policy corresponding to the target network represented by the network identifier in the network identifier configuration area. When the network identifier is input in the network identifier configuration area, and the first configuration information is input in the first configuration area, and a signal representing the determination is received (such as a button representing the determination in the configuration interface is triggered), an input instruction may be generated. In this case, a first association relationship may be generated for the network identifier and the first configuration information in the corresponding area. The first association relationship may be stored in a database or cache of a shared DNS server.
[0058] Step S103, in response to the input instruction of the domain name in the domain name configuration area and the input instruction of the second configuration information in the second configuration area, a second association relationship is generated for the domain name in the corresponding area and the second configuration information, and the second association relationship is used to specify that the domain name associated with the second configuration information is resolved according to the second configuration information.
[0059] As described in step S101, the second configuration information may be a domain name resolution policy corresponding to the domain name in the domain name configuration area. The principle of step S103 is substantially similar to that of step S102, and will not be described in detail here.
[0060] Combined with reference Figure 4 , which is a schematic diagram of a configuration interface provided by another embodiment of the present disclosure. Figure 4 In the configuration interface, the third configuration area is also included. In response to the input instruction of the third configuration information in the third configuration area, the third configuration information can be obtained. The third configuration information is used to specify the domain name resolution method corresponding to the domain name resolution request sent from other networks outside the target network. Specifically, the third configuration information can be the default domain name resolution policy corresponding to the shared DNS server. In this way, for networks in the public cloud that do not require customized domain name resolution policies, domain name resolution requests sent from these networks can be resolved based on the default domain name resolution policy.
[0061] After completing the configuration of the domain name resolution policy, the shared DNS server can perform domain name resolution based on the relevant configuration.
[0062] In some embodiments, the policy configuration device may also collect the domain name resolution log of the shared DNS server. Based on the domain name resolution log, it is possible to monitor whether the configuration in the shared DNS server is effective. Specifically, the policy configuration device may display the domain name resolution log in response to the log viewing instruction. The domain name resolution log may include the domain name resolution result corresponding to the domain name resolution request. When the domain name resolution log meets the following conditions, it may indicate that the configuration in the shared DNS server is effective:
[0063] If the domain name resolution request comes from the target network represented by the network identifier, the domain name resolution result is obtained after performing domain name resolution based on the first configuration information;
[0064] If the domain name resolution request comes from other networks, the domain name resolution result is obtained after performing domain name resolution based on the third configuration information, and the other networks include networks other than the target network.
[0065] If the domain name resolution request comes from the target network represented by the network identifier, then:
[0066] If the domain name in the domain name resolution request is a domain name configured in the domain name configuration area, the domain name resolution result is obtained by performing domain name resolution on the domain name based on the second configuration information associated with the domain name;
[0067] If the domain name in the domain name resolution request is not a domain name configured in the domain name configuration area, but the parent domain name of the domain name in the domain name resolution request is a domain name configured in the domain name configuration area, then the domain name resolution result is obtained after resolving the domain name based on the second configuration information associated with the parent domain name.
[0068] Based on the above configuration method, this application proposes a domain name resolution method. The domain name resolution method can be applied to the shared DNS server of the public cloud. Figure 5 , which is a flow chart of a domain name resolution method provided in one embodiment of the present application. Figure 5 In the domain name resolution method, the domain name resolution method includes the following steps:
[0069] Step S501: receiving a domain name resolution request from a target network, where the domain name resolution request is used to specify a target domain name to be resolved and a network identifier of the target network.
[0070] In this embodiment, the domain name resolution request may include a target domain name and a parameter characterizing a target network feature. Based on the parameter characterizing the target network feature, a network identifier of the target network may be determined.
[0071] In some other embodiments, the domain name resolution request may directly include the target domain name and the network identifier of the target network.
[0072] Step S502: If the network identifier is associated with first configuration information for domain name resolution, search for a target domain name in the first configuration information, wherein the first configuration information includes at least one domain name, and each domain name has its own associated second configuration information for domain name resolution.
[0073] Specifically, according to the relevant descriptions of the above steps S101 to S103, if the network identifier of the target network is associated with the first configuration information used for domain name resolution, it means that the target network is a network that requires a customized domain name resolution strategy. Therefore, domain name resolution needs to be performed according to the first configuration information associated with the target network.
[0074] Step S503: If the first configuration information includes the target domain name, the target domain name is resolved according to the second configuration information associated with the target domain name.
[0075] Specifically, according to the relevant description of the above steps S101 to S103, if the first configuration information includes the target domain name, it means that the domain name resolution request for the target domain name sent from the target network needs to be resolved according to the second configuration information associated with the target domain name.
[0076] To summarize, in the technical solutions of some embodiments of the present application, by associating the network identifier of the target network with the first configuration information used for domain name resolution, and setting the second configuration information associated with different domain names in the first configuration information, the domain name resolution strategy can be isolated according to the network and the domain name, that is, the domain name resolution strategies of different networks can be different, and the domain name resolution strategies of different domain names in the same network can be different, which solves the problem of all networks sharing one domain name resolution strategy in the public cloud scenario, thereby greatly improving the domain name resolution capability in the public cloud scenario.
[0077] The solution of this application is further described below.
[0078] In some embodiments, if the first configuration information does not include the target domain name, searching the first configuration information for the parent domain name of the target domain name;
[0079] If the first configuration information includes the upper-level domain name of the target domain name, the target domain name is resolved according to the second configuration information associated with the upper-level domain name.
[0080] For example, assuming that the first configuration information corresponding to the target network includes domain name resolution policies for domain names a.com, c.com and bacom, when the target domain name is cbacom, since domain names a.com and bacom are both parent domain names of the target domain name, the target domain name cbacom can be resolved according to the domain name resolution policy of domain name a.com, or the target domain name cbacom can be resolved according to the domain name resolution policy of domain name bacom.
[0081] Since domain names with a hierarchical relationship may have similar domain name resolution strategies, when the first configuration information does not include the target domain name, resolving the target domain name according to the second configuration information associated with the parent domain name of the target domain name can improve the accuracy of domain name resolution and reduce the risk of domain name resolution failure.
[0082] In some embodiments, the target domain name can be segmented to obtain the first upper-level domain name of the target domain name. If the first configuration information includes the first upper-level domain name, the target domain name is parsed according to the second configuration information associated with the first upper-level domain name. Wherein, segmenting the target domain name refers to segmenting the target domain name at each separator of the target domain name. For any separator, after the target domain name is segmented from the separator, one of the domain names obtained by the segmentation is the upper-level domain name of the target domain name. For example, suppose the target domain name is cbacom. Start from the left side (i.e., the side starting with the letter c):
[0083] Split the target domain name at the first separator to get c and bacom. Among them, bacom is the first parent domain name of the target domain name;
[0084] Splitting the target domain name at the second separator will result in cb and a.com. Among them, a.com is the first parent domain name of the target domain name;
[0085] The target domain name is split at the third separator to obtain cba and com, where com is the first parent domain name of the target domain name.
[0086] If the first configuration information includes the above-mentioned divided one or more first upper-level domain names, the target domain name can be resolved according to the second configuration information associated with these first upper-level domain names.
[0087] In the above embodiment, the first upper-level domain name determined by domain name segmentation is relatively accurate.
[0088] Further, in some embodiments, if the first configuration information includes multiple first-upper-level domain names of the target domain name, the target domain name is resolved according to the second configuration information associated with the specified first-upper-level domain name, wherein the specified first-upper-level domain name refers to the first first-upper-level domain name found in the first configuration information starting from the target domain name according to the domain name hierarchy relationship.
[0089] In simple terms, the designated first-level domain name refers to the first-level domain name that is closest to the target domain name according to the domain name hierarchy. For example, suppose the first configuration information associated with the target domain name cbacom includes the domain names a.com and com. Starting from the target domain name, the first first-level domain name found upward according to the domain name hierarchy is a.com. Therefore, the target domain name cbacom can be resolved based on the second configuration information associated with the domain name a.com.
[0090] Since the first first-upper domain name is closer to the target domain name, the domain name resolution strategy of the domain name and the domain name resolution strategy of the target domain name may have great similarity, and the domain name resolution of the target domain name is performed according to the domain name resolution strategy of the domain name with high accuracy.
[0091] In some embodiments, if the first configuration information does not include the first upper-level domain name of the target domain name, the method of the present application may further include:
[0092] In the case where the first configuration information includes the root domain name, the root domain name is used as the second upper domain name of the target domain name, and the target domain name is resolved according to the second configuration information associated with the second upper domain name.
[0093] For ease of understanding, the following is an example of the first configuration information associated with the target network:
[0094] aa: .:
[0096] id:100
[0097] forward_addr:
[0098] -8.8.8.8
[0099] a.com:
[0100] id:101
[0101] forward_addr:
[0102] -10.0.0.1
[0103] -10.0.0.2
[0104] fallback:100
[0105] bacom:
[0106] id:102
[0107] forward_addr:
[0108] -10.0.0.3
[0109] In the above example, aa at the initial position of the first configuration information can represent the network identifier of the target network. The first configuration information includes the root domain name . and domain names a.com and bacom. Assume that the target domain name is e.com. Based on the above description, it can be understood that by segmenting the target domain name, the first upper domain name of the target domain name cannot be found in the first configuration information. However, since the root domain name . is the top-level domain name, the root domain name can be used as the second upper domain name of the target domain name, and the target domain name can be resolved according to the second configuration information associated with the second upper domain name.
[0110] In the above embodiment, the root domain name . can be used as a fallback resolution strategy for the target domain name to improve the reliability of the solution.
[0111] In some embodiments, if the network identifier of the target network is not associated with the first configuration information for domain name resolution, the method of the present application may further include:
[0112] The target domain name is resolved according to the third configuration information for domain name resolution.
[0113] The relevant principles can be found in the description of step S101 to step S103, which will not be elaborated here.
[0114] In some embodiments, such as step S101 to step S103, the second configuration information may include a domain name server for resolving the domain name; the above-mentioned resolving the target domain name may include:
[0115] If the target domain name is resolved according to the second configuration information associated with the target domain name, the target domain name is sent to the first domain name server associated with the target domain name, and the first domain name server resolves the target domain name;
[0116] If the target domain name is resolved according to the second configuration information associated with the upper-level domain name of the target domain name, the target domain name is sent to the second domain name server associated with the upper-level domain name, and the second domain name server resolves the target domain name.
[0117] In this way, domain name resolution schemes can be isolated by domain name, improving domain name resolution capabilities.
[0118] In some embodiments, such as step S101 to step S103, the second configuration information further includes a failure handling strategy when the target domain name resolution fails; the method of the present application may further include:
[0119] If the first domain name server returns a first response indicating that the domain name resolution has failed, the resolution of the target domain name is processed according to the first failure processing strategy associated with the target domain name;
[0120] If the second domain name server returns a second response indicating that the domain name resolution has failed, the resolution of the target domain name is processed according to a second failure processing policy associated with the parent domain name of the target domain name.
[0121] In this way, the failure handling strategy of domain names can be isolated by domain name, thus improving the domain name resolution capability.
[0122] This completes the relevant description of this application.
[0123] Corresponding to the above configuration method, the present application also provides a configuration device for domain name resolution. Figure 6 , which is a module diagram of a configuration device provided in one embodiment of the present application. Figure 6 In the configuration device, the configuration device includes:
[0124] The interface display module 601 is used to display a configuration interface in response to receiving a configuration instruction, wherein the configuration interface includes a network identification configuration area and a first configuration area corresponding to the network identification configuration area, and the first configuration area includes at least one domain name configuration area and a second configuration area corresponding to the domain name configuration area one by one;
[0125] A first association module 602 is used to generate a first association relationship between the network identifier and the first configuration information in the corresponding area in response to an input instruction of the network identifier in the network identifier configuration area and an input instruction of the first configuration information in the first configuration area, wherein the first association relationship is used to specify that a domain name resolution request sent from a target network represented by the network identifier is resolved according to the first configuration information associated with the network identifier;
[0126] The second association module 603 is used to generate a second association relationship between the domain name in the corresponding area and the second configuration information in response to an input instruction of the domain name in the domain name configuration area and an input instruction of the second configuration information in the second configuration area. The second association relationship is used to specify that the domain name associated with the second configuration information is resolved according to the second configuration information.
[0127] In some embodiments, the configuration interface further includes a third configuration area; the interface display module 601 is further used to:
[0128] In response to an input instruction of the third configuration information in the third configuration area, the third configuration information is obtained, where the third configuration information is used to specify a domain name resolution method corresponding to a domain name resolution request sent from a network other than the target network.
[0129] In some embodiments, the interface display module 601 is also used to:
[0130] In response to the log viewing instruction, the domain name resolution log is displayed, and the domain name resolution log includes the domain name resolution result corresponding to the domain name resolution request, wherein:
[0131] If the domain name resolution request comes from the target network represented by the network identifier, the domain name resolution result is obtained after performing domain name resolution based on the first configuration information;
[0132] If the domain name resolution request comes from other networks, the domain name resolution result is obtained after performing domain name resolution based on the third configuration information, and the other networks include networks other than the target network.
[0133] In some embodiments, if the domain name resolution request comes from the target network represented by the network identifier:
[0134] If the domain name in the domain name resolution request is a domain name configured in the domain name configuration area, the domain name resolution result is obtained by performing domain name resolution on the domain name based on the second configuration information associated with the domain name;
[0135] If the domain name in the domain name resolution request is not a domain name configured in the domain name configuration area, but the parent domain name of the domain name in the domain name resolution request is a domain name configured in the domain name configuration area, then the domain name resolution result is obtained after resolving the domain name based on the second configuration information associated with the parent domain name.
[0136] The configuration device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0137] The configuration device of the present application has the same beneficial effects as the above configuration method, which will not be described in detail here.
[0138] Corresponding to the above domain name resolution method, the present application also provides a domain name resolution device. Figure 7 , which is a module diagram of a domain name resolution device provided in one embodiment of the present application. Figure 7 In the domain name resolution device, the domain name resolution device includes:
[0139] The request receiving module 701 is used to receive a domain name resolution request from a target network, where the domain name resolution request is used to specify a target domain name to be resolved and a network identifier of the target network;
[0140] A domain name search module 702, configured to search for a target domain name in the first configuration information if the network identifier is associated with the first configuration information for domain name resolution, wherein the first configuration information includes at least one domain name, and each domain name has its own associated second configuration information for domain name resolution;
[0141] The domain name resolution module 703 is configured to resolve the target domain name according to the second configuration information associated with the target domain name if the first configuration information includes the target domain name.
[0142] In some embodiments, the domain name resolution module 703 is further used to:
[0143] If the first configuration information does not include the target domain name, searching the first configuration information for the parent domain name of the target domain name;
[0144] If the first configuration information includes the upper-level domain name of the target domain name, the target domain name is resolved according to the second configuration information associated with the upper-level domain name.
[0145] In some embodiments, the domain name resolution module 703 is specifically used to:
[0146] Split the target domain name to obtain the first parent domain name of the target domain name;
[0147] If the first configuration information includes the first upper-level domain name, the target domain name is resolved according to the second configuration information associated with the first upper-level domain name.
[0148] In some embodiments, the domain name resolution module 703 is specifically used to:
[0149] If the first configuration information includes multiple first-upper-level domain names of the target domain name, the target domain name is resolved according to the second configuration information associated with the specified first-upper-level domain name, wherein the specified first-upper-level domain name refers to the first first-upper-level domain name found in the first configuration information starting from the target domain name according to the domain name hierarchy relationship.
[0150] In some embodiments, if the first configuration information does not include the first upper-level domain name of the target domain name, the domain name resolution module 703 is further configured to:
[0151] In the case where the first configuration information includes the root domain name, the root domain name is used as the second upper domain name of the target domain name, and the target domain name is resolved according to the second configuration information associated with the second upper domain name.
[0152] In some embodiments, the second configuration information includes a domain name server for resolving a domain name; the domain name resolution module 703 is specifically used to:
[0153] If the target domain name is resolved according to the second configuration information associated with the target domain name, the target domain name is sent to the first domain name server associated with the target domain name, and the first domain name server resolves the target domain name;
[0154] If the target domain name is resolved according to the second configuration information associated with the upper-level domain name of the target domain name, the target domain name is sent to the second domain name server associated with the upper-level domain name, and the second domain name server resolves the target domain name.
[0155] In some embodiments, the second configuration information further includes a failure handling strategy when the target domain name resolution fails; the domain name resolution module 703 is further used to:
[0156] If the first domain name server returns a first response indicating that the domain name resolution has failed, the resolution of the target domain name is processed according to the first failure processing strategy associated with the target domain name;
[0157] If the second domain name server returns a second response indicating that the domain name resolution has failed, the resolution of the target domain name is processed according to a second failure processing policy associated with the parent domain name of the target domain name.
[0158] In some embodiments, if the network identifier is not associated with the first configuration information for domain name resolution, the domain name resolution module 703 is further configured to:
[0159] The target domain name is resolved according to the third configuration information for domain name resolution.
[0160] The domain name resolution device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0161] The domain name resolution device of the present application has the same beneficial effects as the above-mentioned domain name resolution method, which will not be described in detail here.
[0162] The present disclosure also provides an electronic device having the above Figure 6 The configuration device shown, or Figure 7 The domain name resolution device shown.
[0163] Combined with reference Figure 8 , is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 8As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.
[0164] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0165] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0166] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0167] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0168] The electronic device further comprises a communication interface 30 for the electronic device to communicate with other devices or a communication network.
[0169] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0170] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0171] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A configuration method for domain name resolution, characterized in that: The method comprises: In response to receiving the configuration instruction, displaying a configuration interface, the configuration interface including a network identification configuration area and a first configuration area corresponding to the network identification configuration area, the first configuration area including at least one domain name configuration area and a second configuration area corresponding one-to-one to the domain name configuration area; In response to an input instruction of a network identifier in the network identifier configuration area and an input instruction of first configuration information in the first configuration area, a first association relationship is generated for the network identifier and the first configuration information in the corresponding area, wherein the first association relationship is used to specify that a domain name resolution request sent from a target network represented by the network identifier is resolved according to the first configuration information associated with the network identifier; In response to an input instruction for a domain name in the domain name configuration area and an input instruction for second configuration information in the second configuration area, a second association relationship is generated for the domain name in the corresponding area and the second configuration information, wherein the second association relationship is used to specify that the domain name associated with the second configuration information is resolved according to the second configuration information.
2. The method according to claim 1, characterized in that: The configuration interface also includes a third configuration area; the method also includes: In response to an input instruction of the third configuration information in the third configuration area, the third configuration information is obtained, where the third configuration information is used to specify a domain name resolution method corresponding to a domain name resolution request sent from a network other than the target network.
3. The method according to claim 2, characterized in that The method further comprises: In response to the log viewing instruction, the domain name resolution log is displayed, and the domain name resolution log includes the domain name resolution result corresponding to the domain name resolution request, wherein: If the domain name resolution request comes from the target network represented by the network identifier, the domain name resolution result is obtained after performing domain name resolution based on the first configuration information; If the domain name resolution request comes from other networks, the domain name resolution result is obtained after performing domain name resolution based on the third configuration information, and the other networks include networks other than the target network.
4. The method according to claim 3, characterized in that If the domain name resolution request comes from the target network represented by the network identifier: If the domain name in the domain name resolution request is a domain name configured in the domain name configuration area, the domain name resolution result is obtained by performing domain name resolution on the domain name based on the second configuration information associated with the domain name; If the domain name in the domain name resolution request is not a domain name configured in the domain name configuration area, but the parent domain name of the domain name in the domain name resolution request is a domain name configured in the domain name configuration area, then the domain name resolution result is obtained after resolving the domain name based on the second configuration information associated with the parent domain name.
5. A domain name resolution method, characterized in that: The method comprises: Receiving a domain name resolution request from a target network, the domain name resolution request being used to specify a target domain name to be resolved and a network identifier of the target network; If the network identifier is associated with first configuration information for domain name resolution, searching for the target domain name in the first configuration information, wherein the first configuration information includes at least one domain name, and each domain name has respective associated second configuration information for domain name resolution; If the first configuration information includes the target domain name, the target domain name is resolved according to the second configuration information associated with the target domain name.
6. The method according to claim 5, characterized in that The method further comprises: If the first configuration information does not include the target domain name, searching the first configuration information for the parent domain name of the target domain name; If the first configuration information includes the upper-level domain name of the target domain name, the target domain name is resolved according to the second configuration information associated with the upper-level domain name.
7. The method according to claim 6, characterized in that If the first configuration information includes the upper-level domain name of the target domain name, resolving the target domain name according to the second configuration information associated with the upper-level domain name includes: Segmenting the target domain name to obtain a first upper-level domain name of the target domain name; If the first configuration information includes the first upper-level domain name, the target domain name is resolved according to the second configuration information associated with the first upper-level domain name.
8. The method according to claim 7, characterized in that The resolving the target domain name according to the second configuration information associated with the first upper-level domain name includes: If the first configuration information includes multiple first-upper-level domain names of the target domain name, the target domain name is resolved according to the second configuration information associated with the specified first-upper-level domain name, wherein the specified first-upper-level domain name refers to the first first-upper-level domain name found in the first configuration information starting from the target domain name according to the domain name hierarchy relationship.
9. The method according to claim 7, characterized in that: If the first configuration information does not include the first upper-level domain name of the target domain name, the method further includes: In the case that the first configuration information includes a root domain name, the root domain name is used as a second upper-level domain name of the target domain name, and the target domain name is resolved according to the second configuration information associated with the second upper-level domain name.
10. The method according to claim 6, characterized in that The second configuration information includes a domain name server for resolving the domain name; The resolving of the target domain name includes: If the target domain name is resolved according to the second configuration information associated with the target domain name, the target domain name is sent to the first domain name server associated with the target domain name, and the first domain name server resolves the target domain name; If the target domain name is resolved according to the second configuration information associated with the upper-level domain name of the target domain name, the target domain name is sent to the second domain name server associated with the upper-level domain name, and the second domain name server resolves the target domain name.
11. The method according to claim 10, characterized in that The second configuration information also includes a failure handling strategy when the target domain name resolution fails; the method also includes: If the first domain name server returns a first response indicating that the domain name resolution has failed, the resolution of the target domain name is processed according to a first failure processing strategy associated with the target domain name; If the second domain name server returns a second response indicating that the domain name resolution has failed, the resolution of the target domain name is processed according to a second failure processing strategy associated with the parent domain name of the target domain name.
12. The method according to claim 5, characterized in that If the network identifier is not associated with the first configuration information for domain name resolution, the method further includes: The target domain name is resolved according to the third configuration information for domain name resolution.
13. A configuration device for domain name resolution, characterized in that: The device comprises: an interface display module, configured to display a configuration interface in response to receiving a configuration instruction, wherein the configuration interface includes a network identification configuration area and a first configuration area corresponding to the network identification configuration area, wherein the first configuration area includes at least one domain name configuration area and a second configuration area corresponding one-to-one to the domain name configuration area; a first association module, configured to generate a first association relationship between the network identifier and the first configuration information in the corresponding area in response to an input instruction of the network identifier in the network identifier configuration area and an input instruction of the first configuration information in the first configuration area, wherein the first association relationship is used to specify that a domain name resolution request sent from a target network represented by the network identifier is resolved according to the first configuration information associated with the network identifier; A second association module is used to generate a second association relationship between the domain name in the corresponding area and the second configuration information in response to an input instruction of the domain name in the domain name configuration area and an input instruction of the second configuration information in the second configuration area, wherein the second association relationship is used to specify that the domain name associated with the second configuration information is resolved according to the second configuration information.
14. A domain name resolution device, characterized in that: The device comprises: A request receiving module, used for receiving a domain name resolution request from a target network, wherein the domain name resolution request is used for specifying a target domain name to be resolved and a network identifier of the target network; a domain name search module, configured to search for the target domain name in first configuration information for domain name resolution if the network identifier is associated with the first configuration information for domain name resolution, wherein the first configuration information includes at least one domain name, and each domain name has respective associated second configuration information for domain name resolution; A domain name resolution module is used to resolve the target domain name according to the second configuration information associated with the target domain name if the first configuration information includes the target domain name.
15. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the configuration method for domain name resolution described in any one of claims 1 to 4, or executes the domain name resolution method described in any one of claims 5 to 12 by executing the computer instructions.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the configuration method for domain name resolution described in any one of claims 1 to 4, or to execute the domain name resolution method described in any one of claims 5 to 12.
17. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the configuration method for domain name resolution according to any one of claims 1 to 4, or to execute the domain name resolution method according to any one of claims 5 to 12.