Method, apparatus and system for profiling local DNS used for cdn

By extracting the address relationship between the client and the local DNS during the authoritative DNS resolution process, the problem that the authoritative DNS cannot obtain the corresponding relationship between the local DNS and the client is solved, an efficient local DNS portrait is achieved, and the scheduling accuracy and resource utilization of the CDN system are improved.

WO2025195087A1PCT designated stage Publication Date: 2025-09-25BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/077784
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-21
Filing Date
2025-02-18
Publication Date
2025-09-25

AI Technical Summary

Technical Problem

In the existing technology, it is difficult for authoritative DNS to obtain the correspondence between local DNS and clients, resulting in scheduling inaccuracies and resource waste. In addition, the existing method requires separate deployment of HTTP services and aggregation of HTTP logs and DNS logs, which makes the processing process complicated and error-prone.

Method used

By obtaining the target domain name resolution request of the synthetic domain name and the local DNS during the authoritative DNS resolution process, the client address and the local DNS address are directly extracted, their correspondence is established, and the DNS log is used for analysis to avoid cross-collection of HTTP logs and reuse the HTTP service of the CDN system.

Benefits of technology

It achieves accurate profiling of local DNS, improves the accuracy and efficiency of request scheduling, reduces resource waste, and improves the performance of the CDN system and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025077784_25092025_PF_FP_ABST
    Figure CN2025077784_25092025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of content delivery networks (CDNs). Disclosed are a method, apparatus and system for profiling a local DNS used for a CDN. The method for profiling a local DNS used for a CDN comprises: acquiring a target domain name resolution request sent by a local DNS, wherein the target domain name resolution request comprises a synthetic domain name and the address of the local DNS, the synthetic domain name being sent by a client to the local DNS, and the synthetic domain name comprising the address of the client; resolving the target domain name resolution request, so as to obtain the address of the client and the address of the local DNS; and using the address of the client and the address of the local DNS to construct a correspondence between the local DNS and the client.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and system for profiling local DNS for CDN

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application number 202410330048.2, filed on March 21, 2024, entitled “Method, device and system for profiling local DNS for CDN”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present disclosure relates to the technical field of content distribution networks, and in particular to a method, device, and system for profiling a local DNS for a CDN. Background Art

[0004] CDN (Content Delivery Network) scheduling involves routing client requests to appropriate servers using pre-defined policies to achieve technical goals such as reducing costs, improving availability, and accelerating response times. DNS (Domain Name System)-based scheduling is a common method used in CDN systems, offering advantages such as ease of use, high efficiency, flexibility, reliability, stability, and low cost. Summary of the Invention

[0005] In view of this, the present disclosure provides a method, device and system for CDN to profile the local DNS, so as to solve the problem in the related art that the authoritative DNS has difficulty in obtaining the corresponding relationship between the local DNS and the client.

[0006] In a first aspect, the present disclosure provides a method for CDN to profile a local DNS, the method comprising:

[0007] Obtaining a target domain name resolution request sent by the local DNS, the target domain name resolution request including a synthesized domain name and an address of the local DNS, the synthesized domain name being sent by the client to the local DNS; wherein the synthesized domain name includes the address of the client;

[0008] Resolve the target domain name resolution request to obtain the client's address and the local DNS address;

[0009] The client's address and the local DNS address are used to establish a corresponding relationship between the local DNS and the client.

[0010] In a second aspect, the present disclosure provides a device for CDN to profile a local DNS, the device comprising:

[0011] An acquisition module is used to obtain a target domain name resolution request sent by a local DNS, the target domain name resolution request including a synthesized domain name and an address of the local DNS, the synthesized domain name being sent by the client to the local DNS; wherein the synthesized domain name includes the address of the client;

[0012] The resolution module is used to resolve the target domain name resolution request to obtain the client address and the local DNS address;

[0013] Create a module for building a correspondence between the local DNS and the client using the client's address and the address of the local DNS.

[0014] In a third aspect, the present disclosure provides a system for CDN to profile local DNS, the system comprising:

[0015] The client is used to send a synthesized domain name to the local DNS, which includes the client's address;

[0016] The local DNS is used to send the target domain name resolution request to the authoritative DNS. The target domain name resolution request includes the synthesized domain name and the address of the local DNS.

[0017] The above-mentioned authoritative DNS is used to receive the target domain name resolution request and to resolve the target domain name resolution request to obtain the client's address and the address of the local DNS; the above-mentioned authoritative DNS is also used to use the client's address and the address of the local DNS to establish a corresponding relationship between the local DNS and the client.

[0018] In a fourth aspect, the present disclosure provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to execute the method for profiling the local DNS for CDN according to the first aspect or any corresponding embodiment thereof.

[0019] In a fifth 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 method for profiling the local DNS for CDN according to the above-mentioned first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. 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.

[0021] FIG1 is a flow chart of a method for profiling a local DNS for a CDN according to an embodiment of the present disclosure;

[0022] FIG2 is a flow chart of another method for CDN to profile a local DNS according to an embodiment of the present disclosure;

[0023] FIG3 is a schematic diagram of a system structure for CDN to profile local DNS according to an embodiment of the present disclosure;

[0024] FIG4 is a schematic diagram of the interaction principle between a client and a scheduling server according to an embodiment of the present disclosure;

[0025] FIG5 is a flow chart of another method for CDN to profile local DNS according to an embodiment of the present disclosure;

[0026] FIG6 is a schematic diagram of an implementation principle of determining a geographical area for a local DNS service according to an embodiment of the present disclosure;

[0027] FIG7 is a structural block diagram of an apparatus for CDN to profile a local DNS according to an embodiment of the present disclosure;

[0028] FIG8 is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions 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, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present disclosure.

[0030] In the CDN system, the client on the user side is connected to the local DNS (Local DNS, LDNS for short) of the local operator, and the client generally cannot interact directly with the authoritative DNS. The adjustment of the scheduling strategy under the CDN system is generally performed on the authoritative DNS. Although the local DNS can communicate with the authoritative DNS, the authoritative DNS can only obtain the address of the local DNS. The address of the client in the related technology is often opaque to the authoritative DNS. The authoritative DNS cannot know the correspondence between the local DNS and the client's address. Therefore, it is difficult for the related technology to implement client-level request scheduling, and scheduling at the local DNS level is prone to problems such as poor scheduling effect or even scheduling errors. Therefore, how to enable the authoritative DNS to obtain the correspondence between the local DNS and the client has become the focus of research for those skilled in the art.

[0031] DNS-based request scheduling is a common scheduling method used in CDN systems. However, typical scheduling adjustments are made to the authoritative DNS. However, the address of the client connected to the local DNS is not transmitted to the authoritative DNS. In other words, the client address is not transparent to the authoritative DNS, so the authoritative DNS cannot schedule the client, which leads to scheduling inaccuracies. Moreover, authoritative DNS generally only supports the line level of provincial operators. This scheduling granularity requires further diversion in high-traffic scenarios, affecting scheduling efficiency. The line identification of the authoritative DNS depends on the client's address home line. In related technologies, the address exposed to the authoritative DNS is the local DNS's egress address, which is prone to request scheduling errors caused by inaccurate address identification results. To improve the accuracy of request scheduling, the inventors believe that a random domain name approach can be adopted. This approach includes: the client generates a random domain name and requests the authoritative DNS to resolve the random domain name, thereby transparently transmitting the random domain name to the authoritative DNS through the local DNS. The authoritative DNS then obtains the local DNS address of the DNS request and responds with an IP (Internet Protocol) address based on the user's configuration. The client then accesses the HTTP server corresponding to the IP address, thereby generating an HTTP (Hypertext Transfer Protocol) log. The client IP address corresponding to this log is the actual client IP address. By finding the logs of the same random domain name on the DNS server and HTTP server, the correspondence between the local DNS and the client IP address can be mapped. However, this approach requires the deployment of a dedicated WEB (World Wide Web) service to receive and respond to HTTP requests for random domain names, thereby obtaining HTTP server logs for recording the client IP address. In addition, this approach requires the combined analysis of HTTP logs and DNS logs to obtain a local DNS profile and map the correspondence between the local DNS and the client's address. Therefore, the above method has the problem of resource waste caused by the need to deploy HTTP services separately, and the need to aggregate and analyze HTTP logs and DNS logs, which leads to problems such as complex processing, prone to errors and resource waste.

[0032] According to an embodiment of the present disclosure, an embodiment of a method for profiling a local DNS for a CDN is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0033] The authoritative DNS of the present invention obtains the address of the client and the address of the local DNS during the resolution process of the target domain name resolution request containing the synthetic domain name and the local DNS. There is no need to set up a separate communication process to achieve the transparent transmission of the client address to the authoritative DNS. By reusing the process of the authoritative DNS to resolve the domain name resolution request, the authoritative DNS can accurately and conveniently determine the correspondence between the local DNS and the client's address, that is, realize the function of profiling the local DNS. Based on the determination of the mapping relationship between the local DNS and the client, the present invention can schedule the requests issued by the client at the client granularity, thereby improving the accuracy of the request scheduling and improving the effect of the request scheduling. Compared with the related art, the method for profiling the local DNS for CDN provided by the present invention has the advantages of simplicity, ease of use, and low cost. Therefore, when request scheduling is performed based on DNS in the CDN system, the present disclosure enables the CDN system to understand which clients the local DNS provides DNS services for by profiling the local DNS, and on this basis, enables the CDN system to obtain information such as the client's network operator, geographical location, device type, etc. It can be seen that the solution of profiling the local DNS provided by the present disclosure can meet the requirements of the CDN system to provide clients with more accurate and efficient content distribution services, and can achieve better load balancing of the CDN system, greatly improving the performance of the CDN system, improving the efficiency of content transmission, and providing a better user experience.

[0034] In this embodiment, a method for profiling a local DNS for a CDN is provided, and can be specifically used for the above-mentioned authoritative DNS. FIG1 is a flow chart of the method for profiling a local DNS for a CDN according to an embodiment of the present disclosure. As shown in FIG1 , the process includes the following steps:

[0035] Step S101: Obtain a target domain name resolution request sent by a local DNS. The target domain name resolution request includes a composite domain name and an address of the local DNS. The composite domain name is sent by the client to the local DNS. The composite domain name includes the address of the client.

[0036] In this embodiment, the client communicates with the local DNS, the local DNS communicates with the authoritative DNS, and the authoritative DNS obtains the target domain name resolution request sent by the local DNS.

[0037] Specifically, the client sends a resolution request for the composite domain name to the local DNS, which encapsulates the resolution request for the composite domain name into a target domain name resolution request and sends it to the authoritative DNS. In this embodiment, the client address is specifically the client IP (Internet Protocol).

[0038] It should be understood that the "DNS" involved in this disclosure refers to the Domain Name System, which is literally translated into Chinese as the domain name system. For example, in each embodiment of this disclosure, the local DNS specifically refers to the local domain name system, and the authoritative DNS specifically refers to the authoritative domain name system.

[0039] Step S102: parse the target domain name resolution request to obtain the client's address and the local DNS address.

[0040] The client of the disclosed embodiment can agree on a resolution format with the authoritative DNS, which can then perform targeted resolution on the target domain name resolution request, thereby extracting the client's address and the address of the local DNS. Therefore, the resolution process of the target domain name resolution request in this embodiment is not a conventional resolution of a specified configured domain name, but rather extracts the result to be resolved from the target domain name resolution request. In other words, this embodiment can directly obtain the resolution result from the target domain name resolution request.

[0041] Step S103: construct a correspondence between the local DNS and the client using the client's address and the address of the local DNS.

[0042] Specifically, a local DNS often serves multiple clients. The correspondence between the local DNS and the clients constructed in this embodiment may be, for example, a correspondence between a local DNS and the multiple clients it serves.

[0043] In some optional implementations, step S103 may include but is not limited to step S1031 and step S1032.

[0044] Step S1031: Store the client address and the local DNS address in the DNS log.

[0045] Specifically, the authoritative DNS can store the client IP and the address of the local DNS in the DNS log. In the same DNS log, the embodiment of the present disclosure uses the value of the first preset field (client_ip) to represent the address of the local DNS. The value of the first preset field can be, for example, 36.155.10.69, and uses a part of the value of the second preset field (ds_req_target_domain) to represent the client's address and redirection address. The value of the second preset field is, for example, 112.23.108.8-211-137-95-102.veg. Of course, other information related to DNS resolution is recorded in the DNS log, which will not be repeated in this embodiment.

[0046] Step S1032: Analyze the DNS log to obtain the corresponding relationship between the local DNS and the client.

[0047] In the example above, the local DNS server corresponding to 36.155.10.69 is used to provide services to the client corresponding to 112.23.108.8, thus establishing the relationship between the local DNS server and the clients it serves. Therefore, by analyzing a large number of DNS logs, it is possible to identify all the clients that each local DNS server specifically serves.

[0048] The process of analyzing the DNS log in this embodiment includes the process of parsing the client IP and the address of the local DNS from the DNS log, and the process of establishing a corresponding relationship between the local DNS and the client.

[0049] It should be understood that the process of profiling the local DNS provided in the embodiment of the present disclosure specifically refers to the process of determining the correspondence between the local DNS and the client, that is, the process of determining which clients any local DNS provides services for, thereby providing a better basis for scheduling the client's requests.

[0050] Compared with the aforementioned aggregation analysis method, this embodiment only needs to analyze the DNS logs, avoiding the problem of cross-collection of HTTP logs and DNS logs, and thus avoiding the problem of inaccurate local DNS portraits that may be easily caused by analyzing the two logs. This embodiment concentrates the log information required for profiling the local DNS on the DNS logs, and at the same time reuses some HTTP services in the CND system. There is no need to rearrange a set of HTTP services for the local DNS profiling function, which reduces resource waste and improves the utilization rate of existing CND resources.

[0051] The authoritative DNS provided by the embodiment of the present disclosure obtains the client's address and the local DNS's address during the resolution process of the target domain name resolution request containing the synthetic domain name and the local DNS. There is no need to set up a separate communication process to achieve the transparent transmission of the client's address to the authoritative DNS. By reusing the process of resolving the domain name resolution request by the authoritative DNS, the authoritative DNS can accurately and conveniently determine the correspondence between the local DNS and the client's address, that is, it realizes the function of profiling the local DNS. Based on the determination of the mapping relationship between the local DNS and the client, the present disclosure can schedule the requests issued by the client at the client granularity, thereby improving the accuracy of the request scheduling and enhancing the effect of the request scheduling. Compared with the related art, the method for profiling the local DNS for CDN provided by the present disclosure has the advantages of simplicity, ease of use, and low cost. Based on the solution of profiling the local DNS provided by the present disclosure, in the process of request scheduling based on DNS in the CDN system, the present disclosure enables the CDN system to understand which clients the local DNS provides DNS services for by profiling the local DNS, and on this basis, the CDN system can specifically obtain information such as the client's network operator, geographical location, device type, etc. It can be seen that the application of the solution of profiling the local DNS provided by the present disclosure can meet the requirements of the CDN system to provide clients with more accurate and efficient content distribution services, and can achieve better load balancing of the CDN system, thereby improving the stability and availability of the CDN system, greatly improving the performance of the CDN system, improving the efficiency of content transmission, and providing a better user experience.

[0052] In this embodiment, a method for profiling a local DNS for a CDN is provided, and can be specifically used for the above-mentioned authoritative DNS. FIG2 is a flow chart of the method for profiling a local DNS for a CDN according to an embodiment of the present disclosure. As shown in FIG2 , the process includes the following steps:

[0053] Step S201: Obtain a target domain name resolution request sent by a local DNS. The target domain name resolution request includes a composite domain name and an address of the local DNS. The composite domain name is sent by the client to the local DNS. The composite domain name includes the address of the client.

[0054] In this embodiment, the synthetic domain name also includes a redirection address. It can be seen that the synthetic domain name provided in this embodiment is a synthetic record, which includes the client address and the redirection address. For example, the synthetic record is formed based on the combination of the client address and the redirection address.

[0055] In combination with Figure 3, in some optional implementations, before obtaining the target domain name resolution request sent by the local DNS, the method also includes: the client is used to send a network request including the client's address to the scheduling server in the CDN edge node; the scheduling server is used to create a synthetic domain name and to send the synthetic domain name to the client to respond to the network request.

[0056] Among them, after the client receives the synthetic domain name responded by the scheduling server, it requests the local DNS to resolve the redirected domain name, that is, the client sends the synthetic domain name to the local DNS; after the local DNS receives the synthetic domain name, it sends the target domain name resolution request containing the synthetic domain name to the authoritative DNS.

[0057] Specifically, the redirection target IP (i.e., the redirection address) is generally set according to configuration rules, and the dispatch server provides a service that can directly redirect to the target IP. For security reasons, the redirection function provided by the dispatch server in this embodiment is an HTTPS (Hypertext Transfer Protocol Secure) service. HTTPS requires a certificate, and applying for a certificate is generally complex and results in a large number of certificates. Therefore, compared to the method of configuring the resolution of the redirection target IP on the DNS server, which results in a large number of resolution records and consumes a lot of resources, the method of reusing the CDN 302 service in this embodiment greatly saves resources.

[0058] As shown in FIG. 4 , in some optional implementations, the scheduling server is configured to create a composite domain name based on encoding the client address and the redirection address.

[0059] In this embodiment, the process of encoding the client address and redirection address may include combining the client address and redirection address in a predetermined manner. In some implementations, the client address and redirection address may be adjusted according to a specified policy before being combined. Therefore, by encoding the client address and redirection address to obtain a composite domain name, this embodiment can reduce the difficulty of authoritative DNS resolution and significantly improve the accuracy and efficiency of request resolution.

[0060] Specifically, the scheduling server is used to replace the first preset character in the client's address with the second preset character, and to replace the third preset character in the redirect address with the fourth preset character; the scheduling server is used to encode the client's address set with the second preset character and the redirect address set with the fourth preset character into a synthetic domain name.

[0061] As shown in Figure 4, the client address is, for example, the client IP (1.1.1.1), the redirect address is, for example, the address IP (2.2.2.2), the first preset character is, for example, ".", the second preset character is, for example, "_", the third preset character is, for example, ".", and the fourth preset character is, for example, "-". In this embodiment, the "." in the client address is replaced with "_" to obtain 1_1_1_1, and the "." in the redirect address is replaced with "-" to obtain 2-2-2-2.

[0062] In this embodiment, the method of changing the first preset character in the client's address and the third preset character in the redirect address helps to better distinguish the client's address and the redirect address in the composite domain name, thereby reducing the difficulty of authoritative DNS in resolving the composite domain name and improving the accuracy of the resolution results.

[0063] More specifically, the scheduling server is used to encode the client address with the second preset characters, the redirection address with the fourth preset characters and the preset characters in a preset order as a prefix of the composite domain name, and configure a suffix for the prefix to obtain the composite domain name.

[0064] In this embodiment, the client address set with the second preset characters in the composite domain name and the redirection address set with the fourth preset characters can be connected through the fourth preset characters.

[0065] Among them, the preset order can be, for example, the client address, the redirect address, and the preset characters, the preset characters can be, for example, ".byte", and the suffix can be, for example, ".com". Combined with the foregoing embodiment, the synthetic domain name of this embodiment can be expressed as, for example, 1_1_1_1-2-2-2-2.byte.com.

[0066] In some specific implementations, the scheduling server in this embodiment is a server used for 302 redirection.

[0067] The "302 redirect" involved in this embodiment is a temporary redirection method. When the scheduling server receives a request, if it finds that the currently requested resource has been temporarily moved to another URL (Uniform Resource Locator) address, the scheduling server will return a 302 status code and include the new URL address in the header of the response message. After receiving the 302 response, the client will re-initiate the request based on the new URL address in the response, thereby redirecting the request to another location by returning a 302 status code and a new URL address (i.e., the redirection address). Generally, "302 redirection" can be mainly used in scenarios such as website maintenance, website redirection, and temporary resource movement to ensure that users can successfully access the correct resources.

[0068] As shown in Figure 3, CDN 302 represents a dispatch server, i.e., a server for 302 redirection. In this embodiment, the present disclosure performs 302 dispatch on requests from Client 1, Client 2, ..., Client n (n clients, where n can be an integer ≥ 2), and generates a composite domain name. The composite domain name in this embodiment is specifically a second-level domain name, which is used to redirect the client's request domain name. In the CDN scenario of this disclosure, this embodiment can reuse the online CDN 302 dispatch service to redirect some domain names, greatly improving the utilization of CDN resources.

[0069] As shown in Figure 4, the client (IP address is 1.1.1.1) can send an HTTP request (specifically, an HTTPS request) to the server used for 302 redirection, and obtain a response from the server used for 302 redirection, specifically a synthetic domain name (for example, 1_1_1_1-2-2-2-2.byte.com). After the server used for 302 redirection obtains the client IP address (1.1.1.1), it combines it with the IP address 2.2.2.2 of the target server to be redirected to generate the above-mentioned synthetic domain name 1_1_1_1-2-2-2-2.byte.com.

[0070] This embodiment can utilize the server used for 302 redirection in the existing CDN resources to achieve the purpose of profiling the local DNS based on the 302 scheduling method, reducing or even avoiding the problem of resource waste; and this solution only requires analysis of the DNS log, and the processing process is simpler, easier to use and more reliable.

[0071] The process of resolving the target domain name resolution request in this embodiment may include but is not limited to the following step S202.

[0072] Step S202: parse the target domain name resolution request to obtain the client address, the local DNS address, and the redirection address.

[0073] Specifically, the authoritative DNS of this embodiment can directly extract the client's address, the local DNS address and the redirect address from the target domain name resolution request, so the authoritative DNS can obtain the client IP and the requested domain name (that is, the address of the local DNS) by resolving the target domain name resolution request.

[0074] Compared with the conventional resolution method for a specified configured domain name, this embodiment can directly extract the client address, the local DNS address, and the redirect address from the request according to the resolution rules, and the efficiency and accuracy of the request resolution are higher.

[0075] In some specific embodiments, parsing the target domain name resolution request includes: restoring the second preset characters in the composite domain name to the first preset characters, and extracting the client address from the composite domain name; and / or restoring the fourth preset characters in the composite domain name to the third preset characters, and extracting the redirect address from the composite domain name.

[0076] In this embodiment, resolution specifications are configured on the authoritative DNS. The resolution rules include: restoring the second preset character in the composite domain name to the first preset character and restoring the fourth preset character in the composite domain name to the third preset character. The resolution rules also include using the first to fourth preset characters in the composite domain name as separators. The separators are used to separate the client address from the redirection address, thereby resolving the composite domain name more efficiently and accurately.

[0077] For example, for the synthetic domain name 1_1_1_1-2-2-2-2.byte.com, the second preset character "_" is restored to the first preset character ".", and the fourth preset character "-" is restored to the third preset character ".", so that the client address (1.1.1.1) and redirect address (2.2.2.2) can be obtained from the synthetic domain name.

[0078] Based on the above-mentioned character restoration method, this embodiment can more accurately and efficiently extract the client address and redirect address from the synthesized domain name, thereby reducing the resource usage of the authoritative DNS during the resolution process of the target domain name resolution request.

[0079] Step S203: forwarding the redirection address to the client via the local DNS. The client is used to access the target server according to the redirection address, where the redirection address is the network address of the target server.

[0080] For example, the authoritative DNS redirects the client's request to the target server with the address 2.2.2.2, completing a complete CDN 302 redirection scheduling process.

[0081] Step S204: Use the client's address and the address of the local DNS to build a correspondence between the local DNS and the client. For details, please refer to step S103 of the embodiment shown in Figure 1, which will not be repeated here.

[0082] In this embodiment, a method for profiling a local DNS for a CDN is provided, and can be specifically used for the above-mentioned authoritative DNS. FIG5 is a flow chart of the method for profiling a local DNS for a CDN according to an embodiment of the present disclosure. As shown in FIG5 , the process includes the following steps:

[0083] Step S501: Obtain a target domain name resolution request sent by the local DNS. The target domain name resolution request includes a composite domain name and the address of the local DNS. The composite domain name is sent by the client to the local DNS; the composite domain name includes the client's address. For details, see step S102 of the embodiment shown in FIG1 , and will not be repeated here.

[0084] Step S502: parse the target domain name resolution request to obtain the client's address and the local DNS address. For details, please refer to step S102 of the embodiment shown in FIG1 , which will not be described in detail here.

[0085] Step S503: construct a correspondence between the local DNS and the client using the client's address and the address of the local DNS.

[0086] Specifically, the above step S503 includes: using the addresses of the multiple clients and the address of the local DNS to determine the mapping relationship between the local DNS and the multiple clients, and the local DNS is used to provide DNS services for the multiple clients.

[0087] In some specific implementations, multiple clients that have a mapping relationship with any local DNS may be all clients of the local DNS service, thereby being able to determine all clients of any local DNS service in the CND scenario. It can be seen that this embodiment can specifically provide a method for local DNS profiling based on DNS synthetic records applied in the CDN scenario. This embodiment provides a scheduling basis for client request scheduling through local DNS profiling, making the scheduling granularity finer, which helps to significantly improve the accuracy of scheduling.

[0088] As shown in FIG6 , in some optional implementations, the method for CDN to profile the local DNS may further include step S504 and step S505.

[0089] Step S504: determining the geographical locations to which the addresses of the multiple clients corresponding to the local DNS belong.

[0090] Specifically, this embodiment can analyze the geographical location of each client of any local DNS service, that is, determine the location of all clients of any local DNS service. In the CDN scenario, this embodiment analyzes the local DNS of the entire network to determine the location of the clients of each local DNS service.

[0091] In the CDN scenario, this embodiment shows authoritative DNS11, authoritative DNS12, and authoritative DNS13 in Figure 6. Local DNS01 communicates with authoritative DNS11, local DNS02 communicates with authoritative DNS12, and local DNS03 communicates with authoritative DNS13. Combined with the aforementioned embodiments, the disclosed embodiments can determine the geographical locations to which the addresses of multiple clients corresponding to each local DNS belong. For example, authoritative DNS11 can obtain the location of the client corresponding to local DNS01, authoritative DNS12 can obtain the location of the client corresponding to local DNS02, and authoritative DNS13 can obtain the location of the client corresponding to local DNS03.

[0092] Step S505: determining the geographical area of ​​the local DNS service according to the geographical location.

[0093] For any local DNS, this embodiment determines the geographical locations of all clients served by the local DNS, and then divides the geographical area of ​​the local DNS service according to the locations of all clients served by the local DNS.

[0094] For example, in combination with the example in Figure 6, authoritative DNS11 can know that the geographical area served by local DNS01 is region one, authoritative DNS12 can know that the geographical area served by local DNS02 is also region one, and authoritative DNS13 can know that the geographical area served by local DNS03 is region two.

[0095] The disclosed embodiment enables the authoritative DNS to understand the region and client IP segment of each local DNS service. During the request scheduling process, by scheduling at the granularity of client IP and client location, more precise scheduling of client requests can be achieved, further improving the accuracy of scheduling.

[0096] In summary, the entire local DNS profiling architecture disclosed in the present invention is implemented on the basis of CDN 302 scheduling, without destroying the entire large process of the original CDN 302 scheduling, and without adding new request links. In the solution disclosed in the present invention for profiling local DNS for CDN, the entire DNS scheduling system and the entire CDN system do not require additional physical resource consumption, and are all completed on the existing infrastructure, which greatly improves resource utilization. Based on the solution provided in the present invention, the DNS log can be directly analyzed to obtain the local DNS profile, thereby providing a more fine-grained scheduling basis for the request scheduling process.

[0097] This embodiment also provides a device for CDN to profile local DNS. This device is used to implement the above-mentioned embodiments and preferred implementations, and the details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0098] This embodiment provides an apparatus for CDN to profile local DNS, as shown in FIG7 , including:

[0099] The acquisition module 701 is used to obtain a target domain name resolution request sent by the local DNS. The target domain name resolution request includes a composite domain name and the address of the local DNS. The composite domain name is sent by the client to the local DNS. The composite domain name includes the address of the client.

[0100] The resolution module 702 is configured to resolve the target domain name resolution request to obtain the client's address and the local DNS address.

[0101] The creation module 703 is used to build a corresponding relationship between the local DNS and the client using the client's address and the address of the local DNS.

[0102] In some optional implementations, the composite domain name also includes a redirection address.

[0103] The resolution module 702 is specifically configured to resolve the client address, the local DNS address, and the redirection address from the target domain name resolution request.

[0104] The resolution module 702 is further configured to forward the redirection address to the client via the local DNS. The client is configured to access the target server according to the redirection address, which is the network address of the target server.

[0105] In some optional embodiments, before the authoritative DNS obtains the target domain name resolution request sent by the local DNS, the client is used to send a network request including the client's address to the scheduling server in the CDN edge node, and the scheduling server is used to create a synthetic domain name and send the synthetic domain name to the client to respond to the network request.

[0106] In some optional implementations, the dispatch server is configured to create a composite domain name based on encoding the client's address and the redirection address.

[0107] In some optional embodiments, the scheduling server is used to replace the first preset character in the client's address with the second preset character, and to replace the third preset character in the redirect address with the fourth preset character; the scheduling server is also used to encode the client's address set with the second preset character and the redirect address set with the fourth preset character into a composite domain name.

[0108] In some optional embodiments, the scheduling server is used to encode the address of the client set with the second preset characters, the redirection address set with the fourth preset characters and the preset characters in a preset order as a prefix of the composite domain name, and configure a suffix for the prefix to obtain the composite domain name.

[0109] In some optional implementations, the dispatch server is a server for 302 redirection.

[0110] In some optional implementations, the parsing module 702 includes:

[0111] The first parsing unit is configured to restore the second preset characters in the composite domain name to the first preset characters, and extract the client address from the composite domain name.

[0112] The second parsing unit is configured to restore the fourth preset character in the composite domain name to the third preset character, and extract the redirection address from the composite domain name.

[0113] In some optional implementations, the creation module 703 includes:

[0114] The storage control unit is used to store the client address and the local DNS address in the DNS log.

[0115] The log analysis unit is used to analyze the DNS log to obtain the corresponding relationship between the local DNS and the client.

[0116] In some optional implementations, there are multiple clients.

[0117] The creation module 703 is specifically used to determine the mapping relationship between the local DNS and the multiple clients using the addresses of the multiple clients and the address of the local DNS. The local DNS is used to provide DNS services for the multiple clients.

[0118] In some optional implementations, the apparatus for CDN to profile the local DNS may further include:

[0119] The location determination unit is used to determine the geographical locations to which the addresses of multiple clients corresponding to the local DNS belong.

[0120] The region determination unit is configured to determine a geographical region of a local DNS service according to a geographical location.

[0121] This embodiment provides a system for CDN to profile local DNS, as shown in FIG3 , including:

[0122] The client is used to send a synthesized domain name to the local DNS, which includes the client's address;

[0123] The local DNS is used to send the target domain name resolution request to the authoritative DNS. The target domain name resolution request includes the synthesized domain name and the address of the local DNS.

[0124] The above-mentioned authoritative DNS is used to receive the target domain name resolution request and to resolve the target domain name resolution request to obtain the client's address and the address of the local DNS;

[0125] The above-mentioned authoritative DNS is also used to build a corresponding relationship between the local DNS and the client using the client's address and the address of the local DNS.

[0126] In some optional implementations, the composite domain name also includes a redirection address.

[0127] The above-mentioned authoritative DNS is also used to resolve the client's address, the local DNS address, and the redirection address from the target domain name resolution request.

[0128] The above-mentioned authoritative DNS is also used to forward the redirection address to the client through the local DNS. The client is used to access the target server according to the redirection address. The redirection address is the network address of the target server.

[0129] In some optional implementations, before the authoritative DNS obtains the target domain name resolution request sent by the local DNS, the client is configured to send a network request including the client's address to the scheduling server in the CDN edge node.

[0130] The dispatch server is used to create a synthetic domain name and send the synthetic domain name to the client to respond to the network request.

[0131] In some optional implementations, the dispatch server is configured to create a composite domain name based on encoding the client's address and the redirection address.

[0132] In some optional implementations, the scheduling server is configured to replace a first preset character in the client's address with a second preset character, and to replace a third preset character in the redirection address with a fourth preset character.

[0133] The scheduling server is used to encode the client address set with the second preset characters and the redirection address set with the fourth preset characters into a composite domain name.

[0134] In some optional embodiments, the scheduling server is used to encode the address of the client set with the second preset characters, the redirection address set with the fourth preset characters and the preset characters in a preset order as a prefix of the composite domain name, and configure a suffix for the prefix to obtain the composite domain name.

[0135] In some optional implementations, the dispatch server is a server for 302 redirection.

[0136] In some optional embodiments, the above-mentioned authoritative DNS is also used to restore the second preset characters in the composite domain name to the first preset characters, and extract the client address from the composite domain name; the above-mentioned authoritative DNS is also used to restore the fourth preset characters in the composite domain name to the third preset characters, and extract the redirect address from the composite domain name.

[0137] In some optional implementations, the authoritative DNS is further configured to store the client's address and the local DNS's address in a DNS log; and to analyze the DNS log to obtain a correspondence between the local DNS and the client.

[0138] In some optional implementations, there are multiple clients; the above-mentioned authoritative DNS is also used to use the addresses of multiple clients and the address of the local DNS to determine the mapping relationship between the local DNS and the multiple clients, and the local DNS is used to provide DNS services for the multiple clients.

[0139] In some optional implementations, the authoritative DNS is further used to determine the geographical locations to which the addresses of multiple clients corresponding to the local DNS belong, and to determine the geographical area served by the local DNS based on the geographical locations.

[0140] The further functional description of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0141] In this embodiment, the device for CDN to profile the local DNS 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.

[0142] The embodiment of the present disclosure also provides a computer device having the apparatus for profiling the local DNS for CDN as shown in FIG7 above.

[0143] Please refer to Figure 8, which is a structural diagram of a computer device provided by an optional embodiment of the present disclosure. As shown in Figure 8, the computer 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 and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in or on the memory to display graphical information of a 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 computer 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 takes a processor 10 as an example.

[0144] 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 an application-specific 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.

[0145] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0146] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer 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 located relative to the processor 10, and these remote memories may be connected to the computer 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.

[0147] 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.

[0148] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0149] 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 implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, 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.

[0150] Although the embodiments of the present disclosure have been described with reference to 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 method for profiling a local DNS for a CDN, comprising: Obtaining a target domain name resolution request sent by a local DNS, wherein the target domain name resolution request includes a composite domain name and an address of the local DNS, wherein the composite domain name is sent by a client to the local DNS; wherein the composite domain name includes the address of the client; Resolving the target domain name resolution request to obtain the address of the client and the address of the local DNS; A corresponding relationship between the local DNS and the client is established using the address of the client and the address of the local DNS.

2. The method according to claim 1, wherein the synthesized domain name further includes a redirection address; and the resolving the target domain name resolution request comprises: Resolving the target domain name resolution request to obtain the client's address, the local DNS address, and the redirection address; The method further includes: forwarding the redirection address to the client through the local DNS, and the client is used to access the target server according to the redirection address, where the redirection address is the network address of the target server.

3. The method according to claim 2, wherein before obtaining the target domain name resolution request sent by the local DNS, the method further comprises: The client is used to send a network request including the address of the client to the scheduling server in the CDN edge node; The scheduling server is used to create the composite domain name and to send the composite domain name to the client to respond to the network request.

4. The method according to claim 3, wherein: The dispatch server is configured to create the composite domain name based on encoding the address of the client and the redirection address.

5. The method according to claim 4, wherein The scheduling server is used to replace the first preset character in the address of the client with the second preset character, and is used to replace the third preset character in the redirection address with the fourth preset character; The scheduling server is used to encode the address of the client set with the second preset characters and the redirection address set with the fourth preset characters into the composite domain name.

6. The method according to claim 5, wherein: The scheduling server is used to encode the client address set with the second preset characters, the redirection address set with the fourth preset characters and the preset characters in a preset order as a prefix of the composite domain name, and configure a suffix for the prefix to obtain the composite domain name.

7. The method according to any one of claims 3 to 6, wherein The dispatch server is a server used for 302 redirection.

8. The method according to claim 5 or 6, wherein resolving the target domain name resolution request comprises: restoring the second preset characters in the composite domain name to the first preset characters, and extracting the address of the client from the composite domain name; The fourth preset character in the composite domain name is restored to the third preset character, and the redirection address is extracted from the composite domain name.

9. The method according to any one of claims 1 to 6, wherein the step of establishing a correspondence between the local DNS and the client using the address of the client and the address of the local DNS comprises: Storing the client's address and the local DNS address in a DNS log; The DNS log is analyzed to obtain a corresponding relationship between the local DNS and the client.

10. The method according to any one of claims 1 to 6, wherein there are multiple clients, and the step of establishing a correspondence between the local DNS and the clients using the addresses of the clients and the addresses of the local DNS comprises: The mapping relationship between the local DNS and the multiple clients is determined by using the addresses of the multiple clients and the address of the local DNS. The local DNS is used to provide DNS services for the multiple clients.

11. The method according to claim 10, further comprising: Determining the geographical locations to which the addresses of the multiple clients corresponding to the local DNS belong; A geographical area served by the local DNS is determined according to the geographical location.

12. A device for CDN to profile local DNS, comprising: an acquisition module, configured to acquire a target domain name resolution request sent by a local DNS, wherein the target domain name resolution request includes a composite domain name and the address of the local DNS, and the composite domain name is sent by a client to the local DNS; wherein the composite domain name includes the address of the client; A resolution module, configured to resolve the target domain name resolution request to obtain the address of the client and the address of the local DNS; A creation module is used to build a corresponding relationship between the local DNS and the client by using the address of the client and the address of the local DNS.

13. A system for profiling local DNS for a CDN, the system comprising: The client is configured to send a composite domain name to a local DNS, where the composite domain name includes the address of the client; The local DNS is used to send a target domain name resolution request to the authoritative DNS, where the target domain name resolution request includes the synthetic domain name and the address of the local DNS; The authoritative DNS is used to receive the target domain name resolution request and to resolve the target domain name resolution request to obtain the address of the client and the address of the local DNS; The authoritative DNS is used to establish a corresponding relationship between the local DNS and the client using the address of the client and the address of the local DNS.

14. A computer 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 method for profiling a local DNS for a CDN according to any one of claims 1 to 11 by executing the computer instructions.

15. A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are used to enable a computer to execute the method for profiling a local DNS for a CDN according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Position detection method and device for CDN

    CN103248715A

  • Method and system for acquiring and collecting local DNS server of a client

    CN108702397A

  • Correspondence relationship analysis method and device

    CN109257451A

  • Method, device and system for portraying local DNS for CDN

    CN117938807A

  • Web server load balancing system and method

    KR100944156B1