Domain name resolution method and device, storage medium and electronic equipment

The domain name resolution request is processed through OVN-Controller and forwarded to the specified service module. Combined with flow table matching and IP address recommendation, it solves the problem that traditional domain name resolution algorithm cannot achieve the isolation of user-level VPC users' domain names and saves a large number of records, improving DNS resolution efficiency and user experience.

CN120567828APending Publication Date: 2025-08-29JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510628982.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

Traditional domain name resolution algorithms cannot achieve the isolation of user-level VPC users' domain names in the cloud platform and save a large number of records, resulting in resolution conflicts and waste of resources.

Method used

Domain name resolution requests are processed through an open virtual network controller (OVN-Controller). If resolution fails, it will be forwarded to the specified service module (such as Designate) for processing. Combined with the flow table matching and IP address recommendation mechanism, it ensures tenant-level isolation and resolution success.

Benefits of technology

It realizes the isolation of tenant-level DNS services, improves DNS resolution efficiency and user experience, and ensures smooth response to DNS requests and efficient utilization of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120567828A_ABST
    Figure CN120567828A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a domain name resolution method and device, a storage medium and electronic equipment, and the method comprises the steps: processing a domain name resolution request through an open virtual network controller under the condition that the domain name resolution request sent by a target virtual machine is received, and obtaining a first resolution result, the domain name resolution request is used for requesting to resolve a carried domain name to be resolved into an IP address, and the open virtual network controller is used for providing a tenant-level domain name service; under the condition that the first resolution result indicates that resolution fails, the domain name resolution request is forwarded to a specified service module to indicate the specified service module to process the domain name resolution request to obtain a second resolution result, and the specified service module is used for providing a global domain name service; and receiving a second analysis result returned by the specified service module, and sending the first IP address carried by the second analysis result to the target virtual machine under the condition that the second analysis result indicates that the analysis is successful.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer networks, and more specifically, to a domain name resolution method and apparatus, a storage medium, and an electronic device. Background Art

[0002] With the increasing popularity of cloud computing and virtualization technologies, efficient, secure, and customizable network services have become key to cloud platform competitiveness. DNS (Domain Name System) services, as the bridge connecting the internet, are crucial for application access, communication, and security in cloud environments. Traditional DNS services are often centrally managed, with all tenants sharing the same DNS server. This can lead to resolution conflicts due to duplicate domain names, reducing user experience, and makes it difficult to meet the needs of different tenants for network isolation and customized DNS records. Especially for large cloud platforms, this sharing mechanism can become a performance bottleneck, impacting the efficiency and reliability of DNS resolution.

[0003] To solve the above problems, OVN (Open Virtual Network) in the OpenStack project is an advanced virtual network solution designed to provide more flexible and secure network services. By deploying a local OVN controller (OVN-Controller) on each node, OVN can dynamically adjust the network flow table according to the tenant's configuration to achieve fine-grained control of network resources. However, although OVN can provide tenant-level network isolation, its built-in DNS service function is relatively limited, and there is a gap compared with the rich DNS management functions provided by the Designate module. When the cloud platform enables OVN's DNS service, the DNS records of the Designate module will be blocked, and a large number of records cannot be used, resulting in resource redundancy and waste.

[0004] In related technologies, traditional domain name resolution algorithms are unable to achieve the problem that user-level VPC users can simultaneously meet the requirements of domain name isolation and save a large number of records. No effective solution has yet been proposed. Summary of the Invention

[0005] The embodiments of the present application provide a domain name resolution method and apparatus, a storage medium, and an electronic device to at least address the problem in the related art that traditional domain name resolution algorithms cannot achieve user-level VPC users meeting the requirements of domain name isolation and storing a large number of records at the same time.

[0006] According to one embodiment of the present application, a domain name resolution method is provided, which is applied to an open virtual network controller, including: upon receiving a domain name resolution request sent by a target virtual machine, processing the domain name resolution request by the open virtual network controller to obtain a first resolution result, wherein the domain name resolution request is used to request that the carried domain name to be resolved be resolved into an IP address, and the open virtual network controller is used to provide tenant-level domain name services; when the first resolution result indicates that the resolution failed, forwarding the domain name resolution request to a designated service module to instruct the designated service module to process the domain name resolution request to obtain a second resolution result, wherein the designated service module is used to provide global domain name services; receiving the second resolution result returned by the designated service module, and when the second resolution result indicates that the resolution was successful, sending the first IP address carried by the second resolution result to the target virtual machine.

[0007] In an exemplary embodiment, the domain name resolution request is processed by the open virtual network controller to obtain a first resolution result, including: obtaining the domain name to be resolved carried by the domain name resolution request; matching the domain name to be resolved in a first flow table stored in the open virtual network controller, wherein the first flow table includes multiple first flow table entries, and the multiple first flow table entries are all used to indicate the correspondence between the domain name and the IP address; if none of the multiple first flow table entries successfully matches the domain name to be resolved, generating a first resolution result indicating a resolution failure.

[0008] In an exemplary embodiment, after matching the domain name to be resolved in the first flow table stored in the open virtual network controller, the method further includes: when the domain name to be resolved successfully matches the second flow table entry, obtaining a second IP address corresponding to the second flow table entry, and generating a first resolution result indicating successful resolution based on the second IP address, wherein the multiple first flow table entries include the second flow table entry; and sending the second IP address to the target virtual machine.

[0009] In an exemplary embodiment, after receiving the second resolution result returned by the designated service module, the method further includes: when the second resolution result indicates that the resolution failed, generating an IP address recommendation request based on the domain name to be resolved, wherein the IP address recommendation request is used to request an IP address recommendation based on the domain name to be resolved; processing the IP address recommendation request through the open virtual network controller to obtain a first recommendation result, and sending the IP address recommendation request to the designated service module for processing to obtain a second recommendation result; determining a third IP address based on the first recommendation result and the second recommendation result, and sending the third IP address to the target virtual machine.

[0010] In an exemplary embodiment, the IP address recommendation request is processed by the open virtual network controller to obtain a first recommendation result, including: calculating the similarity between the domain name to be resolved and the domain names corresponding to the multiple first flow table items to obtain multiple first similarities, wherein the multiple first similarities correspond one-to-one to the multiple first flow table items; screening out multiple third flow table items from the multiple first flow table items, wherein the first similarities corresponding to the multiple third flow table items are greater than a preset threshold; determining the priority order of the multiple third flow table items; determining a fourth flow table item from the multiple third flow table items according to the priority order, and determining the first domain name and fourth IP address corresponding to the fourth flow table item, wherein the priority of the fourth flow table item is the highest among the multiple third flow table items; generating the first recommendation result based on the first domain name and the fourth IP address.

[0011] In an exemplary embodiment, determining a third IP address based on the first recommendation result and the second recommendation result, and sending the third IP address to the target virtual machine, includes: resolving a second domain name and a fifth IP address from the second recommendation result; obtaining a historical domain name resolution request of the target virtual machine; matching the third domain name corresponding to the historical domain name resolution request with the first domain name and the second domain name respectively; determining the third IP address from the fourth IP address and the fifth IP address based on the matching result, and sending the third IP address to the target virtual machine.

[0012] In an exemplary embodiment, before the domain name resolution request is processed by the open virtual network controller to obtain a first resolution result, the method further includes: updating the rules of the first flow table to target rules, wherein the target rules are used to indicate that if the resolution of the domain name to be resolved fails, the domain name resolution request shall be forwarded to the designated service module.

[0013] According to another embodiment of the present application, a domain name resolution device is provided, including: a processing module for, upon receiving a domain name resolution request sent by a target virtual machine, processing the domain name resolution request through the open virtual network controller to obtain a first resolution result, wherein the domain name resolution request is used to request that the carried domain name to be resolved be resolved into an IP address, and the open virtual network controller is used to provide tenant-level domain name service; a forwarding module for, upon indicating that the first resolution result indicates a resolution failure, forwarding the domain name resolution request to a designated service module to instruct the designated service module to process the domain name resolution request to obtain a second resolution result, wherein the designated service module is used to provide a global domain name service; a sending module for receiving the second resolution result returned by the designated service module, and upon indicating that the resolution is successful, sending the first IP address carried by the second resolution result to the target virtual machine.

[0014] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.

[0015] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0016] According to another embodiment of the present application, a computer program product is provided, including a computer program, which implements the steps of the method described in each embodiment of the present application when executed by a processor.

[0017] Through the present application, a new domain name resolution method is proposed, including: in the case of receiving a domain name resolution request sent by a target virtual machine, processing the domain name resolution request through the open virtual network controller to obtain a first resolution result, wherein the domain name resolution request is used to request that the carried domain name to be resolved be resolved into an IP address, and the open virtual network controller is used to provide tenant-level domain name service; in the case where the first resolution result indicates that the resolution fails, forwarding the domain name resolution request to a designated service module to instruct the designated service module to process the domain name resolution request to obtain a second resolution result, wherein the designated service module is used to provide a global domain name service; receiving the designated service The module returns the second resolution result, and when the second resolution result indicates that the resolution is successful, the first IP address carried by the second resolution result is sent to the target virtual machine; the above scheme is adopted to provide a domain name resolution service implemented by the designate module (the above-mentioned designated service module) for each VPC user in the network node, so that before accessing the domain name resolution service implemented by the designate module, a DNS resolution is completed in the flow table first, which not only ensures tenant-level isolation, but also ensures the smooth response of the request; thereby solving the problem in the related technology that the traditional domain name resolution algorithm cannot achieve user-level VPC users while meeting the requirements of mutual isolation of domain names and storing a large number of records. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a hardware structure block diagram of a computer terminal according to a domain name resolution method of an embodiment of the present application;

[0019] Figure 2 is a flowchart of a domain name resolution method according to an embodiment of the present application;

[0020] Figure 3 2 is a diagram of a method for isolating tenant-level DNS services based on optimization of the OVN domain name resolution algorithm according to an embodiment of the present application;

[0021] Figure 4 This is a flow chart of tenant-level DNS service isolation based on OVN domain name resolution algorithm optimization according to an embodiment of the present application;

[0022] Figure 5 This is a data flow diagram of a domain name resolution method according to an embodiment of the present application.

[0023] Figure 6 This is a structural block diagram of a domain name resolution device according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0025] It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0026] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or similar computing device. Taking running on a computer terminal as an example, Figure 1 This is a hardware structure diagram of a computer terminal of a domain name resolution method according to an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown) processor 102 (processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal may also include Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0027] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the domain name resolution method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory and may also include a 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 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 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.

[0028] The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by a communication provider of a computer terminal. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0029] The following is an explanation of the professional terms that appear in this application:

[0030] Neutron: Neutron is the component in the OpenStack project responsible for providing network services. It is based on the concept of software-defined networking and implements resource management under network virtualization.

[0031] OpenStack: OpenStack is an open-source cloud computing management platform project, a combination of a series of open-source software projects. It provides scalable cloud computing services for private and public clouds and is currently a widely used cloud computing management platform.

[0032] OVN: Open Virtual NetWork is the native virtualized network solution provided by OVS. OVN natively supports virtual networks based on the existing features of OVS, such as virtual L2 and L3 overlay networks and security groups. Services such as DHCP and DNS are also its focus. OVN provides many native virtual network functions, which improves the efficiency and performance of OVS. The OVN architecture includes CMS, OVN / CMS Plugin, OVN Northbound DB, OVN-Northd, OVNSouthbound DB, OVN-Controller, ovS-vswitchd and ovsdb-server components.

[0033] OVN-controller: The OVN-controller is the local SDN controller on each OVN node. It is responsible for communicating with the central control node to obtain network information for the entire cluster and update the local flow table rules. OvS-vswitchd and ovsdb-server are the OVS processes on the node.

[0034] DNS: DNS stands for Domain Name System. It's a distributed database on the Internet that maps domain names to IP addresses, making internet access more convenient for users without having to memorize machine-readable IP numbers. The process of retrieving the IP address corresponding to a host name is called domain name resolution (or host name resolution). The DNS protocol runs on top of UDP, using port 53.

[0035] Bind: BIND is the most mainstream open source DNS software on the market. The mainstream operating systems on the market (Linux / Windows / Windows Server) can host BIND's DNS services.

[0036] Designate: Designate is an open source DNS-as-a-Service (DNS-as-a-Service) that is part of the OpenStack ecosystem of services for running clouds. Designate is a multi-tenant DNSaaS service for OpenStack. It provides a REST API with integrated Keystone authentication. It can be configured to automatically generate records based on Nova and Neutron operations. Designate supports a variety of DNS servers, including Bind9 and PowerDNS 4.

[0037] VPC: A Virtual Private Cloud (VPC) is a logically isolated virtual network environment built for cloud hosts that is independently configured and managed by the user. It aims to improve the security of user resources and simplify user network deployment. A VPC can have multiple subnets. Users can freely select IP address ranges, create multiple subnets, customize security groups, and configure routing tables and gateways in a VPC, making it easy to manage and configure the network and make secure and fast network changes. At the same time, it has the ability to modify, delete, and view record sets of types such as A, CNAME, MX, AAAA, TXT, and PTR for domain names based on the OpenStack community's designate module, providing basic domain name resolution services.

[0038] With the rapid development of the internet, cloud computing has also experienced rapid growth, and more and more companies are migrating their businesses to the cloud. The network services provided by cloud platforms primarily focus on basic domain name resolution services implemented using the designate module. This service is built on a network node and provides uniform DNS resolution services to all VPC tenants on that network node. During use, VPC tenants must first create a mapping record between the domain name and IP address in the service. This record can then be used by all VPC tenants under the network node. However, for different VPC tenants, the domain name in the service record will only correspond to one IP address. If different users create different IP addresses for the same domain name, conflicts will arise, and only the first record created will be retained for the domain name. This creates a problem: the DNS services between different VPC tenants are not isolated from each other, and for a common domain name, conflicts can easily arise due to duplicate domain names.

[0039] In addition, there is another DNS resolution service. Ovn creates a dns_table record. By binding the record to the subnet in the VPC, Ovn will send the DNS resolution-related services to the flow table, providing basic DNS resolution services for the subnet. Compared with the basic domain name resolution service implemented by the designate module, the DNS resolution service provided by Ovn has fewer functions and a smaller scope. The implementation is simpler and more flexible, and the DNS services between tenants in different VPCs are isolated from each other. However, once the DNS resolution service created by Ovn is enabled, the basic domain name resolution service implemented by the designate module will be blocked. If there are a large number of DNS records, when the basic domain name resolution service implemented by the designate module cannot be applied, these records will all be in Ovn, forming a large number of redundant records.

[0040] The DNS resolution service provided by OVN is based on the dns_tdble and is ultimately sent to the OVS flow table, which matches the DNS request message and performs an action: calling the ovn-controller module to complete the DNS resolution service. Regardless of whether the domain name resolution record is found, a DNS reply will be issued. Whether the DNS service provided by OVN is enabled is determined by whether the dns_table is bound to the subnet. If the dns_records field of the subnet does not have a DNS resolution record bound to it, the flow table related to the DNS service will not be sent, and the basic domain name resolution service implemented by the designate module will be used by default.

[0041] Both methods have their advantages and disadvantages, but neither can enable tenant-level VPC users to simultaneously meet the requirements of domain name isolation and the storage of a large number of records.

[0042] In order to solve the above problems, a domain name resolution method is provided in this embodiment. Figure 2 is a flow chart of a domain name resolution method according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps S202-S206:

[0043] Step S202: Upon receiving a domain name resolution request from the target virtual machine, the open virtual network controller processes the domain name resolution request to obtain a first resolution result, wherein the domain name resolution request is used to request resolution of the carried domain name to be resolved into an IP address, and the open virtual network controller is used to provide tenant-level domain name services;

[0044] Step S204: If the first resolution result indicates that the resolution fails, forward the domain name resolution request to a designated service module to instruct the designated service module to process the domain name resolution request to obtain a second resolution result, wherein the designated service module is configured to provide a global domain name service.

[0045] Step S206: receiving the second parsing result returned by the designated service module, and when the second parsing result indicates that the parsing is successful, sending the first IP address carried in the second parsing result to the target virtual machine.

[0046] Through the above steps, a new domain name resolution method is proposed, including: in the case of receiving a domain name resolution request sent by a target virtual machine, processing the domain name resolution request through the open virtual network controller to obtain a first resolution result, wherein the domain name resolution request is used to request that the carried domain name to be resolved be resolved into an IP address, and the open virtual network controller is used to provide tenant-level domain name service; in the case where the first resolution result indicates that the resolution fails, forwarding the domain name resolution request to a designated service module to instruct the designated service module to process the domain name resolution request to obtain a second resolution result, wherein the designated service module is used to provide a global domain name service; receiving the designated service The second resolution result returned by the service module, and when the second resolution result indicates that the resolution is successful, the first IP address carried by the second resolution result is sent to the target virtual machine; the above scheme is adopted to provide a domain name resolution service implemented by the designate module (the above-mentioned designated service module) for each VPC user in the network node, so that before accessing the domain name resolution service implemented by the designate module, a DNS resolution is completed in the flow table first, which ensures both tenant-level isolation and smooth response of the request; thereby solving the problem in the related technology that the traditional domain name resolution algorithm cannot achieve user-level VPC users while meeting the requirements of domain name isolation and storing a large number of records.

[0047] In an exemplary embodiment, the domain name resolution request is processed by the open virtual network controller to obtain a first resolution result, including: obtaining the domain name to be resolved carried by the domain name resolution request; matching the domain name to be resolved in a first flow table stored in the open virtual network controller, wherein the first flow table includes multiple first flow table entries, and the multiple first flow table entries are all used to indicate the correspondence between the domain name and the IP address; if none of the multiple first flow table entries successfully matches the domain name to be resolved, generating a first resolution result indicating a resolution failure.

[0048] When a target VM makes a request, the OVN-Controller (the Open Virtual Network Controller) first captures the domain name in the request and then performs a detailed match against the locally maintained first flow table, attempting to find a match between the domain name and the IP address. If none of the flow table entries match the requested domain name, the OVN-Controller explicitly generates a first resolution result, indicating a resolution failure.

[0049] It should be noted that a flow table is a set of rules used for packet matching and processing in software-defined networking (SDN) and is the basis for implementing network functions. In the OVN architecture, flow tables are dynamically generated by the OVN-Controller and sent to the OVS (Open vSwitch) on the network nodes to guide packet forwarding, filtering, and other operations. Flow table entries contain matching conditions and corresponding actions. For example, when a packet's source or destination address, protocol type, port number, and other characteristics meet the matching conditions of a flow table entry, the packet will be processed according to the action defined in the flow table entry.

[0050] In this embodiment, even if the tenant-level DNS service fails to respond directly, the entire DNS resolution mechanism can continue to operate step by step, paving the way for subsequent possible global DNS queries.

[0051] Furthermore, after matching the domain name to be resolved in the first flow table stored in the open virtual network controller, the method also includes: when the domain name to be resolved successfully matches the second flow table entry, obtaining a second IP address corresponding to the second flow table entry, and generating a first resolution result indicating successful resolution based on the second IP address, wherein the multiple first flow table entries include the second flow table entry; and sending the second IP address to the target virtual machine.

[0052] When the OVN-Controller finds the second flow table entry that matches the domain name to be resolved in the first flow table, it can quickly obtain the second IP address corresponding to the flow table entry, and generate a resolution result indicating successful resolution based on this result, and immediately feedback it to the target virtual machine.

[0053] Through this embodiment, by establishing a fast response mechanism within the OVN-Controller, the IP address corresponding to the requested domain name can be quickly found in the tenant-level DNS record without the need for external DNS queries, thereby greatly improving the efficiency and real-time performance of DNS resolution.

[0054] Optionally, after receiving the second resolution result returned by the designated service module, the method further includes: when the second resolution result indicates that the resolution failed, generating an IP address recommendation request based on the domain name to be resolved, wherein the IP address recommendation request is used to request an IP address recommendation based on the domain name to be resolved; processing the IP address recommendation request through the open virtual network controller to obtain a first recommendation result, and sending the IP address recommendation request to the designated service module for processing to obtain a second recommendation result; determining a third IP address based on the first recommendation result and the second recommendation result, and sending the third IP address to the target virtual machine.

[0055] After receiving the second resolution result indicating a resolution failure, the OVN-Controller initiates an innovative IP address recommendation mechanism. First, an IP address recommendation request is generated based on the domain name to be resolved. This request aims to provide the user with a possible correct IP address recommendation through intelligent similarity matching, making up for the shortcomings of direct resolution failure. Then, the OVN-Controller itself processes the recommendation request, generates a first recommendation result, and forwards the request to the designated service module (Designate) for processing to obtain a second recommendation result. Finally, the OVN-Controller combines the first and second recommendation results to determine a reasonable third IP address and sends it to the target virtual machine.

[0056] In this embodiment, the introduction of an IP address recommendation mechanism significantly improves the user experience when DNS resolution encounters errors or fails. Through intelligent matching and comprehensive recommendations, even if the user's original request fails to resolve directly, the system can provide a potentially correct IP address, reducing service unavailability caused by user input errors.

[0057] Optionally, the IP address recommendation request is processed by the open virtual network controller to obtain a first recommendation result, including: calculating the similarity of the domain name to be resolved with the domain names corresponding to the multiple first flow table items to obtain multiple first similarities, wherein the multiple first similarities correspond one-to-one to the multiple first flow table items; screening out multiple third flow table items from the multiple first flow table items, wherein the first similarities corresponding to the multiple third flow table items are greater than a preset threshold; determining the priority order of the multiple third flow table items; determining a fourth flow table item from the multiple third flow table items according to the priority order, and determining the first domain name and fourth IP address corresponding to the fourth flow table item, wherein the priority of the fourth flow table item is the highest among the multiple third flow table items; generating the first recommendation result based on the first domain name and the fourth IP address.

[0058] When the OVN-Controller receives an IP address recommendation request, it first calculates the similarity between the domain name to be resolved and the domain names in multiple local first flow table entries, and generates a first similarity corresponding to each flow table entry. Subsequently, the system filters out all first flow table entries whose similarity exceeds the preset threshold and defines them as third flow table entries. Next, the OVN-Controller determines the priority order of these third flow table entries according to certain rules, and selects the item with the highest priority from the third flow table entries based on this priority, and defines it as the fourth flow table entry. The fourth flow table entry is not only associated with a first domain name that is highly similar to the domain name to be resolved, but also corresponds to a specific fourth IP address. Finally, the OVN-Controller will generate a first recommendation result based on this similar domain name and IP address.

[0059] Optionally, the designated service module processes the IP address recommendation request to obtain a second recommendation result, including: when receiving an IP address recommendation request for a domain name to be resolved, the designated service module calculates similarity between the domain name to be resolved and the corresponding domain names in multiple fifth flow table entries maintained by the designated service module, obtaining a series of second similarities, which also correspond one-to-one with the fifth flow table entries. From the multiple fifth flow table entries, the designated service module selects flow table entries whose corresponding second similarities are greater than a preset threshold, i.e., multiple sixth flow table entries. Next, the selected sixth flow table entries are prioritized, which may be based on various factors, such as the frequency of domain name access, the most recent access time, and the importance level, to determine which flow table entries are most relevant and receive priority consideration. Based on the priority order, the designated service module determines a seventh flow table entry from the sixth flow table entries, as well as the second domain name and fifth IP address corresponding to the flow table entry. The seventh flow table entry has the highest priority among the sixth flow table entries. Finally, the designated service module generates a second recommendation result based on the determined second domain name and fifth IP address, which will be used in the subsequent DNS resolution process.

[0060] It's important to note that the threshold mechanism is based on a preset similarity threshold. This threshold can be the edit distance, Levenshtein distance, Jaccard similarity coefficient, or other metrics that quantify the similarity between the domain name to be resolved and known domain names. When OVN-Controller receives feedback about a resolution failure, it activates the threshold mechanism and retrieves all domain names from the local DNS records whose similarity exceeds the preset threshold, forming a set of recommended domain names.

[0061] Through this embodiment, similarity calculation and priority sorting are added to ensure the rationality and accuracy of the recommendation results.

[0062] Optionally, determining a third IP address based on the first recommendation result and the second recommendation result, and sending the third IP address to the target virtual machine, includes: resolving a second domain name and a fifth IP address from the second recommendation result; obtaining a historical domain name resolution request of the target virtual machine; matching the third domain name corresponding to the historical domain name resolution request with the first domain name and the second domain name respectively; determining the third IP address from the fourth IP address and the fifth IP address based on the matching result, and sending the third IP address to the target virtual machine.

[0063] First, the second domain name and the fifth IP address related to the domain name to be resolved are resolved from the second recommendation result. Subsequently, the system obtains the historical domain name resolution requests of the target virtual machine. This information usually contains multiple domain names that the user has requested to be resolved in the past. Next, the third domain name corresponding to these historical requests is compared and matched with the first domain name in the first recommendation result and the second domain name in the second recommendation result. By analyzing historical access patterns and similarity calculation results, the system can more intelligently choose between the fourth IP address (from the first recommendation result) and the fifth IP address (from the second recommendation result), and finally determine a third IP address that is more likely to meet the user's actual access needs. The system then sends this third IP address to the target virtual machine to provide more accurate and personalized DNS resolution services.

[0064] Through this embodiment, by comprehensively considering the first and second recommendation results and the historical access records of the target virtual machine, the system can generate a third IP address that best meets the user's access habits, thereby improving accuracy and user satisfaction.

[0065] Optionally, before the domain name resolution request is processed by the open virtual network controller to obtain a first resolution result, the method further includes: updating the rules of the first flow table to target rules, wherein the target rules are used to indicate that when the resolution of the domain name to be resolved fails, the domain name resolution request shall be forwarded to the designated service module.

[0066] Update the OVN-Controller's first flow table rule to a target rule. This target rule is designed to instruct OVN-Controller to automatically forward domain name resolution requests to a designated service module, such as Designate or another DNS service, when it attempts to resolve a domain name and fails. If OVN-Controller cannot find a record for the domain name in its local database (i.e., local resolution fails), the target rule takes effect and automatically forwards the resolution request to the pre-specified external DNS service module.

[0067] In this embodiment, by seamlessly connecting the OVN-Controller with the external DNS service module, resolution failures caused by the lack of specific records in the local database are avoided, ensuring efficient processing and optimal response of user requests, which plays an indispensable role in building a stable, efficient and user-friendly cloud platform network architecture.

[0068] In an optional embodiment, an optimization content of the Ovn-controller module is proposed, including:

[0069] 1. Optimize the code operation logic so that it can meet the following requirements: if the resolution is successful, directly return the DNS reply message; if it is unsuccessful, continue to access the domain name resolution service implemented by the designate module.

[0070] 2. Increase the supported DNS resolution record types, and add other types based on the existing A, AAAA, and PTR types.

[0071] 3. Add the concepts of DNS domain and record set to complete the technical alignment with the domain name resolution service provided by the Designate module.

[0072] In practice, users first deploy their cloud environment, establish a VPC, and create a subnet within the VPC. By creating a DNS domain and binding it to the subnet, the subnet possesses a private DNS domain. Multiple DNS record sets (a collection of DNS resolution records) can be bound to a single DNS domain. The underlying operation involves adding a dns_table record to the ovn-nb server and binding it to the dns_records record on the logical_switch of the ovn-nb server on the subnet.

[0073] In an optional embodiment, a method diagram of tenant-level DNS service isolation based on OVN domain name resolution algorithm optimization is proposed, as shown in FIG. Figure 3 Shown, including:

[0074] 1. Control node:

[0075] (1) Neutron-Server: As the network service management core of OpenStack, it interacts with the OVN Northbound Database (OVN-NB) through the tdns-plugin and is responsible for managing the DNS record configuration of VPCs and subnets.

[0076] (2) tdns-plugin: A bridge between Neutron and OVN, used to update and maintain DNS records in the OVN northbound database to associate with VPCs and subnets.

[0077] (3) OVN-NB (Northbound Database): Stores OVN northbound data, including DNS-related records such as the DNS table (dns_table), which is used to implement tenant-level DNS service isolation.

[0078] (4) OVN-Northd: OVN's northbound daemon, which monitors changes in the OVN northbound database and synchronizes data to the southbound database.

[0079] (5) OVN-SB: stores OVN southbound data, interacts directly with the OVN-Controller, updates flow table rules, and implements local processing of DNS requests.

[0080] 2. Designate Node: Consists of Designate components, including API, central processing (Central), metadata notification service (mdns), producer (Producer), worker (Worker), and DNS service (dnsserver). Designate is responsible for providing DNS as a service, handling the creation, modification, and deletion of DNS records, as well as responding to DNS queries.

[0081] 3. Compute node 1:

[0082] (1) OVS (Open vSwitch): virtual switch responsible for forwarding data packets, including DNS requests and responses.

[0083] (2) Geneve: A network encapsulation protocol used to create an overlay network between computing nodes to isolate tenant networks.

[0084] (3) OVN-Controller: The local SDN controller first attempts to resolve the DNS request in the OVN northbound database. If no corresponding record is found, the request is forwarded to Designate for processing.

[0085] (4) logical tenant: logical tenant network, providing an independent network environment for each VPC tenant.

[0086] (5) dns-server: An instance of the DNS service in the logical tenant network, responsible for processing DNS requests and providing responses.

[0087] (6) VM (Virtual Machine): The tenant's virtual machine initiates a DNS request to the OVN-Controller and receives a DNS response.

[0088] 4. External network: refers to the network environment outside the cloud platform, including other DNS servers, which are used to provide auxiliary DNS resolution services when the DNS records within the cloud platform are not found.

[0089] The specific implementation process is as follows:

[0090] 1. Optimize the DNS resolution module in ovn-controller and add other types based on the existing A, AAAA, and PTR types.

[0091] 2. Implement DNS domains and record sets. You can isolate the DNS resolution of a VPC or subnet by adding a DNS domain to it and binding a record set.

[0092] 3. Users operate the existing public DNS domain and the newly added private domain, and implement DNS isolation technology through the functions of adding, modifying, and deleting record sets and adding, modifying, and deleting records within record sets, ensuring technical alignment with the previous DNS resolution service.

[0093] This module optimizes and improves the DNS resolution module in ovn-controller. Except for the case where the domain name mapping IP address is correctly found, DNS request packets are sent back to the flow table for further query processing. It also adds record types, DNS domains, and record sets, aligning with the DNS service technology provided by Designate. Tenants can freely configure their own DNS records within a VPC without affecting other VPC tenants. This addresses the problem of traditional domain name resolution algorithms being unable to achieve the simultaneous requirements of domain isolation for user-level VPC users while maintaining a large number of records.

[0094] In another optional embodiment, the present application provides a specific process implementation method for tenant-level DNS service isolation based on OVN domain name resolution algorithm optimization, such as Figure 4 As shown, the following steps are included:

[0095] S401: The tenant VM sends a DNS request to the local OVN-Controller.

[0096] S402: The OVN-Controller first attempts to find the corresponding record in the DNS table of the OVN northbound database and perform tenant-level DNS resolution;

[0097] S403: If the record is found in the OVN northbound database, the OVN-Controller's dns-server directly provides a DNS response to the tenant virtual machine;

[0098] S404: If no record is found in the OVN northbound database, the request is encapsulated by Geneve, passed through the overlay network, and forwarded to Designate for further processing;

[0099] S405: Designate resolves the DNS request and provides the resolution result, or queries an external DNS server if no record is found;

[0100] S406: The DNS resolution result is finally returned to the OVN-Controller through the overlay network, and then sent by the OVN-Controller to the requesting tenant virtual machine.

[0101] Through the above embodiments, the OVN domain name resolution algorithm is optimized, and Designate and overlay network technologies are combined to achieve tenant-level DNS service isolation while ensuring the efficiency and integrity of DNS resolution services.

[0102] In this embodiment, a domain name resolution method data flow diagram is provided, such as Figure 5 Shown, including:

[0103] The target virtual machine 51 is configured to send a domain name resolution request and receive a resolution result, wherein the domain name resolution request is used to request that the carried domain name to be resolved be resolved into an IP address, and the resolution result includes a first resolution result and a second resolution result;

[0104] An open virtual network controller (OVN-Controller) 52 is connected to the target virtual machine 51 and the designated service module 53, and is used to receive and process a domain name resolution request sent by the target virtual machine to obtain a first resolution result; when the first resolution result indicates that the resolution failed, the domain name resolution request is forwarded to the designated service module to instruct the designated service module to process the domain name resolution request to obtain a second resolution result; the second resolution result returned by the designated service module is received, and when the second resolution result indicates that the resolution is successful, the first IP address carried by the second resolution result is sent to the target virtual machine.

[0105] a designated service module (designate) 53, connected to the open virtual network controller 52, for providing global domain name services;

[0106] The above scheme proposes a new domain name resolution method, including: first, when a domain name resolution request is received from a target virtual machine 51, the domain name resolution request is processed by the open virtual network controller 52 to obtain a first resolution result, wherein the domain name resolution request is used to request that the domain name to be resolved be resolved into an IP address, and the open virtual network controller 52 is used to provide tenant-level domain name services. Subsequently, when the first resolution result indicates that the resolution fails, the domain name resolution request is forwarded to the designated service module 53 to instruct the designated service module 53 to process the domain name resolution request to obtain a second resolution result, wherein the designated service module 53 is used to provide global domain name services. Finally, the open virtual network controller 52 receives the second resolution result returned by the designated service module 53, and when the second resolution result indicates that the resolution is successful, the first IP address carried by the second resolution result is sent to the target virtual machine 51.

[0107] By adopting the above solution, a domain name resolution service implemented by the designate module is provided to each VPC user in the network node. Therefore, before accessing the domain name resolution service implemented by the designate module, a DNS resolution is first completed in the flow table, which not only ensures tenant-level isolation, but also ensures the smooth response of the request; thereby solving the problem in related technologies that traditional domain name resolution algorithms cannot achieve user-level VPC users while meeting the requirements of mutual isolation of domain names and storing a large number of records.

[0108] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0109] In this embodiment, a device for executing read and write tasks is also provided. Figure 6 is a structural block diagram of a domain name resolution device according to an embodiment of the present application. Figure 6 As shown, the device includes:

[0110] a processing module 62 configured to, upon receiving a domain name resolution request sent by a target virtual machine, process the domain name resolution request through the open virtual network controller to obtain a first resolution result, wherein the domain name resolution request is used to request resolution of the carried domain name to be resolved into an IP address, and the open virtual network controller is used to provide tenant-level domain name services;

[0111] a forwarding module 64 configured to forward the domain name resolution request to a designated service module to instruct the designated service module to process the domain name resolution request and obtain a second resolution result if the first resolution result indicates resolution failure, wherein the designated service module is configured to provide global domain name services;

[0112] The sending module 66 is configured to receive the second parsing result returned by the designated service module, and when the second parsing result indicates that the parsing is successful, send the first IP address carried in the second parsing result to the target virtual machine.

[0113] The device receives a domain name resolution request from a target virtual machine, processes the domain name resolution request through the open virtual network controller to obtain a first resolution result, wherein the domain name resolution request is used to request that the carried domain name to be resolved be resolved into an IP address, and the open virtual network controller is used to provide tenant-level domain name services. If the first resolution result indicates that the resolution failed, the domain name resolution request is forwarded to a designated service module to instruct the designated service module to process the domain name resolution request to obtain a second resolution result, wherein the designated service module is used to provide global domain name services. The device receives the second resolution result returned by the designated service module, and if the second resolution result indicates that the resolution was successful, sends the first IP address carried in the second resolution result to the target virtual machine. The above scheme is used to provide a domain name resolution service implemented by the designate module for each VPC user in the network node, so that before accessing the domain name resolution service implemented by the designate module, a DNS resolution is first completed in the flow table, which ensures both tenant-level isolation and a smooth response to the request. This solves the problem in the related art that traditional domain name resolution algorithms cannot achieve user-level VPC users meeting the requirements of mutual domain name isolation and storing a large number of records.

[0114] Optionally, the above-mentioned processing module 62 is also used to obtain the domain name to be resolved carried by the domain name resolution request; match the domain name to be resolved in the first flow table stored in the open virtual network controller, wherein the first flow table includes multiple first flow table items, and the multiple first flow table items are all used to indicate the correspondence between the domain name and the IP address; if none of the multiple first flow table items successfully matches the domain name to be resolved, generate a first resolution result indicating that the resolution failed.

[0115] Optionally, the above-mentioned processing module 62 is also used to obtain the second IP address corresponding to the second flow table entry when the domain name to be resolved successfully matches the second flow table entry, and generate a first resolution result indicating successful resolution based on the second IP address, wherein the multiple first flow table entries include the second flow table entry; and send the second IP address to the target virtual machine.

[0116] Furthermore, the above-mentioned processing module 62 is also used to generate an IP address recommendation request based on the domain name to be resolved when the second resolution result indicates that the resolution failed, wherein the IP address recommendation request is used to request an IP address recommendation based on the domain name to be resolved; process the IP address recommendation request through the open virtual network controller to obtain a first recommendation result, and send the IP address recommendation request to the designated service module for processing to obtain a second recommendation result; determine a third IP address based on the first recommendation result and the second recommendation result, and send the third IP address to the target virtual machine.

[0117] Optionally, the above-mentioned processing module 62 is also used to calculate the similarity of the domain name to be resolved with the domain names corresponding to the multiple first flow table items, so as to obtain multiple first similarities, wherein the multiple first similarities correspond one-to-one to the multiple first flow table items; filter out multiple third flow table items from the multiple first flow table items, wherein the first similarities corresponding to the multiple third flow table items are greater than a preset threshold; determine the priority order of the multiple third flow table items; determine the fourth flow table item from the multiple third flow table items according to the priority order, and determine the first domain name and fourth IP address corresponding to the fourth flow table item, wherein the priority of the fourth flow table item is the highest among the multiple third flow table items; and generate the first recommendation result based on the first domain name and the fourth IP address.

[0118] Optionally, the above-mentioned processing module 62 is also used to resolve the second domain name and the fifth IP address from the second recommendation result; obtain the historical domain name resolution request of the target virtual machine; match the third domain name corresponding to the historical domain name resolution request with the first domain name and the second domain name respectively; determine the third IP address from the fourth IP address and the fifth IP address according to the matching result, and send the third IP address to the target virtual machine.

[0119] Optionally, the processing module 62 is further configured to update the rule of the first flow table to a target rule, wherein the target rule is configured to indicate that when the resolution of the domain name to be resolved fails, the domain name resolution request is forwarded to the designated service module.

[0120] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0121] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when run.

[0122] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as an i-disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0123] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0124] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0125] An embodiment of the present application further provides a computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program product, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.

[0126] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.

[0127] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0128] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included within the scope of protection of the present application.

Claims

1. A domain name resolution method, characterized in that: Applied to open virtual network controller, include: Upon receiving a domain name resolution request sent by a target virtual machine, the open virtual network controller processes the domain name resolution request to obtain a first resolution result, wherein the domain name resolution request is used to request that the carried domain name to be resolved be resolved into an IP address, and the open virtual network controller is used to provide tenant-level domain name services; if the first resolution result indicates that the resolution fails, the domain name resolution request is forwarded to a designated service module to instruct the designated service module to process the domain name resolution request to obtain a second resolution result, wherein the designated service module is used to provide global domain name services; The second resolution result returned by the designated service module is received, and when the second resolution result indicates that the resolution is successful, the first IP address carried in the second resolution result is sent to the target virtual machine.

2. The domain name resolution method according to claim 1, wherein: The processing of the domain name resolution request by the open virtual network controller to obtain a first resolution result includes: Obtaining the domain name to be resolved carried in the domain name resolution request; Matching the domain name to be resolved in a first flow table stored in the open virtual network controller, wherein the first flow table includes a plurality of first flow table entries, each of the plurality of first flow table entries being used to indicate a correspondence between a domain name and an IP address; In a case where none of the multiple first flow table entries successfully matches the domain name to be resolved, a first resolution result indicating resolution failure is generated.

3. The domain name resolution method according to claim 2, wherein: After matching the domain name to be resolved in the first flow table stored in the open virtual network controller, the method further includes: If the domain name to be resolved successfully matches the second flow table entry, obtaining a second IP address corresponding to the second flow table entry, and generating a first resolution result indicating successful resolution based on the second IP address, wherein the plurality of first flow table entries include the second flow table entry; Send the second IP address to the target virtual machine.

4. The domain name resolution method according to claim 2, wherein: After receiving the second parsing result returned by the designated service module, the method further includes: If the second resolution result indicates that the resolution has failed, generating an IP address recommendation request according to the domain name to be resolved, wherein the IP address recommendation request is used to request an IP address recommendation based on the domain name to be resolved; Processing the IP address recommendation request through the open virtual network controller to obtain a first recommendation result, and sending the IP address recommendation request to the designated service module for processing to obtain a second recommendation result; A third IP address is determined according to the first recommendation result and the second recommendation result, and the third IP address is sent to the target virtual machine.

5. The domain name resolution method according to claim 4, characterized in that: The step of processing the IP address recommendation request by the open virtual network controller to obtain a first recommendation result includes: Calculating similarities between the domain name to be resolved and the domain names corresponding to the multiple first flow table entries to obtain multiple first similarities, wherein the multiple first similarities correspond one-to-one to the multiple first flow table entries; Filtering out a plurality of third flow table entries from the plurality of first flow table entries, wherein the first similarities corresponding to the plurality of third flow table entries are greater than a preset threshold; determining a priority order of the plurality of third flow table entries; Determining a fourth flow table entry from the plurality of third flow table entries according to the priority order, and determining a first domain name and a fourth IP address corresponding to the fourth flow table entry, wherein the priority of the fourth flow table entry is the highest among the plurality of third flow table entries; The first recommendation result is generated according to the first domain name and the fourth IP address.

6. The domain name resolution method according to claim 5, characterized in that: The determining a third IP address according to the first recommendation result and the second recommendation result, and sending the third IP address to the target virtual machine, includes: Resolving a second domain name and a fifth IP address from the second recommendation result; Obtaining historical domain name resolution requests of the target virtual machine; Matching the first domain name and the second domain name respectively according to the third domain name corresponding to the historical domain name resolution request; The third IP address is determined from the fourth IP address and the fifth IP address according to the matching result, and the third IP address is sent to the target virtual machine.

7. The domain name resolution method according to claim 2, wherein: Before the open virtual network controller processes the domain name resolution request to obtain a first resolution result, the method further includes: The rule of the first flow table is updated to a target rule, wherein the target rule is used to indicate that when the resolution of the domain name to be resolved fails, the domain name resolution request is forwarded to the designated service module.

8. A domain name resolution device, characterized in that: include: a processing module configured to, upon receiving a domain name resolution request sent by a target virtual machine, process the domain name resolution request through an open virtual network controller to obtain a first resolution result, wherein the domain name resolution request is used to request that the carried domain name to be resolved be resolved into an IP address, and the open virtual network controller is used to provide tenant-level domain name services; and a forwarding module configured to, if the first resolution result indicates a resolution failure, forward the domain name resolution request to a designated service module to instruct the designated service module to process the domain name resolution request to obtain a second resolution result, wherein the designated service module is used to provide global domain name services; The sending module is configured to receive the second parsing result returned by the designated service module, and when the second parsing result indicates that the parsing is successful, send the first IP address carried in the second parsing result to the target virtual machine.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.